Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Prolog: create a prolog database with the below mentioned predicates. (a) flightPath/4 which stores originatingAirport, destination Airport, flightTime and distance (Make use of flightconnections.com

image text in transcribed

Using Prolog: create a prolog database with the below mentioned predicates. (a) flightPath/4 which stores originatingAirport, destination Airport, flightTime and distance (Make use of flightconnections.com to find out the flight times (round it off to the closest integer e.g. 1h20 mins =1 and 1h35 = 2, etc.) (6) transferTime/2 which stores airport and time spent in immigration, baggage, etc. (You can choose a suitable rounded integer for time spent) NRT CDG LAX LJU JFK SIN FCO A. Write the below mentioned prolog rules and show some sample results by querying them. connection(Start, Destination) to check whether destination can be reached from the starting airport or not. You should consider direct as well as indirect paths. flightTime(Start, Destination, Time, Path) to compute the flight time for all possible paths. pathLength(Path, Length) to compute the length of a given path (path will be a list). shortestPath(Start, Destination) to print the shortest path between two airports. Using Prolog: create a prolog database with the below mentioned predicates. (a) flightPath/4 which stores originatingAirport, destination Airport, flightTime and distance (Make use of flightconnections.com to find out the flight times (round it off to the closest integer e.g. 1h20 mins =1 and 1h35 = 2, etc.) (6) transferTime/2 which stores airport and time spent in immigration, baggage, etc. (You can choose a suitable rounded integer for time spent) NRT CDG LAX LJU JFK SIN FCO A. Write the below mentioned prolog rules and show some sample results by querying them. connection(Start, Destination) to check whether destination can be reached from the starting airport or not. You should consider direct as well as indirect paths. flightTime(Start, Destination, Time, Path) to compute the flight time for all possible paths. pathLength(Path, Length) to compute the length of a given path (path will be a list). shortestPath(Start, Destination) to print the shortest path between two airports

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 Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

=+ 39-2 Describe the human sexual response cycle.

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago