Texas A&M University - San Antonio Concrete Mathematics Concrete Mathematics: A Portfolio of Problems Author: Supervisor: Sean Zachary Prof. Donald Myers Roberson July 1, 2014 1 Chapter 1: Recurrent Problems Many problems in mathematics are recurrent problems, meaning that they are defined in terms of themselves. For example, one can find the greatest common divisor of two integers a and b by the following relation: gcd(a; a) = 1; gcd(a; b) = gcd(b; a mod b) Each successive step reduces the problem into a simpler case. Another recursive function is the factorial: a0 = 1; a1 = 1; an = nan−1 Solving these recurrences can be done in many ways. One may be able to deduce a closed form after finding a pattern in the first few terms. Another method is to unfold the recurrence by successively plugging in previous terms until the base case is reached. Other methods include using the characteristic polynomial for linear recurrences, or the use of generating functions for general recurrences. Generating functions will be examined in depth in Chapter 7 (see the section titled Generating Functions). In this section, we examine one well-known recurrent problem, known as the Josephus Problem. Ac- cording to legend, Flavius Josephus and a group of Jewish rebels were captured by Romans. The rebels formed a circle and killed every third person in the circle until all were dead. The main question of the Josephus problem is as follows: Suppose n people, numbered from 1 to n, stand in a circle. If every other person is killed, which person is the last to survive? To investigate this problem, suppose there are six people in the circle. The first person to die is numbered 2, then next is 4, followed by 6, 3, and 1. The person numbered 5 is the last one surviving. Let J(n) be the person left standing after all other n − 1 persons have killed themselves. We can then say J(6) = 5. Now, let us suppose that we have 2n people in this circle at the start. The first person to die is number 2, then 4, and every even-numbered person until the sword (or whatever object is used to commit suicide with) returns to person number 1. Now, only odd-numbered persons are left in the circle. This situation is similar to starting with n people, only this time their labels have been multiplied by 2 and had 1 subtracted. For example, person 5 would become person 9. So, a form for the survivor amongst an even-numbered group of people is J(2n) = 2J(n) − 1: Using the fact that J(6) = 5, we can deduce that J(12) = 2J(6) − 1 = 9. We can then conclude that J(24) = 17, and J(48) = 33: 1 But what if there are an odd number of people from the start, say, 2n + 1? Execution begins as normal, with persons 2; 4; 6; 8;:::; 2n dying in the first trip around the circle, but now the next to die after 2n is person 1. The people left in the circle are 3; 5; 7;:::; 2n + 1. This is similar to the case with n people, as before, but now numbers are increased by 1 after they are doubled, not decreased by 1. Again, we have a form for determining the survivor in a group of 2n + 1 people; that is, J(2n + 1) = 2J(n) + 1: For example, J(15) = 2J(7) + 1 = 2(2J(3) + 1) + 1 = 15. Combining the previous two general forms with the base case J(1) = 1, we have the following recursion: J(1) = 1; J(2n) = 2J(n) − 1; J(2n + 1) = 2J(n) + 1: For this recursion, it is sufficient to divide the number of people in the circle by 2 and round down to the nearest integer. Repeated application will give the survivor's number. What if we desire a closed-form solution? Such a solution is possible to construct. First, let us generate a short table of values of J(n). n J(n) 1 1 2 1 3 3 4 1 5 3 6 5 7 7 8 1 9 3 10 5 11 7 12 9 13 11 14 13 15 15 16 1 Notice that the table is blocked in certain areas. This sparks some curious thought. 2 First, let's see what happens to powers of two. Suppose k is an integer that is at least zero. Then what is J(2k)? For k = 0, we have J(1) = 1, and for k = 1, we have J(2) = 1 (from the table). Now, assume that, for all integers k up to j, that J(2j) = 1. Now, for k = j + 1, we have: J(2j+1) = 2J(2j) − 1 = 2(1) − 1 = 1 as needed. Hence J(2k) = 1, where k is an integer greater than or equal to zero. What's next to show? Let's try to see what happens between powers of two, say, from 8 to 16. We see that J(8) = 1;J(9) = 3;J(10) = 5; and J(11) = 7. What's happening? The value of the function increases by 2 as n increases by 1. But, we see that J(15) = 15, and J(16) = 1. So, something happens between n = 2j − 1 and n = 2j. Observe that 15 = 23 + 7, and 16 = 24. From the table, this is a transition between new blocks. But what happens at this transition? We see that 8 is the largest power of two that does not exceed 15. While 8 is not larger than 16, it is not the biggest power of two that is less than 16 (here, the desired number is 16). We almost see a pattern. Let l = n − 2j, where 2j = maxf2pj2p < ng. We conjecture that J(n) = 2l + 1. For n = 1, that is, 1 = 20 + 0, we have J(1) = 1, as needed. The case n = 2 is trivial, by the previous derivation, so we move to n = 3. Here, we write 3 = 21 + 1 and so J(3) = 2(1) + 1 = 3. Now assume this holds for every n = 2j, inducting on j. For the case j = q + 1, we must first consider even l. So, suppose l is even. Then J(2q+1 + l) = 2(J(2q + l=2)) − 1 = 2(2(l=2) + 1) − 1 = 2l + 1 as needed. Otherwise, when l is odd (say, l = 2p + 1), the induction step is as follows: J(2q+1 + 2p + 1) = 2J(2q + p) + 1 = 2(2p + 1) + 1 = 2(l − 1) + 3 = 2l + 1 From the first to the second line, we assumed that p was even. However, it can be shown that any even number can be divided by 2 a finite number of times to produce an odd number. So, for odd l, J(2q + l) = 2l + 1. 3 We combine this with the previous result to give a suitable closed form solution for the Josephus problem: J(n) = 2l + 1 where n = 2q + l, and l < 2q. 8. Solve the recurrence Q0 = α; Q1 = β; 1 + Qn−1 Qn = : Qn−2 Solution. The recurrence doesn't seem to have any recognizable pattern at first, so the best way to proceed is to start finding terms using the initial conditions. 1 + β Q = 2 α 1 + β 1 + Q = α 3 β 1 + α + β = αβ 1 + α + β 1 + αβ Q = 4 1 + β α 1 + α = β 1 + α 1 + β Q = 5 1 + α + β αβ = α But, note that Q5 = Q0. This suggests that for every n, Qn = Qn−5. This recurrence is linear, and it n n n−5 5 can be solved. To solve this recurrence, let r = Qn. Then we have r = r , or, equivalently, r = 1. 2π 2π Solving this equation in the complex numbers gives the solution r = cos 5 + i sin 5 . This value of r 2πi can actually be written as exp 5 . To account for the initial condition, it suffices to solve 2πi · 0 α = c exp ; 1 5 whose solution gives c1 = α. Hence, the solution to the recurrence is 2nπi Q = α exp : n 5 4 2 Chapter 2: Sums In mathematics, sums appear in almost every branch. For example, they appear in linear algebra when computing the (i; j) entry of a matrix product: n X cij = aikbkj k=1 where the sum is across k. Also, they appear in calculus and analysis when approximating a function with a polynomial: 1 X f (j)(a) T (x) = (x − a)j j! j=0 But how do sums really work? How can one manipulate a sum and get a closed form? There are many ways to view a sum. First, one can view a sum as a recurrence. Suppose, for the sake of Pn example, that Sn = j=0 aj, where the terms aj come from a sequence. Observe that the sum can also be written as the following recurrence: S0 = a0; Sn = Sn−1 + an: This recurrence says that each successive value of the sum depends on the previous terms. There are many well-known sums to keep in mind. Suppose one wishes to sum the first n integers in succession; that is, what is 1+2+3+:::+n? There are many ways to solve this problem. Perhaps one of the most well-known ways to find this sum is by adding a copy of the sum to itself. This technique is attributed to Gauss, and is told through a story.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages22 Page
-
File Size-