Pumping Lemma¶
Welcome to Week 4!
This week we will discover that Finite Automata cannot count!
Learning Objectives for this week
- Use proof by contradiction to prove a property does not hold.
- Define pumping length and minimum pumping length for RLs.
- Specify the conditions of the Pumping Lemma (PL).
- Interpret the meaning of the PL for RLs.
- Use the PL to show that some languages are not regular. (PL Game)
- Recognise the limitation of using a fixed finite amount of memory.
Ask & Answer Questions
Don't forget that you can use the Aula's Common Room to raise questions for me and the rest of the class.
Add your questions to the Community Common Room and take a look at others' questions. If you see a question which you'd like to answer then just go ahead and participate in the discussion!
Pre-class Activity¶
We will be using a proof technique called proof by contradiction, which is a common technique we use often in our daily lives.
For example, someone claims it is raining outside. You quickly open the window and stick your hand outside and you find out that your hand is not wet. What do you conclude?
We call that a contradiction: If it were really raining then your hand should have become wet from the rain. Since it did not then the claim that it was raining must be false.
Look back at exercises 6 and 7 from the brainteaser from Lab 1b. How was this technique used there?
Lecture videos¶
The PDF slides are available for download.
You are encouraged to download these. You can follow the videos without downloading them though.
Proof by contradiction¶
Proving that something is true usually only requires you to show "how you get there". However, when somethings is false then we usually need to use other methods. One such method is called proof by contradiction. Let us see a nice example.
A property of regular languages¶
We will now investigate RL's to discover a property that is shared by all of them. We will see that any RL is either:
- a finite language
- or infinite but has a regularly repeating pattern.
This latter property is the reason behind the name of this class of languages.
This property that we have just discovered for RLs means that given yes-instance that is "long enough" then a portion of it must be pumpable (repeatable) and still a yes-instance of the same language.
The crucial bit is that this pumpable part must come from its "first part". To make this precise, we use the "pumping length" \(p\), and say \(|xy|\leq p\).
The PL Game¶
We want to use this property (implied by the Pumping Lemma) to show that a language is not regular using proof by contradiction.
To give the proof an easy structure to follow, I have reformulated it as an interactive "game" where two players play in turn to try and win the game.
Constant-space computation¶
We now reflect on our first model, and highlight that it is a good model for computations that do not require increasing memory (storage space) as the input strings get longer.
RLs fail to count symbols (and remember the count) because, eventually, the number of states is not enough to represent the numbers with longer bit-representation.
Next week we enrich the NFAs with a structure that allows them to count. Let us see if that resolves all the shortcomings!
Ready for some lab exercises?
Now you can attempt the last part of the lab exercises.
Ready for the lab exercises?