Trees_Part_3 - Decision Tree Binary tree associated with a...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Last Updated: 12-01-24 11:27 AM CSE 2011 Prof. J. Elder - 17 - Decision Tree Ø Binary tree associated with a decision process q internal nodes: questions with yes/no answer q external nodes: decisions Ø Example: dining decision Want a fast meal? How about coffee? On expense account? Second Cup Blueberry Hill Canoe Cafe Diplomatico Yes No Yes No Yes No
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Last Updated: 12-01-24 11:27 AM CSE 2011 Prof. J. Elder - 18 - Proper Binary Trees Ø A binary tree is said to be proper if each node has either 0 or 2 children.
Background image of page 2
Last Updated: 12-01-24 11:27 AM CSE 2011 Prof. J. Elder - 19 - Properties of Proper Binary Trees Ø Notation n number of nodes e number of external nodes i number of internal nodes h height Ø Properties: q e = i + 1 q n = 2e - 1 q h i q h (n - 1)/2 q e 2 h q h log 2 e q h log 2 (n + 1) - 1
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Last Updated: 12-01-24 11:27 AM CSE 2011 Prof. J. Elder - 20 - BinaryTree ADT Ø The BinaryTree ADT extends the Tree ADT, i.e., it inherits all the methods of the Tree ADT
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

Trees_Part_3 - Decision Tree Binary tree associated with a...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online