toc review

Upload: midowakil

Post on 06-Jul-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 TOC Review

    1/16

    Sets

    Alphabet: Set of symbols• A ={a, b, c, d}

    •   Σ = {0, 1, 2}

    • Language• Set of strings

    L = {ab, cd, da, acc, dddd, ε}• = {1, 011, 102}

    •  ε:• !he empty string"

    • #as 0 symbols

    • $ε$ = 0

  • 8/18/2019 TOC Review

    2/16

    Strings

    •A substring

    • %art of a string

    • & = abcd  substrings of &: {a, b, c, d, ab, bc, cd, ab

    abcd}

  • 8/18/2019 TOC Review

    3/16

    'leene star

    •Applies to sets

    • Symbols

    • Strings

    • A={a, b, c}  A( = {ε, a, b, c, aa, ab, ac, ba, bb,

    abc)}

    • L= {01, 00, 11}  L(= {ε, 0100, 01, 1101)}

    A language L o*er alphabet A is a subset of A*

  • 8/18/2019 TOC Review

    4/16

    +achines Automata

    -sed to decide &hether an input string belongs to a lan

    • .initestate machine• egular Languages

    •%ushdo&n automaton

    • /ontetfree Languages

    • !uring machine• ecursi*elyenumerable languages

  • 8/18/2019 TOC Review

    5/16

    .initestate machine

    , A, , 30, .4• : .inite set of states

    • ={30, 31, a2}

    • A: 5nput alphabet 6set of symbols7• A = {0, 1}

    •  transition function•  6, A7  

    • %artial *s" !otal 6complete7

    • 30 : 5nitial state 630∈ 7

    • 30

    • .: set of 8nal states 6.⊆7•

    . = {a2}

     

  • 8/18/2019 TOC Review

    6/16

    .initestate !ransducer

    •, A, , 30, ., , 4

    • : utput alphabet 6set of symbols7

    • 6, A7  (

     

    Is FST more powerful than FSA?

  • 8/18/2019 TOC Review

    7/16

    egular Languages 67

    Languages that can ha*e .SA• .inite and in8nite

    • L1 ∈  and L2 ∈   L1 ∪ L2 ∈ 

    • L1 ∈  and L2 ∈   L1 ∩ L2 ∈ 

    • L1 ∈  and L2 ∈   L1 L2 ∈ 

    • L1 ∈   ¬L1 ∈ 

     

  • 8/18/2019 TOC Review

    8/16

    %umping Lemma 6for regularlanguages7•

    ;escribes conditions that must be met by all  reglanguages

    • -sed to pro*e that a language is not regular"• Assume that a language is regular

    • Sho& that it *iolates the pumping lemma

  • 8/18/2019 TOC Review

    9/16

    %umping Lemma 6for regularlanguages7•

    All su

  • 8/18/2019 TOC Review

    10/16

    %;A: .SA B StacC• Languages that re3uire counting canDt be decided by .SA

    • anbn

    • , A, , , 30, E0 , .4

    • : .inite set of states• {30, 31, 32, 3F}

    • A: 5nput alphabet 6set of symbols7• {a, b}

    • : StacC alphabet 6set of symbols7• {A, G}

    •  transition function•  6, A∪ {}7   and (

    • 30 : 5nitial state 630∈ 7

    • 30

    • E0: 5nitial stacC symbol 6E0∈ 7

    .: set of 8nal states 6.⊆7• {3F}

    •  

  • 8/18/2019 TOC Review

    11/16

    ;eterministic /ontetfreeLanguages 6•

    Languages that be recogni@ed by a ;%;A, but no

    • :• L1 ∈   ¬L1 ∈ 

     

  • 8/18/2019 TOC Review

    12/16

    /onstructing .SA /omplement

    1" /omplete• +aCe the .SA total 6complete7

    2" S&ap 8nal and non8nal states

     

  • 8/18/2019 TOC Review

    13/16

    /onstructing %;A /omplement

    1" Hliminating loops

    2" /omplete+aCe the %;A total 6complete7

    F" S&apping 8nal and non8nal states

     

  • 8/18/2019 TOC Review

    14/16

     !uring +achine• , A, , E0, 30, .4

    • : .inite set of states•

    {30, 31, 32, 3F, 3I, 3J, 3K}• A: 5nput alphabet 6set of symbols7

    • {a, b}

    • : +emory alphabet 6set of symbols7• {A, }

    • E0: 5nitial memory symbol 6E0∈ 7

    •   

    •  transition function•  6., 7  , , {,L,S}2

    • 30 : 5nitial state 630∈ 7

    • 30

    • .: set of 8nal states 6.⊆7• {3K}

    •  

  • 8/18/2019 TOC Review

    15/16

    +ultitape !uring +achine• , A, , E0, 30, .4

    • : .inite set of states•

    {30, 31, 32, 3F, 3I, 3J, 3K}• A: 5nput alphabet 6set of symbols7

    • {a, b}

    • : +emory alphabet 6set of symbols7• {A, }

    • E0: 5nitial memory symbol 6E0∈ 7

    •   

    •  transition function•  6., 7  , , {,L,S} B1

    • 30 : 5nitial state 630∈ 7

    • 30

    • .: set of 8nal states 6.⊆7• {3K}

    •  

  • 8/18/2019 TOC Review

    16/16

    L={anb2nan $ n> 1}