Theory of Computation (Fall 2014): Minimalization

Post on 28-May-2015

81 views 2 download

Tags:

transcript

Theory of Computation

Minimalization

Vladimir Kulyukin

www.vkedco.blogspot.comwww.vkedco.blogspot.com

Outline

● Minimalization● Bounded Minimalization● Minimalization & PRC Classes● Unbounded Minimalization● Minimalization in Proofs of Primitive Recursiveness

Minimalization

Minimalization: Definition

• Suppose P is a predicate, P(t, x1, … , xn) for n ≥ 0• Minimalization is a technique for finding the minimal

value of t for which P(t, x1, … , xn) = 1• If there is such a t, then minimalization returns it• If there is no such t, then minimalization is undefined

Example

P(1) = 0 P(2) = 0 P(3) = 1 P(4) = ?

1 2 3 4

P(0) = 0

0

3,0...0

1111210

11110

10

nnPP

PPP

PP

P

Bounded Minimalization

Bounded Minimalization

0

0

01

1010

101

if 0

if 1,...,,

Then

true.is ),...,,(for which , of aluesmallest v theis ;1),...,,( .2

false; is ),...,,(, valuesallfor ;0),...,,( 1.

:Suppose

0

tu

tuxxtP

xxtPttxxtP

xxtPttxxtPt

u

tn

nn

nnt

Bounded Minimalization

y

u

u

tnn

n

n

xxtPxxyg

xxtPt

CxxtP

0 011

10

1

)).,...,,((),...,,(

:function following theDefine

.1),...,,(for which aluesmallest v thebe Let

. class PRC somein predicate a be ),...,,(Let

Example

.300111)),...,,((

)),...,,(()),...,,((

)),...,,(()),...,,((

)),...,,((),...,,4(

.4,3 Suppose

4

01

2

0

3

011

1

01

0

01

4

0 011

0

tn

t tnn

tn

tn

u

u

tnn

xxtP

xxtPxxtP

xxtPxxtP

xxtPxxyg

yt

Example

.211

)),...,,(()),...,,((

)),...,,((),...,,1(

.1,3 Suppose

1

01

0

01

1

0 011

0

tn

tn

u

u

tnn

xxtPxxtP

xxtPxxg

yt

Lemma

.1,...,, 10 yxxygy nt

Proof

y

u

u

tnn

u

tn

yxxtPxxyg

yy

xxtPy

uty

0 011

01

0

.1)),...,,((,...,,

elements, 1 has ,0 range

theSince .1)),...,,(( ,,0

range in the every for Then .Let

Corollary

.1),...,,(which

for of eleast valu theis ),...,,(

.1),...,,( then , If

1

1

010

0

n

n

tun

xxtP

txxyg

txxygyt

Example

.2011)),...,,((

)),...,,(()),...,,((

)),...,,((),...,,2(

.2,2 Suppose

2

01

1

01

0

01

2

0 011

0

tn

tn

tn

u

u

tnn

xxtP

xxtPxxtP

xxtPxxyg

yt

Bounded Minimalization: Definition

otherwise. 0 and ,0 if 1,...,,for which

of eleast valu theis ,...,,mins,other wordIn

otherwise 0

,...,, if ,...,,,...,,min

1

1

11

1

ytxxtP

t xxtP

xxtPtxxtgxxtP

n

nyt

nyn

nyt

Minimalization & PRC Classes

Theorem 7.1 (Ch. 03)

. tobelongs also ),...,,(

then ),,...,,(min),...,,( and

class PRC some tobelongs ),...,,( If

1

11

1

Cxxyf

xxtPxxyf

CxxtP

n

nyt

n

n

In other words, if some predicate belongs to a PRC class, its bounded minimalization will stay in that class.

Proof 7.1 (Ch. 03)

.in is ),...,,(min cases),by n (definitio 5.4 TheoremBy

.in also is ),...,,( 6.3, TheoremBy

n.compositioby themfrom obtained is ),...,,( and

C,in are and ,, because ,in is tion,minimaliza bounded

of definition in the usedfunction the),,...,,(

1

1

1

1

CxxtP

CxxtPt

xxyg

C

xxyg

nyt

ny

n

n

Unbounded Minimalization

Theorem 7.2 (Ch. 3)

computablepartially is ,...,,min,...,

thenpredicate, computable a is ,...,, If

11

1

ny

n

n

xxyPxxg

xxtP

Proof 7.2 (Ch. 03)

[A1] IF P(Y, X1, …, Xn) GOTO E Y ← Y + 1 GOTO A1

Here is a program that computes g(x1 , …, x

n) is partially computable.

Why is g not computable?

Minimalization & Proofs of Primitive Recursiveness

Floor Function

recursive. primitive

is )quotient theofpart (integer that Show x/yy

x

Floor Function

xyty

xxt

)1(min

Keep incrementing t until (t+1)y > x. Then return t.

Example

.78213 because

,372)1(min2

77

t

t

More Examples

Why?00

05

4

42

9

42

8

x

Remainder Function

recursive. primitive is ,by ofdivision

theofremainder thei.e. , that Show

yx

R(x,y)

Remainder Examples

4

3

4

7

4

31

4

7

3

1

3

7

3

12

3

7

3

1

3

4

3

11

3

4

Remainder Function

.0)0,( that Note

),( .4

),( .3

),( .2

),( .1

xR

yy

xxyxR

yxRyy

xx

y

yxR

y

x

y

x

y

yxR

y

x

y

x

Reading Suggestions

● Ch. 3, Computability, Complexity, and Languages, 2nd Edition, by Davis, Weyuker, Sigal