• Keine Ergebnisse gefunden

two/three string tape:

N/A
N/A
Protected

Academic year: 2022

Aktie " two/three string tape:"

Copied!
6
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Complexity Theory

Programing Techniques

Use states to remember a symbol:

Take Q‘ := Q ∪ (Γ×Q);

similarly: remember k symbols, k∈N fixed (!)

two/three string tape:

Take Γ' := Γ ∪ (Γ×Γ×X) similarly: k-string tape

subroutine calls

y

b s

r x

a

1

1 0

0 1

1

1

0 0

1 0

1

TMs may be inconveient to program yet are capable of anything a digital computer can do – and that

even surprisingly fast

[Schönhage et.al. 1994]

(2)

Complexity Theory

Linear Speed-Up

Why big-Oh notation?

Theorem:

Let M be t(n)-time bounded DTM and k∈N. There exists a

(

t(n)/k+O(n²)

)-

time

bounded DTM 'simulating' M.

„Speedup by any constant factor...“

Proof (sketch): combine c consecutive tape cells into a single one: Γ→Γc ; then:

combine c original steps into a single one.

(3)

Complexity Theory

Resource: Space

Let M=(Q,Σ,Γ,δ) denote a DTM. The length |K| of a configuration K = α q β is defined as |α|+|β|

For w∈Σ* let SM(w) denote the number of tape cells M 'touches' on input w: SM(w):=max |Ki|, where K0,K1,… denotes the (sequence of)

configurations M attains on w;

possibly SM(w)=∞.

For n∈N let SM(n):=max{SM(w) | w∈Σ≤n}

denote the space M uses on inputs of length ≤n;

SM:N→N space consumption function

SM(n)O(

s

(n))

:

M is O(

s

(n))

-space bounded

DSPACE( s(n) ) := { L=L(M) for M

O( s(n) ) ―space bounded DTM}

(4)

Complexity Theory

Time versus Space

Focus often on running time; but:

„Time is unbounded, memory is not“

|w| ≤ S

M

(w) ≤ max {T

M

(w), |w| }

Exercise 5b: Any DTM M can be simulated by a DTM N such that T

N

(w) ≤ 2

O(SM(w))

Theorem [Hopcroft,Paul,Valiant’73]

:

M can be simulated by N where

S

N

(n) ≤ O ( T

M

(n)/log T

M

(n) )

(5)

Complexity Theory

2.3 Classes P and PSPACE Def: P P := 

k

DTIME (n

k

) PSPACE

PSPACE := 

k

DSPACE (n

k

)

1.Superpolynomial growth usually becomes impractical already for modest input sizes 2.whereas polynomial running times

are usually those tractable in practice.

3.

P P

is a robust class, arising also from k-tape DTMs, register machines or Java programmes So far only decision problems,

i.e. functions f:Σ*→{0,1}; later (Exercise 7):

Def: Computing functions ( FP FP )

f:Σ*Σ*

(6)

Complexity Theory

Preliminaries: Graphs and Coding

A directed graph G=(V,E) is a set V (elements called vertices) and E⊆V×V (set of edges)

G is undirected if (u,v)∈E ⇔ (v,u)∈E

Function c:E→ assigning weights to edges.

For input to a Turing machine:

Encode (G,c) as adjacency matrix AV×V A[u,v] := c(i,j) for (u,v)E,

A[u,v] := * for (u,v) ∉ E

Case directed G: only upper triangular matrix.

Let 〈G,c〉 denote this coding; |〈G,c〉| ≥ |V|

Referenzen

ÄHNLICHE DOKUMENTE

Option to perform FILE COMPARE. You must enter the word COMP in all capital letters. If you omit this, then a FILE RESTORE is performed. File Compare and File Restore have

During a file backup, if the tape software encounters a read file error (due to a physical disk error or for other reasons), the tape software will display an error message and

data electronics assembly-Consists of nine write amplifiers, nine peak de tection read amplifiers, data con- trol and data I/ O circuitry.. Optional densities

The purpose of the electrical laboratory is to allow you to make alignments of a functional tape transport.. You will use an exerciser identical to the one used by

installation of the tape streamer software, or when using the Tape Configuration utility. To examine the default parameters, use the Tape Configure File command. These

The text buffer is cleared, and the Editor reads ~ pages from tape, printing each one on a separate page, spac ing across page perforations automatica lIy.. The

This manual, together with referenced documents, provides operation and ma intenance infor- mation for the Te-59 Magnetic Tape Control Unit. The level of discussion

Place the main program in the reader, depress the tape feed switch to clear the end-of-tape flag, and type the command string.. If the loader is not satisfied