Quad-tree = an index structure that divides a search space in half (exactly !) in every dimension

• Example:

• Original search space:

• The quad-tree will divide the search space as follows:

• Structure of a quad-tree node:

• A quad-tree node contains the following:

 1 search key value for each dimension 2n   child nodepointers (n way split) One parent node pointer (except for the root node)

• The child node pointers will point to every possible combination of < and relationships with the search key values

The node corresponds to the following division:

• Didactical warning !!!

• Warning:

• The book was not clear on where to put the = bucket

• So I assumed they would do it just like the kd-tree

(Because the Quad-tree is similar to the kd-tree)

• After preparing the teaching material, I discovered that the book's example in Figure 14.43 (on page 682) put the = values in the left/bottom half:

Anyway:

 This (little) detail is not important to understand the concept.

However:

 The difference does cause my examples to differ from the ones presented in the text book

 ``` (age, salary (in \$1,000)) A(25,60) D(45,60) G(50,75) J(50,100) B(50,120) E(70,110) H(85,140) K(30,260) C(25,400) F(45,350) I(50,275) L(60,260) ```