Visualizzazione post con etichetta proofs. Mostra tutti i post
Visualizzazione post con etichetta proofs. Mostra tutti i post

martedì, luglio 10, 2018

In praise of laziness - in math and in life

 Since around 2000 I have pursued a career in math-related fields. I studied maths, I did my PhD in functional analysis and PDEs, then I moved to stochastic processes. After leaving academia and joining industry, I happened to be involved in a project about non-linear structural mechanics.

All in all, at my venerable age of 37, I am satisfied to have a google scholar profile and I am very grateful to have enjoyed collaborating with many people much more gifted than me.

As years pass, I become more and more convinced that the only way I could achieve this was not mathematical talent but sheer laziness.

Some background on why I was good in math, but not really

I had almost no math education until the age of 18. I went to a humanistic school, learned Latin, Greek, Philosophy and the like. In my last year, I heard rumors about limits and exponential functions from my math teacher. I thought them esoteric mysteries reserved to University students. I decided, this was not interesting enough for me.

However, I was somewhat talented for numbers and I still can calculate very quickly possible figures, on the other side I have never had any intuitive grasp of geometry. I literally hate triangles and congruence criteria, not to mention 3D geometry, which should be prohibited by UNICEF as a perverse mean for teens torture.

So I went to University, and started studying mechanical engineering, just because of good job perspectives, if you want to know it. However, after hearing the introduction of natural numbers according to Peano, I decided to switch in the end. I just enjoyed that so much!

How to survive pages of estimates through laziness

Somehow I got a master degree in math. I was 25 as I finished my studies, I decided that I still could some fun time and did my PhD. Laziness is no good starting point to complete a PhD in maths, though. But it has some advantages. Whilst navigating the treacherous waters of choosing a cool topic for my thesis, I steered clear from everything what promised years of suffering because of excessive calculations. In contrast, after some attempts I settled to a reasonable subject where more or less nothing had be written, so that I could graze on green pastures and produce interesting theorems with limited effort. It was not a conscious effort in that time, but now, years later, I recognize the pattern very clearly.

I had a very good supervisor. He was back then PostDoc in my institute, and he had quite some talent for doing long calculations without errors. He tried to motivate me to learn this skill. Again, I was very bad at this, but had some insights for finding shortcuts and proving theorems with as little effort as possible. Laziness, again. This saved my academic life in similar situations over and over again. Another example: I was once included as an author in my most cited paper for the only reason that I revealed to a very good PhD student the secret of shortening calculations with the judicious use of Fourier transforms and matrix inversion. 

Laziness in life

In the end, I think that laziness helped me in life too. We built a house with my wife some years ago. This is quite a complex endeavor, I can say you. It needs hundreds of decisions, and can become seriously exhausting. Somehow, we decided to settle for a "good enough" strategy. When faced with any decision or option we would always take the first one which was good enough. We talked to friends in the same situation. They were horrified that we planned, chosen and bought our new kitchen in well below 4 hours. When I was a PostDoc, I was struggling to start an academic career. I changed field after the PhD, so I probably would have needed some more stations before becoming settled. Judiciously, I just decided that I would give industry a chance, and I have never regretted this. Academia was just not my path. By the way, the PostDoc which supervised me during my PhD thesis is now a respected Professor. It was his path.

I admit, there are situations in which you have to push and go the extra mile. Can you ever be sure that this is the case now? Burnt energies do not come back for free and if you rush too soon you will not do the run.

And you? Have you already found yourself in situation when healthy laziness helped you succeed?

domenica, maggio 06, 2018

What is a proof?

I was at lunch with some colleagues some days ago, and we started discussing about maths. Predictably, the conversation turned to the quite specific concept of proofs used by mathematicians. I had some insights, on the reasons for so many misunderstandings between mathematicians and others. I think many of them arise from a different understanding of the word "proof"

I want to exemplify on the classical result about the cardinality of the power set, so let us dive into math.

First, the power set ${P}(A)$ of a given finite set $A$ is the the enumeration of all the possible subsets of $A$.

If $A$ is, say, the set of $\{me, you\}$ the power set will contain:
  1. the empty subset $\emptyset$
  2. the subset containing only $me$
  3. the subset containing only $you$
  4. the subset containing both $me$ and $you$
It is a legitimate and somewhat interesting question: how many elements does the power set $A$ has, if $A$ has $n$ elements? Such counting questions are very common in math and constitute the basis of combinatorics. Let us look how we can come to a solution of the problem and, even cooler, a formal proof that the solution is correct.

Examples
The first step is, more often than not, to list some examples. For instance, if the set $A$ only contains one elements, the power set will contain:
  1. the empty set
  2. the subset consisting of that element
We now have an example for a 1 element set (2 subsets) and for a 2 element set (4 subsets). What about a 3 element set?

By the way, we have implicitly agreed on the working assumption that the cardinality of the power set only the depends on the cardinality of the original set. This is ok, if this is wrong, we will change it. (But yes, it will turn out that this is right).

Back to our example of our 3 element set $\{me, you, the\ others\}$. We have all which we have considered before:

  1. the empty subset $\emptyset$
  2. the subset containing only $me$
  3. the subset containing only $you$
  4. the subset containing both $me$ and $you$
and in addition, all of those plus $the\ others$

  1. the subset containing only $the\ others$
  2. the subset containing only $me, the\ others$
  3. the subset containing only $you, the\ others$
  4. the subset containing both $me, you$ and $the\ othes$
This totals to 8 elements. Let us summarize: for 1 element, 2 subsets, for 2 elements, 4 subsets and for 3 elements, 8 subsets. This looks suspiciously like $2^n$, with $n$ the cardinality of $A$. This will be our working hypothesis.

Insight
Having formulated our working hypothesis, we should ask ourself whether this can be possibly right. Upon thinking we recognize this: for every subset in our collection, every single element of $A$ can be present or not. Since we have $n$ elements, every element, we must make $n$ binary decisions of whether to include that element in the subset or not. This gives $2 \times 2 \times ... \times 2 $ possibilities. Yes! This is $2^n$. This is our insight, and typically it is enough if you are a physicists.
But it is not a proof. It is not a proof, as to be a proof it must be formalized in a standard way using the laws of logics. This is important, since this gives all mathematicians the chance of recognizing a proof as such.

The proof
Let us prove this, then. The standard way to prove stuff about natural numbers is the method of induction, which we will follow step by step. First we formulate our theorem in details.

If $A$ is a finite set with $n$ elements, then its power set $P(A)$ has $2^n$ elements.

We prove that this is true for 0. If the set $A$ is empty, then it has 0 elements, and one single subset, which is the empty set. $1  = 2^0$. Check.
To avoid being caught in misunderstandings and quarrels about 0 and empty sets, we will prove it also for a single element. This is not required, but we do it anyway. If $A$ has a single element, its subsets are the empty set and $A$ itself. $2 = 2^1$. Check.

Now let us go to the induction step. Let us assume, we known that if $A$ has $n$ elements, then we have $2^n$ distinct subsets of $A$. Let us reason about a hypothetical set $B$ with $n+1$ elements and let us pick one arbitrary element, which we will call $b$ out of $B$. Let us remove $b$ from $B$ and obtain $B'$ a set of obviously $n$ elements. We know from the induction assumption that $B'$ has $n$ elements and thus $2^n$ subsets, constituting the set $P(B')$. Let us now consider the set $X = \{S \cup \{b\} | S \in P(B')\}$.

Interestingly, $X$ and $P(B')$ are disjoint, as every set in $X$ contains $b$ which per construction absent from every set in $P(B')$. So, the cardinality of $X \cup P(B')$ will be the cardinality of $X$ plus the cardinality of $P(B')$.

It remains to show that
  1. the cardinality of $X$ is $2^n$
  2. $X \cup P(B') = P(B)$
For 1. we should give a bijective function for $P(B')$ to $X$, which turns out to be exactly the prescription with which we constructed $X$ in the first place. This kind of clerical tasks is typically left to the reader as an exercise, and we will comply with the mathematical tradition.

For 2. we notice that if $Y$ is a subset of $B$ it either contains $b$ or not. If not, it is in $P(B')$ and thus in  $X \cup P(B')$. If yes, it equals to $Y \setminus b \cup \{b\}$. Now, $Y \setminus b$ only consists of elements of $B$ apart of $b$, so it is in $P(B')$ and when we unit sets in $P(B')$ with $\{b\}$ we get by construction sets in $X$, so $Y$ is a set in $X$ and thus in $X \cup P(B')$. We just proved that $P(B) \subset X \cup P(B')$. The converse direction is left to the reader an exercise, as it follows the same principles. We also do not want to spoil him of the incredible feeling of finishing a proof.

Conclusion
What I hope I could convey is that sheer amount of work needed to go from an insight, giving us just a working hypothesis and some ideas, to a complete mathematical proof. The real question could be here: why bother? Indeed our insight was right, and the loosely described proof ($n$ binary decisions giving $2^n$ different possibilities) is perfectly fine.

I think the problem is often that this kind of insight often fails with more complex arguments, even in seemingly intuitive cases.

Formalized, standardized proofs in maths are a powerful method to fight the natural tendency of the human mind to fall victim of cognitive illusions and are thus one of the milestones of the human thinking!