Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 GEK1530 Frederick H. Willeboordse Nature’s Monte Carlo Bakery: The Story of Life as a Complex System.

Similar presentations


Presentation on theme: "1 GEK1530 Frederick H. Willeboordse Nature’s Monte Carlo Bakery: The Story of Life as a Complex System."— Presentation transcript:

1 1 GEK1530 Frederick H. Willeboordse frederik@chaos.nus.edu.sg Nature’s Monte Carlo Bakery: The Story of Life as a Complex System

2 2 Computation & Turing Machines Lecture 7 We’ve talked about computation, but what is that actually?

3 GEK1530 3 Today’s Lecture Algorithms Turing Machines Systematic ways for performing calculations A key notion in the context of computability The Story Nowadays, we often talk about computers and computing. With almost everyone owning a PC that may seem natural. Even so, if we like to gain deeper insight into what is going on we need to ask: What does computing in general mean?

4 GEK1530 4 19 th century: Mental Process 20 th century: Machine Process 21 st century: Nature’s Process? Computing Quantum Computer Molecular Computer However, Nature has already served as an example for many developments: e.g. Neural Nets ?

5 GEK1530 5 al-Khwarizmi Algorithm: A specific set of instructions for carrying out a procedure or solving a problem, usually with the requirement that the procedure terminate at some point. Specific algorithms sometimes also go by the name method, procedure, or technique. The word "algorithm" is a distortion of al-Khwarizmi’s name. Al-Khwarizmi was a Persian mathematician who wrote a treatise about algebraic methods whose Arabic title was distorted into the word algebra. He used the Hindu number zero, which was then introduced to Europe when his work was translated by Fibonacci. Born: about 780 in Baghdad Died: about 850

6 GEK1530 6 Before we just looked at cellular automata and found that simple recipes can create surprisingly complex behavior. In a more general sense, we can ask ourselves what the framework is within which we can understand such recipes. Firstly, we have to know what an algorithm is. Then we’ll have a look at the so-called Turing machine. Algorithms

7 GEK1530 7 Given two arbitrary numbers, it works like this: 1904 : 1156 gives remainder 748 1156 : 748 gives remainder 408 748 : 408 gives remainder 340 408 : 340 gives remainder 68 340 : 68 gives remainder 0 Hence the greatest common divisor is 68 Let us look at a concrete example of an algorithm: Euclid’s algorithm for finding the greatest common divisor. Algorithms

8 GEK1530 8 Proof of Euclid’s algorithm Proof of the correctness of Euclid’s Algorithm We have two integers a and b whose GCD has to be determined. The remainder of the division of a by b is taken to be c. Therefore a = qb + c where q is the quotient of the division. Any common divisor of a and b must also divide c and of course any common divisor of b and c will also divide a. Consequently, the greatest common divisor of a and b is the same as the greatest common divisor of b and c. Therefore it is enough if we continue the process with the numbers b and c. Since c is smaller in absolute value than b, we will reach c = 0 after finitely many steps. (see also http://www.wikipedia.org/ Optional Algorithms

9 GEK1530 9 We can then draw a flow chart that describes this algorithm. Wow! Math without formulas …. Take 2 numbers A and B Replace A by B Replace B by C Divide A by B and store the remainder in C Is C zero? Stop calculation and print out answer B No Yes Algorithms

10 GEK1530 10 Now that we have seen what an algorithm is, we can wonder about the concept of a general algorithm. Interestingly, it took more than a 1000 years since the Persian Mathematics book until efforts for a precise description of this notion were made. The most important one is by Alan Turing leading to what is called the Turing Machine. Turing Machines

11 GEK1530 11 Alan Turing is one of the greatest scientific geniuses of the 20 th century. Alan Turing (1912 – 1954) founded computer science (1936) cracked the German U-boat Enigma cipher (1939-40) led the world in computer plans (1945-47) started the Artificial Intelligence program (1946-50) and non-linear dynamics in biology (1950-54)

12 GEK1530 12 As such, a Turing Machine is a very simple device. The key thing is that in principle it can do everything any digital computer can do. 1.Infinite tape with squares on it. 2.Each square can have a symbol on it (and the total number of available symbols is finite). 3.There is a read-write head which is positioned somewhere on the tape. 4.The machine is in one of a finite number of states. 5.There is a set of rules that tell the machine what to do given a certain state and a certain symbol read from the tape. Turing Machine

13 GEK1530 13 This sounds more difficult than it is. Consider this picture: Head State Rules Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) s 0 0 0 1 1 1 1 The tape can only move 1 square left or one square right Turing Machine

14 GEK1530 14 For example, these are the rules for a binary counter 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) s Start with the symbol s on the tape and in state zero. Then apply the rules until the machine stops. 0101 - write 1010 1010 next state is right left 1010 1Add right left s other 0Return and move and on symbol If in state R = Right, L = Left, - = write nothing Another way to represent the rules. Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Turing Machine

15 GEK1530 15 Let us go through this algorithm step by step 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S In the beginning (this is also called the initial condition) we have: Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 0 - Read Apply rule 1. 0 0 0 0 0 0 0 0 0 0 0 Turing Machine

16 GEK1530 16 Let us go through this algorithm step by step 1 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 0 - Write State=1/Write=Nothing 0 0 0 0 0 0 0 0 0 0 0 Turing Machine

17 GEK1530 17 Let us go through this algorithm step by step 1 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 0 - Move Right 0 0 0 0 0 0 0 0 0 0 0 Turing Machine

18 GEK1530 18 Let us go through this algorithm step by step 1 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 1 - Read Apply rule 4 0 0 0 0 0 0 0 0 0 0 0 Turing Machine

19 GEK1530 19 Let us go through this algorithm step by step 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 1 - Write State=0/Write=1 1 0 0 0 0 0 0 0 0 0 0 Turing Machine

20 GEK1530 20 As you can see, we’re now in the same situation as in step 0. Hence the next three slides are identical to those of step 0. (The tape is different though) 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 1 - Move Left 1 0 0 0 0 0 0 0 0 0 0 Turing Machine

21 GEK1530 21 Let us go through this algorithm step by step 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 2 - Read Apply rule 1. 1 0 0 0 0 0 0 0 0 0 0 Turing Machine

22 GEK1530 22 Let us go through this algorithm step by step 1 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 2 - Write State=1/Write=Nothing 1 0 0 0 0 0 0 0 0 0 0 Turing Machine

23 GEK1530 23 Let us go through this algorithm step by step 1 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 2 - Move Right 1 0 0 0 0 0 0 0 0 0 0 Turing Machine

24 GEK1530 24 Let us go through this algorithm step by step 1 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 3 - Read Apply rule 3 1 0 0 0 0 0 0 0 0 0 0 Turing Machine

25 GEK1530 25 Let us go through this algorithm step by step 1 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 3 - Write State=1/Write=0 0 0 0 0 0 0 0 0 0 0 0 Turing Machine

26 GEK1530 26 Let us go through this algorithm step by step 1 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 3 - Move Right 0 0 0 0 0 0 0 0 0 0 0 Turing Machine

27 GEK1530 27 Let us go through this algorithm step by step 1 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 4 - Read Apply rule 4 0 0 0 0 0 0 0 0 0 0 0 Turing Machine

28 GEK1530 28 Let us go through this algorithm step by step 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 4 - Write State=0/Write=1 0 0 0 1 0 0 0 0 0 0 0 Turing Machine

29 GEK1530 29 Let us go through this algorithm step by step 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 4 - Move Left 0 0 0 1 0 0 0 0 0 0 0 Turing Machine

30 GEK1530 30 Let us go through this algorithm step by step 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 5 - Read Apply rule 2 0 0 0 1 0 0 0 0 0 0 0 Turing Machine

31 GEK1530 31 Let us go through this algorithm step by step 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 5 - Write Do nothing 0 0 0 1 0 0 0 0 0 0 0 Turing Machine

32 GEK1530 32 And we back in the beginning. 0 Head State Tape Rules are defined in this format: (current state, current symbol, new state, new symbol, left/right) S Rules 1) 0,S,1,-,R 2) 0,0 or 1,0,-,L 3) 1,1,1,0,R 4) 1,0,0,1,L Return Add Step 5 - Move Left 0 0 0 1 0 0 0 0 0 0 0 Turing Machine

33 GEK1530 33 Applet Turing Machine Counter Turing Machine Addition

34 GEK1530 34 The Universal Turing machine is a Turing machine that can mimic any Turing machine by having the rules encoded on the tape as well. Universal Turing Machine This is an important concept in that it provides a formal way to deal with the questions of computability. And now … ladies … and gentlemen!

35 GEK1530 35 Rule 110

36 GEK1530 36 There are many localized structures that interact in various ways. After starting from random initial conditions The idea is to use these structures to build up blocks that can be used for computations. The actual implementation is quite complicated but key issue is that it can be done. Rule 110

37 GEK1530 37 After starting from random initial conditions Rule 110 - Applet Try to play with the CA applet on the web site. After starting from a single black cell 0 x 128 1 x 64 1 x 32 0 x 16 1 x 8 1 x 4 1 x 2 0 x 1 110

38 GEK1530 38 Wolfram believes (and I think he is right to do so) that the discovery of such a simple system displaying universality is very significant. Why? It makes it quite conceivable that many systems, including many natural systems are universal. Rule 110 Implications

39 GEK1530 39 An example of a universal Turing Machine is the personal computer. Computers But.. the funny thing is: There is a proof that any Universal Turing Machine can emulate any other Universal Turing Machine and hence conceptually speaking this PC can do no more than rule 110! ==

40 GEK1530 40 The notion of the Turing machine plays an important role when analyzing computability. Hence we see: Simple system→ Simple behavior Complicated system→ Complicated behavior Complex system→ Complex behavior False Wrapping up Key Points of the Day One does not need complicated or complex set of rules to obtain complex behavior.

41 GEK1530 41 Wrapping up Give it some thought References As in a social context, prejudice is bad for Science as well. http://mathworld.wolfram.comhttp://mathworld.wolfram.com)


Download ppt "1 GEK1530 Frederick H. Willeboordse Nature’s Monte Carlo Bakery: The Story of Life as a Complex System."

Similar presentations


Ads by Google