about Directed and undirected tree in data structures
Size: 79.89 KB
Language: en
Added: Jun 03, 2015
Slides: 10 pages
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
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.