Question: 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
Get step-by-step solutions from verified subject matter experts
