introduction to recursive formulations for algorithm …
TRANSCRIPT
![Page 1: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/1.jpg)
INTRODUCTION TO RECURSIVEFORMULATIONS FOR ALGORITHM DESIGN: II
Partha P ChakrabartiIndian Institute of Technology Kharagpur
![Page 2: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/2.jpg)
Overview Algorithms and Programs Pseudo-Code Algorithms + Data Structures = Programs Initial Solutions + Analysis + Solution
Refinement + Data Structures = Final Algorithm
Use of Recursive Definitions as Initial Solutions
Recurrence Equations for Proofs and Analysis
Solution Refinement through Recursion Transformation and Traversal
Data Structures for saving past computation for future use
Sample Problems:1. Finding the Largest2. Largest and Smallest3. Largest and Second Largest4. Fibonacci Numbers5. Searching for an element in an ordered
/ unordered List6. Sorting7. Pattern Matching 8. Permutations and Combinations9. Layout and Routing10. Shortest Paths
![Page 3: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/3.jpg)
3rd Problem: Largest and Second LargestSequential Comparison
![Page 4: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/4.jpg)
Largest and 2nd Largest: Recursive Formulation
![Page 5: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/5.jpg)
Largest and Next: Tournament
![Page 6: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/6.jpg)
Tournaments & Sorting
![Page 7: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/7.jpg)
Final Algorithms & Data Structuring
![Page 8: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/8.jpg)
Algorithms + Data Structures = Progams
![Page 9: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/9.jpg)
Algorithm Design by Recursion Transformation1. Initial Solution
a. Recursive Definition – A set of Solutionsb. Inductive Proof of Correctnessc. Analysis Using Recurrence Relations
2. Exploration of Possibilitiesa. Decomposition or Unfolding of the Recursion Treeb. Examination of Structures formedc. Re-composition Properties
3. Choice of Solution & Complexity Analysisa. Balancing the Split, Choosing Pathsb. Identical Sub-problems
4. Data Structures & Complexity Analysisa. Remembering Past Computation for Futureb. Space Complexity
5. Final Algorithm & Complexity Analysisa. Traversal of the Recursion Treeb. Pruning
6. Implementationa. Available Memory, Time, Quality of Solution, etc
Algorithms and Programs Pseudo-Code Algorithms + Data Structures = Programs Initial Solutions + Analysis + Solution
Refinement + Data Structures = Final Algorithm
Use of Recursive Definitions as Initial Solutions
Recurrence Equations for Proofs and Analysis
Solution Refinement through Recursion Transformation and Traversal
Data Structures for saving past computation for future use
![Page 10: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/10.jpg)
Overview of Algorithm Design 1. Initial Solution
a. Recursive Definition – A set of Solutionsb. Inductive Proof of Correctnessc. Analysis Using Recurrence Relations
2. Exploration of Possibilitiesa. Decomposition or Unfolding of the Recursion Treeb. Examination of Structures formedc. Re-composition Properties
3. Choice of Solution & Complexity Analysisa. Balancing the Split, Choosing Pathsb. Identical Sub-problems
4. Data Structures & Complexity Analysisa. Remembering Past Computation for Futureb. Space Complexity
5. Final Algorithm & Complexity Analysisa. Traversal of the Recursion Treeb. Pruning
6. Implementationa. Available Memory, Time, Quality of Solution, etc
1. Core Methodsa. Divide and Conquerb. Greedy Algorithmsc. Dynamic Programmingd. Branch-and-Bounde. Analysis using Recurrencesf. Advanced Data Structuring
2. Important Problems to be addresseda. Sorting and Searchingb. Strings and Patternsc. Trees and Graphsd. Combinatorial Optimization
3. Complexity & Advanced Topicsa. Time and Space Complexityb. Lower Boundsc. Polynomial Time, NP-Hardd. Parallelizability, Randomization
![Page 11: INTRODUCTION TO RECURSIVE FORMULATIONS FOR ALGORITHM …](https://reader030.vdocument.in/reader030/viewer/2022012011/61d9f1a7165eb255450a4119/html5/thumbnails/11.jpg)
Thank you
Any Questions?