Making Heads or Tails out of Recursion and Combinatorial Math
GNU — GNU’s Not Unix
I thought I’d take a look at two topics at once and make some fun by mashing them together. Today’s topic is recursion. In computer science (and in math, although we call the equation a recurrence relation) recursion is an often misunderstood concept causing lots of panic and anxiety. In reality - it’s pretty easy once you wrap you head around the idiom.
What is recursion?
When we define a function in such a way that it calls itself, we’ve defined a recusive function. The most basic example is the Factorial function, $f(n)=n!$. We define the function recursively by defining it in reference to itself. So, recursively, we define $f(n)$ as:
Continue reading