An Exciting Inference

Roger Costello asked the www-rdf-logic list for a simple example of the use of OWL that allowed an Exciting Inference to be made.

Here's my attempt...

First of all a robbery takes place. The robber drops his gun while fleeing. A report is filed by the investigating officers:

<RobberyEvent>
  <date>...</date>
  <description>...</description>
  <evidence>
    <Gun>
      <serial>ABCD</serial>
    </Gun>
  </evidence>
  <robber>
    <Person /> <!-- an unknown person -->
  </robber>
</RobberyEvent>

Subsequently a car is pulled over for speeding. The traffic officer files a report electronically while issuing a ticket:

<SpeedingOffence>
  <date>...</date>
  <description>...</description>
  <speeder>
    <Person>
      <name>John Doe</name>
      <driversLicenseNumber>ZXYZXY</driversLicenseNumber>
    </Person>
  </speeder>
</SpeedingOffence>

At police HQ, the computer analyses each report as it is filed. The following OWL rule tells the computer that a driversLicenseNumber is unique to a Person:

<owl:InverseFunctionalProperty rdf:ID="driversLicenseNumber">
  <rdfs:domain rdf:resource="Person" />
  <rdfs:range  rdf:resource="&rdf;Literal" />
</owl:FunctionalProperty>

The computer uses this information to look up any other records it has about that person and finds a gun license:

<GunLicense>
  <registeredGun>
    <Gun>
      <serial>ABCD</serial>
    </Gun>
  </registeredGun>
  <holder>
    <Person>
      <name>John Doe</name>
      <driversLicenseNumber>ZXYZXY</driversLicenseNumber>
    </Person>
  </holder>
</GunLicense>

The next OWL rule tells the computer that the registeredGun property uniquely identifies a GunLicense. i.e. each gun is associated with only a single GunLicense

<owl:InverseFunctionalProperty rdf:ID="registeredGun">
  <rdfs:domain rdf:resource="GunLicense" />
  <rdfs:range  rdf:resource="Gun" />
</owl:FunctionalProperty>

The computer now knows that the person stopped for speeding owns a gun. The next rule tells the computer that each gun is uniquely identified by its serial.

<owl:InverseFunctionalProperty rdf:ID="serial">
  <rdfs:domain rdf:resource="Gun" />
  <rdfs:range  rdf:resource="&rdf;Literal" />
</owl:FunctionalProperty>

The computer uses this to determine that the gun on the license is the same gun used in the robbery. This final rule, seals the speeder's fate. It tells the computer that each GunLicense applies to only one gun and one person, so there is no doubt that the speeder is the person who owns the gun:

<owl:Class rdf:ID="GunLicense">
  <owl:intersectionOf rdf:parseType="Collection">
    <owl:Restriction>
      <owl:onProperty rdf:resource="#registeredGun"/>
      <owl:cardinality>1</owl:cardinality>
    </owl:Restriction>
    <owl:Restriction>
      <owl:onProperty rdf:resource="#holder"/>
      <owl:cardinality>1</owl:cardinality>
    </owl:Restriction>
  </owl:intersectionOf>
</owl:Class>

The computer reports back to the traffic cop who duly arrests the speeder on suspicion of armed robbery.

Updated: changed typo in name of suspect.

Permalink: http://blog.iandavis.com/2003/03/an-exciting-inference/

Other posts tagged as rdf, technology

Earlier Posts