# Prolog programming basic

Task #1: (20 points) Create a knowledge base of your choosing. This knowledge base must include at least

10 items (including at least 7 facts and 3 rules) and you must come up with at least 5 querries (whereas

at least two querries will involve facts, at least two querries will involve rules, and at least one query will

have answer NO from prolog). Run the querries and show the answers (in README) you get from Prolog.

2. Task #2: (20 points) Write a rule that will find the largest element of a list of integers. Run at least 2 querries

and show the answers (in README) you get from Prolog. Your rule should work even if there are duplicate

elements, postive integers, zero, and negatives integers. Writing README carries 2 points.

3. Task #3:) (20 points) Consider the following knowledge base: Interpretation of nonStopFlight(x,y) is that

there is a one-way direct flight connection between airport x and y.

nonStopFlight(la, chicago).

nonStopFlight(sanFrancisco, columbus).

nonStopFlight(detroit, sanFrancisco).

nonStopFlight(toledo, detroit).

nonStopFlight(houston, sanFrancisco).

Write a recursive rule findFlight/2 that tells us whether there is a flight route from one town A to another town B. Run at least 3 querries (one with at least 2-hop route, one with one-hop route, one with no

Evner: Prolog

Om arbejdsgiveren:
( 1 bedømmelse ) Bowling Green, United States

Projekt ID: #18885189

## 5 freelancere byder i gennemsnit \$34 på dette job

cimemi

Hi, I am a software engineer experienced in Prolog (I am using SWI Prolog). I can complete your project within 1 day from awarding, properly tested and commented (and readme for all three problems). Looking forw Flere

\$50 USD på 1 dag
(27 bedømmelser)
4.7
sermolenko

Hello! I have great experience in Prolog programming. So I can help you with your project. What kind of Prolog are you using? Is SWI-Prolog is ok for it?

\$20 USD på 1 dag
(19 bedømmelser)
3.6
idleswell

Hello, I use Prolog programming daily in my regular employment. I will solve these 3 exercises in Prolog. All programming shall be done in SWI Prolog. A milestone payment for the full budget for this project must Flere

\$50 USD in 3 dage
(2 bedømmelser)
3.1
hashour2098