Beware of mathematicians!
The last exercise does not add anything new to the understanding of the nature of mathematics but it is important for further description of the confrontation between mathematicians and computers.
Let's take the line segment between dots "0" and "1" and summon the tabletop rational demon. This is the green demon who has a magical ruler that can exactly measure the distance between two mathematical points and a magical cutter that cuts a line segment at exact mathematical point. The width of the cut is exactly 0 in any measurement units but you can imagine that the demon leaves a thin green mark on the paper surface in the place of the cut.
The rational demon sets the exact positions for points "0" and "1", measures with his ruler the distance between them and cuts this segment into two halves. He has produced the number "1/2". We usually write it as "0.5".
Now he divides distance between "0" and "1" into three exactly equal segments and cuts the numbers "1/3" and "2/3".
Let's stop and look at the number "1/3". This is a perfectly simple rational number. But if we try to use the decimal representation, we get a strange construction "0.33333333333333…"
Ellipsis "…" means that this sequence is infinite.
By the way, behind "0.5" also lies an infinite sequence. Unfortunately mathematics teachers rarely mention this.
Kids are told that
"125" is "1*100 + 2*10 + 5",
"20403" is "2*10000 + 4*100 + 3" and
"0.27" is "2*0.1 + 7*0.01".
This is correct but describes this mathematical concept from the everyday point of view.
Mathematical decimal number is a sum like "… a5*105 + a4*104 + a3*103 + a2*102 + a1*101 + a0*100 + a-1*10-1 + a-2*10-2 + a-3*10-3 + a-4*10-4 …"
102 = 100
100 = 1
10-3 = 0.001
a4, a-2 and other a's represent some integers between 0 and 9.
Ellipsis "…" at the start and at the end say that this sequence indefinitely continues at left to greater and greater positive powers of ten and at right it indefinitely continues to smaller and smaller negative powers of ten.
Our number "0.5" is the sequence "…0000000000000.5000000000…" and it simply happens that it has only one a-1 not equal zero. We write a zero for a0 to denote the place of the decimal point and we leave out all other zeros because they do not add anything to the sum. The shortened representation ".5" is also widely used.
(A side note: please use the word "zero" for "0" because software developers may use the words "null" and "nil" to represent an empty set "∅". The decimal point in the decimal point format is not the point "0" on your line. Many countries define the comma "," instead of the point "." as the default decimal mark. )
Note, we cannot leave out the intermediate zeros, if the number is not exactly "0.5" but has for instance "1" at the far right place for a-100. This small difference has no meaning for any practical purpose but for mathematics this are different numbers.
You can remember your first demon and say that each three seconds he clarifies next decimal digit in the position of your first dot in some coordinate system. At some iteration he would separate points "0.5" and "0.50000…0001" and draw them as different dots.
If we have two numbers: "1" and "1 + 1*10-10", the first number is included in the set of natural numbers "N", in the set of integer numbers "Z" and in the set of rational numbers "Q" but second belongs only to rational numbers.
This means some mathematical operations defined on the set of natural numbers can use the "exact 1" but the usage of the "nearly exact 1" is not permitted. Despite of the fact that you do not have any possibility to distinguish them as points on your line.
Now your rational demon takes a flask with green mixture, drinks a sip and divides himself into four smaller demons. Each of them stands on a line section (this are (0:1/3), (1/3:1/2), (1/2:2/3), (2/3:1)), each takes a ruler, divides his section into some equal subsections, then drinks a sip of the green mixture and divides himself further.
Note, the rational demon could divide not only the section between "0" and "1" but also a section between "1" and "2", or between "7.5" and "10.82", or between "-0.34" and "-5.672". It is simple to prove that there is no such section between two rational numbers that cannot be divided by the rational demon. This means any section on the line contains indefinite number of rational numbers.
We again have stumbled on infinity. However rational demon is not able to reach all points on the line. The unreachable points represent irrational numbers such as π or 111/2. Irrational numbers cannot be represented as a fraction of natural numbers, any power of ten is a natural number, and this means that the decimal representation contains an indefinite sequence of digits after decimal point. Unlike the decimal representation of "1/3" the tail of this sequence does not repeat itself.
Mathematics says that any point on your mathematical line may be represented as a real number which is included in the set "R" and the set "R" consist of rational numbers "Q" and irrational numbers "I". Between any two different real numbers is indefinite number of real numbers, this means indefinite number of rational numbers and indefinite number of irrational numbers. ("∞ + ∞ = ∞" We are permitted to add them but it is not permitted to say that one infinity is greater than the other infinity.)
Now we have everything we need to blame mathematicians for trying to write software.
Next chunk will follow next week.