Please enable JavaScript.
Coggle requires JavaScript to display documents.
Divide and Conquer (Counting Inversions
(Computing a distance function on…
Divide and Conquer
-
-
-
Basics
Concept
Breaking the total input down into several parts, solving those parts
The run time involves solving a recurrence relation which is just the equation for how to break down the current problem
-
Mergesort
-
Solving
-
Substituting
Let's just make an assumption that since we're halving at each level we think it'll \(T(n) \le cn log_2n \text{for all } n \ge 2\)
-
Smoothing a noisy signal
Concept
With a sequence of actual measurements it's often the case where the data when plotted looks jagged due ti measurement error or random fluctuations
-
Common Tricks
\(log_2(n/2) = log_2(n) - 1\)
Comes from
\(log_2(n * 2^{-1}) \to log_2(n) + log_2(2^-1) \to log_2(n) - log_2(2) \to log_2(n) - 1\)
-
-