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/27 00:36]
alexandra.udrescu01
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 60: Line 64:
 </​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>​
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 168: Line 180:
  
 **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} \: \} $
 +
 +
  
  
Line 192: Line 206:
  
 </​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} \: \} $
 +
  
  
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>​