
Why Mathematicians Can’t Find the Hay in a Haystack - dnetesn
http://nautil.us/blog/why-mathematicians-cant-find-the-hay-in-a-haystack
======
bo1024
There are lots of examples of this phenomenon connected with "the
probabilistic method". There the problem is to prove a certain type of object
exists (there is at least one piece of hay in the stack). But it's hard to
build one. So what you do is construct one randomly, then prove that on
average or with high probability, your construction satisfies the
requirements. This proves that at least one thing in the stack is hay, or
actually that on average or most of the stack is hay.

I'm thinking of graphs, for example expander graphs; error-correcting codes;
and probably lots more I'm forgetting. In these cases it then becomes a
research program to construct such objects explicitly (which has a lot of
history with expanders and codes).

------
jessup
"The algebraic numbers are spotted over the plane like stars against a black
sky; the dense blackness is the firmament of the transcendentals."

\-- E. T. Bell

------
pedrocr
>Irrational numbers occupy the vast, vast majority of space on a number
line—so vast, in fact, that if you were to pick a number on the number line at
random, there is literally a 100 percent chance that it will be irrational.*

The asterisk at the end doesn't seem to lead to an actual footnote. What is
meant by this? That irrational numbers are more than 99.5% of all numbers and
so it rounds to 100%?

~~~
cokernel
Slogan: "rational numbers exist but do not take up space."

This is in a measure-theoretic sense, so literally 100% (not just 99.5%). On
the number line, the measure of an interval is the (absolute) difference
between its endpoints (the "length" of the interval). For any measurable set,
you can approximate its size from above by covering its points with intervals
and shrinking them as much as possible.

But because there are only countably many rational numbers, you can cover all
of the rationals with a set of intervals with a finite total sum of lengths.

To be a bit more specific, if your rationals are r_1, r_2, r_3, ..., then for
any small number e > 0, you can form the set of intervals

(r_1 - e/2^2, r_1 + e/2^2), (r_2 - e/2^3, r_2 + e/2^3), (r_3 - e/2^4, r_3 +
e/2^4), ...

which have a total sum of lengths e/2 + e/4 + e/8 + ... = e and contain all of
the rational numbers.

So for any positive number e > 0, the measure of the rational numbers is less
than e, meaning that the measure of the rational numbers is 0.

To turn this into actual probabilities requires a little bit more work, since
the measure of the number line, and hence that of the irrational numbers, is
infinite, not "100%". But you could look at the probability of selecting a
rational number in the interval [0, 1] and use the same reasoning as above to
get a probability of 100% for an irrational number and 0% for a rational
number.

~~~
enedil
It's not less then even, it's exactly e.

~~~
cokernel
(Edited to try to answer the objection more clearly.)

The intervals overlap heavily. Each of the intervals R_i contains infinitely
many rational numbers, and all but finitely many of those will have
corresponding intervals which are completely contained within the interval
R_i. As a result, the estimate obtained by the construction described is
always strictly smaller than the chosen e.

~~~
JadeNB
I appreciate your careful and patient explanation, and assay a superficial and
snarky one of my own: it is impossible for the measure of the rationals, if it
is to exist at all, to be _exactly_ `e` for _every_ small positive real number
`e`. Even if we didn't know anything about the overlap of the intervals, we'd
know at best that we had a (possibly non-strict) upper bound of `e`; but the
only non-negative real number that can satisfy such a bound for every positive
`e` is `0`.

------
tromp
The article points out how rational numbers are the needles amongst the hay of
irrational numbers.

In a more discrete setting, we have compressible files being the needles among
the hay of incompressible files. Technically; all but a fraction of 2^-k of
binary strings of length n need at least n-k bits to describe, but we cannot
come up with a single explicit example.

~~~
adrianN
For any fixed compression scheme it's trivial to come up with files that don't
compress.

~~~
baking
But any file that is "trivial to come up with" is going to be easy to compress
under many other schemes.

~~~
tromp
Indeed; we can't come up with explicit examples for the uncomputable
compression to the shortest possible description (corresponding to the
Kolmogorov complexity).

------
protonfish
Which is why in computational, science, and engineering mathematics there is
the concept of maximum precision. All measurements have an amount of precision
and as long as the precision of how you record and calculate numbers is
greater than that, the solution will be correct.

Unfortunately, this was not what I was taught in math class (science classes
had to teach this separately.) This lead me (and most everyone else I
communicate with) to erroneously believe that "good" math requires infinite
precision. This leads to things like junior programmers losing their minds
when 0.1 + 0.2 doesn't equal 0.3

~~~
PurpleBoxDragon
>This leads to things like junior programmers losing their minds when 0.1 +
0.2 doesn't equal 0.3

Junior programmers lose their mind when 0.1 + 0.2 != 0.3.

Senior programmers lose their mind trying to explain this to the business
side.

~~~
yen223
Truly senior programmers use integers to represent money

------
shoo
i think a dark side to "finding hay in a haystack" is the risk of building up
an elegant theory for e.g. a novel calculus of hay, only to realise after some
time that the set of hay is in fact empty, or is isomorphic to some other well
understood and hence uninteresting structure.

~~~
joker3
That's why as soon as you come up with a list of properties your hay should
have, you construct an example of it.

------
jarenstein
Numberphile did a great video on this topic.[0]

[0]:
[https://www.youtube.com/watch?v=p-xa-3V5KO8](https://www.youtube.com/watch?v=p-xa-3V5KO8)

------
sn41
Another nice concept: normal numbers. These are numbers which have a very
basic property of randomness: getting the block frequencies right. [1]

The strong law of large numbers implies that almost every number in the unit
interval is normal.

Giving a simple construction of a normal, and proving that it is indeed
normal, is quite difficult.

[1]
[https://en.wikipedia.org/wiki/Normal_number](https://en.wikipedia.org/wiki/Normal_number)

~~~
QML
In relation to the article posted, there is a conjecture which states all
algebraic, irrational numbers are normal.

------
08-15
So much for "mainstream math". There is an alternative take called
constructive algebra, which I believe to be more useful to a computer
programmer. Briefly:

"There are only finitely many numbers."

That's trivially true, because numbers are man-made objects, and man has only
had enough time to make finitely many of them. Integral and rational numbers
can be made by writing them down, algebraic irrational numbers can be made by
writing down an expression for them. (What language? Lambda calculus,
obviously, because according to the Church-Turing thesis, nothing more
powerful exists.)

Only countably infinitely many numbers can potentially be made this way, only
finitely many will ever be made. Those non-algebraic transcendental numbers?
Don't exist, because they can never be made. They may "exist" in a
philosophical way, but they no impact whatsoever on the real world in which my
programs operate.

~~~
Ivoirians
So you can't imagine a world in which our understanding of pi or e might
impact or be useful to the real world?

More broadly, you can surely imagine how the study of transcendent numbers
might inform results in other fields? I don't usually try to justify math by
pointing at its applications, but for example, the transcendence of pi leads
to a proof that squaring the circle is impossible. Even if things aren't
constructable, they can still be valuable to think about.

~~~
08-15
Brilliant, just like the dimwitted TA at university who claimed full of
conviction "NO amount of memory can represent pi!" Which is funny, because he
represented it with a single character.

Pi and e are both algebraic numbers, there are expressions (algorithms) for
both. And guys like you are funny: Faced with proof that almost all real
numbers do not have a name, you immediately try to name an example.

~~~
Koshkin
You contradict yourself: any _given_ real number is, in fact, given by its
"name", which, as you said, is either a symbol or an algorithm (which,
incidentally, are the same thing - a symbol can be seen as the name of an
algorithm, or a function; the TA was probably referring to the fact that the
algorithm would have to stop at some point so as to avoid overrunning the
memory limit).

~~~
08-15
> You contradict yourself: any given real number

Err... I didn't say that. For good reason, as you point out. I know that you
cannot "give" almost all real numbers. I'm merely pointing out that there are
mathematicians who go the extra mile and decide that those don't even exist.

Symbol, name, algorithm; all of those are the same thing. And almost all real
numbers (in ZFC aka "standard math") don't have one.

> the TA was probably referring to the fact that the algorithm would have to
> stop at some point

Nope, he wasn't. He specifically insisted that no amount of memory can
represent pi, while any integer can be represented. He was technically
correct, but I have an easier time working with pi (to any desired, even
dynamically determined precision) than with Ackermann(4,4).

The dimwitted TA missed the point, and he did so, because standard (not
constructive) math creates lots (continuously infinitely many) of infinities,
which serve no use but to make irrelevant points about things that cannot
occur in actual programs.

------
air7
It's a nice little puzzle to prove that: Irrational number <=> Never repeating
infinite decimal representation.

~~~
Koshkin
> _Never repeating_

Meaning "non-periodic." Repetitions can occur as many times as one wishes,
e.g.

    
    
      0.1230123001230001230000123...
    

is irrational.

