Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Prolog Travel Assignment help In Prolog, given the set of facts: 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(losAngeles,auckland). A.)

Prolog Travel Assignment help

In Prolog, given the set of facts:

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(losAngeles,auckland).

A.) Write a set of rules to determine if:

  1. Travel is possible between two cities by car
  2. Travel is possible between two cities by train
  3. Travel is possible between any two cities by plane
  4. Travel is possible between any two cities using plane and/or train, but not by car
  5. Travel is possible between two cities by any method

B.) Create a second set of rules that include the distance between each town by that method of travel. Then create a new set of rules for 1 thru 5 above that return the total distance traveled.

C.) Finally, create one rule that determines if it is possible to travel between two cities by any method, and for each route, it returns the total travel by each method. For example, If traveling from City A to City B, you would travel 1000 miles. 160 by car, 500 by plane and 340 by train.

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

CyRM Mastering The Management Of Cybersecurity Internal Audit And IT Audit

Authors: David X Martin

1st Edition

0367757850, 978-0367757854

More Books

Students also viewed these Accounting questions

Question

What are the stages of project management? Write it in items.

Answered: 1 week ago