Edit this page Backlinks This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Solutii pentru exercise sheet 2 ====== 1. Fie $ fst(L) = \{ w \in \Sigma^\star \mid \exists x \in \Sigma^\star, a.î. wx \in L\ și\ |x| = |w| \}$. Arătați că $ fst$ este o proprietate de închidere pentru limbajele regulate. //**Solutie:**// Pentru a intelege mai bine $math[fst(L)], il putem aplica pe un limbaj finit, dar si pe unul infinit: * $math[fst(\{A,BAAB,AB\}] = \{BA,A\}] * $math[fst(L(A^*B^+)) = \{B,A,AA,BB,AB, ... \}] Conditia $math[|x| = |w|] {{ :lfa:sheet-solutions-3.jpg?500 |}} 2. Fie $ L_3 = \{ w \in \{0, 1\}^* \mid \#_{01}(w) = \#_{10}(w) \}$ (i.e. cuvintele conțin același număr de secvențe "01" și "10"). Demonstrați că $ L_3$ //este regulat//. 3. Demonstrați că $ L = \{ a^nb^mc^{n-m} \mid n \ge m \ge 0 \}$ //nu este// un limbaj regulat, fără a folosi izomorfisme. 4. Demonstrați că, pentru orice limbaj $ L$ //regulat// și //infinit//, există două limbaje $ L_1$, $ L_2$ //regulate// și //infinite//, astfel încât $ L_1 \cap L_2 = \emptyset$ și $ L_1 \cup L_2 = L$.