Divide and Conquer: Strassen's Algorithm, Fibonacci Numbers
[Pages:25]Divide and Conquer: Strassen's Algorithm, Fibonacci Numbers
Lecture 3
The divide-and-conquer design paradigm
1. Divide the problem (instance) into subproblems.
2. Conquer the subproblems by solving them recursively.
3. Combine subproblem solutions.
L3.2
Example: merge sort
1. Divide: Trivial. 2. Conquer: Recursively sort 2 subarrays. 3. Combine: Linear-time merge.
T(n) = 2 T(n/2) + O(n)
# subproblems
work dividing
subproblem size and combining
L3.3
Master theorem (reprise)
T(n) = a T(n/b) + f (n)
CASE 1: f (n) = O(nlogba ? e) T(n) = Q(nlogba) .
CASE 2: f (n) = Q(nlogba lgkn) T(n) = Q(nlogba lgk+1n) .
CASE 3: f (n) = W(nlogba + e) and a f (n/b) c f (n) T(n) = Q( f (n)) .
Merge sort: a = 2, b = 2 nlogba = n CASE 2 (k = 0) T(n) = Q(n lg n) .
L3.4
Binary search
Find an element in a sorted array: 1. Divide: Check middle element. 2. Conquer: Recursively search 1 subarray. 3. Combine: Trivial. Example: Find 9
3 5 7 8 9 12 15
L3.5
Binary search
Find an element in a sorted array: 1. Divide: Check middle element. 2. Conquer: Recursively search 1 subarray. 3. Combine: Trivial. Example: Find 9
3 5 7 8 9 12 15
L3.6
Binary search
Find an element in a sorted array: 1. Divide: Check middle element. 2. Conquer: Recursively search 1 subarray. 3. Combine: Trivial. Example: Find 9
3 5 7 8 9 12 15
L3.7
Binary search
Find an element in a sorted array: 1. Divide: Check middle element. 2. Conquer: Recursively search 1 subarray. 3. Combine: Trivial. Example: Find 9
3 5 7 8 9 12 15
L3.8
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- analysis of fibonacci series cryptography
- fibonacci numbers and recurrences
- the fibonacci sequence
- divide and conquer strassen s algorithm fibonacci numbers
- risk control in algorithmic trading using
- exercises siue
- al balqa applied university
- database systems florida institute of technology
- design analysis of algorithms ucf computer science
- operating system lab record
Related searches
- big and tall men s clothing
- wage and hour division s website
- communication and why it s important
- jcpenney big and tall men s clothing
- fibonacci numbers worksheet
- fibonacci numbers in nature
- fibonacci numbers list
- fibonacci numbers real life examples
- exercise and why it s important
- euclid s algorithm calculator
- big and tall men s pants
- divide and simplify calculator