mathesis
Conoscenza perfetta
An answer to the legendary “Question six”
Some simple algebra to answer one of the hardest questions in the history of the International Mathematical Olympiad
Note: this article makes use of MathML, the standard XML markup for math formulas. Sadly, this is not properly supported on some allegedly ‘modern’ and ‘feature-rich’ browsers. If the formulas don't make sense in your browser, consider reporting the issue to the respective developers and/or switching to a standard-compliant browser.
Introduction
You can find an introduction to the legendary “Question Six” in this Numberphile video. This article is my attempt at providing a “simple” answer to the problem, sketched from the hints provided in this more detailed insights video.
To be clear this isn't my personal “best effort” at trying to solve the problem (I did give it a quick try, starting from an intuition that induction would be the key, but I didn't get very far in). I also have no idea if this is how it was solved by any of the candidates that did provide the correct answer to the problem.
No, this is just a formalization into an actual proof of the hints provided by Simon Pampena in the second video. The proof should still be easy to follow even with only a basic knowledge of algebra.
The problem
Let and be positive integers such that divides . Show that
is the square of an integer.
The solution
Let
We want to show that if are positive integers and is an integer, then is a square.
Observe first that if are non-negative integers, and one of them is 0, then the statement is trivially true, since and .
Assume now that integers with are such that is an integer. We want to show that there exist a non-negative integer such that . Note that with this proven, we can apply the result iteratively, constructing a sequence with and such that . Given the strictly decreasing nature of the sequence and the non-negativity of the values, the sequence will terminate in steps, with , leading to , proving that is the square of an integer.
Let us then prove the existence of . Let . By hypothesis, is an integer and we have
that with simple algebra can be rearranged into
This implies that the quadratic equation
has the solution . Dividing the polynomial
by gives us1 the second root, , which again is an integer.
We need to show that , i.e.
or equivalently
Note that by bringing the leftmost two terms in the right-hand side of equation to the left-hand side and flipping the equation, we have
but since , this implies:
and thus
quod erat demonstrandum.
E.g. using Ruffini:
where the reminder is known to be 0 because of equation . ↩
Risolvere un quizzino della domenica (3)
xmau propone per oggi un quizzino della domenica che consiste
nel “risolvere” una semplice somma espressa utilizzando i numerali
romani (I
, V
, X
) in maniera impropria: invece di rappresentare
addendi e risultato semplicemente esprimendo i numeri con il meccanismo
romano, i numeri sono espressi nel sistema decimale posizionale che ci è
familiare, ma ciascuna delle cifre è espressa con i numerali
romani1:
I
per 1, II
per 2, III
per 3, IV
per 4, V
per 5, VI
per 6,
VII
per 6, VIII
per 8, IX
per 9, con l'aggiunta difficoltà
dell'assenza di spazi tra le cifre.
L'esposto del problema è il seguente:
IVIIIIIVIII +
IIVIIIII =
-------------
VIIXIVI
L'assenza di spazi è proprio ciò che rende questa una “crittosomma”: è
infatti impossibile, con un semplice colpo d'occhio, capire ad esempio
se una sequenza come III
rappresenta la cifra 3 o una delle coppie di
cifre 21 e 12.
L'unica “sequenza” di cui possiamo essere sicuri è IX
, giacché X
rappresenta il valore 10 secondo il sistema di numerazione romano, e nel
sistema posizionale da noi adottato non esiste una cifra con questo
valore, per cui IX
è sicuramente 9. Possiamo quindi “semplificare” la
nostra crittosomma in:
IVIIIIIVIII +
IIVIIIII =
-------------
VI9IVI
Rimangono da interpretare le due sequenze di numerali romani nella
somma finale: VI
, che può essere 6 o 51, e IVI
che può essere
interpretata in tre modi diversi: 151, 41, e 16.
Un dubbio
Un problema aperto (che speriamo non sia determinante per la soluzione) è la lettura delle cifre: le piú significative saranno scitte a destra, come vuole la convenzione che abbiamo ereditato dagli arabi, o saranno scritte a sinistra, come sembra suggerire l'allineamento?
Alla prova del 9
Per cercare di limitare le possibili interpretazioni possiamo osservare che non tutte le interpretazioni hanno la stessa congruità modulo 9. Specificamente, mentre le sequenze “additive” (simbolo di valore maggiore seguito da simboli di valori non inferiori) hanno tutte lo stesso valore modulo 9, quelle potenzialmente sottrattive (simbolo di valore inferiore seguito da simbolo di valore maggiore) possono avere due possibili interpretazioni, con valori modulo 9 che differiscono di un valore pari alla differenza tra il valore additivo e quello sottrattivo del simbolo di valore inferiore.
Nel nostro caso, le uniche coppie ambigue sono IV
per cui la
differenza di valore sarà 2. Come esempio, vediamo che VI
alla “prova”
del 9 darà sempre 6 (sia che venga letto come 6, sia che venga letto
come 51), per IV
abbiamo due valori diversi a seconda che IV
abbia
valore “additivo” (15 = 6) o “sottrattivo” (4).
Per la somma finale, alla prova del 9 abbiamo quindi due possibili
valori: 4 (interpretazione additiva di IV
) oppure 2 (intepretazione
“sottrattiva” di IV
).
Il secondo addendo ha pure un'unica sequenza IV
, e quindi due
interpretazioni: 3 (additiva) e 1 (sottrattiva).
Il primo degli addendi ha invece due sequenze IV
, e quindi ha tre
possibili valori (a seconda che le due sequenze siano entrambe additive,
entrambe sottrattive, o una additiva ed una sottrattiva,
indipendentemente da quale sia quale): i valori associati sono 1
(additive), 6 (sottrattive) e 8 (mista).
Alla prova del nove, le possibili combinazioni dei due addendi sono: , , , , . Poiché la somma è congrua 4 o 2 modulo, possiamo scartare per il primo addendo l'interpretazione sottrattiva: quindi o entrambe le sequenze del primo addendo vanno lette additivamente, oppure la lettura del primo addendo è mista, e quella del secondo è additiva (caso ).
La cifra piú a sinistra
La cifra piú a sinistra della somma è 5 o 6, e quindi le cifre piú a sinistra dei due addendi devono arrivare almeno a 4 o 5, piú un opzionale riporto dalle due cifre successive (supponendo che la notazione metta a sinistra le cifre piú significative).
Osserviamo subito che questo non è possibile se per il primo addendo si utilizza la lettura puramente additiva: in tal caso infatti la cifra piú a sinistra del primo addendo è 1, mentre quella del secondo è al piú 2, arrivando a 3, che è insufficiente.
Ne segue che per il primo addendo si deve usare la lettura mista, con la
prima sequenza IV
interpretata sottrattivamente (ed a fortiori la
seconda interpretata additivamente). Questo ci porta quindi nel caso
della prova del9, che implica
un'interpretazione additiva del secondo addendo, e sottrattiva della
somma: la sequenza IVI
con cui termina quest'ultima può pertanto
essere letta solo come 41.
Possiamo quindi ulteriorimente semplificare la nostra crittosomma in
4IIIIIVIII +
IIVIIIII =
------------
VI941
Dei rimanenti simboli V
sappiamo che vanno interpretati additivamente,
e quindi o avranno valore 5 (a sé stanti) o saranno parte di sequenze
per 6, 7 oppure 8.
Il lungo problema dell'1
Un terzo aiuto nel vincolare le interpretazioni ci viene dal possibile numero di cifre. Per la somma abbiamo solo due possibili interpretazioni: 6941 e 51941, di lunghezza rispettivamente 4 e 5. Nessuno dei due addendi può avere una lunghezza superiore (potrebbero avere una lunghezza inferiore se le cifre meno significative fossero a sinistra ed avessimo un riporto tra quelle piú significative, a destra).
Questo vincolo risulta particolarmente potente in congiunzione con il problema dell'1: un interessante corollario dell'uso del sistema numerico romano per la rappresentazione delle cifre è l'assenza di un modo per rappresentare lo 0: questo ci aiuta perché, non potendovi essere 0 negli addendi, l'unica cosa che può fare spuntare la cifra 1 nella somma è una coppia di cifre con riporto.
Guardando alla somma, abbiamo due possibili interpretazioni rimaste: 6941, e 51941. La seconda, in particolare, ha un 1 in seconda posizione (non sappiamo ancora se per le decine o per le migliaia), e questo non è ottenibile in alcun modo.
Supponiamo infatti che la lettura corretta della somma sia 51941. La
cifra piú a sinistra del secondo addendo dovrà quindi essere 1, poiché
se dovessimo leggere la sequenza iniziale II
come 2, avremmo .
(L'alternativa per arrivare a 5 come cifra piú a sinistra piú
significativa richiederebbe un riporto dalle cifre precedenti, che però
possono essere lette al massimo come , e non potremo mai avere
un riporto di dalle cifre ancora precedenti per arrivare ad un
riporto dalle seconde.)
Saremmo quindi a
4IIIIIVIII +
11VIIIII =
------------
51941
ma diventa a questo punto impossibile ottenere un 1 in seconda posizione, non potendo esserci uno zero nel primo addendo, o un riporto tale da lasciare un 1.
L'unica lettura possibile per la somma è quindi 6941, e questo richiede (sempre per una questione di riporti) che la cifra piú a sinistra del secondo addendo sia un 2: la nostra crittosomma è ora parzialmente risolta come
4IIIIIVIII +
2VIIIII =
------------
6941
e possiamo affermare che tutti e tre i termini sono composti da 4 cifre: potrebbero essere 3 con un opportuno riporto dalla somma delle cifre piú significative, ma il primo addendo non può avere solo 3 cifre.
Il vincolo sulle lunghezze è particolarmente importante per l'interpretazione del secondo addendo, per il quale rimangono 6 simboli per 3 cifre, con poche letture possibili: 811; 721 o 712; 631, 622 o 613, ed infine 532 o 523.
Anche qui ci viene in aiuto la questione dell'1 (terminale, stavolta), che risolve, insieme al vincolo delle lunghezze, anche la questione dell'ordine delle cifre: l'unico modo per ottenere un 1 come cifra piú significativa sarebbe un riporto da due addenti con tre cifre, e come già detto il primo addendo non può avere solo 3 cifre.
Da questo si deducono due fatti importanti: le cifre meno significative sono a destra (quindi alla fine otterremo numeri con le cifre ordinate secondo la convenzione cui siamo abituati), e per gli addendi queste sono rispettivamente 8 e 3, le uniche letture possibili per ottenere un riporto che ci lasci indietro l'1 della somma:
4IIIII8 +
2VII3 =
---------
6941
che lascia come possibili letture per il secondo addendo solo 2613 o 2523. E poiché dobbiamo arrivare a 9 come seconda cifra da sinistra, ed abbiamo al piú 3 dal primo addendo, e nessun riporto, la cifra dopo il 2 deve essere un 6, con un 3 in sua corrispondenza sul primo addendo, che ci permette una completa risoluzione del problema:
4328 +
2613 =
------
6941
non è esplicitamente enunciato nel testo, ma stiamo supponendo che si utilizzi solo la grafia che non prevede piú di 3 simboli uguali consecutivi, benché in realtà la forma additiva con quattro
I
sia storicamente attestata. ↩
Risolvere un quizzino della domenica (2)
xmau propone per oggi un quizzino della domenica che consiste nel trovare la singola cifra (di quelle da 1 a 9) che rimane fuori inserendo nelle caselle del seguente schema le altre otto:
Il quiz chiede di trovare la cifra “in piú”, e per farlo è sufficiente (ma, come vedremo, non necessario) risolvere lo schema.
Note: questo articolo fa uso di MathML, lo standard XML per le formule matematiche. Purtroppo, questo non è supportato correttamente in alcuni browser sedicenti ‘moderni’ o ‘ricchi di funzionalità’. Se le formule non hanno senso nel tuo browser, segnala il problema agli sviluppatori (del browser), o passa ad un browser che supporti questi standard.
Cominciamo dalla riga superiore: abbiamo una divisione in cui i tre numeri devono essere tutti distinti tra loro e compresi tra 1 e 9. Questo ci aiuta ad escludere, come valori possibili di , sia l'1, sia i numeri primi (2, 3, 5, 7) sia i quadrati (4, 9), ciascuna con motivazioni diverse:
- se , allora deve essere , e quindi abbiamo ripetizioni;
- se è primo, dovendo essere dovrebbe essere (poiché non ha altri divisori, essendo primo), e quindi (ripetizione);
- se è un quadrato, come divisori ha solo (esclusi), o un terzo valore per cui , nuovamente una ripetizione.
Gli unici valori possibili per , ovvero per la casella in alto a sinistra dello schema, sono quindi 6 oppure 8, per cui gli unici valori possibili per le altre due caselle della prima riga sono 2, 3 oppure 4.
Osserviamo ora che la colonna di destra di fatto è analoga alla riga superiore, poiché è equivalente a : la casella in basso a destra vale quindi 6 oppure 8, e la casella centrale della colonna vale pure 2, 3 oppure 4.
Quindi o la casella in alto a sinistra vale 6, e quella in basso a destra vale 8, oppure è al contrario. In entrambi i casi, possiamo osservare che la casella in alto a destra deve essere il divisore comune a 6 ed 8, e quindi deve essere 2.
Usando una notazione simil-sudoku possiamo scrivere:
e la presenza delle coppie 3/4 e 6/8 ci permette di escludere questi 4 valori dalle tre caselle mancanti, che possono quindi solo contenere i valori 1, 5, 7 e 9.
Soluzione del quiz
Osserviamo che già ora, senza completare lo schema, possiamo dire quale valore sarà escluso: nessuna delle tre caselle rimanenti, infatti, può avere valore 9, giacché questo renderebbe impossibili le operazioni necessarie per arrivare rispettivamente a 6 o 8.
La risposta al quiz è quindi: il 9 è la cifra mancante.
Completamento dello schema
Come per il lato superiore e quello destro, possiamo osservare che il lato sinistro e quello inferiore presentano la medesima simmetria: la sottrazione sul lato sinistro è equivalente alla somma sul lato inferiore. Ragionando analogamente a quanto visto per la divisione e la moltiplicazione, possiamo quindi dire che la casella inferiore sinistra prenderà l'addendo comune (in questo caso, 1) e le altre due caselle avranno rispettivamente 5 e 7, a seconda di dove saranno 6 ed 8.
Per completezza, possiamo quindi osservare che lo schema ha due possibili soluzioni, rivelate passando il cursore del mouse sull'immagine seguente (a sinistra e a destra per risultati diversi):
The product logarithm
On Lambert's W function aka the product logarithm
Note: this article makes use of MathML, the standard XML markup for math formulas. Sadly, this is not properly supported on some allegedly ‘modern’ and ‘feature-rich’ browsers. If the formulas don't make sense in your browser, consider reporting the issue to the respective developers and/or switching to a standard-compliant browser.
There is something I learned today that, as a mathematician, I should have probably learned some time ago: the name of the function that solves the equation
where is Napier's constant. I did know that the equation didn't have an elementary solution, but that didn't really help me solving the problem I wanted to solve, which was to find a solution to the equation:
for positive (and too, for what it's worth).
Apparently the non-elementary function we're interested in is called Lambert's or function, or the product logarithm. It is the (multi-valued, in fact) function such that
The name product logarithm comes from the analogy with the (natural) logarithm
and the fact that there's an extra multiplying the exponential on the right hand side of the equation we want to invert (solve for ).
I'm not going to discuss the properties of the function (I mean, what would the Wikipedia link above be here for, otherwise), but I will show how it can be used to solve the equation we're interested in, something that is not shown on Wikipedia and actually had me thinking for a while —mostly about the fact that I was obvioulsy missing something trivial, as it often happens in mathematics.
The general idea, to use the product logarithm in solving an equation, is to bring it in the form
which then leads to
and finally, assuming is invertible, to . Of course, how to get to the form we want is not always obvious.
Let us take for example the equation I wanted to solve:
Making sure appears both as power of and outside of it is trivial: simply multiply by both sides. However, how to make sure we have the same power of muliplying the exponential and as a power is not: the most obvious ideas (divide by both sides, or multiply and divide by the power and then try to juggle things around) don't really take you anywhere.
We'd have to be able to take the square root … wait, that might actually work!1 If we take the square root on both sides, then we get two equations (with the only difference being the sign, so we'll write it as one):
Now we can balance the constants:
and apply the definition of to get
and finally
As mentioned, is a multi-valued function. However, for the specific application we derived the equation for we needed the largest positive value, meaning we need specifically the branch (which is the only one that gives positive value), and since is monotone increasing, we want the solution with the largest argument, that is, ultimately:
a surprisingly elegant formula —for which there is no built-in function
in the C++
standard library.
(Surprisingly, making the latter discovery wasn't enough to reduce my enthusiasm and satisfaction in finding the answer and discovering the function, although it will be a problem I'll have to solve in the next few days —I'm not really looking forward to having to include the GSL or Boost libraries just for this.)
this is actually more or less how it went. ↩
6cm per flag
Note: this article makes use of MathML, the standard XML markup for math formulas. Sadly, this is not properly supported on some allegedly ‘modern’ and ‘feature-rich’ browsers. If the formulas don't make sense in your browser, consider reporting the issue to the respective developers and/or switching to a standard-compliant browser.
Nation, flags and memory card games
One of the “portable” games offered by Flying Tiger is a memory card game with national flags as a theme. The game has cards ( national flags) and I like it not only because it's one of the largest memory games I've seen, if not the largest (about cards or fewer being the norm, for what I can see), but also because of its educational side-effect, as each card features not only the flag, but also (in the “native” language as well as in English) the name of the nation and the name of the capital city.
After the first play, my first consideration was that Mexico was
missing from the flags/
So obviously, my next thought was: how large would such a memory card game be? states (at least) means pairs, or cards. The Flying Tiger cards are squares (with rounded corners) with a side length of mm, and I don't think it's reasonable to go much smaller. In fact, considering the padding between cards that is needed for practical reasons when laying them down for playing, we can assume square tiles with a cm side. That's cm², or m² per tile. such tiles would cover an area of m².
Curiously, is very close , which means that if the pairs were laid out in a square, they would take up a square area with a side of almost exactly cm, or m. Even I would have troubles reaching the cards on the opposite side of the table. Of course, you can't actually do that, because is not a perfect square, so you cannot tile the cards on a square: you would have to either have to do a rectangle (with sides of length m and m respectively), or a square with an empty diagonal.
The issue of placing the memory cards in a pleasing pattern has always fascinated me. My daughter has a -cards game, which I like because the card can be laid out in a square with a hole in the center. My son has a -cards game that can be laid out as a square with missing corners.
In fact, the -cards game that spurred these consideration is a bit annoying because , but the 4 extra cards cannot be placed in a nice symmetric way with good alignment because the sides of the square are even, not odd. Possible placemets are the “wheel” pattern (extending each of the sides with one card), the “shifted” pattern (place each extra card on the middle of each side, spanning the gap between the two central cards of the side), or the “versus” pattern, good when playing 1v1 games, with two extra cards on each of two opposing sides.
Obviously, the next question is: how many nations would you have to include to be able to tile out the cards in a “good” pattern?
- Perfect squares
-
this solution can be achieved with cards, or states (note that without holes or extra cards, the square must be even); problem is, Wikipedia lists states when including the ones with disputed sovereignity; we'd have to cherry-pick some, leaving out six of them;
- The hole
-
an odd square can be made even by taking out a central hole;
-
a possible solution would be , but this would require removing nations from the “uncontroversial” list;
-
the next one would be , which would require states: can we find other territories to add to the states currently listed by Wikipedia?
- Give or take more
-
good patterns can be obtained by removing the 4 corners, or by having 4 extra cards —particularly with an odd square;
-
would require states, which could be assembled from the UN member states, the observer states, plus more (decisions, decisions);
-
would require states: we'd only need to find more than the ones listed by Wikipedia.
-
would require states: still too little;
As it turns out, isn't even that bad: since , a decent tiling can be found with a square, without the center, plus cards centered on each side.
And a long stick to pick the cards on the other side of the table.
But I want more
Revision 6.0 of the Unicode standard introduced Regional Indicator Symbols and their ligatures mapping to «emoji flag sequences». Of the possible combinations, only are considered valid, and if we ignore the «deprecated region sequences», this leaves us with “current” region sequences. We could use this as the basis for our memory card game!
With regions we have cards. What would be a good pattern? We have which actually lends itself to a decent layout: a square, plus cards centered on each side.
How large would such a memory game be? At cm per tile, the main square wold be m wide. The extra cards on each side would make it m wide, which is actually a pretty nice number1 —if unwieldy in practice. Still, if we're basing our choice on what Unicode supports, why not build such a game around computers? You'd need lots of players to make sense of it anyway.
anybody familiar with TEX would recognize as “magnification step 2”, per Knuth's recommendation of scaling sizes by a geometric progression of ratio . ↩
How far can you see?
Note: this article makes use of MathML, the standard XML markup for math formulas. Sadly, this is not properly supported on some allegedly ‘modern’ and ‘feature-rich’ browsers. If the formulas don't make sense in your browser, consider reporting the issue to the respective developers and/or switching to a standard-compliant browser.
Something that everybody (but the staunchiest believer in a Flat Earth) can agree on is that you can see farther by climbing higher. Indeed, getting to a higher place not only helps you see beyond any obstacles that might be in your line of sight, but it actually helps you see farther along the surface of the Earth even if there are no other obstacles than Earth's own curvature: it's the reason why ships have a Crow's nest.
So the obvious question is: how much farther can you see by climbing higher? And people that follow me will surely have already caught on: yes, we're trying to solve the inverse problem to how high do you have to go. In fact, we'll recycle the figure:
Again, we assume we're dealing with a spherical Earth of known radius . This time, however, we assume known (how far high we are), and we want to know , the distance along the geodetic to the farthest point we can see1. Equivalently, we want to know the angle subtending the geodetic, since by definition of radian its amplitude in radians is just , hence . And again, of course, we know that it will be for sure , i.e. .
In fact, from our study on the direct problem we know that the relationship between and can be expressed as
which we can invert rather easily; divide by :
add on both sides:
and take the reciprocals, swapping the two sides:
Given our range of existence for , we can use the inverse function of the cosine, , to get the final formula for
and from this get
As a quick check, for we have , while for growing to infinity we get , as we would expect.
Approximation?
As with the previous problem we would like to devise a formula that can be applied easily under the assumption that the angle is small. The most obvious approach would be to use the first term(s) of the Taylor expansion of the arc cosine, as it's usually done for small-angle approximations. However, Taylor series for these functions are usually developed around 0, whereas we would like to develop them around 1, since a small angle, in our case, leads to an argument of 1 for the arc cosine.
(In fact, we can see that better if we focus on the argument to the arc cosine:
assuming .)
From a mathematical perspective, writing a Taylor expansion of around 1 is not recommended, since some assumptions needed to ensure good convergence behavior for the series cannot be guaranteed (in particular, the fact that 1 is at the boundary of the domain of the arc cosine rather than inside it is a no-no).
Worse, if we opt to disrergard the warning, we find out that we can't even do what we want, since the derivative of the arc cosine is
which isn't even defined for .
We could try leveraging the nice relationship between the arc cosine and the arc secant:
but that barely helps us, since the arc secant's first derivative is
for so that again, for , we would have a degenerate case.
Look ma, no inverse functions!
To work around this conundrum, let's take a step back, to:
and let's use the small-angle approximation for the cosine; we get
or
which gives us a much more approachable
and finally, with an ugly square root,
In fact, there's two horrible things in this formula: the division of a (potentially) very small number by a very large number, and a square root.
For the ratio, we can rewrite things with our friend under the assumption that (sensible, since otherwise , which isn't very interesting):
with large (in fact, potentially tending to ).
As it turns out, ignoring for a moment the factor, the rest has a power series expansion, in the form of a Puiseux series that can be written in an acceptable form in terms of :
Curiously (but unsurprisingly) the first order term is what we get if we just ignore the 1 in the non-expanded formula.
More in general, we shouldn't be surprised by the need to compute with a square root, given that in the other direction we used . But then again, if we have to compute a square root, why even bother doing it for when we can do it directly for ?
So, shall we just stop at
or can we do something more interesting?
(Aside for local manipulations, such as:
of course.)
Another rollback
To find a better formula, let's roll back to
and work on the right-hand side, which we can write as . For small (compared to ) this has a curiously nice expansion:
so that our equation for becomes:
and truncating:
but also
The nice thing about these formulas is that we can rewrite the right-hand side in terms of , giving us
which comes in very handy if we don't stop at , but actually go and compute :
that is interesting since it expresses the distance in terms of “the height, multiplied by something” rather than “the radius of the planet, multiplied by something”.
In fact, in this case we can even try pulling out the 2 from under the square root:
(well, sort of; but at least it has some symmetry to it).
A different approach
Remember that we could also express as the exterior secant, that could be expressed in terms of the tangent function, giving us
Can we try inverting this instead? Let us proceed by expressing the tangent in terms of :
and let's solve for :
We can go for a direct solution now, with
The good news is that, in contrast to the situation with the arc cosine, we would need to go now for the expansion of the arc tangent for small values of the tangent, which is just its argument, giving us the following approximation:
or
If instead we wanted to use small-angle approximation for , giving us , we'd get
or finally
Would you look at that, it's the same formula! That's good news, like the fact that the 2 is already out of the square root (well, at least one of them!) and when we go for :
we have the same nice symmetry that we had with the previous approach —but no outside of the square root.
Going crazy
As an alternative, we could leverage that fact that , so that we are in the range where
which would give us
that we can manipulate to
And assuming (which for us would only be the case if ) we can actually simplify this to
Going for the small-angle approximation (that, as we've seen, gives us the same result regardless if we go first for the arc tangent), we finally get:
and for the distance that we're interested in:
with an amazing similarity to the we had found before. (Of course, for small enough i.e. large enough , the extra term, be it or , doesn't really matter, prevails.)
(As someone might have noticed, this approximation is nothing more than the length of the segment, i.e. the distance from the observation point «as the crow flies» rather than along the geodetic1.)
TL;DR
Pick your poison (as usual, ). The exact formula is:
And several possible approximations:
Oh, and do you know how you can tell that this is the inverse problem? Because the formulas are uglier.
Example
How far can a human being with their eyes 2 meters from the ground (yes, it's a tall human being) see? Let's pretend that is 6,400 km (yes, it's a larger-than-ours planet). We have (how convenient, the 2 simplifies with !), so its square root is marginally (less than 0.2) smaller than 2530 (damn, one would hope that with that nice 64 … but no, we went and had an odd number of zeroes!). We multiply that by the 2 meters of height, and it turns out that the tall man can see over 5 km in the distance, marginally less than 5,060 m. The exact solution would be 5,059.64… m —not bad, not bad at all!
Let's say you managed to climb up to the top of Mt Everest: then would be something less than 1,500, and its square root around 38. If not for the weather and the mountains and everything else, you could se things nearly 340 km away —336 km and counting, which is still just as good as the exact solution, within less than a meter.
It's interesting to see what happens if we push the boundaries of these approximations: assume equal to , i.e. . Then the exact formula gives us , i.e. around . What about the rest?
Formula | Result for i.e. | Quality |
---|---|---|
Not that bad | ||
Could be better | ||
Losing it … | ||
Oh, come on! |
Overall, the situation isn't even that bad: only one formula completely misses the target, and for two out of three of the others the error is relatively small (5% to 10%). Sadly, but unsurprisingly, the worst behaving approximations are the ones expressed for rather than : the extra benefit in their simplification comes more strongly from the “small ” assumptions, and that's why they fail the hardest.
The extra mile
A slightly different question that we might be interested in is: how much more can you see by going to higher ground? In other words, if we have two different heights and (say, ), and the corresponding distances and (for which it will still be , since the arc cosine is nondecreasing), what would be, for example, the ratio compared to the ratio , or the difference compared to the difference?
For the ratio, I'm not aware of a formula, but for the difference there's actually a way to express the difference of the arc cosines, giving us
which is quite the mouthful that offers only a little bit of possibility for simplification, if it can be called that way:
or possibly even
Of course, if we couldn't easily reason (or simplify) the analytical formula for the geodetic distance visible from a certain height, much less so we can hope to do derive any interesting information from the present formula.
A bit of insight on the other hand can be derived by looking at the derivative of as a function of , in particular using the expression for the arc secant.
From
and the arc secant derivative for positive arguments, we get
(interestingly enough, the on the numerator cancels with the coming from the derivative of ). We can work on simplifying this
and finally
(and we can rejoyce in the knowledge that even well-known software tools with strong analytical capbilities have issues trying to integrate that, while we know the result from the previously computed ) that tells us pretty clearly how quickly the rate of growth decreases as increases.
We can still massage the expression to give
or even
which is a bit improper (we're expressing a derivative with respect to using ), but it makes life easier for us if we want to know how small variations in height affect how far you can see.
Let's pretend for example that humans, on average have their eyes about 1.6 m from the ground; then assuming our usual , and the rate of change of with respect to is about 1,414: a centimeter of difference alters your perspective by about 14 m.
Let's linearize this too!
Of course, the expression we have for the derivative isn't that nice either. It would be better if we could approximate that one with something more manageable. And there is, in fact an expansion for the formula assuming small (or large):
and our previous example works perfectly if we stop at the first order, since .
And now that we have it easy, we can see what happens around 2 m of baseline (yes, we can still use the first-order approximation for the derivative): : a centimeter of difference alters your perspective by less than 13 m.
(Notice how moving our baseline up by 40 cm has reduced the effect of fluctuations by over 1 m per cm.)
we're picking the distance along the geodetic because we're looking at this issue as the inverse to the previous problem, but we could also look at this in a slightly different manner, i.e. considering the distance «as the crow flies»: this is in fact different, since we'd be talking about the distance instead of the arc.
Curiously, the formula for the crow's flight interpretation is actually simpler, since we're looking at a leg of the right triangle with hypothenuse and other leg : the crow's flight is then , which is, in fact, one of the approximations we'll find for . ↩ ↩
How high do you have to go?
Note: this article makes use of MathML, the standard XML markup for math formulas. Sadly, this is not properly supported on some allegedly ‘modern’ and ‘feature-rich’ browsers. If the formulas don't make sense in your browser, consider reporting the issue to the respective developers and/or switching to a standard-compliant browser.
You are standing on the beach of a great lake, and realize that the other side is far enough to not be visible. You'd have to get to a higher place. But how much higher?
To simplify things a little bit, let us assume that the Earth is spherical, so that the geodetic (shortest path on the surface) connecting any two points on the surface is the arc of a great circle, and let as denote the radius of this sphere by (which is something less of 6,400 km).
Let us denote by the distance (along the geodetic) between the place where we are and the place we want to see. Let be the distance above the Earth surface our eyes have to be to be able to see due to the curvature of the Earth.
Observe that the center of the earth , the place we want to see and the place we have to be at to see it represent a right triangle with hypothenuse and legs and . We also have , and the arc .
By definition of radian, the angle has amplitude (radians). As a side note, we remark that this whole construction only makes sense if , or (we will discuss this more later).
We also have that , and thus , that is and finally:
or
Approximation
To proceed further, let us assume that is very small compared to , so that the cosine of the angle is very close to 1. We can then make use of the small-angle approximation , which brings us to
or
and rememering that ,
Taking advantage of the fact that is probably easier to compute than for us, we can rewrite the previous expression as
A different formula
Let's go back to
and remember that, with , we can write , so:
or
simplifying to
or still again, dividing numerator and denomitator by ,
For small we can approximate and . This gives us
The only difference is that we're subtracting instead of 1 at the denominator. In fact, in most cases (small ) we can completely disregard the subtracting costant.
A historical note
When computers were not as common as they are today, and time-consuming accurate computations were optimized by the use of look-up tables, several derived trigonometric functions were in common usage. The one we care about is the exterior secant (exsec for short), that represents exactly the ratio of the length we are interested in to the radius of the circle:
The interesting thing about is that you can express it in terms of the tangent simply as
The first terms of the Taylor expansion around 0 for this function are:
as usual with .
If we stop at the first term (the same we would get from our knowledge of the first-order approximation of the tangent), we get an approximation of as
which, while written differently, is in fact the same expression that we've seen already, but with a null constant —as anticipated.
Knowing additional terms allows us to write higher order approximation (if we would ever need it):
If we wanted to express this in terms of the easier-to-compute-and-square , we would get:
Finally, since we know the next term in the series, let's do that (and stop there, since coefficients start becoming very large afterwards): expanding we get
and expressing this in terms of :
TL;DR summary
If you want to know how high you have to go over the surface of a sphere of radius to see a point which is at distance along the surface of the sphere, compute and then your height can be computed as
For higher-order terms, set . The second term then gives us
and if we want to push it further
(The formulas are in Horner's form, which makes for quicker computation and express elegantly the “extra contribution” from each new term.)
An example
As an example, let's say that is about 160 km, which puts at around 40, squared to 1,600, doubled to 3,200. Disregarding the subtracting constant (i.e. using the exsecant expansion), the final result is km. The correct value would be , so our approximation is good within half a meter out of 2km, a relative error of about 2.6%.
Limitations
You can't see further than a quarter circle in each direction, and that's only at infinite distance from the sphere surface; so we must have or . (Using the approximation , which is a slight overestimation, we get the easier condition ).
On the Earth, this would mean distances up to about 10,000km, which means you wouldn't be able to see Cape Town from Reykjavik (over 11,400km), but you could see Hong Kong from Rome (9,280km).
However, the formulas we presented aren't accurate in the whole domain: the error term for the higher order approximation is of order 6, and in the highest order we presented is of order 8, which is very good as long as your angles are less than 1 radian, but actually gets really bad really fast after that.
(Intuitively, you can tell that the formula doesn't work when the distance approaches its maximum because the exact formula diverges, while the ones we have proposed don't.)
To see this in action, consider the Rome to Hong Kong case. We have , squared to , doubled to .
Our lower-order estimate for is 1,522km. Our higher-order estimate for is 1,824km. Our highest-order estimate is 2,160km. The correct answer is 46,711km, over 20 times higher!
So, how far can you push the formula? How large can the angle be before the error you commit is too large? What would be a possible workaround? (Aside from the obvious: use the exact formula.)
The anarchist curve
Note: this article makes use of MathML, the standard XML markup for math formulas. Sadly, this is not properly supported on some allegedly ‘modern’ and ‘feature-rich’ browsers. If the formulas don't make sense in your browser, consider reporting the issue to the respective developers and/or switching to a standard-compliant browser.
As visually discussed here, a set of equations has recently been popping up as graffiti in Belgium. The equations define five functions of one variable, namely:
Plotting the five functions with (the domain of existence of and ) gives the well-known anarchist logo
As mathematicians, we can take this a step further and define an Anarchist curve, by finding the implicit form of the plot of each of the function, and then bringing them together.
In this case, together define the circle, with equation
or rather (fully implicit):
The three functions describe the ‘A’ shape. We first rewrite in a nice form as
and then write the implicit equation for each of them, multiplying the one for by to get rid of the fractions:
We can now multiply all the left hands together, obtaining:
which is the equation for the ‘A’.
If we then multiply this for the left-hand side of the implicit equation for the circle, we have the Anarchist curve
(which, for the record, is currently missing from the list of known curves in the Wolfram Alpha database.)
(There's a few more we could draw similarly, but that's for another time.)
Pi Day
Why March 14 (Einstein's birthday) is the wrong day to celebrate π, the mathematical constant
Note: this article makes use of MathML, the standard XML markup for math formulas. Sadly, this is not properly supported on some allegedly ‘modern’ and ‘feature-rich’ browsers. If the formulas don't make sense in your browser, consider reporting the issue to the respective developers and/or switching to a standard-compliant browser.
Today's date, March 14th, is considered Pi Day, since written in the North American (and a few other places') convention of putting the month before the day, 3/14 can be read as the three most significant digit of
I personally disagree with this choice, mainly for two reasons:
it depends on the decimal representation of ; in hexadecimal, we have so that the correct day would be March 2nd (hexadecimal 24 is decimal 36, and no month is that long);
it depends on the (IMO barbaric) convention of putting the month before the day in numerical date representations, which is far from being international (day/month/year being much more common) or standard (the ISO standard goes for year-month-day).
While the second point is debatable (I'm not aware of ISO standard recommendations for dates without years, which might be used as a resolution), the first point is easily fixed by going for a fractional representation of instead; and a well-known fractional approximation of is given by , that dates as far back as Archimedes at least. Of course, 22/7 is not really possible in the month/day representation, but it makes perfect sense as July 22nd.
Mathematically speaking, July 22nd is preferable to March 14th as Pi Day also because the relative error introduced by approximating as is 0.04%, while the truncation has a relative error of 0.05%, so July 22nd is a better approximation to than March 14th.
The best Pi Day
Arguably, in the year 2015, the “American way” has another benefit: writing the year in the short (two-digit) form, we get an even better approximation of as , and by further appending the time we have an actual instant in which is presented exactly.
The argument fails miserably when taking into account that the time to be considered (9:26:53) would need to be padded by a 0 before “appending” it to the date, and there's always the decimal representation issue, and the fact that the time is sexagesimal …
If the year is to be considered, better dates can be chosen, with the following argument. Consider the continued fraction expansion of :
Side note: the aforementioned is exactly the continued fraction .
Taking only the first three terms, corresponding to the date 3/7/15, we get , which is accurate to 0.0026% (better than the 0.0029% of , even). So, March 7th 2015 (resp. July 3th 2015, depending on date notation) are both better approximations than March 14th (resp. June 22nd) for this year.
But as it happens, we can do better: if we take the first four terms of the continued fraction, we get which is an excellent approximation to , with an error of less than one in ten million (a hint to this is the following huge 292 number).
The best date-fractional approximation of will happen next year, on March 7th in North America, Belize and whichever other country prefers month before day, and on July 3rd in the rest of the world.
Going beyond
As a mathematician, one gets to think: we stop at day, aside from the obvious pi/pie pun? There are so many other interesting numbers to look into!
Tau Day and the manifesto
For example, there are people that believe that is wrong, and should be considered the fundamental constant of the circle, and
The proposed Tau Day (in the manifesto linked above) is thus on June 28th, following the North American tradition. We obviously disagree, and would rather look for a fractional date choice. We thus go and look at the continued fraction representation of ,
And taking the first three terms we get which approximates to 0.5% (May 25th). Sadly, in this case the fractional approximation is worse than the truncation (0.05%), due to the fact that the next continued fraction term , which approximates to 0.04%, is not a good date (although it was on 6/3/2). Is this a hint that is, in fact, better than ?
, , what else?
Similarly, we can go looking for the best date for Napier's number , for which we can choose , accurate to 0.15% and dating to July 19th. For the golden ratio the best candidate is , with an error of 0.21% and dating to either September 11th (oops), or November 9th, depending on convention.
(It should be mentioned that the continued fraction representation of and is not interesting enough to give us something useful for the year.)
For anybody interested in exploring rational approximating dates, I've also cooked up a quick'n'dirty Ruby script that does the finding for you.
Have fun.
I biscotti di Wythoff
Il problema
Note: questo articolo fa uso di MathML, lo standard XML per le formule matematiche. Purtroppo, questo non è supportato correttamente in alcuni browser sedicenti ‘moderni’ o ‘ricchi di funzionalità’. Se le formule non hanno senso nel tuo browser, segnala il problema agli sviluppatori (del browser), o passa ad un browser che supporti questi standard.
Si pone il seguente problema, derivato da questo articolo su G+: determinare la formula esplicita della successione di numeri naturali1 (ovvero della funzione ) che soddisfa le due seguenti condizioni:
- è strettamente crescente;
- l'-esimo elemento non appartenente all'immagine di è .
Vediamo innanzi tutto di capire bene il secondo punto, cominciando con l'osservare che l'unica successione strettamente crescente che ha come immagine l'intero è la successione . Per dimostrarlo, prendiamo una qualunque (altra) successione strettamente crescente e sia il primo indice per cui ; risulterà anzi necessariamente2 , ed avremo quini e , da cui risulta che non è immagine di alcun numero naturale secondo .
Ora, se ogni successione strettamente crescente non banale ha come immagine un sottoinsieme stretto di , possiamo considerare il complementare della sua immagine in , , che sarà un insieme non vuoto e quindi (in quanto sottoinsieme di ) totalmente ordinato e numerabile; in soldoni, in tale complementare possiamo considerare il primo elemento (inteso come il minimo), il secondo elemento (il più piccolo elemento di maggiore del primo elemento), etc.
La seconda condizione su ci dice quindi che il primo elemento di è esattamente , che il secondo elemento di è , etc. Volendo, la cosa si può riformulare dicendo che è l'immagine della successione .
La domanda a questo punto è se effettivamente esiste (almeno) una successione che soddisfi i requisiti prescritti, e (in caso affermativo) se tale successione sia unica. Vi sono vari approcci per trovare risposta alla domanda, ed uno dei più immediati è sicuramente quello costruttivo: dimostriamo che esiste ed è unica determinando i valori di per ogni e mostrando come essi siano univocamente determinati.
Nel procedimento, ci serviremo di due ulteriori osservazioni. La prima è che in una successione strettamente crescente di numeri naturali si ha sempre3 ; la seconda è che nel complementare del codominio di non possono esservi mai due interi consecutivi (infatti, se , avremo per un opportuno , e quindi , essendo nell'immagine di , non starà in ).
Costruiamo dunque la nostra , e vedremo come nel farlo costruiremo di necessità anche (ovvero, come visto, equivalentemente, la successione dei valori non assunti da ).
Abbiamo innanzi tutto che . Se così non fosse, infatti, sarebbe ; di più, 1 sarebbe il primo elemento di (non possono infatti esservi in numeri più piccoli), e quindi dovrebbe essere (per la seconda proprietà di ) , da cui risulterebbe (dove le due disuguaglianze sono ottenute dalla precedente osservazione su valori e indici delle successioni crescenti).
Da segue che e quindi : il primo elemento di è 2, e quindi (per la crescenza di abbiamo , ma ).
Possiamo anzi dire che : se infatti fosse , dalla crescenza di seguirebbe che , che in congiunzione con il fatto che ci direbbe che 3 non è immagine di alcun elemento, e quindi , ma ciò è impossibile, essendo e non potendosi avere, come osservato, numeri consecutivi in .
Quindi , da cui segue che (stretta crescenza di ), e quindi il secondo elemento di sarà e quindi , per cui e, per complementareità ; sarà quindi4 , da cui infine .
Così procedendo possiamo calcolare manualmente ciascun valore di e di , ottenendo qualcosa come la seguente (l'idea, in soldoni, è di ‘riempire’ i valori di finché possibile, e quindi quelli di secondo la formula della seconda condizione):
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F | 1 | 3 | 4 | 6 | 8 | 9 | 11 | 12 | 14 | 16 | 17 | 19 | 21 | 22 | 24 |
h | 2 | 5 | 7 | 10 | 13 | 15 | 18 | 20 | 23 | 26 | 28 | 31 | 34 | 36 | 39 |
Se questa tecnica costruttiva ci può servire come prova dell'esistenza (ed unicità) della (e della relativa ), non sembra dirci molto sulla sua forma chiusa.
Possiamo però studiare i primi termini delle due successioni ed e notare ad esempio che —almeno nella sequenza iniziale— esibiscono questo tipo di comportamento:
- per , valori successivi differiscono tra loro di 1 o 2 (più spesso 2 che 1) unità;
- per , invece, i ‘passi’ tra un valore e il successivo sono di 2 o 3 (più spesso 3 che 2) unità.
Le successioni di Beatty
Il comportamento in questione è tipico delle successioni di Beatty, una classe di successioni il cui termine generico ha la forma per un fissato numero reale positivo irrazionale (il simbolo rappresenta la funzione ‘parte intera’). Se , la successione è strettamente crescente, e la differenza tra due termini consecutivi è sempre compresa tra e .
Una interessante proprietà delle successioni di Beatty è che se e sono irrazionali positivi tali che , allora le rispettive successioni di Beatty partizionano i numeri naturali (ovvero, sono complementari e la loro unione è data dall'intero insieme ).
Vi sono forti indizi che le nostre successioni e siano successioni di Beatty complementari. Per risolvere il nostro problema basterebbe quindi trovare una coppia di numeri irrazionali che soddisfino e che generino rispettivamente soddisfacenti la famosa seconda proprietà, scrivibile come .
Per trovare i generatori in questione cominciamo con l'osservare che, secondo quanto osservato finora, il generatore di dovrebbe essere compreso tra 1 e 2, mentre il generatore di sarebbe compreso tra 2 e 3. Da e seguirebbe anzi che (da cui si potrebbe già intuire chi possa essere , essendovi un famosissimo numero irrazionale proprio in quell'intervallo —ma noi cercheremo di essere più formali).
Partiamo quindi dalla famosa seconda proprietà, che scritta in forma esplicita nel caso di successioni di Beatty ci dice che per ogni positivo risulta , ovvero , e quindi , da cui ancora .
Essendo irrazionale e positivo possiamo scrivere , e quindi spezzare l'ultima catena di diseguaglianze in e . Dividendo per ovunque e portando un a minorare nella prima diseguaglianza otteniamo infine la relazione vera per ogni , da cui in definitiva e quindi .
Abbiamo quindi che devono soddisfare e . Sostituendo nella prima abbiamo o , la cui unica soluzione positiva è la famosa sezione aurea .
In definitiva, abbiamo dimostrato che se una coppia di successioni di Beatty complementari soddisfa le condizioni richieste, allora dovrebbe avere come generatori e . Per concludere che le successioni di Beatty con questi generatori sono effettivamente quelle che cercavamo rimane ora da verificare che esse soddisfano i due criteri5.
La crescenza di è immediata conseguenza del fatto che il generatore è maggiore di 1, quindi rimane da provare la famosa seconda condizione, che vista la complementareità delle successioni possiamo esprimere così: dimostrare che per ogni risulta .
Osserviamo innanzi tutto che, posto , risulta . Infatti, essendo , possiamo scrivere e ; sottraendo membro a membro otteniamo .
Abbiamo quindi che , e per provare la nostra tesi basta dimostrare che , eguaglianza che possiamo riscrivere , ovvero . Essendo la nostra tesi si semplifica nel dover dimostrare che o equivalentemente6 che possiamo riscrivere .
La diseguaglianza di destra è immediata essendo irrazionale, rimane quindi da provare che . Supponiamo per assurdo che sia vero il contrario, ovvero , da cui seguirebbe ; ma , quindi , e pertanto , che implica , ovvero , assurdo7.
Abbiamo così completato la nostra dimostrazione e verificato che le successioni di Beatty con generatori e sono effettivamente quelle cercate.
Le successioni di Wythoff
Queste due successioni sono meglio note come la successione inferiore () e superiore () di Wythoff. Queste due successioni sono state scoperte appunto dall'eponimo matematico nello studiare un famoso problema di teoria dei giochi che prende vari nomi (problema di Wythoff, il gioco delle scatole dei biscotti, etc).
Il gioco ha la seguente forma: ci sono due scatole di biscotti, e due giocatori si alternano scegliendo quanti biscotti vogliono da una sola delle due scatole, oppure lo stesso numero di biscotti da entrambe le scatole. Vince il giocatore che prende l'ultimo biscotto.
È evidente che se una delle due scatole è vuota, o se ambo le scatole hanno lo stesso numero di biscotti, il primo giocatore vince. Il gioco si fa più interessante se entrambe le scatole sono piene ed il numero di biscotti non è equamente distribuito.
Ad esempio, se le scatole hanno rispettivamente 1 biscotto e 2 biscotti, è evidente che il secondo giocatore vincerà, qualunque sia la scelta fatta dal primo giocatore. Ovviamente, partendo da un'altra configurazione, un giocatore dovrebbe quindi cercare di arrivare alla distribuzione 1/2 per aver garantita la vittoria. La domanda è: quali altre configurazioni hanno tale proprietà? Ovvero, quali coppie di numeri sono tali che, qualunque sia la mossa del primo giocatore, il secondo si può garantire la vittoria?
Con un poco di calcoli si scopre che le coppie (ordinate, con ) che garantiscono la vittoria al giocatore che le raggiunge sono
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a | 1 | 3 | 4 | 6 | 8 | 9 | 11 | 12 | 14 | 16 | 17 | 19 | 21 | 22 | 24 |
b | 2 | 5 | 7 | 10 | 13 | 15 | 18 | 20 | 23 | 26 | 28 | 31 | 34 | 36 | 39 |
e se la tabella vi ricorda qualcosa è perché i valori sono esattamente gli stessi visti nella precedente tabella: le coppie sono le configurazioni vincenti nel problema di Wythoff.
Una nota finale
Concludiamo questa nostra rapida escursione sulla questione osservando che ha una forma ben più semplice della già vista , e questa è . La cosa, chiaramente visibile dai valori in tabella e facilmente dimostrabile8, ci permette di leggere le successioni di Wythoff in questo modo: ogni coppia è la coppia vincente in cui la differenza di contenuto tra le due scatole di biscotti è pari ad .
Questo, combinato con la proprietà di partizionamento di di cui godono le due successioni (ogni intero sta in una ed una sola delle successioni, e quindi anche in una ed una sola coppia) e con il fatto che il gioco è puramente ‘sottrattivo’ (da una configurazione all'altra si passa solo diminuendo uno o entrambi dei contenuti) è sufficiente a definire la strategia vincente, che viene lasciata come esercizio per il lettore.
si intende qui l'insieme dei numeri interi strettamente positivi. ↩ ↩
l'affermazione è ovvia nel caso , poiché non vi sono numeri naturali1 minori di 1; se invece , posto e supponiamo per assurdo : essendo per la scelta di , avremmo, , e quindi con , che viola la stretta crescenza di . ↩
si dimostra ad esempio per induzione. Come base induttiva abbiamo che . Supponiamo ora che e dimostriamo che da questo segue : per la stretta crescenza della successione abbiamo , ovvero , e non essendovi numeri naturali tra ed questo equivale ad . ↩
se fosse , per la crescenza di si avrebbe , da cui, sapendo che ed , seguirebbe che . ↩
tale verifica è necessaria perché l'ipotesi da noi fatta (ovvero che ed siano successioni di Beatty complementari) potrebbe condurre ad un assurdo, da cui seguirebbe che in realtà esse non sono successioni di Beatty. ↩
si ha se e solo se , da applicare nel nostro caso con ↩
osserviamo che per un arbitrario numero reale positivo la diseguaglianza non è in genere verificata, come si vede prendendo ad esempio per un fissato naturale ed osservando che per ogni si ha ; la diseguaglianza è però verificata per tutti i numeri reali . ↩
essendo nota la forma esplicita delle due successioni, ci basta provare che ; partiamo quindi dall'equazione che definisce la sezione aurea: da segue, per ogni , e quindi anche , o equivalentemente , ciò che volevamo dimostrare. ↩
Matematica aliena/1: numerali
Se è vero che la matematica è concettualmente un linguaggio ‘universale’, lo stesso non può dirsi dei sistemi di numerazione. Ad esempio, siamo ormai abituati a considerare ‘universale’ il sistema posizionale basato sulle cosiddette cifre arabe, ma abbiamo dimestichezza anche con il ben diverso sistema simbolico in uso nell'antica Roma. E questi sono solo due dei sistemi che sul nostro pianeta sono (o sono stati) usati.
Supponiamo di entrare in contatto con una civiltà aliena, magari ormai estinta, ma che ci abbia lasciato documenti ed iscrizioni su cui poterla studiare. Anche ammesso che, per la sua universalità, la loro matematica sia ‘isomorfa’ alla nostra, possiamo essere sicuri di riuscire a non dico leggere, ma almeno identificare la loro rappresentazione della stessa?
Propongo un esercizio di riscaldamento. Supponiamo di sapere che gli alieni scrivano, come noi, da sinistra verso destra e poi dall'alto verso il basso. Supponiamo anche di aver identificato gli otto simboli con cui vengono scritti i numeri, e che trascriveremo con le prime otto lettere dell'alfabeto latino: A B C D E F G H.
Supponiamo inoltre che nei documenti che ci sono pervenuti compaia un solo simbolo di operazione, che trascriveremo con ˆ. Supponiamo che nei frammenti arrivati fino a noi, gli esempi più semplici che si riescano a trovare siano questi:
- AA ˆ AA = BB
- AA ˆ BB = CC
- HA ˆ HA = HAB
Ovviamente, si trovano esempi più complicati, come CCFDAC ˆ FEEGHC = AADDBAF.
Siamo in grado di cominciare a interpretare i numeri (e capire di quale operazione si tratta) semplicemente da questo?
Spoiler Alert!
Il sistema numerico presentato è biiettivo in base 8, con alcune modifiche. Come nei sistemi di numerazione biiettiva, le otto cifre rappresentano i numeri da 1 a 8, e non si fa quindi uso dello zero. In aggiunta, gli alieni scrivono i numeri nella direzione di scrittura, partendo dalle cifre meno significative, e chiudendo con la cifra data dal numero modulo 7.
Vediamo alcune ragioni perché un siffatto sistema ha senso.
L'uso della base 8 invece che della base 10 è facilmente giustificabile, ad esempio, supponendo che gli alieni abbiano solo 8 dita invece delle nostre 10.
Scrivere le cifre meno significative prima di quelle più significative semplifica la scrittura in riga dei risultati delle operazioni (non è necessario sapere in anticipo quanto saranno lunghi e lasciare spazio a sufficienza).
L'uso della cifra supplementare facilita la determinazione di eventuali errori. Nel nostro usuale sistema numerale, questo punto si applicherebbe aggiungendo alla normale sequenza di cifre il valore modulo 9 dello stesso numero.
Il valore della cifra di controllo non è nemmeno difficile da calcolare, ricordando la buona vecchia ‘prova del nove’ che un tempo si insegnava alle elementari: basta sommare le cifre del numero, ripetutamente, fino ad ottenere una sola cifra. Volendo separare con una barra verticale il numero dalla cifra di controllo, scriveremmo 12|3 o 15|6, o 125678|2 (adottando, a parte la base, il sistema alieno, avremmo invece 213, 516, 8765212 rispettivamente).
L'unico inconveniente (come ai tempi della prova del 9) è che bisogna ricordarsi che 0 e 9, come cifre di controllo, sono equivalenti. È qui che interviene infine l'utilità del sistema biiettivo, che rende univoca la rappresentazione, mancando di una cifra per indicare lo 0.
Risolvere un quizzino della domenica (1)
Il .mau. propone per oggi un quizzino della domenica dal seguente testo:
In un articolo apparso il secolo scorso sul bollettino parrocchiale di Villar Perosa, si racconta che il senatore Giovanni Agnelli in persona premiò un contadino che aveva nove figli per una curiosa proprietà aritmetica. Tutti i figli erano infatti nati allo stesso numero di anni di distanza l'uno dal successivo; ma soprattutto la somma dei quadrati delle loro età in quell'anno era pari al quadrato dell'età del contadino. Quali erano queste età?
Vediamo di risolverlo.
Ratio e definizioni
Note: questo articolo fa uso di MathML, lo standard XML per le formule matematiche. Purtroppo, questo non è supportato correttamente in alcuni browser sedicenti ‘moderni’ o ‘ricchi di funzionalità’. Se le formule non hanno senso nel tuo browser, segnala il problema agli sviluppatori (del browser), o passa ad un browser che supporti questi standard.
Sia l'età del figlio minore e sia la cadenza con cui sono nati i figli: avremo allora che il penultimo ha anni, e così via fino al maggiorenne, di età anni. La somma dei quadrati di queste età, dopo un po' di semplice aritmetica, si può scrivere così:
ed il problema si riduce quindi a trovare interi tali che
con alcune condizioni al contorno, del tipo , , etc.
Procedimento
In generale, trovare interi tali che loro combinazioni algebriche diano quadrati perfetti non è banale, ma nel nostro caso possiamo aiutarci osservando che l'espressione che vorremmo ridurre ad un quadrato perfetto è molto simile all'espansione del quadrato di una somma, il cui primo quadrato è , il doppio prodotto è ‘vicino’ a ed il secondo quadrato è ‘vicino’ a .
L'idea è quindi quella di trasformare questa espressione nel quadrato di una somma di interi, ‘trasformando’ opportunamente il secondo e il terzo addendo senza ovviamente alterare il valore numerico dell'espressione stessa.
A tal fine, osserviamo che 204 (il coefficiente numerico del secondo quadrato) non è un quadrato perfetto, ma è compreso tra e : è quindi legittimo sperare che l'espressione si possa trasformare in un quadrato con uno di questi due coefficienti. A tal fine, calcoliamo:
e
ottenendo rispettivamente
e
termini che noi vogliamo siano nulli, nell'ambito sempre delle condizioni enunciate alla fine del precedente paragrafo. Questo comporta in particolare che il secondo caso non ammette soluzione, poiché annullarlo ci dà come condizioni o (impossibile) o , che ammette soluzioni solo se e hanno segno opposto (o sono entrambi nulli), mentre noi vogliamo che sia che siano strettamente positivi.
Ne consegue che l'espressione da noi cercata è la prima, che si annulla per . Sostituendo quindi ad esempio nell'espressione per otteniamo
e quindi .
Sappiamo anche che deve essere multiplo di 3, poiché altrimenti non sarebbe intero, ed abbiamo quindi almeno due soluzioni possibili:
Spoiler Alert!
- per si ha e ;
- per si ha e ;
e ci fermiamo qui perché per il successivo valore avremmo e non siamo più ai tempi dei matusalemmi. È probabile che come soluzione si debba in realtà prendere la prima, perché un contadino 72enne con un figlio di 4 anni è poco credibile, benché non impossibile.
Postilla
Il testo del problema è stato emendato per rendere univoca la soluzione aggiungendo questa nota:
mentre la somma degli anni dei figli era uguale al triplo degli anni della moglie
e intendendo che la moglie del contadino sia anche la madre di tutti i suoi figli, questo porta la moglie ad avere un'età che soddisfi
da cui, semplificando e introducendo le nostre condizioni su e ,
che per ci restituisce rispettivamente; questo permette di scartare la soluzione essendo praticamente impossibile che una donna abbia un figlio ad 80 anni. È però interessante notare che con questa condizione la donna aveva 16 anni quando ha partorito il primo figlio.
Il problema dei portatori di pizza
Tre coppie decidono di prendere per cena pizza da asporto. Arrivati alla pizzeria, ordinano rispettivamente due margherite senza olio, una caprese e una bresaola, una caprese e una vulcano. Quando le pizze sono pronte, la commessa le fornisce impilate in ordine ignoto. Ciascuno dei tre cavalieri prende due delle pizze per distribuire equamente il carico durante il trasporto verso casa.
Supponendo che l'ordine in cui le pizze sono state distribuite sia perfettamente casuale, qual è la probabilità che ciascun cavaliere trasporti le due pizze ordinate dalla rispettiva coppia?
Soluzione
Nel seguito, indicheremo con B la pizza Bresaola, con C la Caprese, con M la Margherita (senza olio) e con V la Vulcano. Il pizzaiolo fornisce le pizze in un ordine casuale (ad esempio MCCBMV), che per comodità i tre cavalieri prenderanno in ordine (nell'esempio, il primo prenderà MC, il secondo CB, il terzo MV).
La probabilità che i cavalieri portino il paio giusto di pizze è quindi il numero delle permutazioni che assegnano a ciascun cavaliere le pizze giuste diviso il numero totale di permutazioni (distinte) possibili.
Le permutazioni valide sono quattro, per le seguenti condizioni: il primo cavaliere deve prendere le margherite (una sola possibilità: MM), il secondo cavaliere deve prende la bresaola e una caprese (due possibilità: BC, CB), il terzo cavaliere prende la vulcano e una caprese (ancora due possibilità: VC, CV). Le permutazioni in questione possono anche essere enumerate per esteso:
- MM BC VC
- MM CB VC
- MM BC CV
- MM CB CV
Quante sono invece le permutazioni distinte possibili1? Se le pizze fossero tutte diverse, si avrebbero 6! = 720 permutazioni, ma poiché vi sono due margherite, e tutte le permutazioni in cui le due margherite si scambiano di posto sono equivalenti, il numero di permutazioni va dimezzato; analogamente per le capresi, ottenendo infine 720/4 = 180 permutazioni distinte.
La probabilità che ciascun cavaliere porti le pizze della propria coppia è quindi di 4/180, ovvero 2/90 o 1/45, il 2.(2)%.
{ Costruire un albero delle 180 combinazioni distinte. }
si ringrazia il proponente del gioco per aver anche determinato il modo più rapido per calcolare le permutazioni distinte. ↩
Lavorare per, lavorare con
Versione tl;dr (e conclusioni di tutto il discorso): lavorare per qualcuno e lavorare con qualcuno sono due tipi di relazioni indipendenti: si può quindi lavorare per qualcuno, ma non con loro; si può lavorare per qualcuno e con loro; si può lavorare con qualcuno, ma non per loro. Sono quindi due insiemi con intersezione non vuota.
Motivazione: una delle tipiche discussioni inutili che si fanno per passare tempo in palestra.
Note: questo articolo fa uso di MathML, lo standard XML per le formule matematiche. Purtroppo, questo non è supportato correttamente in alcuni browser sedicenti ‘moderni’ o ‘ricchi di funzionalità’. Se le formule non hanno senso nel tuo browser, segnala il problema agli sviluppatori (del browser), o passa ad un browser che supporti questi standard.
Per una comprensione più dettagliata del discorso, cominciamo con un breve ripasso di teoria degli insiemi (solo quello che serve).
Sia un insieme. Una relazione (binaria) tra gli elementi di è un sottoinsieme del prodotto cartesiano di con sé stesso. Se è una relazione ed , diremo che è in relazione con (secondo ) se , ed in tal caso scriveremo per semplicità .
Su uno stesso insieme si possono definire più relazioni. Alcuni tipi di relazione sono particolarmente diffusi e/o importanti. Tra questi ricordiamo:
- relazioni d'ordine
-
una relazione si dice d'ordine se essa gode delle proprietà riflessiva ( per ogni ), antisimmetrica (se e allora ) e transitiva (se e allora ); un esempio classico di relazione d'ordine è la relazione di minore o uguale definita sui numeri (naturali, razionali, reali);
- relazioni d'ordine stretto
-
una relazione si dice d'ordine stretto se essa gode delle proprietà irriflessiva ( per nessun ), asimmetrica (se allora non può aversi ) e transitiva (se e allora ); un esempio classico di relazione d'ordine stretto è la relazione di minore definita sui numeri (naturali, razionali, reali);
- relazioni di equivalenza
-
una relazione si dice di equivalenza se essa gode delle proprietà riflessiva ( per ogni ), simmetrica (se allora ) e transitiva (se e allora ); un esempio classico di relazione d'ordine è la relazione di similitudine definita sull'insieme dei triangoli del piano.
Veniamo ora alla nostra questione: prendiamo l'insieme delle persone che lavorano, e definiamo su questo insieme due relazioni.
La prima relazione, che indicheremo con , è la relazione del ‘lavorare con’. Se sono persone ed lavora con , scriveremo . Questa relazione gode sicuramente della proprietà riflessiva (nel senso che ciascuno lavora con sé stesso) e di quella simmetrica (se uno lavoro con un altro, è anche vero che l'altro lavora con l'uno); se quando uno lavora con un altro e questo lavori con una terza persona è sempre vero che il primo lavori con il terzo, allora sarà anche vera la proprietà transitiva e quindi la relazione potrà essere considerata una relazione d'equivalenza.
La seconda relazione, che indicheremo con , è la relazione del ‘lavorare per’. Se lavora per , scriveremo . A seconda se si ammette che si lavori per sé stessi o meno, la relazione è abbastanza ovviamente una relazione di ordine semplice o in senso stretto.
Siccome si ha , possiamo calcolare l'intersezione delle due relazioni (ovvero lavorare per e con qualcuno) e questa sarà ancora una relazione tra gli elementi di (). Se essa è vuota, non vuota, uguale alla diagonale (ovvero se ogni elemento è in relazione ‘per e con’ solo con sé stesso) o altro dipende ovviamente dalle relazioni e .
Facciamo un esempio. Sia dato un insieme i cui elementi sono e supponiamo che le relazioni e siano così definite:
- lavora con e con ; considerando la simmetria e riflessività di , avremo le relazioni (in questo caso stiamo supponendo che non valga la proprietà transitiva, ed in particolare che anche se lavora con e con , non lavora con )
- e lavorano per , e lavora anche per ; senza considerare la riflessività per , avremo , , (questa relazione è una relazione d'ordine in senso stretto)
In tal caso, la relazione lavorare per e con lega soltanto e essendo l'unico elemento dell'intersezione (relazioni e )
Se nella relazione si avesse pure , gli elementi di sarebbero e .
Se invece in considerassimo anche la riflessività (cioè che ciascuno lavora per sé stesso), allora a lavorare per e con qualcuno saranno: ciascuno con sé stesso, per e con : .