2013.01.11-ece595e-l03

Upload: ultrazord

Post on 03-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 2013.01.11-ECE595E-L03

    1/17

    ECE 595, Section 10Numerical Simulations

    Lecture 3: Computability

    Prof. Peter Bermel

    January 11, 2013

  • 7/29/2019 2013.01.11-ECE595E-L03

    2/17

    Outline

    Overview

    Definitions

    Computing Machines Church-Turing Thesis

    Polynomial Time

    Example

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    3/17

    Overview from First Lecture

    Study of the complexity of

    algorithms

    Based on Turing machines

    Often, one compares

    algorithms for best scaling

    in large problems

    1/11/2013 ECE 595, Prof. Bermel

    Alan Turing (from University

    of Calgary Centenary event)

  • 7/29/2019 2013.01.11-ECE595E-L03

    4/17

    Definitions

    Algorithm set of rules for computing a functionmapping input data to output

    Specific realizations of computers: Turing machines

    Lambda calculus

    -recursive functions

    Register machines

    Running time number of basic operationsrequired

    Efficient computability

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    5/17

    Turing Machine

    Performs the following

    elementary operations:

    Read a bit of input and byte of

    data from work

    Write a bit to work

    Choose next state Q. Either:

    Stop and output a 0 or 1

    Choose a new rule to apply next

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    6/17

    Turing Machine: Behavior in Each State

    qstart: write start symbol, change state to qcopy

    qcopy: copy non-blank symbol, otherwise go to

    qright

    qright: go back to start, then qtest

    qtest: if at start and work is blank, write 1;

    else, write 0 qhalt: finished

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    7/17

    Time Constructible Functions

    A function T: N N is time constructible iff

    T(n) n

    TM M computes x T(x) in time T(n)

    Examples: n, n log n, 2n

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    8/17

    Turing Machine: Key Properties

    If f is computable in T(n).

    with alphabet , it is computable in 4 log T(n)

    with TM

    with k tapes, its computable in 5kT(n)2 with TM

    with bidirectional tape, computable in 4T(n) with

    TM

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    9/17

    Universal Turing Machines

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    10/17

    Other Computing Machines

    Register machines

    Post-Turing machine: adds jump and erasefunctions

    Many other variations, getting closer to assemblylanguage

    Lambda calculus basis for Scheme and LISP

    -recursive functions partial functionsmapping NN

    Which one should we use, in which situations?

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    11/17

    Church-Turing Thesis

    Every physically realizable computing machine

    can be simulated by a Turing machine, or any

    other type of machine

    This thesis has not been rigorously proven

    Not applicable for non-deterministic systems

    Quantum computers have caused some to re-

    evaluate CT thesis

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    12/17

    Uncomputability

    It may seem obvious everything is computable

    with enough time, but

    Theres always an uncomputable function UC

    Another example: the halting problem

    Computes whether another function will finish

    Cannot be computed in general

    Also: standard maximum productivity function

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    13/17

    Big-Oh Notation

    Take two functions f,g mapping NN, there

    exists a constant c such that f(n)cg(n)

    Sometimes write f(n) = O(g(n))

    Examples

    If f(n)=100n2+24n+2logn and g(n)=n2, then f=O(g)

    If f(n)=2n and g(n)=nc for every c in N, then g=O(f)

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    14/17

    Polynomial Complexity

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    15/17

    Other Classes

    Turing machines with randomness class BPP

    Quantum computers class BQP

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    16/17

    Examples

    CONNECTED the set of all connected graphs

    TRIANGLEFREE the set of all graphs without

    a triangle

    BIPARTITE the set of all bipartite (distinct)

    graphs

    TREE the set of all trees

    1/11/2013 ECE 595, Prof. Bermel

  • 7/29/2019 2013.01.11-ECE595E-L03

    17/17

    Next Class

    Discussion of computational complexity Please read Chapter 2 of Computational

    Complexity: A Modern Approach by Arora& Barak

    1/11/2013 ECE 595, Prof. Bermel

    http://www.cs.princeton.edu/theory/complexity/NPchap.pdfhttp://www.cs.princeton.edu/theory/complexity/NPchap.pdfhttp://www.cs.princeton.edu/theory/complexity/NPchap.pdfhttp://www.cs.princeton.edu/theory/complexity/NPchap.pdfhttp://www.cs.princeton.edu/theory/complexity/NPchap.pdfhttp://www.cs.princeton.edu/theory/complexity/NPchap.pdfhttp://www.cs.princeton.edu/theory/complexity/NPchap.pdf