Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lfa:2022:lab08-the-pumping-lemma [2022/11/28 12:10]
mihai.udubasa
lfa:2022:lab08-the-pumping-lemma [2022/12/09 08:55] (current)
pdmatei
Line 18: Line 18:
  
 **8.1.1.** Show that the pumping lemma holds for finite languages. **8.1.1.** Show that the pumping lemma holds for finite languages.
-/*+ 
 <hidden Solution>​ <hidden Solution>​
  
Line 28: Line 29:
  
 </​hidden>​ </​hidden>​
-*/+ 
 **8.1.2.*** Find a language which is not regular for which the pumping lemma holds. **8.1.2.*** Find a language which is not regular for which the pumping lemma holds.
  
Line 36: Line 38:
  
 **8.2.1.** $  L = \{ \: A^n B^m \: | \: 0 \leq n \leq m \: \} $ **8.2.1.** $  L = \{ \: A^n B^m \: | \: 0 \leq n \leq m \: \} $
-/*+ 
 + 
 <hidden Solution>​ <​note>​ <hidden Solution>​ <​note>​
  
Line 59: Line 63:
  
 </​hidden>​ </​hidden>​
-*/ + 
-**8.2.2.** $  L = \{ \: w \in \{A,B\}^* \: | \: \#A(w) = \#B(w) \: \} $ + 
-/*+**8.2.2.** $  L = \{ \: w \in \{A,B\}^* \: | \: \#_A(w) = \#_B(w) \: \} $ 
 + 
 <hidden Solution>​ <​note>​ <hidden Solution>​ <​note>​
  
Line 84: Line 90:
  
 </​hidden>​ </​hidden>​
-*/+ 
 **8.2.3.** $math[L = \{(01)^n(10)^n \mid n > 0 \} ] **8.2.3.** $math[L = \{(01)^n(10)^n \mid n > 0 \} ]
-/*+ 
 + 
 <hidden Solution>​ <​note>​ <hidden Solution>​ <​note>​
 $ w_n = (01)^n(10)^n $ $ w_n = (01)^n(10)^n $
Line 142: Line 151:
  
 </​hidden>​ </​hidden>​
-*/+ 
 **8.2.4.** $  L = \{ \: w \in \{A,B\}^* \: | \: \text{w is a palindrome} \: \} $ **8.2.4.** $  L = \{ \: w \in \{A,B\}^* \: | \: \text{w is a palindrome} \: \} $
-/*+ 
 + 
 <hidden Solution>​ <​note>​ <hidden Solution>​ <​note>​
  
Line 165: Line 177:
  
 </​hidden>​ </​hidden>​
-*/+
  
 **8.2.5.** $  L = \{ \: w \in \{0\}^* \: | \: \text{the length of w is a prime number} \: \} $ **8.2.5.** $  L = \{ \: w \in \{0\}^* \: | \: \text{the length of w is a prime number} \: \} $
-/*+ 
 + 
  
 <hidden Solution>​ <​note>​ <hidden Solution>​ <​note>​
Line 193: Line 207:
 </​hidden>​ </​hidden>​
  
-*/+ 
 **8.2.6.** $  L = \{ \: w \in \{0\}^* \: | \: \text{the length of w is a power of two} \: \} $ **8.2.6.** $  L = \{ \: w \in \{0\}^* \: | \: \text{the length of w is a power of two} \: \} $
-/*+ 
  
 <hidden Solution>​ <​note>​ <hidden Solution>​ <​note>​
Line 221: Line 237:
  
 </​hidden>​ </​hidden>​
-*/+ 
 **8.2.7.** $  L = \{ \: ww^R  \: | \: w\in \{0,1\}^* \} $ **8.2.7.** $  L = \{ \: ww^R  \: | \: w\in \{0,1\}^* \} $
-/*+ 
 + 
 <hidden Solution>​ <​note>​ <hidden Solution>​ <​note>​
  
Line 247: Line 266:
 </​hidden>​ </​hidden>​
  
-*/+
  
 ===== 8.3. Combining the pumping lemma with closure properties ===== ===== 8.3. Combining the pumping lemma with closure properties =====
  
 **8.3.1.** Using the pumping lemma, prove that $  L = \{ \: A^nB^m \: | \: n \neq m \}$ is not a regular language. **8.3.1.** Using the pumping lemma, prove that $  L = \{ \: A^nB^m \: | \: n \neq m \}$ is not a regular language.
-/*+
 <hidden Solution>​ <hidden Solution>​
 <​note>​ <​note>​
Line 266: Line 285:
  
 </​hidden>​ </​hidden>​
-*/+
 /* /*
 ====== Homework ====== ====== Homework ======