Understanding Terminology for Rooted Trees

Slide Note
Embed
Share

Explore the terminology associated with rooted trees, including concepts like finding parents, children, siblings, ancestors, and descendants of nodes. Dive into the structure and relationships within rooted trees to enhance your understanding of this fundamental data structure.


Uploaded on Oct 11, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Rooted (Directed) Trees

  2. Rooted (Directed) Trees find the parent of C

  3. Terminology for Rooted Trees find the parent of C {b}

  4. Terminology for Rooted Trees find the parent of C {b} find the children of g

  5. Terminology for Rooted Trees find the parent of C {b} find the children of g {h, i, g}

  6. Terminology for Rooted Trees find the parent of C {b} find the children of g {h, i, g} find the sibling of h

  7. Terminology for Rooted Trees find the parent of C {b} find the children of g {h, i, g} find the sibling of h {i, j }

  8. Terminology for Rooted Trees find the parent of C {b} find the children of g {h, i, g} find the sibling of h {i,j } find the ancestors of e

  9. Terminology for Rooted Trees find the parent of C {b} find the children of g {h, i, g} find the sibling of h { i, j } find the ancestors of e {c, b, a}

  10. Terminology for Rooted Trees find the parent of C {b} find the children of g {h, i, g} find the sibling of h { i, j } find the ancestors of e {c, b, a} find the descendants of b

  11. Terminology for Rooted Trees find the parent of c {b} find the children of g {h, i, g} find the siblings of h { i, j } find the ancestors of e {c, b, a} find the descendants of b {c, d, e } find all leaves ( external nodes) {f,d,e, i,k,l,m} find all internal nodes {a,b,g,c,h,j}

  12. leaves ( external nodes)

  13. internal nodes

  14. Subtrees

  15. Levels and Height

  16. Example

  17. Example

Related


More Related Content