Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write and test a Prolog program q2.pl that solves the following puzzle: The police are trying to track down the gang of three kids who

Write and test a Prolog program q2.pl that solves the following puzzle: The police are trying to track down the gang of three kids who have been stealing pumpkins. So far, they have established the following facts: the kids first names are Angela, Mary, and David; one is 5, one is 7, and one is 8; one has the last name Diamond, and the one with the last name Grant is 3 years older than the one with the last name Leung. You can assume Angela and Mary are female and David is male. Use the technique shown in the zebra example discussed in class (the code is available on the course web page) to find missing information on the gang: each childs age, gender, first name and last name, consistent with the data above. (Encode the above data as is and do not add additional facts.) Use your Prolog code to show whether or not the computed information uniquely identifies the culprits; submit these test results in the file q2tests.txt, together with the program file. Document your code appropriately.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

LOQ 8-4: What information do we process automatically?

Answered: 1 week ago

Question

How good communication helps your career

Answered: 1 week ago

Question

=+designing international assignment C&B packages.

Answered: 1 week ago