Buffy Posted November 14, 2007 Report Posted November 14, 2007 I wanted to come up with a fun and frivolous but scientific topic for my 100th thread, and while I was out on my jog this afternoon the following popped into my head: Decimal numbers come in two varieties: Finite decimals which have nothing but trailing zeros after some point (e.g. [imath]\frac 1 2 = 0.5[/imath])Infinite (or "unbounded") decimals which continue on indefinitely given some definition of how they are constructed (e.g. [imath]\frac 1 3 = 0.33333.....[/imath] or for those mathematicians out there more correctly [imath]0.\overline{3}[/imath]) This latter group can then be divided into Rational and Irrational Numbers. Now, definitionally, Rational numbers have repeating sequences of digits, so the fraction [imath]\frac 1 3[/imath] repeats the three on and on endlessly. Conversely, irrational numbers however have random sequences that do not repeat at all. Here's where my pondering came in: for any particular decimal number, you can create a distribution map of the digits in the decimal representation. For the finite representations, this is just counting appearances so for the number [imath]\frac 5 {32} = 0.15625[/imath] you have the distribution of digits:0: 01: 12: 13: 04: 05: 26: 17: 08: 09: 0Which is not only limited but boring to boot! With unbounded numbers, you have an infinite number of digits, so things get a bit more interesting. In order to "compute" the distribution, you need to start working with ratios of each digit to the others. With unbounded rational numbers, this is relatively easy since you can take just the "repeating sequence" and count the occurrences of each digit and then divide by the length of the sequence, so the number [imath]\frac {41} {333} = 0.123123123... = 0.\overline{123}[/imath] has the distribution:0: [imath]\frac 1 3[/imath]1: [imath]\frac 1 3[/imath]2: [imath]\frac 1 3[/imath]3: 04: 05: 06: 07: 08: 09: 0 This is obviously a skewed distribution! On the other hand this lovely fraction: [imath]\frac 1 {81} = 0.0123456790123… = 0.\overline{0123456789}[/imath] has the perfectly Poisson Distribution curve of: 0: [imath]\frac 1 {10}[/imath]1: [imath]\frac 1 {10}[/imath]2: [imath]\frac 1 {10}[/imath]3: [imath]\frac 1 {10}[/imath]4: [imath]\frac 1 {10}[/imath]5: [imath]\frac 1 {10}[/imath]6: [imath]\frac 1 {10}[/imath]7: [imath]\frac 1 {10}[/imath]8: [imath]\frac 1 {10}[/imath]9: [imath]\frac 1 {10}[/imath]When you bring in Irrational Numbers though, there's no immediately obvious way to figure this out. Being to lazy to do it right away, I thought I'd throw it out to all the math whizzes out there: What are the distributions of digits in Irrational Numbers? Can we make any interesting generalizations? Since the digits in an Irrational number are random, they *could* all be Poisson Distributed, but are they? How's about [imath]\pi[/imath] or e? Any references to cool Abstract Algebra or Number Theory proofs that are relevant (or have solved this one completely!)? Anyone want to contribute some code to test any theories? :cheer: The creator of the universe works in mysterious ways. But he uses a base ten counting system and likes round numbers, :phones:Buffy Tormod 1 Quote
C1ay Posted November 14, 2007 Report Posted November 14, 2007 From the looks of this page on the frequency of digits in Pi it looks to be approaching a uniform distribution. OTOH, e does not seem to have a normal distribution according to this source. Quote
Tormod Posted November 14, 2007 Report Posted November 14, 2007 Not sure if I understand this, but I was reminded of a book I read a while ago which discussed the distribution of prime numbers, the Riemann hypothesis and some other stuff. Maybe you can find some relevant ideas here? Prime number theorem - Wikipedia, the free encyclopedia Quote
Qfwfq Posted November 14, 2007 Report Posted November 14, 2007 Can we make any interesting generalizations? Since the digits in an Irrational number are random, they *could* all be Poisson Distributed, but are they?For a given base b, given any histogram (distribution of b numbers that add to 1), there are certainly at least one, and typically infinitely many, numbers who's digits in base b have that histogram. The "number" of them isn't in general easy to express except in simple cases; it's the number of permutations over [imath]\aleph_0[/imath] elements, reduced for equivalent ones. Obviously, permutations are all equivalent in the case of a single digit, otherwise there are infinitely many non equivalent permutations. For a rational number, the b numbers of the histogram must be rational, they needn't be for an irrational number but they may be. Cute question, :) go jogging more often! Quote
snoopy Posted November 14, 2007 Report Posted November 14, 2007 HiThe poisson distribution for rational numbers is given asf(k;λ) = e^(-λ) λ^k / k! Where k is the actual number of occurrences and λ is the expected numberand k! is the facotrial of kcode hmm try this java code not sure if its what your looking for though. /**Calculates an approximation of the Poisson probability. * @param mean - lambda, the average number of occurrences * @param observed - the actual number of occurences observed * @return ln(Poisson probability) - the natural log of the Poisson probability. */public static double poissonProbabilityApproximation (double mean, int observed){ double k = observed; double a = k * Math.log(mean); double b = -1.0 * mean * Math.log(Math.E); return a + b - Num.factorialApproximation(k);}/**Srivivasa Ramanuja ln(n!) factorial estimation. * Good for larger values of n. * @return ln(n!) */public static double factorialApproximation(double n){ if (n < 2) return 0; double a = (n * Math.log(n)) - n; double b = (Math.log(n * (1.0+ (4 * n * (1.0 + (2.0 * n)))))) / 6.0; return a + b + (Math.log(Math.PI) / 2.0);} Peace :rolleyes: Quote
CraigD Posted November 14, 2007 Report Posted November 14, 2007 This reminds me of a question I read (can’t remember the source) that asked the simple question:“Does there exists any finite sequence of digits that does not appear in some irrational number?”For example, the digit sequence 04261960 (my birthday :)) appears in [math]\pi[/math] starting at the 103245729th position after the decimal (according to The Pi-Search Page). The base of the numeration system used appears unimportant to this question. The assumption is that the answer to this question is “no”, but to the best of my knowledge, this is not only unproven, but nobody has much of an idea how to go about even finding an approach to a proof of it. The question is reminiscent of Borges’s story "The Library of Babel", and Sagan’s novel “Contact”. If it’s answer is indeed, as is expected for at least some irrational number, then in the digits of some (or all) irrational number contain the text of every work that can ever be written using the Latin alphabet, including the complete works of Shakespeare, a compelling theory of everything, an engineering description of a practical fusion power plant, etc. :eek_big: Following the maxim that everything involving numeration becomes as simple as it can get when done in base 2, these similar question about the normalcy (in the sense used upthread) of an irrational number can be asked:“Does there exist an irrational number for which there exists no truncated binary representation contains an equal counts of 1s and 0s?”“Does there exist an number L for which no truncated binary representation of a given irrational number contains equal counts of 1s and 0s greater than L?” For example, the first question is not true of [math]\pi \dot= 11.0010010000111111011010101000100010000101101000110000100011_2[/math], as it’s first 4, 6, 8, 30, etc. digits consist of equal numbers of 1s and 0s. These questions are related to a coin tossing question I discovered in Krauss's “Beyond Star Trek”, which asks “What is the probability that a true coin will ever produce the same # of heads & tails?” (the answer is “1, a certainty”) Quote
Buffy Posted November 15, 2007 Author Report Posted November 15, 2007 OTOH, e does not seem to have a normal distribution according to this source.Those are really interesting graphs C1ay! That's exactly what I was looking for. And I think its really interesting that even if [imath]\pi[/imath] does converge to Poisson, it sure takes its own sweet time in getting there, huh!For a given base b, given any histogram (distribution of b numbers that add to 1), there are certainly at least one, and typically infinitely many, numbers who's digits in base b have that histogram.Which would make perfect sense, because the sequences in rational numbers *always* repeat eventually, and while they can obviously get "long," "long" is always small enough to do anything in the infinite set of rational numbers! :rolleyes:For a rational number, the b numbers of the histogram must be rational, they needn't be for an irrational number but they may be.Yet another reason why I think that the irrational numbers make for an interesting focus on this little topic. Its like opening a whole bunch of cans of worms!Cute question, :) go jogging more often!I do every day! But only occasionally does hitting the wall result in fun stuff. Usually its just an epiphany about a bug or an old boyfriend... :evil:This reminds me of a question I read (can’t remember the source) that asked the simple question:“Does there exists any finite sequence of digits that does not appear in some irrational number?”For example, the digit sequence 04261960 (my birthday :)) appears in [math]pi[/math] starting at the 103245729th position after the decimal...Which is an irrational analogue to what Q said about rationals above...The assumption is that the answer to this question is “no”, but to the best of my knowledge, this is not only unproven, but nobody has much of an idea how to go about even finding an approach to a proof of it.Good! Unbroken ground! Maybe it will succumb to brute force programming! (I'm an applied mathematician, so sue me... :rolleyes: )... snoopy: I'm going to try to diambiguate your code sniplet, but could you post an explanation of what its supposed to *do*? :) It may be irrational of me, but human beings are quite my favorite species, :phones:Buffy Quote
snoopy Posted November 15, 2007 Report Posted November 15, 2007 Hi Buffy the code snippet never turned out well enough pasted it will just type it it calculates the approximation of the poisson probability {if (n<2) return 0;double a = (n * Math.log(n)) - n;double b = (Math.log(n * (1.0+ (4 * n * (1.0 + (2.0 * n)))))) / 6.0;return a + b + (Math.log(Math.PI) / 2.0);} The trouble is it doesnt do much right now its just the core mathfound it in a old java compiler, but I will work on it so it prints the value of n and a + b + (Math.log(Math.PI) / 2.0) alongside it. Peace :naughty: Quote
Qfwfq Posted November 15, 2007 Report Posted November 15, 2007 The assumption is that the answer to this question is “no”, but to the best of my knowledge, this is not only unproven, but nobody has much of an idea how to go about even finding an approach to a proof of it.I'd say it's pretty obviously "no", give me a sequence of base b digits and I'll construct an infinity of irrational numbers in which it appears! “Does there exist an irrational number for which there exists no truncated binary representation contains an equal counts of 1s and 0s?”“Does there exist an number L for which no truncated binary representation of a given irrational number contains equal counts of 1s and 0s greater than L?”The former ones exist, by construction, for the latter question I'm not sure of your wording. If you mean "of any given irrational number" the answer is clearly "no" if there's such a thing as normal irrationals, else it depends on the given irrational. Which would make perfect sense, because the sequences in rational numbers *always* repeat eventually, and while they can obviously get "long," "long" is always small enough to do anything in the infinite set of rational numbers! :naughty:I'm not 100% sure where you're going, here. ;) However, I would say that if the number is rational, it always has a period (which may be the digit 0) whereas any other sequence of its digits (comprising ones previous to the period) needn't eventually repeat. I do every day!Knew you'd say that! :evil: But ya know what I meant. :phones: Which is an irrational analogue to what Q said about rationals above...Actually that's just a corollary of what I said, and I meant it about all reals. Quote
CraigD Posted April 6, 2008 Report Posted April 6, 2008 On the other hand this lovely fraction: 1/81 = 0. 0123456790123… = 0. 0123456789 ... has the perfectly Poisson Distribution curve of:0: 1/10…Despite it being months old, we’ve not yet noticed that this is wrong! :doh: [math]\frac 1 {81} = 0.\overline{0123456\mathbf{79}} \not= 0.\overline{0123456\mathbf{789}}[/math]. It's missing the 8. To get the latter repeating fraction, we need the much less lovely fractions [math]\frac{123456789}{9999999999}[/math] or, in canonic form, [math]\frac{13717421}{1111111111}[/math]. Any fraction of the form [math]\frac{a}{10^{10n}-1}[/math] where [math]a[/math] is a simply normal positive integer [math]10n[/math]-digit integer is simply normal. I don’t know what the loveliest fraction (that is, with the fewest numerator and denominator digits) with a perfectly even distribution of digits, and can’t right off think of a not-too computationally intense (9! or more iterations) way to find it. Quote
Qfwfq Posted April 7, 2008 Report Posted April 7, 2008 Despite? :hyper: Gee I'd say either it was noticed at the time or it remained forever unpunished!I mean, I would have thought! B) Certainly though, sure enough, it's sufficient to consider what the prime factors of 9999999999 are and it becomes obvious that the fraction can't be 1/81 exactly. :doh: Now Buffy, kneel down on those dehydrated chick-peas!!!!!!! :hihi: Quote
CraigD Posted April 11, 2008 Report Posted April 11, 2008 I don’t know what the loveliest fraction (that is, with the fewest numerator and denominator digits) with a perfectly even distribution of digits, and can’t right off think of a not-too computationally intense (9! or more iterations) way to find it.What was I thinking? :doh: 10! is only 3628800, just a few seconds on a vaguely modern computer for a little program like this MUMPS one:r XPERMR,XGCDR n (R) s R(1)=(R(1),(("",(R,","))," ",",")) f N=2:1:(R,",") s (R,",",1,N)=(R,",",2,N)_","_(R,","),(R(1),",",N)=(R(1),",",N)+1#N q:(R(1),",",N) ;XPERMR: permuter n (R) f q:'R s R=(R,",",2)#R_","_+R ;XGCDR: Euclid’s GCD algorithm k R,C s C=999,(R,R0)="0,1,2,3,4,5,6,7,8,9" f s A=R,R=(R,",")_",9999999999" x XGCDR s R=(R,",",2),F=(A,",")/R_"/"_(9999999999/R),F=(F)_","_F s:(F<C:1,F>C:0,1:(F,",",2)<(C,",",2)) C=F w:F=C C,! s R=A x XPERMR q:R=R0 ;find shortest fractionAccording to it (though not formally proven) the loveliest (that is, smallest) fraction form of a repeating decimal number with a perfectly even distribution of digits (AKA simply normal) is [math]\frac{114}{9091} = 0.\overline{0125398746}[/math] Quote
Qfwfq Posted April 11, 2008 Report Posted April 11, 2008 According to it (though not formally proven) the loveliest (that is, smallest) fraction form of a repeating decimal number with a perfectly even distribution of digits (AKA simply normal) is [math]frac{114}{9091} = 0.overline{0125398746}[/math]Errrrrrrr... Did your algorithm compare it with things such as: [math]0.\overline{00112255339988774466}[/math] [math]0.\overline{00112233445566778899}[/math] [math]0.\overline{90817265534938271406}[/math] [math]0.\overline{01234567899876543210}[/math] [math]0.\overline{000111222333444555666777888999}[/math] [math]0.\overline{0123456789832091847569876543210}[/math] and so on? Quote
CraigD Posted April 12, 2008 Report Posted April 12, 2008 Did your algorithm compare it with things such as: [math]0.overline{00112255339988774466}[/math]…No. All it did was generate all the permutations of the 10 digits and find the canonic (AKA simplest, lowest) form of the fraction of each 10 (or 9, when the first digit is 0) digit number over [math]10^{10}-1 = 9999999999[/math]. Qfwfq asks a wise question. :thumbs_up A quick check of repeating part of the decimal expansion of all proper fractions with denominators less than the 9091 found in post #12 reveals a new “most lovely” simply normal number:[math]\frac1{61} = 0.\overline{016393442622950819672131147540983606557377049180327868852459}[/math] It’s even smaller (in the magnitude of its numerator and denominator) than the [math]\frac1{81}[/math] in post 1 that started this search. All of fractions [math]\frac{a}{61}, \, 1 \le a < 61[/math] are simply normal, as are those of many other denominators, such as 131 and 183. Many but not all of these denominators are prime. This lead to a remarkable theorem:If [math]a[/math] is a simply normal integer, [math]a*b[/math] is a simply normal integer for all integers [math]b, \, 1 \le b < a[/math]. PS: Here’s the MUMPS code used:r XF,XC,XC(1) k R,Q f R=1:1 s Q(R)=ND,N=N#D q:(R(N)) s R(N)=R,N=N*B ;XF: find repeating digits n I,C x XC(1) s C=(C(0)),D=0 f I=1:1:B-1 s D=(C(I))-C q:D ;XC: set D=true if simply normal k C f I=R(N)+1:1:R s C(Q(I))=(C(Q(I)))+1 ;XC(1) s B=10 f D1=1:1 f N1=1:1:D1-1 s N=N1,D=D1 x XF i R(N)=1,R-R(N)#B=0 x XC i 'D w N1,"/",D1,! r R ;find fraction with simply normal repeating decimals Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.