Kalid's Math and Science Pages |
Home | Articles | Download | Fun | Links | About |
Theory of AlgorithmsThe following are certain revelations I had. Related: NP Completeness Recursive functions can be linear!A function that divides and conquers can be linear. Consider one that
splits its input into halves, and works on one half. It then splits
that part into half, and works one half of that. That approximates
to Proofs by inductionThe idea: You have a formula. Show that it works for the base case. Then, assume the formula is true for some value N. Now show that the formula works for the next case (N+1) as well (use the fact that it works for N). For example, we wish to prove that our function f(k) is equal to g(k). First, show that f(0) = g(0) [the base case]. Main idea: "The proposition is true in the first instance. And if a given instance is true, the next one in the sequence will also be true. Then the proposition will be true in all instances." (UnderstandingInduction.html) |