Posted on February 13th, 2010

Marvellous visualization of where friends tend to cluster in Facebook. Apparently everyone in Dixie knows someone in Atlanta and all the Mormons are friends with each other.
My latest visualization shows the information by location, with connections drawn between places that share friends. For example, a lot of people in LA have friends in San Francisco, so there’s a line between them.
Looking at the network of US cities, it’s been remarkable to see how groups of them form clusters, with strong connections locally but few contacts outside the cluster. For example Columbus, OH and Charleston WV are nearby as the crow flies, but share few connections, with Columbus clearly part of the North, and Charleston tied to the South:
Take a look at his country-level visualization too.
Posted on July 16th, 2009
Regular readers know that I am a big fan of Better Explained in which Kalid makes mathematical ideas accessible.
Today’s installment:
Integration is just multiplication when one of the operands is changing.
Most people grok integration as area under a curve but, as Kalid explains, area is just one convenient way of visualizing multiplication…but we don’t need to visualize multiplication as multiplication is already pretty straightforward - in the simplest case, it’s just repeated addition.
Many ideas in maths start out simple like that and then gradually generalize to a more complex idea. In Kalid’s words:
Our understanding of multiplication changed over time:
- With integers (3 × 4), multiplication is repeated addition
- With real numbers (3.12 x sqrt(2)), multiplication is scaling
- With negative numbers (-2.3 * 4.3), multiplication is flipping and scaling
- With complex numbers (3 * 3i), multiplication is rotating and scaling
We’re evolving towards a general notion of “applying” one number to another, and the properties we apply (repeated counting, scaling, flipping or rotating) can vary. Integration is another step along this path.
In other words,
Integration is just a better multiplication
or, conversely,
Multiplication is a special case of integration when the values are static.
Posted on March 14th, 2009
Whereas the constitution sets clear boundaries on the authority of the Federal government.
Whereas the federal government has no business defining basic mathematical constants.
Resolved, that theories, definitions and celebrations of Π should be left to the various States.
Posted on January 8th, 2009
Last time I visited Better Explanations, I got stuck there for hours. I resisted this time once I realized I was reading all the same articles for a second time.
Today’s bait showed up in my RSS feed.
Suppose we want to define a “cat”:
- Caveman definition: A furry animal with claws, teeth, a tail, 4 legs, that purrs when happy and hisses when angry…
- Evolutionary definition: Mammalian descendants of a certain species (F. catus), sharing certain characteristics…
- Modern definition: You call those definitions? Cats are animals sharing the following DNA: ACATACATACATACAT…
The modern definition is precise, sure. But is it the best? Is it what you’d teach a child learning the word? Does it give better insight into the “catness” of the animal? Not really. The modern definition is useful, but after getting an understanding of what a cat is. It shouldn’t be our starting point.
He goes on to explain that, when we teach biology to little kids we start with the simple definition and only gradually work our way up to the modern definition. But when we teach maths, we leap straight in to the modern definition and start teaching them the formula - so they never really understand the basic concepts behind the formula.
He illustrates his point by walking through what it means to be a circle and what e is all about.
Cool stuff.
Posted on August 29th, 2008
Since I have access to all the songs in the world I told Rhapsody to just play me some songs that you think I might like.
Rhapsody thought I might like to listen to some Kate Bush which was nice because I haven’t listened to Kate Bush since I was about thirteen with hormones and she was about 19 and hot and she lived in the same town as me - Bexleyheath.

I listened to a few familiar tracks - weird as ever - and then suddenly our Kate seemed to be singing “three point one four one five nine…”. That’s odd I thought and glanced at the title.
Sure enough, the song was called π.
“I wonder if there is a story behind the song?” I wondered. And googled.
The song is fairly recent and is a tribute to a man who is infatuated with everyone’s favourite transcendental number.
It starts…
“Sweet and gentle and sensitive man
With an obsessive nature and deep fascination for numbers
And a complete infatuation with the calculation of PI
…and then continues with Kate singing the first 150 digits of pi…but she gets it wrong! She skips a few around 137!
Clearly Kate is much too smart to make a mistake like that and there is bound to be a fascinating explanation…and…the interwebs are full of them.
Some of my favourites:
the best Craftsmen always make one deliberate mistake in anything they create so that the Gods don’t punish them for their arrowgance.
The supposed mistakes in pi are all deliberate, and she has actually used them (and lots of other tricks) to embed a secret message in the song. It is our job to decode what that message is.
If that’s what Kate says pi is, then thats good enough for me. I’m hacking my calculator and patching my maths libraries.
And my favourite theory of all:
Kate Bush has been looking all her life for a man who is so geeky that he would notice an error in the Pi song. She’ll be reading your blog and fantasising about you now, you lucky bugger,
Ever wondered why there are 360 degrees?
Constellations make a circle throughout the year — ever see the Big Dipper upside down sometimes? (Never fear, it’ll be rightside-up in 6 months). Here’s a theory about how degrees came to pass:
- Humans noticed that constellations moved in a full circle every year
- Every day, they moved a tiny bit (” a degree”)
- Since a year has about 360 days, a circle had 360 degrees
But, but… why not 365 degrees in a circle?
Cut ‘em some slack: they had sundials and didn’t know a year should have a convenient 365.242199 degrees like you do.
360 is close enough for government work. It fits nicely into the Babylonian base-60 number system, and divides well (by 2, 3, 4, 6, 10, 12, 15, 30, 45, 90… you get the idea).
According to Better Explained, degrees are subjective but radians are objective.
A degree is the amount I, an observer, need to tilt my head to see you, the mover. It’s a tad self-centered, don’t you think?
…
Much of physics (and life!) involves leaving your reference frame and seeing things from another’s viewpoint. Instead of wondering how far we tilted our heads, consider how far the other person moved.
Posted on June 22nd, 2008
To save you going all the way to Project Euler to read it, I have copied problem 12 here for your puzzle solving convenience…
The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28.
The first ten terms would be:
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, …
Let us list the factors of the first seven triangle numbers:
1: 1
3: 1,3
6: 1,2,3,6
10: 1,2,5,10
15: 1,3,5,15
21: 1,3,7,21
28: 1,2,4,7,14,28
We can see that 28 is the first triangle number to have over five divisors.
What is the value of the first triangle number to have over five hundred divisors?
In case you were wondering, the answer to problem 10 is
primes = Primes.new
puts primes.find_primes_less_than(2000000).inject{|s,n| s+n}
How come inject and collect haven’t caught on in other languages? They are awesome.
Posted on June 21st, 2008
According to Kurzweil, the singularity (the moment when we will start to invent things instantaneously) will occur in 2045. According to me the singularity (the moment when I forget things fast than I can learn things) occurs in 2009.
Every time I start over with Ruby (or XSLT or …) I find that I have forgotten the most basic things (like how to construct an object).
Anyway, thanks to Project Euler (according to which, I am 4% genius), I had an excuse to go go back and learn Ruby all over again.
Here’s my prime number generator (which is about a third of the size of my Java version):
class Primes
def initialize
@primes = []
@next_candidate = 2
end
def prime? number
root = Math.sqrt number
find_primes_less_than root
@primes.each do |prime|
return true if prime > root
return false if number % prime == 0
end
end
def find_primes_less_than limit
until @next_candidate > limit
@primes << @next_candidate if prime? @next_candidate
@next_candidate += 1
end
end
def [] index
until @primes.size > index
find_primes_less_than @next_candidate + 100
end
return @primes[index]
end
end
The answer to problem #7 is @primes[10000], in case you were wondering.
Posted on June 15th, 2008
Project Euler. Wasting time with Maths.
My attempt at #3 is running now (which probably means it is wrong).
Posted on June 16th, 2007
When I was at grammar school, I used to rank the subjects according to how ‘like maths‘ they were.
We were taught chemistry, physics and biology as separate subjects and, while I enjoyed all the sciences, I enjoyed physics the most because it was more mathematical. Chemistry had less maths and biology, at that level, hardly any at all. In my 11 year old mind, physics was pretty much just applied maths and therefore fun.
In geography, we covered such topics as map reading, how rocks are formed and weather but I never thought of it as science because science was something I enjoyed and I didn’t enjoy geography. Geography had a little bit of counting, measuring and charting but less maths than the sciences. History had no maths at all and I hated it.
At Dylan’s school, they have a single subject called science and they cover such topics as map reading, how rocks are formed and weather. Dylan hates it. In 7th grade he’ll do life science but he already knows he’ll hate it because he hates science. It’s like they want to avoid exposing kids to the hard sciences until it’s too late. Until they have formed an opinion one way or the other.
I have this theory that the people who design school curricula don’t really like science or maths but they know it’s important to the economy and that not enough people are following science careers. The remedy? Make the science in schools appealing to people who don’t like science!
I wonder if they stop to consider the effect it has on people who actually like science? If a kid likes science would making it less science-y make him like it more or less?
I know the answer for me and I know the answer for Dylan. Maths good. Science good. The more the better.