Reference no: EM133423681
1. Four prospectors with only one lantern must walk through a mine shaft. At most, two prospectors can travel together and any prospector in the shaft must be with the lantern. The prospectors, named Andy, Brenda, Charlie and Dan, can walk through the shaft in one, two, four, and eight minute, respectively. When two walk together, they travel at the speed of the slower prospector. How can all four prospectors get through the mine shaft in only 15 minutes?
(On the first attempt, most get 16 minutes. There is a straight forward way to get 15.)
2. The following is an addition problem in decimal notation. Each letter represents a different digit (0-9). What digit does each letter represent? How did you get your foot in the door?
A B C
+ B D B
C B C D
Part 2: Algorithms
Background: When searching for an item in a list, each item that we examine (compare) is considered to be interrogated. For example, in the following binary search example from the lecture:
If we search for John, the following names are interrogated: Harry, Larry, John (in that order). If two names tie for the middle position, choose the first of the two names for the middle.
If we search this same list for John using the Sequential search we would interrogate all the names from Alice through John. We would start with Alice, move to Bob, move to Carol and so forth until we reached John. (See the lecture for further explanation)
Directions: Use the original list of names (Alice - Oliver) to answers questions 1-8.
Using a sequential search, what names are interrogated to find Carol?
Using a sequential search, what names are interrogated to determine that Sam is not in the list?
Using a binary search, what names are interrogated to find Carol?
Using a binary search, what names are interrogated to determine that Sam is not in the list?
Will a binary search or sequential search find Alice more quickly?
Will a binary search or sequential search find a name in the middle of the list more quickly?
Will binary search or sequential search find the absence of a name more quickly?
In general, will the binary search or sequential search find an item more quickly?
1. What is the difference between a high-level and low-level programming language?
2. What is a an algorithm?
3. What are the phases of the SDLC?
4. Describe the waterfall method of software development.
5. Describe the spiral method of software development.