0% found this document useful (0 votes)
24 views

Chapter 3 Complexity New

The document discusses recursively enumerable and recursive languages. It defines: - A recursively enumerable language as one that has a Turing machine that accepts it, though it may not halt on all inputs. - A recursive language as one that has a Turing machine that accepts it and halts on all inputs. It proves that there are languages that are recursively enumerable but not recursive, and languages whose complements are not recursively enumerable. The document also discusses primitive recursive functions, which can be constructed from basic functions like successor and projection using composition and primitive recursion. Addition and multiplication are given as examples.

Uploaded by

Dagmawit Teshome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Chapter 3 Complexity New

The document discusses recursively enumerable and recursive languages. It defines: - A recursively enumerable language as one that has a Turing machine that accepts it, though it may not halt on all inputs. - A recursive language as one that has a Turing machine that accepts it and halts on all inputs. It proves that there are languages that are recursively enumerable but not recursive, and languages whose complements are not recursively enumerable. The document also discusses primitive recursive functions, which can be constructed from basic functions like successor and projection using composition and primitive recursion. Addition and multiplication are given as examples.

Uploaded by

Dagmawit Teshome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

 

Chapter 3

Computation
Recursive and Recursively Enumerable Languages
Definition A language L is said to be recursively enumerable if there
exists a Turing machine that accepts it.
⇒There exists a Turing machine M, such that, for every w ∈ L,
q0w├*M x1qfx2
 
with qf a final state.
⇒ For w not in L; it may be that the machine halts in a nonfinal state or
that it never halts and goes into an infinite loop.
Definition A language L on Σ is said to be recursive if there exists a
Turing machine M that accepts L and that halts on every w in Σ+.
Languages That Are Not Recursively Enumerable
Theorem For any non empty Σ, there exist languages that are not
recursively enumerable.
There exists a recursively enumerable language whose complement is
not recursively enumerable.
A Language That Is Recursively Enumerable but Not Recursive
Theorem If a language L and its complement are both recursively
enumerable, then both languages are recursive. If L is recursive, then
is also recursive, and consequently both are recursively enumerable.

There exists a recursively enumerable language that is not recursive.


Other Models of Computation
Recursive Functions
Primitive Recursive Functions
Basic functions:
1. The zero function z(x) = 0, for all x ∈ I={0,1,2,. . .}.
2. The successor function s(x), whose value is the integer next in
sequence to x, that is, in the usual notation, s(x) = x +1.
3. The projector functions pk (x1 , x2 ) = xk , k = 1, 2.

Two ways of building more complicated functions from these:


1. Composition, by which we construct f (x, y) = h (g1 (x, y), g2 (x, y))
from defined functions g1 ,g2 ,h.
2. Primitive recursion, by which a function can be defined recursively
through
f (x, 0) = g1 (x),
f (x, y + 1) = h (g2 (x, y), f (x, y)), from defined functions g1 , g2 , and h.

Example
Addition of integers x and y can be implemented with the function
add (x, y), defined by
add ( x, 0) = x,
add ( x, y +1) = add ( x, y)+1.
To add 2 and 3, we apply these rules successively:
add (3, 2) = add (3,1) + 1
= (add (3,0) + 1) + 1= (3+1) + 1 = 4 + 1 = 5.
Example
Multiplication of integers x and y can be implemented with the
function
mult(x, y), defined by
mult( x, 0) = 0, projection
mult( x, y +1) = add ( x, mult(x, y)). ,recursion
mult(3,4)=mult(3,3+1)=add(3,mult(3,3))=add(3,mult(3,2+1))
=add(3,add(3,mult(3,2)))=add(3,add(3,mult(3,1+1))))=
add(3,add(3,add(3,mult(3,1))))=add(3,add(3,add(3,mult(3,1+0))))
=add(3,add(3,add(3,add(3,mult(3,0)))))
=add(3,add(3,add(3,add(3,0))))
=add(3,add(3,add(3,add(3,0))))
=add(3,add(3,add(3,3))))
=add(3,add(3,6))=add(3,9)=12
Example A kind of subtraction is defined from usual subtraction by
x y = x – y if x ≥ y,
x y = 0 if x < y
Now we define the predecessor function
pred (0) = 0,
pred (y +1) = y,
and from it, the subtracting function
subtr (x, 0) = x,
subtr (x, y +1) = pred (subtr (x, y)).

Subtr(5,3)=pred(subtr(5,2)= pred(pred(subtr(5,1)))=
pred(pred(pred(subtr(5,0))))= pred(pred(pred(5)))= pred(pred(4))=
pred(3)= 2.
Definition A function is called primitive recursive if and only if it can
be constructed from the basic functions z, s, pk , by successive
composition and primitive recursion.

You might also like