Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik.

Slides:



Advertisements
Similar presentations
COSC2007 Data Structures II Chapter 10 Trees I. 2 Topics Terminology.
Advertisements

Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik.
Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik.
Introduction to Trees Chapter 6 Objectives
Data Structures: A Pseudocode Approach with C 1 Chapter 6 Objectives Upon completion you will be able to: Understand and use basic tree terminology and.
Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik.
EC-211 DATA STRUCTURES LECTURE Tree Data Structure Introduction –The Data Organizations Presented Earlier are Linear in That Items are One After.
CS2420: Lecture 13 Vladimir Kulyukin Computer Science Department Utah State University.
A Binary Tree root leaf. A Binary Tree root leaf descendent of root parent of leaf.
1 Trees. 2 Outline –Tree Structures –Tree Node Level and Path Length –Binary Tree Definition –Binary Tree Nodes –Binary Search Trees.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Trees Chapter 25 Slides by Steve Armstrong LeTourneau University Longview, TX  2007,  Prentice Hall.
1 Chapter 7 Trees. 2 What is a Tree In computer science, a tree is an abstract model of a hierarchical structure A tree consists of nodes with a parent-child.
Degree A F H G B E D C. Adjacent A F H G B E D C.
Binary Trees Chapter 6.
Binary Tree. Binary Trees – An Informal Definition A binary tree is a tree in which no node can have more than two children Each node has 0, 1, or 2 children.
Trees Chapter 8. 2 Tree Terminology A tree consists of a collection of elements or nodes, organized hierarchically. The node at the top of a tree is called.
COSC2007 Data Structures II
CS261 Data Structures Trees Introduction and Applications.
Introduction Of Tree. Introduction A tree is a non-linear data structure in which items are arranged in sequence. It is used to represent hierarchical.
12-CRS-0106 REVISED 8 FEB 2013 CSG2A3 ALGORITMA dan STRUKTUR DATA.
Lecture 10 Trees –Definiton of trees –Uses of trees –Operations on a tree.
Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik.
Binary Trees. Binary Tree Finite (possibly empty) collection of elements A nonempty binary tree has a root element The remaining elements (if any) are.
Announcements Exam Friday. More Physical Storage Lecture 10.
Topic 17 Introduction to Trees
Trees Chapter 8. 2 Tree Terminology A tree consists of a collection of elements or nodes, organized hierarchically. The node at the top of a tree is called.
Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik.
Data Structures TREES.
Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik.
Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik.
Trees : Part 1 Section 4.1 (1) Theory and Terminology (2) Preorder, Postorder and Levelorder Traversals.
Disusun Oleh : Budi Arifitama Pertemuan ke-8. Define trees as data structures Define the terms associated with trees Discuss tree traversal algorithms.
Trees By P.Naga Srinivasu M.tech,(MBA). Basic Tree Concepts A tree consists of finite set of elements, called nodes, and a finite set of directed lines.
Discrete Mathematics Chapter 5 Trees.
Binary Tree 10/22/081. Tree A nonlinear data structure Contain a distinguished node R, called the root of tree and a set of subtrees. Two nodes n1 and.
M180: Data Structures & Algorithms in Java Trees & Binary Trees Arab Open University 1.
Rooted Tree a b d ef i j g h c k root parent node (self) child descendent leaf (no children) e, i, k, g, h are leaves internal node (not a leaf) sibling.
DATA STRUCTURE BS(IT)3rd. Tree An Introduction By Yasir Mustafa Roll No. BS(IT) Bahauddin Zakariya University, Multan.
Data Structures Lakshmish Ramaswamy. Tree Hierarchical data structure Several real-world systems have hierarchical concepts –Physical and biological systems.
1 Trees What is a Tree? Tree terminology Why trees? What is a general tree? Implementing trees Binary trees Binary tree implementation Application of Binary.
Chapter 6 – Trees. Notice that in a tree, there is exactly one path from the root to each node.
1 Trees : Part 1 Reading: Section 4.1 Theory and Terminology Preorder, Postorder and Levelorder Traversals.
18-1 Chapter 18 Binary Trees Data Structures and Design in Java © Rick Mercer.
Question 4 Tutorial 8. Part A Insert 20, 10, 15, 5,7, 30, 25, 18, 37, 12 and 40 in sequence into an empty binary tree
What is a Tree? Formally, we define a tree T as a set of nodes storing elements such that the nodes have a parent-child relationship, that satisfies the.
Data Structures and Design in Java © Rick Mercer
CSCE 210 Data Structures and Algorithms
Lecture 1 (UNIT -4) TREE SUNIL KUMAR CIT-UPES.
Trees.
Red Black Trees
12. Graphs and Trees 2 Summary
Binary Trees "A tree may grow a thousand feet tall, but its leaves will return to its roots." -Chinese Proverb.
Section 8.1 Trees.
Lecture 18. Basics and types of Trees
CHAPTER 4 Trees.
Data Structures and Database Applications Binary Trees in C#
Trees and Binary Trees.
Lecture 26 Multiway Search Trees Chapter 11 of textbook
Topic 18 Binary Trees "A tree may grow a thousand feet tall, but its leaves will return to its roots." -Chinese Proverb.
Data Structures: Trees and Binary Trees
Computer Science and Engineering
Lecture 36 Section 12.2 Mon, Apr 23, 2007
Representing binary trees with lists
EE Data Structures and Algorithms
Binary Trees.
Tree and its terminologies
7.1 Trees.
Heaps Chapter 6 Section 6.9.
Cs212: Data Structures Lecture 7: Tree_Part1
Presentation transcript:

Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik

A nonlinear data structure that models a hierarchical organization. A nonlinear data structure that models a hierarchical organization. Each element may have several successors (called its “children”) and every element except one (called the “root”) has a unique predecessor (called its “parent”). Each element may have several successors (called its “children”) and every element except one (called the “root”) has a unique predecessor (called its “parent”). Example: Computer file systems, the inheritance structure for Java classes. Example: Computer file systems, the inheritance structure for Java classes. Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik

The elements of a tree are called its nodes. The elements of a tree are called its nodes. The size of a tree is the number of nodes it contains. The size of a tree is the number of nodes it contains. A tree of size 1 is called a singleton. A tree of size 1 is called a singleton. Two nodes are adjacent if one is the parent of the other. Two nodes are adjacent if one is the parent of the other. A node with no children is called a leaf. A node with no children is called a leaf. A node with at least one child is called an internal node. A node with at least one child is called an internal node. Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik

Every node in a tree has a unique root path. Every node in a tree has a unique root path. The depth of a node in a tree is the length of its root path. The depth of a node in a tree is the length of its root path. A level in a tree is the set of all nodes at a given depth. A level in a tree is the set of all nodes at a given depth. The degree of a node is the number of its children. The degree of a node is the number of its children. Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik

The order of a tree is the maximum degree among all of its nodes. The order of a tree is the maximum degree among all of its nodes. A tree is said to be full if all of its internal nodes have the same degree and all of its leaves are at the same level. A tree is said to be full if all of its internal nodes have the same degree and all of its leaves are at the same level. Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik

A method for processing a data structure that applies a given operation to each element of the structure.

Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik