Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started