"Solve this problem with 3 different algorithms with Python and please tell me which is the most efficient algorithm and why."

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

"Solve this problem with 3 different algorithms with Python and please tell me which is the most efficient algorithm and why."  

The Mystery of Marshall Mansion Murder
Last Christmas, I was invited to the Marshall Mansion by Lashram Rivers, a friend I
had met a few months before at another friend's wedding party, for a private dinner
since I just moved into the city and had no one to celebrate Thanksgiving with.
Rivers was adopted by Mr Phillip Marshall, the mansion's owner, when he was 8
years old. Mr Marshall is a wealthy businessman who runs several manufacturing
factories all over the US, and Rivers helps manages the business for Marshall.
Close families and friends attended the dinner. Mr Marshall's children, Jones and
Jenna Marshall, his brother and sister, Peter and Penelope Marshall, his uncle Will
Marshall and several other close friends of the family; around 15 people were eating
at the large dining table that night.
The dinner was wonderful, with plenty of food to eat. But suddenly, in the middle of
the desert, Mr Marshall gasped and fell off his chair. Everyone was panicking, and I
ran to Mr Marshall to see what could be done. A few minutes later, while waiting for
the ambulance, Mr Marshall was not breathing anymore.
Part 1: Who poisoned Marshall?
A few moments before Mr Marshall passed away, he whispered, "I know who did
this". As a detective who works for the Police department in this city, I realised this
was not an accident; instead, someone had murdered Mr Marshall.
After the mansion was closed for investigation and everyone had left, I started
looking for clues. The mansion was a big building with many rooms over a huge
land and a lake, and I managed to get a layout of the building (Figure 1) and the
surrounding areas (Figure 2). The main building must have some clues, so I will
search all the rooms.
Transcribed Image Text:The Mystery of Marshall Mansion Murder Last Christmas, I was invited to the Marshall Mansion by Lashram Rivers, a friend I had met a few months before at another friend's wedding party, for a private dinner since I just moved into the city and had no one to celebrate Thanksgiving with. Rivers was adopted by Mr Phillip Marshall, the mansion's owner, when he was 8 years old. Mr Marshall is a wealthy businessman who runs several manufacturing factories all over the US, and Rivers helps manages the business for Marshall. Close families and friends attended the dinner. Mr Marshall's children, Jones and Jenna Marshall, his brother and sister, Peter and Penelope Marshall, his uncle Will Marshall and several other close friends of the family; around 15 people were eating at the large dining table that night. The dinner was wonderful, with plenty of food to eat. But suddenly, in the middle of the desert, Mr Marshall gasped and fell off his chair. Everyone was panicking, and I ran to Mr Marshall to see what could be done. A few minutes later, while waiting for the ambulance, Mr Marshall was not breathing anymore. Part 1: Who poisoned Marshall? A few moments before Mr Marshall passed away, he whispered, "I know who did this". As a detective who works for the Police department in this city, I realised this was not an accident; instead, someone had murdered Mr Marshall. After the mansion was closed for investigation and everyone had left, I started looking for clues. The mansion was a big building with many rooms over a huge land and a lake, and I managed to get a layout of the building (Figure 1) and the surrounding areas (Figure 2). The main building must have some clues, so I will search all the rooms.
Stair to
1st floor
Utility
Stair to
1st floor
Utility
Library
Room 1
Courtyard
1
Main hall
Entrance
Ground Floor
VOID
Master Bedroom
Balcony
1st Floor
Kitchen
Dining
11
Room 3
Room 2
Figure 1: Floor plan of the main building (with grid markings around the building)
y
Lake
Bakony
Bakony
Problem:
How to search all the rooms in the building without missing any?
Figure 2: Marshall Mansion Overall Property Layout (with grid markings around the
property)
Transcribed Image Text:Stair to 1st floor Utility Stair to 1st floor Utility Library Room 1 Courtyard 1 Main hall Entrance Ground Floor VOID Master Bedroom Balcony 1st Floor Kitchen Dining 11 Room 3 Room 2 Figure 1: Floor plan of the main building (with grid markings around the building) y Lake Bakony Bakony Problem: How to search all the rooms in the building without missing any? Figure 2: Marshall Mansion Overall Property Layout (with grid markings around the property)
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education