22 Aug

formula for figuring out keys

I was just looking at scales and trying to memorise how many sharps and flats each key has.

In short: count the sharps. multiply by 7. divide by 12. add the remainder in semi-tones to C. that’s the key. For flats, subtract the remainder from C.

The usual way to do this is to use the “circle of fifths” diagram:

In that, you count clockwise from C to find keys with sharps in them, and anti-clockwise for flats.

For example:

This key has 3 sharps, so you count three keys to the right of C, and that makes it A major.

If you want the minor key, then do the same, but then subtract 3 semi-tones from it, and you get F#m.

Now, what if you’ve a crap memory like me? There’s no bloody way I could remember a complex diagram like that.

Simple – let’s look at another variant of the diagram:

In this diagram, in order to figure out the key, you follow the lines; anti-clockwise for sharps, and clockwise for flats. For a key with 3 sharps, you start on C, then follow the lines 3 times, through G and D to A.

Yes, it’s another diagram, but look at the lines – they’re perfectly regular, which means that a formula can be built from it.

The formula is simply this: sharps * 7 % 12. Then add the result in semi-tones to C and you get the answer.

Examples:

CC#
D♭
DD#
E♭
EFF#
G♭
GG#
A♭
AA#
B♭
BC
0123456789101112
  • 1 sharp: 1*7=7. 7%12=7. 7 is G
  • 2 sharps: 2*7=14. 14%12=2. 2 is D
  • 3 sharps: 3*7=21. 21%12=9. 9 is A

For flats, subtract the result from 12 to get the answer:

  • 1 flat: 1*7=7. 7%12=7. 12-7=5. 5 is F
  • 2 flats: 2*7=14. 14%12=2. 12-2=10. 10 is B♭
  • 3 flats: 3*7=21. 21%12=9. 12-9=3. 3 is E♭
22 May

monty hall – how it works

I was lying in bed last night, wondering how the Monty Hall trick works, and finally figured it out by twisting around my perception of the problem.

What is the Monty Hall problem? Consider three doors. Behind one is a car, and behind two others are goats. You are asked to choose one door – if it’s the one with the car, you win. otherwise, you lose.

you choose one car. Then Monty (the gameshow host) opens one of the other doors to show a goat behind it. You are given the chance to change your choice of door to the other closed one – should you?

The answer is Yes. the /intuitive/ answer is that there is a 50% chance either way, but mathematically, there is actually a 66% chance.

Took me a good few minutes to figure out how to verify it. I kept thinking of it as “there is a 33% chance of me picking the right one. door opens. I now have… 50%?”. Couldn’t seem to make the leap for some reason.

That was a result of wrong perception – you need to think of it from the point of view of what is /not/ the right door.

  1. choose one door. the chance of the car being behind one of the other doors is 66%.
  2. one of the other doors opens. the chance is still 66%!.
  3. You now have two closed doors. the door you /did not originally choose/ has a higher chance than the one you did choose, so you should switch.
14 Feb

couple of globe puzzles

I was thinking about the Earth on the way to work today. Here are a few puzzles I compiled on the way:

  1. you are standing an the north pole. you travel 8000 miles south, then 8000 miles east, then 8000 miles south again. How far are you from the north pole?
  2. you are standing on the north pole. you travel 3 miles east, then 4 miles south. how far are you from the north pole?
  3. you are standing on the north pole. you travel 3 miles south, then 4 miles east. how far are you from the north pole?

try to guess the answers – they’re not as obvious as they seem.

of course, I suspect that anyone that reads my blog has already guessed the answers…

you probably think it’s very easy, don’t you!

here’re the answers for those people that didn’t figure them out:

  1. trick question. you cannot travel 16000 miles south because the circumference of the earth between the two poles is only 24860 miles, meaning that the maximum distance you can travel south 12430 miles.
  2. trick question. when standing on the north pole, you cannot travel east or west, as they’re one dimensional at that point (no, turning around is not traveling).
  3. not a trick question, but also not obvious. the first answer to pop into someone’s head would be 5 miles (via Pythagoras), but you need to remember that the Earth is not flat – if you are 3 miles south, you could travel a million miles east and still be 3 miles south. The answer is 3 miles.
16 Oct

coin flip trick

This is a “rounds” trick for deciding who buys the round when you’re drinking with two friends. You won’t win all the time, but your drinks bill will be cut by 25%.

You’ll need an accomplice and a victim (the person you want to pay for the drinks). The only instruction to the accomplice is that when your left palm is up, bet ‘heads’. otherwise, bet ‘tails’.

  • flip a coin with your right hand.
  • your left hand should be turned randomly palm up or palm down.
  • as the coin comes down. slap it onto the left arm with your right hand (in the usual manner) such that no-one knows what it is.
  • if the palm is up, you and your accomplice say ‘heads’. otherwise say ‘tails’.
  • if all calls are the same, do the toss again.
  • if the victim gets the call wrong, he pays for 3 drinks. otherwise, you and your accomplice buy 1.5 drinks each.

On average, you and your accomplice will pay for .75 drinks per round, and your victim will pay for 1.5 drinks per round.

You can also do this with cards. shuffle a deck and remove one card face down. bet on whether it is odd or even. As long as you and your accomplice always bet the exact same, the drinks payment ratio will be the same even though you only ‘win’ 50% of the time.

On reflection, 25% is not an amazing saving, but those are the thoughts that I go to sleep with…