AMS301-Homework 7 Solutions

Embed Size (px)

Citation preview

  • 8/22/2019 AMS301-Homework 7 Solutions

    1/2

    AMS 301 - Homework 7 Solutions

    7.1.12

    Recall that this is very similar to the lines in the plane problem of example 3. If every circleintersects every other circle in exactly two (unique) places, then we note that each circle hasexactly 2(n 1) crossing points on its circumference. Each crossing point is a sign that the circlehas crossed into a new region, and therefore has split the old region into 2. Therefore, if we imaginethe circles being added one at a time, the last circle splits 2(n 1) regions into 2, and causesan = an1 + 2(n 1) regions total. The initial condition for the circle problem is a0 = 1, the sameas with the lines.

    7.1.13

    First place the k parallel lines. These lines split the plane into k +1 pieces. This gives us our initialcondition ak = k + 1. Now add the remaining intersecting lines and note the number of regionssplit by the last one. The last line intersects all n of the preceding lines, and so it has n1 crossingpoints. n 1 crossing points cut a line into n pieces, and each piece cuts an old region into 2.Therefore, the recurrence relation is an = an1 + n, for ak = k + 1.

    To find the number of regions for n = 9 and k = 3, we solve the recursion, to get an,k =n(n+1)

    2 (k2)(k+1)2 . That means that a9,3 = 9(10)2 1(4)2 = 45 2 = 43. Equivalently, a9,3 =9 + 8 + 7 + 6 + 5 + 4 + 4 = 43.

    7.1.47

    The key observation for this problem is the triangle inequality. That is if a + b + c = n witha b c, then (a,b,c) specifies a realizable integral-sided triangle whose perimeter is n if and onlyif a + b > c.

    We can note the first few small examples. Since 3 is the smallest possible perimeter, an = 0 forn < 3. We see that (1, 1, 1) implies that a3 = 1. a4 = 0, as a triangle with perimeter 4 can have atmost one side of length 2 and 1 + 1 > 2. a5 = 1, with (1, 2, 2), a6 = 1 with (2, 2, 2), a7 = 2 with(1, 3, 3) and (2, 2, 3), and a8 = 1 with (2, 3, 3).

    Observe that the triangle with perimeter 3, (1, 1, 1), is related to the triangle with perimeter6, (2, 2, 2), and the triangle with perimeter 5, (1, 2, 2) is related to the triangle with perimeter 8,(2, 3, 3). This observation allows us to note that if a,b,c is a realizable triangle with perimeter n,

    then (a

    + 1, b

    + 1, c

    + 1) is a realizable triangle with perimetern

    + 3. This is because we have(a + 1) + (b + 1) + (c + 1) = n + 3 and (a + 1) + (b + 1) = a + b + 2 > c + 1, which follows froma + b > c.

    This divides the triangles into 2 groups, those that can be realized in that way, with ( a 1) +(b1) > (c1), and those that cannot, with (a1)+(b1) = (c1). That means that an an3and the difference between the two is exactly the number of triangles that cannot be realized assmaller triangles with extended edges, that is the (a,b,c) with a + b = c + 1.

    Now we use the hint and split into even and odd cases to look for the triangles (a,b,c) witha + b = c + 1.

    If n is even, then we have that a + b + c = n is even. If we look at it as (a + b) + c = n, we seethat (a + b) and c must sum to an even number. That means both must be even, or both must be

    odd. But we have that (a + b) = c + 1, meaning (a + b) and c cannot have the same parity. Thiscontradiction implies that there are no triangles of the second type if n is even, so an = an3 foreven n.

    1

  • 8/22/2019 AMS301-Homework 7 Solutions

    2/2

    If n is odd, then we have that a + b + c = n is an odd number, and one of (a + b) and c must

    be even and the other odd. Since we know that for the second type of triangle,a

    +b

    =c

    + 1, thatmeans there are triangles of the second type if n is odd and an > an3 for odd n 3. Now lookat the two equations. a + b + c = n and a + b = c + 1, solving the second for c and plugging intothe first, we get a + b + (a + b 1) = n implying that a + b = n+12 . Since a b, we have that2a a + b = n+12 and so a n+14 . That is, the smallest side in a triangle of the second type isat most n+14 . Since a must be an integer, we round

    n+14 down, using the greatest integer function

    x. That is 1 a n+14 . Note that once a is fixed, there is exactly one solution for b and c tomake a + b + c = n and a + b = c + 1. That means there are exactly n+14 triangles of the secondtype if n is odd and greater or equal to 3.

    Putting it all together, we have that an = an3 if n is even and an = an3 + n+14 if n is odd.If youre interested, this recursion solves exactly to n

    2

    48 rounded to the nearest integer if n is even

    and (n+3)2

    48 rounded to the nearest integer if n is odd.

    7.2.1

    a. an = 2an/2 + 5 solves to An 5.b. an = 2an/4 + n solves to A

    n + 2n.

    c. an = an/2 + 2n 1 solves to A + 4n log2 n.d. an = 3an/3 + 4 solves to An 2.

    e. an = 16an/2

    + 5n solves to An4

    5n

    7.

    f. an = 4an/2 + 3n solves to An2 3n.

    7.2.3

    Note that the organization of this problem gives a 10-ary tree. For simplicity we can assume n isa power of 10. (Remember n is the number of leaves, not the number of vertices. This impliesthat the number of people working at the company is a number of the form 111 . . . 111, known asa repunit.)

    a. We see that if we remove the top level (the root of the tree) of the managerial tree with heighth, the tree breaks into 10 subtrees, each with height h

    1 and n

    10leaves. That means the

    recurrence for the number of managerial levels is an = an/10+1. This solves to an = log10 n,which is exactly the formula we noted for complete m-ary trees in Chapter 3.

    b. Using the same divide-and-conquer approach from part (a), we remove the root and note 10identical subtrees one-tenth of the size of the original. That means that the recurrence forthe number of managers (not counting salespeople) is an = 10an/10 + 1 with a10 = 1. This

    solves to an =n19 , which is a repunit when n = 10

    k.

    2