Tree(Directed and undirected tree)

11,634 views 10 slides Jun 03, 2015
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

about Directed and undirected tree in data structures


Slide Content

Prepared by Mahmoud Hikmet Mzgenn Adham Mohmmed Latef Directed a nd undirected Tree Supervised by : Dr.Sozan Al Naqshbandi

Topics What is a Tree ? What is a Undirected Tree?Exmple … What is a Directed Tree? Exmple … Are Tree Directed or Undirected ?

What is a Tree? A tree is a (possibly non-linear) data structure made up of nodes or vertices and edges without having any cycle. The tree with no nodes is called the  null   or empty  tree. A tree that is not empty consists of a root node and potentially many levels of additional nodes that form a hierarchy.

All trees are graphs, but not all graphs are trees NOTE:

What is a undirected Tree? An undirected graph Tree is one in which the pair of vertices in an edge is unordered . An undirected graph is a tree if you know that any two of the following three properties are true: It is connected There are no cycles There are n - 1 edges, where n is the number of nodes

1 2 3 4 5 6 G 2 V(G 2 )={0,1,2,3,4,5,6} E(G 2 )={(0,1),(0,2),(1,3),(1,4),(2,5),(2,6)} Exmple :

What is a Directed Tree? A directed graph (or digraph) is a set of vertices and a collection of directed edges that each connects an ordered pair of vertices.

Exmple : 1 2 G 3 V(G 3 )={0,1,2} E(G 3 )={<0,1>,<1,0>,<1,2>}

Are Trees Directed or Undirected ? A tree is an undirected .

Thank you
Tags