# Materia Disciplina Teor...da Computabilidade uece - ultimo nti de tcomp, Notas de estudo de Informática

6 páginas
902Número de visitas
Descrição
Materia utilizado na Disciplina de Teoria da Computabilidade ministrada pelo professor Edson Pessoa da UECE
20 pontos
este documento
Pré-visualização3 páginas / 6

01) (a) I – quo (x, y) = sg(3).μz8[gt((z+1).3,8)] Para z = 0 → μz0[gt(3,8)] = 0 Para z = 1 → μz1[gt(6,8)] = 0 Para z = 2 → μz2[gt(9,8)] = 1 → quo(8,3) = 1.2 → quo(8,3) = 2

II – quo (5,5) = sg(5).μz5[gt((z+1).5,5)] Para z = 0 → μz0[gt(5,5)] = 0 Para z = 1 → μz1[gt(10,5)] = 1 → quo(5,5) = 1.1 → quo(5,5) = 1

III – quo (7,12) = sg(12).μz7[gt((z+1).12,7)] Para z = 0 → μz1[gt(12,7)] = 1 → quo(7,12) = 1.0 → quo(7,12) = 1

(b) I – Resto (8,3) = 8 – (3.quo(8,3))

= 8 – (3.2) = 8 – 6 = 2

II – Resto (5,5) = 5 – (5.quo(5,5)) = 5 – (5.1) = 5 – 5 = 0

III – Resto (7,12) = 7 – (12.quo(7,12)) = 7 – (12.0) = 7 – 0 = 7

(c) I – DIV (8,3) = eq[RES(8,3),0].sg(8)

= eq[2,0].1 = [cosg(It(2,0) + gt(2,0)].1 = [cosg(sg(0 – 2) + sg(2 – 0)].1 = [cosg(sg(0) + sg(2)].1 = [cosg(0+1)].1 = cosg(1).1 = 0.1 = 0

II – DIV (5,5) = eq[RES(5,5),0].sg(5) = eq[0,0].1 = [cosg(It(0,0) + gt(0,0)].1 = [cosg(sg(0 – 0) + gt(0 – 0)].1 = [cosg(sg(0) + sg(0)].1 = cosg(0).1 = 1.1 = 1

III – DIV (7,12) = eq[RES(7,12),0].sg(7) = eq[7,0].1 = [cosg(It(7,0) + gt(7,0)].1 = [cosg(sg(0 – 7) + sg(7 – 0)].1 = [cosg(sg(0) + sg(7)].1 = cosg(1).1 = 0.1 = 0

(d) I – NDIV(3) = DIV(3,0) + DIV (3,1) + DIV(3,2) + DIV(3,3)

= 0 + 1 + 0 + 1 = 2 II – NDIV(5) = DIV(5,0) + DIV (5,1) + DIV(5,2) + DIV(5,3) + DIV(5,4) + DIV(5,5)

= 0 + 1 + 0 + 0 + 0 + 1 = 2 III – NDIV(12) = DIV(12,0) + DIV (12,1) + DIV(12,2) + DIV(12,3) + DIV(12,4) + DIV(12,5) + DIV(12,6) + DIV(12,7) + DIV(12,8) + DIV(12,9) + DIV(12,10) + DIV(12,11) + DIV(12,12)

= 0 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 1 = 6

(e)

I – PRIMO(3) = eq(NDIV(3),2) = eq(2,2) = [cosg (It(2,2) + gt(2,2))] = [cosg(sg(2 – 2) + sg(2 – 2))] = [cosg(sg(0) + sg(0))] = cosg(0 + 0) = cosg(0) = 1

II – PRIMO(5) = eq(NDIV(5),2) = eq(2,2) = [cosg (It(2,2) + gt(2,2))] = [cosg(sg(2 – 2) + sg(2 – 2))] = [cosg(sg(0) + sg(0))] = cosg(0 + 0) = cosg(0) = 1

III – PRIMO(12) = eq(NDIV(12),2) = eq(6,2) = eq(6,2) = [cosg (It(6,2) + gt(6,2))]

= [cosg(sg(2 – 6) + sg(6 – 2))] = [cosg(sg(0) + sg(0))] = cosg (sg(0) + sg(4)) = cos(0 + 1) = 0

02) (a) BnB

CPY BnBnB MR BnBnB CPY BnBnBnB MR BnBnBnB CPY BnBnBnBnB AD BnBnBn+nB ML BnBnBn+nB INT BnBn+nBnB ML BnBn+nBnB INT Bn+nBnBnB MR Bn+nBnBnB

MULT Bn+nBn.nBB ML Bn+nBn.nB INT Bn.nBn+nB AD Bn.n+n+nB

(b)

(c)

03) (a) C23 = (x1,x2,x3) = SUC[SUC[ZERO(Pi3(x1,x2,x3))]]

= SUC[SUC[ZERO(xi)]] = SUC[SUC(0)] = SUC(1) = 1 + 1 = 2

(b) PRED(0) = 0 C F(x,0) → g(x) = 0 → ZERO(x) PRED(y + 1) = y F(x, y + 1) = h(x, y, F(x, y)) = P23 (x, y, F(x, y)) = y = h

(c) F(x) = SOMA (MULT(2,x), 2) F(x0 = SOMA o (MULT(C2, I(x), C2))

04) (a) g(x) = ZERO(x) sg(x,0) = g(x) h(x,y,z) = C1(3) = 1 sg(x,y+1) = h(x,y,z) = 1

(b) g(x) = P1(x) SUB(x,0) = g(x) = x h(x,y,z) = PRED(z) SUB(x,y+1) = h(x,y,sub(x,y)) = PRED(SUB(x,y))

(c) g(x) = C1(1) (x) = 1 EXP(x,0) = g(x) = 1

h(x,y,z) = MULT(x,z) EXP(x,y+1) = h(x,y,EXP(x,y)) = MULT(x, EXP(x,y))

06) (a) max(x,y) = x.(gt(x,y) + eq(x,y)) + y.(It(x,y))

(b) min(x,y) = x.(It(x,y) + eq(x,y)) + y.(gt(x,y))

(c) min(x,y,z) = x.(It(x,y) + eq(x,y)).(It(x,z) + eq(x,z)) + y.(It(y,x) + eq(y,x)).(It(y,z) + eq(y,z)) + z.(It(z,x) + eq(z,x)).(It(z,y) + eq(z,y))

(d) g(x) = eq(x,0) h(x,y,z) = P3(3) (x,y,z) par(x,0) = g(0) par (x,1) = g(1) par(x,y+z) = h(x,y.par(x,y)) = par(x,y)

(e) g(x) = 0 h(x,y,z) = z + 1 Metade(x,0) = metade (x,1) = g(x) = 0 Metade(x,y+z) = h(x,y,metade(x,y)) = metade(x,2) + 1

(f) g(x) = 0 h(x,y,z) = maior(EXP(y+1,2).le(EXP(y+1,2),x),z)

07) (a) le(x,y) = lt(x,y) + eq(x,y)

(b) ge(x,y) = gt(x,y) + eq(x,y)

(c) bt(x,y,z) = gt(x,y).lt(x,z) x

(d) qperf(x) = Σ(eq(exp(i,2),x)) i=0

08) y

(a) f(x,y) = π lt(g(i),g(x)) i=0

y (b) f(x,y) = sg (Σeq(g(i),x))

i=0 y y

(c) f(x) = sg(Σ Σ(eq(g(i),h(j)))) i=0 j=0

y (d) f(x) = πlt(g(i), g(i+1))

i=0

y (e) n(x,y) = Σeq(g(i),x)) i=0

y

(g) lrg(x,y) = Σ (y-1).eq(g(y-1),x).eq(n(x,y-1),n(x,y))) i=0

09) (a) mdc(x,y) = μz[div(x,m-z).div(y,m-z)]

(c) pw2(x) = eq(x,exp(2,n))

10) K(x,0) = g(ZERO(x)) = g(0) K(x,y+1) = h[P1(x,y,z), g(P2(x,y,z), k(P1(x,y,z), P2(x,y,z))]

= h[x,g(y),k(x,y)] = menor(P2(x,g(y),K(x,y),P3(x,g(y),K(x,y)) = menor(g(y),K(x,y))

11) - z, se p (x1, x2, x3, ..., xn, i) = 0

0 <= i < z <= U € P (x1, x2, x3, ..., xn,z) = 1 - u+1, caso contrário Seja p um predicado primitivo recursivo, G uma função primitiva recursiva com n argumentos, então a função U(x1, x2, x3, ..., xn) F(x1, x2, x3, ..., xn) = μz[p(x1, x2, x3, ..., xn,z)] É primitiva recursiva.

13)(a) A(2,2) = a(1+1,1+1) = = A(1,A(1+1,1)) = = A(1,A(2,1)) = = A(1,A(1+1+0+1) = = A(1,A(1,A(2,0))) = = A(1,A(1,A(1+1,0))) = = A(1,A(1,A(1,1))) = = A(1,A(1,A(0+1,0+1))) = = A(1,A(1,A(0,A(0+1,0)))) = = A(1,A(1,A(0,a(1,0)))) = = A(1,A(1,A(0,A(0,1)))) = = A(1,A(1,3)) = = A(1,A(0,A(1,2))) = = A(1,A(0,A(0,A(1,1)))) = = A(1,A(0,A(0,A(1,0))))) = = A(1,A(0,A(0,A(0,A(0,1)))))) = = A(1,A(0,A(0,A(O,2)))) = = A(1,A(0,4) = A(1,5) = = A(0,A(1,4) = A(0,A(0,A(1,3))) = = A(0,A(0,A(0,A(1,2)))) = = A(0,A(0,A(0,A(0,A(1,1))))) = = A(0,A(0,A(0,A(0,A(0,A(1,0)))))) = = A(0,A(0,A(0,A(0,A(0,A(0,1)))))) = = A(0,A(0,A(0,A(0,A(0,2))))) = = A(0,A(0,A(0,A(0,3)))) = = A(0,A(0,A(0,4))) = = A(0,A(0,5)) = = A(0,6) = = 6 + 1 = = 7

(c) A(1,y)=A(0,A(1,y-1))=A(0,A(0,A(1,y-1)))= ... =A(0,A(0...A(1,y-y))) = A(0,A(0...A(0,1))) = y+2

(d) A(z,y) = A(1,A(2,y-1)) = A(1,A(1,A(2,y-2))) = ... = A(1,A(1...A(2,y-y))) = A(1,A(1...A(1,1))) = A(1,A(1...A(0,A(1,0))) = A(1,A(1...A(0,A(0,1))) = 2 + 2 + 2 + 2 + ... + 2 + 3 = 2y + 3

14) (a) CUBO(x) = sg(μz[eq(z.z.z,x)])

(b) RAIZP(C0,C1,C2) = μz[EQ(C2.Z.Z+C1.Z+C0,0)]

(c) R(x) = sg(μz[eq(g(z)),g(z+x)])

(d) l(x) = cosg(μz[ge(g(i)-h(i),x)])

(e) f(x) = sg(μz[eq(sg(μji[eq(g(i)+h(j),x)]),1)])

Até o momento nenhum comentário