Week 5, 6 and 7 - Turing Machines Flashcards

1
Q

What is a Turing machine made up of?

A

An infinite tape split into cells. A head positioned above a single cell, that can read and write symbols on the tape and can move along the tape in either direction. The head contains a finite number of states.

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

What 2 finite sets must a Turing machine have?

A

The tape alphabet including a blank character.

The set of possible return values

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

What is a macro?

A

A single instruction that abbreviates a whole program.

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

How do you replace a macro with the full program?

A

Anything that points to the macro, will now point to the initial state of the expanded program. Each return instruction is replaced by a no-op that leads to appropriate state the abbreviated state pointed to.

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

What are auxiliary characters?

A

Characters not in the input alphabet and the program must guarantee none will appear in the tape after the execution finishes.

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

For a multitape Turing machine what must be true about the auxiliary tape?

A

It must start and finish blank.

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

What is the complexity class P?

A

The set of all languages where there is a Turing machine that can decide if a given word is in the language or not in polynomial time.

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

What is the complexity class NP?

A

The set of all languages where there is a non-deterministic Turing machine that can decide if a given word is in the language or not in polynomial time.

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

Why is complexity class P a subset of complexity NP?

A

Since all Turing machines are also non-deterministic Turing machines, it means all Turing machines are NDTM that run in polynomial time, therefore are an element in both P and NP.

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