4 ms·
Pi, PINs and Permutations
- goodmachine 12y agoI love Datagenetics posts. Related: https://github.com/philipl/pifs https://github.com/philipl/pifs
- richcuteguy34 12y agoAgreed, the DataGenetics blog is one of my favorite sites on the internet.
- rnhmjoj 12y agoThere is this service to search in the digits: http://www.angio.net/pi/piquery http://www.angio.net/pi/piquery
- Sukotto 12y agoWhy is the first pin 1415 and not 3141? [edit to add] and I don't mean that in a snarky way. Was just curious.
- squeakynick 12y agoNo reason really. I just arbitrarily started using the digits after the decimal point (to avoid the confusion of what to do with the ".") Other Pi sites seem to follow similar protocol. It will create an "off-by-one" for most answers, but since the string that is the furthest away does not start with a "3", other than the off-by-one, it will not change the results :)
- gren 12y agoIs there any statistical/probabilistic explanation of why the answer is almost 100'000 ?
- eCa 12y agoProbably, since five digits requires 1,369,560 decimals and six digits 14,118,307. Each extra digit seems to require ~ ten times as many decimals.
- contravariant 12y agoIf you approximate the positions of the pin numbers as independent exponential distributions with parameter λ = 1/10000. Then the expected value of the maximum is the sum of 10000/k for k = 1 to 10000 [1], which is approximately 1000*(log(1000)+γ) with γ = 0.57721... [2]. This gives the following values for the expected number of digits needed to get all k-digit pin numbers: k | n ------------ 4 | 97,875.6 5 | 1,209,014.1 6 | 14,392,726.2 7 | 166,953,113.2 8 | 1,899,789,640.9 Which agrees reasonably well with the actual values, at least those found so far. [1] http://math.stackexchange.com/questions/80475/kth-order-statistics-of-n-i-i-d-exponential-distribution-random-variables-wi http://math.stackexchange.com/questions/80475/kth-order-stat... [2] https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_const...
- stansmith 12y agoOne of the other articles referenced, about De Bruijn sequences, is much more interesting http://www.datagenetics.com/blog/october22013/index.html http://www.datagenetics.com/blog/october22013/index.html
- dang 12y agoSockpuppet accounts are not allowed on Hacker News and will get your site banned if you keep it up.
- marchelzo 12y ago6716 confirmed most secure 4-digit PIN.
- gren 12y agoaha! not anymore now that we know ;-D
- pierre 12y agoIf you want to play more with it and try to found when all 7 digit combination of pi repeat themself, I build a Pi as a service API for pi day. It can serve the first 1 billions digit of pi over http. http://piaas.org/ http://piaas.org/
- DEinspanjer 12y agoJust a random question that popped into my head while reading (thank you for the article!)... What would be the longest repetitions of digits within various orders of magnitude of Pi? In other words, the first 10 characters (again looking at only the fractional portion: 1415926535 The longest repetition is a length of one and the digit is 1. Playing with regexes, I found: In 100 digits, you get a repetition of the digits 592 In 1000 digits, the first longest repetition is 23846 In 10000 digits, I found a six digit repetition, 120190 but at that point, the quadradic nature of the regex made searching for 7 impossible so I would probably write a program that used something like suffix trees to get further.
- deepsun 12y agoThere's no proof that pi contains every possible number combinations. It's a common misconception that somewhere in pi you'll find everything.