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:lab11-cfprop [2022/01/15 09:26]
pdmatei
lfa:lab11-cfprop [2023/01/12 18:00] (current)
pdmatei
Line 23: Line 23:
  
   - $math[L_1 = \{xyx \mid x,​y\in\{0,​1\}^* \}]   - $math[L_1 = \{xyx \mid x,​y\in\{0,​1\}^* \}]
-  - $math[L_2], unde $math[L_k = \{x^nyx^n, ​ \mid x \mid \leq k\}].+  - $math[L_2], unde $math[L_k = \{x^nyx^n, ​ \mid x \mid k, n>0\}].
   - $math[L_3 = \{w \in \{0,​1,​*,​\cup,​(,​)\}^* \mid \text{w reprezinta o expresie regulata} \} ]   - $math[L_3 = \{w \in \{0,​1,​*,​\cup,​(,​)\}^* \mid \text{w reprezinta o expresie regulata} \} ]
   - $math[L_4 = \{w \in \{0,1\}^* \mid \text{w reprezinta codificarea binara unui numar de forma $math[2^k] sau $math[2^k+1]} \}]   - $math[L_4 = \{w \in \{0,1\}^* \mid \text{w reprezinta codificarea binara unui numar de forma $math[2^k] sau $math[2^k+1]} \}]
   - $math[L_5 = \{0^n1^m2^k \mid n \geq m \geq k\}]   - $math[L_5 = \{0^n1^m2^k \mid n \geq m \geq k\}]
  
-**11.7.** Scrieti o gramatica in Forma Normala ​Cholmsky ​pentru limbajul $math[L(a^*b^+)].+**11.7.** Scrieti o gramatica in Forma Normala ​Chomsky ​pentru limbajul $math[L(a^*b^+)].
  
 **11.8.** Dati un exemplu de limbaje $math[L_1] si $math[L_2], infinite, independente de context, astfel intersectia lor $math[L_1] si $math[L_2] sa fie un limbaj infinit: **11.8.** Dati un exemplu de limbaje $math[L_1] si $math[L_2], infinite, independente de context, astfel intersectia lor $math[L_1] si $math[L_2] sa fie un limbaj infinit:
Line 41: Line 41:
  
 Justificati fiecare raspuns. Justificati fiecare raspuns.
 +
 +**11.10** Dati exemplu de 2 limbaje independente de context astfel incat sa aratati ca operatiile de intersectie,​ complement si diferenta nu sunt proprietati de inchidere(nu pastreaza proprietatea limbajelor de a fi independente de context).
 +
 +**11.11** Sunt urmatoarele limbaje independente de context? De ce? \\
 +$ L = \{ a^nb^mc^nd^m | n, m \gt 0 \} $ \\
 +$ L = \{ a^n | $ n este numar prim $ \} $ \\
 +$ L = \{ ww | w \in \{ 0, 1 \}^* \} $
 +
 +**11.12** Este limbajul generat de urmatoarea gramatica vid? Justificati.
 +<​code>​
 +S <- ABA
 +A <- ASB | BSA | C
 +B <- A | BS | epsilon
 +C <- AS | BS
 +</​code>​
 +
 +**11.13.** Este limbajul $math[L = \{ww \mid w \in L(ab^*a)\}] independent de context, regulat, sau nici unul din cele anterioare? Justificati.
 +
 +**11.14.** Este complementul limbajului $math[L = \{ww^R \mid w \in \{0,1\}^* \}] independent de context? Justificati.
 +
 +
 +