CS 6905 Semantic Web Techniques

Assignment 2


Hints: You may want to use j-DREW from Lab 2 to help you decide some of these questions and to check your answers.  You may want to use a Prolog system such as http://clip.dia.fi.upm.es/Software/Ciao/ or http://www.swi-prolog.org/. 

All questions are to be answered.  This assignment is due Oct 16, to be handed in at the beginning of class.

1.     Express in Prolog clauses that custard with caramel sauce that has been glazed is called crème brulée.  Thus you will use the name creme_brulee.

2.     Assume that a person seeks serving suggestions for crème brulée and uses search keywords “caramel” and “glazed”.  Define clauses so that a smart search engine can use your clauses to find web pages about_creme_brulee, even if the web pages do not mention glazing explicitly.  Assume the search engine places an “and” condition between keywords.

3.     Suppose that a smart search engine is used for route planning.  Further suppose a web site for Acadian Lines mentions that it connects Sydney to Truro on one route and Truro to Amherst on another.  Finally suppose that there is an SMT Bus connection from Fredericton to Sussex and from Sussex to Amherst.  Express these statements in Prolog clauses:

a.      The relation connected_to_via_Acadian_Lines is a special case of connected_to.

b.     The relation connected_to_via_SMT is also a special case of connected_to.

c.      The relation connected_to is transitive and symmetric.

4.     Give a Prolog derivation proving that Sydney is connected to Fredericton, and give another showing that Fredericton is connected toSydney.  For your derivation you may use a suitably abbreviated version of the tree that j-DREW gives. (For example, the right hand side of each rule is duplicated, once showing with the head and once again indented below – so in your derivation give just the indented one of these.)

5.     What problem(s) can arise when explicitly creating all of the connected_to facts implied by your connected_to rules, using Prolog’s strategy of applying rules in textual order and selecting goals in left-to-right, depth-first order?  For each problem discuss what solutions can you propose.  Please discuss at least two problems.

6.     Showing that the connection exists is not very useful. It is important for a person to know the route to take. Adjust your rules for connected_to so that the route is listed in another argument, suitably referred to within a structure analogous to the Embedded Struct Element referred to on page 60 of Notes.  You may using multiple levels of nesting within the structure.


Maintained by Bruce Spencer