Monday 16 September 2013

Maidens and Vampires

A recent pub dinner with a friend turned into a rather geeky trading of logic-and-mathematical puzzles.  I have a couple of interesting ones used for interviewing potential undergraduates, and he has some to help make his somewhere-between-primary-and-secondary age pupils think.

One we spent a while discussing was the vampires and maidens problem.  In short, three vampires and three maidens need to travel from one floor to another of a building, using a lift that can carry up to two people.  Some extra constraints: the lift needs someone in it to move (as my friend pointed out, this problem really would be better stated using a boat and two shores, but I guess all those boats are busy moving cabbages and foxes...), and if any maidens are left alone with a greater number of vampires, they get turned into lunch.  Can you come up with a plan to move all six from one floor to another without breaking the rules?

A verbal discussion of the problem very quickly becomes unwieldy, so it wasn't long until my notebook came out and diagrams were drawn.  Based on the diagrams and discussion, there were several interesting observations we managed to make about the puzzle.  The moves going back from the end are a mirror of those from the start (from the start, one or two vampires, or a vampire and a maiden could leave.  To reach the end, one or two vampires, or a vampire and a maiden could arrive).  It also is really important to track where the lift is when drawing pictures, lest you try and teleport a maiden!

Since I've been reading up and thinking a lot about visualising information for clear explanations recently, I thought it'd be fun to try and apply some of that thought to both the problem and solution.  In reality, it's not a very hard problem once you understand it (certainly it doesn't have a hugely branching state space), but I guess for kids it could be used as a good introduction to thinking about enumerating possibilities, of logically structuring thought about a problem, of exploiting symmetries, and drawing insights. Or something.  I also added in the fun challenge of trying to describe this problem through the medium (tedium?) of poetry.





One note, if you Google for this problem you'll find it's usually stated (e.g. in Dara O'Briains School Of Hard Sums) as from the ground floor to the top floor.  For the dual purposes of having the six actors adjacent to the line introducing them, and to make the third line of the poem work, I switched the direction of travel.

Super-high res versions in-case anyone wants to actually turn them into posters (if you do - I'd be interested in knowing if they were useful!  Assume the graphics are licensed CC-By-SA).

Saturday 14 September 2013

Paranoia

"You're a skinny mother******, ain't ya?"
Well yes, I guess I am, I thought.  Though right now that's probably the last observation I expect you to be making, given the circumstances.  I roll my eyes and simply point at the open door.  My friendly insulter nonchalantly saunters out, heading down the stairs as I close the door behind him.  Across the closed doorway my flatmate and I share a glance of utter disbelief, before he goes to return the rather sharp 6 inch knife in his hand to the kitchen.

It's weird the things that can mess with your head.  You can do, act or think "normally" every day, and then one tiny, incredibly unlikely thing happens, and you suddenly live in fear of something stupid that will never happen again. This results in you taking preventative measures to stop these things happening again, (even though they won't), and it slowly messes up your life, one newly acquired ritual at a time.

I have a vivid memory from my childhood of watching The Really Wild Show, and being informed by Michaela Strachan (who, Wikipedia has terrifyingly let me derive, would have been 27 at the time, which is younger than I am now!) that just thinking about insects crawling up your legs, or wriggling in your hair, or nuzzling into your ear, is enough to make you want to scratch or itch or scrape.  Since that lesson, I've found myself not too worried when I feel like something is wandering around inside my t-shirt.  I'll still scratch the afflicted area, but rationalize it as arm hair being squished against sleeve fabric or leg hairs and jeans rubbing the wrong way.  But I'll feel slightly smug and intelligent at understanding the complicated science of cloth causing thin hairs to press into nerves in my skin, and pleased that I'm not leaping to paranoid imaginings of something malevolent trying to turn me into lunch.

A few weeks ago, a nice summer morning.  My room is a little hot and I'm sleeping these days under a thin sheet as opposed to a full duvet.  A good night's sleep and I'm a little dozy in the morning.  I move, the sheet slips and I feel a little itch on my leg.  Something feels slightly unusual, but I dreamily scratch and it goes away.  A few minutes later and another itch on the other leg.  Another dreamy move of my hand to my leg. Another scratch and

YEOUCH!

The quiet sunny morning is broken by my yell.  The sheet flies off the bed, and a tiny black and yellow dot obliviously buzzes to the window and bumps into the glass.  Again, and again, and again.  I look at my painful thumb, it's (very slightly) swollen. Ow.

And so, eventually, we find ourselves at the first exemplar of my point.  I have been sleeping terribly recently.  Every shift of the sheet, every tickle of my leg hair, every bit of skin that changes temperature in the breeze from the window.  Every single thing that before would have been a simple scratch is now a battle not to turn on the light, strip the bed and re-assure myself there is no wasp out to eat me.  My smug knowledge that there is no insect has been gone, replaced with the overblown memory of that one time I went to itch and got (very mildly) stung in return.

At this point you might be wondering what my moaning about insects has to do with the me being insulted by a stoned guy at 2am.  Well that night also left me with a different irrational fear.  That of scaffolding.  Or, more precisely, scaffolding erected near to somewhere I'm living.  Like the wasp sting, it only takes one slumber to be broken by the sound of your flatmate rummaging through the knife draw in the kitchen to find something to use in self defence, followed by shouts of "who are you?" "what do you want?" out the French windows to an incoherent and rather smelly mass that found its way onto the balcony, for you to become scared of something.  And my mind decided to lock onto the tubular and wooden tower that had (most likely) given the guy access to our third floor exterior.

Back in the present, next door are having some work done, and a scaffolding tower has gone up very close to my window.  Those sleepless nights worrying about whether there are monsters in the bed have been made worse by constant worrying day and night about whether monsters will climb the tower and break in through the skylight.  To allay the panic, I make sure that I have closed all the windows before leaving (because, obviously, locked windows are like force-fields that will keep you safe).  Of course I don't really factor in that it's been a heatwave here recently, and I'm on the top floor, so it will be hot and sticky when I return, which makes it more likely for me to itch and think I'm being attacked by a wasp...

So what can you do?  Force yourself to remember that for over ten thousand sleeps you've only ever been awoken by a wasp once?  Take a deep breath, count to ten and decide that this time it is ok to go out with the window locked open instead of locked closed?  Take to the internet and inflict a thousand words of frustration on whichever kind souls are still reading this?  Or perhaps accept that things will rattle you sometimes, and you know what, that's ok.  Rituals fade and change over time, and as long as you can see them come and go without obsessing too much about them, then you'll be fine.  At least, that's what I tell myself.  Now if you'll excuse me, I need to roll up my jeans as it feels like something is crawling up my leg...