Hello World! An Invitation to Computer Science

Lecture Slides

Models of Computation
Thursday May 1, 2008


Recapping the Big Picture


Models in general


Computing agents

  1. input and output
  2. storage and retrieval from memory (state)
  3. carry out instructions according to memory and current input

models of computation
  allows us to ignore limits of computer hardware
  such as memory, numeric precision


Some historical background


Turing machines


Turing machine as computing agent


Simple example

  current   current        value      direction   new
  state     cell content   to write   to move     state
  =====================================================
  START     *              0          right       A
  A         0              *          no move     HALT
  A         1              *          no move     HALT
  A         *              *          no move     HALT

What does this Turing machine do?


Another example

  state     content      write        move    next state
  =====================================================
  START     *              *          left        A
  A         0              1          right       B
  A         1              0          left        A
  A         *              1          left        C
  B         0              0          right       B
  B         1              1          right       B
  B         *              *          no move     HALT
  C         0              *          right       B
  C         1              *          right       B
  C         *              *          right       B

What does this Turing machine do?