Sunteți pe pagina 1din 2

1.

Care din urmatoarele functii caracterizeaza problema de decizie:

"Pentru doua programe date, este adevarat ca ele rezolva aceeasi problema?"

[Mai multe raspunsuri pot fi adevarate]

a. f(M1,M2) = 1 iff forall w in Sigma*, M1 accepts w iff M2 accepts w

b. f(M1,M2) = 1 iff forall w in Sigma*, M1 does not loop on w iff M2 does not loop on w

c. f(M1,M2) = 1 iff exists g in RE . M1 accepts g and M2 accepts g

d. f(M1,M2) = 1 iff exists g in RE . M1 accepts g iff M2 accepts g

2. Scrieti complementul pentru problema:

f(M1,M2) = 1 iff forall w in Sigma*, M1 accepts w iff M2 accepts w

3. Fie urmatoarea problema:

f(M) = 1 iff M accepts enc(M)

Care afirmatie este adevarata? [Mai multe raspunsuri pot fi adevarate]

a. f in RE

b. f in R

c. f not in R

d. f not in RE

4. Care din urmatoarele afirmatii sunt adevarate?

a. f in RE si complement(f) in RE atunci f in R

b. f not in RE atunci f not in R

c. f not in R atunci complement(f) not in RE

5. Aratati ca urmatoarea problema apartine RE:

f(M1, M2) = 1 iff M1 accepts enc(M2) and M2 accepts enc(M1)


6. Reduceti halting problem la urmatoarea problema:

f(M,k) = 1 iff exists w1, w2, ..., wk from Sigma* such that M accepts all previous words.

S-ar putea să vă placă și