Description Logics; mandatory participation - owl

I have a UML conceptual diagram; and I want to express it as DL ontology. UML classes are captured as DL concepts, where associations are captured by means of roles. One important perspective is multiplicities among UML classes. A to-one multiplicity (0..* - 0..1) is captured by a functional object property, and to make the one (0..1) side mandatory, i.e. (0..* - 1) references talk about mandatory participation implying a maximum and minimum multiplicity of 1 on the to-one side.
Here is the reference
An association A between classes C1 and C2 is formalized in DL by means of a
role A on which we enforce the assertions
To express the multiplicity ml..mu on the participation of instances of C2 for each
given instance of C1, we use the assertion
I just cannot understand how the mandatory participation of C2 in the assertion is expressed by an assertion on C1, how is the last assertion read?

Using A a as a property name is a bit unusual, so I'm going to use p instead. The UML diagram doesn't express the direction of the property either, which makes the rest of the discussion a bit confused. Some information can be gleaned from the axioms you've provided, though.
If the UML is designed to express:
Instances of C1 are related by p to at least nl and and most nu instances of C2.
At least ml and and most mu instances of C1 are related by p to each instance of C2.
then you could use the DL axioms:
C1 ⊑ ≥nl p.C2
C1 ⊑ ≤nu p.C2
C2 ⊑ ≥ml p-1.C1
C2 ⊑ ≥mu p-1.C1
Those say that if x is a C1 (C2) then x is related to the appropriate number of C2 (C1) instances by p (p-1). Now, since the relationship as expressed in UML will only relate instances of the two classes, i.e., no other types of instances will be related by property p, then it's more likely that you would declare the domain and range of p as C1 and C2, respectively, with:
∃p ⊑ C1
∃p-1 ⊑ C2
and then use a simpler version of the axioms above:
C1 ⊑ ≥nl p
C1 ⊑ ≤nu p
C2 ⊑ ≥ml p-1
C2 ⊑ ≥mu p-1
To answer the very specific question:
just cannot understand how the mandatory participation of C2 in the
assertion is expressed by an assertion on C1, how is the last
assertion read?
The notation in the last axiom in the question is unusual, and I'm not sure exactly what's supposed to be. I'm not sure what the little circumflexes are suppose to be. It looks like:
C1 ⊑ ∃ p
though. If that's what it is, it's read as
C1 is a subclass of ∃ p
which means that that
If x is an instance of C1 then x is an instance of ∃ p
which means that
If x is an instance of C1 then x is an instance of the class of things that have at least value for p (i.e., there is at least one y such that p(x,y)).
In first-order logic, you could express it as:
∀x.(C1(x) → ∃y.p(x,y))

Related

Exclude individuals that is related by some specific inverse properties

I have some individuals A,B,C,D,E, and two properties P1, P2.
A P1 B
C P1 D
E P2 C
I want to build a Class that only captures A but not C. so I set a Class like,
myClass EquivalentTo: (P1 some owl:Thing) and (P1 only owl:Thing)
myClass EquivalentTo: (P1 some owl:Thing) and (not inverse P2 some owl:Thing)
but all of those tries failed. How can I differentiate the individual A and C?
myClass EquivalentTo: (P1 some owl:Thing) and (P1 only owl:Thing)
fails because the class expression is really equivalent to P1 some Thing. Since every individual is an instance of Thing, the right hand side of the intersection really doesn't add anything.
myClass EquivalentTo: (P1 some owl:Thing) and (not inverse P2 some owl:Thing)
This is actually correct for the description that you gave. You want individuals that have some value for P1 (good), and that are not the P2 value of some other individual. This is the way to describe that.
I think the issue that you're having is that while while your data set doesn't contain any triples of the form
x P2 A
there's nothing in the ontology that says that such a thing is impossible. So you can't be sure that A actually has the type (not inverse P2 some Thing). This phenomenon is known as the open world assumption (OWA). If you search for that, you'll find some other questions on Stack Overflow about OWA in OWL. See, for instance:
Why is this DL-Query not returning any individuals?
Strange query behaviour in OWL!
In this case, if you want to say that A isn't the P2 value of some other individual, you'd probably have to do it manually, by adding a type to A like:
inverse P2 only owl:Nothing
Once you do that, you'll get the results you want:

4NF, Multivalued Dependencies without Functional Dependencies

Sorry for asking a question one might consider a basic one)
Suppose we have a relation R(A,B,C,D,E) with multivalued dependencies:
A->>B
B->>D.
Relation R doesn't have any functional dependencies.
Next, suppose we decompose R into 4NF.
My considerations:
Since we don't have any functional dependencies, the only key is all attributes (A,B,C,D,E). There are two ways we can decompose our relation R:
R1(A,B) R2(A,C,D,E)
R3(B,D) R4(A,B,C,E)
My question is - are these 2 decompositions final? Looks like they are since there are no nontrivial multivalued dependencies left. Or am I missing something?
Relation R doesn't have any functional dependencies.
You mean, non-trivial FDs (functional dependencies). (There must always be trivial FDs.)
Assuming that the MVDs (multivalued dependencies) holding in R are those in the transitive closure of {A ↠ B, B ↠ D}:
In 1 R1(A,B) R2(A,C,D,E), we can reconstruct R as R1 JOIN R2 and both R1 & R2 are in 4NF and their join will satisfy A ↠ B. If some component contained all the attributes of the other MVD then we could further decompose it per that MVD. And we would know that, given some alleged values for all components, their alleged reconstruction of R by joining would satisfy both MVDs. But here there is no such component. So we can't further decompose. And we know that an alleged reconstruction of R by joining satisfies A ↠ B but we would still have to check whether B ↠ D. We say that the MVD B ↠ D is "not preserved" and the decomposition to R1 & R2 "does not preserve MVDs".
In 2 R3(B,D) R4(A,B,C,E), we can reconstruct R as R3 JOIN R4 and both R3 & R4 are in 4NF and the join will satisfy B ↠ D. Now some component contains all the attributes of the other MVD so we can further decompose it per that MVD. And we know that, given some alleged values for all components, their alleged reconstruction of R by joining satisfies both MVDs. That component is R4, which we can further decompose, reconstructing as AB JOIN ACE. And we know that an alleged reconstruction of R by joining satisfies both A ↠ B & B ↠ D. Because the MVDs in the original appear in a component, we say these decompositions "preserve MVDs".
PS 1 The 4NF decomposition must be to three components
MVDs always come in pairs. Suppose MVD X ↠ Y holds in a relation with attributes S, normalized to components XY & X(S-Y). Notice that S-XY is the set of non-X non-Y attributes, and X(S-Y) = X(S-XY). Then there is also an MVD X ↠ S-XY, normalized to components X(S-XY) & X(S-(S-XY)), ie X(S-XY) & XY, ie X(S-Y) & XY. Why? Notice that both MVDs give the same component pair. Ie both MVDs describe the same condition, that S = XY JOIN X(S-XY). So when an MVD holds, that partner holds too. We can write the condition expressed by each of the MVDs using the special explicit & symmetrical notation X ↠ Y | S-XY.
We say a JD (join dependency) of some components of S holds if and only if they join to S. So if S = XY JOIN X(S-Y) = XY JOIN X(S-XY) then the JD *{XY, X(S-XY)} holds. Ie the condition that both MVDs describe is that JD. So a certain MVD and a certain binary JD correspond. That's one way of seeing why normalizing an MVD away involves a 2-way join and why MVDs come in pairs. The JDs that cause a 4NF relation to not be in 5NF are those that do not correspond to MVDs.
Your example involves two MVDs that aren't partners & neither otherwise holds as a consequence of the other, so you know that the final form of a lossless decomposition will involve two joins, one for each MVD pair.
PS 2 Ambiguity of "Suppose we have a relation with these multi-valued dependencies"
When decomposing per FDs (functional dependencies) we are usually given a canonical/minimal cover for the relation, ie a set in a certain form whose transitive closure under Armstrong's axioms (set of FDs that must consequently hold) holds all the FDs in the relation. This is frequently forgotten when we are told that some FDs hold. We must either be given a canonical/minimal cover for the relation or be given an arbitrary set and be told that the FDs that hold in the relation are the ones in its transitive closure. If we're just given a set of FDs that hold, we know that the ones in its transitive closure hold, but there might be others. So in general we can't normalize.
Here you give some MVDs that hold. But they aren't the only ones, because each has a partner. Moreover others might (and here do) consequently hold. (Eg X ↠ Y and Y ↠ Z implies X ↠ Z-Y holds.) But you don't say that they form a canonical or minimal cover. One way to get a canonical form for MVDs (a unique one per each transitive closure, hopefully more concise!) would be a minimal cover (one that can't lose any MVDs and still have the same transitive closure) augmented by the partner of each MVD. (Whereas for FDs the standard canonical form is minimal.) You also don't say "the MVDs that hold are those in the transitive closure of these". You just say that those MVDs hold. So maybe some not in the transitive closure do too. So your example can't be solved. We can guess that you probably mean that this is a minimal cover. (It's not canonical.) Or that the MVDs that hold in the relation are those in the transitive closure of the given ones. (Which in this case are then a minimal cover.)
A Table is in 4NF if and only if, for every one of its non-trivial multivalued dependencies X ->> Y, X is a superkey—that is, X is either a candidate key or a superset.
In your first decomposition(1 with R1 and R2) B->>D is not satisfying so it's not dependency preserving decomposition as well as not in 4NF as A is not superkey in 2nd table.
On the other hand,second decomposition(2 with R3 and R4) is dependency preserving and lossless join with B and ACE as primary key in respective tables but it's not in 4NF because A->>B dependency exists in second table and A is not superkey, you have to decompose second table further in to two tables that can be {A B} and {A C E}.
So if I follow your reasoning (suraj3), are R1(A,B) and R2(B,C,D,E) correct decomposition? I think this will preserve the FD B->>D.

Non-trivial Functional Dependency of this table

Which non-trivial functional dependencies hold in the following table?
Can anyone explain step by step the rules please?
A B C
------------
a1 b2 c1
a2 b1 c6
a3 b2 c4
a1 b2 c5
a2 b1 c3
a1 b2 c7
I'll start with a disclaimer to state that my knowledge of functional dependencies is limited to what was explained in the Wikipedia article, and that I currently don't have the need nor the inclination to study up on it further.
However, since OP asked for clarification, I'll attempt to clarify how I obtained the seemingly correct answer that I posted in the comments.
First off, this is Wikipedia's definition:
Given a relation R, a set of attributes X in R is said to
functionally determine another set of attributes Y, also in R,
(written X → Y) if, and only if, each X value is associated with
precisely one Y value; R is then said to satisfy the functional
dependency X → Y.
Additionally, Wikipedia states that:
A functional dependency FD: X → Y is called trivial if Y is a
subset of X.
Taking these definitions, I arrive at the following two non-trivial functional dependencies for the given relation:
A → B
C → {A, B}
Identifying these was a completely inductive process. Rather than applying a series of rules, formulas and calculations, I looked at the presented data and searched for those constraints that satisfy the above definitions.
In this case:
A → B
There are three possible values presented for A: a1, a2 and a3. Looking at the corresponding values for B, you'll find the following combinations: a1 → b2, a2 → b1, and a3 → b2. Or, every value of A is associated with precisely one B value, conforming to the definition.
C → {A, B}
The same reasoning goes for this dependency. In this case, identifying it is a little bit easier as the values for C are unique in this relation. In this sense, C could be considered as a key. In database terms, a candidate key is exactly that: a minimal set of attributes that uniquely identifies every tuple.
Undoubtedly, there's a way to mathematically derive the functional dependencies from the data, but for simple cases like this, the inductive process seems to work just fine.
So, non-trivial functional dependencies in the above table are:
1. A->B
2. A,C->B
3. B,C->A
4. C->A,B

OWL-DL; determining if an expression is legal

In SHOIN(D) that is equivalent to the DL family used by OWL-DL;
Is this expression legal:
F ⊑ (≤1 r. D) ⊓ (¬ (=0 r. D))
Where F, D are concepts, r is a role. I want to express that each instance of F is related to at most one instance of D through r, and not to zero instances.
In general, how to decide that some expression is legal w. r. t. a specific variation of DL? I thought that using BNF syntax of the variation may be what I'm targeting.
One easy way is to check whether you can write it in Protege. Most of the things that you can write in Protege will be legal OWL-DL. In Protege you can write:
F SubClassOf ((r max 1 D) and not(r exactly 0 D))
Of course, saying that something has at most 1 value, and not exactly one would be exactly the same as saying that it has exactly 1:
F SubClassOf r exactly 1 D
But there are a few things that you'll be able to do in Protege that won't be legal OWL-DL. The more direct way to find out what these are is the standard, specifically §11 Global Restrictions on Axioms in OWL 2 DL. Generally the only problems you might run into is trying to use composite properties where you're not allowed to.
If you don't want to check by hand, then you could try uploading your ontology into the OWL Validator and selecting the OWL2 DL profile.

DL; Generic reasoning algorithms

Actually, I'm getting lost about what can be done and cannot be done using a reasoner in general.
My question is two fold:
I used to think that a reasoner is only dedicated for sumbsumption and taxonomies. Recently, I discovered that a reasoner can be used in multiple ways within some algorithms for example this reference introduces using a reasoner to search for entities compliant to a specific pattern in the ontology:
What is meant by a DL generic reasoning algorithm and how can it
be implemented through a reasoner?
Can you please refer my to
any references where I can get more familiar to things that can be
achieved by reasoning algorithms if any?
My original problem is that: given an OWL ontology and two classes C1 and C2, I want to check whether there is a functional property chain connecting them, i.e.
let's consider (C1 P1 C3), (C3 P2 C4)and (C4 P3 C2) where P1, P2 and P3 are functional object properties, thus the result will be (P1, P2, P3) which is the functional property chain connecting C1 and C2.

Resources