Question 1we are given the following knowledge base of

Assignment Help Application Programming
Reference no: EM13346613

Question 1

We are given the following knowledge base of travel information:

 byCar(auckland,hamilton).  
 byCar(hamilton,raglan).  
 byCar(valmont,saarbruecken).  
 byCar(valmont,metz).  
 byTrain(metz,frankfurt).  
 byTrain(saarbruecken,frankfurt).  
 byTrain(metz,paris).  
 byTrain(saarbruecken,paris).  
 byPlane(frankfurt,bangkok).  
 byPlane(frankfurt,singapore).  
 byPlane(paris,losAngeles).  
 byPlane(bangkok,auckland).  
 byPlane(singapore,auckland).  
 byPlane(losAngeles,auckland).
 
a) Write a predicate travel/2 which calculates whether it is possible to  travel from one place to another by chaining together car, train, and  plane journeys. For example, your program should answer yes to the  query travel(valmont,raglan).

So, by using travel/2 to query the above database, you can ?nd out that  it is possible to go from Valmont to Raglan. If you are planning such a  voyage, that's already something useful to know, but you would probably prefer to have the precise route from Valmont to Raglan.

b) Write a predicate travel/3 which tells you which route to take when travelling from one place to another. For example, the program should respond 

X = go(valmont,metz,

 go(metz,paris,

 go(paris,losAngeles)))

to the query travel(valmont,losAngeles,X).

c) Extend the predicate travel/3 so that it not only tells you the route to take to get from one place to another, but also how you have to travel.

Reference no: EM13346613

Questions Cloud

A case study is a standard format for recounting the story : a case study is a standard format for recounting the story of a specific case. a case study should have the following
The aim of this assignment is to assess whether the : the aim of this assignment is to assess whether the learning outcomes of the module have been met.after completing the
Implement a database of courses and students for a school : implement a database of courses and students for a school keeping track of which students are taking which courses.
Lines of action- explain how you will use a search tree to : lines of action- explain how you will use a search tree to find the solutionbullabstractbullintroductionbullrelated
Question 1we are given the following knowledge base of : question 1we are given the following knowledge base of travel informationnbspbycaraucklandhamilton.
Write a matlab function speed planetary n emesh first last : write a matlab function speed planetary n emesh first last arm that computes the speed of a given link in a
Task 1question 1 product analysis this question begins a : task 1question 1 product analysis this question begins a process of finding out about why people like some of the
Your task is to realize two additional data generation : your task is to realize two additional data generation functions. firstly extend the system to generate random integral
Mampae-iii corp is investigating the possible acquisition : mampae-iii corp. is investigating the possible acquisition of silicon inc. assume that both firms have no debt

Reviews

Write a Review

Application Programming Questions & Answers

  In this project you will create an application to run in

in this project you will create an application to run in the amazon ec2 service and you will also create a client that

  Imagine that your company has decided to expand to the web

imagine that your company has decided to expand to the web. you want to reuse some data entry code that has been

  1 here is a short program it prints out the value of a

1. here is a short program. it prints out the value of a variable x. ernie and bert disagree about what will be printed

  If the user wants to read the input from a file then the

if the user wants to read the input from a file then the output will also go into a different file. if the user wants

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd