0

Let's have an OWL-DL ontology considering only the TBox (no individuals) and Let's consider

Chinesefamily hasChilren max 1
SterileChinesefamily subClassOf Chinesefamily
SterileChinesefamily hasChilren exactly 0

The expression

hasChilren max 1

will return Chinesefamily and SterileChinesefamily as sub classes

Well, how to specify classes that may have 0 or 1 children (Chinesefamily) but must not have exactly 0 children (SterileChinesefamily)

I tried

hasChilren max 1 and not hasChilren exactly 0

It returns Nothing!

============= UPDATE =============

Please note

hasChilren exactly 1

is not what I intend. Instead, what I mean is classes that are subclasses of:

  1. The classes that their individuals are allowed to have either 1 or 0 children (Chinesefamily).
  2. AND
  3. NOT The classes that their individuals must have exactly zero children (SterileChinesefamily).

(Actually, I consider only the TBox (no individuals), but this update is just for clarification).

Median Hilal
  • 1,483
  • 9
  • 17
  • "hasChilren max 1 and not hasChilren exactly 0" is equivalent to "hasChildren exactly 1". You can just search for instances of that. – Joshua Taylor Apr 07 '15 at 17:53

2 Answers2

1

Well, how to specify classes that may have 0 or 1 children (Chinesefamily) but must not have exactly 0 children (SterileChinesefamily)

You are right that hasChildren exactly 0 is a subclass of hasChildren max 1, because a family with 0 children certainly has at most one child. If you're asking for families with exactly one child, simply ask for the individuals of type

        hasChildren exactly 1

what I mean is classes that are subclasses of:

  • The classes that their individuals are allowed to have either 1 or 0 children (Chinesefamily) AND
  • NOT The classes that their individuals must have exactly zero children (SterileChinesefamily).

A class expression like hasChildren max 1 doesn't have anything to do with permission, or being "allowed" to have values. It is simply the class of individuals that have either 0 or 1 values for the hasChildren property. What you're asking for is classes that are subclasses of both:

  • hasChildren max 1
  • the complement of hasChildren max 0

The complement of hasChildren max 0 is the class of individuals that have at least one child. That is, it's the class hasChildren min 1. So you're asking for classes that are subclasses of both:

  • hasChildren max 1
  • hasChildren min 1

That means you're asking for subclasses of

  • (hasChildren max 1) and (hasChildren min 1)

Now, that intersection is equivalent to

  • hasChildren exactly 1

This makes sense. The things that can have 0 or 1 children, but don't have 0 children, are the things that have 1 child.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • Well, it's a little different. The issue is that I'm working with only a TBox (i.e. no instances), and I need the DL expression sufficient to retrieve only Chinesefamily as I clarify in the question. If it comes to individuals, it will be easier and can be solved as you suggest. However, I'm not conerned with indiviuals. – Median Hilal Apr 07 '15 at 17:58
  • @MedianHilal I've updated my answer, but the end result is still the same. You're asking for things that have 0 or 1 values but that don't have 0 values. That's the same as asking for things that have 1 value. – Joshua Taylor Apr 07 '15 at 18:42
  • 1
    @MedianHilal I think that you're *trying* to ask about is what classes are such that it is *possible* for their instances to have 0 values and *possible* for their instances to have 1 value, but not *necessary* that their instances have 0 values. That's a question of alethic modality (the type of logic that handles possibility and necessity), and I'm not sure that you're going to be able to answer it in OWL. OWL classes aren't based on possibility; the class expression **hasChildren max 1** is the class of individuals that have 0 or 1 children, period. It's not the class of individuals... – Joshua Taylor Apr 07 '15 at 18:44
  • your last comment is exactly what I intend; Actually hasChildren exactly 1 will not help as it will return no results at all in my specific case. What I want is that type of DL expression that returns only Chinesefamily in my specific example. Can we still o something further in DL? – Median Hilal Apr 07 '15 at 18:48
  • 1
    ...*can* have 0 or 1 individuals. Sometimes it's possible to infer that an individual has "0 or 1" children, without knowing how many it actually has, but that's still not saying anything about possibility, just an unknown quantity. Such an individual is a member of the class **hasChildren max 1**, because **in fact** it has 0 children or it has 1 child. – Joshua Taylor Apr 07 '15 at 18:49
  • 1
    What you're really looking for is a way to ask *whether* a class X is subclass of **hasChildren max 1**, and *not* a subclass of **hasChildren exactly 0**. The thing is, ChineseFamily *could* be a subclass of **hasChildren exactly 0** if all the ChineseFamilies in an interpretation happen to have 0 children. We know that **ChineseFamily ⊑ hasChildren max 1**, but we *DO NOT KNOW* whether **ChineseFamily ⊑ hasChildren exactly 0**. – Joshua Taylor Apr 07 '15 at 18:52
  • What you could do is create some generic instances to force some constraints on your domain. E.g., create a ChineseFamily with 0 children and a Chinese Family with 1 child. *Then* you could infer that **ChineseFamily ⊑ hasChildren exactly 0** is false. – Joshua Taylor Apr 07 '15 at 18:57
  • It seems that things are a little confused. Let me remind you, and as I state in my question, that Chinesefamily must have either 1 or 0 children, but a SterileChinesefamily must have exactly zero children. Besides SterileChinesefamily is a subclass of Chinesefamily. I want the DL query that returns only Chinesefamily (i.e. without SterileChinesefamily ). – Median Hilal Apr 07 '15 at 19:03
  • 1
    @MedianHilal I think that you may need to read up on the semantics of OWL. OWL semantics are based on an interpretation that specifies a "domain" or "universe". Class expressions get mapped to sets of individuals. The class expressions **hasChildren max 0** and **hasChildren max 1** can end up denoting the same class (e.g., if there are individuals with fewer than 2 children). Unless you actually have some individual that is a ChineseFamily with 0 children but not a SterileFamily, there's no way to know whether **ChineseFamily SubClassOf hasChildren max 0** or not. Without more information – Joshua Taylor Apr 07 '15 at 20:17
  • 1
    @MedianHilal in your ontology, I don't think that you can get the results that you're looking for. OWL axioms don't record possibility and necessity. There's no way to distinguish whether an individual has 0 children because it's impossible for it to have children, or because it just happens not to have any children. You can try adding a child to it and checking whether it causes an inconsistency, but that's past the realm of a DL query. – Joshua Taylor Apr 07 '15 at 20:19
  • Well. This last conclusion seems sufficient. There may be nothing further to do. However, I want to emphasize on one point: I think that (P max 1 Thing) is equivalent to (P exactly 1 Thing or P exactly 0 Thing). However, if you try to ask (P exactly 1 Thing) in a query and (P exactly 0 Thing) in an other query, the union of those two queries results won't be equal to the result of (P exactly 1 Thing or P exactly 0 Thing)! (tried it) This a a reason why I thought that eliminating (P exactly 0 Thing) will keep two possibilities: (P exactly 1 Thing) and (P exactly 1 Thing or P exactly 0 Thing). – Median Hilal Apr 07 '15 at 20:59
  • 1
    @MedianHilal The results shouldn't be the same. Suppose I know that someone has either 0 or 1 children, but I can't remember which. Then if you ask me (hasChildren exactly 0) that person won't be in the result. If you ask me (hasChildren exactly 1) that person won't be in the result. But if you ask me (hasChildren max 1), then that person will be in the result. So while the actual set of individuals in (hasChildren max 1) is the same as the union of the sets of individuals actually in (hasChildren exactly 1) and (hasChildren exactly 0), we may be able to infer that an individual is in – Joshua Taylor Apr 07 '15 at 21:26
  • 1
    @MedianHilal (hasChildren max 1) without being able to infer (yet) that they are in (hasChildren exactly 0) or are in (hasChildren exactly 1). That's pretty reasonable. My family adopted a cat. We don't know if she ever had kittens. So I can't infer that she's a (hasKittens exactly n) for any particular n, but I can be pretty sure that she's in (hasKittens max 1000), because I don't think that she could have had 1000 kittens. The reasoner is telling you what it can **infer**. There are things that could be true in a model that can't be proven with the information yet provided. – Joshua Taylor Apr 07 '15 at 21:27
  • In the light of what you say, my original question comes into play; we have three possibilities (1:) (hasChildren exactly 1) and (2:) (hasChildren max 1) and (3:) (hasChildren exactly 0) and I want to query sufficient to eliminate the third one! However, it seems that it cannot be achieved in DL. Thanks Joshua :-) – Median Hilal Apr 07 '15 at 21:45
  • please move the result that it cannot be done in DL to an answer in order to tick it. – Median Hilal Apr 08 '15 at 07:47
1

The syntax you use at the beginning of your question is non standard:

Chinesefamily hasChilren max 1

It looks like Manchester syntax because hasChildren max 1 is a class expression in that syntax, but if you stick a name before, it's no longer Manchester. From what follows, it seems that your intention is to mean:

Class: Chinesefamily
    EquivalentClass: hasChildren max 1

(As a side note, it is strange to say that all Chinese families have only zero or one child. It is well known that there are Chinese families that have more children... just saying)

A family with exactly 1 children can be defined as follows:

Class: FamilyWithOneChildren
   SubClassOf: hasChildren exactly 1

Easy.

Antoine Zimmermann
  • 5,314
  • 18
  • 36
  • first, I'm working with TBox (no individuals). If it comes to individuals, it will be easy. However, and as I mention in the question, it's not the problem of finding families with exactly 1 children, it's the problem of finding classes that have max 1 children (i.e. the class individuals may have 1 or zero children) but not exactly zero children (i.e. all the class individuals have exactly zero children). – Median Hilal Apr 07 '15 at 18:04