Example 1
Solution
Critical function
Since
Case 2
Answer
(Binary Search)
Example 2
Critical function
Since
Case 1
Answer
Example 3
Critical function
Here,
This matches Case 2 with k=1.
Answer
Example 4 (Strassen's Matrix Multiplication)
Here,
Critical function
Since
Case 1
Answer
This is exactly why Strassen's algorithm is asymptotically faster than the classical
O(n^3) matrix multiplication algorithm.
Example 5
Solution
Watershed
Driving function
Case 1
Answer
Example 6
Solution
Watershed
Driving function
Exactly equal
Case 2
Answer
Example 7
Solution
Watershed
Driving function
Case 1
Answer
Example 8
Watershed
Equal
Case 2
Answer
Example 9
Watershed
Driving
Case 2
Answer
Example 10
Watershed
Driving
Case 2
Answer
Example 11
Watershed
Driving
Case 3
Answer
Example 12
Watershed
Driving
Case 3
Answer
Example 13
T(n)=2T(n/4)+1
Step 1: Identify
,
, and
Step 2: Find the watershed function
Since
Therefore,
Step 3: Compare with the watershed function
Driving function
Watershed
Clearly,
Choose
Step 4: Determine the case
Case 1
Final Answer
Example:14
Step 1
Step 2
Watershed
Step 3
Driving function
Exactly equals the watershed function.
Step 4
Case 2
Here
Final Answer
Example - 15
Step 1
Step 2
Watershed
Step 3
Driving function
This is
Step 4
Case 2
because
Final Answer
Example-16
Step 1
Step 2
Watershed
Step 3
Driving function
Clearly,
Choose
Step 4
Check the regularity condition
We need
Compute
Since
Choose
Regularity condition holds.
Step 5
Case 3
Final Answer
Example - 17
(e)
Step 1
Step 2
Watershed
Step 3
Driving function
Clearly,
Choose
Step 4
Check regularity
Since
Choose
Regularity condition holds.
Step 5
Case 3
Final Answer
Comments
Post a Comment