# Since applying any of these operations to regular

• Notes
• 18

This preview shows page 12 - 18 out of 18 pages.

since applying any of these operations to regular languages produces a regular language. Theorems 6.4.1, 6.4.2, 6.4.3 Let L 1 and L 2 be two regular languages. Then L 1 L 2 , L 1 L 2 , L 1 *, L , and L 1 L 2 are regular languages. Example 6.4.1 ( a b )* aa ( a b )* ( a b )* bb ( a b )* is regular

Subscribe to view the full document.

13 6.5 A Nonregular Language The language { a i b i | 0 i n } is regular, but the language { a i b i | i 0 } is not. Proof . Theorem 6.5.1 (P. 204). The language { a i b i | i 0 } is not regular . a 1 > a 2 a 0 a a a . . . a a n -1 a a n b b 1 b b b b b n -1 b n -2 b b . . . b 0 b However, this technique cannot be extended to accept the language { a i b i | i 0 } since an infinite number of states are needed.
14 6.5 A Nonregular Language Corollary 6.5.2 (Proof of Theorem 6.5.1) Let L be a language over . If U i * and V i *, i 0, . 220d . U i V i L and U i V j L , i j , then L is not regular , i.e., a language that generates strings with equal length of two distinct substrings is not regular . Example 6.5.1 The set of palindromes over { a, b } is not regular. Example 6.5.2 Regular grammars are not a sufficiently powerful tool to define programming languages containing nesting of parentheses . Example 6.5.3 The language L = { a i b j | i , j 0 and i j } is not regular; otherwise, L , i.e., { a i b i | i 0 }, is regular.

Subscribe to view the full document.

15 6.6 The Pumping Lemma for Regular Languages The pumping lemma can be used to show a language is nonregular . Pumping a string refers to constructing new strings by repeating/pumping substrings in the original string. Processing a substring of a string in a DFA M correspond to generating a path in the state diagram of M . The proofs of nonregular languages using pumping lemma adopts a simple counting argument known as the pigeonhole principle . Lemma 6.6.1 Let G be the state diagram of a DFA with k states. Any path of length k in G contains a cycle . Proof : A path P of length k contains k +1 nodes (states). Since there are only k nodes in G , one of the nodes, q , must occurs in P at least twice. The subpath from the first q to the second q yields a cycle .
16 The portion of a transition that accepts both x k y k and x k+n y k a. The path traversed when accepting x k y k b. The path traversed when accepting x k+n y k , where n is the length of the cycle

Subscribe to view the full document.

17 6.6 The Pumping Lemma for Regular Languages
You've reached the end of this preview.
• Winter '12
• DennisNg
• Formal language, Regular expression, Regular language, Nondeterministic finite state machine

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern