Average of sin^100(x).
June 10th, 2010I found an interesting math problem on The Reference Frame blog, concerning solving the average of the 100th power of sin(x). Mr. Motl, the blog author seemed to think that there is no fast 5 minute way to solve this problem, only to discover several exact attacks on the comments to complement his approximation.
All it takes is some fundamental concepts in complex analysis. To be fair, it took me more than 5 minutes to work it thru and correct some errors along the way. I’d say something like 10-15 minutes. Have to say to my defense though, that I did the work under being influenced by sleep deprivation (unfortunately I suffer from a sleep disorder).
Here’s a fast way to work out an exact result. First recognizing that sin(x)=(exp(i*x)-exp(-i*x))/(2*i) gets you (1/2^100)*sum(k=0..100)(100!/(k!*(100-k)!)*exp(i*x*(100-2*k)) after applying the 100th power and some binomial magic. Expanding the sum you can group the terms to form cosines in the form of (exp(i*x)+exp(-i*x))/2, whose average is ofcourse zero. The only term that contributes to the average is the exp(0)/2 term (since the binomial expansion is symmetric in this way) and you end up with 100!/(2^100*50!*50!) as the answer.
Unpopular science
May 4th, 2010I’m a big fan of pop science tv-shows; currently my playlist is loaded with Stephen Hawking’s new popular tv-series. I think it’s healthy to keep things in balance though, so why not add some counter weight with something that the physics community seems to consider very unpopular indeed.
David Bohm’s views about the foundations of quantum mechanics gave him a lot of flack from the physics community. Here he is in a long 5 part interview:
Lorenz model
April 27th, 2010To complement the FPU post below, here’s a similar approach to the well known Lorenz model used in chaos studies. There’s an increasing Rayleigh number used in the computation of this clip.
It’s obvious that there are very interesting regions of nonchaotic behaviour in the model.
Fermi-Pasta-Ulam
April 27th, 2010Current studies have led me to meddle with the famous FPU (Fermi-Pasta-Ulam) problem. Unsuprising event, since it is one of the cornerstones of the study of computational physics.
It was one of the first problems that was tackled not using analytic math tools, but using high speed digital computing. The reason behind this sort of approach was the difficulty of dealing with nonlinear equations; something that is near impossible to deal with exact analytical attacks. Digital computers and numerical analysis however is the ideal tool to conduct these sort of chaotic computational experiments with.
A lot has been written about the FPU problem (try the wikipedia article for a decent summary), but an immediate way to grasp the problem is by hearing how it sounds. The system described in the problem consists of masses coupled together, the usual scalar wave equation with nonlinear coupling terms added. Here the initial gaussian pulse oscillates in the system without damping and with increasing nonlinearity.
Another example is done with a custom VST plugin. The system is driven with two pulse oscillators.
Global mean temperature 1850-2009
December 25th, 2009How has the global mean temperature evolved in the past. This was a simple question I had that I couldn’t find a straight answer to. So, I set out to calculate it for myself; it would also serve as a nice simple exercise in statistics.
I started out from some MATLAB code I found on a climate blog and modified it to my own needs. The data comes from the NOAA GHCN database http://www.ncdc.noaa.gov/oa/climate/ghcn-monthly/index.php.
The methodology behind the code below can be easily verified from http://stattrek.com/AP-Statistics-4/Margin-Of-Error.aspx or from http://en.wikipedia.org/wiki/Confidence_interval for example.
More automata music.
October 11th, 2009I’ve been kept busy by Schrödinger, Fourier and Dirac lately, but I had some free time finally and put together a more refined way to derive musical (or so) structures out of one dimensional cellular automata system. Partly inspired by the excelent lectures on early finnish experimental electronic music scene at the local media art museum (see http://mansedanse.com/events_fi.html).
The algorithm quantizes the chromatic scale down to any arbitrary scale and picks up two notes to be played. This produces a more music-like result than the total chaos of applying the whole automata state straight to the chromatic scale.. though I’m not saying that it can’t produce interesting results.
http://www.punainen.org/~biotek/cell0011.mp3
http://www.punainen.org/~biotek/cell0012.mp3
Here is the MATLAB code responsible for these, keep in mind though that the quantizer code was written in the middle of the night (I think you can tell) so there are probably some glitches to it.
Old Connection Machine promotional videos.
August 31st, 2009Connection machines were a line of parallel supercomputers built by Thinking Machines Corporation. Notably Stephen Wolfram and Richard Feynman were involved in the early years of the corporation.
Here are some delightfully academic and stiff Thinking Machines Corp. promo videos from Youtube. The first one features some great footage from a lattice gas automata fluid dynamics model (I can’t believe it took a person year for the LGA model, I put one together in a week or so on MATLAB. My ego is pleased.)
Ironically Thinking Machines Corp. went bankcrupt in 1994, when parallel computing is a hot commodity today in 2009.
Automata music
August 25th, 2009What would be better application for one dimensional cellular automata than autogenerative electronic music. I know Wolfram Tones offers something along these lines but I set out to experiment on my own first with just the bare rules applied to the chromatic scale. Couple of important rules rendered on the chromatic scale:
http://www.punainen.org/~biotek/rule30.mp3
http://www.punainen.org/~biotek/rule110.mp3
These does seem to hold a eerie quality to them, not that anyone would recognize them as music. Next I cherrypicked a good set of rules which seemed to work nice enough when applied in a random order. I think I used the c major scale for this one.
http://www.students.tut.fi/~heikkara/autobach4002.mp3
That sounds a lot more like music, almost emotional at times. This is a Processing program playing midi notes to a Roland Jx-3p.
Science talks at bloggingheads.tv
August 25th, 2009Stephen Wolfram and George Johnson on ‘A New Kind Of Science’ (ie. on automata and computation.)
http://bloggingheads.tv/diavlogs/8986
Anthony Aguirre and Clifford Johnson chit chat about string theory vs. field theories, coupled with some cosmology.
http://www.bloggingheads.tv/diavlogs/22011
Sean Carroll and Mark Trodden from Cosmic Variance blog on the topic of cosmology, dark energy and other interesting issues.
http://bloggingheads.tv/diavlogs/21709
Peter Woit and Sabine Hossenfelder on various sociological issues concerning young theoretical physicists.