l3 (2)

# l3 (2) - Advanced Algorithms Lecture Outline Example Prove...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Advanced Algorithms Lecture Outline January 10, 2011 Example. Prove that parenleftbigg n parenrightbigg parenleftbigg n 1 parenrightbigg + parenleftbigg n 2 parenrightbigg ... + ( 1) n parenleftbigg n n parenrightbigg = 0 Solution. One way to solve this problem is by substituting x = 1 in the previous example. When x = 1 the above equation becomes n = 0 = n summationdisplay k =0 parenleftbigg n k parenrightbigg ( 1) k . A combinatorial argument however will give us more insight into what the expression means. We now present a combinatorial proof of the claim. We want to prove that parenleftbigg n parenrightbigg + parenleftbigg n 2 parenrightbigg + parenleftbigg n 4 parenrightbigg + ... = parenleftbigg n 1 parenrightbigg + parenleftbigg n 3 parenrightbigg + parenleftbigg n 5 parenrightbigg + ... Consider a set X = { x 1 ,x 2 ,x 3 ,... ,x n } . We want to show that the total number of subsets of X that have even size equals the total number of subsets of X that have odd size. We will now show that both these quantities equal 2 n 1 from which the claim follows. An even-sized subset of X can be constructed as follows. Step 1. Decide whether x 1 belongs to the subset of not. Step 2. Decide whether x 2 belongs to the subset of not. . . . Step n . Decide whether x n belongs to the subset of not. Note that there are 2 choices for each of the first n 1 steps but exactly one choice for performing step n . This is because if we have choose an even number of elements from X \ { x n } then we must leave out x n otherwise we must include x n in the subset. Hence using the multiplication rule the total number of even-sized subsets of X equals 2 n 1 . Since we know that the total number of subsets of X is 2 n , the total number of odd-sized subsets of X is 2 n 2 n 1 = 2 n 1 . Before we move on to the next topic we will prove a couple of identities using counting techniques. Specifically, we will use the following technique. To prove an identity we will pose a counting question. We will then answer the question in two ways, one answer will correspond to LHS and the other would correspond to the RHS. Example. Prove that n k =0 ( n k ) = 2 n . 2 Lecture Outline January 10, 2011 Solution. We pose the following counting question. Given a set S of n distinct elements how many subsets are there of the set S ? From an earlier lecture we know that the answer is 2 n . This gives us the RHS. Another way to compute the answer to the question is as follows. The set P ( S ) of all possible subsets can be partitioned into S ,S 1 ,... ,S n , where S i , 0 i n , is the set of all subsets of S that have cardinality i . Thus | P ( S ) | = | S | + | S 1 | + ... + | S n | = parenleftbigg n parenrightbigg + parenleftbigg n 1 parenrightbigg + ... + parenleftbigg n n parenrightbigg = n summationdisplay k =0 parenleftbigg n k parenrightbigg = LHS This proves the claim....
View Full Document

{[ snackBarMessage ]}

### Page1 / 11

l3 (2) - Advanced Algorithms Lecture Outline Example Prove...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online