2.3 Computable Functions Flashcards

1
Q

A function f: N → N is countable if?

A

There is a while program S such that:
⟨S,σ⟩⇒σ’
then
σ’(x) = f(n)

A function is computable if we can write a while program to compute it. We can construct computable functions from computable functions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Is a partial function computable?

A

Yes using if statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the Pigeon hole principle?

What does this mean for infinite sets?

A

If n items can be put into m containers with n > m then at least one container contains more than one item.

There is no injective function whose co-domain is smaller than its domain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you show there are uncountably many functions N → N ?

A

Assume countably many
If countable many, we can enumerate them.
So there is a bijection f(N → N) → N
Each function must be different from the others.
Construct a new function which is different from all the others and hence show our enumeration was incomplete.
Construct new function by adding one to the diagonal terms in the table above.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A predicate is decidable if?

A

There is a computable function N → N:
f(x) = 1 if P(x) holds
0 if P(x) doesn’t hold

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The total function f: N → N of predicate P is?

And the associated program in while is?

A

The characteristic function of P

A decision procedure for P

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A partial function P is partially decidable if?

A

There exists a computable partial function f: N → N:
f(x) = 1 if P(x) holds
0 if P(x) doesn’t hold

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The partial function f is the …. of P and the associated program in while the ……. for P

A

Partial characteristic function

Partial decision procedure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A model of computation if universal if?

A

It can model itself. We can write a program in the language that can simulate all other programs that can be written in the language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do we define a universal program?

A

Encode programs as numbers. Take that as input and use γ^(-1) to lookup the relevant program and run it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Suppose that program S is the value of y^(-1)(i), define the function associated with the ith program

A

n_i(k) = σ’ (x) if ⟨S,σ[x↦k]⟩ ⇒σ’

undefined otherwise

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The universal program computes?

A

The universal function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the church Turing thesis?

A

All reasonable models of computing are the same: if a function is computable then we can write a program in any language to compute it.

We can simulate all while programs using a single while program
We can simulate all java programs using a single java program
We can simulate all while programs using a java program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly