In a series of posts now imported to the Maplesoft blog (starting here), I have been talking about pseudo-random number sequences, but since part of what kicked off this series was a paper on true random number generation (with LASERS!) I thought I would share some routines I wrote that alllow you to use the two main true random number sources available on the web (neither using lasers, sadly).

I spent this past week preparing a Webex presentation to a client who was interested in using Maple for a physics course in chaos. Of the two texts selected for the course, I had one on my own bookshelf. So I scanned Steven Strogatz' text Nonlinear Dynamics and Chaos (Addison Wesley, 1994) for topics that would profit from investigation with Maple.

One of the best things about growing up in the “Hood” is that it feels really good when you leave. I grew up in a neighborhood called Downsview in Toronto whose claim to fame used to be it was the home to the DeHavilland Aircraft company but today is more associated with ongoing issues of crime, poverty, and many other urban illnesses. So every time I hear that someone from the Hood did something great, I take notice and I take special pride. This is the story about...

In this post I'll introduce is a nice visual test of randomness from signal processing. The main idea of this test to look at how a random sequence correlates with itself.

It's been a while since I wrote one of these random posts, but I still have a couple more I wanted to write. In this post, I want to describe one of the tests used in the paper that initially inspired this series of posts: the Wald-Wolfowitz runs test. This test is interesting in that it does not test for uniformity

A sign of a very successful period of work is the tally of how many email messages I’ve written that start with … “First, let me apologize for the delay in my response…” Yes, if you are the recipient of one of these notes from me, you’re probably more annoyed than pleased that I’m finding lots of very interesting things to fill up my ever-shrinking Outlook schedule. It’s been one heck of a summer, and I’m behind on countless...

As alluded to in my previous post in this series, one of the most straight forward ways to test if a PRNG is generating good random sequences is by examining the frequency of 0's and 1's. This is just a couple lines in Maple using Statistics:

(**) r1 := rand(0..1):L := [seq(r1(), i=1..10000)]:(**) n := nops(L); tally := `+`(op(L));(**) Statistics:-ChiSquareGoodnessOfFitTest( [n-tally, tally], [n/2, n/2], ':-output'=':-hypothesis');

Consider the following C code:

Today is my birthday, and in fact it is also the birthday of at least one other Maplesoft employee (not surprising since more than 23 people work here - considering the generalized birthday problem, I even know of 3 people here who share the same birthday). Of course, it turns out that birthdays are not evenly distributed through out the year and so I wanted to know if someone with an August birthday is more likely to share than someone with an April birthday.

Continuing on in this series of posts, here is a way to test the randomness of a sequence of bits from a PRNG that is the appropriate to the first morning back after the August long weekend. It is a very fast, and not very formal test done by checking how well a sequence compresses. This is really easy in Maple 14, with the new commands ?StringTools:-Compress and StringTools:-Uncompress which use ...

A while back, someone asked me for a good way to plot a Klein Bottle in Maple. I didn't have a good answer at the time, but I recently stumbled upon the following, which does a pretty good job if you don't mind the use of Heaviside in the parameterization.

plot3d( [4*(1-1/2*cos(u))*sin(v), 6*cos(u)*(1+sin(u))+4*(1-1/2*cos(u))*(cos(u)*(1-Heaviside(u-Pi))+Heaviside(u-Pi))*cos(v+Pi*Heaviside(u-Pi)),

In a previous post, I promised to write about testing the quality of pseudo-random number sequences. I'll post later about some of the statistical tests often used, but I first wanted to mention a sort of practical test one can do. One of the many things you might want to do with pseudorandomly generated numbers is Monte Carlo integration/simulatation/etc. As mentioned by acer in this comment, Monte Carlo integration can be shown to work better with some of the pseudorandom number generators (PRNGs) which are considered inferior in a statistical sense. In this post, we will play with a simple Monte Carlo approximation of π.

The hardest and/or most important part of answering a question is making sure the real question is understood. The July 1, 2010 question Using fsolve with a dispersion relation posted to MaplePrimes seemed to be about obtaining a numeric solution of an equation. Turns out it was more a question about the behavior of an implicit function.

This week, I had the pleasure of attending a rock concert with my son Eric who is now about to turn 15 and who has turned out to possess non-trivial interests and talents in music. The concert was by the band Rush who, to the uninitiated, would be yet another big, loud, over-produced rock band. But to a generation of technocrats (e.g. yours truly) educated from the late 1970’s and on, they are the band of choice due to an intriguing mix of musicianship, technological...

The greatest benefits from bringing Maple into the classroom are realized when the static pedagogy of a printed textbook is enlivened by the interplay of symbolic, graphic, and numeric calculations made possible by technology. It is not enough merely to compute or check answers with Maple. To stop after noting that indeed, Maple can compute the correct answer is not a pedagogical breakthrough.

You must be logged into your Facebook account in order to share via Facebook.

Click the button below to share this on Google+. A new window will open.

You must be logged in to your Twitter account in order to share. Click the button below to login (a new window will open.)

Please log-in to your MaplePrimes account.

Wrong Email/Password. Please try again.

See All