Sunday, May 12, 2013

How to listen to Podcast Lectures using the Sansa Clip+ portable player

I recently bought a Sansa Clip+ music player. It is like the older generation iPod Nano but much less expensive since it is not made by Apple. I use it primarily to listen to podcasts - specifically, recorded lectures of university classes. There are a wide array of fascinating topics to listen to, from high-quality places like Yale and MIT where physically sitting in the class as a student would cost, quite literally, thousands of dollars. I particularly like listening to Humanities classes, since you can generally follow along quite well with just the audio. This past winter I listened to an excellent Philosophy class by Shelly Kagan at Yale. I am currently enjoying a seminar on Tolkien's The Silmarillion by "The Tolkien Professor".

Saturday, January 26, 2013

Complex Numbers

In Imaginary Numbers I presented one way of thinking about complex numbers - numbers like the square root of negative one, which do not "exist" in the "real" world, but which are nevertheless quite useful in many scientific applications.

That article motivated imaginary numbers as the solution to word problems like "find a number whose square is -1", just as negative numbers solve word problems like "find a number which when added to 5 gives 2". Today I'd like to show you a different way of thinking about them.

Saturday, December 1, 2012

Algorithmic Music

I recently came across a fascinating article that shows how to produce music using a one-line C program. Granted, the musical result is not in the same league as a Bach fugue, but the fact that a 57 character C program can produce sound patterns with interesting dynamic textural variation is really neat. Particularly so because the formula only involves arithmetic and bitwise operations on whole numbers between 0 and 255: no trig functions, lookup tables, Fourier transforms, or any of the many other modern tricks for sound synthesis.

The original inventor of this technique is a Finnish artist/programmer called viznut. He posted several articles and video/sound-recordings about the idea in 2011, which then spawned a whole community of people doing experiments. You can find the original articles and listen to sound-clips at Algorithmic symphonies from one line of code -- how and why?.

Sunday, September 23, 2012

Measuring Complexity

How can we measure complexity? Whether we examine the pattern of notes of a piece of music, the pattern of light and color in a painting, or the pattern of architectural features in a building, it is intuitively clear that some patterns are more complex than others. Is there a way to quantify this idea mathematically? Yes; in fact, there are several ways, with interesting connections to Information Theory and Entropy.

Today we begin with a short illustration of one approach (known as Kolmogorov-Chaitin Complexity) from Guest Author Nikos A. Salingaros, Professor of Mathematics, Urbanist & Architectural Theorist at the University of Texas at San Antonio. I will follow his contribution with a few additional remarks of my own.



Kolmogorov-Chaitin Complexity

Nikos A. Salingaros, The University of Texas at San Antonio.

Saturday, August 11, 2012

What is the difference between Just Intonation and Equal Temperament?

Music has many connections with mathematics. Approximately 2500 years ago, the ancient Greek mathematician Pythagoras and his students observed that the sounds of two plucked strings blend nicely if the ratio of their lengths is a ratio of small whole numbers. Today I want to explore the way our modern Western 12-note musical scale relates to that observation.

Thursday, July 19, 2012

Random Walks and Gambler's Ruin

Suppose you have $100 and you decide to go to a casino to try to double your money. Are you better off putting the whole $100 on a single bet, or should you make a lot of smaller bets? Maybe you should adjust the size of your bet as the evening progresses? Should you stop as soon as you reach $200 (if you ever do), or keep going?

Lots of people have opinions about questions like these. Today, I will show you how to calculate the correct answers yourself with just a few lines of code in R. Even better, you will understand the approach, which means you can do your own analysis of whatever strategy you want to test. And best of all, it's free: no need to spend real money at an actual casino to find out.

Saturday, June 23, 2012

Try the new Google "doodle" in honor of Alan Turing

[update: the doodle is still available for use at http://www.google.com/doodles/alan-turings-100th-birthday]

This is very cool - today only, Google's "doodle" on their main search page is a cool visualization of a Turing Machine, in honor of Alan Turing's hundredth birthday.

You should go to https://www.google.com/ and try it out. There is no user manual - it is a brain teaser. It's not actually all that difficult, because it trains you step by step in what the symbols mean - you just have to be willing to experiment a little at the beginning. If you need a little help, I'll say a little more at the end of this post.



Alan Turing was a great mathematician and computer scientist. Among other things, he played a major role in helping the Allies secretly break the Nazi enigma code during World War II, which provided Brittan and the US with critical intelligence. He also played a major role in inventing the theory of modern computers, all of which are equivalent to the "Turing Machine" he invented. By "equivalent", we mean that today's computers may run faster with modern electronics, and may be connected to fancy devices like color screens and mice, but in terms of what sorts of problems they can calculate solutions for, they are identical.

The "Turing Machine" implements all the basic capabilities of any modern computer, specifically the ability to execute a stored program that can branch and loop. As visualized in the Google doodle, it has an infinite "magnetic tape" (like memory or disk in a modern computer). It is limited to "addressing" the tape at one particular spot (the central "read/write" head), so to access an arbitrary position on the tape, the program must execute commands that wind it forward or backward one square at a time.

In the Google doodle, the program is represented by symbols, some of which you can click on to modify the program so it does something else. Clicking the Run button runs the program, which modifies the initial configuration of the tape (consisting of zeros and ones, and blanks) into some other configuration. The goal is to make the tape show the same pattern of zeros and ones as in the goal window; if you do, the "G" in Google will light up, and the machine will reset with a new goal and a more complex programming challenge. Solving that makes the "o" light up, and after a couple minutes you can get the whole word "Google" to light up. You should try it - it is a lot of fun trying to figure out what the symbols mean. When you press run, it animates the running of the program so you can see what the symbols do and follow the logic. Then you can modify the program and try again. You don't "lose" anything by making mistakes, so feel free to experiment to learn.