# pset1_sol - CS103X Discrete Structures Homework Assignment...

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: CS103X: Discrete Structures Homework Assignment 1: Solutions Due January 25, 2008 Exercise 1 (10 Points). Prove or give a counterexample for each of the following: (a) If A ⊆ B and B ⊆ C , then A ⊆ C . (b) If A ∈ B and B ∈ C , then A ∈ C . Solution: (a) Consider any element a ∈ A . Since A ⊆ B every element of A is also an element of B , so a ∈ B . By same reasoning, a ∈ C since B ⊆ C . Thus every element of A is an element of C , so A ⊆ C . (b) Let A = { 1 } ,B = { 1 , { 1 }} , and C = {{ 1 , { 1 }} , 3 , { 4 }} . These sets satisfy A ∈ B and B ∈ C , but A / ∈ C . Exercise 2 (10 Points). If a ( t ), b ( t ), and c ( t ) are the lengths of the three sides of a triangle t in non-decreasing order (i.e. a ( t ) ≤ b ( t ) ≤ c ( t )), we define the sets: • X := { Triangle t : a ( t ) = b ( t ) } • Y := { Triangle t : b ( t ) = c ( t ) } • T := the set of all triangles Using only set operations on these three sets, define: (a) The set of all equilateral triangles (all sides equal) (b) The set of all isosceles triangles (at least two sides equal) (c) The set of all scalene triangles (no two sides equal) Solution: (a) We require a ( t ) = b ( t ) and b ( t ) = c ( t ) (this obiviously implies a ( t ) = c ( t )), so the set is X ∩ Y (b) An isoceles triangle t can have 1. a ( t ) = b ( t ), or 2. b ( t ) = c ( t ), or 3. a ( t ) = c ( t ). 1 Now we have assumed that a ( t ) ,b ( t ), and c ( t ) are in non-decreasing order, so the last condition holds if and only if both the first two do. So the required set is X ∪ Y . (c) A scalene triangle has its two smaller sides a ( t ) and b ( t ) unequal (set T \ X ) and its two larger sides b ( t ) and c ( t ) unequal (set T \ Y ). Since the sides are listed in the non-decreasing order, either of the above conditions guarantess a ( t ) 6 = c ( t ). So the required set is ( T \ X ) ∩ ( T \ Y ). An alternative argument is: A triangle is scalene if and only if it is not isosceles. So using the result of the previous part, the set of scalene triangles is T \ ( X ∪ Y ). It’s easy to confirm that the answers given by the two arguments are actually the same - this is an instance of a general rule called De Morgan’s Law. Exercise 3 (10 Points) The Fibonacci sequence is defined as follows: a 1 = 1 a 2 = 1 a n = a n- 1 + a n- 2 for all n ≥ 3 Prove that a n = ( 1+ √ 5 2 ) n- ( 1- √ 5 2 ) n √ 5 Solution: The proof proceeds by strong induction. Let P ( n ) denote the hypothesis that a n = ( 1+ √ 5 2 ) n- ( 1- √ 5 2 ) n √ 5 . For n = 1 , a 1 = ( 1+ √ 5 2 )- ( 1- √ 5 2 ) √ 5 = √ 5 √ 5 = 1. Thus, P (1) is true. Similarily, P (2) is true since a 2 = 1. Now we assume that the claim holds for all integers between 1 and n ( n ≥ 3). We need to show that P ( n + 1) is true to complete the proof....
View Full Document

{[ snackBarMessage ]}

### Page1 / 9

pset1_sol - CS103X Discrete Structures Homework Assignment...

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

View Full Document
Ask a homework question - tutors are online