Andreas Klappenecker and Hyunyoung...

Post on 09-Nov-2020

5 views 0 download

transcript

Computability

Andreas Klappenecker and Hyunyoung Lee

Texas A&M University

1 / 26

Motivation

QuestionAre there computational problems that we cannot solve

with a computer, even if we give an arbitrary amount of

time and space?

2 / 26

Motivation

AnswerThe answer is a resounding YES!

How can we Show It?We need a bit of set theory to show this. It is nothing

deep, but religiously use the definitions, as your intuition

might fail you.

3 / 26

Motivation

AnswerThe answer is a resounding YES!

How can we Show It?We need a bit of set theory to show this. It is nothing

deep, but religiously use the definitions, as your intuition

might fail you.

3 / 26

Sizes of Sets

A “ ta, b, cu

B “ t5, 6, 7u

C “ tA,Z , 1, 2u

Z, N0, R

4 / 26

Cardinality

Two sets A and B are said to have the same cardinalityor are equipotent if and only if there exists a bijectivefunction from A onto B .

The cardinality of A is less than or equal to the

cardinality of B if and only if there exists an injectivefunction from A to B .

5 / 26

Cardinality

Two sets A and B are said to have the same cardinalityor are equipotent if and only if there exists a bijectivefunction from A onto B .

The cardinality of A is less than or equal to the

cardinality of B if and only if there exists an injectivefunction from A to B .

5 / 26

Notation

For sets A and B , we write

|A| ď |B |

if and only if the cardinality of A is less than or equal to

the cardinality of B . We write

|A| “ |B |

if and only if A and B have the same cardinality.

6 / 26

Properties of Cardinalities

Proposition

Let A, B , and C be sets. Then

(a) |A| “ |A|,

(b) if |A| ď |B | and |B | ď |A|, then |A| “ |B |,

(c) if |A| ď |B | and |B | ď |C |, then |A| ď |C |.

7 / 26

Finite Sets

A set A is called finite if and only if there exists a

nonnegative integer n such that |n| “ |A|. If |n| “ A, then

we say that A has n elements and write the cardinality in

the more pleasing form n “ |A|.

8 / 26

Pigeonhole Principle

Pigeonhole Principle

It is impossible to place n pigeons into fewer than n pigeonholeswithout occupying at least one pigeonhole twice.

For instance, it is impossible to place five pigeons

f f f f finto four pigeonholes

�̋ �̋ �̋ �̋

such that each pigeonhole contains at most one pigeon.

9 / 26

Pigeonhole Principle

Proposition (Pigeonhole Principle)

There is no injective mapping from n “ t0, 1, . . . , n ´ 1u onto asubset of n.

10 / 26

Hilbert’s Hotel

Hilbert’s hotel has an infinite number of rooms, all occupied:

0 1 2 3 ¨ ¨ ¨

1 2 3 ¨ ¨ ¨

A new guest arrives, so Hilbert asks everyone to move to the nextroom, so the guest in room n moves to room n ` 1.Now each old guest has a room and the new guest can move intoroom 0.

11 / 26

Hilbert’s Hotel

Why does Hilbert’s trick work?

The map f : N0 Ñ N1 given by

f pnq “ n ` 1

is an injective (in fact bijective) map from the set of

nonnegative numbers onto the subset of positive integers.

Wow!

12 / 26

Cardinality of Infinite Sets

|N0| “ |N1|

|N0| “ |tx P N0 | x is evenu|

|N1| “ |tx P N1 | x is primeu|

13 / 26

Cardinality of Infinite Sets

|N0| “ |N1|

|N0| “ |tx P N0 | x is evenu|

|N1| “ |tx P N1 | x is primeu|

13 / 26

Cardinality of Infinite Sets

|N0| “ |N1|

|N0| “ |tx P N0 | x is evenu|

|N1| “ |tx P N1 | x is primeu|

13 / 26

Countable Sets

A set A satisfying |A| ď |N0| is called a countable set.

In other words, it suffices to find an injective function from

A into N0 to prove that A is countable.

Alternatively, we can prove that A is countable if we can

find a surjection from N0 onto A.

14 / 26

Direct Products of Countable Sets

Proposition

Suppose that A and B are countable sets. Then Aˆ B is

a countable set.

15 / 26

Cantor’s Diagonals

Cantor showed that N0 ˆN0 is countable as follows.

0 1 2 3

p0, 0q

p0, 1q

p1, 0q

p0, 2q

p1, 1q

p2, 0q

p0, 3q

p1, 2q

p2, 1q

p3, 0q

k

0 1 2 3

0 1

2

3

4

5

6

7

8

9

16 / 26

Conclusion

|N0| “ |N0 ˆN0|

If A and B are countable sets, then Aˆ B is a countable

set.

17 / 26

Conclusion

|N0| “ |N0 ˆN0|

If A and B are countable sets, then Aˆ B is a countable

set.

17 / 26

Proposition

Let S “ tAi | i P I u be a family of countable sets Ai such

that I is a nonempty countable set. ThenŤ

S is a

countable set.

18 / 26

Sets with Larger Cardinality

Let A and B be sets. We

write

|A| ă |B |

if and only if there exists an

injective function from A into

B , but no bijective function

from A onto B .

19 / 26

Cantor’s Remarkable Argument

Proposition (Cantor)

Let A be a set. There does not exist any surjection from A ontoPpAq.

Proof.

Given any function f : AÑ PpAq, we can construct the set

S “ tx P A | x R f pxqu.

Seeking a contradiction, let us assume that there exists an elementa P A such that f paq “ S . Then we have a P f paq if and only ifa R f paq, which is a contradiction. Thus, f is not surjective.

20 / 26

Strict Increase of Cardinality

Corollary

Let A be a set. Then |A| ă |PpAq|.

Proof.The function f : AÑ PpAq given by f pxq “ txu is

injective, so |A| ď |PpAq|. By the previous proposition,

there cannot exist any surjective map from A onto PpAq.

Therefore, |A| ă |PpAq|.

21 / 26

Characteristic Functions

Example

Set S “ t0, 1, 2u. Then a characteristic function f : S Ñ t0, 1udescribes a subset A of S . For example

f p0q “ 1, , f p1q “ 0, f p2q “ 1

describes the set A “ t0, 2u.

22 / 26

Equipotence of Set of Characteristic Functions and Power Sets

Let us denote by 2N0 the set of all functions from the

nonnegative integers to the set t0, 1u with two elements.

Proposition

The power set PpN0q and the set 2N0 are equipotent,

|2N0| “ |PpN0q|.

23 / 26

Computable Functions

Choose a programming language L of your preference that

is expressive enough to compute functions.

We call a function f in 2N0 computable in L if and only

if there exists a program that for each input n P N0 will

compute f pnq.

24 / 26

Computability

Theorem

There exist functions in 2N0 that cannot be computed in L.

Proof.Let Ak denote the set of all programs in L that have k characters.Then Ak is a finite set. The set of all programs that can beexpressed in L is given

Ť

S , where S “ tAk |P N0u. The setŤ

S iscountable.By contrast, the set 2N0 of characteristic functions is not countable,since |2N0| “ |PpN0q| ą |N0| by the previous Corollary.

25 / 26

Conclusion

Remarkable FactWe cannot compute most functions of the type

N0 Ñ t0, 1u.

26 / 26