Differences

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

Link to this comparison view

Both sides previous revision Previous revision
lfa:2023:lab09 [2023/12/11 23:26]
mihai.udubasa
lfa:2023:lab09 [2024/01/16 22:31] (current)
alexandra.udrescu01
Line 7: Line 7:
 **9.1.1.** $ L = \{\: w \in \{A,B\}^* \ | \:w \text{ is a palindrome}\} $. **9.1.1.** $ L = \{\: w \in \{A,B\}^* \ | \:w \text{ is a palindrome}\} $.
  
-/*+
 <​hidden>​ <​hidden>​
 <note important>​ <note important>​
Line 14: Line 14:
 {{ :​lfa:​2022:​lfa2022_lab9_1_1.png?​400 |}} {{ :​lfa:​2022:​lfa2022_lab9_1_1.png?​400 |}}
 </​hidden>​ </​hidden>​
-*/+
  
  
Line 20: Line 20:
  
  
-/*+
 <​hidden>​ <​hidden>​
 <note important>​ <note important>​
Line 29: Line 29:
 {{ :​lfa:​2022:​lfa2022_lab9_1_4.png?​400 |}} {{ :​lfa:​2022:​lfa2022_lab9_1_4.png?​400 |}}
 </​hidden>​ </​hidden>​
-*/+
  
  
Line 35: Line 35:
  
  
-/*+
 <​hidden>​ <​hidden>​
 <note warning> <note warning>
Line 49: Line 49:
 We can either generate one ''​a''​ followed by one ''​b'',​ as well as one ''​b''​ followed by one ''​a''​. At the same time, other sequences of equal number of a and b can appear freely, hence one solution is: We can either generate one ''​a''​ followed by one ''​b'',​ as well as one ''​b''​ followed by one ''​a''​. At the same time, other sequences of equal number of a and b can appear freely, hence one solution is:
 $math[S \leftarrow aSbS \mid bSaS \mid \epsilon] $math[S \leftarrow aSbS \mid bSaS \mid \epsilon]
-/*+
 **Solution 2:** **Solution 2:**
  
Line 64: Line 64:
 *-/ *-/
 </​hidden>​ </​hidden>​
-*/+
  
  
Line 70: Line 70:
  
  
-/*+
 <​hidden>​ <​hidden>​
 /-* /-*
Line 96: Line 96:
  
 </​hidden>​ </​hidden>​
-*/+
  
  
Line 102: Line 102:
  
  
-/*+
 <​hidden>​ <​hidden>​
 <note important>​ <note important>​
Line 116: Line 116:
 {{ :​lfa:​2022:​lfa2022_lab9_1_5.png?​600 |}} {{ :​lfa:​2022:​lfa2022_lab9_1_5.png?​600 |}}
 </​hidden>​ </​hidden>​
-*/+
  
  
Line 130: Line 130:
  
  
-/*+
 <​hidden>​ <​hidden>​
 <note important>​ <note important>​
Line 148: Line 148:
  
 </​hidden>​ </​hidden>​
-*/+
  
  
Line 158: Line 158:
  
  
-/*+
 <​hidden><​note important>​ <​hidden><​note important>​
  
Line 173: Line 173:
  
 </​note></​hidden>​ </​note></​hidden>​
-*/+
  
  
Line 183: Line 183:
  
  
-/*+
 <​hidden>​ <​hidden>​
 <note important>​ <note important>​
Line 199: Line 199:
 </​note>​ </​note>​
 </​hidden>​ </​hidden>​
-*/+
  
  
Line 205: Line 205:
  
  
-/*+
 <​hidden><​note important>​ <​hidden><​note important>​
 $ S \leftarrow aS | aaS | \epsilon $\\ $ S \leftarrow aS | aaS | \epsilon $\\
Line 212: Line 212:
   * S => aaS => aa   * S => aaS => aa
 </​note></​hidden>​ </​note></​hidden>​
-*/+