1. Home
  2. Explore
  3. Computer Science
  4. Turing Machines and Chocolate Computing

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Turing Machines and Chocolate Computing

Transcript

So this is about Turing machines, so what I'm going to do is tell you a little bit about what Turing machines are but also look at how you can play with Turing machines in a kind of fun way and an edible way so how you can make a computer out of chocolate that is not just a theoretical one it's a very nice one to eat. First of all I'm going to talk about what is a Turing machine, later on we're going to do some actual practical activities that you can either join in on your own at home if you've managed to find a supply of chocolate in these difficult times. So what is a Turing machine it's actually just a very simple model of computation - one way to think of it is it's a very simple computer but it's a sort of theoretical idea or was originally. It aims to capture the essence of what computation actually is so well then just be a computer it was created by Alan Turing as a way to explore what computers could

possibly do and he did actually come up with this idea before any actual computer existed so it was very much a theoretical idea and what you made these things out of was completely up for grabs at the time he was thinking about it, it was just a mathematical model. So the idea is a Turing machine can actually do any computation that any computer can do either now or in the future, it just might be a little bit slower. So the idea is that each Turing

machine that you create actually does one fixed job so it's a bit like a gadget with an embedded fixed program in it rather than directly computable but it led to this idea and this is what Alan Turing was really interested in about you could have possibly created these general machines that could do anything within limits showing actually imagined Turing machines would be operated by human computers so the human would actually be slavishly working the computer following its instructions form so the original definition of a computer was a human following instructions and Turing machines originally Turing sort of saw them as being this sort of theoretical thing and people would be following the instructions and moving a bits and pieces around so what I'm doing here is really following up with this idea that's the way we're going to do it and we're going to make them out of chocolates

it was completely up for grabs while these things would be made out of so I don't see any reason why you shouldn't make one out of chocolate so what does a Turing machine look like well something a little bit bit like this so it has an infinite tape that has some kinds of symbols on it it has a head if we're working from the top down in this picture that is just something that moves from side to side it has a whole bunch of symbols that you allow to use though the really important thing here is the state register so that just tells you what state you in at the moment and then you have an instruction table at the bottom which is the equivalent of its instruction so let me switch over from slides to show you what I mean physically so the way it was defined this was a kind of mathematical thing but it's a very practical version of a mathematical model what's the basis of what if one of these things look like

well it's like this so the call of it is actually that you have this tape in the middle and this is an infinitely long tape and it could be infinitely long in both directions so this could actually be made of chocolate and I did come with stuff to making it out of chocolate but the chocolate that I could get hold of the actual squares will little do to small so if you get larger bars of chocolate that are even larger than this then you could actually make the whole

thing out of chocolate I hope this looks a bit like a strip of chocolate though the first problem you encounter is this tape does have to be infinitely long so how did earth do you make one out of chocolate that's infinitely long well it's actually quite easy what you have to do is just connect the end of the tape to a chocolate factory Charlie and chocolate restyle and it's just got to create chocolate faster than anybody tries to

look at the tape so as long as the Chocolate Factory is churning out pieces of chocolate that had on the end of the tape then that's fine but to all intents and purposes it's infinite so you can assume that and it could be a chocolate factory at either end if you have infinitely working in both directions so the tape has then symbols on it so in this case I'm using chocolate buttons as my symbols and that is your kind of initial data that you set up an initial

tape that has some patterns on it of whatever your symbols are so it just so happens one of the chocolate companies at the moment produced binary chocolate buttons that come in milk and white chocolate so they are perfect for doing this kind of thing on a chocolate machine in fact one of these symbols in the Turing machine has to be designated as being the blank symbol so as you're churning out the tape, the symbols are initially starting as blank so you could

actually have as a symbol just the absence of something so we decided that blank was actually nothing on the table and the bare chocolate at that point then that would be fine as a symbol for now I'm going to use a actual buttons just because this is more chocolate and I have to eat all of this chocolate at the end because nobody can touch it after I've touched it and the more chocolate the better so that's the core of what's happening in a Turing machine you have this infinite tape with some kinds of symbols on it you can choose the symbols I'm just using two symbols here but there's no reason why it has to be just two symbols you could have symbols for 0 1 2 3 4 5 6 7 8 9 or anything you like red or green and but whatever so we'll start with something simple though so that's the first thing and then you had have a head so again I'm slightly chocolate-ly challenged in the city

but I hope you could see that this could easily be made out of chocolates as well the head is just something that moves along from position to position and so it's sort of as instructions are executed it will move one way or the other. There are two ways of thinking of this it could be you're thinking of it as the head moving one way, or it could be that the tapes sliding backwards and forwards and the head stays in the same place and it doesn't really make any difference which of

those two ways you think but it's a lot more practical to do it this way of having the head move if you're using chocolate so that's basically what I'm going to assume here you also have a state so this is different to the chocolate on the tape so I've made this out of a sweet and they come in different colors it's as different States so the state could change from green to red to orange as the Machine executes and that just changes exactly

what it does now the other thing that really matters is that you have an instruction table and you can think of the instruction table as sort of lots of if-then-else statements so I'll show you this in more detail later but each row of the table is just an instruction that says if you find yourself in the situation described at the beginning then the action as you do other ones you do at the end so that is basically what a chocolate Turing machine consists of

now the big point to realize about this and this is partly why I'm doing it out of chocolate is it's basically made out of symbols and the symbols can be absolutely anything you want so you might think of them as zeros and ones or trues and falses or all sorts of different things and so chocolate buttons is perfectly okay if you don't have chocolate buttons there's no reason why you shouldn't make them out of something else so for example if you

happen to have in of Stormtroopers available and having watched some of the Star Wars films there are all sorts of situations where large numbers of stormtroopers are just standing around doing nothing so why not use that to do some computation so these are all identical stormtroopers so you know maybe what you then want is a different symbol so maybe I can kind of use black ones to be my other symbol and then maybe my other symbol is just any

old baddy of a different color or any old black body so I could make exactly the same thing there's a tape out of a whole series of lego stormtroopers lego bad guys and as long as you've agreed in advance what those symbols are that you're using that's fine of course at the moment we shouldn't be doing this because they should all be two meters apart so your tape have to actually be a little bit longer than this to actually work but it's an infinite tape so that

makes absolutely no difference tool so if they go from 15 centimeters apart to 2 meters apart that's just multiplying by 4 and multiplying infinity by 4 just which leaves you with infinity still so the tape hasn't changed at all by doing that so there's no problem with doing it that way of course the other way you could do it if you did want people you know figures to be the same you could just replace them by robots or not go BOTS and then that's ok because robots can be close together it just depends what you've got enough off to allow for infinite tape the tape has to be infinite because there might be some computation that you have to do that just needed more space on the tape than you've ever used before so it's just got to be big enough for the computation you happen to be doing at the moment in fact but you can't predict how big that would be and that's why it's got to be infinite ok so the

only other thing that you have to specify beyond what I put on the table is just exactly what all the symbols are so you have to specify what the writable symbols are which symbols were allowed on the initial tape is that all of the symbols or is there only a subset that could be on that initial state you have to pick one to be your blank symbol which could just be no chocolate button there and then you also have to decide what are the possible States for this machine that that has to be a finite number a fixed number of states that you decide for this particular Turing machine and you have to decide on one that's a start state so I've used green for my start state and you also have to have one for a stop state that tells you when the machine stops and I've chosen the red state for that so I'm using colors of sweets for my States and I'm using chocolate buttons for what's actually on

the tape so just to summarize all of that what does a Turing machine consist of it's just an infinite tape and that's actually it's memory it's the equivalent of a computer's memory and it contains symbols whether those symbols are stormtroopers or chocolate buttons is neither here nor there as long as you follow the rules what else you have to specify which symbols can appear on the original tape including a specifying a blank symbol

you have to have a read/write head so that's my triangular chocolate the one point that it can change values so so the way it runs is the only thing you can change the point you can change things on the tape is where the head is pointing you need a finite set of possible States and you need a state register that just keeps track of what state you in at the moment you then pick that current state from the fix set of states and you have a start state in a stop state and then finally you have the finite table of instructions and again that has to be finite the only thing that is infinity in any of this is the tape everything else has to be finite so that table of instructions is the equivalent of the embedded program in a particular drawing machine you can think of a showing machine as just a simple input/output machine what is the input it's initial tape the tape that you start

with processing is the operation of the machine it processes the tape and eventually it stops and then the output could be the final state that it stops with so if you're just doing basic calculations and sort of thinking about sort of primary school version of what a computer is then this visits not nicely I should say Turing machines are on the A-level syllabus but I see no reason why it should be taught only at a level I was taught it second year of university

I think or possibly third year of university but I actually I learned about it I'm pretty sure when I was 13 or 14 just from recreational maths books and the idea is very simple so it's actually a very simple model of what we mean computation and computers to be about so it's very I think a very good fun kind of thing to do with young kids as well I would give a health warning with that I'm using a simplified version of the Turing machine you can change the

details in all sorts of ways in ways I've sort of mentioned already for example you could specify that tapes have to be infinite in both directions or just in one might be the tape had the moves order so the tape that moves all the head that moves and there's lots of minor details on that so don't really change what's going on but if you're thinking about this for exams then you need to know exactly what your particular exam board is specifying it has if you're doing it just for the fun of it then it doesn't really matter which of these choices you actually go for so I've kind of given an overview and it in practice what does that mean so that was sort of in theory what it is in practice you can actually operate one of these things and you can do computation on them so that's what my physical version of it is what I've got here on the table made out of chocolate is actually a working computer it just

needs a human person to actually do the operations in the way Turing originally imagined it to work so it's mathematical model but Turing always thought of it is a very practical thing, of an actual machine you could potentially build and he was starting think about how you could build computers so this was before the wall before the first computers existed and the point about this is computation can happen everywhere anywhere not just on silicon so computation and the study of computer

science is nothing to do with computers in the sense of things on silicon it's about manipulation of symbols and symbols can be anything whether that's chocolate or more stormtroopers or you know anything else you want to think of and computation is essentially just manipulating those things in some way that you have a meaningful idea of now so one of the things you want to manipulate when you're doing computation is numbers so number representation is an important part of the English syllabus at least and so that's the first thing you've got to think about if you're going to turn one of these machines into something practical we need a way to represent numbers on the tape and we can use absolutely any representation we like so you could use binary you could actually use decimal numbers so that just means you need ten symbols for naught up to nine and Turing machines allow you to do that

we're going to use here to keep things really really simple and just demonstrate the idea the simplest way of representing numbers so unary so if you imagine if you ancient Shephard wanting to count goats or something then probably you would be unique using unary every time you saw a goat you you would just put a mark on on a stick and that representation the number of marks you ended up would tell you how many goats had so here if you have a number five

then you have one two three four five zeroes if I'm using white chocolate buttons as my marks or zeros then as long as you've got five of them then that is a representation of the number five if I wanted a representation of the number three I just have three of them so more sophisticated programs could use binary based and Roman numerals whatever you want and you could write during machines that would work on them we're just doing it simply unary is simple to demonstrate so then you have to think about algorithms so we've got a representation of numbers suppose we want to do simple computation like addition then how do we add two numbers well we need to think of a way of putting them on a tape and so you need some way of telling where one number starts and the next one ends so you could just use your second symbol your blank symbol to act as a spacer so here I'm assuming I've got some any

infinite number of blanks or going off in one direction I've got two chocolate buttons I've then got a blank which might be a a different chocolate blood and a white chocolate button from the numbers a black chocolate button for the blanks and then three and so what I've got on my tape if I put that is the number two followed by the number three so how would I add these two numbers to leave the answer of the sum of those two numbers on the tape I've got to come up

with some way of moving the head around changing those symbols and coming back so forgetting about Turing machines per se how could I come up with an algorithm that does that well I could blank the first symbol at the start of the person on both that's where my head is pointing initially I can only write an O symbol in the gap between the numbers putting that one back so I've still got the same number in total and lo and behold what I've ended up with is a string of five

buttons in a row so all I'm assuming here is the numbers are separated by a single blank so how do we turn that into an actual program in a Turing machine well we need to come up with an instruction table so what does my instruction table look like I've added a comment column on the beginning that's not really strictly part of it but all programs should have comments so we've got three different rules here and each one is an if-then

rule so the F applies on the first two columns if you're in a particular current state with a particular symbol on the tape under the head then you take some actions what do you do you write a new symbol you move the head and you change to a new state so in this case how do we have to you know e numbers we convert the start of the first number that's just my comment so we'll be in a green state because that's our start state and if the symbol on the tape is white then we overwrite it with a brown we move the head right and we change state because we don't want to do that again we're now in a different situation and so we change the state to show in a different situation the next rule says if you are in an orange state at any time and you find a white under symbol on the tape where you're looking then leave it alone and move right again but stay in an orange state if on the other hand

looking at the third rule here if you're in an orange state and it's a brown symbol a brown chocolate button under your weed head then write a white chocolate button in this place and move right and switch to a great state so essentially what we've got here is the table he's acting just as a finite state machine so people who know what finite state machines are all about you can think of it as sort of a transition diagram this is saying exactly the same thing as that table if you're in a green state you can move - oops I've got their colors wrong here but you could move to an orange state which is the equivalent of a purple state here it's got two things you could do you could either stay in the same state if you've got white chocolate buttons or you can move and there's various actions that you do under the arrow if you're making that transition so those two are basically saying the same things

and they are just a series of if-then rules so you might want to try and fall this if you have brought a collection of sweets to create your own chewing machine you basically just need to have a set up like I have draw yourself a tape on a piece of paper with 10 or 15 boxes in it you need something as a pointer so a pencil or anything at all will just keep your finger pointing at it and then you need symbols on your tape so if I switch back to what I've

got actually got on my desktop here hopefully you can see that so what I've got here is exactly the program that I just talked you through so we're assuming I've got some initial tape we've got the head he's pointing to the beginning of the first number and you know so here on the tape I've got a new movie number two because there's two and then a break and then I've got three in a row so I've got a number two and a number three on this tape and then everything else is blank off to infinity so how does this work well we have a starting state and that tells us what starts so I'm always using green as my starting state and we'll keep going until we end up in a red stop state also if you end up in a state where there are no rules that apply then that's the equivalent to stop as well if you don't have a go in your table that tells you what to do then basically the machine grinds to a halt so if we're in a green

state I've actually only got one rule here that my first rule and it said if you're in a green state and the symbol on the tape is white and I am pointing to with my head to a white symbol then what do we do we overwrite that with a brown symbol and we move the tape right and we change the state from the green state to an orange state and then we've just executed that first instruction and then we have to find a rule that matches the situation so the first rule

no longer matches because we're in an orange state now so we have to find one of the orange state wrong which rules the match and so I've got an orange rule with the symbol on it a quite well that's what I'm in so my if is orange and white that's the situation this time don't write anything just leave it alone but still move the tape right I'm sorry move the head right and change to an orange day well I'm in an orange date already what do we do then well we

find a rule that applies so we're still in an orange state so one of my second or third rules must apply but this time it's orange but underneath the head is a brown button so we're actually in the third rule here whoa engine Brown then change that to white move the tape head right because she doesn't have a rule inversion I've got here to move over left all right but now change the state to red and then we're in the red state so that's a stop and so what I had on

the initial take state was the number three and the number two and what I've got on there final stops tape is one two three four five so my program my computer has just actually added everything up so I added the two numbers up and left that as my output and that is basically although it's two turing machines they are just very simple versions of computers so it's a really good way of just exploring and understanding what computers actually do do one other thing that I wanted to say this isn't the kind of time to be able to do this but if I was doing this in a live lecture what I would do at this point was actually get some people from the audience and we would actually roleplay it because so you don't have to have just to have machines made our chocolate going back to my idea of we've got loads of stormtroopers hanging around you could just get people to be the positions on the tape so actually if I go back

to the tabletop if you imagine my Lego figures we're actually students pulled out of the audience how do you make a tape well you just give each of those people something to hold that tells them what symbol is on their tape and you have well not an infinite number of them but just line the people up and then somebody else can act as the tape head so maybe you have somebody else who keeps track of where exactly the tape is and they walk backwards and forwards in

front to keep track of what's actually going on and you have the program sort of a hook on the board behind and you might have somebody else that's holding a different thing call it thing and they're keeping track of the state and they just have colored boards so you could actually act out a computation on the Turing machine one of the things that I actually do I actually have hats for this as well and this hats too big to actually show but this is a perfect

like triangular hat and so what you could instead of having a person keep track of where the tape head is you could actually just give a hat to the people so storm troopers don't actually like it when you do this but you could just move that hat around from place to place and that will tell you where the tape head is at the moment there's all sorts of ways you can have fun doing this acting it out for real either wither LIGO storm troopers all with real children standing to peep meets a support if necessary but actually computation happening on people so there's all sorts of ways you can do this something else I won't go into the details of this but you there's another way lots of different algorithms for adding two unary numbers I deleted the first mark in the unary number and then filled in the middle you could instead want leave the number starting in the same place so perhaps you might want to delete blank the last symbol at the end

of the second number and then go back and go I to know in the gap that's a different algorithm and it ends up with a different slightly more complicated program so what this does is first of all it's got to traverse the first number and so keep track of whether it's white or brown when you get to a brown one you in the middle so you change state telling you in a different situation the purple state here is traversing the second number until you get all the way to the end when you get to the end then you'll want to go back one step because you ruin off the end going back one step you then convert the end of the second number and then you switch into an orange state that is perhaps going all the way back to the beginning so the tape heads left in the same position was so that's just a slightly more complicated better algorithm for doing the same thing because it leaves the

situation exactly what as it was at the start okay I've talked enough though so the idea of this is you actually have a play as well so what we're going to do now is try exercises you can just do this at home if you've got stormtroopers Lego chocolate buttons Maltesers Maltesers might roll a bit so I hope you've got some way of stopping and moving about when you don't want them to but you could just play around with this at home your task is to make a Turing machine to just add two to a single you know amant number so you have a unary number on your initial tape just one of them and I want you to add two to it if you find that too easy then have the extension that the head should go back to the starting position that the left-hand end of the number where it started if you do that then another challenge you can do is try and work out how to make a Turing machine that doubles a binary number so

that machine can have three symbols not just to just to demonstrate you can have more than two symbols so blank one and zero okay so there were three exercises essentially they add to two a unary number an extension of then make sure the head goes back the start position back at the other end of the number and then a third challenge of double a binary number

you so let me just go through the tables of how you would actually potentially do those this you may have come up with a slightly different version of these so just adding two to the end so basically that's very similar to the first part of what we were doing in my first instruction table I just need two states one is my initial state and it's job is to get me to the end of the first number so the green state whatever you want to white you just keep moving right until

you hit a brown symbol and that means you've just got to the end of your unary number at that point you do something different you have to change state and because you're at the end of the number and we're trying to add to the end of it you add one so that just means change one of the the ground that you're pointing to into a white but we've only added one so we keep going right and now you're looking at a brown again so we just need to do that again we just turn another one from brown to white we've just added two onto the end of the number so unary is really easy if you're just doing addition because if it's just sort of joining numbers together or adding extra ones on the end so if you want to get back to the beginning you're essentially doing this but you just need some more states before you switch to the red state and so the first part of this is essentially the same but instead

of changing to the red state I change to a new purple state whose job is to get me back to the beginning and now I with every move I go back the other way and whether it is then if it's white and then we just keep going back and back and don't do anything when we finally get to a brown we've just run off the other end of the number so we just need to move back we're like one place to put ourselves in the same situation we were originally with the head actually pointing to the beginning of the number not pointing off the end of the number so essentially that's the same and essentially we're starting to develop patterns here so you kind of start to think of these as sort of little modules in the table of you you know you have some instructions that move you to one end of a number and you have another little module that this is the instructions of how we move back so

you can start thinking about modularizing your programs but strictly a Turing machine you would just have one gigantic big table how do you do binary double well actually that's really easy so first of all you have to think about the algorithm never go straight into the program to double a binary number you just have to add a zero on the end and the properties of binary meaning that that is multiplying by two so how do you

do that you just have to scan to the end of the number using similar methods to the ones we were before when you get to the end of the number you're pointing to a black reality of which in this case is a blank and you want to stick a zero on the end so you just overwrite the blank with a zero and now you've got a double binary number and then you just need to go left a lot in the same way as we have basically the same situation but now you've got three state zeros and ones to

keep moving over and blanks the point when it tells you you've got to the end so you stop with a blank but just shift the curse of the head back again okay so let me just finish with a little bit of thing which is really what this was all about when Alan chill was invented this so what Alan Turing was really interested in was trying to understand what a machine could possibly do so if we invented computers and got them to work what would be the limits of what

they could do and he was also invent interested in sort of solving or addressing a mathematical problem of the day which was about basically what is possible can this is to do with formal systems and can you sort of ever have something that's uncomputable is essentially what it boils down to in a computing come on so are there things that seem impossible for a computer to ever do but there was more than that really but so the point

about Turing machines is what I've just described here whether it's made out of chocolate or what it's made out of is as powerful as any computer that could ever be invented there's a standard everyday computer so modern computers are a lot faster but they can't do anything much other machine couldn't do I could write a Turing machine to do anything you've seen any computer ever doing so far and anything that traditional computers could ever do in the future so they can

basically compute any computation that it's possible to do and you can sort of think about this in terms of sequence selection and repetition so the three core parts of the plumbing of programs if you've got sequence selection and repetition you can do everything ensuring machines have sequence selection and repetition so sequence is exactly what's happening when you move from one rule to another you you're using the States to say okay after this instruction do the next one we have petitions happening when you're going you know even on a single instruction staying in the same state but you could do it over groups of states wait you're going back to the earlier state and doing the same thing again and the whole thing is based on selection than all the rules are if then else statements and if you've got that so this is a sort of powerful theorem rule of computation that if you've got those three things

basically you can do any computation there is and this dates back to Turing machines and Alan Turing kind of created the Turing machine to demonstrate this basic idea that anything the Turing machine can do any can be done so the only problem is is it's slow and you end up getting very fat if it's made of chocolate but the why's that he can compute anything a modern computer can do all of the Turing machine programs we've seen so far the idea was the program is completely built-in so you write a program to do a specific task but Alan Turing came up with this idea of a universal Turing machine it's possible to write a program to simulate a Turing machine on a modern computer so I'm taking this backwards to the way that he was thinking but you know you can imagine and this is quite a good activity for somebody who can program gets you into ideas of sort of simulators and compilers and interpreters but it's possible to write

a little program that simulates Turing machines on a computer the I think you've got a problem is the infinite tape but as long as you make it longer than any of your problems ever need you you may never bump into that problem so we're working backwards here I'd found that idea what Turing has the original idea was actually you could create a universal Turing machine you could come up with a Turing machine that had a program that could allow it to do

absolutely anything so that you didn't have to have the separate instruction table you could have one universal instruction table and that would allow you to just use the tape to give you initial programs and that could one machine could do anything as opposed to what we've got at the moment with the Turing machines is you could create a Turing machine to do anything he's now saying you there is a universal Turing machine and that one Turing machine can

do absolutely anything any other Turing machine or any other computer could possibly do so he called this U or universal and essentially the idea is it simulates all of the Turing machines so I'll just give you a sort of sketch of the idea of this how do you do this well you put everything on the tape what does that mean you need an instruction sorry a representation of the instruction table on the tape so you need to specify each rule on the tape and that but all the rules are or sequences of symbols so you just have one place on the tape for each of my columns in the table so if you're in a green state and you see a white button then replace it with a brown button move in a particular direction so you've got an our symbol now we're introducing and change the state to some other state and then you need some separator perhaps so that you can keep track of where one starts or on the next ends so actually if they're all

the same length you may be able to get rid of that so what you now need is your universal Turing machine just to be able to scan across this bit of the tape to interpret the instructions and then go and do it on the tape elsewhere you also need somewhere on your tape a specific place where you put a representation of the current state so you just have one symbol on the tape now for each possible instruction and then somewhere else on the tape you have exactly the initial tape that you would have had normally so you now you've got exactly what you had originally the initial tape but you've also got on that tape somewhere else a representation of the current state and a representation of the instruction table and basically then the program that you have to write for this universal Turing machine which is still a separate table separate from the tape it has instructions that just tell you how to interpret the tape that

you've got so it scans backwards and forwards goes to the instruction table finds an instruction that matches the current situation where the tape head is pointing and then goes back makes changes on the initial tape changes the position of the head on the initial tape so you need some representation and of that to keep track of where the head actually is in this simulated thing the wheel head then pushes back to the instruction table again and interprets

finds an instruction to max and keeps going and so you're just essentially doing I sort of read fetch execute unlike all the machines that existed at the time which did have you know a fix things so calculating machines had a fixed program that they just did one thing now you could have one machine and all you had to do is give it a different tape different data and it will do something completely different what we've just

invented is the store program and tells it what to do so that was you know out of everything this is about that was one of the fundamental breakthroughs so it's one of the key results in computer science that led to all the general-purpose computers we have now so it's what is a Turing machine it's just a simple model of what's possible for computation to do and it allow you to sort of explore the limits of what it is possible for any computer to do and one

of the results that came out of that is though some things that no computer can ever actually compute but you can actually make showing machines that can compute anything that any real computer can do even though it's this simple and you can make them out of chocolate they can do absolutely anything that any real computer can do on silicon and that sort of demonstrates the idea of computation isn't just about what modern day computers do it's about manipulating symbols and then this sort of major results as well is it is possible to make a universal Turing machine that simulates all of the Turing machines you might possibly create and what you've done though is put all the data now including the program onto the tape and this one program this one universal Turing machine can now simulate absolutely any other Turing machine you can do anything that any other machine can do so that's basically it I hope

I've shown you that Turing machines are actually quite a lot of fun and though especially lots of fun to play with under program if you do them with computer or go play them with people if you want a more formal version of this then go to either computer science so the ANSI CES area for a level students this is part of the AQA a level syllabus so if that's what you're interested in you'll find there the sort of actual version of this that matters

for exams which may vary slightly from what I've been doing and there's a lot of resources there and giving you a more formal explanation of it but if you are going to teach this I would definitely recommend making ones out of something whether it's chocolate or stormtroopers or just the kids in the class at this point I will finish all of those officers that I've been using here variations of them are available for download from teaching line and

computing walk so if all the sheets that I've been using if you want to print off copies of tapes of the white chocolate and the state register things and so on what you can't download is the actual chocolate I'm afraid you have to provide that yourself but I hope you found that was interesting and enjoyed it and I hope you now know a lot more about Turing machines and have got some fun things to do with classes whether they key stage to or an a-level class or anything in between but on that thank you very much for turning up I hope that was interesting and cheerio.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent