Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS6100 Assignment 4 Answers: Proofs and Modeling in Theory of Computation, Assignments of Computer Science

The answers to assignment 4 of the cs6100 course in spring 2004. The assignments cover various topics in theory of computation, including proofs for decidability of pcp over a unary alphabet and the relationship between relations r1 and r2. The document also includes models for given sentences.

Typology: Assignments

2009/2010

Uploaded on 03/28/2010

koofers-user-akc
koofers-user-akc 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
cs6100 Spring 2004, Assignment 4 Answers
All questions are worth 5 points.
1. (Sipser, 5.17)
PCP over a unary alphabet is decidable.
Proof. Let the given tiles Abe {A1,...An}, where an Ai= (1,1r). We
will be interested only in the quantities and r. Here is the decision
procedure:
Accept iff there exists Ap, AqAsuch that Ap= (1i,1i+u) and
Aq= (1+v,1)
This is a correct decision procedure:
Suppose there exists Ap, AqAsuch that Ap= (1i,1i+u) and Aq=
(1+v,1). We can solve the PCP problem by finding c1, c2such that
c1i+c2(+v) = c1(i+u) + c2
and this is indeed always solvable, by letting c1=vand c2=u.
If there is no Ap= (1i,1i+u) and Aq= (1+v,1) in Athen we have
a situation in which either all tiles are of the form (1i,1j), i < j or all
tiles have the form (1i,1j), j < i. In either case it is clear that there
is no solution, for pasting tiles will never allow the top ‘quantity’ to
catch up with the bottom quantity (or vice versa).
2. (Sipser, 6.7) A B. J. A TJBTJ.
Proof. Let J={(x, 0) |xA} {(x, 1) |xB}. Suppose Jis decidable.
Then we may decide if xAby asking if (x, 0) J, and similarly, xB
is decided by asking if (x, 1) J.
3. (Sipser, 6.9)
Give a model for the sentence
(x.R1(x, x))
(xy.R1(x, y)R1(y, x))
(xyz.R1(x, y )R1(y, z)R1(x, z))
One model is (N,=). For another model, let the domain be expressions
of the lambda calculus and R1be the relation of α-convertibility.
1
pf2

Partial preview of the text

Download CS6100 Assignment 4 Answers: Proofs and Modeling in Theory of Computation and more Assignments Computer Science in PDF only on Docsity!

cs6100 Spring 2004, Assignment 4 Answers

All questions are worth 5 points.

  1. (Sipser, 5.17) PCP over a unary alphabet is decidable.

Proof. Let the given tiles A be {A 1 ,... An}, where an Ai = (1ℓ, 1 r). We will be interested only in the quantities ℓ and r. Here is the decision procedure:

Accept iff there exists Ap, Aq ∈ A such that Ap = (1i, 1 i+u) and Aq = (1ℓ+v, 1 ℓ)

This is a correct decision procedure:

  • Suppose there exists Ap, Aq ∈ A such that Ap = (1i, 1 i+u) and Aq = (1ℓ+v, 1 ℓ). We can solve the PCP problem by finding c 1 , c 2 such that

c 1 i + c 2 (ℓ + v) = c 1 (i + u) + c 2 ℓ

and this is indeed always solvable, by letting c 1 = v and c 2 = u.

  • If there is no Ap = (1i, 1 i+u) and Aq = (1ℓ+v, 1 ℓ) in A then we have a situation in which either all tiles are of the form (1i, 1 j^ ), i < j or all tiles have the form (1i, 1 j^ ), j < i. In either case it is clear that there is no solution, for pasting tiles will never allow the top ‘quantity’ to catch up with the bottom quantity (or vice versa).
  1. (Sipser, 6.7) ∀A B. ∃J. A ≤T J ∧ B ≤T J.

Proof. Let J = {(x, 0) | x ∈ A} ∪ {(x, 1) | x ∈ B}. Suppose J is decidable. Then we may decide if x ∈ A by asking if (x, 0) ∈ J, and similarly, x ∈ B is decided by asking if (x, 1) ∈ J.

  1. (Sipser, 6.9) Give a model for the sentence

(∀x.R 1 (x, x)) ∧ (∀xy.R 1 (x, y) ⇔ R 1 (y, x)) ∧ (∀xyz.R 1 (x, y) ∧ R 1 (y, z) ⇒ R 1 (x, z))

One model is (N , =). For another model, let the domain be expressions of the lambda calculus and R 1 be the relation of α-convertibility.

  1. (Sipser, 6.10) Give a model for the sentence

(∀x.R 1 (x, x)) ∧ (∀xy.R 1 (x, y) ⇔ R 1 (y, x)) ∧ (∀xyz.R 1 (x, y) ∧ R 1 (y, z) ⇒ R 1 (x, z)) ∧ (∀x.R 1 (x, x) ⇒ ¬R 2 (x, x)) ∧ (∀xy.¬R 1 (x, y) ⇒ R 2 (x, y) ⊕ R 2 (y, x)) ∧ (∀xyz.R 2 (x, y) ∧ R 2 (y, z) ⇒ R 2 (x, z)) ∧ (∀x.∃y. R 2 (x, y))

One model is (N , R 1 , R 2 , ⊕), where R 1 is equality, R 2 is < and ⊕ is ∨.

  1. (Sipser, 6.11) Let (N , <) be the model with universe N and the “less-than” relation. Show that Th(N , <) is decidable.

Proof. By Theorem 6.10, we have a decision procedure for Th(N , +), where + is a relation. We now use the fact that

x < y iff ∃u. (x + u = y) ∧ ¬(x + u = x)

To decide a formula F ∈ Th(N , <), simply replace each occurrence of < in F by ∃u. (x + u = y) ∧ ¬(x + u = x) and then invoke the decision procedure for Th(N , +).