 Let's start with the animation. Okay, so I'm talking about this emulation of another kind of machine. We heard about the Commodore 64. So this is a much older machine. This came from Alan Turing's work before the World War. So his work after the war was, I mean during the war was relatively well known. But he did major important work before the war as well. In fact, he was looking at this issue of what is a computer actually. And he's sort of the first person to give a definition of a computer or a machine that is able to solve all information processing problems. So before that, we do not know what is this all-powerful computer. So here I'm just showing you an example from his publication, 1936 paper. Highly recommended that you check it out. It's actually quite readable despite its age. So at the top, the few lines beginning with B is the machine table. And the bottom is sort of the animation part. So let me talk about what it does first. What it does is it prints on the tape. So the Turing machine actually is a very interesting story. He was inspired by his mother's typewriter. So in physics, we have the story of I think Newton and the Apple. And in computer science, we have the story of Turing and his mother's typewriter. So the typewriter of a printer has a kind of a printhead. And the printhead moves along a piece of paper. So in this case, he says you don't need the paper to move up and down. We just have an infinitely long paper. So you can just move left and right as far as you want. So the printhead is represented by this little V shape. This is the tape, and then the V is the position of the print head. Then the interesting part is really how is the logic, right? How does the head know what operations to perform? So the head can print the character on the tape. It can print a new character and sort of overwrite the old one. Or it can also move left and right. And that's all it does, really. It's a very simple machine. Let's look at how the logic gets implemented. So this machine, as you can see, prints the infinite string 0, 1, 0, 1, 0, 1, and forever. So this is the logic of the... The first three lines is the logic of the machine. Okay, so it's written in a block of four parts. Each line has four parts. The first part is called the state of the machine. So this state is... there's only one state. It's called B. The second part is called the symbol on the tape. So the second part represents what symbol the tape is currently. So if it was on the 0, then it would execute line 1. If it was on the 1, it would execute line 2. The tilde just represents a blank. Means nothing was on the tape. If it was a tilde on the tape at the point of execution, it would execute the third line. Okay? And then the block in the middle represents the operation on the head. So R just means move the head to the right. A comma just separates multiple operations. Then P1 means print the symbol 1 on the tape. And then P0 means print the symbol 0. And the last part, the fourth part of the program says after this state and doing this action, go to this new state. But in this very simple program, there's only one state. So state B goes to state B. So there's no new states to introduce. So if you run this program, you can sort of imagine what it does. So you start with the... initially the tape will be empty. So it will be the last line. And then you go to... you print a 0. So after printing a 0, you will now see... Oh, now the tape is 0. So now I must execute line 1. Line 1 says move right twice and print a 1. Then go to state B. So when you move right twice, you encounter a... Sorry. Anyway, anyway, it goes too far. Let me just... If you move right twice and you print a 1, then you go back to state B. And then now you're on the 1, you will move right twice and print a 0. And so on. Oh, sorry. Anyway, if you trace it through, this is what it does. So I'm just going to show you some other things. So this is how it works. So as a particular state, it looks at what's on the tape, and then it performs the actions, then it goes to a new state. So not exactly what the program looks like. It's not so important actually. So let's look at another program. 1, 0, 1. So more common, more modern use of the machine is actually to recognize... So it's a different take on the machine. So this particular machine is slightly different. It recognizes strings of the form 0, 1, 0, 1. Well, you can have as many copies of 0, 1. So 0, 1 star if you write regular expressions. So what it does is it will go through, and then if everything's okay, it will print a 1 at the end to say that, oh, this is correct. This is of the form 0, 1, 0, 1. So you can have like 20 copies of 0, 1. But if it's something else, then it will sort of quit halfway and say, oh, I give up because you're not what I'm looking for. So this particular machine will recognize the string 0, 1, 0, 1. And no matter how many copies it will be able to recognize. And if you study the program, it's actually quite simple. You would imagine how you would do it yourself. I'm done. Ah, all right. That's good. But yeah, opening the floor for questions. Yes. Can you show me the source of one of these programs? Yeah, it's just on top. Oh, that's the source. Yeah. OK, I just, I wasn't sure. What is the source of TN? Sorry? The TN. Oh, it's C++. Oh, OK. You guys see how many? How many lines are there? How much is C++? Well, 200 lines of C++. Doesn't matter if it's C++. It's just, yeah. Other questions? Would this be made available online? Yes, this is already online. Yeah, I will take the link on the, perhaps on the Facebook. So people can interact with me online? Ah, no. You can download it and compile it. So I can compile it into JavaScript and do that. There is a JavaScript version, actually. But I prefer to use it offline. Other questions? For this particular case, how do you store the initial screen? Ah, so I sort of had this thing where I stick the actual beginning of the tape on the end of the program. It's a bit of a... Oh, OK. Well, you can put it separately, actually. Yeah. Yes? What do you, do you, like, do you try, do you try to teach computation training? Is it a curiosity? Ah, I didn't talk about, I didn't have a larger, longer talk to talk about more on the really interesting idea of why you can build with this. There's actually much more interesting programs you can build with such machines. Do you, can you... Yes, yes. Ah, so one of the... I'll see you have time. So one of the more interesting programs that while Alan Turing built, I wouldn't say I didn't build any of these. Alan Turing built, it's only called the universal machine, actually. I was going to talk about that, but thank you for the question. Universal machine is actually not very complicated. I mean, it's longer, of course. It has, like, 39 states and something like, something like 181 lines. So why is this, this machine, this machine table, we think of it like the hardware, like the circuitry, like this machine table, think of it as hard-coded. That was the intention, right? But to Turing, it's a very great discovery that actually we don't need so many different machines. We only need to build one machine and that one machine will be able to emulate all other machines possible. So that's why we have CPUs, right? CPU actually is only one particular instruction set and one particular machine, but it can do everything, right? This idea actually originated with Alan Turing. So let me just show you the example instead of talking so much. So let's run just now the example of checking whether something is a 01 or not, right? But we use the really interesting thing that Turing said was, let's put the program, this machine table, states and whatever, put it onto the tape. So let's see what that looks like. Oh, it runs really fast and you can't see. It still runs really fast. I guess I have a problem with the resolution on... Okay, maybe this is better. So now it's more complicated. So you have this bunch of things at the beginning of all the Cs and then you see some at the bottom, you have this 01, something like 01-01. So now that 3.9 program is this chunk of the tape at the beginning. So now this machine will execute this other machine described by the tape, which we recognise today actually because software is something we put on, not a tape, but like a hard disk. And then the CPU loads that and pretends to be that machine, which this software describes. And this is really the first instance we see this being mentioned in the literature. It's like that they can take a machine description and put it onto tape, onto storage. Today we call it the von Neumann architecture but really it's the Alan Turing architecture if I may say so. So this is an example of a much more complicated program. This program reads the tape and follows the behaviour of the description of the tape, of the machine on the tape. So the tape is another language and then the universal machine is actually a virtual machine. The tape is just like the memory, the input output basically also the same thing. It's the paper in the printer basically, right? So the program we put it onto the tape, so let me show you the tape actually. So the tape looks like ah, okay. Yeah but this is one tape, I just break it over a few lines so that you can see what's happening. So the program is this CC followed by blah blah blah and then C0 and then we have this triple C to say, okay the rest of it is the data, the actual data for the thing on the tape. But all this is on the tape actually. It's like all this is on your, it's just like on the hard disk we have input files and we have program, right? They lie on the same disk. So there's actually no separation between them essentially. Except we say this is one program file, this is an input file. Yeah. So the tiering, the universal tiering machine, and the information on how to execute the state program and the language in which it's kind of written. Yeah, it decodes the tape and knows how to change the state and so on. Yeah. It's really interesting. Cool. We are at five. All right, good. Thank you.