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
Get step-by-step solutions from verified subject matter experts
