You may use your textbook, a computer, your brain, and, if available, divine guidance. Don't discuss this test with anyone other than Jeff Ondich. Do discuss it with him, if you wish.
Ada advocates adding the ASCII representation of the letters in the word together (e.g. ada-> 97 + 100 + 97), squaring the result, and using the middle 10 bits of the 32-bit square as the hash value of the word.
Like Ada, Charles wants to first add the letters up, but then he wants to take the sum S, and use (S^2 + 3*S + 2) mod 4096 as the hash value.
Don wants to use a 64x64 2-dimensional array of slots, and take the ASCII values of the first two letters of the word, mod 64, as the indices of the slot into which the word will go.
Criticize (positively or negatively) each of these proposals.
(1,2;1), (2,3;5), (3,4;2), (1,7;3), (3,7;6), (2,6;1), (4,5;2), (6,5;2), (7,6;2), (4,6;3)
Suppose you use Dijkstra's algorithm to compute the shortest paths between node 1 and each of the other nodes. In this algorithm, you maintain a list P of nodes whose distances from and paths to node 1 have been "settled." In what order do the nodes of this graph get added to P? You can also maintain a list of settled edges--that is, edges that constitute the shortest paths from nodes in P to node 1. Which edges get added to this settled list, and in what order?