Compare commits
9 Commits
995ba47ca2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a7c8efd537 | |||
| 68ad00a450 | |||
| ccf34b5dca | |||
| c96985c0d8 | |||
| 3abf5a0f0b | |||
| c4ea7b971a | |||
| aa95c26224 | |||
| a5ed6d3d07 | |||
| e14250232b |
44
notes/midterm.md
Normal file
44
notes/midterm.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Alogorithm Midterm Access
|
||||
|
||||
## Sorting Problem
|
||||
|
||||
Comparison Sorts(Lower bound is $\Omega(n \lg n)$ because decision-tree model)
|
||||
|
||||
* Insertion Sort
|
||||
* Selection Sort
|
||||
* Merge Sort
|
||||
* Quick Sort
|
||||
* Heap Sort
|
||||
|
||||
Sorting In Linear Time
|
||||
|
||||
* Counting Sort
|
||||
* Radix Sort
|
||||
|
||||
## Asymtotic Notation
|
||||
|
||||
* $Theta$-notation
|
||||
* $O$-notation
|
||||
* $\Omega$-notation
|
||||
|
||||
Transitivity, Reflexivity, Symmetry, Transpose Symmetry
|
||||
|
||||
Three methods for solving recurrences:
|
||||
1. Substitution method
|
||||
2. Recursion-tree method
|
||||
3. Master method
|
||||
|
||||
**Getting asymtotic notation by recursion tree is important**
|
||||
|
||||
## Dynamic Programming
|
||||
|
||||
* Assembly-line scheduling
|
||||
* Rod cutting
|
||||
* Longest-Common Subsequence
|
||||
* Matrix-chain Multiplication
|
||||
|
||||
## Greedy Algorithm
|
||||
|
||||
* An Activity Selection Problem
|
||||
* Elements of the greedy strategy
|
||||
* Huffman codes
|
||||
BIN
out/reviews/R8d.pdf
(Stored with Git LFS)
BIN
out/reviews/R8d.pdf
(Stored with Git LFS)
Binary file not shown.
BIN
out/reviews/R9a.pdf
(Stored with Git LFS)
Normal file
BIN
out/reviews/R9a.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
out/reviews/R9b.pdf
(Stored with Git LFS)
Normal file
BIN
out/reviews/R9b.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/1.Intro.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/1.Intro.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/15.Dynamic Programming.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/15.Dynamic Programming.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/16.Greedy Algorithms.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/16.Greedy Algorithms.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/2.Getting Started.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/2.Getting Started.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/3.Growth of Functions.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/3.Growth of Functions.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/4.Divide-and-Conquer.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/4.Divide-and-Conquer.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/6.Heapsort.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/6.Heapsort.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/7.Quicksort.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/7.Quicksort.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/8.Sorting in Linear Time.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/8.Sorting in Linear Time.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 10 Amortized analysis.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 10 Amortized analysis.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 10-2 Amortized analysis.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 10-2 Amortized analysis.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 10-3 Amortized analysis.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 10-3 Amortized analysis.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 12-1 Elementary Graph Algorithms.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 12-1 Elementary Graph Algorithms.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 12-2 Elementary Graph Algorithms.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 12-2 Elementary Graph Algorithms.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 12-3 Elementary Graph Algorithms.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 12-3 Elementary Graph Algorithms.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 12-4 Elementary Graph Algorithms.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 12-4 Elementary Graph Algorithms.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 13 Disjoint Sets.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 13 Disjoint Sets.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 14. Minimum Spanning Trees.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 14. Minimum Spanning Trees.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 15 shortest path.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 15 shortest path.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 9-1 greedy algorithms.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 9-1 greedy algorithms.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pdf/Review 9-2 greedy algorithms.pdf
(Stored with Git LFS)
Normal file
BIN
pdf/Review 9-2 greedy algorithms.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -20,7 +20,7 @@ $pqr$
|
||||
|
||||
## Problem 3
|
||||
|
||||
Count the number of scalar multiplications where the dimensions of $A_1$, $A_2$, and $A_3$$ are $10\times 100$, $100\times 5$ and $5\times 50$, respectively.
|
||||
Count the number of scalar multiplications where the dimensions of $A_1$, $A_2$, and $A_3$ are $10\times 100$, $100\times 5$ and $5\times 50$, respectively.
|
||||
|
||||
1. $(A_1A_2)A_3$
|
||||
2. $A_1(A_2A_3)$
|
||||
|
||||
Reference in New Issue
Block a user