Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a PROLOG program that assists Sherlock Holmes in finding the murderer! The Story of the Murder Mystery Sunday morning at the shared flat 'House

Write a PROLOG program that assists Sherlock Holmes in finding the murderer!

The Story of the Murder Mystery

Sunday morning at the shared flat 'House of Dawn': Sherlock Holmes has been summoned to solve a murder mystery. These are the facts of the case: Anna has been murdered with a club-like instrument. The time of death is assessed to have occurred Thursday or Friday. Nothing indicates more than one perpetrator. Indications are that the motive of the crime is money, jealousy, or insanity, and that the murderer should be found among the people sharing the flat. Sherlock Holmes has established that the murder weapon is either the wooden leg that was stolen from the penniless Ben either Thursday in Odensee or Wednesday in Copenhagen; or the hammer that was stolen from the toolbox in the flat Wednesday or Thursday. The murderer has entered Anna's room using a key that was stolen from Anna either Monday in Copenhagen or Tuesday in Odensee. A considerable amount of cash has also been removed from Anna's room. Anna's poor friend Beth has a copy of the key. Anna has a relationship to Ben, who in turn had a relationship with the rich girl Karen. Furthermore, Anna had a relationship to Peter, who is poor, but had a relationship to the wealthy girl Hannah, who in turn had a relationship to the equally wealthy Harry. Harry had been romantically involved with the poor girl Marie, who used to be involved with Adrian, who is wealthy, and used to be involved with the wealthy girl Karen. Peter was in Copenhagen on Monday and Tuesday, in Odensee Wednesday, in Copenhagen again Thursday, and had thereafter returned to the flat. Karen was in Odensee Monday through Wednesday, in Copenhagen Thursday and at the flat Friday. Harry had been at the flat on Monday, in Odensee on Tuesday, and had then returned again to the flat. Beth had spent her Monday at the flat, been in Odensee Tuesday and Wednesday, in Copenhagen on Thursday, and had returned to her home Friday morning. Adrian was in Copenhagen Wednesday, and at home for the rest of the week. Hannah was in Odensee Tuesday and Wednesday, at the flat Monday, Thursday, and Friday. Ben was in Copenhagen Monday and Tuesday, in Odensee Wednesday, in Copenhagen again on Thursday, and at home Friday. Marie had been in Copenhagen from Tuesday to Thursday, and at the flat Monday and Friday. Adrian and Marie have both been seeing a therapist because of psychotic disorders that occasionally are manifested as unmotivated violent behavior.

The idea is that the murderer must be someone who:

Had a motive. The motive could be either:

insanity,

money, or

jealousy.

Had access to perpetrating the crime. This involves both:

Having access to the weapon,

Having access to the key to the room, and

Being in the flat at the time of the crime.

 
 
 

Facts:

insane(Who).

poor(Who).

victim(Who).

involved(Who1, Who2).

stay(Who, When, Where).

 
 
 
Rules:
involved_with(A,B):-
jealous(X,Y):-
weapon_access(X):-
key_access(X):-
crime_access(X):-
access(X):-
motive(X):-
murderer(X):-

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

Step: 3

blur-text-image

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

Students also viewed these Databases questions

Question

=+development and make the product, should you go ahead and do so?

Answered: 1 week ago