0

I'm learning ontology and the DL language is difficult for me, I found good exercises online and here is one question: given follow ontology:

There are two disjoint kinds of entities: cities and countries. Each country has a single capital, a city. However, a city can be in more than one country. Each country neighbors at least one country and also perhaps the sea (we do not distinguish between different seas).

How can I express this in description logic notation?

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
alex
  • 47
  • 6
  • 2
    This seems to appear verbatim in [this exam, CSE 636: Test #1](https://s3.amazonaws.com/piazza-resources/hko8yj9gwu11l2/hmnkxu5e7in4v2/t1.pdf?AWSAccessKeyId=AKIAJKOQYKAYOBKKVTKQ&Expires=1413476597&Signature=jbrBPNVs6DclLWTbzmUQBuvjeRk%3D). (The give away was that copying 'different' from the LaTeX-generated PDF lost the ff ligature.) – Joshua Taylor Oct 16 '14 at 13:24
  • 3
    I've written up an answer (deleted at the moment), but don't want to post it publicly without some explanation that I won't just be doing someone's homework for them. – Joshua Taylor Oct 16 '14 at 13:31
  • I like that a city can be in more than one country. Off the top of my head, this is definitely a corner case in the real world. – Ignazio Oct 16 '14 at 21:23
  • @Ignazio Probably a *literal* corner or edge case. (Anywhere with border disputes could provide examples.) – Joshua Taylor Oct 17 '14 at 18:46
  • Yeah, the most obvious one that I could think of would be Berlin, up until 1989. But it's a digression from the question. – Ignazio Oct 17 '14 at 20:49

1 Answers1

0

The following example demonstrates how cardinalities can be handled. What do you think about this example? In order to left some work to you, you can model sea, cities and disjoint by your own?

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix world: <http://www.world.org/ontology/world#> .

world: rdf:type owl:Ontology .


############# country ##################
world:Country 
  a owl:Class , rdfs:Class ;
  rdfs:label "Country" ;
  rdfs:comment "representing an country in the world" ;
  rdfs:subClassOf
    [a owl:Restriction ;
    owl:onProperty :hasNeighbors ;
    owl:minCardinality 1 
    ];
  rdfs:subClassOf
    [a owl:Restriction ;
    owl:onProperty :hasCapital ;
    owl:minCardinality 1 
    ];
  rdfs:isDefinedBy world: .

world:hasNeighbors
    a owl:ObjectProperty, rdf:Property ;
    rdfs:label "hasNeighbors" ;
    rdfs:comment "The neighbor countries." ;
    rdfs:domain :Country ;
    rdfs:range :Country ;
    rdfs:isDefinedBy world: .

world:hasCapital
    a owl:ObjectProperty, rdf:Property ;
    rdfs:label "hasCapital" ;
    rdfs:comment "The capital of a country." ;
    rdfs:domain :Country ;
    rdfs:range :City ;
    rdfs:isDefinedBy world: .

############### City ####################  
world:City
  a owl:Class , rdfs:Class ;
  rdfs:label "City" ;
  rdfs:comment "representing an city in the world" ;
  rdfs:isDefinedBy world: .
jerger
  • 53
  • 1
  • 7
  • thank you very much, your answer is not in description logic, but it's a great example for describe ontology using rdfs and OWL,I've worked it out already. – alex Oct 25 '14 at 14:41
  • Your right ... I was bound to my current context ... sorry (restrictions are only a representation of small part of DL - got the point :-). If you've found your solution, do you want to share your insights with us - so we are able to learn sth.? – jerger Oct 27 '14 at 13:53