Docsity

Computability - Automata and Complexity Theory - Lecture Slides, Slides of Theory of Automata

Partial preview of the text

Download Computability - Automata and Complexity Theory - Lecture Slides and more Slides Theory of Automata in PDF only on Docsity!

Chapter Seventeen:

Computability

Computability is the mysterious border of our realm. Within the

border is our neatly ordered kingdom, occupied by solvable problems.

These problems range from the trivially simple to the hideously

complicated, but all are algorithmically solvable given unbounded

time and resources. The shape of this border was first clearly

perceived in the 1930s.

Turing Computability

  • Consider any total TM
  • Ignore final state, and consider final tape
  • Viewed this way, a total TM computes a

function with string input and string output

  • A function f : Σ* → Γ* is Turing-computable if

and only if there is some total TM M such that for all x ∈ Σ*, if M starts with x on the tape, M halts with f ( x ) on the tape

Bitwise and

• Like Java's x&y

• But allow arbitrarily long strings of bits

• First, assume "stacked" inputs:

• So, for example,

• The and function is Turing computable…

Σ = {^00 ,^01 ,^10 ,^11 }

and (^00 1110011110 ) = 010010

Outline

  • 17.1 Turing-Computable Functions
  • 17.2 TM Composition
  • 17.3 TM Arithmetic
  • 17.4 TM Random Access
  • 17.5 Functions And Languages
  • 17.6 The Church-Turing Thesis
  • 17.7 TM and Java Are Interconvertible
  • 17.8 Infinite Models, Finite Machines

The stacker function

  • Specifying stacked inputs made add very easy
  • What if the two inputs are linear: two plain binary

numbers with a separator between?

  • Simple: we first convert to stacked form
  • Define stacker to be the function that takes a string

with two binary inputs separated by #, and returns the

equivalent stacked form

  • For example,
  • (If one is shorter than the other, 0-extend it on the left)
  • This stacker function is Turing computable…

stacker ( 011011 # (^010110) ) = (^001110011110)

00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
0/ 00 ,L
1/ 10 ,L
B / B ,R
00 / 00 ,R
10 / 10 ,R
01 / 01 ,R
11 / 11 ,R
0/0,R
1/1,R
# /#,R
#/ B ,L
B / 01 ,R
0/ 01 ,R
1/ 11 ,R
B / 00 ,R
0/ 00 ,R
1/ 10 ,R
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
B / B ,L
0/0,L
1/1,L
0/0,L
1/1,L
1/ B ,L
0/ B ,L
B / B ,L
0/0,R
1/1,R
#/#,R

b

#/#,L
#/#,L

y (^) z

… B 1 0 # 1 0 1 B …

stacker (10#101)

00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
0/ 00 ,L
1/ 10 ,L
B / B ,R
00 / 00 ,R
10 / 10 ,R
01 / 01 ,R
11 / 11 ,R
0/0,R
1/1,R
# /#,R
#/ B ,L
B / 01 ,R
0/ 01 ,R
1/ 11 ,R
B / 00 ,R
0/ 00 ,R
1/ 10 ,R
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
B / B ,L
0/0,L
1/1,L
0/0,L
1/1,L
1/ B ,L
0/ B ,L
B / B ,L
0/0,R
1/1,R
#/#,R

b

#/#,L
#/#,L

y (^) z

… B 1 0 # 1 0 1 B …

stacker (10#101)

00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
0/ 00 ,L
1/ 10 ,L
B / B ,R
00 / 00 ,R
10 / 10 ,R
01 / 01 ,R
11 / 11 ,R
0/0,R
1/1,R
# /#,R
#/ B ,L
B / 01 ,R
0/ 01 ,R
1/ 11 ,R
B / 00 ,R
0/ 00 ,R
1/ 10 ,R
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
B / B ,L
0/0,L
1/1,L
0/0,L
1/1,L
1/ B ,L
0/ B ,L
B / B ,L
0/0,R
1/1,R
#/#,R

b

#/#,L
#/#,L

y (^) z

… B 1 0 # 1 0 1 B …

stacker (10#101)

00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
0/ 00 ,L
1/ 10 ,L
B / B ,R
00 / 00 ,R
10 / 10 ,R
01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/1,R
#/#,R

b

#/#,L
#/#,L

y (^) z

… B 1 0 # 1 0 1 B …

stacker (10#101)

00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
0/ 00 ,L
1/ 10 ,L
B / B ,R
00 / 00 ,R
10 / 10 ,R
01 / 01 ,R
11 / 11 ,R
0/0,R
1/1,R
# /#,R
#/ B ,L
B / 01 ,R
0/ 01 ,R
1/ 11 ,R
B / 00 ,R
0/ 00 ,R
1/ 10 ,R
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
B / B ,L
0/0,L
1/1,L
0/0,L
1/1,L
1/ B ,L
0/ B ,L
B / B ,L
0/0,R
1/1,R
#/#,R

b

#/#,L
#/#,L

y (^) z

… B 1 0 # 1 0 B B …

stacker (10#101)

00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
0/ 00 ,L
1/ 10 ,L
B / B ,R
00 / 00 ,R
10 / 10 ,R
01 / 01 ,R
11 / 11 ,R
0/0,R
1/1,R
# /#,R
#/ B ,L
B / 01 ,R
0/ 01 ,R
1/ 11 ,R
B / 00 ,R
0/ 00 ,R
1/ 10 ,R
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
00 / 00 ,L
10 / 10 ,L
01 / 01 ,L
11 / 11 ,L
B / B ,L
0/0,L
1/1,L
0/0,L
1/1,L
1/ B ,L
0/ B ,L
B / B ,L
0/0,R
1/1,R
#/#,R

b

#/#,L
#/#,L

y (^) z

… B 1 0 # 1 0 B B …

stacker (10#101)