12.07.2015 Views

DL786 HR Briefing 3.qxd - cs4fn

DL786 HR Briefing 3.qxd - cs4fn

DL786 HR Briefing 3.qxd - cs4fn

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Computer Science for Fun Issue 2CS4FNCS4FNClaytronics:From goo Goo to you YouExclusive Interview withKevin Warwick. What isit like to be a Cyborg?Enter the Future HumanCompetitionSpecial Issue on theMagic ofComputerScience


Welcome to <strong>cs4fn</strong>The magazine aboutthe fun side ofcomputer scienceThis issue is about magic, but not theHogwart’s kind, the computer science kind.The great thing about technology is that itis better than magic. Magic is about theimpossible. Computer Science is aboutmaking the impossible routine. Whatabout things that today are dismissed asfantasy…Is teleporting possible, or at leastto be in two places at once? See “From gooto you” on Page 15. How about superhumanpowers? We can’t do it unaided ofcourse, but wire a human brain directlyto a computer and some of it becomesa possibility. Find out what’s already beendone in Cyborg super-senses on page 6.We also look at how magician’s tricks haveled to new ways to build computers, andhow your MP3 player is playing tricks onyou. Microsoft kindly sponsored this issue,and since seeing into the future is alwaysfun we start with a seeing-into-the-futurequote from Bill Gates.In this issue:Pg 6 Exclusiveinterviewwith a cyborgPg 12 Perfect shufflePg 14 Sonic sleightof hand:The magic of MP3Pg 15 Claytronics:from goo to youMore in the <strong>cs4fn</strong>webzine www.dcs.qmul.ac.uk/<strong>cs4fn</strong>• Magic of the sands – computerscience transforms sand to sums• Bugs, biology andcomputer science• The mind-readingcomputer magicianComing in thenext issue:• Robot wars - fighting withcomputer science• Potter magic - how computerscience made Hogwarts wizardswork• Big brother - computer scienceand telecommunications:I’m comming to get youFuture ProofBill Gates believes CDs and DVDs have had it. It won’tbe long before the whole back catalogue of music fitson a device in your pocket:“It’s going evenfaster than weexpected…Fiveyears from nowpeople will say‘What’s a CD? Whydid you have to goto the case andopen something upand you couldn’tsequence it yourown playlist way?’That will be a thingof the past. Evenvideos in the futurewill either be ona disk in yourpocket or overthe Internet,and far moreconvenientfor you.”Bill Gates, Chairmanand Chief SoftwareArchitect, Microsoft.There are more predictionsabout future technologyon the <strong>cs4fn</strong> website.2Passionate about computer science?www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/


What do youthink is mostlikely todisappear next?Future HumanCompetitionHave your vote on the <strong>cs4fn</strong> site…g Fixed phones?g Cables?g Written signatures?g Loose change?g Wrist-watches?g Paper?g Physical shops?g Calculators?g Radios?Enter our 2006Future HumanCompetition?Using the Internet as aresearch tool and yourimagination write upyour predictions of howthe human of 50 yearsfrom now will look,communicate, work,play and live. You mustbase your predictionson actual computerscience projectscurrently underway.There are prizes for boththe winners and theirschool. You might want toread “The Machine Stops”by EM Forster for one sciencefiction view of the futurewritten in 1909, long beforecomputers or the Internet.How accurate was he? Go towww.dcs.qmul.ac.uk/<strong>cs4fn</strong>/futurehuman/to enter.BrainAcademy: The Compute-Ability Competition is BackBrainAcademy the Compute-ability competition with the chance to win degree places aswell as other career-enhancing plug-ins is back.This year we will also be offering prizes for younger entrants who are not eligible tostart University in 2007 – the chance to spend an afternoon in our Augmented-HumanInteraction Lab. and find out first-hand some of the research going on in ComputerScience. The theme this year is “Computer Science and the Entertainment Industry”.For more details see the BrainAcademy website www.brainacademy.qmul.ac.uk/This year there are prizes for youngerentrantsEmail us at <strong>cs4fn</strong>dcs.qmul.ac.ukFeel free to photocopy pages from <strong>cs4fn</strong> for personal or class use3


Snakey Bites BackQGames is a fun new way of getting gamesfor your mobile phone. It uses artificialintelligence (AI) techniques know asgenetic algorithms to breed a virtual zoofull of evolved versions of the Snake gamerated for how difficult a human player willfind them. To rank the difficulty levelsdeveloper Milan Verma, a student at QueenMary, University of London built a gameplaying computer program with ‘humanlike’ abilities. It 'plays' the game to decideits difficulty. It is based on data from realhuman game players to give it realisticproperties.Milan has breda zoo fullof evolvedversions ofa gameTo learn more about how QGames worksand to get two free sample games, visitthe Qwacky site linked fromwww.dcs.qmul.ac.uk/<strong>cs4fn</strong>/ Updates areavailable via WAP and GPRS technology.The genetic algorithm uses a ‘fitnessfunction’, an approximate way of workingout what level of game playing talent theuser has. It’s a case of survival of the fittest- as with Darwin’s natural selection thatdrives evolution in the natural world. Onlythe best fitting solution for each level ofdifficulty is selected.A real user plays a few games so the AIcan get a measure of their ability. Milan’sprogram then sends them a game tailoredto their game playing ability. It tailors Snakefor each individual's needs by changinggame play factors like speed, snakecamouflage, environment and snakemobility. QGames is the first time this ideahas been used in a mobile phone.“QGames takes the human versus machine competition straight into yourpocket; it’s great fun to play and you never know what trick the AI will try touse to defeat you next time.”Harry Potter’sInvisibility CloakHarry Potter’s invisibility cloak is surelyHogwarts’ magic that science can’t match.Wrap it round you and people just seethrough you as though you weren’t there.Turns out even that kind of magic can bedone with a combination of materialsscience and computer science. ProfessorSusumu Tachi of the University of Tokyohas developed a cloak made of thousandsof tiny beads. Cameras video what isbehind you and a computer system thenprojects the appropriate image onto thefront of the cloak. The beads are made ofa special material called retro-reflectrum.It is vital to give the image a natural feel –normal screens give too flat a look, losingthe impression of seeing through theperson. Now you see me, now youdon’t at the flick of a switch.4Passionate about computer science?www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/


Pilot Error and Space InvadersThe TextingMarrakechGameHow to PlayThe aim of the texting Marrakech game isto have texted 3 numbers that add up to 15before the other player. Each player takes itin turn to text the other a number from 1 to9. Text a number already texted and youimmediately lose.Here’s an example gameYou text: 8Your opponent texts: 5You text: 2Your opponent texts: 4You text: 6Your opponent texts: 7You text: 1and winwith 8, 6 and 1 = 15Notice that if you hadn’t texted 6, theopponent could have done and won with5,4 and 6 = 15.The SecretThe Marrakech Texting game seems toneed you to be amazingly clever at mentalmaths. In fact all you need is to know asimple bit of mathemagic: a magic square.A magic square is just a square of numberswhere each row, column and diagonal addup to the same number.Another plane crashes with all on boardkilled. The papers blame the pilot. Theofficial report agrees. It was pilot erroragain. But was the pilot really toblame?…and what does this have to dowith cash machines? Would the pilot havestill made the mistake if the cockpit - a verycomplicated computer interface - had beendesigned differently? Or is better trainingthe solution?This is something that is important forcomputer scientists to know - as if it is thedesign of the human-computer interfacethat is the problem then they can dosomething about it. You can help us findout, just by playing a Space Invaders game.Interested in helping? Find out more onthe <strong>cs4fn</strong> website.Join the experiment. Play the game.You can use an ancient magic squareknown as the Loh Shu to help you win theMarrakech Texting Game. Find out how inthe <strong>cs4fn</strong> webzine:www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/Did you know?The main town square inMarrakech is called theMagic SquareMagic Squares wereinvented in China.The earliest one sofar discovered is on ascroll from 2800 BC.Email us at <strong>cs4fn</strong>dcs.qmul.ac.ukFeel free to photocopy pages from <strong>cs4fn</strong> for personal or class use5


Conjuring Cyborg Super Senses:Exclusive Interview withCyborg Kevin WarwickCould humans ever gainsuper-human powers?Could the blind see withthe help of computers?This is the stuff of sciencefiction comics and films -like Dr Octopus and theX-men or Geordi La Forgefrom Star Trek who couldsee using implants in histemples. Can computerscience make things liketelepathy, dismissed asmagic today, become areality of the future? Wetalked to the world’s firstCyborg, Kevin Warwickabout what it is like tohave super-humansenses.Our senses are not great compared to otheranimals. Peregrine falcons can see smallprey up to 5 miles away. Polar bears cansmell a seal from similar distances. Manyanimals have senses we do not possess atall, like bats that can sense in ultrasound.Inventing tools to improve our senses isalmost a defining feature of being human.After all that is all that a pair of glassesdoes. Computer technology can even letus "see" things other than light. Radiotelescopes, for example, let us see distantgalaxies and the combination of theInternet and spy satellite technologyallows everyone to look down fromspace on any street in the world.All of this technology is disconnectedthough. It doesn't really give ussuperhuman senses any more than sittingin a tank gives us armour-plated skin. Thetechnology turns the signals into somethingour limited abilities can sense. We then justuse our eyes or ears as normal.Neuroscientists increasingly understandhow our brains and nervous system, thebrain's communication system to the restof the body, works. Signals from our eyesor fingertips pass down our nerves to thebrain that turns them into understandingof the world around us. Similarly the brainsends messages out down the nerves tocontrol our movements. Our brains are veryadaptable, though. Where the messagescome from originally or ultimately go todoesn't matter too much to the brain...andas they are basically just electrical signalscomputer technology can both detect themand recreate them.“Sitting in atank doesnot giveyou armourplated skin”This leads to intriguing questions. Whatwould be possible if we linked computersdirectly to the nervous system or even thehuman brain? Can we “cure” disabilities?Could we have super-human senses? Couldwe sense in ultrasound like a bat and whatwould it actually feel like? If the computerswere linked to the Internet, could it literallytake our senses further: outside our bodiesaltogether? Is any of this even remotelypossible?6Passionate about computer science?www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/


This all sounds like science fiction or magicbut it has already happened. They are thekinds of question Cybernetics Professor,Kevin Warwick of Reading University(www.kevinwarwick.org/) is interestedin...and he actually turned himself intothe world's first cyborg to find out answers.A team of neuroscientists implanted a chipdirectly into the nerves of his arm. It sensedthe electrochemical signals travelling alonghis arm from his brain and transmittedthem to a computer. The computer couldalso send signals to the implant. They thentravelled along the nerves of his arm to hisbrain just like the normal sense signalswhen he touched something.By connecting the computer to anultrasound detector, with the signals from itbeing sent via the implant to his brain, hecould literally feel objects moving towardshim even when blindfolded. His brain learntto interpret the signals from the ultrasound.He really had gained a completely newsense.The implant was also connected to theInternet. For example, a robot arm copiedhis arm movements by sensing the signalsbetween his brain and his hand as heflexed his fingers...even though he was inNew York and the robotic hand in England.What does it feel like?According to Kevin:"Controlling a robot hand on a differentcontinent with my own brain signals wasreally weird, especially when I could feelhow much force the hand was applying.Even after thinking about this for some timeI cannot fully imagine the extent ofpossibilities. Essentially your bodycan be any physical shape orsize whatever that means."A student made a light-necklace for Kevin’swife, Irena, to wear. When he was relaxedthe necklace sensed this via the implantover the Internet and was a cool blue.When he was excited however, his wifewould know as her necklace glowed red asa result...even when she was in Londonand he was still in Reading. When she laterhad probes inserted into her arm, shedidn't need to watch the necklace. Shecould directly feel the signals from his armand vice versa, allowing them tocommunicate directly nervous system tonervous system.Kevin is excited as towhere this could lead:"One of my heroes is Alexander GrahamBell, so when my wife and I succeededwith the direct nervoussystem to nervous systemcommunication experiment itwas the most exciting thingimaginable. With ablindfold on, my brain received neuralpulses that originated from my wife'snervous system. Who knows where this willlead? Hopefully to thought communication,so maybe we won't need speech in thefuture."The next step is to place implants not inthe arm but directly in the brain. The useof brain implants is actually already quitewidespread to help some people withParkinson's disease live a normal life again.What hasn't been done is to connect brainimplants to the Internet and so connecthuman's brains directly together. Thatraises even more amazing questions thatwere previously only the realm of sciencefiction and pseudoscience. Can moreadvanced forms of this technology make"telepathy" a reality? Could a humandirectly sense the thoughts of another,and if so what would it be like?We could soon know.Email us at <strong>cs4fn</strong>dcs.qmul.ac.ukFeel free to photocopy pages from <strong>cs4fn</strong> for personal or class use 7


Its good to talk:Alexander Graham BellThe famous inventor of the telephoneAlexander Graham Bell was born in 1847in Edinburgh, Scotland. His story is afascinating one, showing that like all greatinventions, a combination of talent, timing,drive and a few fortunate mistakes arewhat’s needed to develop a technology thatcan change the world.A talented ScotAs a child the young Alexander GrahamBell, Aleck, as he was known to his family,showed remarkable talents. He had theability to look at the world in a different way,and come up with creative solutions toproblems. Aged 14, Bell designed a deviceto remove the husks from wheat bycombining a nailbrush and paddle into arotary-brushing wheel.Family talkThe Bell family had a talent with voices. Hisgrandfather had made a name for himselfas a notable, but often unemployed, actor.Aleck’s mother was deaf, but rather thanuse her ear trumpet to talk to her likeeveryone else did, the young Alexandercame up with the cunning idea thatspeaking to her in low, booming tones veryclose to her forehead would allow her tohear his voice through the vibrations hisvoice would make. This special bond withhis mother gave him a lifelong interestin the education of deaf people, whichcombined with his inventive genius andsome odd twists of fate were to changethe world.A visit to London,and a talkingdogWhile visiting London with his father, Aleckwas fascinated by a demonstration of SirCharles Wheatstone's "speaking machine”,a mechanical contraption that madehuman like noises. On returning toEdinburgh their father challenged Aleckand his older brother to come up with amachine of their own. After some hardwork and scrounging bits from around theplace they built a machine with a mouth,throat, nose, movable tongue, and bellowfor lungs, and it worked. It made humanlikesounds. Delighted by his success Aleckwent a step further and massaged themouth of his Skye terrier so that the doggrowls were heard as human words. Prettyruff on the poor dog.Speaking ofteachingBy the time he was 16, Bell was teachingmusic and elocution at a boy's boardingschool. He was still fascinated by trying tohelp those with speech problems improvetheir quality of life, and was very successfulin this, later publishing two well-respectedbooks called The Practical Elocutionist andStammering and Other Impediments ofSpeech. Alexander and his brother touredthe country giving demonstrations of theirtechniques to improve peoples’ speech. Healso started his study at the University ofSee thewebzinefor thestory ofhowcomputer science studentLila Harrar was also inspiredby a deaf friend... andshe has ended up witha commercial product.London, where a mistake in readingGerman was to change his life and lay thefoundations for the telecommunicationsrevolution.A ‘silly’ Germanmistake thatchanged theworldAt University, Bell became fascinated bythe ideas of German physicist HermannVon Helmholtz. Von Helmholtz hadproduced a book, On The Sensations ofTone, in which he said that vowel sounds,a, e, i, o and u, could be produced usingelectrical tuning forks and resonators.However Bell couldn’t read German verywell, and mistakenly believed that VonHelmholtz's had written that vowel soundscould be transmitted over a wire. Thismisunderstanding changed history. As Belllater stated, "It gave me confidence. If I hadbeen able to read German, I might neverhave begun my experiments in electricity.”The time formore than dotsand dashesHis dreams of transmitting voices over awire were still spinning round in his creativehead. It just needed some new ideas tospark him off again. Samuel Morse had justdeveloped Morse Code and the electronictelegraph, which allowed single messagesin the form of long and short electronicpulses, dots and dashes, to be transmittedrapidly along a wire over huge distances.Bell saw the similarities between the idea ofbeing able to send multiple messages andthe multiple notes in a musical chord, the“harmonic telegraph” could be a way tosend voices.8Passionate about computer science?www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/


ChanceencounterAgain chance played its roll intelecommunications history. At theelectrical machine shop of Charles Williamsin the USA, Bell ran into young ThomasWatson, a skilled electrical machinist ableto build the devices that Bell was devising.The two teamed up and started to worktoward making Bell’s dream a reality.To make this reality work they needed toinvent two things: something to measurea voice at one end, and another device toreproduce the voice at the other, what wewould call today the microphone and thespeaker.The speakeraccidentJune 2, 1875 was a landmark day for teamBell and Watson. Working in theirlaboratory they were trying to free a reed, asmall flat piece of metal, which they hadwound too tightly to the pole of anelectromagnet. In trying to free it Watsonproduced a ‘twang’. Bell heard the twangand came running. It was a sound similarto the sounds in human speech; this wasthe solution to producing an electronicvoice, a discovery that must have come asa relief for all the dogs in the Boston area.The mercurymicrophoneBell had also discovered that a wirevibrated by his voice while partially dippedin a conducting liquid, like mercury orbattery acid, could be made to produce achanging electrical current. They had adevice where the voice could betransformed into an electronic signal. Nowall that was needed was to put the twoinventions together.The firstemergency callOn March 10, 1876, Bell and Watson setout to test their new system. The story goesthat Bell knocked over a container withbattery acid, which they were using as theconducting liquid in the ‘microphone’.Spilled acid tends to be nasty and Bellshouted out "Mr. Watson, come here. Iwant you!" Watson, working in the nextroom, heard Bell's cry for help through thewire. The first phone call had been made,and Watson quickly went through to answerit. The telephone was invented, and Bellwas only 29 years old.The worldlistensThe telephone was finally introduced to theworld at the Centennial Exhibition inPhiladelphia in 1876. Bell quoted Hamletover the phone line from the main building100 yards away, causing the surprisedBrazilian Emperor Dom Pedro to exclaim,"My God, it talks", and talk it did. Fromthere on, the rest, as they say, is history.The telephone spread throughout the worldchanging the way people lived their lives.Though it was not without its socialproblems. In many upper class homes itwas considered to be vulgar. Many peopleconsidered it intrusive (just like somepeople’s view of mobile phones today!),but eventually it became indispensable.Bell became rich and famous, and he wasonly in his mid thirties. The Bell telephonecompany was set up, and later went on tobecome AT&T one of Americas foremosttelecommunications giants.Can’t keep agood idea downInventor Elisha Gray also independentlydesigned his own version of the telephone.In fact both he and Bell rushed theirdesigns to the US patent office within hoursof each other, but Alexander Graham Bellpatented his telephone first. With themassive amounts of money to be madeElisha Gray and Alexander Graham Bellentered into a famous legal battle over whohad invented the telephone first, and Bellhad to fight may legal battles over hislifetime as others claimed they hadinvented the technology first. In all the legalcases Bell won, partly many claimedbecause he was such a goodcommunicator and had such a convincingspeaking voice. As is often the way fewpeople now remember the other inventors,though different countries now claim theinvention of the telephone for differentpeople, so there is plenty to talk aboutthere!Read Terry Pratchett’s brilliant bookGoing Postal for a fun fantasy aboutinventing and making money fromcommunication technologyon DiscWorld.Email us at <strong>cs4fn</strong>dcs.qmul.ac.ukFeel free to photocopy pages from <strong>cs4fn</strong> for personal or class use 9


Bad Wolf...or a virus in your head?Lights,cameras,web pageBack in the summer of 2001, the StevenSpielberg film AI: Artificial Intelligence wasreleased. Along with the standard filmtrailers on the web came rumours aboutsomeone named Jeanine Salla. If yousearched for the name you found a web pagefor a university scientist working onadvanced robotics and artificial intelligence.It all looked very convincing: lists ofscientific papers, a CV, and a full website forBangalore World University. This was just thestart. You could continue the trail and findother sites, drawing you into a world ofrobotic revolution. But the revolution wasn'tabout robots. The sites were fakes. The realrevolution was the emergence of viralmarketing as a tool for marketing movies.The birthof ViralMarketingViral marketing is a different way to raiseawareness of your film or TV show. You don'tshove it forward using the usual posters or TVcampaign. Instead you create a new onlinereality, and wait; someone will find it, andthen they tell their friends, and their friendstell others. They post on bulletin boards andeventually you create an enormous buzz onthe Internet. The low budget horror film TheBlair Witch Project showed for the first timewhat a cost effective and powerful marketingstrategy having a fictional web presence was.It was only a matter of time before thismarketing method became mainstream. Thefictional sites look as real as anything elseon the web; there are layers of secrets anddetails, hidden text, web sites that look as ifthey have been 'hacked', with messageshidden in the source code of the web pages.These virtual worlds have the power to drawyou in.BBC's BadWolfA recent example of good viral marketing isin the 2005 BBC TV series Dr Who, whereclues on the mystery surrounding the identityof the 'Bad Wolf' were laid out across severalfictional sites like www.badwolf.org.uk.There were fake sites that were actuallyreferred to in the series(www.whoisdoctorwho.co.uk), a fake site forthe UNIT group (www.unit.org.uk) and for thefictional company Geocomtex that appearedin the show (www.geocomtex.net) Thesesites were not publicised in the early stages.Their presence exploded onto the Internet asfans traded information. The viral marketinghelped make the TV series a resoundingsuccess, and added a whole new dimensionto the series.10Passionate about computer science?www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/


A step toofar?In 2001 Electronic Arts released aninnovative new game called Majestic. Theconspiracy-based game invaded your life andcouldn't be switched off; you give it yourphone number, fax number and e-mailaddress. Strange faxes arrive, odd phonecalls occurred at strange times andmysterious emails arrived. The line betweengame and reality blurred, as the designersmade use of all the electronic forms ofcommunication available to make the gameplay real. Surprisingly however the gamewas not a success. In fact it was shut downhalf way through costing the company manymillions of pounds. In 2001, the gameplayers of the world weren't ready forthat level of immersive reality just yet.Beyondthe webBut there are still games around thatare played by mixing fantasy withreality. For example Uncle Roy(www.uncleroyallaroundyou.co.uk/) is agame that links online players worldwidewith players on the real streets of the city,who, using mobile computers search forthe mysterious Uncle Roy. This type ofentertainment is set to continue and expandas new technologies become available togive us new ways to communicate and play.Will games of the future move off the screenand into people’s lives, creating uniquedigital performances?The futureThe creative use of computers and the webin marketing films and television seriesthrough the creation of alternative realitieswill continue, and who knows where itwill end. Perhaps in the not too distant futurethe immersive reality that Majestic pioneeredmay join up with the alternative realitiescreated for viral marketing; a get togetherwhich could prove quite a show.The next season of Dr Who will hit the TVscreens as we go to press in Spring 2006.How will it be publicised? The Cybermenreturn: half human, half machine. Are theyour future humans? We don’t know how thepublicity will go but suggest you look outfor web links to Torchwood and CybusCorporation. And K9 the Doctor’s earthboundfaithful robot dog, left with Sarah Jane Smithmakes a surprise return: robot pets our futureor our present? Let us know your views byentering our future human competition. Seepage 3.Watch Out for thenext <strong>cs4fn</strong> magazine:a special issue onComputer Scienceand EntertainmentEmail us at <strong>cs4fn</strong>dcs.qmul.ac.ukFeel free to photocopy pages from <strong>cs4fn</strong> for personal or class use11


Magical Memoriesjust shuffling along“Pick a card, any card!” How often have you heard magicians say that? The normal routine is thatyou pick a card, the magician shuffles the deck, and abracadabra, reveals your chosencard. But behind this magic often lies some interesting maths, and as we will see later,magicians’ shuffles have actually led to the development of new ways for computers to work.Let’s start with a trick to amaze your friends.The 21-card trick.The Magic effect: Have your friend shufflea pack of cards and then you deal outsingle cards left to right into 3 piles of 7cards, all face up. Your friend has tomentally select one of the cards. Theymustn’t tell you which card it is, but shouldtell you the pile it is in. You collect up thecards, and deal them out a card at a timeleft to right into three piles once more.Again they tell you the pile their card is in,you collect the cards once more, sayingyou’re struggling to “read your friend’smind”. Deal the cards out across the tablein the three piles again in the same way.Your friend indicates the pile their card isin. Collect the cards again and deal theminto the three piles one last time. Youimmediately announce their card andmagically it is in the very middle positionof the pack.How do you perform the trick?Let’s look at the ‘mechanics’ of the trick.It involves several deals, each apparentlyshuffling the order of the cards, but doingso in a rather cunning way.In fact it’s really rather simple. All you haveto do is make sure you always put the pileyour friend selects carefully between theother two piles and deal the pack as above.Do that and after the fourth deal the middlecard of the middle pile is the chosen card,which you can reveal as you see fit. Try andwork out why it works, but then go to the<strong>cs4fn</strong> web site for an explanation.Magic and Computers- developingyour own algorithmsOnce you understand the mechanics youcan play with some ideas. The order of thechosen pile must not be changed, but thetwo other piles could for example beshuffled before being put together. As longas the chosen pile goes undisturbedbetween the two other piles of seven cardsthe order of the other cards doesn’t matter.You might want to try and come up withyour own additional twists now you knowhow it’s done. The workings of this trick arewhat’s known as an algorithm to computerscientists. The set of steps that you gothrough to get the trick to work are similarto the way that a computer steps throughits instructions in a software program.Brent Morris:Magician andComputer ScientistThe magicians’ art of shuffling in specialways to make tricks, like the 21 card trick,work can also help us build computers.Magicians want to move cards aroundefficiently; computers want to move dataaround in their memory efficiently.Perfecting the perfect shuffleIn a perfect shuffle, the magician cuts thecards exactly in half and perfectly interlacesthem, alternating one card from each half.It takes years of practice to do but doeslook impressive. There are 2 kinds ofperfect shuffles: With an out-shuffle the topcard of the deck stays on top. With an inshufflethe top card moves to the secondposition of the deck. Magicians know that8 perfect out-shuffles restore the deck toits original order! It looks like the deckhas been really mixed up, but it hasn’t.Computer scientist Brent Morris wasfascinated by magic. In particular hebecame interested in the “perfect shuffle”in high school and has pursued itsmathematics for more than 30 years withsome amazing results. He earned hisDoctorate in Maths from Duke University,and a Master's in computer science fromJohns Hopkins University in the UnitedStates. He is believed to have the onlydoctorate in the world in card shuffling. Healso holds two US patents on computersdesigned with shuffles, and has written abook on the subject called Magic Tricks,A perfect shuffle in action12Passionate about computer science?www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/


Card Shuffling, and Dynamic ComputerMemories. Why the interest in perfectshuffles?Binary shifts - as if by magicYou can use perfect shuffles to move thetop card to any position in the pack, usinga little bit of the maths behind computers:binary. Suppose you want the top card(let’s call that position 0) to go to position6. Write 6 in base 2 (binary), giving 110(1x4+1x2+0x1). Now read the 0's and 1’sfrom left to right: 1:1:0. Then, workingthrough the 1’s and 0’s, you perform anout-shuffle for a 0 and an in-shuffle fora 1. In our case that means:Point, clickand SodaraceTalk of the Toon1: an in-shuffle, first1: another in-shuffle,0: and finally, an out-shuffleAs if by magic (if you are capable of doingperfect shuffles) the top card will havemoved to position 6. Of course it workswhatever the number, not just 6.What does this have to do with the designof computers? You can use exactly thesame ideas to move data efficiently aroundcomputer memory, which is what BrentMorris discovered and patented.Curtain callSo as you impress your friends with your21-card trick, coming up with your ownperformance ideas and are basking inthat applause, remember two things.Number one: a magician never revealstheir secrets.Number two: computers don’t work byHogwart’s magic … only by mathematicalmagic.Following on from its successful ‘run’at the Royal Society summer exhibitionSodarace, the online Olympicscompetition between human andmachine creativity, has taken thenext step forward.Loads of people throughout the worldhave used Sodarace for their school andeven university projects; from art anddesign to physics, chemistry, maths andbiology, the options seem limitless and it’sgreat fun.So to help make this even easier youcan now download simple to use‘point and click’ software free fromwww.sodarace.net that lets you select theracetrack terrain and the racers for yourcompetitions. It’s now straightforward towatch as your selected human andmachine created racers go head to head;use your scientific skills to predict whichwill win on a particular racetrack (or justhave a guess).You can also download the first of arange of ‘ready to use’ lesson plans forclassroom activities to try out. Why notask your teachers to give them a go andlet us know how you get on. Keep onracing.Orlando Bloom as a Soda CartoonIt could be you!Do you think computers can be creative likehumans? They are good at repetitive tasksthat are just too boring for humans to do,searching the web for pages on fashiontips or football scores. They can even playsome games like chess better than humans.That’s just done by searching through morepossible moves than a person can. Doesthat count as creative? It doesn't seem,so. How about drawing? Cartoonists arecreative people. If a computer could drawcaricatures of people as well as humanartists do, would that count as beingcreative? Queen Mary, University of London,computer science undergraduates, LilaHarrar and Akbar Hussain decided to findout. As part of their course, they created anArtificial Intelligence program based on theBAFTA award winning SodaConstructor,which draws cartoons of people. It works bychoosing the most distinctive features of aface and exaggerating them just as humancartoonists do. At the Royal Society SummerExhibition it was so successful they evenhad a Robot trying it out. You can get theAI to do a caricature of you atwww.dcs.qmul.ac.uk/<strong>cs4fn</strong>/ and find outhow it sees you, then decide for yourselfwhether it is creative or not.Email us at <strong>cs4fn</strong>dcs.qmul.ac.ukFeel free to photocopy pages from <strong>cs4fn</strong> for personal or class use 13


Sonic sleight of hand :The ‘magic’ of MP3Believe it or not, your MP3 player is actually playing a sonic magictrick on you. MP3 is a format, a way of storing sounds and musicso that they take up as little memory in the computer as possible.That way you can have hundreds of your favourite tracks on youriPod, which is really just a small computer disc that stores thedigital music. The trick is to find a way to remove some of thesound information without your ears and brain noticing. The computerscientists who developed MP3 are playing a trick on your ears.Sounds like musicSo how is the trick done? Well first we needto look at sound and music. Sound is achange in air pressure. When Madonnasings, her vocal cords change the airpressure and the sound wave passes to ourears. Our eardrum converts this wave of airpressure into a mechanical movement inthe tiny bones in our ear. That in turn ischanged into a nerve signal that goes to ourbrain. A microphone works in the same way.The pressure wave moves a part of themicrophone called the diaphragm, and it'sthis movement that turns the soundpressure wave into an electronic signal.When we are recording digital music wetake many millions of very rapid samples -measurements - of the electrical signal andturn them into numbers to store.Frequency askedquestionsOne of the things that characterises thesound wave is the frequency it is made of.Frequency means a regular repeatingpattern. A very dull sound might just be asingle frequency. The sound gets louderthen softer, say every second, and repeatsthis cycle every second until you switch itoff. This tedious sound would have afrequency of 1 Hertz (1 Hertz means one'cycle' per second). Normal music doesn'tsound at all like this dull repeating noise,but as it happens you can take any soundor music and, using some specialmathematics, convert it into a set ofdifferent frequencies. Each of thesefrequencies alone just sound dull but addedtogether it makes the music. The same ideais used in a music synthesiser; you canmake the sound of any instrument byadding together the right frequencies. So wenow know that our music can be describedas frequencies, and we can start to playtricks.Ear, earTurns out that our ears, though very clever,don't do everything well. Certain frequencieswill stop you hearing other close byfrequencies. These special frequencies'mask' the presence of the others nearby.Once you know this (it was discoveredthrough lots of experiments on hearing),then you know there is no point in using upvaluable computer memory storinginformation on the frequencies your earscan't hear. So you don't store them. Kazam!You remove these frequencies altogether,but because they were masked by the otherfrequencies you can hear, you don't noticethey have vanished.Bunny in theheadlightsThere is another cunning effect you canuse. When we look at a bright light, for awhile afterwards, we can’t see a dim light.Our eyes change so we aren't dazzled bythe bright flash, but this leaves our ability tosee dimmer lights reduced forsoeome time.The same thing happens with sounds. Aloud sound will stop you hearing a quietersound that follows just after. So we can lookat the digital music signal and work out allthe places where a loud sound is followedby a quiet sound, and then cut the quietsound out. This saves computer memory,and again the trick is that your ears won'tnotice the quieter sound is missing.Sonic sleight of handIt's using these tricks to vanish those partsof the sounds your ears won't notice aremissing that gives MP3 its great ability tocompress music. We need to store less databut the music sounds just as good. To beable to give the world MP3, ComputerScientists needed to work on ways to do themaths, as well as understand how our earswork. So the next time you listen to yourMP3 player just think of all the maths andcomputing making up the wonderful din.Yeh but no but...Read aboutcompressing VickyPollard in thewebzine14Passionate about computer science?www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/


Claytronics -from goo to you?It would be magicalto be able to teleport:Star Trek’s transporterwas a clever device thatallowed the charactersto teleport from theirspaceship to the planet.Devised by GeneRodenberry, Star Trek'screator as a way to avoidthe costly special effectsof landing spaceshipsin the TV series, thetransporter became thekey to many an episode.In effect, the transporter scans thepassenger’s atoms, disintegrating them intoenergy, then transmitting the energy torecreate a copy of that "pattern of atoms”on the planet below. It's a nice idea but thephysics is frightening, disintegrating atomsand turning them into energy is exactly whata nuclear bomb does, and a nuclear bombonly converts a tiny fraction of matter toenergy. If we really want to be able to createcopies of ourselves at a distance we need tothink of less explosive methods.The physics isfrightening ...exactly whata nuclear bombdoesIt is just this problem that computerscientists in the USA at the Carnegie-MellonUniversity Synthetic Reality Project arelooking at. Their solution: a new sciencecalled Claytronics. By using tinyprogrammable machines they hope todevelop 'programmable matter', wheremillions of tiny devices called "claytronicatoms" or "catoms" would assemble into theshape of any object you want, connectingand disconnecting as theymove. Currently they havedeveloped experimentalcatoms that connect andmove via magnets. Theseearly devices are aroundfour centimetres in size,much larger than the sizethe team want to develop,but you have to startsomewhere.The challenges are bothin the technology, how doyou build these tiny catoms,but also in the programming,how do you instruct billions oflittle machines to build a movingcopy of yourself from the goo? Inthe future, if these problems aresolved, we can imagine a worldwhere you can transmit yourself to ameeting where the claytronics willbuild a copy of you, much like thesmart liquid metal of the T-1000Terminator android in the filmTerminator 2 Judgement Day. Onceyour meeting is over, your duplicate willmelt away and the claytronicprogrammable matter will reassemble intowhatever it is next instructed to become.From goo to you…since the dawn oftimeDoes a robot that can assemble itself out of particles soundfar-fetched? Something similar can already be done in theanimal world…and by the oldest animal of all – the sponge.A sponge’s body is made up of a loose assemblage ofseparate types of cells that cooperate – more like acolony of cells rather than a single animal…and justlike the claytronics idea. How good are sponge cellsat assembling? Put different species of spongesin a liquidizer. Once liquidized, drop them backinto seawater and the cells that havesurvived of the different sponges willreassemble back into sponges again.Often computer scientists use theinspiration of the way animals dothings to create advancedtechnology.Email us at <strong>cs4fn</strong>dcs.qmul.ac.ukFeel free to photocopy pages from <strong>cs4fn</strong> for personal or class use 15


tlhIngan HolDajatlh'a' (Do youspeak Klingon)Language is something we take for granted. We learn it as a child, maybe studya new language at school, or pick up some choice phrases for a holiday trip. Alanguage consists of words - the bits it is made of - and grammar - the way thesebits are put together. "The cat sat on the mat" makes sense. "Cat mat on sat the"doesn't. We have the same words but the rules of grammar are broken ... theinformation is lost. This confused list of words still follows a rule: the words arearranged alphabetically. But without the right rules, the rules of grammar, the wordscan't do what they need to do, which is let us know where that pesky cat is.When we have to communicate with acomputer and give it instructions wewant to make life easy for ourselves. Inthe beginning programmers were forcedto use binary – lists of 1's and 0's to tellthe computer what to do. That's becausecomputers are really just a very complexbox of switches, and the 1's and 0's toldthe computer which parts of its circuitsto switch on and off, but it made writingthe programs a nightmare. It was askingyou to speak in an alien tongue.A better way to communicatewith our computersSomething had to change, so those longsufferingprogrammers looked to whatthey knew best, human languages, tofind a solution. In the same way as aword is made up from letters you couldstart to think of lists of binary instructionsthat you could associate together into asimple command to which you couldattach some meaningful name. So ratherthan tell the computer in 1's and 0's('0101010' say) to put a particular set ofvalues into a particular circuit, you coulduse the phrase 'LET X=2' to mean thesame. The computer understands how toturn a number into binary. It knows that2 is 10 in binary (that means take a twoand add no ones to it, just like a normaldecimal 10 means take a ten and addno ones), so this useful idea of acomputer language that WE understandmeans we don't need to talk the nasty aliencomputer lingo. The language instructiontells the computer to find a place in itsmemory, which the programmer wantsto call X and to put 2 in there.So to programming languagesThe programmer’s language is translatedto the language the computer uses byfollowing a list of instructions. In the sameway as with a human language, if we getthe grammar wrong and say typed '=LET 2X' the computer wouldn't know what to do,the information is there but the grammar iswonky. So computer languages developedfollowing many of the rules of humanlanguages to try and keep it as easy aspossible for human programmers toprogram. BASIC, Beginners All SymbolicInstruction Code was an early attempt.That's why, for example, there are universitycourses on Computer Science andLinguistics. The two are very closely related.The Universal Translator?There are now computer programs thattranslate human languages. You may haveseen these on the Google or Babel Fish websites for example. What is happening hereis that, to translate say French text intoGerman, the French is first translated to alanguage the computer understands andcan work with. The text in that computerlanguage is then translated back intoGerman ... so it's passed through thatstrange alien binary language of thecomputer somewhere in between. Of courseits very basic, Google just uses a simpleapproach to translation, but there are manyresearchers around the world trying todevelop software that takes into accountthe complex rules of human languages andgrammar. Some systems even try to learnlanguages from scratch like a child,in effect trying to produce the universaltranslator similar to the idea in Star Trek,which can translate any language toEnglish. (Of course it would be easier to usethe TARDIS telepathic circuits like Dr Who... a small summer project there for anyoneinterested:-)16Passionate about computer science?www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/


Synthetic LanguagesWe tend to think of human languages asalways having been around in their currentform, and computer languages as new, buthuman languages need to have developedfrom somewhere, and that's anotherfascinating story where computers havehelped. Some people have even created theirown spoken languages such as Esperanto.The basic rules and words of Esperanto wereproposed by LL Zamenhof at the end of the19th century. The idea was to create a worldlanguage that everyone could speak. It neverreally took off, though there are still manypeople who learn it and use it.Which brings us to Klingon, a made uplanguage from Star Trek developed by MarcOkrand, (see the Klingon Language Instituteat www.kli.org/). It has words, a fixedgrammar and there are lots of 'nativespeakers' out there, so you guessed it ...there are programs that translate English toKlingon. It's interesting to think that asoftware program to translate a made upalien language does it by using its ownmade up alien language in the computer. AsMr Spock would say 'Quite Fascinating!'Traditionally machine translation has involvedprofessional human linguists manually writing lots oftranslation rules for the machines to follow. Recentlythere have been great advances in what is known asstatistical machine translation where the machinelearns the translations rules automatically.It does this using a ‘parallel corpus’: just lots of pairs ofsentences; one a sentence in the original language, theother its translation. Parallel corpora are extracted frommulti-lingual news sources like the BBC web site whereprofessional human translators have done thetranslations.Qapla’ (“Success!”)FootnoteIn the interests of Galactic Peace it shouldalso be pointed out that there are alsoprograms that translate English into Vulcan,Romulan, Ewok, Wookie, Ferengi ...Let’s look at an exampletranslation:Above is some original arabic with itstranslation below:Machine Translation: Baghdad1-1 (AFP) – The official Iraqi newsagency reported that the Chinesevice-president of the RevolutionaryCommand Council in Iraq, IzzatIbrahim, met today in Baghdad,chairman of the Saudi ExportDevelopment Center, AbdelRahman al-Zamil.Human Translation: Baghdad 1-1(AFP) – Iraq's official news agencyreported that the Deputy Chairmanof the Iraqi Revolutionary CommandCouncil, Izzet Ibrahim, today metwith Abdul Rahman al-Zamil,Managing Director of the SaudiCenter for Export Development.This example shows a sentence from anArabic newspaper then its translation by theQueen Mary, University of London’sstatistical machine translator, and finally atranslation by a professional humantranslator. The statistical translation doesallow a reader to get a rough understandingof the original Arabic sentence. There areseveral mistakes, though. Mistranslating the"Managing Director" of the exportdevelopment center as its "chairman" isperhaps not too much of a problem.Mistranslating "Deputy Chairman" as the"Chinese vice-president" is very bad. Thatkind of mistranslation could easily lead toproblems. That reminds me of the point inThe Hitch-Hiker’s Guide to the Galaxywhere Arthur Dent’s words "I seem to behaving tremendous difficulty with mylifestyle," slip down a wormhole in spacetimeto be overheard by the Vl’hurgcommander across a conference table.Unfortunately this was understood in theVl'hurg tongue as the most dreadful insultimaginable, resulting in them waging terriblewar for centuries.…For now the human’s are still the besttranslators but the machines are learningfrom them fast!Email us at <strong>cs4fn</strong>dcs.qmul.ac.ukFeel free to photocopy pages from <strong>cs4fn</strong> for personal or class use 17


Strictly X-FactorTV talent shows like X-Factor,or Soapstar Superstars havealways been popular. Its notjust the talent on show thatmake them must see TV– it’s having the right mix ofpersonalities in the judgestoo. Simon Cowell has madea career of being rude – evenreaching the dizzy heights ofa guest appearance on TheSimpsons. In contrast judgeSharon Osborne’s on screenpersona is far moresupportive. It’s often thetension between the judgesthat makes good TV.However, if you believe DrWho, the future of gameshows will be robot judgeslike AnneDroid in the spaceage version of The WeakestLink…let’s look at the robotfuture. How might you goabout designing computerjudges?We need to write a program. We don’twant to have to describe new judges fromscratch each time. We want to do as littleas possible to describe each new one.What makes a judgeFirst let’s describe a basic judge. We willcreate a plan, a bit like an architect’s planof a building. It can then be used to buildindividual judges. What’s the X-factor thatmakes a judge a judge? First we need todecide on some characteristics of judges.We can make a list of them. The only thingcommon to all judges is they have differentpersonalities and they make judgementson people. Let’s simply say a judge’spersonality can be either supportive or rude,and their judgements are just marks out of10 for whoever they are watching.Character : SUPPORTIVE OR RUDE.Judgement : 1 TO 10.So let’s start to specify (describe) Judges aspeople with a personality and capable ofthinking of a mark.DESCRIPTION OF a Judge:Character personality.Judgement mark.All we are saying here is whenever wecreate a Judge it will have a personalcharacter (it will be either RUDE orSUPPORTIVE). For any given judge we willrefer to their character as “personality”. Itwill also have a current judgement, whichwe will refer to as mark: a number between1 and 10.Best BehaviourWe are now able to say whether a judge isrude or supportive, but we haven’t actuallysaid what that means. We need to set outthe behaviours associated with being rudeand supportive. To keep it simple, let us saythat the personality shows in the things theysay. A rude judge will say “You’re adisgrace” unless they are awarding a markabove 8/10. For high marks they willgrudgingly say “You were ok I suppose”.TO Speak:IF (personality IS Rude) AND(mark 8)THEN SAY “You were ok I suppose”.It would be easy for us to give them lotsmore things to choose to say in a similar way.We can do the same for a supportive judge.They will say “You were stunning” if theyaward more than 5 out of 10 and otherwisesay “You tried hard”.Ten out of TenThe other thing that judges do is actuallycome up with their judgement. We willassume, to keep it simple here, that theyjust think of a random number – essentiallythrow a 10 sided dice under the desk withnumbers 1-10 on. Judges’ decisions cansometimes look like that on TV!TO MakeJudgement:mark = RANDOM (1 TO 10).Putting that all together to make our fulljudge description we get:Our final plan formaking judgesDESCRIPTION OF A Judge:Character personality.Judgement mark.TO Speak:IF (personality IS Rude) AND(mark 8)THEN SAY “You were ok I suppose”.IF (personality IS Supportive) AND(mark > 5)THEN SAY “You were stunning”.IF (personality IS Supportive) AND(mark


Kind words for ourcontestants?Suppose now we want to create arude judge, called SimonCoward. Wecan use the plan. We need to say what itspersonality is (Judges just think of a markwhen they actually see an act so we don’thave to give a mark now.)SimonCoward IS A NEW Judge WITHpersonality Rude.This creates a new judge calledSimonCoward and makes it Rude.We could similarly create a rude AnneDroid:AnneDroid IS A NEW Judge WITHpersonality Rude.For a supportive judge that we decide to callSharONN we would just say:SharONN IS A NEW Judge WITHpersonality Supportive.Whereas in the specification we aredescribing a plan to use to create a Judge,here we are actually using that plan andmaking different Judges. So this way wecan quickly and easily make new judgeclones without copying out all thedescription again.A classless society?Computer Scientists are lazy beings – if theycan find a way to do something that involvesless work, they do it, allowing them to stayin bed longer. The idea we have been usingto save work here is just that of describingclasses of things and their properties andbehaviour. Scientists do that a lot:Birds have feathers (a property) and layeggs (a behaviour).Spiders have eight legs (a property) andmake silk (a behaviour)We can say something is a particularinstance of a class of thing and that tells usa lot about it without having to spell it all outeach time (even for fictional ones): egHedwig is a bird. (so feathers and eggs)Charlotte is a spider. (so legs and silk)So we can now create judges to our heartscontent, fixing their personalities andputting the words in their mouths basedon our single description of what a Judge is.All ChangeWe have specified what it means to be arobotic judge and we’ve only had to specifythe basics of Judgeness once to do it. Thatmeans that if we decide to change anythingin the basic judge (like giving them a betterway to come up with a mark than randomlyor having them choose things to say froma big database of supportive or rudecomments) changing it in the plan willapply to all the judges of whatever kind.What we have created is our first objectbasedprogram – it would be relativelyeasy to convert this into a program in aprogramming language like Java or C#.We could create robot performers in asimilar way (after all don’t all the winnersseem to merge into one in the end?).We would then also have to write someinstructions about how to work out who won– does the audience have a vote? When dojudges make judgements? When can theyspeak their mind? How many get knockedout each week? That’s no harder. Why notgive it a try and judge for yourself?So how does a SharONNJudge have daughterKeLEE judges withoutany help from Ozzie? Seewww.dcs.qmul.ac.uk/<strong>cs4fn</strong>/Email us at <strong>cs4fn</strong>dcs.qmul.ac.ukFeel free to photocopy pages from <strong>cs4fn</strong> for personal or class use19


Back (page) to the drawing board.You may have heard the termsoftware engineering. Buildinga complex computer programis like building any complexmachine or structure. It takesskill, professionalism, teamworkand the ability to learnfrom your mistakes. Everytype of engineering throughouthistory has had its share ofdisasters. Early steam enginesexploded, the Titanic famouslysank, the Hindenburg airshipcaught fire, and the Tay Bridgein Scotland fell down.Software engineering is nodifferent. Here are a few of itsdisasters to learn from (morein the <strong>cs4fn</strong> webzine):The Ariane 5 Rocket(problems with big numbersin small spaces, 1996)In 1996 an Ariane 5 rocket exploded fortyseconds after lift-off. The project had taken10 years, and cost $500 million. Thisspectacular software failure was due tosqueezing a big number into the computermemory reserved for a small one. Therewasn’t enough space to hold the rocket’sspeed when it was passed to another smallermemory store. This caused the rocket toveer off course, break up and explode.The moral: Make sure numbers fit theirdestinations.Mars Climate Orbiter(a weighty problemin space, 1999)Programmers work in teams to build softwarefor a space mission. Unfortunately for NASA’s$125 million Mars Climate Orbiter, two teamsdidn’t know what the other was up to. Oneteam was using Imperial weight measures(pounds). The other was using metric(kilograms). The mistake wasn’t found until,when finally in space, the two programs spoketo each other, got very confused and causedthe spacecraft to become lost in space.The moral: software engineering is alsoabout team communicationAT&T Crash (The daythe phones stoppedworking…all of them, 1990)In late 1989, AT&T engineers upgraded thesoftware of their 114 US switching centres:the computers that make the connections soyour phone links to the one you are calling.Each computer was duplicatedso if one went wrong the other would takeover. On January 15th 1990, they stoppedworking: 70 million calls failed. Theproblem was in a single line of code outof millions…and it was in both computers’copies. AT&T lost $1 billion as customersfled to their competitors.The moral: with software, duplicationdoesn’t always helpBignumberscan hurtUSS Yorktown Stops(a big something causedby nothing, 1998)Dividing by zero is a bad idea. The answerdoesn’t exist. However a crewmember of thecomputer controlled guided-missile cruiserUSS Yorktown mistakenly entered a zero ontheir console. It resulted in the computerprogram trying to do an impossible divideby zero. The program crashed and caused afailure in other linked computer systems onthe ship, eventually shutting down the ship'sengines, leaving it drifting for hours.The moral: always check numbersare as expected.The Pentium Chip Error(not enough numbers inthe table, 1994)The Pentium Chip used a look up table(LUT) to do division; basically it uses a precalculatedset of numbers to speed thingsup. The LUT should have contained 1066elements, but when the numbers weredownloaded a bug in the software onlyput in 1061 of them. No one checked, andthe chip went to manufacture with thosenumbers missing. When the mistake wasfound the chips all had to be replaced.The cost was more than $4 billion.The moral: keep testing all the way.Bugs cankillThe missing AmericanPatriot Missile (a problemwith bad timekeeping,1991)In 1991, during the first Gulf War, anAmerican Patriot Missile battery in Dharan,Saudi Arabia, failed to shoot down anincoming Iraqi Scud missile. The Scudmissile hit an army barracks with manycasualties. State-of-the-art computerscontrolled the Patriot missile, but therewas a problem. To work Patriot needed toaccurately know the time. This was donewith an internal clock that started to tickwhen the computer was first switched on.However the computer program, whenconverting the internal clock time into thetime used by the guidance system introduceda tiny mistake. It rounded the number downslightly. With each passing second the errorbecame larger until finally it was enough tomake the missile miss.The moral: small mistakes in calculationsoften build into big mistakesAnd Finally expectthe unexpectedIn the early days of electronic computersthey used relays, electromechanical switchesthat rocked up and down to switch theelectrical circuits. Grace Murray Hopper,who was in charge of the team workingwith the Mark II computer, (an early electromechanicaldevice), found that a moth hadflown through the window and blocked one ofthe relays, so shutting the system down. Thisis arguably where the term computer ‘bug’comes from.The moral: The things some mothsget into can be shocking!<strong>cs4fn</strong> Paul Curzon, Peter McOwan, Gabriella Kazai and Christof Monz of the Department of Computer Science,Queen Mary, University of London. Keypad photos by Ferenc Kazai. Proof reading by Sue White.Sodarace and the Human Error Modelling Project are funded by EPSRCMicrosoft provide support for printing.Passionate about computer science?www.dcs.qmul.ac.uk/<strong>cs4fn</strong>/

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!