Question: I am needing some help with this assignment, I know how to set it up but adding the rules is where I am having trouble.

I am needing some help with this assignment, I know how to set it up but adding the rules is where I am having trouble. If you could please help me out that would be awesome. The code is using prolog.

I am needing some help with this assignment, I know how to

set it up but adding the rules is where I am having

The program: This program is used to determine if there are airline flights scheduled between a list of cities. Your program is required to do the following: 1. Determine if there is a path from the first city to the second, each identified by a three letter code. 2. Count the number of stops en-route (there may not be a direct flight. FACTS: The flights are listed in the following table: List of Origin and Destination cities for direct flights Destination Origin City City DGZ QYY DGZ AZI QYY CSI AZI TVA CSI PPG TVA BRW BRW CSI Use this information to form the facts of your program Remember, your rules are of the form: myrelationship (cityl, city2). In this case the fact name might be something like: flight, from_to, direct_flight, or some other name that represents the concept represented. To test your program you should run the following queries: Find all the routes from DGZ to PPG (there should be two, one will have two stops, the other will have four stops) Find a route from TVA to CSI (there should be one stop) Find all the routes to BRW (there are 3). Find all the routes to PPG (there are 7 of them of with 0, 1, 2, 3, and 4 stops)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!