CS502 Highlighted Handouts by VU Sparky
- Type
- Highlighted handout
- Course
- CS502 Fundamentals of Algorithms
- Size
- PDF 2.6 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 6, 7, 8 of 187. Download the file for all 187 pages.
Contents
Introduction
- 1 Origin of word: Algorithm
- 2 Algorithm: Informal Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 3 Algorithms, Programming
- 4 Implementation Issues
- 5 Course in Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 6 Analyzing Algorithms
- 7 Model of Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 8 Example: 2-dimension maxima . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 9 Brute-Force Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 10 Running Time Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 10.1 Analysis of the brute-force maxima algorithm.
- 11 Analysis: A Harder Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 11.1 2-dimension Maxima Revisited
- 11.2 Plane-sweep Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 11.3 Analysis of Plane-sweep Algorithm . . . . . . . . . . . . . . . . . . . . . . . . .
- 11.4 Comparison of Brute-force and Plane sweep algorithms
Asymptotic Notation
Divide and Conquer Strategy
- 1 Merge Sort
- 1.1 Analysis of Merge Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 1.2 The Iteration Method for Solving Recurrence Relations . . . . . . . . . . . . . . .
- 1.3 Visualizing Recurrences Using the Recursion Tree . . . . . . . . . . . . . . . . . CONTENTS
- 1.4 A Messier Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 2 Selection Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 2.1 Sieve Technique
- 2.2 Applying the Sieve to Selection
- 2.3 Selection Algorithm
- 2.4 Analysis of Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sorting
- 1 Slow Sorting Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 2 Sorting in O(n log n) time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 2.1 Heaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 2.2 Heapsort Algorithm
- 2.3 Heapify Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 2.4 Analysis of Heapify
- 2.5 BuildHeap
- 2.6 Analysis of BuildHeap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 2.7 Analysis of Heapsort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 3 Quicksort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 3.1 Partition Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 3.2 Quick Sort Example
- 3.3 Analysis of Quicksort
- 3.4 Worst Case Analysis of Quick Sort
- 3.5 Average-case Analysis of Quicksort . . . . . . . . . . . . . . . . . . . . . . . . .
- 4 In-place, Stable Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 5 Lower Bounds for Sorting
Linear Time Sorting
- 1 Counting Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 2 Bucket or Bin Sort
- 3 Radix Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 1 Fibonacci Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CONTENTS
- 2
- 3 Edit Distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 3.1 Edit Distance: Applications
- 3.2 Edit Distance Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 3.3 Edit Distance: Dynamic Programming Algorithm . . . . . . . . . . . . . . . . . .
- 3.4 Analysis of DP Edit Distance
- 4 Chain Matrix Multiply
- 4.1 Chain Matrix Multiplication-Dynamic Programming Formulation . . . . . . . . .
- 5 0/1 Knapsack Problem
- 5.1 0/1 Knapsack Problem: Dynamic Programming Approach . . . . . . . . . . . . .
Greedy Algorithms
- 1 Example: Counting Money . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 1.1 Making Change: Dynamic Programming Solution
- 1.2 Complexity of Coin Change Algorithm . . . . . . . . . . . . . . . . . . . . . . .
- 2 Greedy Algorithm: Huffman Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 2.1 Huffman Encoding Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
- 2.2 Huffman Encoding: Correctness . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
- 3 Activity Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
- 3.1 Correctness of Greedy Activity Selection . . . . . . . . . . . . . . . . . . . . . . 107
- 4 Fractional Knapsack Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Graphs
- 1 Graph Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
- 1.1 Breadth-first Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
- 1.2 Depth-first Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
- 1.3 Generic Graph Traversal Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 119
- 1.4 DFS - Timestamp Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
- 1.5 DFS - Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
- 2 Precedence Constraint Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
- 3 Topological Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
- 4 Strong Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
- 4.1 Strong Components and DFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Related CS502 files
All CS502 files →- CS502 Final Term Notes Lectures 23-45 by Mudassar Iqbal Final term PDF 30.9 MB
- CS502 Grand Quiz 2020 Quiz PDF 1.1 MB
- CS502 Highlighted Handouts Set 2 Highlighted PDF 1.7 MB
- CS502 Highlighted Handouts by Waqas Qureshi Highlighted PDF 4.3 MB
- CS502 Highlighted Handouts by Saadix Highlighted PDF 2.1 MB
- CS502 Final Term Highlighted Handouts Set 2 by Masters Highlighted PDF 1.6 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.