lec 1 (automata theory)

Upload: 92azeem161

Post on 30-May-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Lec 1 (Automata Theory)

    1/16

    Lecture One:

    Automata Theory

    Automata Theory, Lecture 1, slide 1

    Amjad Ali

  • 8/9/2019 Lec 1 (Automata Theory)

    2/16

    Automata Theory, Lecture 1, slide 2

    Automata theory

    The word Automata is the plural of automaton"which simply means any machine.

    automata theory is the study ofabstract machinesand problems they are able to solve.

    Automata theory is closely related to formal languagetheory as the automata are often classified by theclass offormal languages they are able to recognize.

  • 8/9/2019 Lec 1 (Automata Theory)

    3/16

    Automata Theory, Lecture 1, slide 3

    Abstract Machine

    An abstract machine, also called an abstract computer,is a theoretical model of a computer hardware or software

    system used inAutomata theory.

    Abstraction of computing processes is used in both thecomputer science and computer engineering disciplines andusually assumes discrete time paradigm.

    abstract machines are often used in thought experimentsregarding computability or to analyze the complexity ofalgorithms

  • 8/9/2019 Lec 1 (Automata Theory)

    4/16

  • 8/9/2019 Lec 1 (Automata Theory)

    5/16

    Models

    The construction of models is one of the

    essentials of any scientific discipline.

    The usefulness of a discipline is often

    dependent on the existence of simple,

    yet powerful, theories and laws.

    Automata Theory, Lecture 1, slide 5

  • 8/9/2019 Lec 1 (Automata Theory)

    6/16

    Automaton An automaton is an abstract model of a digital

    computer

    It has a mechanism to read input (string over agiven alphabet, e.g. strings of 0s and 1s on 7= {0,1}) written on an input file.

    A finite automaton has a set of states Its control moves from state to state in

    response to external inputs

    Automata Theory, Lecture 1, slide 6

  • 8/9/2019 Lec 1 (Automata Theory)

    7/16

    Automaton With every automaton, a transition function is

    associated which gives the next state in terms

    of the current state An automaton can be represented by a graph in

    which the vertices give the internal states andthe edges transitions

    The labels on the edges show what happens (interms of input and output) during thetransitions

    An automaton operates in discrete time frameAutomata Theory, Lecture 1, slide 7

  • 8/9/2019 Lec 1 (Automata Theory)

    8/16

    Components of an automaton Input file : Contains strings of input

    symbols

    Storage unit: consists of an unlimitednumber of cells, each capable of holdinga single symbol from an alphabet

    Control unit: can be in any one of a finitenumber of internal states and can changestates in defined manner

    Automata Theory, Lecture 1, slide 8

  • 8/9/2019 Lec 1 (Automata Theory)

    9/16

    Transitions from start state to

    end state

    There are 4 objectsCabbage, Man, Wolf and

    Goat on one bank and thereis a boat

    All 4 have to cross the riverso that (C,G) or (W,G) arenot left at one place

    Man rows the boat andtakes one at a time

    Present state

    M,C,G,W = J

    final state

    J= M,C,G,W

    transition

    Automata Theory, Lecture 1, slide 9

  • 8/9/2019 Lec 1 (Automata Theory)

    10/16

    Intermediate states

    Class assignment

    (M,C,G,W=

    J=..= (J=M,C,G,W

    )

    Automata Theory, Lecture 1, slide 10

  • 8/9/2019 Lec 1 (Automata Theory)

    11/16

    Applications of Automata A variety of properties concerning the models,

    grammars, and languages will be proven. The existence or non-existence of algorithms for

    processing languages and language processors will beproven. These algorithms form the basis of tools for processing

    languages, e.g., parsers, compilers, assemblers, etc. Other algorithms will form the basis of tools that

    automatically construct language processors, e.g.,yacc, lex, etc. Note that our perspective will be similar to, yet different from

    a compiler class.

    Additionally, some things will be proven to be non-computable, e.g., the enhanced compiler.

    Automata Theory, Lecture 1, slide 11

  • 8/9/2019 Lec 1 (Automata Theory)

    12/16

    Different kinds of automata This was only one example of a computational

    device, and there are others

    We will look at different devices, and look at thesekinds of questions:

    What kinds of problems can a given type of devicesolve?

    What things are impossible for this kind of device?

    Is one type of device more powerful than another?

    Automata Theory, Lecture 1, slide 12

  • 8/9/2019 Lec 1 (Automata Theory)

    13/16

    Some devices we will see

    finite automata Devices with a finite amount of memory. Used tomodel small computers.

    push-down

    automata

    Devices with infinite memory that can be accessedin a restricted way.

    Used to model parsers, etc.

    Turing Machines Devices with infinite memory. Used to model anycomputer.

    time-bounded

    Turing Machines

    Infinite memory, but bounded running time.

    Used to model any computer program that runs in a

    reasonable amount of time.

    Automata Theory, Lecture 1, slide 13

  • 8/9/2019 Lec 1 (Automata Theory)

    14/16

    Some highlights of the course Finite automata

    We will understand what kinds of things a device

    with finite memory can do, and what itcannotdo Introduce simulation: the ability of one device toimitate another device

    Introduce nondeterminism: the ability of a device to

    make arbitrary choices Push-down automata

    These devices are related to grammars, whichdescribe the structure of programming (and natural)languages

    Automata Theory, Lecture 1, slide 14

  • 8/9/2019 Lec 1 (Automata Theory)

    15/16

    Some highlights of the course

    Turing Machines This is a general model of a computer, capturing

    anything we could ever hope to compute

    But there are many things thatcomputers cannotdo:

    Automata Theory, Lecture 1, slide 15

  • 8/9/2019 Lec 1 (Automata Theory)

    16/16

    Some highlights of the course Time-bounded Turing Machines

    Many problems are possible to solve on acomputer in principle, but take too muchtime in practice

    Traveling salesman: Given a list of cities,

    find the shortest way to visit them andcome back home

    Automata Theory, Lecture 1, slide 16