class5

class5 - ReverseofaRegularLanguage 1 Theorem: R L

Info iconThis preview shows pages 1–20. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Reverse of a Regular Language  
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Theorem: The reverse         of a regular language is a regular language    R L L Proof idea: Construct NFA that accepts        : R L invert the transitions of the NFA that accepts   L
Background image of page 2
3 Proof Since        is regular,  there is NFA that accepts  L Example: ba ab L + = * a b b a L
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Invert Transitions a b b a
Background image of page 4
5 Make old initial state a final state a b b a
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Add a new initial state a b b a λ
Background image of page 6
7 a b b a λ Resulting machine accepts R L ba ab L + = * ab a b L R + = * R L is regular
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Grammars  
Background image of page 8
9 Grammars Grammars express languages Example:     the English language verb predicate noun article phrase noun predicate phrase noun sentence _ _
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10   walks verb runs verb dog noun boy noun the article a article
Background image of page 10
11 A derivation of “ the boy walks ”: walks boy the verb boy the verb noun the verb noun article verb phrase noun predicate phrase noun sentence _ _
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 A derivation of “ a dog runs ”: runs dog a verb dog a verb noun a verb noun article verb phrase noun predicate phrase noun sentence _ _
Background image of page 12
13 Language of the grammar: L = { “ a boy runs ”,         “ a boy walks ”,         “ the boy runs ”,         “ the boy walks ”,         “ a dog runs ”,         “ a dog walks ”,         “ the dog runs ”,         “ the dog walks ” }
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
14 Notation   dog noun boy noun    Variable         or Non-terminal Terminal Production rule
Background image of page 14
15 Another Example Grammar: Derivation of sentence       : λ S aSb S ab aSb S ab aSb S S
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
16 aabb aaSbb aSb S aSb S λ S aabb S aSb S Grammar: Derivation of sentence            :
Background image of page 16
17 Other derivations: aaabbb aaaSbbb aaSbb aSb S aaaabbbb aaaaSbbbb aaaSbbb aaSbb aSb S
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
18 Language of the grammar λ S aSb S } 0 : { = n b a L n n
Background image of page 18
More Notation Grammar   ( 29 P S T V G , , , = : V
Background image of page 19

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 20
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 75

class5 - ReverseofaRegularLanguage 1 Theorem: R L

This preview shows document pages 1 - 20. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online