Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belgaum-590018

A File Structure Mini Project Report


On[Text Wrapping Break]“FILE
COMPRESSION USING
HUFFMAN CODING”
Submitted in Partial fulfilment of the Requirements for the VI Semester of the Degree
of

Bachelor of Engineering
In
Information Science & Engineering
By
U SUMUK PATIL
(1CR19IS167)
YASH NEGI
(1CR19IS176)
NIKHIL RAJ RAUNIYAR
(1CR19IS181)
Under the Guidance of
Shilpa Mangesh Pande
Associate Professor, Dept. of ISE

i
DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING

CMR INSTITUTE OF TECHNOLOGY


#132, AECS LAYOUT, IT PARK ROAD, KUNDALAHALLI,
BANGALORE-560037

i
CMR INSTITUTE OF TECHNOLOGY
#132, AECS LAYOUT, IT PARK ROAD, KUNDALAHALLI,
BANGALORE-560037

DEPARTMENT OF INFORMATION SCIENCE AND


ENGINEERING

CERTIFICATE
This is to certify that the File Structure Project work entitled “WORKING OF
AVL TREES ” has been carried out by U SUMUK PATIL (1CR19IS167) ,
YASH NEGI (1CR19IS1176) and NIKHIL RAJ RAUNIYAR(1CR19IS181)
bonafide students of CMR Institute of Technology in partial fulfilment for the
award of Bachelor of Engineering in Information Science and Engineering
of the Visvesvaraya Technological University, Belgaum during the year 2021-
2022. It is certified that all corrections/suggestions indicated for Internal
Assessment have been incorporated in the Report deposited in the departmental
library. This DBMS Project Report has been approved as it satisfies the
academic requirements in respect of project work prescribed for the said degree.

Signature of Guide Signature of


HOD

Shilpa Mangesh Pande Dr. M. Farida


Begam
Associate Professor Professor, Head
Dept. of ISE, CMRIT Dept. of ISE,
CMRIT

i
External Examiner
Name of the examiners                                                                          Signature with date
1.
2.

i
ABSTRACT
This project focuses on AVL tree and the various operations that are performed
in AVL tree. These operations are namely insertion, deletion, searching, and
traversal. This project in brief discusses about the all the operation of AVL tree.
In computer science, an AVL tree is a self-balancing binary search tree. It was
the first such data structure to be invented. In an AVL tree, the heights of the
two child subtrees of any node differ by at most one; if at any time they differ
by more than one, rebalancing is done to restore this property. Lookup,
insertion, and deletion all take O(log n) time in both the average and worst
cases, where n is the number of nodes in the tree prior to the operation.
Insertions and deletions may require the tree to be rebalanced by one or more
tree rotations.

i
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany a successful completion of any
task would be incomplete without the mention of people who made it possible.
Success is the epitome of hard work and perseverance, but steadfast of all is
encouraging guidance. So, with gratitude we acknowledge all those whose
guidance and encouragement served as beacon of light and crowned our effort
with success.

We express our sincere gratitude to our Principal Dr. Sanjay Jain, & Vice
Principal Dr. B Narasimha Murthy, CMR Institute of Technology for
providing excellent facilities.

We wish to place on record our gratitude to Professor Dr. M. Farida Begam,


Head of the Department, Information Science and Engineering, CMR Institute
of Technology, Bangalore for providing encouragement and guidance.

We consider it a privilege and honour to express our sincere gratitude to our


guides Shilpa Mangesh Pande, Associate Professor, Department of
Information Science & Engineering, her valuable guidance throughout the
tenure of this mini-project work and whose support and encouragement made
this work possible.

Conclusively, we also thank our family, friends, seniors and all others who have
done immense help directly or indirectly during the project work.

THANK YOU

U SUMUK PATIL(USN-1CR19IS167)

YASH NEGI (USN-1CR19IS181)

i
NIKHIL RAJ RAUNIYAR(1CR19IS181)

i
TABLE OF CONTENT

Title Page No

Abstract ……………………………………………………………..........i

Acknowledgement …………………………………………………...….ii

Table of content………………………………………………….…...…iii

CHAPTER 1

1. Introduction

1.1 Brief History Of AVL Trees……………………………………....1


1.2 Goals Of File Compression………………………………………………2

CHAPTER 2

2. Problem Statement

2.1 Description Of Project………………………………………………...…3

2.2 Proposed Solution………………………………………………………..3

2.3 Advantages of Proposed Solution………………………………………..4

CHAPTER 3

3. Design

3.1 Algorithm……………………………………………………………….5

CHAPTER 4

4. Code Snippets………………………………………………………………6

CHAPTER 5

5. Result and Output………………………………………………..12

CHAPTER 6

i
6. Conclusion………………………………………..………………16

REFERENCES…………………………………………………………17

i
CHAPTER 1

INTRODUCTION
In computer science, an AVL tree is a self-balancing binary search
tree. It was the first such data structure to be invented. In an AVL
tree, the heights of the two child subtrees of any node differ by at
most one; if at any time they differ by more than one, rebalancing is
done to restore this property. Lookup, insertion, and deletion all take
O(log n) time in both the average and worst cases, where n is the
number of nodes in the tree prior to the operation. Insertions and
deletions may require the tree to be rebalanced by one or more tree
rotations

History

Early work with files presumed that files were on tape, since most
files were. Access was sequential, and the cost of access grew in
direct proportion, to the size of the file. As files grew intolerably large
for unaided sequential access and as storage devices such as hard
disks became available, indexes were added to files. The indexes
made it possible to keep a list of keys and pointers in a smaller file
that could be searched more quickly. With key and pointer, the user
had direct access to the large, primary file. But simple indexes had

i
some of the same sequential flaws as the data file, and as the indexes
grew, they too became difficult to manage, especially for dynamic
files in which the set of key changes. In 1963, researches developed
and elegant self-adjusting binary tree structure, called AVL tree, for
data in memory, with a balanced binary tree, dozens of accesses were
required to find a record in even moderate-sized files. A method was
needed to keep a tree balanced when each node of the tree was not a
single record, as in a binary tree, but a file block containing dozens,
perhaps even hundreds, of records took 10 years until a solution
emerged in the form of a B-Tree

About the File

When we talk about a file on disk or tape, we refer to a particular


collection of bytes stored there. A file, when the word is used in this
sense, physically exists. A disk drive may contain hundreds, even
thousands of these physical files. From the standpoint of a system
program, a file is somewhat like a telephone line connection to a
telephone network. The program can receive bytes through this phone
line or send bytes down it, but it knows nothing about where these
bytes come from or where they go. The program knows only about its
end of the line. Even though there may be thousands of physical files
on a disk, a single program is usually limited to the use of only about
20 files. A file is a operation of computer which stores data,
information, message, settings, or commands used with the computer
program. It is created using system program on the computer. The
application program relies on the OS to take care of the details of the
i
telephone switching system. It could be that bytes coming down the
line into the program originate from a physical file they come from
the keyboard or some other input device. Similarly, bytes the program
sends down the line might end up in a file, or they could appear on the
terminal screen or some other output device. Although the program
doesn't know where the bytes are coming from or where they are
going, it does know which line it is using. This line is usually referred
to as the logical file, to distinguish it from the physical files on the
disk or tape.

You might also like