22.02.2014 Views

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Definition: A m-ary tree is a rooted tree such that every internal vertex has no<br />

more than m children. A full m-ary tree is a rooted tree such that every internal<br />

vertex has exactly m children. If m = 2, it is a (full) binary tree.<br />

Definition: An ordered rooted tree is a rooted tree with an ordering applied to<br />

the children <strong>of</strong> all <strong>of</strong> the children <strong>of</strong> the root and the internal vertices.<br />

Examples:<br />

• Management charts<br />

• Directory based file or memory systems<br />

Theorem: A tree with n vertices has n41 edges.<br />

The pro<strong>of</strong> is by mathematical induction.<br />

Theorem: A full m-ary tree with i internal vertices contains n = mi+1 vertices.<br />

Pro<strong>of</strong>: There are mi children plus the root.<br />

189<br />

Theorem: A full m-ary tree with<br />

• n vertices has i = (n41)/m internal vertices and q = [(m41)n+1]/m leaves.<br />

• i internal vertices has n = m+1 vertices and q = (m41)i + 1 leaves.<br />

• q leaves has n = (mq41) / (m41) vertices and i = (q41) / (m41) internal<br />

vertices.<br />

Theorem: There are at most m h leaves in a m-ary tree <strong>of</strong> height h.<br />

The pro<strong>of</strong> uses mathematical induction.<br />

Corollary: If an m-ary tree <strong>of</strong> height h has q leaves, then h < 9log m q:. For a full<br />

m-ary and balnced m-ary tree, h = 9log m q:.<br />

190

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!