Facts about the situation -- image
(free online OCR:) The police are trying to track down the gang of three kids who have been steeling 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 child's age, gender, first name and last name, consistent with the data above. Encode the above data as is and do not add additional facts. Document your code appropriately. Additionally, use your Prolog code to show whether or not the computed information uniquely identifies the culprits. Submit these test results and a short explanation of their meaning in the file q2testa.txt.
I believe the suspects can be organized as follows:
suspect(Angela, _, _, female)
suspect(Mary, _, _, female)
suspect(David, _, _, male)
also I know that the ages are arranged as follows:
suspect( _, Leung, 5, _)
suspect(_, Diamond, 7, _)
suspect(_, Grant, 8, _)
this is where I am stuck as far as how to create the Prolog function to generate a full table of suspects given the above information. Some help would be appreciated.
There is not an definitive answer to this puzzle . With the given clues there are still 36 possible solutions .