0% found this document useful (0 votes)
2 views

Data Structures Case Study 1 (1)

The document discusses various types of tree data structures, including Binary Trees, Binary Search Trees, AVL Trees, B-Trees, and Red-Black Trees, highlighting their characteristics and applications. Each tree type is explained with its structure and real-life applications, such as in data analysis, search algorithms, and database management. The report concludes that trees are essential for representing hierarchical data efficiently.

Uploaded by

kritikad322
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Data Structures Case Study 1 (1)

The document discusses various types of tree data structures, including Binary Trees, Binary Search Trees, AVL Trees, B-Trees, and Red-Black Trees, highlighting their characteristics and applications. Each tree type is explained with its structure and real-life applications, such as in data analysis, search algorithms, and database management. The report concludes that trees are essential for representing hierarchical data efficiently.

Uploaded by

kritikad322
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Different Types Of Tree Data Structure Along With It’s Real Life

Applications With Example


A Case Study Report Submitted as a Part of Experiential Learning
on
Data Structure[CSE23304]

Submitted By:-

KRITIKA DAS
(2101020068)

Under The Supervision Of


MAMTA WAGH
ASST. PROFESSOR, Department of CSE

Department of Computer Science and Engineering


C. V. Raman Global University, Bhubaneswar, Odisha, India
2022
What is a Tree in Data Structure?
A tree is a type of data structure representing hierarchical data.
It has a non-linear structure consisting of nodes connected by
edges. Among the other types of data structures that perform
operations in a linear data structure, the complex webinarity
increases with an increase in data size. However, the tree data
structure provides quicker access to the data which is non-
linear. Availability of the various types of data structures and
the algorithms associated with them, the task performance has
become an easy and efficient way.

The types of Trees in the Data Structure are-

 Binary tree
 Binary Search Tree
 AVL Tree
 B-Tree
 Red-Black Tree

2
BINARY TREE-
The binary tree is a type of tree data structure where every parent node has a
maximum of two child nodes. As the name suggests, binary means two, therefore,
each node can have 0, 1, or 2 nodes.

The figure below is the structure of binary tree-

APPLICATIONS OF BINARY TREES-

 Binary Search Tree (BST) - Map and Set Implementations


 Huffman Coding - used in compression algorithms, such as those used by the
jpeg, zip, mp3 file-formats.
 Heaps - used in implementing efficient Priority Queues (Min/Max)
 Routing - used in network routing
 Hierarchical data - used in manipulating hierarchical data.
 Expression - used by compilers and (implicitly) calculators to parse expressions.
 Database Cluster - clusters are keyed with balanced binary tree or hashtable.
 Decision Tree - a decision tree can also represent a series of steps taken by an
algorithm.

3
 BINARY SEARCH TREE
These tree structures are non-linear and one node is connected to a number of
nodes. The node can be connected to at most two child nodes. It is called a
binary search tree because:

 Each node has a maximum of two child nodes.


 It can be used to search an element in 0(log(n)) time and hence known as a
search tree

Structure of binary search tree-

APPLICATIONS OF BINARY SEARCH TREES-

 Used to implement simple sorting algorithms.


 Can be used as priority queues.
 Used in many search applications where data are
constantly entering and leaving.

4
AVL TREE-
The AVL trees are the types or variants of a binary tree. It consists of properties from
both the binary as well as a binary search tree. Invented by Adelson Velsky Lindas,
these trees are self-balancing which means the

height of the left subtree and the right subtree is balanced. This balance is measured
in terms of a balancing factor.

APPLICATIONS OF AVL TREES-


 More Search and less Insertion/Deletion.
 Data Analysis and Data Mining and the applications which involve more searches.

5
B-TREE-
B Tree is a more generalized form of a binary search tree. It is also known as the
height-balanced m way tree, where m is the order of the tree. Each node of the tree can
have more than one key and more than two child nodes. In the case of a binary tree,
the leaf nodes might not be at the same level. However, in the case of a B Tree, all the
leaf nodes should be at the same level.

APPLICATIONS OF B-TREE-

 Dictionary application.
 Autocomplete feature in searching.
 Auto-completing the text and spells checking.

6
RED- BLACK TREE-
A red-black tree is a kind of self-balancing binary search tree where each node has an
extra bit, and that bit is often interpreted as the color (red or black). These colors are
used to ensure that the tree remains balanced during insertions and deletions.
Although the balance of the tree is not perfect, it is good enough to reduce the
searching time and maintain it around O(log n) time, where n is the total number of
elements in the tree .

Structure of red-black tree-

APPLICATIONS OF RED BLACK TREE-

 Used when there is frequent Insertion/Deletion and few searches.


 K -mean Clustering using a red-black tree, Databases, Simple-minded
database, searching words inside dictionaries, searching on the web.
 Process Scheduling in Linux.

7
CONCLUSION
A tree is non-linear and a hierarchical data structure consisting of a collection of nodes
such that each node of the tree stores a value and a list of references to other nodes
(the “children”).

Recursive Definition:
A tree consists of a root, and zero or more subtrees T1, T2, … , Tk such that there is
an edge from the root of the tree to the root of each subtree.

References
[1] Introduction to Algorithms (Third Edition) by Thomas H. Cormen, Charles E.
Leiserson, Ronald L. Livest and Clifford Stein.

[2] https://en.wikipedia.org/wiki/List_of_data_structures

You might also like