John May

Dr. John May

2571 Reputation

18 Badges

16 years, 16 days
Maplesoft
Pasadena, California, United States

Social Networks and Content at Maplesoft.com

Maple Application Center
I have been a part of the Mathematical Software Group at Maplesoft since 2007. I have a Ph.D in Mathematics from North Carolina State University as well as Masters and Bachelors degrees from the University of Oregon. I have been working on research in computational mathematics since 1997. I currently work on symbolic solvers and visualization as well as other subsystems of Maple.

MaplePrimes Activity


These are Posts that have been published by John May

It always makes me happy to see people using Maple for interesting things.  So I was pleased to see this blog post on Technology Review about this paper on arXiv on quantum randomness.  In this case, they are just comparing random numbers generated from lasers (this is why physicists get better press than mathematicians: LASERS!) with pseudo-random numbers generated using Meresenne Twister implemented in Maple, pseudo-random numbers generated using a Celluar Automata method implemented in another computer algebra system, and then binary digits of π treated as a pseudo-random sequence.  (Spoiler: the lasers win)

While not a particularly interesting use of computer algebra systems, it did inspire me to revisit my old blog post on pseudo-random numbers in Maple and now I am working on a follow up that talks about some of the mathematical and statitical tests used to test the quality of pseudo-random number sequences which I hope to post soon.

A long while ago, I wrote a couple posts (part1 and part2) about mining data from the US SSA website.  I subsequently adapted the code from those blog posts into a visual application with sliders and interactive plots.  If you have played with the new ?MapleCloud functionality in Maple 14, you may have seen it posted already.

Every year my extended family does a "secret santa" gift exchange. Each person draws another person at random and then gets a gift for them. At first, none of my siblings were married, and so the draw was completely random. Then, as people got married, we added the restriction that spouses should not draw each others names. This restriction meant that we moved from using slips of paper on a hat to using a simple computer program to choose names. Then people began to complain when they would get the same person two years in a row, so the program was modified to keep some history and avoid giving anyone a name in their recent history. This year, not everyone was participating, and so after removing names, and limiting the number of exclusions to four per person, I had data something like this:

I recently ran into an interesting twist on the infamous Maple anti-pattern:

# A very garbagey way to build a list
l := [];
for i from 1 to 10000 by 100 do
l := [op(l), isqrt(abs(floor((5000-i)/2)))];
end do;

A lot of users fall prey to this method of building a list rather than using :

# generate a list without extraneous garbage
l := [seq(isqrt(abs(floor((5000-i)/2))),i=1..10000,100)];

To celebrate 3.14 for 2009, I made the attached worksheet with an interactive Pi Chart (also a pie chart) to plot the relative frequency of the digits of pi in various bases.  Enjoy.


View 5480_PiFreq-component.mw on MapleNet or Download 5480_PiFreq-component.mw
View file details

 

The guts of the worksheet is the following:

basesymbols := Array(0..35, ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]):

n := 200; # number of digits
k := 10; # base 
N := ceil(log[10](k)*n)+1;

approxPi := round(evalf[N+1]((Pi-3)*10^(N))):

PiList := map(x->basesymbols[x],convert(approxPi, base, k)): 

PiString := cat(op(map(convert, PiList[1..n], string))):

T := [StringTools:-CharacterFrequencies(PiString)]:

Statistics:-PieChart(T, color=blue..magenta);

 

5 6 7 8 9 Page 7 of 9