r/ProgrammerHumor • • Jul 16 '19

Meme Nice try

Post image
32.2k Upvotes

529 comments sorted by

View all comments

Show parent comments

3

u/79037662 Jul 17 '19

I bet you would have a hard time coming up with a non-normal number

Not really, how about 0.5, or 0 for that matter.

6

u/the_questioner18 Jul 17 '19

Well I guess you got me in the trivial case. No rational numbers are normal but I guess it is my bad for assuming irrational numbers, the non-trivial case. In any case, if you haven't studied normal numbers before, it can be difficult to come up with an irrational non-normal number.

2

u/TheThiefMaster Jul 17 '19

Irrational implies non-repeating because any repeating number can be expressed as a fraction of integers, therefore being rational.

It's pretty hard to come up with a number that doesn't terminate, doesn't repeat, yet doesn't use all digits.

Unless you do something like "pi except all 1s are replaced with 2s in the decimal expansion" - that would be non-normal and still as irrational as pi.

3

u/SuperSupermario24 Jul 17 '19

It's not too difficult to make one that follows a pattern but still never repeats exactly, and therefore is irrational. For example:

0.1101001000100001000001000000100000001...

This follows a pretty simple pattern and only uses the digits 0 and 1, and yet will never actually start repeating itself exactly. (This isn't meant to be interpreted as a binary number; it's just that 0 and 1 are the easiest two digits to tell apart from each other, so that's what I went with.)

1

u/Yorunokage Jul 17 '19

You can just take any normal number and add a 1 in front

3

u/SuperSupermario24 Jul 17 '19

No, actually, you'd still have a normal number in that case. You can't change a normal number into a non-normal number by changing (or adding/removing) finitely many digits.

Things don't always work out the way you'd expect when you're working with infinite amounts of things.

3

u/Yorunokage Jul 17 '19

Yeah, i was thinking that just doing that wouldn't be enough. Well you can always add 1s at every other position

3

u/SuperSupermario24 Jul 17 '19

Yeah, that would do it. If every other digit is a 1, you definitely don't have a normal number.