What algorithm would you create to find a door and what may be behind it? If you find the cash, what steps will you take to find the correct door out of the room and avoid the deadly spikes?

ASSIGNMENT

Background:

The town recluse has invited you to dinner at his lavish century-old Victorian mansion outside of town; the dress is formal. When you arrive, you greet and are greeted by the other guests and house staff. After socializing, dinner begins in the dining room underneath the sparkling crystal chandelier with dishes that dazzle every sense. Eventually all the guests, including you, retire to the beautifully appointed and elegant drawing room. You lean back in a comfortable chair to enjoy after dinner refreshments and even better conversation and games. Eventually, despite your best efforts, you fall asleep from all the good food and refreshment.

When you wake, you are seated in total darkness and briefly disoriented. Suddenly, a mellifluous voice announces that there is a new game in which you have the chance to win $100,000 simply by finding the bag of cash behind a certain door in the room. Once you have found the money, then you must find the door to the mansion’s corridor.

However, it’s not as easy as it sounds. You are told there are four doors in the round room in each of the cardinal directions (East, West, North, South). Your chair is in the center of the room, but you do not know which direction you are facing. Each door holds one of the following special surprises behind it:

Door 1 leads to the corridor
Door 2 leads to a 40 foot drop to a cave floor underneath the mansion and death
Door 3 leads to the bag of cash
Door 4 leads to a vicious dog that would love to eat you.
You obviously have only one chance to pick the correct door with the money and then exit the room through the correct door to the corridor.

Additional information:

Once you stand, your chair will sink into the floor so you must remember how many steps you took from it to the wall and/or door because you must remember this to get back to your starting point.
You have no form of communication with the outside world (i.e. no cell phone, etc.).
The room is totally silent (i.e. no outside noises or noises from within the room).
When you pick a door, you must step through into a small vestibule and shut the door to see if you have chosen well. One of the following will happen:
The floor will open, and you will drop 40 feet to the cave floor
A viscous dog will be released through a hidden panel
A panel directly in front of you will open with a bag of cash for you to grab
A door will open to the corridor and your escape
If you find door to the cash,
when you lift the bag, hundreds of razor sharp spikes will protrude from the walls of the main room so you can’t feel your way to follow the wall to any other door.
exit the vestibule and, remembering your steps, turn around and proceed back to the center of the room.
From this starting point, you will have to turn 90 degrees in either of two directions to exit the room through either the door to the corridor and success or the door to the 40 foot drop to the cave floor and death. Notice that you no longer will have the dog to worry about!
There is no light whatsoever in the room – total darkness.

Questions to Analyze:

What algorithm would you create to find a door and what may be behind it? If you find the cash, what steps will you take to find the correct door out of the room and avoid the deadly spikes?

Of all the information given to you, what is most important to take into consideration?

How will you sense your surroundings?

Use natural language to write your algorithm. Applying deductive reasoning, write the algorithm using logic based upon your assumptions and the defined alternatives and outcomes provided in the exercise.

Upload your assignment as a Microsoft Word document (.docx) using the following naming protocol: LastnameFirstnameVictorianMansion.docx.

What algorithm would you create to find a door and what may be behind it? If you find the cash, what steps will you take to find the correct door out of the room and avoid the deadly spikes?
Scroll to top