Quantum Computing Work Experience – Week 2

August 21, 2009

Today concludes another fantastic week working at Imperial. This post will probably be a lot less massive than the previous one owing to time constraints (I’ve just come back from several exhausting hours of rock climbing at the Westway and Google Calendar tells me I have my driving theory test at some point in the near future).

Firstly, some pics to support stuff from my last post.

The entire table looks like this - I can understand why everything needs to be realigned and tweaked every 15 minutes for the experiment to work! The two blue lasers are I think the main cooling lasers, pumping from the ground to the high energy levels of Ca+.

This is a used Cu O-ring (actually called a gasket) - you can easily see where the knife edge bit into the Cu making a vacuum seal

This is a used Cu O-ring (actually called a gasket) - you can easily see where the knife edge bit into the Cu making a vacuum seal

A top view of the laser setup. You can see the diffraction grating (with an arrow drawn on it) and the connections to the piezo behind it. Click to embiggen.

A top view of the laser setup. You can see the diffraction grating (with an arrow drawn on it) and the connections to the piezo behind it. Click to embiggen.

Equipment

Tantalum Oven

This is the equipment used to produce neutral atoms which are to be ionised.

The oven is suspended between the two electrodes by a Ta wire. The Cu foil is there for a test run of the oven - if it works we should be able to see a spattering of grey Ca on the Cu.

The oven is suspended between the two electrodes by a Ta wire. The Cu foil is there for a test run of the oven - if it works we should be able to see a spattering of grey Ca on the Cu.

This is the plate on which the entire experiment (ion trap, oven and all) will sit. It will get inserted into one of the holes in the central 6-way cross can.

This is the plate on which the entire experiment (ion trap, oven and all) will sit. It will get inserted into one of the holes in the central 6-way cross can.

When I first heard they were going to use an oven, for some reason I imagined some sort of miniature baking oven that somehow emits atoms when turned on! The actual oven is actually a tiny 1cm long tube of tantalum (Ta), sealed at one end by essentially squashing the end, with a tiny hole in the middle of the tube. Ca shavings are stuffed into the open end before the oven is closed, again by squashing. The whole oven is attached by a piece of Ta wire to two electrical contacts across which a potential is applied. The Ta conducts current and heats up, acting as a heating filament. The Ca heats up and the most energetic atoms spit out of the hole (the process is basically evaporating the Ca at very low pressure and high temperature).

I asked why Ta is used – presumably Tungsten (W) has virtually the same properties in that it heats up when current flows through it, and since W is the metal of choice in light bulbs, presumably it’s cheaper? Apparently W can indeed be used; for such applications the criteria for metals are that they are UHV-suitable (don’t trap/adsorb other molecules/atoms on/to their surface which subsequently outgas, ruining Ultra-High Vacuums) and won’t melt at high temperatures. However Ta is normally more suitable than W because it’s more malleable (whereas W is very springy) and can be easily spot-welded (to stick the wire onto the oven). However thoriated W is better than Ta as an electron source since the thorium gives it a much lower workfunction, allowing more electrons to pop out for the same energy input.

Vacuum Pumps

In my previous post about this work experience I omitted some detail on the pumping that I learnt this week. As it turns out, the actual pumping requires three pumps. The first is a roughing pump, to get the pressure down to a very rough vacuum (~10-2 mbar). Here they were using a rotary vane pump:

This image was nicked from wiki

This image was nicked from wiki

Essentially as the off-centre internal cylinder turns, the vanes get longer / shorter accordingly such that the pressure at the input is always getting lower and at the output it’s always getting higher, forcing the air out of the output. The principle is essentially PV conservation.

The second stage is a turbo pump which is basically an electrical version of the intake fan of a jet engine. It spins extremely quickly (so quickly that it requires a low pressure to operate lest it smash itself to pieces) and the idea is that it spins so quickly that any molecule that hits a spinning blade hits the part of it such that it gets kicked outwards, away from the vacuum. This gets the pressure down to about 10-5 mbar. The final stage of course the ion pump.

When air is pumped out the can sits in an oven - the idea is to heat up anything that can outgas while pumping, making it outgas more, thus getting rid of outgassable stuff

When air is pumped out the can sits in an oven - the idea is to heat up anything that can outgas while pumping, making it outgas more, thus getting rid of 'outgassable' stuff

Wavelength Tuning using Iodine

There are several ways of tuning wavelength (I wrote something about the cavity method – setting up a standing wave – in my previous post), but I found this way of doing it particularly interesting. Like all other elements, iodine has a certain absorption spectrum, a feature used in star spectroscopy to determine elemental composition. But instead of doing what astronomers do (measure wavelengths to identify elements), here we were using a known map of iodine’s spectrum to tune the wavelength: light shining through the iodine has a certain attenuation which is dependent on the wavelength (owing to electron energy levels). By shifting the wavelength around using a piezoelectric it is possible to obtain a local iodine absorption spectrum (wavelength against intensity). By comparing this local spectrum with an ‘atlas’ – iodine’s spectrum for a large range of wavelengths, it is possible to locate the local spectrum within this atlas, thus identifying the wavelength. Apparently a narrow band of local spectrum is sufficient to identify a unique location in the atlas: there are no ‘repeats’. Whether this is non-repeating property is specific to iodine (hence its use) I’m not sure; the isotope used is radioactive so there must be some really good reason to want to use it!

Techniques and Procedures

Saturated Absorption Spectroscopy

All atoms radiate photons. However in a cloud of atoms these photons are affected by the Doppler shift owing to the random movement of the atoms, and a graph of frequency against intensity (basically a spectrum) shows an underlying distribution for this radiation. However the interesting bit of spectroscopy occurs on the surface of this curve, in the form of ‘ripples’ on the underlying curve’s surface. While a human can normally see the ripples roughly by eye, the underlying curve gets in the way of accuracy.

The solution is a method of somehow obtaining the underlying distribution without the ripples using lasers and subtracting this curve from the spectrum, resulting in a graph of just the ripples. I’m still clueless as to precisely how this works / is performed since I didn’t personally bear witness to the process (I heard something about matching lorentz curves to points but that was probably more to do with analysis of the ripples rather than the process of saturated absorption spectroscopy) so it looks like some wiki-ing is called for.

Walking the beam

This isn’t some physicist’s attempt to be a pirate and getting the words muddled; it’s actually a rather clever (though extremely time-consuming) method of aligning a laser beam. Bascially the ideal situation is a laser beam passes precisely through two points. This is very difficult to achieve with just one stand so a setup with mirrors is necessary. Here are several different failed attempts at diagram-ifying the thing:


The dotted lines were added by me to show where the beam will go

The dotted lines were added by me to show where the beam will go

At each of the two points the beam needs to go through an adjustable iris is placed (think circular doors in sci-fi films), and mirrors alpha and beta (making up the periscope) can be adjusted so the beam’s height (h) and angle of elevation (e) can be adjusted more or less independently. Then the following two-step process is iterated until the beam is almost exactly where it needs to be.

1. Open B completely, close A so it becomes a tiny hole, and adjust the laser so it goes through A using mirror alpha
2. Open A, close B so it becomes a tiny hole, and adjust the laser until it goes through B using mirror beta.

Illustrations of the steps are as follows:

For some reason it reminded me of numerical analysis / Newton Raphson type things – constantly optimising and getting closer and closer to perfection yet never reaching it. GL’s cobweb illustration of numerical analysis seemed particularly similar to this situation. Anyways while I quite like how it works, walking the beam does start to lose its novelty after doing it for a couple of hours…

Scanning Tunnelling Microscopy

Danny also explained some awesome stuff on this and how it works. Basically the idea of STM is to use quantum tunnelling calculations to make a map of a surface. A probe is held (say at +5V) very near a surface (grounded), and owing to quantum tunnelling, a certain current flows between the probe and the surface. This current is proportional to exp(-l) (or something like that) so it is possible to measure l to a very high degree of accuracy. As the probe is scanned across the surface, a matrix of measurements of l against (x,y) can be created, thus mapping the topology of the surface. This mapping can in fact be so accurate that it can pinpoint individual atoms sticking out from / adsorbed to an otherwise flat surface.

Conclusion

The last two weeks have been nothing short of awesome. I’ve learnt (and sometimes noted down) many new things on every one of the last ten working days and I’ve recounted here and in last week’s post merely a handful of the more interesting bits and pieces. I even solved an apparently insurmountable practical problem thus moving the entire scientific community forwards! I mean … I came up with a (pretty good) solution to unscrewing a stuck nut… Many thanks to Danny Segal for giving me such a wonderful opportunity.

There is one thing I still can’t work out though:


Quantum Computing Work Experience – Week 1

August 14, 2009
5W Green Laser used for pumping Titanium-Sapphire Laser

5W Green Laser used for pumping Titanium-Sapphire Laser

I’ve been looking forward to this for quite some time – two weeks of work experience in a lab at Imperial College working with some PhD students with an ultimate goal of making some progress towards the construction of a quantum computer that doesn’t take tens of man-hours to perform each calculation. After a week I feel I’ve learnt a lot about formal lab work and large-scale experiments (*slightly* different from the 20-minute assessed practicals from AS!) and about the general physics and concepts behind some of the experiments and equipment – I’ve been (not so) conscientiously filling pages of my notebook with messy notes and cryptic diagrams so hopefully some of the stuff I write here will make some vague sense and not quite directly contradict truth.

There are also several interesting bits and pieces lying around the place. There’s an enormous Newton’s Cradle in which each ball looks like it could be heavy enough to be a ship’s anchor. There are also enormous capacitors lying around everywhere for the people working on high-density fluxes.

Capacitor banks lying around

Capacitor banks lying around

The Building

The Physics / Maths / Computer Science part of Imperial is somewhat bizzarre – from what I gather it consists basically of two adjacent buildings which were built at different times and were haphazardly connected together by knocking down bits of walls. Unfortunately the actual floor levels are out of alignment and the floor heights are also different, which means there’s a crazy staircase joining the two buildings together and floors 6 and 7 in one of the buildings had to be rechristened 6 and 6M for the sake of keeping the numbering consistent with the lifts. There are also only connections on certain floors of each building so it’s possible to leave the Blackett Lab on the bottom floor, go up one level and be confronted with a solid-looking wall where the connection should be. As if things aren’t crazy enough, there’s a set of lifts placed almost exactly at the junction (so to speak) between the two buildings, making it really confusing to navigate the whole 3D maze. It’s pretty good fun actually!

The Lab and Equipment

Optics

I was quite surprised when I first saw the lab – I was expecting a Leonard Hofstadter style lab (as seen on The Big Bang Theory) but actually quantum computing with ions (ions therefore being the main focus of most of the projects which I’ll come to later) involves a fairly large amount of optics work, so each of two adjacent, connected labs I was working in has an optical table as its centrepiece littered with lasers and ridiculously complicated setups of mirrors and lenses which have been tuned very accurately to direct laser beams into tiny optical fibres and whatnot. Speaking of accuracy, the setups are so sensitive to small shifts that they need to be tuned almost constantly. The PhD students told me they detect a lot more drift during the daytime when other experiments are going on in other labs which release radio waves and traffic is rumbling overhead (despite being two floors below ground level and over a block away from a small road) than at night when there is less activity.

The equipment is also sensitive to tiny temperature fluctuations. Most of the lasers are basically diode lasers:

It’s a fairly standard laser setup in which electrons and holes come together in the depleted region between n and p type semiconductors and then either wait for a nanosecond or so before annihilating and releasing a photon (spontaneous emission) or get hit by a photon, resulting in stimulated emission. What was experimentally interesting was that the cavity length in fact determines the wavelength of the laser owing to the fact that a standing wave needs to be created which ‘fits’ exactly in the cavity (a whole number of half-wavelengths need to fit in the cavity) and this is sensitive to temperature. So each laser box has four BNC sockets: one for providing the laser with electricity, one for a thermistor which is hooked up to a feedback loop system which regulates temperature using a Peltier junction heat pump (which occupies another socket on the laser), and one for a piece of Piezo (placed on the diffraction grating) which can change width depending on the voltage across it (or maybe current through it, or something) thus allowing the cavity length to be adjusted, though my suggestion to manipulate the piezo in the feedback loop to compensate for temperature changes would fail since the temperature-dependent expansion of the cavity is several orders of magnitude greater than anything the piezo can correct. When I heard that I was pretty astonished the laser cavity had to be adjusted to such an exact length – several orders of magnitude more exact than the expansion of a bit of metal when raised by a few degrees. The entire laser is covered by a thick black piece of foam to protect it from temperature fluctuations in the room.

Electromagnets

It was pretty cool to find out that I was to be working in the same room as a 2.5 Tesla electromagnet! Ion trapping, as I will also come to later, involves not only charge and potential fields but also magnetic fields, so the Penning Trap the researchers there were using was sitting inside an enormous superconducting electromagnet.

The superconducting electromagnet uses liquid He to keep cool – as a sidenote I asked why they (and CERN) use cool superconductors (more expensive liquid He) instead of the more recently discovered crazy warm ones (cheap liquid N2); the reason is because above a certain current, superconductors end up failing and develop some resistance causing heat to be produced resulting in a quench (the He boils off, expands to something like 15x its volume and the whole can explodes in a fit of freezing fury), and the cool superconductors can carry a much higher current before this happens, allowing more powerful electromagnets. Of course this comes at a very high cost. As can be seen from the diagram, the He (at ~4K) is shielded from room temperature by a layer of liquid N2 (at a balmy ~77K). The He needs to be replaced about once every couple of months, while the N2 is replaced about twice a week. The superconducting coil, power supply and cables are eventually going to have 80A coursing through them – a truly formidable current!

Refilling with N2

Refilling with N2

N2 is very cold!

N2 is very cold!

Apparently the way they get the electromagnet to start conducting current is to simply arrange the coil in a loop – they can’t expose the 4K superconductor to air, so it is necessary to induce the current in the superconducting coil. Once this is done, the power supply can be switched off and the current in the superconductor just keeps going round (owing to the lack of resistance), allowing a very strong noise-less magnetic flux to be produced (the flux’s precision is something like 10-6%)

Vacuums

This was particularly new to me. I’d never worked with 2.5 Tesla or 5W lasers before, but while I’ve come across magnets and lasers in experiments, I’ve never really observed experiments involving vacuums before (apart from the bell-ringing-in-a-jar/gerbil-squeaking-in-a-jar one to show sound doesn’t travel well through a near-vacuum). There’s a lot of novel (to me) and interesting experimental stuff that goes on here.

Basically the idea of creating a seal when joining two flanges together is to use a copper O-ring. Each flange has a ‘knife edge’ (90° very sharp edge) and when they’re pressed together with a Cu O-ring in between, the knife edges cut into the soft Cu; thus the Cu itself becomes the seal.

While flicking through Inward Bound by Abraham Pais (recommended by CAPS) I read about various attempts at making a good vacuum pump. Modern technology has come a long way since the mercury-filled jar, and now creating a very good vacuum is a multi-stage process. First all the equipment is cleaned thoroughly – for some reason fats and oils from people’s hands (for example) are disastrous for a vacuum so everything needs to be wiped squeaky clean with something like acetone or isopropanol. Then everything is sat on the optical table which has a source of clean dust-free air on the ceiling which constantly blows on the equipment, keeping dust off and constantly cleaning it of bits of dust that have settled. Then everything is put together using gloves, nuts, bolts, Cu O-rings and *a lot* of effort (believe me, putting flanges on sideways while stopping the Cu O-ring from slipping out is infinitely more difficult than measuring SHM of a cork in a tub of water – reference to AS practical; one of the researchers also described putting He into the cannister having first cooled it sufficiently to stop everything boiling off immediately as a dark art rather than a science). The air is pumped out using a conventional pump until the pressure inside is something like 10-6 millibars, at which point an ion pump is turned on to essentially evacuate the remaining air molecule by molecule. The pump essentially ionises the gases inside the chamber and use charged plates to attract them out. The final result is a very good vacuum.

The Projects

Photon Ionisation

There was a MSC researcher from Germany sharing the lab with the PhD students from Imperial, and he was working on a different method of ionisation. The supervising prof, Dr Danny Segal (a reader in Quantum Optics), explained that the previous approach to getting ions was to use a ’splat gun’ approach – basically a stream of neutral atoms from an oven hits a stream of electrons from an electron gun, and those electrons will tend to knock out some electrons from the stream of particles, resulting in a few ions. This has a few problems: lots of atoms never get ionised so end up getting deposited on the side of the chamber, screwing up the shape of the potential well in the ion trap; lots of electrons end up floating around in the chamber and get deposited on insulators, again causing irregularities in charge distribution.

The German MSC researcher was working on using photons to create these ions – a much more tenuous stream of neutral particles is projected into a beam of photons which, via the photoelectric effect, knock out electrons creating ions. This should have a higher rate of ionisation leaving fewer ‘waste’ atoms sticking to the inside, and the number of photoelectrons knocking around the chamber should be much lower than the number of electrons being shot from the electron gun. I suggested the photons might knock electrons off other bits of the apparatus, again screwing up the flux; apparently this should happen infrequently enough to allow a reasonably controllable flux, though some researchers using a Paul trap (involving an oscillating EM field) apparently detected ionisation using photons of the wrong frequency for direct ionisation leading them to believe electrons were being knocked from the apparatus and these, accelerated by the oscillating field, slammed into atoms causing ionisation.

Anyways the setup was more or less thus (a picture is worth a thousand words):

The way to ionise these Ca atoms is to first use a laser to excite the atoms – push some electrons up to a higher energy level. The UV LED then does the actual ionisation from that energy level. The picture above is of a half-finished setup (optics haven’t been sorted out yet and there are two unsealed flanges).

Laser cooling

GSM/KPZ gave us an article in class last year about laser cooling (‘Cool things to do with lasers’, Ifan G Hughes et al 2007), and it turns out it’s useful for Quantum Computing – a jittery ion is presumably pretty bad for physicists who want a stable wavefunction. Well, here’s the setup.



Click to embiggen

It’s in fact mostly about using lasers to manipulate electron energy levels in a Ca+ ion:

The Ca+ ion has an energy level electrons can fall down to (RHS of diagram) where they would stay for quite long before falling back down which is undesirable considering the cooling involves shuttling electrons between the leftmost levels (in the diagram). So four red lasers are required to pump those back up to the top energy level.

QED

I’m not really sure what’s going on in this experiment but basically, since QED is only significant at high charges (something like that), the researchers go to GSI to conduct this research. The idea at GSI is to slam super-high energy ions through a gold foil which apparently strips them of all electrons. Different ions are separated via a very similar system to how a mass spec works.

Some Other Physics-ey Stuff

Ion Trapping

There are of course lots of different methods of trapping ions – I mentioned one in my post about the UCL antimatter lecture. Apparently it’s provable from Maxwell’s equations that it is impossible to create a static 3-dimensional potential well to trap ions, so there are currently two main methods: using a purely electromagnetic system (using either some feedback system to wobble the ions towards the centre of the trap or a constantly oscillating field like in a Paul trap), or to use magnets:

A cation is sitting at the bottom of a potential well in the z direction. It is surrounded in the xy plane by oppositely charged plates. As it is attracted to the plates, the z-directional magnetic field causes it to move in a circular motion (as seen in cloud / bubble chambers to determine momenta of ejected charged particles), represented on the diagram by ‘micro OOO’. The charge on the plates are then somehow tuned to make the large-scale motion of the particle resemble a circle and so it eventually loops back on itself, so its path shape looks like what is labelled in the diagram as ‘tuned, get O’

The Ca+ Ion

The actual quantum computation to be done with the Ca+ ion (not a typo: just one +; this isn’t chemistry!) involves electron energy levels. An electron can be in one of two energy levels, and that is the qubit. In Ca+ there are two more or less independent distinct situations in which an electron can be in one of two energy levels, allowing two qubits to be encoded into one ion.

The use of this isn’t only to cram more qubits into fewer ions (I read a research group somewhere is making base-5 ‘qudits’ using microwaves and superconducting things) but also to allow easier entanglement – since both qubits are in the same ion it’s supposedly easier to make them interfere in a predictable manner, which allows a quantum NOT gate to be set up which is critical to quantum computing; supposedly only two research groups in the world have managed to get this quantum NOT gate to work.

Ion hopping

The biggest limitation apart from the sheer fiddly-ness and slowness of everything in the quantum computing world is the fact that it’s impossible to put more than about 8 ions in one trap before they start screwing up each others’ wavefunctions. The PhD researchers had previously been working on a solution to this problem that the theorists came up with – getting the ions to hop around in the trap, thus manipulating each ion more or less individually. This has already been done using Paul traps (I think) but the researchers here were trying to use Penning traps and show they are in fact better for quantum computing (or at least can do the same things as Paul traps).

Overall

There’s a lot more I would say if I had the time but as with all blog posts, you’ve got to stop somewhere. But overall I’ve never done modern practical physics before (at UCL we looked at some particle traces on the computers which is the closest I’ve really got so far) so this is a pretty damn amazing experience for me, hence the mega-post.

Introducing: the worlds smallest allen key!

Introducing: the world's smallest allen key!


Aerospace Challenge Finals at Cranfield

August 1, 2009

Last week I was in Cranfield participating in the Aerospace Challenge Finals. The challenge this year was to come up with a design for a device to drop humanitarian aid accurately (within 20 metres of a target) from 3000 metres up. Our idea managed to make it to the finals which turned out to be a week of lectures on general aerospace engineering, activities and flying! Photos are here.

Flying

Each person got two flying experiences, both of which included some time piloting the aircraft: about 10-20 minutes in a helicopter and about half an hour in a fixed-wing plane.

My first flying experience was with a small Robinson helicopter, which can only really be described as terrifyingly, exhilaratingly awesome. The pilot managed the take-off which was one of the most breathtaking experiences I’ve ever had – in a helicopter you’re literally sitting in a big transparent flying bubble with the engine behind you, so the view and experience is truly amazing as the land falls away beneath you… I later took over and found control extremely difficult – even a tiny movement of the stick causes the vehicle to tilt violently in that direction making a beginner like me very prone to overcorrection leading to a serious case of increasing-amplitude SHM! The actual stick is situated between the pilot and the copilot and a rotating handle is stuck on the end allowing dual control, so my rather flailing and uncontrolled flight was abruptly and expertly rectified when the pilot took control (though not before I turned and prepared to land by erratically lurching towards a patch of grass). The pilot then demonstrated some cool things one can do with a helicopter including skid landing and take-off, going backwards and sideways while spinning etc.

Here you can see how control over steering is shared between pilot (me) and real pilot (instructor)

Here you can see how control over steering is shared between pilot (me) and real pilot (instructor)

The next day I got in a PA28 – my first fixed-wing experience. The pilot had to go through an enormous list of things to check before taking off and explained a little about what she was doing (mostly checking the engine could rev at certain RPMs and wouldn’t give out in certain situations, flicking on and off various lights and calibrating [and pointing at] instruments). The runway was also ridiculously long so she didn’t even bother with flaps for takeoff. This was much easier to fly than the helicopter and the dials and instruments in the cockpit didn’t obscure the view as much I had inferred they would from MS Flight Sim’s portrayal. I did a few rather ginger turns and pitch adjustments before relinquishing control back to the pilot who then demonstrated some steep banks, a stall (which sounded dangerous and seemed to imply the engine cutting out) and a dive (which was extremely cool). Later that week Matthew and I were inspired enough to ask about possible places to get flying instruction – flying has always been one of those things I’ve wanted to learn but I’ve always ended up not having enough time or money to start…

Here the instructor is doing a steep bank. She even did a pretty steep dive totally relaxed and with that pen in her hand!

Here the instructor is doing a steep bank. She even did a pretty steep dive totally relaxed and with that pen in her hand!

Me flying the PA28!

Me flying the PA28!

Activities

The week started with some group leadership exercises which consisted of attempting to place 30 cards in the correct pattern (easy) and work out the shape and colour of two missing shapes while blindfolded (hard) – both were much more enjoyable than I had expected from that genre of exercises.

The first engineering challenge we were given was an egg-drop challenge – the idea was to construct a package which will protect an egg from a drop of 4 metres. We were given limited materials and each material had a price; the idea was to make the cheapest package that doesn’t crack the egg. Our attempt turned out to be the most epic non-fail in history – literally seconds before the end of the construction phase we managed to pop two balloons which made us completely change our plan and in the last few seconds and in great haste we crammed stuff into a crumple zone and added a parachute … and it somehow worked and turned out to be the cheapest package (if wastage is deducted)! I guess that really proves the KISS principle: Keep It Simple Stupid.

The second engineering challenge was along similar lines – dropping aid – though it was from a more macro perspective. The game was called ‘airlift’ and sold by Elite – the idea was to plan an air route through several African villages which uses the least fuel, while dropping packages of aid which we had to construct out of wooden blocks, paper and tape while making sure everything fits in the cargo hold. The first thing I pointed out when time started was that both problems were NP-complete: the packing problem was almost exactly the same as the knapsack problem and the route planning was basically the Travelling Salesman problem with fuel added in as a factor. In other words we had to be either very good at intuitive problem solving or somehow get lucky. As it turned out, as perhaps a combination of the two, we somehow managed to come up with both the the optimum packing configuration as well as the best route, and finished literally as the final buzzer went – not bad!

The rest of the week was dotted with things like paper plane competitions (which included an awesome flying paper ring which seems impossible when you first see it fly), a game of (actual) CTF and some sports.

Lectures

Over the week there were daily lectures. Much as I would love to discuss them all here in depth I haven’t got that much time / space and besides most people aren’t as interested as I am in the effect of negative angles of attack… But I’ll go a little into some of the most interesting lectures.

Fly by Wire (FBW)

The problem for a long time had been that when going sufficiently quickly, adjusting the controls from the cockpit was really quite hard work – the air going past has so much momentum and the mass flow rate is so high that to change its direction by (for example) adjusting the ailerons requires a lot of force. To make things worse, at supersonic speeds a shock cone is developed (some awesome videos of this are on Youtube) – if this touches the aileron the stick can be wrenched out of the pilot’s hand. Some of these controls were partially solved by making the stick adjust small tabs in the wing instead of the entire aileron, reducing the force required to steer, and by making controls non-reversible (force on the aileron doesn’t affect the flying stick). There are of course some problems with these such as lack of ‘feel’ of the controls. So recently manual stick-aileron transmission was replaced with an electronic motor which receives instructions from the cockpit and adjusts the ailerons itself. Not only does this take all the strain off the pilot, but it also allows a computer to neutralise bad judgements on the part of the pilot such as initiating a sharp dive at 50 feet, implemented by a feedback mechanism from the aircraft to the computer. It also simplifies the cockpit – instead of filling the area with controls, dials an instruments, a computer screen with a joystick and throttle suffices to fly a FBW plane. I asked whether, since FBW significantly reduces the pilot’s direct control over the aircraft, FBW might actually make complicated manouevres more unsafe or indeed completely impossible. John Farley, who was giving the talk, said that, from his vast experience, pilots, however experienced, cannot really be trusted to fly planes safely all the time, and in fact he would feel safer trusting a computer’s judgement and letting a computer do such manouevres than a pilot. That talk also proves that a Boeing 747 probably has non-reversible controls so that scene in Snakes on a Plane (I think it was that film) in which the pilot asked the co-pilot to help pull back on the stick very hard was probably a load of rubbish. Not that you needed to be told that.

Basic Aerodynamics

One of the interesting things from this talk was the reasoning for why helicopters don’t go fast. There is always one part of the rotor going forwards, and if the helicopter moves forwards sufficiently quickly that part of the rotor travels at supersonic speeds generating a shockwave that could rip apart the rotor. In addition, even at lower speeds, there is an imbalance between the airspeed of the fowards-going part and backwards-going part of the rotor meaning a gimbal has to change the angle of attack of the blade depending on which way it’s going: the angle of attack of the rearwards-going blade has to increase to increase lift on that side otherwise the helicopter would just roll over. Of course, there is a maximum angle of attack this blade can be set to before it stalls which is about 20°. This limits the helicopter’s speed at subsonic speeds.

An RAF Hawk landed at the airstrip for us - here is the pilot demonstrating how the entire tailplane rotates

An RAF Hawk landed at the airstrip for us - here is the pilot demonstrating how the entire tailplane rotates

Automation and the future

This was probably the most interesting talk of the week; unfortunately it was cut short for us owing to a jetstream flight. Apparently currently pilots of Euro Fighters get sensor fused info presented to them in the form of advice as to what to do and they simply act upon that, which means half the time the plane is telling the pilot what to do: it is telling the pilot how to control it: semi-automation. Even in commercial aircraft a system called TCAS (Traffic Collision Avoidance System) senses other aircraft and advises the pilot on how to manoeuvre. There is clearly room for improvement: unmanned aerial vehicles are coming. This of course led to the whole humans v computers discussion but for every example of a pilot doing something heroic and saving the plane, there are several examples in which pilots screwed up and computers would have saved lives – Chris Roberts, the speaker, asked whether it *really* is desirable to have a pilot flying the plane, and whether the problem of pilots becoming de-skilled from letting the autopilot take over really is such a problem after all. I also found it very interesting and surprising that currently many landings of commercial aircraft are performed by the autopilot in low-visibility situations.

Anyways overall it was a fantastic week. Whatever the results of the competition turn out to be, I for one got a lot out of six days in Cranfield. I learnt a lot, made some friends, made some good contacts in the industry, and had some great fun relaxing in the English countryside!

Walking in the English countryside

Walking in the English countryside


Snowdonia Walking Trip

July 6, 2009

I’ve just (yesterday) returned from the annual walking trip (this year to Snowdonia) in the mountainous midge breeding ground that is Wales. I managed to write a brief record of our daily activities so here is (more or less) an illustrated account of our adventures.

I’m trying out Picasa as an alternative to Flickr so all the photos I’ve published of this trip are in my Picasa Web Album.

Sunday: Journey up

This was rather boring until we stopped at Betws-y-Coed (the teachers pronounced it roughly as ‘Battersea Coyd’ – I’m pretty sure that’s wrong) for lunch. It appeared that they were having some sort of summer festival so we grabbed some burgers and sausage rolls from a rather smokey and carcinogenic-looking stand and sat on a bench contemplating a police car that appeared to be on show (pop music emanated from its speakers, its sirens went off at apparently random intervals, and members of the public kept crawling in and out of the car while two police officers stood nearby sipping pints), a madman standing in a fenced area wielding a chainsaw (there was a sign saying ‘wood carving’ though the ‘toadstools’ that he produced were arguably less aesthetic than the original stumps) and a van with ‘water incident unit’ painted on its side (we postulated it had something to do with rescuing vehicles / people from lakes, hence the dry suits hanging up inside. I prefer the hypothesis that it rushes to the rescue whenever it rains and erects a large umbrella). We sauntered further into the town and saw the railway station, though we decided the ice cream shop was far more interesting.

We left Betws-y-Coed and passed by Beddgelert (where the most awesome and famous ice cream shop of Wales is) where we saw this rather amusing advert on the back of a bus:

Amusing advert on the back of a bus as we went over the bridge in Beddgelert

Amusing advert on the back of a bus as we went over the bridge in Beddgelert

Finally we pulled into the campsite with Queen blasting through the minibus’ stereo and set up our tents in the otherwise deserted campsite.

Abuse of a mallet for hammering in tent pegs

Abuse of a mallet for hammering in tent pegs

In the absence of KPZ, it was GL’s turn to cook – dinner was rather good but plagued by a flashmob of midges (which lasted for the next six days). We 8th formers did the washing up to set an example and returned to find the entire campsite had been invaded by a small battalion of siege cows.

Easily visible in the backgound is a herd of cattle that somehow managed to get into the campsite.

Easily visible in the backgound is a herd of cattle that somehow managed to get into the campsite.

We retreated from the insect-mammal assault into the minibus (where we could observe the campsite owner attempting to chase the cows off his land with a quad bike) and played a game of mafia (very difficult in a minibus). We eventually got to bed at around 10-11 pm.

Monday: Light walk, blazing sun

Everyone was awoken by the dawn chorus at the unholy hour of 6am – if not for the cows joining in I might have been able to get some more sleep before the planned 8am breakfast, at which GL described the previous night’s cooking as ‘look[ing] like a polluted river’: he’d cooked it in Specked Hen which created a substantial amount of froth…

Alastair looking triumphant at the top of the mountain

Alastair looking triumphant at the top of the mountain

People in Wales seem to have a great sense of humour. Wed also seen a sign in Betws-y-Coed saying Children left unattended will be sold to the circus

People in Wales seem to have a great sense of humour. We'd also seen a sign in Betws-y-Coed saying 'Children left unattended will be sold to the circus'

We split into three groups for the walk, after which two groups stopped by at Beddgelert for ice cream. DAE decided to pull an amusing trick on GL: since GL had already parked when we (DAE’s bus) had arrived, with endorsement from TCIM (‘what could go wrong?’) DAE moved GL’s bus somewhere inconspicuous and parked our bus in its spot, and went as far as transferring GL’s sandals to DAE’s bus! After a most satisfactory ice cream we watched mirthfully through binoculars from an unsubtle distance as GL became increasingly stressed!

Several hours after we returned to the campsite, we witnessed the much anticipated arrival of Max and Marius, two OPs who left the U8 last year but wanted to join us for a laugh. After dinner we all sat in the TV room and watched one of the most drawn-out tennis competitions I have ever seen which lasted until 10:30 and resulted in Murray winning 6-3 (I think). It was about then that I discovered the campsite offered free wifi and began downloading the missed episode of Top Gear (S13 E02).

Tuesday: Snowdon

The weather was perfect on the ascent: it was cloudy and breezy which made walking uphill effortless and chilled. As we reached the top we began the customary cursing of fat tourists sitting at the top of Snowdon wearing snow white trainers who had evidently taken the train up but still had the impudence to buy badges and T-shirts with words to the effect of ‘I walked up Snowdon’. Suggestions were made about using the fattest ones as train fuel (!), making the train treadmill-powered, not providing a train journey back down the mountain, and stopping the train half way up Snowdon, forcing everyone to do some work before reaching the top. I was also disappointed by the lack of free drinking water at the cafe – apparently tap water there is straight from the lake.

DAE found / remembered a tunnel off the beaten track which led to an abandoned quarry

DAE found / remembered a tunnel off the beaten track which led to an abandoned quarry

Max & Marius appear to have found a rather good vantage point

Max & Marius appear to have found a rather good vantage point

The train to the top of Snowdon seems to run partly on steam though the actual lifting is probably a rack and pinion affair. I dont really know much about trains...

The train to the top of Snowdon seems to run partly on steam though the actual lifting is probably a rack and pinion affair. I don't really know much about trains...

We were fortunate and managed to get a pretty good view (not much mist)

We were fortunate and managed to get a pretty good view (not much mist)

The descent was extremely hot and humid which made most of us feel like jumping into the remarkably clear plunge pools of the river running alongside the path. GL was keen to return quickly to the campsite to grab meat for a BBQ that night so we would have been unable to grab an ice cream from Beddgelert if not for a rather timely and extremely spectacular incident involving the contents of a 5th former’s stomach and several people around the epicentre who took some … splash damage. This event occurred precisely outside the ice cream shop, forcing DAE to do an emergency stop in the shop’s car park. I jokingly suggested to the Reverend (who was with us on that trip) that God must have really wanted us to have an ice cream. Max and Marius arrived and chauffeured GL away to do some meat shopping leaving us with the rather iconic image of a grinning Max sitting in the back seat clutching two double ice cream cones. That evening after the BBQ some of us watched Top Gear and played Dawn of War on my laptop until about 11pm.

DAE found a (slightly shorter) shortcut down Snowdon

DAE found a (slightly shorter) shortcut down Snowdon

When youre hot and sweaty it is unbelievably tempting to just jump in...

When you're hot and sweaty it is unbelievably tempting to just jump in...

Sir we found a reverend!

Sir we found a reverend!

Wednesday: Cnicht

When I was on the same trip three years ago this was the first day mountain. On Wednesday we approached it from a different face which involved quite a lot of scrambling. It was hot and humid but the steep ascent and striking view from the top made it all worth it and not much of a slog. We made our customary stop at Beddgelert for another ice cream, then we downloaded and watched ‘Night at the Museum’ (both I and II).

There was a pretty awesome view from the top of Cnicht. According to Marius the name Cnicht means Viking Helmet which is what the mountain resembles from the sea

There was a pretty awesome view from the top of Cnicht. According to Marius the name Cnicht means Viking Helmet which is what the mountain resembles from the sea

Dont fall off!

Don't fall off!

A helicopter appeared while we were descending Cnicht and the friendly guy waved at us. None of us dared wave back lest we be mistaken for hikers in distress

A helicopter appeared while we were descending Cnicht and the friendly guy waved at us. None of us dared wave back lest we be mistaken for hikers in distress

Thursday: Beach / Campsite

We awoke to the soothing (or alarming, depending on who you are) sound of a torrent merrily splashing onto the tops of our tents. The weather forecast was unpromising so we had the option of going to the beach or staying at the campsite (by now there were several people feeling unwell from the heat of the previous days). Max and Marius left (but not before tearful goodbye hugs from everyone who happened to be around), and Guy and I stayed at the campsite (I wanted to get on with some reading and he played an 8-way dawn of war battle). I ended up cooking a rather sumptuous sausages and eggs for us at which point I discovered what a mess the kitchen was.

Dinner was lamb, mushrooms and potatoes with cake dessert, after which we watched Alien v Predator 2 until midnight. It had rained most of the afternoon and night.

Friday: Half-day walk, getting lost

We woke up to an extremely wet morning so we cowered in the communal tent for breakfast. We had lunch in the campsite then ventured out in the sunny afternoon to where we had gone the previous trip to do orienteering. We got lost several times, and I managed to get a large number of amusing photos of our leaders peering confusedly at the map. Most of my downhill journey was spent making witty banter with the Reverend about religion terminating in us finally agreeing on where we were on the map. Again the trip ended in ice cream at Beddgelert, and we returned at about 5:45 to the campsite where we discovered rather rude campers had decided to pitch their tent between the school minibus and our tents!

Here are several pictures of our group leaders getting extremely lost:

… and the absolute classic (caption competition anyone?):

After GL’s slightly tipsy Scheherazade (all teachers are young at heart, especially after a few pints!) some of us congregated in the TV room to watch Saw (which seemed to have quite an impact on the subject of conversations for the rest of the trip) followed by Jonathan Ross interviewing Emma Watson. I then made some attempts at taking night photos before going to bed.

Saturday: Rainy walk

We woke up for the third day in a row to torrid rain, but at 10:30 the teachers decided we might was well do a walk around the base of Tryfan. The highest point of the walk was extremely windy and wet making for freezing horizontal rain. We lunched inside the (extremely) orange emergency shelter which wasn’t quite large enough for all of us which caused us some entertainment. We also got a bit of a laugh from imagining people outside asking a heaving, seething, complaining, munching orange mass in the middle of the footpath on the side of a mountain whether it was OK, and whether it had seen a party of six people walk past!

Inside the emergency shelter. Apparently a dog poked its snout into one of the air holes at one point.

Eventually the sun came out and even though we’d been shivering some of the way down the mountain we decided an ice cream at Beddgelert was called for (I went for a double cone: Chocolate & Ginger and Run & Raisin).

At 5pm the internet was abruptly cut off while I was downloading Saw II and we were told we’d been downloading too much and were using up the monthly cap. We’d been getting 600KB/s; I knew there had to be a catch. So instead of watching a film we rebuilt our dam from three years ago I took some more photos.

The classic trick with rapids - take a long exposure. For some of these I had to put the stand in the middle of the stream - I hope it doesnt rust

The classic trick with rapids - take a long exposure. For some of these I had to put the stand in the middle of the stream - I hope it doesn't rust

Sunday: Journey back

There’s not much to say about yesterday: we packed everything up, woke the apparently unwakeable 6th formers and helped them pack their tent, and drove back to London. We all cheered when we saw the sign welcoming us into Shropshire at the Welsh-English border and listened to Queen’s Greatest Hits as we coasted down the bus lane on the M4.

Final Thoughts

I thought it was an altogether highly enjoyable trip. The mounds of earth that had segregated our part of the campsite from everyone else three years ago were gone and there was no electricity near our tents which was a slight inconvenience, and I felt too many days were rained off / taken lightly … but overall I think most people had a great time, nothing / nobody got broken, and it was a great way to relax after the end of a tough school year.

Meanwhile – this is too good not to repeat:

Perhaps if someone thinks up a good caption … ?

๏̯͡๏﴿


SPS Q Festival

May 24, 2009

The blogosphere and indeed local media are probably all over this thing, with sentiments ranging from high praise and celebration to bitter complaints about noise pollution and propaganda. But hey, I might as well make my own (very) little contribution.

I have to admit I was originally highly sceptical about the whole thing. The previous day I was dragged straight from Core 2 into a rehearsal, spent half an hour laying out deckchairs, and was immediately plunged into a three-hour rehearsal (about which I had known nothing until I was ‘reminded’ about it that morning) which ended at six. And I somehow managed to survive all that on breakfast: two pains au chocolat (or however you choose to pluralise the French expression) and a cup of tea (lunch was out of the question. Apparently). The information I had, as a performer, received beforehand, also gave me the impression the entire event’s organisation left much to be desired; I was until the eve of the Q Festival unsure as to the colour of the suit I was to wear (conflicting data manifested itself in several different letters I had received). Rehearsals denied me the latter half of Apposition (= prizegiving) lunch which cost me an excellent dessert and also barred me from the chance of helping out with the open day, something I had dearly wanted to do since I had first been told about it. I also hate having to turn down offers to help blow up things (Chemistry); in fact I had to turn down every subject teacher who asked me to help, which was not particularly pleasant. And to cap it all it transpired at about 6pm of the actual day that they had somehow either forgotten or ignored the fact that musicians, like most other people, require dinner. And apparently all the musicians grabbed from the outside world were being paid, including old Paulines, while pupils like me who had been non-optionally drafted in were being treated essentially as unpaid trained monkeys. In other words I was not immensely impressed with the entire proceedings.

But when the actual concert started after a major emergency involving a lost bag, absent music scores and instruments locked in inaccessible (and inconspicuous) locations, I actually started to feel good about it. The crowd was relaxed and the Prokofiev sextet of which I was a member actually went quite well. Interestingly, although I quite literally had a microphone pressed against my head and an enormous high-resolution camera that resembled the Hubble Telescope pointing directly at my fingerboard, I felt much more at ease than playing for a small concert in the Wathen Hall. Perhaps it was the physical distance from the audience, but it just seemed really relaxed and unstressful. Or maybe it was just the champagne. And after that were the orchestra pieces. The incredibly boring passages that we had rehearsed to death in a hot cluttered hall with an insufficient caffeine supply for eternity and a day (i.e. 4 hours) suddenly came alive with the choir and, needless to say, Katherine Jenkins. The entire jubilant feeling of the celebration did start to affect me and wearing a ridiculous, sweaty, unnecessarily insulating outfit with a bow tie and white dinner jacket started actually to feel rather good and for a moment made me feel proud to be a Pauline. There’s for some reason a certain amount of self-confidence that a bow tie and excessively formal suit gives one. And right at the end when the drunk and high members of the crowd thronged around the stage to touch the one and only Katherine Jenkins and scream demands for an encore it felt good sitting on the stage pretending to have played everything correctly.

I have never been involved in anything of this magnitude before, and it was really quite a wonderful experience to take part. One thing that really struck me was the quality of the orchestra. The school orchestra is relatively good, depending on your interpretation of ‘relatively’ and ‘good’, and we tend to work for quite a long time on each piece before it even begins to make sense. The orchestra I was playing in was composed mostly of professionals and extremely good musicians and it truly made a huge difference – each of the five or so pieces was conquered in half an hour of rehearsal, and everyone *actually* played in time (which for the Carmen and Gershwin was quite a feat)!

I was also somewhat surprised by the police presence – while our rehearsal was in mid-swing, three police vans pulled up and a hoard of crowd control officers began patrolling the empty deckchairs.

Anyways in summary:

Apposition: Very interesting declamations, awesome lunch

Open Day: CompSoc was mostly us pissing around with SSH and MacOS’s text to speech functionality. And of course playing games. Chemistry smelt like some combination of pyridine, ammonia and chlorine. I also saw some old friends at Physics (building a trebuchet).

Concert: Brilliant.

Nutrition: High-quality Sodexo stuff for lunch, champagne and white wine to see me through the concert, Tesco pasta as a substitute for dinner, and a nice Stella Artois to conclude the evening.

Oh. That wasn’t brief at all. Never mind.

And finally, a word of apology for lack of activity. It’s exam period right now and I’m stressing over Economics. So you probably won’t hear much from me until 16 June (the day after my last exam). Meanwhile, good luck to all those other unfortunate souls with exams, and to all relevant parties, have a good half term!

More photos can be found here

๏̯͡๏﴿


British Informatics Olympiad Finals at Cambridge

March 29, 2009

I’ve just got back from the British Informatics Olympiad finals (they chose the top 14 in the country to take this – I was an experimental error) which took place at Trinity College in Cambridge. Despite a fairly epic fail, I thought the weekend was quite productive and I’ve definitely acquired better skills from the only formal or otherwise training in programming the contestants were (strongly) encouraged to undertake. More photos can be found on my Flickr photostream.

Night shot of housing

Night shot of housing

As always with such activities, the people there shared many interests, and since programming is (at St Paul’s anyway) an interest few people take vaguely seriously, it was a particularly unique weekend for me in that I could talk about Dijkstra’s Algorithm without getting suspicious sideways glances and a general awkward diffusion of human density away from myself… Pretty much all the people there were doing double Maths and were very much into it, and even at a school like St Paul’s one probably wouldn’t be able to mention the Collatz Conjecture and have every person in the room nod and begin elucidating their own hypotheses on where the proof will (if ever) eventually come from (e.g. graph theory, number theory, computing etc). One of the people who had a big hand in organising and managing the whole affair (Tom), seemed to know a great deal about Physics, Maths and computing and the night before the olympiad he and a few of us had a long argument about string theory, something unheard of even in Physics lessons at school. Tom also seemed to know my maths teacher from helping him set ridiculously hard BMO questions at some point in the past (I think I can just about forgive him for doing that). The atmosphere was also quite singular since geek humour actually worked, and maths and physics jokes got a higher laugh:groan ratio than usual; though I couldn’t help facepalming when, while collecting in papers, Tom remarked ‘all your papers are belong to us’.

I think I probably did get quite a bit out of this whole experience. Since being invited to the finals I’ve been constantly prodded to complete USACO training challenges which are combined with a form of structured training / algorithmic tutorial thing which gives users formal training of algorithms. This training is actually the only time I’ve ever been ‘trained’ in programming and I’d been sort of making things up on the fly since I started programming (in visual basic…) back in Colet Court – I didn’t actually know what a greedy algorithm was until this year, and my understanding of even what algorithms are was still sketchy when I took the BIO for the second time (last year). So by going through a beginners through intermediate algorithms training course was definitely useful for me and I now approach problems more analytically rather than just trying to convince a compiler to automatically do what I would personally do if faced with a problem (no, not give up straight away and watch a film instead). I have to say though that despite its utility I acquired a few bad habits from it. Since for each assignment infinite attempts are allowed, I tend not to actually test programs against anything other than sample data and submit it, hoping something that can solve a specific case will probably work with all other cases. Inevitably it tends not to work first time and rather than sitting down and debugging it, I take the test data and just try to make the program work for that by doing silly things like making loops slightly longer or incrementing variables by 1 randomly. USACO helpfully also provides the full answers for test data. I have to say though that the grading system on USACO is impressive – after you submit a solution the backend code automatically compiles and runs the program for each test case and grades its answer. Inspired, I’ve now got something vaguely similar set up on my Debian server (albeit requiring both FTP and SSH connections to sort of do everything manually).

Another thing I’ve always wanted to do was learn C++ as every linux package seems to require compilation with g++, so C/C++ seems to be the language to learn. Since the BIO Finals required code in C/C++ or Delphi (that nobody used, surprise surprise) I was forced to learn a new language, and after discovering the awesomeness of pointers, I have an incentive to endure the confusion and use some really cool programming features (at the risk of corrupting random critical data in the system memory).

And as always with a visit to Cambridge, I got to see more of the college and living quarters. I have to say, the Corpus rooms were more spacious though assuming a specific comparison is representative of a more general comparison would be displeasing to my stats teacher.

And of course since the BIO is sponsored by Lionhead Studios (gaming company) we got to meet a representative and should find obtaining work experience there much easier.

So anyway, here’s what I remember from the itinerary:

Day 1
Erroll and I arrived at Trinity only to be told we had to be at the porters of Burrell College on Grange Road, which is somehow related to Trinity. After a bit of a trek we arrived, Pauline-style, fashionably late. We were shown our rooms, were provided with food and were shown the computer rooms where we got used to our environments. It was actually a very simple question on summing squares repeatedly (up to 2^63 times) – all we had to do was notice there was a repeating sequence – but the unfamiliar environment and unfamiliar method of file input (fscanf in <stdio> as opposed to fin >> in <fstream>) made me do all sorts of stupid things. I think after three months of USACO challenges in C++ I think I still prefer C# / Java as languages. Perhaps it’s got something to do with compilers (my 2003 MS C++ compiler at home goes kaput randomly).

Day 2
The brain uses an insane amount of energy when working hard and doing olympiads was even suggested (as a joke) as a means of weight loss. For this reason an awesome breakfast was bestowed upon us, consisting of baconey, eggy, toastey goodness. The morning papers were both written, the first being on Turing Machines and the second on emotion/sentiment detection in text. This was actually probably the most enjoyable part of the contest – the questions on turing machines were a bit like a mix of maths, logic and electronis (involving truth table like things and train track systems etc). It was also the only bit I could actually seem vaguely competent doing – an education in maths and electronics probably helped me.

The afternoon was when the hardcore competitioning kicked in with a whopping five-hour paper consisting of four questions (the best people completed two questions). I’ll talk about those later, but I failed quite epically, only managing to write a program to solve a question for about half the test data. It also transpired I’d spent all my time on the hardest question, and that although I saw immediately an algorithm that Dr Forster said worked, my implementation was total crap. Later that evening I managed to think up a linear time program to solve the same problem which when I mentioned it the next morning was apparently the best solution Dr Forster had thought of. I still blame C++ :P

After the olympiad I attempted to take some night photography with a tripod which is apparently banned. Oops. We all then went to dinner at Ask and got quite stuffed up before being asked to eat more in the chill room afterwards.

Day 3
Today was mostly free time in which Erroll, I and another person we met spent our 2 hours of free time pulling newspaper, broadband adverts and IR spectra printouts out of a pool table in an attempt to get the balls out. Our efforts included using mobile phones as endoscopes to get a better view of the inside of the machine, using wire coat hangers as hooks to reach the newspaper and peering inside the machine to aid our end. We were eventually thwarted as we concluded our over-zealous table tilting had resulted in the balls falling out of the mechanism entirely and ending up unretrievably on the bottom of the table. For future reference: pool table lock picking doesn’t work with coat hanger wires.

After an inventive method of going round (in three dimensions) a gate without a keycard I and a few others got to the main Trinity college. The tension was apparently high as they announced the IoI competitors though I didn’t notice; my expectations were clearly low as I had just organised three weeks’ work experience with Microsoft at the same time as the finals. What was nice though was that we got very cool 4GB memory sticks with ‘British Informatics Olympiad’ on them, and we were issued with compulsory free games and ‘Introduction to Algorithms’. I already had the book and had in fact brought it to the contest in order to seem vaguely intelligent with no real intention of looking at it.

My room

My room

The questions

I’ve put thumbnails of scans – click to enlarge. I cut out my retarded scribblings.

Desperate Measures

This is the one I half did, and also the hardest. You’re given a cross section of a polygon and are supposed to divide it into triangles using only given vertices. In the question the polygon is the cross section of a cave tunnel…

My initial (and apparently correct) thought was to cut off all the bits sticking out of the polygon (i.e. turn them into triangles and ignore the outside points) and end up with a convex polygon and subsequently just a triangle in the middle; sort of repeatedly going round the polygon chopping off bits. My second (and apparently better) thought was to go from left to right joining up points, an algorithm that runs in linear time.

River

This is apparently the easiest question: a river (= straight line) of up to length 2^31 kilometres (the unit was some amusing invented thing but I can’t remember what it was) can be split up in one of up to 1000 (=n) ways into n unequal segments (= up to 1000 different sections using up to 1000 different partitions). The question was to split it into n segments so that each different segment is a segment described in a different partition and there’s no overlap of partitions. OK that’s a crap explanation – the scan does it better.

I didn’t actually look at this which is a pity – it was the easiest. When I looked at it before going to bed that night I managed to come up with an algo straight away which would have worked in O(n^2 ish) – the biggest case would have taken about a second to run. Pity I saw 2^31 and immediately moved on when actually doing the competition.

All work and no play

The scan says it all. It was a really annoying question because I started working on it about an hour before the end. I wrote an efficient O(n) algo for finding how many ways there are of making n in such a way, had an amazing pascal’s triangle/combinatorics thing going, and was about to write it when I realised it all got screwed up by the blocks only going up to 10. Unable to repair my program, my final submission only worked up to n=10 (needs to work up to n=64). I might also have forgotten to change the output method from console to file output. Meh.

Spies

I couldn’t think of an efficient way of doing this (not even in the evening though I was very sleepy by then) and am certainly not going to attempt it again until I have lots of free time, i.e. summer. This was the second hardest.

๏̯͡๏﴿


Techie’s Take on Snow

February 2, 2009
White grass?

White grass?

I don’t think there’s anyone out there who needs to be told that the UK ground to a halt today thanks to a freak downpour of snow. But I think some of the stuff that happened today was actually a great metaphor for the current status of technology in the UK as a predominant part of virtually everyone’s daily life, a phenomenon that I hope will flourish in the future.

Denial of Service

Slashdot and Lifehacker tend to inflict DoS attacks on websites and webapps whenever they feature them simply owing to the sheer traffic generated. This morning several sites began to have problems due to similar reasons: thousands of commuters simultaneously looked out of the window, smacked their heads and immediately tried to find a way to get to work … using TFL, subsequently causing the route planner to slow to a crawl for a few hours. The school intranet also managed to get DoS’ed from all the 900 Paulines attempting to discover whether the wonderful terrible rumours of school being snowed off were true. I suspect this reflects the current trend in general load balancing (including non-techie things: apparently electricity usage peaks just after some TV show ends in the UK owing to kettles being put on) and the clear necessity to move computing power to the so-called ‘cloud’ where it can take the strain of flash-flood traffic.

The Lifehacker Effect occurs when a site goes down owing to overload from traffic emanating from a Lifehacker post

'The Lifehacker Effect' occurs when a site goes down owing to overload from traffic emanating from a Lifehacker post

Social Websites

The majority of Paulines used Facebook as their primary source of information regarding the school snow-off. Sitting there watching my Facebook feed reload every few seconds, I couldn’t help but notice that virtually every wall post, status update and note seemed to be asking and/or confirming rumours about school being snowed off. Twitter was also buzzing with activity which concluded with a jubilant remark from @the_unnameable:

No school. Yipppppeeeeeeeeeeeeeeeeeeeeeeeee!

Eventually intelligence was obtained from the few people who had managed to contact the apparently grumpy porters by phone (and of course sons of teachers) and information was seeded in the form of status updates on both Facebook and Twitter which spread virally and reached most people. Of course, this merely illustrates the increasing reliance on the web for up-to-date information and the power of viral marketing (well, spread of information). As a sidenote, David Smith, a teacher at the school with the foresight to see what is needed, has created a Twitter account for one-way updates from the school: @stpaulsboys.

And of course, since the school was closed for the sake of safety and preventing us from having to brave the weather, everyone was out and about, efficiently organising events through Facebook, Twitter and mobile phone.

Social Website Logos

Social Website Logos

Cameras

Of course, every such event is a photo op. There was a point when digital cameras were associated exclusively with Japanese tourists, but today during a photography outing with George, virtually every person we saw who wasn’t building a snowman was pointing a camera at something (often with flash still turned on *sigh*). In the age of twitpic and flickr, digital cameras have become day-to-day objects embedded into just about everything which are used as a means to record moments of one’s day. If this had happened just a few years ago, I don’t think anything like the number of cameras I saw today would have hit the streets, as the idea of having to record every precious last moment of one’s life on an SD card hadn’t quite caught on.

//www.flickr.com/photos/27996002@N05/My Flickr Photostream/a

My Flickr Photostream

Personally, I ended up with a pretty cool collection of photos (including some of Doc Mayfield & co. having fun), a new way of getting school updates (@stpaulsboys), the beginnings of a raging cold, a free Sodexho school lunch and confirmation that school is off tomorrow as well.

John Colet Statue looking rather cold

John Colet Statue looking rather cold


Is Everything about Cambridge?

February 1, 2009

By the end of this academic year it looks like I’ll have visited Cambridge (the university in England that is; not the MIT/Harvard area) 5 times: twice last year, and thrice this year; and that’s assuming plans don’t change to include extra school trips, Headstart courses, open days etc. which may well boost this number to 7. Contrastingly, the number of times I’ve ever been to Oxford is currently zero and it seems (unfortunately for me) like it’s going to stay that way for the rest of the foreseeable future. The thing I find strange is that pretty much all of these visits were/are to attend events, rather than for the sake of visiting the university, which seems to indicate to me that stuff related to areas I’m interested in seems to prefer to take place in Cambridge rather than Oxford, which if true would have obvious ramifications for my future university choices.

In hindsight this is probably my best-composed photo of The Chronophage, a recent addition to Corpus Christis library frontend

In hindsight this is probably my best-composed photo of The Chronophage, a recent addition to Corpus Christi's library frontend

A quick run-through of Cambridge trips, past and future, just to make sure I’m not deluding myself: Last year I visited the city for my first time with my parents. the point of the trip was actually cycling in the countryside but we couldn’t resist having a look round the place and absorbing the scholarly atmosphere of the top[citation needed :P ] university in the UK. Much later on in the year I learnt of a CareersMCS conference thing on NatSci. At the time I was fairly ambivalent about what to study at university, apart from the (rather strong) feeling that I wanted to do something scientific. But I turned up, at Churchill College I think, and was *almost* persuaded to do Biology at AS to study some of the intriguing-sounding courses they talked about … until someone explained the tripos system and informed us that Biology AS/A2 isn’t necessary for any of the courses (including ‘Biology’) so apparently as a means to getting into a course it isn’t a very good choice.

Corpus Christi, Cambridge (hideously underexposed). The grass is exclusively for college members to recline on although when we were there we were urged to do just that...

Corpus Christi, Cambridge (hideously underexposed). The grass is exclusively for college members to recline on although when we were there we were urged to do just that...

This year Cambridge infiltrated my life almost as soon as I settled into the first term. Dr Zetie decided that the four Physics Challenge gold-medallists from last year (who coincidentally all received the same mark, were all in his set, and had their papers all marked by him) were to go to Cambridge to attend the annual ‘Senior Physics Challenge’ which turned out to be a series of lectures on circular motion and special relativity which spanned two days and included a night in a Corpus Christi apartment. I enthused about the whole experience and thought that would be the last I’d see of Cambridge before I apply next year. Then at the end of last term I sat the British Informatics Olympiad, a fairly hardcore three hour programming olympiad exam, and was overjoyed to discover that I had by some fluke managed to come top 15 in the country and was invited to the finals. To my further delight, I learned that these finals were to take place at Trinity College – Cambridge; this time I’m to stay two nights. Finally, by some fantastical spot of luck, I managed to get work experience at Microsoft®©™ which I’m told only happens to PhD students. They have five research centres / labs around the world, and the one in the UK closest to me … isn’t in Oxford. Possibly three weeks. Maybe the trend will continue and I’ll be living in Cambridge in two years’ time. I sure hope so…

3D Model of Cambridge

3D Model of Cambridge

So what is it about Cambridge that makes me virtually frequent it? I suspect this trend is simply a confirmation of a suspicion I’ve had since some time ago. There was a time when I thought Oxford was simply better in every way – more famous, better education, better courses. I was actually disappointed to discover that Stephen Hawking wasn’t at Oxford. That time was quite a while ago – back in the year when I still rowed and Oxford (I think) won the boat race. Ever since, I’ve been exposed to a general consensus of bias against Oxford amongst the Sciencey and Mathsey cliques at St Paul’s which I attempted to ignore until my interview for the Arkwright Scholarship when the interviewer, an engineer, was extremely insistent about ‘correcting’ my hopes to apply to ‘Oxbridge’ to ones to apply to ‘Cambridge’. So is Cambridge the better university for my interests, as I suspect? The three main areas I’m currently considering for university are Maths, Physics and Computing/Computer Science/Informatics (rumour has it that there’s a distinction between the three apparent synonyms). The first thing anyone thinks of when someone says to him/her ‘Maths at University’ is ‘Trinity’, and Mark Warner at Corpus Christi (Physics) is one of the most inspiring lecturers I’ve seen in action. I’ve also heard of a legendary Anson Cheung at Trinity of whom my Physics teachers speak very highly. When I was talking with my university advisor about the possibility of doing Computer Science and Maths, a search on the UCAS website for a joint Maths/Computer Science course yielded results for Cambridge, Imperial, Bristol and Oxford amongst others, yet he only remarked about the first three of those universities.

My poor point-and-shoot skills don't do Cambridge justice

My poor point-and-shoot skills don't do Cambridge justice

So Cambridge it is? I think I will almost definitely apply there. It has a beautiful campus, fantastic lecturers, inspired students, a wonderful atmosphere and (apparently) good wifi. Clearly I’m in no position to pass judgement on which university out of Oxford and Cambridge is ‘better’, merely which one I’m more sure will suit me. And from what I’ve seen of Cambridge, as Farhan put it, it’s like I’ve found where I really belong (provided I stand a chance of getting in of course – STEP – yikes).

On the other hand I’m currently half way through a series of SAT exams for American universities and have my sights trained on Stanford, MIT, Princeton… I’ve also been watching a series of MIT lectures on matrices and linear algebra (Prof. Gilbert Strang) which is simply awesome stuff (the way apparently unrelated concepts seem to come together, like the link between dimensions of nullspaces and number of solutions to simultaneous equations, matrices and Kirchoff’s Laws, nullspace and solutions to SHM second order differential equations). So if I end up with a choice between Stanford and Cambridge that would be just indescribably good. So to answer my question, for the UK, Cambridge it definitely is. But the US simply offers so much good stuff in terms of universities (sometimes with unbelievably generous financial aid) that it would be criminally foolish for me not to apply.

Right. Now, back to doing work that might actually vaguely contribute towards that daydream…

A beautiful boulevard-style path we walked down while lost during a lunch break at the Senior Physics Challenge

A beautiful boulevard-style path we walked down while lost during a lunch break at the Senior Physics Challenge


LED Art

January 16, 2009

I’m not much of an artist, I’ll admit that much. But having an interest in photography (especially in macro and long-exposure), I find ideas like drawing with very long exposure and a torch irresistible. Lifehacker (well, one of my RSS feeds) featured it some time ago under the name of ‘light doodling’. Since I’ve had some time recently I grabbed a nearby single-LED torch and started messing around with a 15″ exposure – here are my results.

Everyone has to start somewhere

Everyone has to start somewhere...

Maths made (even) cooler

Maths made (even) 'cooler'

It had to be done

It had to be done

Then I found a laser pointer. Im sure theres very cool stuff to do with lasers and long exposure but I prefer the floating in space effect of LED torches.

Then I found a laser pointer. I'm sure there's very cool stuff to do with lasers and long exposure but I prefer the 'floating in space' effect of LED torches.

Random stuff with an old speaker

Random stuff with an old speaker

Lascannon camera flash... Again, it had to be done

Lascannon camera flash... Again, it had to be done

Argh it burns! I did this by tracing around my hand with the LED torch and scattering was responsible for the whole fire effect. I didnt actually know what was going to happen so this came as something of a surprise to me...

Argh it burns! I did this by tracing around my hand with the LED torch and scattering was responsible for the whole fire effect. I didn't actually know what was going to happen so this came as something of a surprise to me...

Most of this is just me playing around with an LED torch to see what kind of awesome effects someone else (i.e. someone who is actually vaguely skilful in terms of motor skills and artistic talent) might be able to do. So sorry if my horrific ‘art’ makes you cry… But the whole idea of it is quite ingenious, taking long-exposure traffic photos to a new level.

All of these are hosted on Flickr – I hope their policy on hotlinking is not too draconian. Talking of which, my Flickr Photostream is publicly available for whoever wants to follow my photographic stream of consciousness…


Shanghai: First Impressions

December 26, 2008

I’ve only been in Shanghai for a bit and have just about got over jet lag. I ended up doing an all-nighter last night, taking some night shots of the cityscape from my (highly elevated) bedroom window and watching the smoggy sunrise in awe, just to get my sleep-cycle right and ended up snoring through a Chinese music concert in the evening – oops… So, first impressions.

Immediately after touchdown, the first thing to greet my sleep-deprived eyes was a colourful and gleeful rendering of the cheerful glory of an olympic host, painted onto the side of a member of the China Airlines fleet. Up till now, that remains the only apparent relic I’ve seen of last Summer’s excitement.



Beijing 2008 Advert

As I expected, apart from the airport which was magnificent and unbelievably (to a Londoner) efficient (somewhat different from dear old Heathrow), there are aspects of this place which are somewhat … different. The most striking part is probably the population density. Officially Shanghai has a population of about 20 million, although I suspect that figure is a gross underestimate owing to the number of homeless and unregistered civilians living in this district. With such a population squashed into only 6500 square Km, the city has over 3000 people per square kilometre. Not bad one might think, but the crowds are multitudinous and dense. It is a result of this crowd culture that Chinese people get their (deserved) loud reputation. Even in the most serene places, people will communicate at top volume, choosing to shout rather than to talk normally so as to be heard. Walking around just about anywhere constitutes shoving your way through a throng of people – which itself wouldn’t be so bad if they were normal people. The sad fact is that every person here, without exception, appears to be dying of some disease or other and every line of sight seems to end in someone spluttering, coughing and/or blowing his nose into the air. Hygiene awareness when coughing and sneezing (often while cooking) is approximately zero – bodily fluids/gases exit bodily orifices liberally into the open air without thought or care for anyone unfortunate enough to be nearby. Combined with such a high person to square kilometre ratio and you end up with a fantastic disease spread rate. The smoking situation is also quite chronic. The taxi from the airport reeked blatantly of cigarette smoke. Crowds emit smoke puffs as you push your way through and buildings stink of nicotine. Oh, did I mention the pollution? Don’t get me started on the smog.





typical crowded street





my photo of the iconic view of Shangai showing smog





me cynically photographing more smog

Meanwhile, the traffic is absolutely manic. Shanghai is very much a biking city (electric scooters and bicycles are much cheaper than cars), and such vehicles, when combined with a cavalier disregard for pedestrians, traffic lights and other road users, make for quite deadly weapons. Crossing the road is like waging a war. Seas of pedestrians from both sides of the road meet in the middle in a cacophony of shouting, bustling, coughing and spitting while being constantly punched through by honking road bikes and the occasional impatient taxi. Sometimes there’s a policeman in the middle of it all pretending to direct traffic (both pedestrian and vehicular). There are effectively no real rules for the road. Cars cut lanes and cross junctions at full speed without warning or looking around, and diesel motorbikes frequently mount pavements, pushing aside pedestrians. My dad while he was here personally bore witness to an accident in which an infelicitous pedestrian was hit by a car whose driver just drove off, without care for whatever mess he had left behind. You’d think people would at least take out some sort of physical insurance against such a dangerous road situation, but it seems that taxis deliberately disable seatbelts (the ones I’ve been in have had them ripped out and covered over with cloth).





My camera can only do max 4 second exposure. This is the result



no seatbelt

When most people think of the police, the first two words that jump to mind tend to be ‘law’ and ‘bastards’, often in reverse order. In China, things are very different. During my very first trip to the market I saw a policeman grab an item from a shop and stroll away calmly with the ill-fated shopkeeper running after him, tugging his arm. They are far from law, but they sure are bastards. There are no rules, no morals, and few properly enforced civil rights laws (thoughtcrime law on the other hand…) – the police are just bullies with sticks and uniforms (and guns).

As far as first impressions go, the internet actually isn’t bad. I’m using the [still censored] connection in my dad’s apartment (he works in Shanghai) and the upload speed is faster than what Virgin Media give me back home in good old London. The download speed, about 1Mbps, is still one tenth what I get in London, which is still perfectly ample for surfing. Remote desktop on the other hand is torturous. I’m still worried about thoughtcrime and censorship, and since my blog is on the blocklist (well, all wordpress blogs are, I think) I’m typing this up on Notepad and subsequently posting it through remote desktop.

There are though good things about Shanghai. I’m overdramatising the bads a bit as, well, that’s what I do as a cynic. But the prices are undeniably good and conversion is convenient (10Y = £1 almost exactly). Stuffed bao (sort of buns) go for 10p in the supermarket, and clothes prices beat Primark hands down. The underground actually works (unlike London), and there are some great photos to be taken, particularly night shots while I’m recovering from my jet lag.





my attempt at night photography without a tripod

So, that’s what I think of Shanghai after about 3 days. Brilliant place, though a little crazy. If you want me to test some websites to see if they’re blocked, do comment / contact!