228
5.6
A mapping from battery size to power. The
sizes are A, AA, AAA,
and AAAA.
Answer:
Hash functions B and D would give a good distribution.
5.7
A mapping from book titles to authors. The titles are
Maus
,
Fun
Home
, and
Watchmen
.
Answer:
Hash
functions B, C, and D would give a good
distribution.
CHAPTER 6
Run the breadth-first search algorithm
on each of these graphs
to find the solution.
6.1
Find the length of the shortest path from start to finish.
Answer:
The shortest path has a length of 2.
6.2
Find the length of the shortest path from “cab” to “bat”.
Answer:
The shortest path has a length of 2.
Dostları ilə paylaş: