Differences
This shows you the differences between two versions of the page.
|
lfa:2025:lab11 [2026/01/20 11:45] cata_chiru created |
lfa:2025:lab11 [2026/01/20 11:46] (current) cata_chiru |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== 12. Pumping Lemma for Context-Free Languages and Recap ====== | + | ====== 11. Pumping Lemma for Context-Free Languages and Recap ====== |
| <note important> | <note important> | ||
| Line 11: | Line 11: | ||
| \end{align}$$ | \end{align}$$ | ||
| </note> | </note> | ||
| - | ===== 12.1. Finding the class of languages ===== | + | ===== 11.1. Finding the class of languages ===== |
| For each of the following languages, find the most restrictive class of languages that it belongs to (regular, context-free but not regular, not context-free). Prove the language belongs to that class by finding a generator/acceptor and/or using the complement of the pumping lemma. | For each of the following languages, find the most restrictive class of languages that it belongs to (regular, context-free but not regular, not context-free). Prove the language belongs to that class by finding a generator/acceptor and/or using the complement of the pumping lemma. | ||
| - | 12.1.1. $ L_1 = \{ a^nb^mc^nd^m \ |\ n, m \geq 0 \} $ | + | 11.1.1. $ L_1 = \{ a^nb^mc^nd^m \ |\ n, m \geq 0 \} $ |
| - | 12.1.2. $ L_2 = \{ a^nb^mc^md^n \ |\ n, m \geq 0 \} $ | + | 11.1.2. $ L_2 = \{ a^nb^mc^md^n \ |\ n, m \geq 0 \} $ |
| - | ===== 12.2. Recap ===== | + | ===== 11.2. Recap ===== |
| For each of the conditions below, find non-regular languages $ L_1, L_2 $ satisfying: | For each of the conditions below, find non-regular languages $ L_1, L_2 $ satisfying: | ||
| - | 12.2.1. $ L_1 \cup L_2 $ is context-free | + | 11.2.1. $ L_1 \cup L_2 $ is context-free |
| - | 12.2.2. $ L_1 \cap L_2 $ is context-free | + | 11.2.2. $ L_1 \cap L_2 $ is context-free |
| - | 12.2.3. $ \overline{L_1} $ is context-free | + | 11.2.3. $ \overline{L_1} $ is context-free |
| - | 12.2.4. $ L_1 \cap L_2 $ is **not** context-free | + | 11.2.4. $ L_1 \cap L_2 $ is **not** context-free |
| - | 12.2.5. $ L_1L_2 $ is context-free | + | 11.2.5. $ L_1L_2 $ is context-free |
| For each of the exercises above, prove the language indeed is/isn't context-free using PDAs/CFGs/the complement of the Pumping Lemma | For each of the exercises above, prove the language indeed is/isn't context-free using PDAs/CFGs/the complement of the Pumping Lemma | ||