Computability and Mathematical Functions: Homework Solutions, Assignments of Mathematics

Solutions to homework problems from a university-level mathematics course, math 497a, focusing on computability, unsolvability, randomness, and number theory. The problems involve exhibiting register machine programs for various functions, proving computability of partial functions, and discussing computability of real numbers.

Typology: Assignments

Pre 2010

Uploaded on 09/24/2009

koofers-user-sa8
koofers-user-sa8 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computability, Unsolvability, Randomness
Math 497A: Homework #1
Stephen G. Simpson
Due Tuesday, September 4, 2007
1. Exhibit a register machine program which computes the exponential
function, exp(x, y)=xy. Remember that the variables xand yrange
over N, the set of natural numbers. Note that x0=1forallx,evenfor
x=0.
2. Exhibit a register machine program which computes the function
Rem(y, x) = the remainder of yon division by x.
For example, Rem(17,5)=2.
3. Assume that P(x, y, z) is a 3-place predicate which is computable. Con-
sider the 2-place partial function ψ(x, y) defined as follows:
ψ(x, y)'the least zsuch that P(x, y, z) holds, if such a z
exists. If such a zdoes not exist, then ψ(x, y ) is undefined.
Use register machine programs to prove that the function ψis com-
putable. (More precisely, ψis partial recursive.)
Hint: Since Pis a computable predicate, we may assume that we have
a program Pwhich computes the characteristic function of P. Show
how to embed P(or perhaps a variant of P) into a larger program, call
it Q, such that Qcomputes ψ.TheideaofQis that, given xand y,
Q(x, y) searches sequentially through the integers z=0,z=1,z=2,
..., to find the first zsuch that P(x, y , z) holds. In particular, Qwill
have the property that, for all xand y,Q(x, y) eventually halts if and
only if P(x, y, z )holdsforsomez.
4. Use the results of Problems 2 and 3 to prove that the 2-place function
LCM(x, y) = the least common multiple of xand yis computable.
Deduce that the 2-place function GCD(x, y) = the greatest common
divisor of xand y, is also computable.
1
pf2

Partial preview of the text

Download Computability and Mathematical Functions: Homework Solutions and more Assignments Mathematics in PDF only on Docsity!

Computability, Unsolvability, Randomness

Math 497A: Homework

Stephen G. Simpson

Due Tuesday, September 4, 2007

  1. Exhibit a register machine program which computes the exponential function, exp(x, y) = xy^. Remember that the variables x and y range over N, the set of natural numbers. Note that x^0 = 1 for all x, even for x = 0.
  2. Exhibit a register machine program which computes the function

Rem(y, x) = the remainder of y on division by x.

For example, Rem(17,5)=2.

  1. Assume that P (x, y, z) is a 3-place predicate which is computable. Con- sider the 2-place partial function ψ(x, y) defined as follows:

ψ(x, y) ' the least z such that P (x, y, z) holds, if such a z exists. If such a z does not exist, then ψ(x, y) is undefined.

Use register machine programs to prove that the function ψ is com- putable. (More precisely, ψ is partial recursive.) Hint: Since P is a computable predicate, we may assume that we have a program P which computes the characteristic function of P. Show how to embed P (or perhaps a variant of P) into a larger program, call it Q, such that Q computes ψ. The idea of Q is that, given x and y, Q(x, y) searches sequentially through the integers z = 0, z = 1, z = 2,

... , to find the first z such that P (x, y, z) holds. In particular, Q will have the property that, for all x and y, Q(x, y) eventually halts if and only if P (x, y, z) holds for some z.

  1. Use the results of Problems 2 and 3 to prove that the 2-place function LCM(x, y) = the least common multiple of x and y is computable. Deduce that the 2-place function GCD(x, y) = the greatest common divisor of x and y, is also computable.

1

  1. (Approximating the square root of 2.) Consider successive rational approximations of

2 given by Newton’s method:

x 0 = 1, xn+1 = xn −

f (xn) f ′(xn)

where f (x) = x^2 − 2. The first few values are x 0 = 1, x 1 = 3/2, x 2 = 17/12, x 3 = 577/408. Let a(n) and b(n) respectively be the numerator and denominator of xn. Thus a(n) and b(n) are 1-place number-theoretic functions. The first few values are a(0) = b(0) = 1, a(1) = 3, b(1) = 2, a(3) = 17, b(3) = 12, a(3) = 577, b(3) = 408. Use primitive recursion to prove that the functions a(n) and b(n) are computable.

  1. A positive real number r is said to be computable if there exist com- putable sequences of positive integers an, bn, n = 0, 1 , 2 ,.. ., such that

r = lim n→∞

an bn

and in addition (^) ∣ ∣∣ ∣r^ −^

an bn

∣ <^

2 n for all n ∈ N. Give a convincing argument that all of the standard examples of positive real numbers including

2 = 1. 41421 · · ·, e =

  1. 71828 · · ·, π = 3. 14159 · · ·, etc., are computable.

  2. Prove that the sum, product, and quotient of two computable positive real numbers are computable.