# 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:** 2

<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 19, 2013, 6:59pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/21 "2013-06-19T18:59:16Z")

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

Yes, it is indeed an awesome concept. There’s a little something for everyone in that ending. Theists can say it proves the existence of a god but the scientific approach would be to say that’s it’s evidence of design but proceeding to the next obvious question: where did the designer(s) come from? Is it turtles all the way down?

[Sturgeon’s Law](https://www.google.com/search?q=Sturgeons+Law) applies. Of course, in pi’s case, it’s more like 99.999999… percent of everything is crap. :rolleyes:

Then there’s the whole [pi vs. tau](http://boards.straightdope.com/sdmb/showthread.php?t=614230) debate. I would have been impressed had Ellie’s “father” had said, _“Silly humans. Basing a constant in terms of diameter while measuring angles in terms of radii. No wonder you’ve made so little progress.”_

---

<div class="post-metadata">

**Author:** ![pancakes3](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@pancakes3](https://boards.straightdope.com/u/pancakes3)\
**Post date:** [June 19, 2013, 7:05pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/22 "2013-06-19T19:05:58Z")

</div>

> [@KarlGauss](#):
>
> I’m not saying the pattern would be easier or harder to detect, or prettier, but, that if there’s a “pattern” i.e. a non random sequence of digits base[sub]x[/sub], it will be non random in every base, i.e. there will be a “pattern” in every base. Remember, part of the purpose of the encoded message was to signal that there was an intelligence ‘out there’, that the digits of pi were not random but had been ‘designed’. The other part of the purpose was the content of the message itself - and that would be the same regardless of the base, just like the message would be the same whether it was written in French or English.
> 
> The representation doesn’t matter.

I don’t know if there was a pattern. It was just that when represented in base-11, it only used 1’s and 0’s and none of the other numbers which _could_ be a huge coincidence or it _could_ mean something more. It’d be something all together if the code wasn’t just in 1’s and 0’s but also in 1-0-1-0-1-0-1-0… etc. alternating pattern.

Someone else earlier said it had to be non-random based on the probability of only getting 1’s and 0’s in a set length. Well… perhaps it was non-random but that doesn’t mean it has to fit a pattern. That’s the entire point behind irrational numbers, no? Pi doesn’t fit a pattern yet it’s certainly not a pattern - the very base from which this code is derived?

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [June 19, 2013, 7:14pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/23 "2013-06-19T19:14:15Z")

</div>

A number can be irrational yet still follow a pattern in its decimal (or any other base) expansion. For example, this is an irrational number:

0.12345678910111213141516171819202122232425262728293031…

---

<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 19, 2013, 8:12pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/24 "2013-06-19T20:12:15Z")

</div>

> [@Frylock](#):
>
> A number can be irrational yet still follow a pattern in its decimal (or any other base) expansion. For example, this is an irrational number:
> 
> 0.12345678910111213141516171819202122232425262728293031…

Going all the way back to undergraduate math (engineering) would it be fair to say that that series is normally distributed but (obviously) not random?

I struggled with integral calculus (second semester) but, strangely enough, I warmed to differential equations and infinite series.

---

<div class="post-metadata">

**Author:** ![pancakes3](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@pancakes3](https://boards.straightdope.com/u/pancakes3)\
**Post date:** [June 19, 2013, 8:12pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/25 "2013-06-19T20:12:19Z")

</div>

Right. I understand that irrationality is being formed as a fraction, but I was speaking more to the idea that the code being non-random necessitates a pattern.

---

<div class="post-metadata">

**Author:** ![Great\_Antibob](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@Great\_Antibob](https://boards.straightdope.com/u/Great_Antibob)\
**Post date:** [June 19, 2013, 8:24pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/26 "2013-06-19T20:24:32Z")

</div>

> [@standingwave](#):
>
> Going all the way back to undergraduate math (engineering) would it be fair to say that that series is normally distributed but (obviously) not random?

I’m not entirely sure what you mean by “random” and “normally distributed” (but I have a good idea).

If you mean the distribution of the digits, it’s going to be uniformly distributed. Each digit is going to appear roughly the same number of times.

It’s also a normal number. That particular number - 0.1234567891011121314… is known as Champerowne’s constant. It’s known to be normal in base ten. That is, you’ll find every possible finite sequence of digits in it somewhere (which is not quite the formal definition but close enough for us).

Normally distributed (but not a ‘normal number’) in terms of statistics means something looks like it’s distributed like a Gaussian function. In this case, the obvious candidate are the number of times each digit appears. But, as noted above, the distribution of digits is uniform in this case.

The number is also not random, if by ‘random’, you can’t easily predict the next digit based on some pattern found in the digits of the decimal expansion.

In this sense, the digits of pi are ‘random’. But of course, pi is a constant, so the decimal expansion is entirely deterministic in the sense that they are entirely calculable and predictable if you know which digit you want.

---

<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 19, 2013, 8:48pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/27 "2013-06-19T20:48:12Z")

</div>

> [@Great\_Antibob](#):
>
> I’m not entirely sure what you mean by “random” and “normally distributed” (but I have a good idea).
> 
> If you mean the distribution of the digits, it’s going to be uniformly distributed. Each digit is going to appear roughly the same number of times.
> 
> It’s also a normal number. That particular number - 0.1234567891011121314… is known as Champerowne’s constant. It’s known to be normal in base ten. That is, you’ll find every possible finite sequence of digits in it somewhere (which is not quite the formal definition but close enough for us).
> 
> Normally distributed (but not a ‘normal number’) in terms of statistics means something looks like it’s distributed like a Gaussian function. In this case, the obvious candidate are the number of times each digit appears. But, as noted above, the distribution of digits is uniform in this case.
> 
> The number is also not random, if by ‘random’, you can’t easily predict the next digit based on some pattern found in the digits of the decimal expansion.
> 
> In this sense, the digits of pi are ‘random’. But of course, pi is a constant, so the decimal expansion is entirely deterministic in the sense that they are entirely calculable and predictable if you know which digit you want.

Well, I’m not entirely sure what I mean by “random” which is perhaps part of the problem. 😃 It is a difficult concept. In one sense, the successive digits of pi are random but strictly speaking it’s completely deterministic so it can’t be considered truly random.

---

<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, 2:23am UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/28 "2013-06-20T02:23:59Z")

</div>

Google Books has a copy of Contact, with much of it readable on-screen. Chapter 24 (page 430) has the piece that I remember:

> [@](#):
>
> The anomaly showed up most starkly in Base 11 arithmetic, where it could be written out entirely as zeros and ones. Compared with what had been received from Vega, this could be at best a simple message, but its statistical significance was high. The program reassembled the digits into a square raster, an equal number across and down. The first line was an uninterrupted file of zeros, left to right. The second line showed a single numeral one, exactly in the middle, with zeros to the borders, left and right. After a few more lines, and unmistakable arc had formed, composed of ones. The simple geometrical figure had been quickly constructed, line by line, self-reflexive, rich with promise. The last line of the figure emerged, all zeros except for a single centered one. The subsequent line would be zeros only, part of the frame.
> 
> Hiding in the alternating patterns of digits, deep inside the transcendental number, was a perfect circle, its form traced out by unities in a field of noughts.

The next page is missing from the Google Books availability, but unless someone can show me wrong, I suspect that this business about “the product of eleven prime numbers” is bogus. And in fact, the very first comment on that Wikipedia article’s talk page says the same thing.

On the other hand, I do have a problem with Sagan’s use of the word “perfect” in the final sentence of the section I quoted. Call it a circle, but no rasterized circle can be called “perfect”.

---

<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, 5:31am UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/29 "2013-06-20T05:31:06Z")

</div>

> [@Keeve](#):
>
> [Google Books](http://books.google.com/books?id=Q6o51-W_z8MC) has a copy of Contact, with much of it readable on-screen. Chapter 24 (page 430) has the piece that I remember:The next page is missing from the Google Books availability, but unless someone can show me wrong, I suspect that this business about “the product of eleven prime numbers” is bogus. And in fact, the very first comment on that Wikipedia article’s talk page says the same thing.
> 
> On the other hand, I do have a problem with Sagan’s use of the word “perfect” in the final sentence of the section I quoted. Call it a circle, but no rasterized circle can be called “perfect”.

Yeah, conflation. Not eleven primes. Not eleven dimensions. Base eleven. (Meaning “God” has ten fingers and some other appendage he’s particularly proud of?) Two primes for two dimensions, indicating “I am an array. Print me.” Didn’t Sagan et al use this on the Voyager and Pioneer messages?

And yes, I agree. In practice, no physical circle can be considered perfect. Only in the abstract is any circle perfect. I interpreted the passage to mean as perfect as any rasterized circle of that dimension could be but I could be fan-wanking. Here’s the rest of the passage and the end of the novel, if people are concerned about spoilers… (emphasis mine which I discuss below.)Hiding in the alternating patterns of digits, deep inside the transcendental number, was a perfect circle, its form traced out by unities in a field of noughts.

The universe was made on purpose, the circle said. In whatever galaxy you happen to find yourself, you take the circumference of a circle, divide it by its diameter, measure closely enough, and uncover a miracle–another circle, drawn **kilometers** downstream of the decimal point. There would be richer messages farther in. It doesn’t matter what you look like, or what you’re made of, or where you come from. As long as you live in this universe, and have a modest talent for mathematics, sooner or later you’ll find it. It’s already here. It’s inside everything. You don’t have to leave your planet to find it. In the fabric of space and in the nature of matter, as in a great work of art, there is, written small, the artist’s signature. Standing over humans, gods, and demons, subsuming Caretakers and Tunnel builders, there is an intelligence that antedates the universe. The circle had closed.

She found what she had been searching for.

The End.  
Kilometers?! _Just_ kilometers? Am I missing something? Please to be checking my math. I’ve had a couple of beers. But 10E20 characters (the distance of the presumed artifact) written at 10 characters per inch is 1E20 inches. By comparison, a light year is just 3.7E17 inches. So isn’t 10E20 digits half a dozen round trips to the novel’s (and movie’s) aforementioned Vega?

Carl just making the ultimate understatement? I think more accurately illustrating the physical distance of printing out the digits really drives home the sheer scale we’re looking at here. Something Carl usually excelled at.

Aside: One of the first c programs I ever wrote was the [Leibniz expansion](http://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80) for pi because it was a) simple and b) so horribly inefficient that even with a 4.77MHz computer the digits would appear in reasonable time-frames. It would happily run for hours before a digit stabilized. Quite fun to watch. Digits on the right, flickering. Digits on the left, nice and fixed.

---

<div class="post-metadata">

**Author:** ![moriah](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@moriah](https://boards.straightdope.com/u/moriah)\
**Post date:** [June 20, 2013, 7:20am UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/30 "2013-06-20T07:20:49Z")

</div>

In base pi, pi is 1.0000…

---

<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, 7:44am UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/31 "2013-06-20T07:44:56Z")

</div>

> [@moriah](#):
>
> In base pi, pi is 1.0000…

mind BLOWN.

---

<div class="post-metadata">

**Author:** ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)\
**Post date:** [June 20, 2013, 8:11am UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/32 "2013-06-20T08:11:14Z")

</div>

It’s possible to have non-positive-integer number bases:

> **[Non-standard positional numeral systems](https://en.wikipedia.org/wiki/Non-standard_positional_numeral_systems)**
>
> Non-standard positional numeral systems here designates numeral systems that may loosely be described as positional systems, but that do not entirely comply with the following description of standard positional systems:
> This article summarizes facts on some non-standard positional numeral systems. In most cases, the polynomial form in the description of standard systems still applies.
> Some historical numeral systems may be described as non-standard positional numeral systems. E.g., the sexagesi...

I remember in high school reading about negative integer bases (not in anything used in our high school, of course) and finding it interesting.

---

<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, 10:35am UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/33 "2013-06-20T10:35:42Z")

</div>

> [@moriah](#):
>
> In base pi, pi is 1.0000…

Nitpick: Did you mean 10.000 ?

---

<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, 11:48am UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/34 "2013-06-20T11:48:13Z")

</div>

> [@moriah](#):
>
> In base pi, pi is 1.0000…

This is true; however it becomes impossible to accurately count how many circles you have. 😛

---

<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, 11:51am UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/35 "2013-06-20T11:51:33Z")

</div>

> [@standingwave](#):
>
> Kilometers?! _Just_ kilometers? Am I missing something? Please to be checking my math. I’ve had a couple of beers. But 10E20 characters (the distance of the presumed artifact) written at 10 characters per inch is 1E20 inches. By comparison, a light year is just 3.7E17 inches. So isn’t 10E20 digits half a dozen round trips to the novel’s (and movie’s) aforementioned Vega?

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.

---

<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, 12:01pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/36 "2013-06-20T12:01:47Z")

</div>

> [@septimus](#):
>
> Nitpick: Did you mean 10.000 ?

You are technically correct. The best _kind_ of correct.

In base-pi, 1.0000… equals, not too surprisingly, 1.0000…(in the more familiar base 10).

In fact, 1 = 1 in any base equal or greater than 1.

In base ½, though, where the value of ½ can be represented by the character ½, the value of 1 is represented by…

½

Yes, I think that’s correct.

---

<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, 12:45pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/37 "2013-06-20T12:45:24Z")

</div>

> [@Bryan\_Ekers](#):
>
> In base ½, though, where the value of ½ can be represented by the character ½, the value of 1 is represented by…
> 
> ½
> 
> Yes, I think that’s correct.

I’m not so sure.

I’m not saying you’re wrong. All I’m saying is that I get a headache trying to figure out what numerals would be used for bases lower than 1, let alone how the numbers would look.

In other words, for a base lower than 1, would “2” be a legitimate numeral? “9” isn’t legitimate for base 8. In fact, even “8” isn’t legitimate for base 8, just as base 10 doesn’t have a numeral which represents ten. I just can’t wrap my head around this whole thing at all.

---

<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:12pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/38 "2013-06-20T13:12:20Z")

</div>

> [@Keeve](#):
>
> I’m not so sure.
> 
> I’m not saying you’re wrong. All I’m saying is that I get a headache trying to figure out what numerals would be used for bases lower than 1, let alone how the numbers would look.
> 
> In other words, for a base lower than 1, would “2” be a legitimate numeral? “9” isn’t legitimate for base 8. In fact, even “8” isn’t legitimate for base 8, just as base 10 doesn’t have a numeral which represents ten. I just can’t wrap my head around this whole thing at all.

Well, we can arbitrarily assign whatever symbols we want, as was the case for values of 10-15 in the hexadecminal system, represented by a,b,c,d,e and f.

In a base lower than 1 (or in base 1 itself, for that matter, or indeed any base lower than 2) the symbol “2” has no meaning, just as the symbol @ isn’t useful or meaningful when counting in base 10. This was satirized somewhat in an episode of _Futurama_ where Bender, a robot, had a nightmare consising of an endless cloud of ones and zeros and was telling his human friend Fry about it:

Bender: And I think I saw a 2 in there!  
Fry: Take it easy, Bender. There’s no such thing as 2.  
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½

---

<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, 1:15pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/39 "2013-06-20T13:15:18Z")

</div>

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

---

<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:25pm UTC](https://boards.straightdope.com/t/math-probability-question-from-sagan-contact-pi/661347/40 "2013-06-20T13:25:19Z")

</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! 😃

0

1

…

π - Profit!!!

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

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