Live data from Hacker News

Converting Pi to binary: Don't do it!

catless.ncl.ac.uk

1–10 of 12 posts

Re: Converting Pi to binary: Don't do it!

#3
post #2

Actually it is not guaranteed that every string of bits will at some point be a substring of pi. Bad joke, since wrong.

Can you generate an infinite string of bits that does not contain a given finite string?

Edit: no periods in the infinite string, of course

Re: Converting Pi to binary: Don't do it!

#4
post #3
post #2

Actually it is not guaranteed that every string of bits will at some point be a substring of pi. Bad joke, since wrong.

Can you generate an infinite string of bits that does not contain a given finite string? Edit: no periods in the infinite string, of course

http://en.wikipedia.org/wiki/Normal_number#Properties_and_ex...

Sure... the infinite string of 1s, or the infinite string of 0s, or the infinite string of 0s and 1s that is made up of only decimal 3s and 7s. There are an uncountably many number of non-normal real numbers like this, even though the infinite amount of normal real numbers is bigger.

Re: Converting Pi to binary: Don't do it!

#5
post #4
post #3

Earlier quoted context omitted.

Can you generate an infinite string of bits that does not contain a given finite string? Edit: no periods in the infinite string, of course

http://en.wikipedia.org/wiki/Normal_number#Properties_and_ex... Sure... the infinite string of 1s, or the infinite string of 0s, or the infinite string of 0s and 1s that is made up of only decimal 3s and 7s. There are an uncountably many number of non-normal real numbers like this, even though the infinite amount of normal real numbers is bigger.

Alright, that makes sense, and how about pi?

Re: Converting Pi to binary: Don't do it!

#6
Similarly, surely this could land you in big trouble:

dd if=/dev/urandom of=testfile bs=1024 count=1024

You could end up with a copyrighted mp3 file, some trade secrets, various passwords, credit card numbers, etc

And another point... "Converting PI to binary"

What?? What base is PI in to start with? Surely the title should be "Calculating PI and storing as binary" or similar.

Re: Converting Pi to binary: Don't do it!

#7
post #3
post #2

Actually it is not guaranteed that every string of bits will at some point be a substring of pi. Bad joke, since wrong.

Can you generate an infinite string of bits that does not contain a given finite string? Edit: no periods in the infinite string, of course

Yes, I can:

01001000100001...

Guess what? There are uncountable ones.

Re: Converting Pi to binary: Don't do it!

#8
post #4
post #3

Earlier quoted context omitted.

Can you generate an infinite string of bits that does not contain a given finite string? Edit: no periods in the infinite string, of course

http://en.wikipedia.org/wiki/Normal_number#Properties_and_ex... Sure... the infinite string of 1s, or the infinite string of 0s, or the infinite string of 0s and 1s that is made up of only decimal 3s and 7s. There are an uncountably many number of non-normal real numbers like this, even though the infinite amount of normal real numbers is bigger.

> There are an uncountably many number of non-normal real numbers like this, even though the infinite amount of normal real numbers is bigger.

How sure are you with that one? Mind to supply a proof?

Re: Converting Pi to binary: Don't do it!

#9
post #5
post #4

Earlier quoted context omitted.

http://en.wikipedia.org/wiki/Normal_number#Properties_and_ex... Sure... the infinite string of 1s, or the infinite string of 0s, or the infinite string of 0s and 1s that is made up of only decimal 3s and 7s. There are an uncountably many number of non-normal real numbers like this, even though the infinite amount of normal real numbers is bigger.

Alright, that makes sense, and how about pi?

Since pi is not random, we cannot say that every finite string is in it. (If it was, the probability P[s in binary representation] would be 1 for every finite s)

Actually, there is no proof and no counter proof that every finite string comes up in pi. (...that I know of)

Post reply on HN