Trees_Part_3

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

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

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

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

View Full Document
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.
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

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online