Site Tools


mathematical-maturity

Table of Contents

Mathematical maturity

Trivial example

One of the earliest awakenings of my mathematical maturity was when I was a kid, thinking one of the simplest equations there is:

I knew how to solve this 99% of the time:

Is this correct? Let's take the equation :

  • Divide both sides by two
  • The answer is .

How much simpler can it get? Clearly there is not much more to it. This works 99% of the time. No matter what two numbers I pick, it always works. The evidence is overwhelming.

However, threre is that pesky 1% chance of division by zero. What do we do with it? Not much of a problem if , since the solution still works. But if then we enter a truly strange land. If we take and , no matter what choice we make for we get a nonsensical answer . On the other hand, if both and , any choice for yields which is… seemingly true. What's going on? Looks like there is a lot more structure to this equation than I thought. Let's map all the possible cases:

  • If , then
  • If , then:
    • If , then
    • If , then

Okay, from a simple straightforward computation we now have a decision tree. This is a bit surprising considering my goal was to find an answer to a simple equation like .

Analogy with programming

As a kid, I always found programming easier than mathematics. So let's translate into programming. My algorithm for solving was simple, yet causing my program to crash:

float solve_for_x(float a, float b)
{
    return b / a;
}

To avoid the crash, the algorithm will have to be upgraded:

std::set<float> solve_for_x(float a, float b)
{
    if (a != 0) {
        return { b / a };
    } else {
        if (b == 0) {
            return set::set_of_all_floats;
        } else {
            return std::empty_set;
        }
    }
}
mathematical-maturity.md · Last modified: