Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Math 15 – Discrete Structures – §3.1 – Homework 8 Solutions 0 1 3.1#6: Consider the recurrence relation if if 0 0 Use the recurrence relation to compute 1 0 1 0 1 1 2 1 2 1 2 1 3 2 3 1 3 2 4 3 4 4 4 0 This raises the obvious question: Is there a closed form formula? Maybe, maybe not… 3.1#13: Circles can be packed into the shape of an equilateral triangle. Let be the number of circles needed to form a triangle with n circles on each edge. Experimenting with coins we see that 2 3 and 3 6. Write a recurrence relation for . 1 if 1 ANS: These are the triangle numbers: 1 2 3 ⋯ 1 if 1 3.1#14: Let terms of 1 if 1 6 6 if 1 and explain your reasoning. 1 and 1 1 1 if if 1 . Write 1 in ANS: the number of circles needed form a hexagon with n circles at each edge. Each hexagon can be seen as 6 overlapping triangles with n circles on each edge. Each triangle has circles, so 6⋅ 6 1 6 1 6 1 6 1 1 This accounts for 6 triangles overlapping on an edge containing n circle and then adding back in the center circle which is on each of the overlapping. Alternatively, think of 6 copies of 1 fit around a single center circle. This situation is illustrated at right for n = 3. You see six groups of T(2) = 3 circles grouped around a center circle. 3.1#20: Give a recurrence relation that describes the sequence 3, 6, 12, 24, 48, 96, 192, … 3, 1 ANS: 2 1 , 1 3.1#22: Let : → be any function on the natural numbers. The sum of the first n values of sigma notation as ∑ 1 2 ⋯ . (a) Write 1 2 ⋯ in sigma notation: ANS: ∑ (b) Give a recurrence relation for ∑ ANS: 1 , 1 1 , is written in 1 3.1#25: Suppose we model the spread of a virus in a certain population as follows: on day 1, one person is infected. On each subsequent day, each infected person gives the cold to two others. (a) Write down a recurrence relation for this model. 1 if 1 ANS: 3⋅ 1 1 (b) What are some of the limitations of this model? How does it fail to be realistic? ANS: No one ever recovers, the population is unlimited and no one ever dies. 3.1#26: Let X be a set with n elements. Let ⊆ be the set of all subsets of X with an even number of | | and | |. elements and ⊆ be the subsets of X with an odd number of elements. Let (a) Find a recurrence relation for E(n) in terms of O(n – 1) and E(n – 1). ANS: To get a feeling for this, look at a set X1 = {1} with one element. Then , . So and , 1, 2, so | | | | 1. Now consider X2 = {1,2}. Here and and , 1 , 2 so | | | | 2. One more? Ok, let X3 = {1,2,3}. Then , 1 , 2 , 3 , 1,2 , 1,3 , 2,3 , has 8 elements and , 1,2 , 1,3 , 2,3 while 1 if 1 . Evidently, we can recursively define since, all the 1, 2, 3, 1 0 1 if 1 elements of E with Xn – 1 are also elements of E with Xn and to every element of O for Xn – 1 we can add the new element of Xn and thereby get an element of E for Xn which was not one of those in E for Xn – 1. (b) Find a recurrence relation for O(n) in termes of O(n – 1) and E(n – 1). 1 if 1 ANS: A very similar argement for that above shows that 1 0 1 if 1 | 2 it is easy to see that | | | | 2 . (c) Since |