Friday, January 25, 2008

DPS906 Lecture 6

Heuristic functions for searches must
- work fast
- cannot overestimate

The tree the heuristic analyzes is a binary heap

Reviewed Binary Heaps (see btp500 notes)

As an array
root=array[0]
leftchild for node i = 2i +1
righchild for node i = 2i + 2
parent for i = (i-1) / 2

No comments: