# Math/Probability question from Sagan/Contact (Pi)

**URL:** <https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347>\
**Category:** Factual Questions\
**Created:** [June 19, 2013, 7:11am UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347 "2013-06-19T07:11:03Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Bryan\_Ekers](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bryan_ekers/32/183_2.png) [@Bryan\_Ekers](https://boards.straightdope.com/u/Bryan_Ekers)\
**Post date:** [June 20, 2013, 1:36pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/41 "2013-06-20T13:36:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [June 20, 2013, 1:48pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/42 "2013-06-20T13:48:55Z")

</div>

> [@drewtwo99](#):
>
> What would base pi even mean, really? How would you count from 0 to pi (evidently 10.0000…) in base pi? Evidently we have 0 and 1, what number comes next? Don’t tell me it’s 2! 😃

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](http://forums.xkcd.com/viewtopic.php?f=17&t=36351)

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [June 20, 2013, 1:54pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/43 "2013-06-20T13:54:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![drewtwo99](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@drewtwo99](https://boards.straightdope.com/u/drewtwo99)\
**Post date:** [June 20, 2013, 2:35pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/44 "2013-06-20T14:35:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Clothahump](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@Clothahump](https://boards.straightdope.com/u/Clothahump)\
**Post date:** [June 20, 2013, 3:19pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/45 "2013-06-20T15:19:38Z")

</div>

Egads. When come back, bring pi.

---

<div class="post-metadata">

**Author:** ![standingwave](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@standingwave](https://boards.straightdope.com/u/standingwave)\
**Post date:** [June 20, 2013, 3:21pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/46 "2013-06-20T15:21:38Z")

</div>

> [@Keeve](#):
>
> The “product of 11 primes” isn’t the only figment of the imagination of the author of that bogus article. 10E20 doesn’t appear anywhere in _Contact_ either. The fault is not with Sagan.

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. 😃

---

<div class="post-metadata">

**Author:** ![Robot\_Arm](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/robot_arm/32/18280_2.png) [@Robot\_Arm](https://boards.straightdope.com/u/Robot_Arm)\
**Post date:** [June 20, 2013, 4:19pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/47 "2013-06-20T16:19:49Z")

</div>

> [@septimus](#):
>
> That’s what made Sagan’s concept so beautiful to me! Any old Creator God can hide a message in Planck’s constant, or something like that. But to hide a message in an arithmetic fact is spookily awesome.
> 
> BTW, I have mixed feelings about pi’s normalcy, assuming it is. It seems nice that pi rendered in Ascii contains the Complete Works of Shakespeare and the Complete History of the U.S.A. published in the 23rd century. But … before you ever get to them in pi’s expansion, you’ll have to wade through gazillions of Hamlet versions where the Prince and Ophelia elope in Act II. And before you get to the correct History, there will be incorrect versions which end suddenly with the Cuban Missile Crisis … or in which GWB is elected to a third term in 2008.

> [@Frylock](#):
>
> See Borges’ [The Library of Babel](http://en.wikipedia.org/wiki/The_Library_of_Babel), which I occasionally teach in my intro to philosophy course.

I’ve always felt that [this](http://www.youtube.com/watch?v=Ji_--Q1S9Gk) was a particularly poignant approach to the subject.

---

<div class="post-metadata">

**Author:** ![filmore](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@filmore](https://boards.straightdope.com/u/filmore)\
**Post date:** [June 20, 2013, 4:27pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/48 "2013-06-20T16:27:00Z")

</div>

> [@septimus](#):
>
> BTW, I have mixed feelings about pi’s normalcy, assuming it is. It seems nice that pi rendered in Ascii contains the Complete Works of Shakespeare and the Complete History of the U.S.A. published in the 23rd century. But … before you ever get to them in pi’s expansion, you’ll have to wade through gazillions of Hamlet versions where the Prince and Ophelia elope in Act II. And before you get to the correct History, there will be incorrect versions which end suddenly with the Cuban Missile Crisis … or in which GWB is elected to a third term in 2008.

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)?

---

<div class="post-metadata">

**Author:** ![standingwave](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@standingwave](https://boards.straightdope.com/u/standingwave)\
**Post date:** [June 20, 2013, 4:54pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/49 "2013-06-20T16:54:04Z")

</div>

> [@friedo](#):
>
> An irrational number is a number which can’t be written as a fraction of integers (a ratio.) Pi, e, and the square root of two are all irrational numbers.
> 
> Transcendental numbers are numbers which can not be the solution to a polynomial equation (whose coefficients are rational.) Pi and e are transcendental numbers but √2 is not because x[sup]2[/sup] = 2 has a pair of easy solutions.

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](http://thinkzone.wlonk.com/Numbers/RealVenn.png). Accurate?

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [June 20, 2013, 5:14pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/50 "2013-06-20T17:14:28Z")

</div>

> [@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½

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:

```auto

 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]. 🙂

---

<div class="post-metadata">

**Author:** ![Exapno\_Mapcase](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/exapno_mapcase/32/1051_2.png) [@Exapno\_Mapcase](https://boards.straightdope.com/u/Exapno_Mapcase)\
**Post date:** [June 20, 2013, 5:17pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/51 "2013-06-20T17:17:51Z")

</div>

> [@Colophon](#):
>
> Can you actually have a meaningful number system with a base of less than 1?

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

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [June 20, 2013, 5:25pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/52 "2013-06-20T17:25:23Z")

</div>

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.

> [@filmore](#):
>
> 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)?

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.

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [June 20, 2013, 5:50pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/53 "2013-06-20T17:50:22Z")

</div>

> [@septimus](#):
>
> 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.

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](https://en.wikipedia.org/wiki/Golden_ratio_base) 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 φ 🆒 )

> [@Exapno\_Mapcase](#):
>
> You can’t. I can’t. Mathematicians are a different breed of cat. 🙂

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!)

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [June 20, 2013, 6:05pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/54 "2013-06-20T18:05:27Z")

</div>

[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…

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [June 20, 2013, 6:16pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/55 "2013-06-20T18:16:21Z")

</div>

> [@Colophon](#):
>
> 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](https://en.wikipedia.org/wiki/Golden_ratio_base) suggests that is the case.

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.)

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [June 20, 2013, 6:21pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/56 "2013-06-20T18:21:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [June 20, 2013, 6:32pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/57 "2013-06-20T18:32:49Z")

</div>

> [@Colophon](#):
>
> That makes sense, **septimus** , but Fibonacci coding is not base phi, is it?

It is in the limit. 😉

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.

---

<div class="post-metadata">

**Author:** ![Keeve](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@Keeve](https://boards.straightdope.com/u/Keeve)\
**Post date:** [June 20, 2013, 6:40pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/58 "2013-06-20T18:40:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [June 20, 2013, 7:38pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/59 "2013-06-20T19:38:18Z")

</div>

> [@Colophon](#):
>
> 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…

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](http://en.wikipedia.org/wiki/P-adic_number).)

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [June 20, 2013, 7:44pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/60 "2013-06-20T19:44:07Z")

</div>

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

[Previous page](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347.md?page=2)

[Next page](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347.md?page=4)
