tag:blogger.com,1999:blog-2433841880619171855.post5392351253344295872..comments2024-03-27T21:09:44.320+00:00Comments on Pat'sBlog: Back of the Envelope Answers to a Hard ProblemUnknownnoreply@blogger.comBlogger7125tag:blogger.com,1999:blog-2433841880619171855.post-24778734286824621682011-01-14T23:05:36.107+00:002011-01-14T23:05:36.107+00:00Here's the numpy program for that:
from __fut...Here's the numpy program for that:<br /><br />from __future__ import division<br />from numpy import *<br />A = matrix(diag([i/365 for i in xrange(1,366)]))<br />for i in xrange(364): A[i,i+1] = 1 - A[i,i]<br />print A**1000Yanghttps://www.blogger.com/profile/03075614601868378445noreply@blogger.comtag:blogger.com,1999:blog-2433841880619171855.post-75146433715402586632011-01-14T21:56:43.149+00:002011-01-14T21:56:43.149+00:00If you've never met Python before, then I hope...If you've never met Python before, then I hope you're in for a fun time! Yes, it's free.<br /><br />Python -- http://www.python.org/ is the programming language. The website has installation packages for Windows, if that's the OS you use (and, if it is, you should get hold of the pythonwin editor). I recommend you download (and learn) version 2.7.<br /><br />Numpy is Numerical Python, an extra package on top of Python which adds fast multidimensional arrays.Jon Ingramhttps://www.blogger.com/profile/02922696891178333845noreply@blogger.comtag:blogger.com,1999:blog-2433841880619171855.post-77117541871355652042011-01-14T17:49:43.648+00:002011-01-14T17:49:43.648+00:00Jon,
I don't know if you read GasStationWitho...Jon,<br /><br />I don't know if you read GasStationWithoutPumps blog,but he has been talking about the need for Comp programming courses in HS. <br /><br />I think what he suggests is that every math student should be able to do what you did. So now I have to go off at my advanced age and learn yet another programming language?? please tell me I can download the materials free.... (and offer to tutor as I go).. Thanks for the data. I am adding a postscript with your comment.Pat's Bloghttps://www.blogger.com/profile/15234744401613958081noreply@blogger.comtag:blogger.com,1999:blog-2433841880619171855.post-53222708295503941682011-01-14T15:49:31.330+00:002011-01-14T15:49:31.330+00:00You don't need a Cray! It took my computer (us...You don't need a Cray! It took my computer (using Python with the Numpy extension) about 10 seconds to calculate the 1000-person, 365-days matrix. It looks like you shouldn't be surprised not to find all the birthdays, as the probability of getting to that state is around 1.7e-12. The most likely outcome is 342 distinct birthdays (probability around 9.4%).Jon Ingramhttps://www.blogger.com/profile/02922696891178333845noreply@blogger.comtag:blogger.com,1999:blog-2433841880619171855.post-12646704835818539232011-01-14T15:02:24.258+00:002011-01-14T15:02:24.258+00:00Steven, Thanks, you have given me my next blog... ...Steven, Thanks, you have given me my next blog... WHO really invented the birthday problem?Pat's Bloghttps://www.blogger.com/profile/15234744401613958081noreply@blogger.comtag:blogger.com,1999:blog-2433841880619171855.post-51786895851245170242011-01-14T13:28:19.771+00:002011-01-14T13:28:19.771+00:00LOL !! "Fry? ... Fry? ..." lol ... you k...LOL !! "Fry? ... Fry? ..." lol ... you know, that's still a great movie. Somethings are just timeless I guess. :-)<br /><br />You know what Grassmann algebras are, right? Did you know Grassmann was a high school teacher? "Gymnasium" teacher is what "high school" was called back then. I have to pump the fist every time a human who does NOT have a PhD advances something. :-}<br /><br />The birthday problem is cool. Quercus Mathematics in the UK has a wonderful series of books that begin with "50 Things You Really Should Know About ...", and the one on Mathematics, by Manchester UK Maths Historian Tony Crilly has a chapter (one of the 50) on the Birthday problem.<br /><br />There are sweet little timelines at the bottom of each 4-page chapter. I combined them all (which was a considerable amount of work, but work I thoroughly enjoyed doing): <a href="http://tetrahedral.blogspot.com/2011/01/mathematics-timeline-part-3-and.html" rel="nofollow">here</a>.<br /><br />Anyway, the timelines on the Birthday problem there are:<br /><br />1654 - Blaise Pascal lays the foundations of probability theory<br /><br />1657 - Christiaan Huygens writes the first published work on probability<br /><br />1718 - Abraham de Moivre publishes <i>The Doctrine of Chance</i>, with expanded editions following in 1738 and 1756<br /><br />1920's - The Enigma machine is developed<br /><br />1939 - Richard von Mises proposes the birthday problem<br /><br />I'm sure that's not complete (feel free to fill in the blanks), but the books are of an introductory nature to alert our young fresh minds that, yup, Maths aren't nearly as boring as many think. Surely not. :-)Steven Colyerhttps://www.blogger.com/profile/10435759210177642257noreply@blogger.comtag:blogger.com,1999:blog-2433841880619171855.post-24708277822349023872011-01-14T13:25:53.552+00:002011-01-14T13:25:53.552+00:00This comment has been removed by the author.Steven Colyerhttps://www.blogger.com/profile/10435759210177642257noreply@blogger.com