SlideShare ist ein Scribd-Unternehmen logo
1 von 21
ADSA- ADVANCED DATA STRUCTURES AND
ALGORITHMS (SEM-IV)
OUTLINE
Course Objectives
Course Outcome
Teaching Scheme
Modes of Assessment / Evaluation
Syllabus
Experiment List
Research Opportunities
Course Objectives:
The course intends to provide concrete implementations and
manipulation of discrete structures and their use in design and
analysis of non-trivial algorithms for a given computational task by
teaching the students fundamentals of Algorithms and Data
Structures.
Course Outcomes:
students will be able to:
MODES OF CONTINUOS ASSESSMENT /
EVALUATION
ISE: In-Semester Examination
IE: Innovative Examination
ESE: End Semester Examination
INNOVATIVE EXAMINATION
 This examination included in the Syllabus for 20 Marks
 Purpose is to evaluate student w.r.t understanding the
Subject concepts and its use to designs small applications.
 In Innovative Practice Students in a group or individually can
identify and implement given/self identified problem
definition.
 During the Semester Submission Small Report and
Presentation of IE needs to be Submitted and presented the
same during Oral Examination
RESEARCH OPPORTUNITIES
1. Search engine for data structures
2. Phone directory application using doubly-linked
lists
3. Spatial indexing with quadtrees
4. Graph-based projects on data structures
5. Stack-based text editor
MODULE -1
COMPLEXITY ANALYSIS
• Time & Space Complexity of Algorithms
• Importance of Efficient Algorithms
• Calculating time complexity of operations on data
structures (insert, delete, search, display)
• Total= 4 hrs
Time & Space Complexity
 Time complexity of an algorithm signifies the total time required by the program to
run till its completion.
 The time complexity of algorithms is most commonly expressed using the big O
notation. It's an asymptotic notation to represent the time complexity.
 Time Complexity is most commonly estimated by counting the number of elementary
steps performed by any algorithm to finish execution. Like in the example above, for
the first code the loop will run n number of times, so the time complexity will
be n atleast and as the value of n will increase the time taken will also increase.
 While for the second code, time complexity is constant, because it will never be
dependent on the value of n, it will always give the result in 1 step.
Algorithm Analysis
The algorithm can be analyzed in two levels, i.e., first is before creating the
algorithm, and second is after creating the algorithm. The following are the two
analysis of an algorithm:
Priori Analysis: Here, priori analysis is the theoretical analysis of an algorithm
which is done before implementing the algorithm. Various factors can be
considered before implementing the algorithm like processor speed, which has
no effect on the implementation part.
Posterior Analysis: Here, posterior analysis is a practical analysis of an
algorithm. The practical analysis is achieved by implementing the algorithm
using any programming language. This analysis basically evaluate that how
much running time and space taken by the algorithm.
Performance Analysis of an algorithm
Performance analysis of an algorithm is the process of calculating space and time
required by that algorithm.
Performance analysis of an algorithm is performed by using the following measures...
1. Space required to complete the task of that algorithm (Space Complexity). It includes
program space and data space.
2. Time required to complete the task of that algorithm (Time Complexity)
What is Time complexity?
The time complexity of an algorithm is the total amount of time required by an algorithm to
complete its execution. The running time of an algorithm depends upon the following...
1. Whether it is running on Single processor machine or Multi processor machine.
2. Whether it is a 32 bit machine or 64 bit machine.
3. Read and Write speed of the machine.
4. The amount of time required by an algorithm to perform Arithmetic operations, logical
operations, return value and assignment operations etc.,
5. Input data
Example
Consider the following piece of code..
int sum(int A[], int n)
{ int sum = 0, i; for(i = 0; i < n; i++)
sum = sum + A[i];
return sum;
}
For the above code, time complexity can be calculated as follows
Types of Algorithms
1. Search Algorithm
 Linear Search
 Binary Search
2. Sort Algorithm
 Bubble Sort
 Selection Sort
 Insertion Sort
 Merge Sort
 Quick Sort
 Heap Sort
Linear Search
It is one of the most simple and straightforward search
algorithms. In this, you need to traverse the entire list and keep
comparing the current element with the target element. If a
match is found, you can stop the search else continue.
Complexity Analysis
Time Complexity
•Best case - O(1)
The best occurs when the target element is found at the
beginning of the list/array. Since only one comparison is made,
the time complexity is O(1).
Example -
Array A[] = {3,4,0,9,8}
Target element = 3
Here, the target is found at A[0].
•Worst-case - O(n), where n is the size of the list/array.
The worst-case occurs when the target element is found at the end of the list or is
not present in the list/array. Since you need to traverse the entire list, the time
complexity is O(n), as n comparisons are needed.
•Average case - O(n)
The average case complexity of the linear search is also O(n).
Space Complexity
The space complexity of the linear search is O(1), as we don't need any auxiliary
space for the algorithm.
Binary Search
It is a divide and conquers algorithm in which we compare the target element with the
middle element of the list. If they are equal, then it implies that the target is found at the
middle position; else, we reduce the search space by half, i.e. apply binary search on
either of the left and right halves of the list depending upon whether target<middle
element or target>middle element. We continue this until a match is found or the size of
the array reaches 1.
Time Complexity
•Best case - O(1)
The best-case occurs when the target element is found in the middle of the
original list/array. Since only one comparison is needed, the time complexity is
O(1).
•Worst-case - O(logn)
The worst occurs when the algorithm keeps on searching for the target element
until the size of the array reduces to 1. Since the number of comparisons
required is logn, the time complexity is O(logn).
Binary Search
•Average case - O(logn)
Binary search has an average-case complexity of O(long).
Space Complexity
Since no extra space is needed, the space complexity of the binary search is
O(1).

Weitere ähnliche Inhalte

Ähnlich wie ADSA orientation.pptx

Unit 2 Modeling of Programs A function maps inputs to out.docx
Unit 2 Modeling of Programs A function maps inputs to out.docxUnit 2 Modeling of Programs A function maps inputs to out.docx
Unit 2 Modeling of Programs A function maps inputs to out.docx
dickonsondorris
 
9 big o-notation
9 big o-notation9 big o-notation
9 big o-notation
irdginfo
 
Data Structures in C
Data Structures in CData Structures in C
Data Structures in C
Jabs6
 
2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf
ishan743441
 
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdfADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
RGPV De Bunkers
 

Ähnlich wie ADSA orientation.pptx (20)

Ds
DsDs
Ds
 
Unit 2 Modeling of Programs A function maps inputs to out.docx
Unit 2 Modeling of Programs A function maps inputs to out.docxUnit 2 Modeling of Programs A function maps inputs to out.docx
Unit 2 Modeling of Programs A function maps inputs to out.docx
 
Data Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm AnalysisData Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm Analysis
 
DA lecture 3.pptx
DA lecture 3.pptxDA lecture 3.pptx
DA lecture 3.pptx
 
Design and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit oneDesign and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit one
 
Study on Sorting Algorithm and Position Determining Sort
Study on Sorting Algorithm and Position Determining SortStudy on Sorting Algorithm and Position Determining Sort
Study on Sorting Algorithm and Position Determining Sort
 
9 big o-notation
9 big o-notation9 big o-notation
9 big o-notation
 
RAJAT PROJECT.pptx
RAJAT PROJECT.pptxRAJAT PROJECT.pptx
RAJAT PROJECT.pptx
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
Introduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptIntroduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.ppt
 
Algorithm.pptx
Algorithm.pptxAlgorithm.pptx
Algorithm.pptx
 
Algorithm.pptx
Algorithm.pptxAlgorithm.pptx
Algorithm.pptx
 
Data Structures in C
Data Structures in CData Structures in C
Data Structures in C
 
Data structure introduction
Data structure introductionData structure introduction
Data structure introduction
 
Design & Analysis Of Algorithm
Design & Analysis Of AlgorithmDesign & Analysis Of Algorithm
Design & Analysis Of Algorithm
 
Binary Sort
Binary SortBinary Sort
Binary Sort
 
2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf
 
Introduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptxIntroduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptx
 
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdfADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
 

Kürzlich hochgeladen

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 

Kürzlich hochgeladen (20)

Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 

ADSA orientation.pptx

  • 1. ADSA- ADVANCED DATA STRUCTURES AND ALGORITHMS (SEM-IV)
  • 2. OUTLINE Course Objectives Course Outcome Teaching Scheme Modes of Assessment / Evaluation Syllabus Experiment List Research Opportunities
  • 3. Course Objectives: The course intends to provide concrete implementations and manipulation of discrete structures and their use in design and analysis of non-trivial algorithms for a given computational task by teaching the students fundamentals of Algorithms and Data Structures.
  • 5. MODES OF CONTINUOS ASSESSMENT / EVALUATION ISE: In-Semester Examination IE: Innovative Examination ESE: End Semester Examination
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. INNOVATIVE EXAMINATION  This examination included in the Syllabus for 20 Marks  Purpose is to evaluate student w.r.t understanding the Subject concepts and its use to designs small applications.  In Innovative Practice Students in a group or individually can identify and implement given/self identified problem definition.  During the Semester Submission Small Report and Presentation of IE needs to be Submitted and presented the same during Oral Examination
  • 11. RESEARCH OPPORTUNITIES 1. Search engine for data structures 2. Phone directory application using doubly-linked lists 3. Spatial indexing with quadtrees 4. Graph-based projects on data structures 5. Stack-based text editor
  • 12. MODULE -1 COMPLEXITY ANALYSIS • Time & Space Complexity of Algorithms • Importance of Efficient Algorithms • Calculating time complexity of operations on data structures (insert, delete, search, display) • Total= 4 hrs
  • 13. Time & Space Complexity  Time complexity of an algorithm signifies the total time required by the program to run till its completion.  The time complexity of algorithms is most commonly expressed using the big O notation. It's an asymptotic notation to represent the time complexity.  Time Complexity is most commonly estimated by counting the number of elementary steps performed by any algorithm to finish execution. Like in the example above, for the first code the loop will run n number of times, so the time complexity will be n atleast and as the value of n will increase the time taken will also increase.  While for the second code, time complexity is constant, because it will never be dependent on the value of n, it will always give the result in 1 step.
  • 14. Algorithm Analysis The algorithm can be analyzed in two levels, i.e., first is before creating the algorithm, and second is after creating the algorithm. The following are the two analysis of an algorithm: Priori Analysis: Here, priori analysis is the theoretical analysis of an algorithm which is done before implementing the algorithm. Various factors can be considered before implementing the algorithm like processor speed, which has no effect on the implementation part. Posterior Analysis: Here, posterior analysis is a practical analysis of an algorithm. The practical analysis is achieved by implementing the algorithm using any programming language. This analysis basically evaluate that how much running time and space taken by the algorithm.
  • 15. Performance Analysis of an algorithm Performance analysis of an algorithm is the process of calculating space and time required by that algorithm. Performance analysis of an algorithm is performed by using the following measures... 1. Space required to complete the task of that algorithm (Space Complexity). It includes program space and data space. 2. Time required to complete the task of that algorithm (Time Complexity) What is Time complexity? The time complexity of an algorithm is the total amount of time required by an algorithm to complete its execution. The running time of an algorithm depends upon the following... 1. Whether it is running on Single processor machine or Multi processor machine. 2. Whether it is a 32 bit machine or 64 bit machine. 3. Read and Write speed of the machine. 4. The amount of time required by an algorithm to perform Arithmetic operations, logical operations, return value and assignment operations etc., 5. Input data
  • 16. Example Consider the following piece of code.. int sum(int A[], int n) { int sum = 0, i; for(i = 0; i < n; i++) sum = sum + A[i]; return sum; } For the above code, time complexity can be calculated as follows
  • 17. Types of Algorithms 1. Search Algorithm  Linear Search  Binary Search 2. Sort Algorithm  Bubble Sort  Selection Sort  Insertion Sort  Merge Sort  Quick Sort  Heap Sort
  • 18. Linear Search It is one of the most simple and straightforward search algorithms. In this, you need to traverse the entire list and keep comparing the current element with the target element. If a match is found, you can stop the search else continue. Complexity Analysis Time Complexity •Best case - O(1) The best occurs when the target element is found at the beginning of the list/array. Since only one comparison is made, the time complexity is O(1). Example - Array A[] = {3,4,0,9,8} Target element = 3 Here, the target is found at A[0].
  • 19. •Worst-case - O(n), where n is the size of the list/array. The worst-case occurs when the target element is found at the end of the list or is not present in the list/array. Since you need to traverse the entire list, the time complexity is O(n), as n comparisons are needed. •Average case - O(n) The average case complexity of the linear search is also O(n). Space Complexity The space complexity of the linear search is O(1), as we don't need any auxiliary space for the algorithm.
  • 20. Binary Search It is a divide and conquers algorithm in which we compare the target element with the middle element of the list. If they are equal, then it implies that the target is found at the middle position; else, we reduce the search space by half, i.e. apply binary search on either of the left and right halves of the list depending upon whether target<middle element or target>middle element. We continue this until a match is found or the size of the array reaches 1. Time Complexity •Best case - O(1) The best-case occurs when the target element is found in the middle of the original list/array. Since only one comparison is needed, the time complexity is O(1). •Worst-case - O(logn) The worst occurs when the algorithm keeps on searching for the target element until the size of the array reduces to 1. Since the number of comparisons required is logn, the time complexity is O(logn).
  • 21. Binary Search •Average case - O(logn) Binary search has an average-case complexity of O(long). Space Complexity Since no extra space is needed, the space complexity of the binary search is O(1).