Unformatted text preview: If the root of T is a preﬁx, and the subtrees are T 1 and T 2 , then: C(T) = (C(T 1 ) + C(T 2 )) / 2 (as d i, T = d i, T 1 + 1 for i ∈ { j ∈ N C j ∈ T 1 } , d i, T = d i, T 2 + 1 for i ∈ { k ∈ N C k ∈ T 2 } and ( C i ∈ T) ⇒ ( C i ∈ T 1 ) ⊕ ( C i ∈ T 2 ) ). Then by structural induction on a ﬁnite tree T, C(T) ≤ 1. Case 1: The root of T is a codeword. Then C(T) = 1 Case 2: The root of T is an NCP. Then C(T) = 0 Case 3: The root of T is a preﬁx, and the subtrees are T 1 and T 2 . By the inductive hypothesis, C(T 1 ) ≤ 1 and C(T 2 ) ≤ 1. Therefore C(T) = (C(T 1 ) + C(T 2 )) / 2 ≤ 1. 2 Therefore: C(T) = X i ∈{ j ∈ N C j ∈ T } 1 2 d i, T ≤ 1 But for T C , { j ∈ N C j ∈ T C } = { 1 , 2 , . . . , N } and d i, T C = n i , so: X 1 ≤ i ≤ N 1 2 n i = C(T C ) ≤ 1 X i 1 2 n i ≤ 1 2...
View
Full Document
 Fall '09
 GuyBlelloch
 Algorithms, Inductive Reasoning, Trigraph, ∈N Cj ∈T

Click to edit the document details