Question: How to solve this puzzle in Prolog? (robbery) Three suspects are involved in a robbery, A, B, C, D. At least one of them are

How to solve this puzzle in Prolog? (robbery)

Three suspects are involved in a robbery, A, B, C, D. At least one of them are guilty.

Here are the conditions:

1.If A is guilty, he has exactly 1 accomplice.

2.If B is guilty, he has exactly 2 accomplices.

3.C was definitely innocent.

Who are guilty?

How can I write a Prolog script to solve this problem which guilty(X) gives the gangs?

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!