Applications of Trees in Real Life: Niño Dominic M. Matienzo Bsit - It1A

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

APPLICATIONS OF

TREES IN REAL LIFE


NIÑO DOMINIC M. MATIENZO
BSIT – IT1A
GENEAOLOGY TREE
the study of families, family history, and the tracing of their lineages.
GENEALOGY TREE
FATHER SIDE
Unknown Unknown
Great Great Grandfather Great Great Grandmother

Julio Matienzo Julia Matienzo


Great Grandfather Great Grandmother

Marcelino Matienzo Vigonia Endozo


Grandfather Grandmother

Lestie
Alfredo Matienzo Fe Olan Delo Olan Franco Biscocho
Auntie Husband Auntie Biscocho Husband
Father
Angie
Jojo Olan Biscocho
Cousin Cousin
Edwin Biscocho
Cheche Olan Christian Biscocho
Cousin
Cousin Cousin
Jun Biscocho
Bjorn Biscocho Cousin
Cousin Dennis Biscocho
Arnold Biscocho Cousin
Cousin Baby Biscocho
Cousin
GENEALOGY TREE
MOTHER SIDE
Unknown Unknown
Great Great Grandfather Great Great Grandmother

Ramon De Sagun Eusebia De Sagun


Great Grandfather Great Grandmother

Marcelino Maligaya Rosario Maligaya


Grandfather Grandmother

Concepcion Teresita Jovito Sonia Nick


Maligaya Patiag Patiag Armintia
Frank Armintia
Maligaya Ellen Maligaya Maylin Matienzo
Auntie Auntie Husband Auntie Husband Uncle Wife Mother
TJ Nicko
Princess Armintia
Patiag
Cousin Maligaya
Cousin Danica
Cousin
Robinson Armintia Maligaya
Cousin
Cousin Nicklaus Maligaya
Cousin Nickellen
Jude Maligaya Cousin Maligaya
Allen Corona Isko Corona Cousin
Auntie Husband

Brian Corona
Cousin
GENEALOGY TREE
Determine the following using the tree you have generated:

FATHER SIDE MOTHER SIDE


GRANDPARENTS GRANDPARENTS

Marcelino Matienzo – Grandfather • Marcelino Maligaya –


Vigonia Endozo - Grandmother Grandfather
• Rosario Maligaya - Grandmother
GENEALOGY TREE
Determine the following using the tree you have generated:

FATHER’S SIBLINGS

• Fe Olan
• Lestie Biscocho
GENEALOGY TREE
Determine the following using the tree you have generated:

GREAT GREAT GRANDMOTHER IN BOTH SIDES

• UNKNOWN
GENEALOGY TREE
Determine the following using the tree you have generated:

UNCLE IN MOTHER SIDE

• Nick Maligaya
GENEALOGY TREE
Determine the following using the tree you have generated:

UNCLE IN MOTHER SIDE

• Nick Maligaya
GENEALOGY TREE
Determine the following using the tree you have generated:

FATHER SIDE MOTHER SIDE


COUSINS COUSINS
• Brian Corona • Danica Maligaya
• Jun Biscocho • Jojo Olan
• TJ Patiag • Nicklaus Maligaya
• Bjorn Biscocho • CheChe Olan
• Princess Armintia • Nickellen Maligaya
• Dennis Biscocho • Angie Biscocho
• Robinson Armintia • Jude Maligaya
• Arnold Biscocho • Edwin Biscocho
• Nicko Maligaya
• Baby Bisocho • Christian Bischocho
CREATING A ROOTED TREE
Convert an Expression
Traverse it: Preorder, Inorder, and Postorder
FIRST PART: CONVERT AN EXPRESSION

The roots of the trees will consist of operators.


+ - * / ^ v -> <--

The leaf nodes of the tree will consist of the variable or the operands which would define
the relationship between the operator
(3 * 6 + ((5 -2) /3) – 8 + (-5 * 2 + (6 -3) / 1))
+
Root
(3 * 6 + ((5 -2) /3) – 8
(-5 * 2 + (6 -3) / 1))
Left Subtree
Right Subtree
Right Subtree -
* - Left Subtree *
- /
- 2
+ 8 5
3 6 5 2 + 1
/ 5
- * - - /
* /
- - 2 6 3 1
3 6 3
- 3
3 6
8 5
5 2 5 2
+
Root
Left Subtree Right Subtree
11 -7

19

-7

Final Output: 4
18 1
-10 * 3

3
• Traversal: Preorder
Visit, Left Right

Output:
+-+*36/-5238/+*-52-631

*
• Traversal: Inorder
Left, Visit, Right

Output:
3*6+5-2/3-8+-5*2+6-3/1

*
• Traversal: Postorder
Left, Right Visit

Output:
36*52-3/+8-52*63-+1/+

You might also like