Docsity

Models of Computation - Computability - Lecture Slide, Slides of Computer Science

Partial preview of the text

Download Models of Computation - Computability - Lecture Slide and more Slides Computer Science in PDF only on Docsity!

1

Universal Models of

Computation

2

Agenda

Universal Models of Computation

 Recursive vs. Recursively Enumerable

TM  NTM  k-tape TM  k-track TM

 TM, therefore, all universal

TM  Queue-machine

 Exercise on HW8. Queue-machine  TM

4

Recursive and

Recursively Enumerable

DEF: A language is recursively enumerable if it is recognized by some

Turing Machine. A language is

recursive if it is decided by some Turing

Machine.

The terminology “recursively enumerable”

comes from another TM model: a TM

which never halts (when describing an

infinite language) and writes one string

of the language at a time on an auxiliary

printer.

5

Recursive Enumerator

Example

For example, at some point, the print-out of a

recursive enumerator for pal might look like:

  1. (empty string)
  2. a
  3. b
  4. aa
  5. bb
  6. aba
  7. bab
  8. aaa
  9. bbb

7

Equivalence of

k-tape vs. 1-tape

The argument that k-tape TM’s are universal, is

fairly convincing. After all, the computers we

use daily split their memory into several

locations: RAM, Hard-Disc, Floppy, CD-ROM.

It is plausible that each memory unit could be

simulated by a separate tape. The following

theorem implies that the computer could still

function fully (though probably with a loss of

efficiency) if all the memory was merged onto

a single tape:

8

Equivalence of

k-tape vs. 1-tape

THM: Every k-tape TM can be simulated by a

1-tape TM, and vice versa.

Proof. It’s clear that every 1-tape TM can be simulated by a k-tape TM. Simply ignore tapes no. 2 through k. On the other hand, to show that any k-tape TM

can be simulated by a 1-tape TM, we’ll show

two parts:

A) Any k-tape TM can be simulated by a

2 k- track TM.

B) Any k-track TM can be simulated by a 1-

tape TM.

10

k-track TM’s

A k-track machine contains a tape whose

cells are broken into k vertical sub-cells.

As opposed to k-tape machines, there is

only one reading head

1

, but it may read

all k tracks and base its actions on these

values.

EG. A 2-tape machine:

vs. a 2-track machine:

$ 1 0 1 $ 1 0 1 1 $ 1 0 1 $ 1 0 1 $ 1 0 1 1 $ 1 0 1

11

2 k-tracks Simulating k-tapes

We can simulate any k-tape TM by a k-track TM

as follows:

Each tape of the k-tape TM is represented by

one track.

Each track representing a tape, is

underneath a track which consists of all

blanks, except for a single X which tells us

which cells of the k-tape TM are active: $ 1 0 1 $ 1 0 1 1 $ 1 0 1

X
X

13

2 k-tracks Simulating k-tapes

k-tape TM

transition

Corresponding

simulation

sequence:

Notable:

X
X

14

2 k-tracks Simulating k-tapes

k-tape TM

transition

Corresponding

simulation

sequence:

Notable:

X
X

16

2 k-tracks Simulating k-tapes

k-tape TM

transition

Corresponding

simulation

sequence:

Notable:

X
X

17

2 k-tracks Simulating k-tapes

k-tape TM

transition

Corresponding

simulation

sequence:

Notable:

X
X

19

2 k-tracks Simulating k-tapes

k-tape TM

transition

Corresponding

simulation

sequence:

Notable:

X
X

20

2 k-tracks Simulating k-tapes

k-tape TM

transition

Corresponding

simulation

sequence:

Notable:

st

head reads 1

passed all X’s!

X
X