Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We are given the following PROLOG knowledge base of travel information: by_Car(miami,orlando). by_Car(orlando,tampa). by_Car(philadelphia,washington_dc). by_Car(philadelphia,new_york). by_Train(new_york,atlanta). by_Train(washington_dc,atlanta). by_Train(new_york,montreal). by_Train(washington_dc,montreal). by_Plane(atlanta,bangkok). by_Plane(atlanta,singapore). by_Plane(montreal,losAngeles). by_Plane(bangkok,miami). by_Plane(losAngeles,miami). Write

We are given the following PROLOG knowledge base of travel information:

by_Car(miami,orlando). by_Car(orlando,tampa). by_Car(philadelphia,washington_dc). by_Car(philadelphia,new_york). 
by_Train(new_york,atlanta). by_Train(washington_dc,atlanta). by_Train(new_york,montreal). by_Train(washington_dc,montreal). 
by_Plane(atlanta,bangkok). by_Plane(atlanta,singapore). by_Plane(montreal,losAngeles). by_Plane(bangkok,miami). by_Plane(losAngeles,miami). 

Write a predicate travel/2 which determines 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(philadelphia,tampa).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

which is defined as the degree of overlap between two rival markets

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago