Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

prolog Consider the following knowledge base: Interpretation of nonStopFlight(x,y) is that there is a to-and-fro flight connection between airport x and y. nonStopFlight(la, chicago) nonStopFlight(philadelphia,

image text in transcribedprolog

Consider the following knowledge base: Interpretation of nonStopFlight(x,y) is that there is a to-and-fro flight connection between airport x and y. nonStopFlight(la, chicago) nonStopFlight(philadelphia, la). nonStopFlight(columbus, philadelphia) nonStopFlight(sanFrancisco, columbus). nonStopFlight(detroit, sanFrancisco) nonStopFlight(toledo, detroit) nonStopFlight(houston, sanFrancisco). Write a recursive rule find Flight/2 that tells us whether there is a flight route from one town A to an-other town B. Run at least 3 querries (one with at least 2-hop route, one with one-hop route, one with noroute) and show the answers Consider the following knowledge base: Interpretation of nonStopFlight(x,y) is that there is a to-and-fro flight connection between airport x and y. nonStopFlight(la, chicago) nonStopFlight(philadelphia, la). nonStopFlight(columbus, philadelphia) nonStopFlight(sanFrancisco, columbus). nonStopFlight(detroit, sanFrancisco) nonStopFlight(toledo, detroit) nonStopFlight(houston, sanFrancisco). Write a recursive rule find Flight/2 that tells us whether there is a flight route from one town A to an-other town B. Run at least 3 querries (one with at least 2-hop route, one with one-hop route, one with noroute) and show the answers

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

Students also viewed these Databases questions