15.08.2013 Views

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Definition 274 Given a cost c let Λ(e) be the length of e considering variables as single<br />

characters. We define<br />

Lemma 275 σ(n) ≤ 5n for n > 0.<br />

Proof: by induction on n<br />

P.1.1 base case:<br />

σ(c) := max({Λ(e) | e ∈ Ebool ∧ (C(e) ≤ c)})<br />

The cost 1 expressions are of the form (v◦w) and (−v), where v and w are variables. So the<br />

length is at most 5.<br />

P.1.2 step case:<br />

σ(n) = Λ((e1◦e2)) = Λ(e1) + Λ(e2) + 3, where C(e1) + C(e2) ≤ n − 1.<br />

so σ(n) ≤ σ(i) + σ(j) + 3 ≤ 5 · C(e1) + 5 · C(e2) + 3 ≤ 5 · n − 1 + 5 = 5n<br />

Corollary 276 max({Λ(e) | e ∈ En}) ≤ 5 · κ(n)<br />

c○: Michael Kohlhase 152<br />

An Upper Bound For κ(n)-cost Expressions<br />

Idea: e ∈ En has at most n variables by definition.<br />

Let An := {x1, . . ., xn, 0, 1, ∗, +, −, (, )}, then #(An) = n + 7<br />

Corollary 277 En ⊆ 5κ(n)<br />

i=0 An i and #(En) ≤ n+75κ(n)+1 −1<br />

n+7<br />

Proof Sketch: Note that the Aj are disjoint for distinct n, so<br />

⎛<br />

5κ(n) <br />

#( ⎝ An i<br />

⎞<br />

5κ(n) <br />

⎠) = #(An i 5κ(n) <br />

) = #(An i 5κ(n) <br />

) = n + 7 i = n + 75κ(n)+1 − 1<br />

n + 7<br />

i=0<br />

Solving for κ(n)<br />

n+75κ(n)+1 −1<br />

n+7<br />

≥ 2 2n<br />

n + 7 5κ(n)+1 ≥ 2 2n<br />

i=0<br />

i=0<br />

i=0<br />

c○: Michael Kohlhase 153<br />

(as n + 75κ(n)+1 ≥ n+75κ(n)+1−1 n+7 )<br />

5κ(n) + 1 · log 2(n + 7) ≥ 2 n (as log a(x) = log b(x) · log a(b))<br />

5κ(n) + 1 ≥<br />

κ(n) ≥ 1/5 ·<br />

2 n<br />

log 2 (n+7)<br />

κ(n) ∈ Ω( 2 n<br />

log 2 (n) )<br />

2 n<br />

log2 (n+7) − 1<br />

c○: Michael Kohlhase 154<br />

81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!