Courses/Computer Science/CPSC 203/CPSC 203 Template/Lecture Template/Lecture 18: a computer is used (algorithm, Turing machine)

Introduction
Last class we introduced you to a few more complex patterns in (primarily) boolean logic, and how they can be implemented via digital circuits. Today we are going to trace the conceptual evolution of the computer. Computers begin with the notion of an Algorithm, essentially a mechanical procedure for calculation. The capabilities and limitations of computers are both based on this starting point. At the end of this lecture you will be able to:
 * recognize algorithms in various guises.
 * appreciate the notion that a "Universal Turing Machine" is essential to computers. Anything that can act as a Universal Turing Machine can act as a computer.

Glossary

 * none

Concepts
From algorithms to the modern computer
 * Algorithms
 * The Turing Machine is the Idea of a Computer
 * The von Neumann Architecture is the Basic Design of a Computer
 * Modern Computer
 * The Postmodern Computer

Algorithms

 * Long before the computer -- the 'idea' of a computer has been fascinating humans. Interesting fact: At Los Alamos -- computers were human beings who did computations on a pad of paper, and passed their results to the next person.
 * Algorithm
 * Named after the Persian mathematician Mohammed al-Khowarizimi (who worked out the step by step rules for decimal arithmatic). An algorithm is a set of well defined instructions for completing a task. One of the oldest algorithms is Euclid's algorithm for finding the greatest common divisor of two positive integers.
 * Examples of Algorithms
 * A recipe for baking a cake
 * Multiplication
 * A guessing game
 *  Common Features
 * Inputs
 * Outputs
 * Process (the algorithm).
 * Question
 * Will the Algorithm halt?
 * Thought Experiment
 * If the inputs were "mathematical conjectures" and the outputs were "mathematical proofs" -- would an algorithm be sufficient to derive all mathematical proofs from a series of conjectures? This problem is called "Hilbert's Entscheidungsproblem" ("decision problem"), and it inspired a young mathematician, Alan Turing to "mechanize" the notion of an algorithm.

The Turing Machine is the Idea of a Computer

 * See: http://en.wikipedia.org/wiki/Turing_machine
 * Turing invented a "machine" to embody the idea of an algorithm. However, his "machine" is very abstract.
 * A Turing Machine has:
 * Tape (where the data is read from and written) of infinite size (sort of an infinite memory)
 * A Head (that can read/write from the tape)which has a series of states
 * A Table (of instructions). For every combination of Tape-Value/Head-State it gives an action on the tape and an action on the head
 * A State-Register -- stores the state of the Table (i.e. the last instruction).
 * Imagine the Reading Head is a person who has memorized a table of instructions.
 * The 'Tape" can be a row of people who call out a number.
 * The Table is the computer program.
 * Our question is: will the Head-person ever stop working?
 * This is called the 'Halting Problem or Decision Problem'.
 * Turing constructed numerous Turing machines to enact specific algorithms. Then he did something rather grand, he constructed a Turing Machine where the initial part of the Tape has some data that further instructs the machine. This is called a "Universal Turing Machine (UTM)".
 * Essentially Turing's UTM was the design of a computer.
 * The Tape is computer memory (and also input and output)
 * The Head/State Table is the CPU
 * The initial set of data on the tape is a "computer program" or software
 * Note -- to a computer, software is just data.

The von Neumann Architecture is the Basic Design of a Computer

 * see: http://en.wikipedia.org/wiki/Von_Neumann_architecture
 * Once the idea of a computer existed, there was a trans-Atlantic race to build it.
 * There was a British effort and an American effort. Both efforts brought together logicians and engineers. The British team was headed by Turing, the American team was headed by Von Neuman. It was John Von Neumann's architecture that was built first, and ever since, computers have been also called "Von Neumann Machine's" or "Von Neumann Architecture".
 * A Von Neuman Machine has:
 * Memory -- stores data and programs
 * Control Unit and Arithmatic/Logic Unit -- i.e. the central processing unit.
 * Input/Output -- a way of getting data and sending data.

Modern Computer

 * A modern computer has:
 * Hardware and software
 * Hardware includes:
 * CPU
 * Various Forms of Memory
 * The Bus along which data moves
 * Various peripheral devices (monitors, usb, keyboards)
 * Software includes:
 * Operating System Kernel -- the essential software that runs at all times
 * Systems Software -- makes the computer convenient for you to use
 * Applications -- lets the computer do the things you want it to
 * You might notice that the Modern Computer is essentially a von Neumann Machine with a few more parts. Very little has changed at the "architectural" level.

The Postmodern Computer

 * We've noted that the essence of a computer is the Universal Turing Machine. Anything that can act like a Universal Turing Machine can be a computer.
 * Some examples:
 * Cellular Automata
 * see: http://mathworld.wolfram.com/UniversalCellularAutomaton.html
 * Quantum Computing
 * see http://en.wikipedia.org/wiki/Quantum_computer
 * Biological Computing
 * see:http://en.wikipedia.org/wiki/DNA_computing and http://www.cs.virginia.edu/~robins/Computing_with_DNA.pdf (a paticularly good article from Scientific American).

Text Readings

 * Chapter 4: Gates and Circuits, Computer Science Illuminated 3rd Edition, p. 91 - 117
 * Chapter 5: Computing Components, Computer Science Illuminated 3rd Edition, p. 119 - 145
 * Section 5.3: Non-von Neumann Architectures, Computer Science Illuminated 3rd Edition, p. 137 - 145

Resources

 * The Universal Computer. The Road from Leibniz to Turing. By Martin Davis. 2000. WW Norton & Co.
 * Computers Ltd. What They Really Can't Do. By David Harel. 2000. Oxford University Press.
 * Connecting with Computer Science. Greg Anderson, David Ferro, and Robert Hilton. 2005. Thompson Press.
 * Mathematics and Logic. Marc Kac and Stanislaw Ulam. 1968. Mentor Press.

Questions

 * /Lecture 18 Questions