This preview shows page 1. Sign up to view the full content.
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
This note was uploaded on 01/26/2010 for the course COMPUTER S 15853 taught by Professor Guyblelloch during the Fall '09 term at Carnegie Mellon.
 Fall '09
 GuyBlelloch
 Algorithms

Click to edit the document details