Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
temp:exam [2021/09/09 11:33] pdmatei |
temp:exam [2021/09/10 13:35] (current) pdmatei |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | 1.Fie $math[f\in RE\setminus R] o problema de decizie si $math[\mathcal{M} = \{M\mid M \text{ este o masina care decide }f \}]. Care afirmatii sunt adevarate: | + | 1. Scrieti doua expresii regulate $math[e_1] si $math[e_2] peste alfabetul $math[\Sigma=\{0,1\}] astfel incat $math[L(e_1) = \overline{L(e_2)}] si $math[L(e_1), L(e_2)] sa fie ambele infinite. |
- | * $math[\mathcal{M}] este finita | + | |
- | * $math[\mathcal{M}] este numarabila | + | |
- | * $math[\mathcal{M}] **nu poate fi vida** | + | |
- | * $math[\mathcal{M} \subseteq RE] | + | |
- | 2.Fie $math[g] o problema NP-dura, iar $math[h \in NP]. Daca $math[g \leq_p f \leq_T h], care afirmatii sunt adevarate? | + | 2. Fie $math[w = c_1c_2\ldots c_n] un cuvant. Notam cu $math[rep(w)] cuvantul $math[c_1c_1c_2c_2\ldots c_n] si cu $math[Rep(L)], limbajul $math[\{rep(w) \in \Sigma^* \mid w \in L\}]. Daca limbajul $math[L] este regulat atunci $math[Rep(L)] este regulat sau nu? Justificati. |
- | * $math[h] este NP-dura | + | |
- | * $math[f] este NP-dura | + | |
- | * $math[h] este NP-completa | + | |
- | * $math[f] este NP-completa | + | |
- | * $math[g] este NP-completa | + | |
- | 3.Dati un exemplu de algoritm care are timpul de executie $math[\omega(n^5)]. | + | 3. Fie $math[(q_1,1010,0010Z_0)] o configuratie a unui APD. Ce tranzitii sunt necesare pentru ca APD-ul sa ajunga in configuratia $math[(q_x,10,0010Z_0)]? |
+ | 4. Dati un exemplu de gramatica in Forma Normala Cholmsky care sa genereze un limbaj infinit regulat. | ||
- | 4. Care este complexitatea extragerii unui element de la pozitia $math[i] dintr-un LinkedList de lungime $math[n]? Dar dintr-un ArrayList implementat folosind strategia de dublare a capacitatii prezentate la curs? | + | 5. Câte stări și câte tranziții va avea un APD rezultat din convertirea unei gramatici cu 4 reguli? |
- | 5. Fie urmatoarea formula: $math[(\lnot x \vee y \vee \lnot u \vee \lnot z) \wedge (x \vee \lnot z) \wedge (\lnot v \vee \lnot y \vee \lnot z) \wedge (\lnot z \vee v)]. Care ar fi numarul maxim de pasi executat de un SAT Solver pentru a verifica daca aceasta formula este satisfiabila? | + | 6. Dati un exemplu de limbaj dependent de context care, **concatenat** la un limbaj **independent de context**, produce un limbaj **independent de context**. |
- | + | ||
- | 6. Definiti axiome pentru interclasarea a doua liste. | + | |