Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!columbia!heathcliff.columbia.edu!zdenek From: zdenek@heathcliff.columbia.edu (Zdenek Radouch) Newsgroups: sci.math Subject: Re: Algorithm Description Message-ID: <3643@columbia.UUCP> Date: Fri, 31-Oct-86 12:51:30 EST Article-I.D.: columbia.3643 Posted: Fri Oct 31 12:51:30 1986 Date-Received: Sat, 1-Nov-86 04:29:46 EST References: <146@helm.UUCP> <9700056@uiucdcsb> <1266@megaron.UUCP> Sender: nobody@columbia.UUCP Reply-To: zdenek@heathcliff.columbia.edu.UUCP (Zdenek Radouch) Organization: Columbia University CS Department Lines: 45 Summary: I am amazed, too. In article <1266@megaron.UUCP> johnk@megaron.UUCP writes: > > I'm always amazed at the manner in which mathematicians describe >algorithms. In a recent discussion.. one of the presentations .. >was the following: > > V1 = 2*RND - 1 <--------+ > V2 = 2*RND - 1 | > S = V1*V1 + V2*V2 | > IF S >= 1 THEN GOTO ----+ > X1 = V1 * SQRT (-2 * LOG(S) / S) > X2 = V2 * SQRT (-2 * LOG(S) / S) > >While this is a clever improvement on the ghastly "step 1", "step 2", "go to >step i" style, why not simply > > repeat { > v1 = 2*rand() - 1 > v2 = 2*rand() - 1 > s = v1^2 + v2^2 > } until ( s < 1 ) > x1 = v1 * sqrt(-2 * ln(s) / s) > x2 = v2 * sqrt(-2 * ln(s) / s) My friend's four year old daughter is always amazed when I speak to her mother in Czech. No matter how hard I try, I am not able to explain that some people just speak different languages. She is also convinced, that the English is much simpler. Any suggestions? zdenek P.S. Something tells me, that this might not be the best newsgroup for my question. Sorry. ------------------------------------------------------------------------- Men are four: He who knows and knows that he knows, he is wise - follow him; He who knows and knows not that he knows, he is asleep - wake him; He who knows not and knows that he knows not, he is simple - teach him; He who knows not and knows not that he knows not, he is a fool - shun him! zdenek@CS.COLUMBIA.EDU or ...!seismo!columbia!cs!zdenek Zdenek Radouch, 457 Computer Science, Columbia University, 500 West 120th St., New York, NY 10027