W3C home > Mailing lists > Public > semantic-web@w3.org > January 2006

Re: Solving Sudoku with OWL

From: Jeremy Wong 黃泓量 <jeremy@miko.hk>
Date: Tue, 10 Jan 2006 21:09:07 +0800
Message-ID: <43C3B1F3.9060203@miko.hk>
To: Aditya Kalyanpur <swap_adityak@yahoo.com>
CC: Danny Ayers <danny.ayers@gmail.com>, "Jeremy Wong \"¶Àªl¶q\"" <jeremy@1980.hk>, Semantic Web <semantic-web@w3.org>

Aditya,

I have checked your ontology and saw the online demonstration. It took 
1.6 second for your problem.

I changed my modelling work of sudoku and submitted it to the online 
Pellet. It gave me nothing. I am not sure if it is a problem of my 
modelling work. Attached is my latest work of Sudoku.


Jeremy Wong 黃泓量

--
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF [
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
<!ENTITY owl "http://www.w3.org/2002/07/owl#">
<!ENTITY sudoku "http://sw.1980.hk/2006/sudoku#">
]>
<rdf:RDF xmlns:rdf="&rdf;" xmlns:rdfs="&rdfs;" xmlns="&owl;" 
xmlns:sudoku="&sudoku;" xml:base="&sudoku;">
<Ontology rdf:about=""/>
<rdf:List rdf:nodeID="ValueCollection">
<rdf:first>
<Thing rdf:ID="A"/>
</rdf:first>
<rdf:rest rdf:parseType="Collection">
<Thing rdf:ID="B"/>
<Thing rdf:ID="C"/>
<Thing rdf:ID="D"/>
<Thing rdf:ID="E"/>
<Thing rdf:ID="F"/>
<Thing rdf:ID="G"/>
<Thing rdf:ID="H"/>
<Thing rdf:ID="I"/>
</rdf:rest>
</rdf:List>
<Class rdf:ID="Cell">
<oneOf rdf:nodeID="ValueCollection"/>
</Class>
<AllDifferent>
<distinctMembers rdf:nodeID="ValueCollection"/>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:ID="AA11"/>
<sudoku:Cell rdf:ID="AA12"/>
<sudoku:Cell rdf:ID="AA13"/>
<sudoku:Cell rdf:ID="AA21"/>
<sudoku:Cell rdf:ID="AA22"/>
<sudoku:Cell rdf:ID="AA23"/>
<sudoku:Cell rdf:ID="AA31"/>
<sudoku:Cell rdf:ID="AA32"/>
<sudoku:Cell rdf:ID="AA33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:ID="AB11"/>
<sudoku:Cell rdf:ID="AB12"/>
<sudoku:Cell rdf:ID="AB13"/>
<sudoku:Cell rdf:ID="AB21"/>
<sudoku:Cell rdf:ID="AB22"/>
<sudoku:Cell rdf:ID="AB23"/>
<sudoku:Cell rdf:ID="AB31"/>
<sudoku:Cell rdf:ID="AB32"/>
<sudoku:Cell rdf:ID="AB33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:ID="AC11"/>
<sudoku:Cell rdf:ID="AC12"/>
<sudoku:Cell rdf:ID="AC13"/>
<sudoku:Cell rdf:ID="AC21"/>
<sudoku:Cell rdf:ID="AC22"/>
<sudoku:Cell rdf:ID="AC23"/>
<sudoku:Cell rdf:ID="AC31"/>
<sudoku:Cell rdf:ID="AC32"/>
<sudoku:Cell rdf:ID="AC33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:ID="BA11"/>
<sudoku:Cell rdf:ID="BA12"/>
<sudoku:Cell rdf:ID="BA13"/>
<sudoku:Cell rdf:ID="BA21"/>
<sudoku:Cell rdf:ID="BA22"/>
<sudoku:Cell rdf:ID="BA23"/>
<sudoku:Cell rdf:ID="BA31"/>
<sudoku:Cell rdf:ID="BA32"/>
<sudoku:Cell rdf:ID="BA33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:ID="BB11"/>
<sudoku:Cell rdf:ID="BB12"/>
<sudoku:Cell rdf:ID="BB13"/>
<sudoku:Cell rdf:ID="BB21"/>
<sudoku:Cell rdf:ID="BB22"/>
<sudoku:Cell rdf:ID="BB23"/>
<sudoku:Cell rdf:ID="BB31"/>
<sudoku:Cell rdf:ID="BB32"/>
<sudoku:Cell rdf:ID="BB33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:ID="BC11"/>
<sudoku:Cell rdf:ID="BC12"/>
<sudoku:Cell rdf:ID="BC13"/>
<sudoku:Cell rdf:ID="BC21"/>
<sudoku:Cell rdf:ID="BC22"/>
<sudoku:Cell rdf:ID="BC23"/>
<sudoku:Cell rdf:ID="BC31"/>
<sudoku:Cell rdf:ID="BC32"/>
<sudoku:Cell rdf:ID="BC33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:ID="CA11"/>
<sudoku:Cell rdf:ID="CA12"/>
<sudoku:Cell rdf:ID="CA13"/>
<sudoku:Cell rdf:ID="CA21"/>
<sudoku:Cell rdf:ID="CA22"/>
<sudoku:Cell rdf:ID="CA23"/>
<sudoku:Cell rdf:ID="CA31"/>
<sudoku:Cell rdf:ID="CA32"/>
<sudoku:Cell rdf:ID="CA33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:ID="CB11"/>
<sudoku:Cell rdf:ID="CB12"/>
<sudoku:Cell rdf:ID="CB13"/>
<sudoku:Cell rdf:ID="CB21"/>
<sudoku:Cell rdf:ID="CB22"/>
<sudoku:Cell rdf:ID="CB23"/>
<sudoku:Cell rdf:ID="CB31"/>
<sudoku:Cell rdf:ID="CB32"/>
<sudoku:Cell rdf:ID="CB33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:ID="CC11"/>
<sudoku:Cell rdf:ID="CC12"/>
<sudoku:Cell rdf:ID="CC13"/>
<sudoku:Cell rdf:ID="CC21"/>
<sudoku:Cell rdf:ID="CC22"/>
<sudoku:Cell rdf:ID="CC23"/>
<sudoku:Cell rdf:ID="CC31"/>
<sudoku:Cell rdf:ID="CC32"/>
<sudoku:Cell rdf:ID="CC33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AA11"/>
<sudoku:Cell rdf:about="#AA12"/>
<sudoku:Cell rdf:about="#AA13"/>
<sudoku:Cell rdf:about="#AB11"/>
<sudoku:Cell rdf:about="#AB12"/>
<sudoku:Cell rdf:about="#AB13"/>
<sudoku:Cell rdf:about="#AC11"/>
<sudoku:Cell rdf:about="#AC12"/>
<sudoku:Cell rdf:about="#AC13"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AA21"/>
<sudoku:Cell rdf:about="#AA22"/>
<sudoku:Cell rdf:about="#AA23"/>
<sudoku:Cell rdf:about="#AB21"/>
<sudoku:Cell rdf:about="#AB22"/>
<sudoku:Cell rdf:about="#AB23"/>
<sudoku:Cell rdf:about="#AC21"/>
<sudoku:Cell rdf:about="#AC22"/>
<sudoku:Cell rdf:about="#AC23"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AA31"/>
<sudoku:Cell rdf:about="#AA32"/>
<sudoku:Cell rdf:about="#AA33"/>
<sudoku:Cell rdf:about="#AB31"/>
<sudoku:Cell rdf:about="#AB32"/>
<sudoku:Cell rdf:about="#AB33"/>
<sudoku:Cell rdf:about="#AC31"/>
<sudoku:Cell rdf:about="#AC32"/>
<sudoku:Cell rdf:about="#AC33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#BA11"/>
<sudoku:Cell rdf:about="#BA12"/>
<sudoku:Cell rdf:about="#BA13"/>
<sudoku:Cell rdf:about="#BB11"/>
<sudoku:Cell rdf:about="#BB12"/>
<sudoku:Cell rdf:about="#BB13"/>
<sudoku:Cell rdf:about="#BC11"/>
<sudoku:Cell rdf:about="#BC12"/>
<sudoku:Cell rdf:about="#BC13"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#BA21"/>
<sudoku:Cell rdf:about="#BA22"/>
<sudoku:Cell rdf:about="#BA23"/>
<sudoku:Cell rdf:about="#BB21"/>
<sudoku:Cell rdf:about="#BB22"/>
<sudoku:Cell rdf:about="#BB23"/>
<sudoku:Cell rdf:about="#BC21"/>
<sudoku:Cell rdf:about="#BC22"/>
<sudoku:Cell rdf:about="#BC23"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#BA31"/>
<sudoku:Cell rdf:about="#BA32"/>
<sudoku:Cell rdf:about="#BA33"/>
<sudoku:Cell rdf:about="#BB31"/>
<sudoku:Cell rdf:about="#BB32"/>
<sudoku:Cell rdf:about="#BB33"/>
<sudoku:Cell rdf:about="#BC31"/>
<sudoku:Cell rdf:about="#BC32"/>
<sudoku:Cell rdf:about="#BC33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#CA11"/>
<sudoku:Cell rdf:about="#CA12"/>
<sudoku:Cell rdf:about="#CA13"/>
<sudoku:Cell rdf:about="#CB11"/>
<sudoku:Cell rdf:about="#CB12"/>
<sudoku:Cell rdf:about="#CB13"/>
<sudoku:Cell rdf:about="#CC11"/>
<sudoku:Cell rdf:about="#CC12"/>
<sudoku:Cell rdf:about="#CC13"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#CA21"/>
<sudoku:Cell rdf:about="#CA22"/>
<sudoku:Cell rdf:about="#CA23"/>
<sudoku:Cell rdf:about="#CB21"/>
<sudoku:Cell rdf:about="#CB22"/>
<sudoku:Cell rdf:about="#CB23"/>
<sudoku:Cell rdf:about="#CC21"/>
<sudoku:Cell rdf:about="#CC22"/>
<sudoku:Cell rdf:about="#CC23"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#CA31"/>
<sudoku:Cell rdf:about="#CA32"/>
<sudoku:Cell rdf:about="#CA33"/>
<sudoku:Cell rdf:about="#CB31"/>
<sudoku:Cell rdf:about="#CB32"/>
<sudoku:Cell rdf:about="#CB33"/>
<sudoku:Cell rdf:about="#CC31"/>
<sudoku:Cell rdf:about="#CC32"/>
<sudoku:Cell rdf:about="#CC33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AA11"/>
<sudoku:Cell rdf:about="#AA21"/>
<sudoku:Cell rdf:about="#AA31"/>
<sudoku:Cell rdf:about="#BA11"/>
<sudoku:Cell rdf:about="#BA21"/>
<sudoku:Cell rdf:about="#BA31"/>
<sudoku:Cell rdf:about="#CA11"/>
<sudoku:Cell rdf:about="#CA21"/>
<sudoku:Cell rdf:about="#CA31"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AA12"/>
<sudoku:Cell rdf:about="#AA22"/>
<sudoku:Cell rdf:about="#AA32"/>
<sudoku:Cell rdf:about="#BA12"/>
<sudoku:Cell rdf:about="#BA22"/>
<sudoku:Cell rdf:about="#BA32"/>
<sudoku:Cell rdf:about="#CA12"/>
<sudoku:Cell rdf:about="#CA22"/>
<sudoku:Cell rdf:about="#CA32"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AA13"/>
<sudoku:Cell rdf:about="#AA23"/>
<sudoku:Cell rdf:about="#AA33"/>
<sudoku:Cell rdf:about="#BA13"/>
<sudoku:Cell rdf:about="#BA23"/>
<sudoku:Cell rdf:about="#BA33"/>
<sudoku:Cell rdf:about="#CA13"/>
<sudoku:Cell rdf:about="#CA23"/>
<sudoku:Cell rdf:about="#CA33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AB11"/>
<sudoku:Cell rdf:about="#AB21"/>
<sudoku:Cell rdf:about="#AB31"/>
<sudoku:Cell rdf:about="#BB11"/>
<sudoku:Cell rdf:about="#BB21"/>
<sudoku:Cell rdf:about="#BB31"/>
<sudoku:Cell rdf:about="#CB11"/>
<sudoku:Cell rdf:about="#CB21"/>
<sudoku:Cell rdf:about="#CB31"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AB12"/>
<sudoku:Cell rdf:about="#AB22"/>
<sudoku:Cell rdf:about="#AB32"/>
<sudoku:Cell rdf:about="#BB12"/>
<sudoku:Cell rdf:about="#BB22"/>
<sudoku:Cell rdf:about="#BB32"/>
<sudoku:Cell rdf:about="#CB12"/>
<sudoku:Cell rdf:about="#CB22"/>
<sudoku:Cell rdf:about="#CB32"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AB13"/>
<sudoku:Cell rdf:about="#AB23"/>
<sudoku:Cell rdf:about="#AB33"/>
<sudoku:Cell rdf:about="#BB13"/>
<sudoku:Cell rdf:about="#BB23"/>
<sudoku:Cell rdf:about="#BB33"/>
<sudoku:Cell rdf:about="#CB13"/>
<sudoku:Cell rdf:about="#CB23"/>
<sudoku:Cell rdf:about="#CB33"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AC11"/>
<sudoku:Cell rdf:about="#AC21"/>
<sudoku:Cell rdf:about="#AC31"/>
<sudoku:Cell rdf:about="#BC11"/>
<sudoku:Cell rdf:about="#BC21"/>
<sudoku:Cell rdf:about="#BC31"/>
<sudoku:Cell rdf:about="#CC11"/>
<sudoku:Cell rdf:about="#CC21"/>
<sudoku:Cell rdf:about="#CC31"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AC12"/>
<sudoku:Cell rdf:about="#AC22"/>
<sudoku:Cell rdf:about="#AC32"/>
<sudoku:Cell rdf:about="#BC12"/>
<sudoku:Cell rdf:about="#BC22"/>
<sudoku:Cell rdf:about="#BC32"/>
<sudoku:Cell rdf:about="#CC12"/>
<sudoku:Cell rdf:about="#CC22"/>
<sudoku:Cell rdf:about="#CC32"/>
</distinctMembers>
</AllDifferent>
<AllDifferent>
<distinctMembers rdf:parseType="Collection">
<sudoku:Cell rdf:about="#AC13"/>
<sudoku:Cell rdf:about="#AC23"/>
<sudoku:Cell rdf:about="#AC33"/>
<sudoku:Cell rdf:about="#BC13"/>
<sudoku:Cell rdf:about="#BC23"/>
<sudoku:Cell rdf:about="#BC33"/>
<sudoku:Cell rdf:about="#CC13"/>
<sudoku:Cell rdf:about="#CC23"/>
<sudoku:Cell rdf:about="#CC33"/>
</distinctMembers>
</AllDifferent>
<!-- sudoku puzzle follows -->
<Thing rdf:about="#A">
 <sameAs rdf:resource="#BB31"/>
 <sameAs rdf:resource="#CB13"/>
</Thing>
<Thing rdf:about="#B">
 <sameAs rdf:resource="#AA11"/>
 <sameAs rdf:resource="#BC12"/>
 <sameAs rdf:resource="#CC33"/>
</Thing>
<Thing rdf:about="#C">
 <sameAs rdf:resource="#AC33"/>
 <sameAs rdf:resource="#BC31"/>
 <sameAs rdf:resource="#CA11"/>
 <sameAs rdf:resource="#CB31"/>
</Thing>
<Thing rdf:about="#D">
 <sameAs rdf:resource="#BA32"/>
 <sameAs rdf:resource="#BC12"/>
 <sameAs rdf:resource="#CB22"/>
</Thing>
<Thing rdf:about="#E">
 <sameAs rdf:resource="#AB11"/>
 <sameAs rdf:resource="#AC32"/>
 <sameAs rdf:resource="#BA13"/>
</Thing>
<Thing rdf:about="#F">
 <sameAs rdf:resource="#AB13"/>
 <sameAs rdf:resource="#CA12"/>
</Thing>
<Thing rdf:about="#G">
 <sameAs rdf:resource="#CA13"/>
 <sameAs rdf:resource="#CC32"/>
</Thing>
<Thing rdf:about="#H">
 <sameAs rdf:resource="#AB22"/>
 <sameAs rdf:resource="#AC31"/>
 <sameAs rdf:resource="#BB13"/>
</Thing>
<Thing rdf:about="#I">
 <sameAs rdf:resource="#AA12"/>
 <sameAs rdf:resource="#AB31"/>
 <sameAs rdf:resource="#BA21"/>
 <sameAs rdf:resource="#CB33"/>
</Thing>
</rdf:RDF>
Received on Tuesday, 10 January 2006 13:10:27 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:44:55 UTC