Math/Probability question from Sagan/Contact (Pi)

Well, for base-pi, let’s assume we have a symbol set of [0, 1, 2, 3], so…

0 = 0
1 = 1
2 = 2
3 = 3
10 = pi
11 = pi+1 = 4.14159…
12 = pi+2 = 5.14159…
13 = pi+3 = 6.14159…
20 = 2 x pi

It feels wrong, I admit, because the steps between the values are not even, but this will happen in any base that’s not a whole number, if we want “1” to mean 1. We could declare some arbitrary iteration to make the steps equal, like pi/4…

0 = 0
1 = pi/4
2 = pi/2
3 = 3pi/4
10 = pi

I suppose in this case, the “base” is technically the denonimator. We could as easily use pi/5.

Now, try coming back with a counting scheme where the denominator is not a whole number, as in pi/e …

Me like counting scheme.

Seriously, though, you wouldn’t “count to pi” in a base-pi numbering system any more than you would try to count to pi in base 10. If you’re counting in integers, you count in integers - it’s just that any integer above 3 in base pi is going to be written as a “decimal” (pimal?) expansion:

1

2

3

10.2201… (which means, of course, “(1 x pi) + (0 x 1) + (2 / pi) + (2 / pi^2) + (0 / pi^3) + (1 / pi^4) + …”)

11.2201…

12.2201…

20.2021…

21.2021…

22.2021…

30.1212… (or this could be written as 100.1212…, given that 10[sub]10[/sub] is greater than pi^3 (or 100[sub]π[/sub])
See more discussion on the XKCD forums here: http://forums.xkcd.com/viewtopic.php?f=17&t=36351

Too late to edit, but I meant of course that 10 in base 10 is greater than pi SQUARED, not cubed.

Doh! Colophan, you are absolutely right. I am not sure why I was thinking “count to pi” in base pi would be particularly difficult. Counting to 10 in base 10 is nice because 10 is an integer and as you said, when we talk about “counting to” something we mean integers.

And so, counting in base pi upwards isn’t nearly as bad as I thought it was. Thank you for making it so simple!

Egads. When come back, bring pi.

Actually, it’s not entirely inaccurate. I think part of the confusion was Ellie’s “father’s” enigmatic way of encouraging her to take a look at pi. But speaking vaguely and metaphorically. What he told her she might find (eleven dimensions, base ten, etc.) was in fact not what she found… Quoting from the novel: (emphasis mine)“Your mathematicians have made an effort to calculate it out to…”

Again she felt the tingle.

“… none of you seem to know… Let’s say the ten-billionth place. You won’t be surprised to bear that other mathematicians have gone further. Well, eventually–let’s say it’s in the ten- to-the-twentieth-power place–something happens. The randomly varying digits disappear, and for an unbelievably long time there’s nothing but ones and zeros.”

Idly, he was tracing a circle out on the sand with his toe. She paused a heartbeat before replying.

“And the zeros and ones finally stop? You get back to a random sequence of digits?” Seeing a faint sign of encouragement from him, she raced on.

“And the number of zeros and ones? Is it a product of prime numbers?”

“**Yes, eleven of them.”
**
“You’re telling me there’s a message in eleven dimensions hidden deep inside the number pi? Someone in the universe communicates by… mathematics? But… help me, I’m really having trouble understanding you. Mathematics isn’t arbitrary. I mean pi has to have the same value everywhere. How can you hide a message inside pi? It’s built into the fabric of the universe.”

“Exactly.” She stared at him.

“It’s even better than that,” he continued. “Let’s assume that only in base-ten arithmetic does the sequence of zeros and ones show up, although you’d recognize that something funny’s going on in any other arithmetic. Let’s also assume that the beings who first made this discovery had ten fingers. You see how it looks? It’s as if pi has been waiting for billions of years for ten-fingered mathematicians with fast computers to come along. You see, the Message was kind of addressed to us.”

“But this is just a metaphor, right? It’s not really pi and the ten to the twentieth place? You don’t actually have ten fingers.”

“Not really.” He smiled at her again. “Well, for heaven’s sake, what does the Message say?” He paused for a moment, raised an index finger, and then pointed to the door.
For those who haven’t read the novel, the tingling Ellie feels in her brain is where the alien is raping her mind. :smiley:

I’ve always felt that this was a particularly poignant approach to the subject.

Is pi special in this regard? Is this true for any irrational number? Could the same thing be said for sqrt(2) or sqrt(3)?

So, if I understand this correctly, are all transcendental numbers irrational but not all irrationals are transcendental? (This EE never really got into number theory. I see an RLC circuit—essentially a differential equation—and I throw Laplace transforms at it until it submits. :)) Because a picture is worth a thousand words I went looking for a venn diagram and found this. Accurate?

Can you actually have a meaningful number system with a base of less than 1?

In base n, the value of each position leftwards from the “decimal” point is 1, n, n[sup]2[/sup], n[sup]3[/sup], and so on, e.g.

123 in base 10 = (1 x 10[sup]2[/sup]) + (2 x 10) + (3 x 1) = 123[sub]10[/sub]

123 in base 6 = (1 x 6[sup]2[/sup]) + (2 x 6) + (3 x 1) = 51[sub]10[/sub]

123 in base π = (1 x π[sup]2[/sup]) + (2 x π) + (3 x 1) ≈ 19.153[sub]10[/sub]

How do you extend this to base ½? The value of each position would decrease as you moved leftwards, and increase as you moved rightwards:



 X    X    X    X    X    X    .     X       X       X

½^5  ½^4  ½^3  ½^2   ½    1        1/½   1/(½^2)  1/(½^3)...


Seems to me that is basically like a mirror image of binary, with numbers greater than 1 being written to the right of the “decimal point”.

Based on the above, you would write 9 (base 10) as 1.001 (base ½). Am I right?

I.e., take the binary number, reverse the bits and stick a point after the initial bit.

12[sub]10[/sub] = 0.011[sub]½[/sub]. :slight_smile:

You can’t. I can’t. Mathematicians are a different breed of cat. :slight_smile:

There are representations of the integers which are quite useful in practical coding which are often called base-φ (where φ = 1.61803…). The place values are the Fibonacci numbers 1, 2, 3, 5, 8, 13 rather than, say, the 1, 2, 4, 8, 16, 32 of binary.

IIRC, it can be proven that almost all numbers are “normal.” But the proof of normalcy for any specific irrational number has only been completed, AFAIK, for deliberately constructed numbers.

Could you elaborate on this? Wouldn’t the place values be 1, φ, φ[sup]2[/sup], φ[sup]3[/sup], φ[sup]4[/sup], etc (or, in base 10, approximately 1, 1.618, 2.618, 4.236, 6.854, etc)? Wikipedia suggests that is the case.

So, for instance, 3 (in base 10) can be written as 100.01 in base φ, because φ[sup]2[/sup] + φ[sup]-2[/sup] = 3. (Something I never knew about the golden ratio: it seems that all integers can be written as sums of powers of φ :cool: )

Well, that’s what I thought at first, but working through it it turns out that base ½ is just binary turned on its head. See last post on page 1 (I hate that!)

[quote=Bryan Ekers]
And I was actually wrong, before. In base ½, the value of ½ is represented by 10, of course. Silly mistake on my part. Chew on this, though: in that base 11 represents the value of 1½]
And 2½ (in base 10) would be represented by 11.1.]

So how would you write ⅓ in base ½? Let me see… from playing with my calculator it seems one third is the limit of the sum 1/2[sup]2[/sup] + 1/2[sup]4[/sup] + 1/2[sup]6[/sup] + 1/2[sup]8[/sup] + 1/2[sup]10[/sup] + …

So in base ½ that would be:

…10101010100, with an infinite number of digits before the point. Which makes sense, as in binary it is 0.0101010101…

I wonder if that Wikipedia article is just useless trivia. It links to an article on Fibonacci_coding, which may not be perfectly helpful either. Here’s a simple explanation:

1 – 1
10 – 2
100 – 3
101 – 4
1000 – 5
1001 – 6
1010 – 7
10000 – 8
10001 – 9
10010 – 10
10100 – 11
10101 – 12
100000 – 13
et cetera

Note that the representation of positive integers here uses, just as I said, place values of 1, 2, 3, 5, 8, 13, … The elegant and valuable property is that two or more consecutive 1’s never occur.

The simplest way to apply this as an instantaneous code (e.g. for a data compression application) is to reverse the bits and append a 1. 11[sub]10[/sub], for example, becomes 001011 and 13[sub]10[/sub] becomes 0000011. (The ‘11’ thus serves as an end-of-token signal for the decoder.)

That makes sense, septimus, but Fibonacci coding is not base phi, is it?

It is in the limit. :wink:

AFAIK, the “true” base-φ coding described by the Wikipedia article has no practical use, so I’m happy to call Fibonacci coding “base-φ.”

I also refer to the “stone-age” representation, in which 7 is 1111111, as “unary” (or “base-1”). This terminology is also scoffed at by some.

Thanks so very much Clothahump. You found exactly what that Wiki author was looking at, except they missed the last two lines of what you quoted.

Alternatively, you could write 1/3 in base 1/2 as 1.1010101010…[10 repeating forever]…, with finitely many digits before the decimal point and infinitely many digits after, in the usual fashion.

This is because, letting x = 1.1010101010…, we have that x * 100 = 110.10101010… = x - 1 + 110, so x = (110 - 1)/(100 - 1). In base 1/2, this evaluates to 1/3.

In fact, every rational number, positive and negative, has a base 1/2 expansion of this sort! For example, -1 = 1.111111… in base 1/2 (as, letting y = 1.1111…, we have that y * 10 = y + 10, so y = 10/(10 - 1).

(Granted, the sequences 1 + 2[sup]1[/sup] + 2[sup]3[/sup] + 2[sup]5[/sup] + 2[sup]7[/sup] + …, 1 + 2[sup]1[/sup] + 2[sup]2[/sup] + 2[sup]3[/sup] + 2[sup]4[/sup] + …, etc., don’t converge in the standard sense, but that’s not really a problem. If you steadfastly care about such things, we can always appeal to the 2-adic metric.)

Apologies for the failure to close that parenthesis before the edit window itself closed…