Having to go through a discrete math class in the first semester of my Master’s degree in Computer Science (UPenn-MCIT) was intriguing at first, after all, this is a degree targeted for non-CS professionals, so what’s the deal on having to learn math proofs in the form “prove that if x is even then x*x is even” as our first approach into the field? As part of the introductory materials School’s Faculty went through this question explaining (in much better logic and language, of course):
“In order to make sure your program works on all possible inputs, you have to prove it. No amount of testing gives you that certainty”.
Sounds promising though hard to internalize.
First math homework asked us to find as a “further challenge question” a game outcome, a game of the style: “you have a bag of the following items, if you remove two items at a time and then add another item following some sort of rules, then what is the last item in the bag?”
When I noticed there was some form of randomness in this, my first approach was to think about it in probabilistic terms, and then I concluded: anything can happen (something in the Schrödinger’s cat paradox way of thinking) and I even write one and a half sheets of nice LaTeX-formatted arguments justifying my rationale which I spend the following days polishing.
At breakfast my girlfriend asks: “how is your first week in grad school?” I go through all sorts of thoughts showing how happy I am, then I tell her about my math challenge question which I happen to have completely nailed. She is an artist, one that I truly admire, and on her artistry curiosity, starts digging more to understand the problem, asking all sorts of questions I haven’t thought for sure. Then she says:
“I think you are so much into your own solution that are not even open for looking other possibilities”. She is right, I’m not open because my answer is correct. You are not open for other possibilities about 1+1=2.
I arrive home and take advantage of my rudimentary Python coding skills and build a simulation of the problem, after 10 iterations my answer of “anything is possible” is not showing up, only one outcome shows every single time. Matter of probabilities, then after 50,000 iterations, I start realizing this is not what I expected. And this is the time my girlfriend laughs, and also the time I take a blank piece of paper, starting to open for new possibilities (while letting an infinite loop of simulations that would only stop if a different outcome comes out, happen in the background, I’m not that easy).
Blank piece of paper, what the hell is going on? Some hours (and a smaller scale exercise with coins in my desk) later, a proof comes out, showing a pattern in which indeed there is only one outcome possible. Then I stop the simulation.
For me, this whole experience made the point of “why would you care about proofs?”. And, of course why should I continue having breakfast conversations with an artist about CS.