Lab 1 -- Problem Solving

Answer Sheet

Exercise 1

A partial solution to the Missionaries and Cannibals problem is given below ( M represents missionaries, C represents cannibals, and E represents the east side of the river ).
Complete the solution to this problem.
A.  M & C go to East side, M brings boat back    (1C on E)
B.  2 Cs go to East side, C brings boat back     (2C on E)
C.  2 Ms go to East side, M & C bring boat back  (1M, 1C on E)
D. 
E. 
F. 

Exercise 2

If the file contained only five integers:  9, 3, 10, 6, and 2 what would the bit array B[] look like after the "while" loop finishes? (Assume the first position in the bit array is called location 1. Write the answer something like 01010110001100... where 1 and 0 have the obvious meaning.

Exercise 3

Explain the strategy of "incubation".

Exercise 4

Explain the divide and conquer strategy for problem solving.

Exercise 5

Bentley's Sorting Flowchart

Bentley's Sorting Flowchart   Complete Section 3
of the flowchart.
A.
B.
C.
D.
E.

Exercise 6

Explain what could go wrong with this sorting technique. For example, describe what happens if the data file contains duplicate values.

Exercise 7

{ Script }

Exercise 8

{ Script }

----- End of Lab1 - Problem Solving -----
Complete the Exercises on the Answer Sheet.
Turn in the Answer Sheet and the printouts required by the exercises.