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
Friday, January 25, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment