# Fall 2002 CSCI 333 Homework 6

This homework is not graded. It is practice for the 4 December quiz.

## Problem 1

Suppose you are building a B-tree of order 3, that is, each node contains 3 records and 4 pointers. This B-tree is to associate strings of 3 characters, like "job" and "car", to integers. Draw the B-tree after you have inserted the following records:

1. tom: 115
2. cat: 105
3. jar: 201
4. fog: 215
5. pen: 201
6. joe: 202
7. ten: 110
8. two: 222
9. oar: 999
10. fox: 317
11. one: 111
12. owe: 213

## Problem 2

Suppose you are using open hashing with a hash table of size 8 with the very simple hash function, H(x) = x%8. Draw the result of adding the following values into the table.

1. 431
2. 333
3. 805
4. 400
5. 253
6. 880

## Problem 3

What would be the result of running depth first search and breadth first search on the following graphs starting with the node with value 11? In your solution assume that the adjacent nodes with the lowest numeric value is always checked next.

## Problem 4

What is the result of running Dijkstra's shortest path first algorithm on the following graph to find the shortest paths from node A?