Introduction to the Theory of Computation - PowerPoint PPT Presentation

About This Presentation
Title:

Introduction to the Theory of Computation

Description:

In a train carriage there was Bill Clinton, George Bush, Janet Reno and Bo Derek. ... (1) Bo Derek thought - 'That sleazeball Clinton wanted to touch me and by ... – PowerPoint PPT presentation

Number of Views:169
Avg rating:3.0/5.0
Slides: 12
Provided by: Joh7
Category:

less

Transcript and Presenter's Notes

Title: Introduction to the Theory of Computation


1
Introduction to the Theory of Computation
  • John Paxton
  • Montana State University
  • Summer 2003

2
Humor
  • In a train carriage there was Bill Clinton,
    George Bush, Janet Reno and Bo Derek. After
    several minutes of the trip, the train passes
    through a dark tunnel and the unmistakable sound
    of a slap is heard.              When they
    leave the tunnel, Clinton has a big red slap mark
    on his cheek.              (1) Bo Derek thought
    - "That sleazeball Clinton wanted to touch me and
    by mistake, he must have put his hand on Janet
    Reno, who in turn must have slapped his face."
                 (2) Janet Reno thought - "That
    dirty Bill Clinton laid his hands on Bo Derek and
    she smacked him."              (3) Bill Clinton
    thought - "George put his hand on Bo Derek and by
    mistake she slapped me."              (4)
    George Bush thought - "I hope there's another
    tunnel soon so I can smack Clinton again."

3
1.4 Nonregular Languages
  • A w w has an equal number of 0s and 1s.
    Is A regular?
  • B w w has an equal number of 01s and 10s
    Is B regular?

4
Pumping Lemma
  • If A is a regular language, then there is a
    number p (the pumping length) where, if s is any
    string in A of length at least p, then s may be
    divided into three pieces, s xyz, satisfying
    the following conditions

5
Pumping Lemma
  1. for each i gt 0, xyiz ? A
  2. y gt 0
  3. xy lt p

6
Proof Idea
  • Pigeonhole Principle

y
qm
x
qn
z
q1
7
Example 010
  • p gt 3

1
0
0
e
8
Example 010
  • s 00012p0 x 000, y 1, z 12p-10
  • s 0p0 x e, y 0, z 0p-10

9
Example
  • Prove that C 0n1n n gt 0 is not regular
  • Assume C is regular, let s 0p1p
  • Since xy lt p and y gt 0, then y must consist
    of 1 or more 0s, call this number k
  • xyz 0j0k0p-j-k1p 0p1p ? C
  • xy2z 0j02k0p-j-k1p 0pk1p ? C
  • Contradiction!

10
Exercises
  • Prove that A w w has an equal number of 0s
    and 1s is not regular.
  • Prove that D ww w ? 0,1 is not
    regular.
  • Prove that E 0i1j i gt j is not regular.

11
Exercise
  • Show that F ak where k is a multiple of n
    is regular for all n gt 1.
  • Show the the language G w w is not a
    palindrome satisifies the three conditions of
    the pumping lemma even though it is not regular.
    Explain why this fact does not contradict the
    pumping lemma.
Write a Comment
User Comments (0)
About PowerShow.com