Regularity of Rboxes in Description Logic - owl

Based on the definition taken from Foundations of Semantic Web Technologies by Hitzler et al, a role hierarchy is called regular if there exists a strict partial order ≺ on R, such
that the following hold:
a) ○ S ≺ R if and only if S− ≺ R
b) ○ every role inclusion axiom is of one of the forms:
■ R ◦ R ⊑ R, R− ⊑ R, S1 ◦ · · · ◦ Sn ⊑ R,
R ◦ S1 ◦ · · · ◦ Sn ⊑ R, S1 ◦ · · · ◦ Sn ◦ R ⊑ R
such that R is a non-inverse role name, and Si ≺ R for i = 1, . . . , n.
I do not understand what strict partial order on roles exactly means
and how I should interpret the notation "≺" representing it. How should I read "S ≺ R"? I'd appreciate any sort of explanation/example.
Thanks in advance!

Related

Finding the canonical cover? [duplicate]

I have a relation r(A,B,C,D,E,F) satisfying:
AB->C
C->A
BC->D
ACD->B
BE->C
CE->FA
CF->BD
D->EF
I need to find the canonical cover for this relation?
I know the algorithm to find the canonical cover. However in the algorithm, we need to find the extraneous attributes. Is there an algorithm to find extraneous attributes?
The algorithm to find extraneous attributes is the following:
let F the initial set of functional dependencies
assume that each dependency F is in the form A1, A2, ..., An -> B
for each functional dependency A1, A2, ..., An -> B in F with n > 1
for each Ai
if B ∈ ({A1, A2, ..., An} - Ai)+
then Ai is an extraneous attribute and must be removed from the left hand side
Note that the closure of the remaining attributes must be computed by considering all the dependencies of F, including the dependency under examination (this can be counterintuitive).
For instance, applying this algorithm to your example, starting from the dependencies:
{ A B → C
A C D → B
B C → D
B E → C
C → A
C E → A
C E → F
C F → B
C F → D
D → E
D → F }
In A C D → B, A is estraneous since {C D}+ = (A B C D E F), while in C E → A, E is estraneous since {C}+ = (A C).

Did I do this BCNF decomposition correctly?

Given schema R = (A, B, C, D, E, G) and functional dependencies :
F = { A -> BC, BD -> E, AD -> E, CD -> AB }
BCNF decomposition:
A -> BC, but A is not a superkey of R. Replace R by 2 relations: R1(A, B, C) and R2(A, D, E, G).
AD -> E holds on R_2, but AD is not a superkey for R2. Replace R2 by 2 relations: R2(A,D,E) and R3(A,D,G)
Left with R1(A,B,C), R2(A,D,E), R3(A,D,G)
It is not dependency preserving as you would need to do a join to compute BD -> E.
Did I do this decomposition correctly? Also, how can I determine if it is a lossless decomposition?

How to find the extraneous attributes of functional dependency?

I have a relation r(A,B,C,D,E,F) satisfying:
AB->C
C->A
BC->D
ACD->B
BE->C
CE->FA
CF->BD
D->EF
I need to find the canonical cover for this relation?
I know the algorithm to find the canonical cover. However in the algorithm, we need to find the extraneous attributes. Is there an algorithm to find extraneous attributes?
The algorithm to find extraneous attributes is the following:
let F the initial set of functional dependencies
assume that each dependency F is in the form A1, A2, ..., An -> B
for each functional dependency A1, A2, ..., An -> B in F with n > 1
for each Ai
if B ∈ ({A1, A2, ..., An} - Ai)+
then Ai is an extraneous attribute and must be removed from the left hand side
Note that the closure of the remaining attributes must be computed by considering all the dependencies of F, including the dependency under examination (this can be counterintuitive).
For instance, applying this algorithm to your example, starting from the dependencies:
{ A B → C
A C D → B
B C → D
B E → C
C → A
C E → A
C E → F
C F → B
C F → D
D → E
D → F }
In A C D → B, A is estraneous since {C D}+ = (A B C D E F), while in C E → A, E is estraneous since {C}+ = (A C).

Formally and Informally describe the language of this grammar

I have a question I would like some help with:
Formally and informally describe the language of the following grammar G = (Σ, N, S, P):
Σ = {a,b,c}
N = {S,T,X}
S = S
P = {
S->aTXc,
S->bTc,
T->aTX,
T->bT,
TXX->T,
Tc->empty string,
TXc-a>
}
Moreover, briefly and informally explain how this grammar generates its language.
Hint: Use |w|x notation to describe the language of this grammar.
I believe the language of the grammar
S → bTc | aTXc
T → bT | aTX
TXX → T
Tc → λ
TXc → a
is (a|b)+. First, consider derivations from T using the T-productions:
T ⇒* bnT (T → bT)
T ⇒* anTXn (T → aTX)
where n > 0. Since T → bT and T → aTX can be applied in arbitrary order, it follows that
T ⇒* uTX|u|a
where u has the form (a|b)+ and |u|a ≥ 0. Next, consider the production TXX → T:
T ⇒* uTX|u|a ⇒* uTX1(|u|a (mod 2) ≡ 1)
where 1(P) = 1 if P and 0 otherwise. Putting this together with the S-productions, we have:
S ⇒ bTc ⇒* buTX1(|u|a (mod 2) ≡ 1)c ⇒ buTc ⇒ bu
S ⇒ aTXc ⇒* auTX1(|u|a (mod 2) ≡ 1)Xc ⇒ auTXc ⇒ aua
if |u|a (mod 2) ≡ 0 and
S ⇒ bTc ⇒* buTX1(|u|a (mod 2) ≡ 1)c ⇒ buTXc ⇒ bua
S ⇒ aTXc ⇒* auTX1(|u|a (mod 2) ≡ 1)Xc ⇒ auTXXc ⇒ auTc ⇒ au
if |u|a (mod 2) ≡ 1 where u has the form (a|b)+. In the last step of the preceding derivations, applying more T-productions does not generate strings having a different form. Thus, I believe that all derivable strings have the form (a|b)+. My concern is that you were instructed to use |u|a notation to describe the grammar's language, so this belief might be in error.

Given a relation with FDs, compute the closure of set of attributes

Consider the relation schema R = ABCDG with following functional dependencies (FD)
AB -> C
C -> A
BC -> D
ACD -> D
D -> EG
BE -> C
CG -> BD
CE -> AG
Compute closure of BD and CA.
How we can find them?
The closure of a set of functional dependencies, F, means all the functional dependencies logically implied by F. For example, given
BC -> D, and
D -> EG
we can apply Armstrong's axioms to derive
D -> E,
D -> G,
BC -> E,
BC -> G,
and so on.
When you've derived every FD implied by F, you have the closure of F with respect to R. In your case, you want to derive every FD logically implied by BD and CA.
As far as I know, every textbook on relational database theory includes one or more algorithms to compute the closure of a set of functional dependencies. Your best bet is to follow one of the algorithms in your textbook, if you have one.
Here is a simple algorithm for computing the closure of a set of attributes X:
Closure(X, F)
1 INITIALIZE V:= X
2 WHILE there is a Y -> Z in F such that:
- Y is contained in V and
- Z is not contained in V
3 DO add Z to V
4 RETURN V

Resources