Numeration Systems. S. E. Payne General Numeration Systems 2. 3 Combinatorial Numeration Numeration with forbidden substrings 14

Size: px
Start display at page:

Download "Numeration Systems. S. E. Payne General Numeration Systems 2. 3 Combinatorial Numeration Numeration with forbidden substrings 14"

Transcription

1 Numeration Systems S. E. Payne 2010 Contents 1 General Numeration Systems 2 2 Greedy Representations 3 3 Combinatorial Numeration 13 4 Numeration with forbidden substrings 14 5 The dominant root of the recurrence relation 16 6 Initial conditions 17 7 Numeration system corresponding to an anti-lyndon word 19 8 The lazy expression Example Example The Non-anti-Lyndon case Fibonacci Nim Just for fun this time! 26 1

2 1 General Numeration Systems Let b be an integer greater than 1. It is well known that each positive integer N has a unique representation of the form N = b 0 + b 1 b + b 2 b b r b r, where 0 b i b 1, 0 i r. (1) The proof amounts to showing that the b r+1 distinct expressions of the form in Eq. 1 give b r+1 distinct numbers, and these numbers range from 0 up through b r+1 1. A second useful numeration system is the following. Define the Fibonacci numbers in the slightly uncommon way: F 0 = 1, F 1 = 2, and F n = F n 1 + F n 2. (This is uncommon because the usual sequence starts with two terms equal to 1.) If d r, d r 1,..., d 1, d 0 is a binary string of length r + 1, put N(d r d r 1 d 0 ) = d r F r + d r 1 F r d 1 F 1 + d 0 F 0. (2) This version of the Fibonacci sequence {F n } n=0 has the following properties. Theorem 1.1. Fibonacci Numbers (i) For 0 i < j Z, F i < F j, so {F n } n=0 is strictly increasing. (ii) 2 F 0 = F 1, but for n 1 we have 2 F n > F n+1. (iii) F n is the number of binary strings of length n not containing 11 as a substring. Proof. F 0 counts the empty string. F 1 counts the two strings 0, 1. In general for n 2, the number of strings of length n having no substring 11 is the number F n 2 of binary strings x 1 x n 2 01 having no substring 11, plus the number F n 1 of binary strings x 1 x n 1 0 having no substring 11. (iv) F n+1 1 is the largest integer N corresponding to a binary string of length at most n + 1 and not having 11 as a subword. 2

3 Proof. It is fairly easy to see that the largest integer corresponding to a binary string of length at most n + 1 that does not have 11 as a subword must have a binary string of the form It is easy to check that F 2 + F 0 = F 3 1 and F 3 + F 1 = F 4 1. Suppose that F 2(k 1) + F 2(k 2) + + F 0 = F 2k 1 1. Then F 2k + F 2(k 1) + + F 0 = F 2k + F 2k 1 1 = F 2k+1 1. It is similarly easy to show by induction that F 2k+1 + F 2k F 1 = F 2(k+1) 1 for k 1. This shows that F n+1 1 = F n + F n 2 + F n 4 + is the largest N corresponding to a binary string of length at most n+1 and not having 11 as a subword. (v) (Zeckendorf 1939) Each positive integer may be represented in a unique way as the sum of nonconsecutive Fibonacci numbers. Proof. Let N be any one of the F n+1 integers satisfying 0 N F n+1 1. If N = 0, N corresponds to the empty binary word, which does not have 11 as a subword. For N > 0, let m be the largest integer such that F m N, i.e., F m N < F m+1. Since 2F m F m 1 + F m = F m+1 > N, it follows that if kf m N, then k = 0 or k = 1. Then F m 1 > N F m. Now choose the largest m such that F m N F m, i.e., F m N < F m +1. We just showed that m m 2. Continuing in this fashion we see that each positive integer N has at least one representation as a sum of nonconsecutive Fibonacci numbers. On the other hand, there are exactly F n+1 1 positive integers less than F n+1, and exactly F n+1 1 nonzero binary sequences of length n + 1 not having a subword equal to 11. It follows that each integer has a unique representation as a sum of nonconsecutive Fibonacci numbers. 2 Greedy Representations In this section we present two results of Fraenkel [1]. To start, let 1 = u 0 < u 1 < u 2 < be a finite or infinite sequence of integers. Let N be any nonnegative integer, and suppose that u n is the largest number in the sequence not exceeding N (except that we let n = 0 if N = 0). Dividing N 3

4 by u n and iterating gives N = d n u n + r n, r n = d n 1 u n 1 + r n 1, r n 1 = d n 2 u n 2 + r n 2,. r i+1 = d i u i + r i,. 0 r n < u n 0 r n 1 < u n 1 0 r n 2 < u n 2. 0 r i < u i. Collecting terms we get r 2 = d 1 u 1 + r 1, 0 r 1 < u 1 r 1 = d 0 u 0. N = d n u n + d n 1 u n d 0 u 0 (d i 0, i 0). This is the greedy representation of N in the numeration system S = {u 0, u 1, u 2,...}. The process above shows that every nonnegative integer has a (unique greedy) representation in the system S. Note that r i+1 = d i u i + d i 1 u i d 0 u 0 < u i+1 (i 0). Conversely, if N = n i=0 d iu i, where d i u i + d i 1 u i d 0 u 0 < u i+1 (i 0), (3) then n i=0 d iu i is the unique greedy representation of N by S, as shown in the following theorem: Theorem 2.1. Let 1 = u 0 < u 1 < u 2 < be any finite or infinite sequence of integers. Each nonnegative integer N has precisely one representation in the system S = {u 0, u 1,...} of the form N = n i=0 d iu i, where the d i are nonnegative integers satisfying Eq. 3. Proof. It remains only to establish uniqueness. representations: Suppose that N has two N = c n u n + + c 0 u 0 = d n u n + d 0 u 0, 4

5 where the digits c j and d j are nonnegative integers and satisfy Eq. 3. Let i be the largest integer such that c i+1 d i+1, say c i+1 > d i+1 (and c j = d j for 0 j i). Then u i+1 (c i+1 d i+1 )u i+1 = (d i c i )u i + + (d 0 c 0 )u 0 d i u i + + d 0 u 0 < u i+1, an impossibility. The argument given above shows that each nonnegative integer N has at least one representation satisfying Eq. 3, hence the proof is complete. Note that Eq. 3 implies 0 d i < u i+1 u i (i 0). (4) Sometimes Eq. 4 implies Eq. 3, and sometimes it does not. When the u i are defined recursively, the situation depends on the length of the recurrence relation. If the recurrence relation contains only one term (viz., u n = b (n) u n 1 ), then Eq. 4 does imply Eq. 3. We see this as follows. Assume that Eq. 4 does hold. Then d 0 u 0 < b (1) u 0 = u 1, so Eq. 3 holds for i = 0. As an induction hypothesis assume that Eq. 4 holds for i = n 1. Then d n u n + d n 1 u n d 0 u 0 (b (n+1) 1)u n + d n 1 u n d 0 u 0 < (b (n+1) 1)u n + u n = b (n+1) u n = u n+1. Hence for many of the standard numeration systems (e.g., b-ary representations for b > 1) the condition in Eq. 4 is a necessary and sufficient condition for unique representation. But for systems in which the recurrence relation contains more than one term, Eq. 4 is only a necessary condition, not a sufficient one. This will become clear from the deeper theorem below. For m 1 let b 1 = b (n) 1 be a function of n, and b 2,..., b m be constant where b 1, b 2,..., b m are integers satisfying 1 b m b 2 b (n) 1. Let u m+1, u m+2,..., u 1 be fixed nonnegative integers (in case m > 1), and let u 0 = 1, u n = b (n) 1 u n 1 + b 2 u n b m u n m (n 1), (5) 5

6 be an increasing sequence of positive integers. Suppose that N = n j=0 d ju j is the unique (greedy) representation satisfying Eq. 3 of an integer N in the system S = {u 0, u 1,...}, where the u i are defined by Eq. 5. Recall that this implies that {u i } n=0 must also satisfy Eq. 4. If m = 1, then Eq. 4 implies d i < u i+1 /u i = b (i+1) 1 (i 0). If m > 1, then d i < (b (i+1) 1 u i + b 2 u i b m u i m+1 )/u i b i+1) 1 + (b (i) 1 u i 1 + b 2 u i b m u i m /u i = b (i+1) (i 1). = d i b (i+1) 1 (if i 1 and m > 1). By Eq. 4, d 0 < u 1, so that by putting n = 1 in Eq. 5 we have d 0 < b (1) 1 + m j=2 b ju 1 j when m > 1. We record this as follows: 0 d i < b (i+1) 1 ( if i 0 and m = 1); 0 d i b (i+1) 1 ( if i 1 and m > 1); 0 d 0 < b (1) 1 + m j=2 b ju 1 j (if m > 1). Note: The condition of Eq. 6 is necessary for uniqueness of the representation N in the system S, but it is not necessarily sufficient. Fraenkel[1] gives the following full explanation of the situation. Theorem 2.2. Let S = {u i } be a sequence of the form in Eq. 5. Each nonnegative integer N has precisely one representation in S of the form N = n i=0 d iu i where the digits d i are nonnegative integers satisfying the following (two-fold) condition: (i) Let k m 1. For any j satisfying 0 j m 2, if (6) (d k, d k 1,..., d k j+1 ) = (b (k+1) 1, b 2,..., b j ), (7) then d k j b j+1 ; and if Eq. 7 holds with j = m 1, then d k m+1 < b m. In case m = 1 and j = 0, this means 0 d k < b (k+1) 1 for k 0. (ii) Let 0 k < m 1. If Eq. 7 holds for some j satisfying 0 j k 1, then d k j b j+1 ; and if Eq. 7 holds with j = k, then d 0 < m i=k+1 b iu k+1 i. 6

7 Before starting into the proof of Theorem 2.2 we look at an example and then consider a little more carefully just what the theorem is saying. Example Consider the numeration system defined by m = 3, u 2 = 0, u 1 = u 0 = 1, u n = 3u n 1 + 2u n 2 + u n 3 (n 1). Thus b 1 = 3, b 2 = 2, b 3 = 1, and S = {1, 5, 18, 65, 236,...}. By Eq. 6 the digit bounds are 0 d i 3 for i 1, and 0 d 0 4. First consider subcondition (i). Let k m 1 = 2 and 0 j m 1 = 2. In fact j = 0 gives a vacuous condition. If j = 1 and k 2, then d k = b 1 = 3 implies d k 1 b 2 = 2. If j = m 1 = 2, then (d k, d k 1 ) = (b 1, b 2 ) = (3, 2) implies that d k 2 < b 3 = 1, so d k 2 = 0. Second, consider subcondition (ii). Suppose 0 k < m 1 = 2. If for some j with 0 j k 1 we have (d k, d k 1,..., d k j+1 ) = (b 1, b 2,..., b j ), then d k j b j+1. If (for j = k) we have (d k,..., d 1 ) = (b 1,..., b k ), then we have d 0 < m i=k+1 b iu k+1 i. The following cases turn up. (k, j) = (0, 0) : = d 0 < b 1 u 0 + b 2 u 1 + b 3 u 2 = 5, so d 0 4, nothing new. (k, j) = (1, 0). This is a vacuous case. (k, j) = (1, 1). Here (d 1 = b 1 = 3 implies d 0 < 3 i=2 b iu 2 i = b 2 u 0 + b 3 u 1 = 3, so d 0 2. So putting this together we have the following for this specific example: d k = 3 fork 1 = d k 1 2; (d k, d k 1 ) = (3, 2) for k 2 = d k 2 = 0. We practice writing some integers in the system S using representations satisfying the conditions of Theorem 2.2. Case 1. N = 18. Clearly we could write 18 = , i.e., = 33 S, but in this case d 1 = 3 would force d 0 < 3. Hence the correct representation is = 100 S. Case 2. N = 36. Clearly 200 S = 36 10, and this representation satisfies the conditions of Theorem 2.2. It is easy to see that we must have d 2 1 (since d 0 4 and d i 3 for i 1). Then d 2 = 1 quickly forces d 1 = d 0 = 3, but d 1 = 3 forces d 0 2. So 200 S is the only acceptable representation. Case 3. N = 65. If we try to get by using only u 0, u 1 and u 2, we are quickly lead to 65 = 321 S. But (d 2, d 1 ) = (3, 2) forces d 0 = 0. so the only acceptable representation is 1000 S. Case 4. N = 236. Clearly = S satisfies the conditions of Theorem 2.2. If we try to get by using only u 0, u 1, u 2 and u 3, using d 0 4 and d i 3 for i 1, we are quickly led to = 3210 S, but (d 3, d 2 ) = (3, 2) should force d 1 = 0. Hence S is the only acceptable representation. 7

8 Case 5. N = 235. Just using the conditions d 0 4 and d i 3 for i 1 we quickly see that d 3 = 3. So d 2 2. Clearly d 2 = 1 is too small for u 1 and u 0 to carry the rest of the weight. So d 2 = 2. Then (d 3, d 2 ) = (3, 2) implies d 1 = 0, leaving d 0 = 4. So the unique representation satisfying the condition of Theorem 2.2 is 235 = 3204 S. Note that the conditions (i) and (ii) of Theorem 2.2 are both concerned with blocks of consecutive digits. They differ only in the location of these blocks: in (i) the right-hand digit d k m+1 of a block of maximal size m is in some position k m Such a block may appear anywhere within the digit sequence. If it is shifted right until its rightmost digit goes beyond position 0, we get a truncated block: the right-hand digit of the truncated block (of smaller maximal size k + 1 < m) occupies position 0. This is the situation considered in (ii). Next we want to see that the condition of Eq. 6 is implied by the condition of the Theorem. For m = 1, the first part of (i) is empty and (ii) is empty. The second part of (i) must be interpreted to say that 0 d k < b (k+1) 1 for k 0, so that for m = 1 the condition of Theorem 2.2 is equivalent to Eq. 6. Now suppose that m > 1 and put j = 0 in the first part of (i). Eq. 7 holds vacuously and the conclusion must be interpreted to say d k b (k+1) 1 for k 1, i.e., the first inequality in eq. 6 holds. Put j = k = 0 in the second part of (ii). Then d 0 < m i=1 b iu 1 i. To motivate further the somewhat curious condition of Theorem 2.2, consider the violation of (i) in the special case when Eq. 7 holds for j = m 1 but d k m+1 b m. Then the integer M = k i=k m+1 d iu i has two representations: and M = b (k+1) 1 u k + k 1 i=k m+2 b k i+1 u i + d k m+1 u k m+1, M = u k+1 + (d k m+1 b m )u k m+1. The latter, which violates Eq. 3, follows from the former representation using the recurrence Eq. 5. (After Lemma 2.3 below, it may be seen that also the other violations of the condition of Theorem 2.2 boil down to the case of a sequence of digits sufficiently large, so that a number has an additional representation, violating Eq. 3, obtained by using the recurrence Eq. 5. Proof. (of Theorem 2.2) We start by showing that a representation satisfying the condition of the Theorem always exists. Let N be any nonnegative 8

9 integer and let N = n i=0 d iu i be its (greedy) representation (so Eqs. 3 and 4 hold). Suppose that (i) does not hold. First suppose that there is some j satisfying 1 j m 2 for which Eq. 7 holds (i.e., (d k, d k 1,..., d k j+1 ) = (b (k+1) 1, b 2,..., b j )) but d k j > b j+1 (so d k j b j = d k j u k j (b j+1 + 1)u k j ). Then k d i u i i=0 j+1 k d i u i b (k+1) 1 u k + b i u k+1 i + u k j i=k j i=2 i=2 j+1 = b (k+1) 1 u k + b i u k+1 i + b (k j) 1 u k j 1 + i=2 m b i u k j i j+1 m j 1 b (k+1) 1 u k + b i u k+1 i + b (k j) 1 u k j 1 + b i u k j i j+1 b (k+1) 1 u k + = b (k+1) 1 u k + i=2 b i u k+1 i + b j+2 u k j 1 + m b i u k+1 i = u k+1, i=2 i=2 i=2 m j 1 i=2 b j+1+i u k j i violating Eq. 3. Secondly, suppose that Eq. 7 holds with j = m 1 but d k m+1 b m. This means (d k, d k 1,..., d k (m 2) ) = (b (k+1) 1, b 2,..., b m 1 ) and d k m+1 b m. Hence we have k d i u i = i=0 m 2 j=0 d k j u k j + k j=m 1 d k j u k j m 2 = b (k+1) 1 u k + b j+1 u k j + d k m+1 u k m+1 + j=1 m 2 b (k+1) 1 u k + b j+1 u k j + b m u k m+1 = b (k+1) 1 u k + j=1 m b j u k+1 j = u k+1. j=2 9 k d k j u k j j=m

10 Then k i=0 d iu i u k+1 contradicts Eq. 3, which must hold for the greedy representation. Note that with m = 1 and j = 0 this violation of (i) means d k u k b (k+1) 1 u k. But k 0 means u k > 0, so this means d k b (k+1) 1, contradicting the top row of Eq. 6. Now suppose that (ii) does not hold. First suppose that 0 k < m 1. Suppose there is a j satisfying 0 j k 1 for which d k j > b j+1, so d k j b j+1 + 1, and (d k, d k 1,..., d k j+1 ) = (b (k+1) 1, b 2,..., b j ). (Note that in this case 0 j k 1 m 3.) u k+1 > d k u k + + d k (j 1) u k (j 1) + d k j u k j + k j 1 i=0 d i u i b (k+1) 1 u k + + b j u k+1 j + b j+1 u k j + u k j = b (k+1) 1 u k + + b j+1 u k j + b (k j) 1 u k j b m (k j) u 2k 2j m + + b m u k j m b (k+1) 1 u k + + b j+1 u k j + b j+2 u k j 1 + b m u k+1 m = u k+1. Here we used b r b r+j+1. Finally, suppose that (ii) fails in the following way: Eq. 7 holds with j = k and d 0 m i=k+1 b iu k+1 i. So (d k, d k 1,..., d 1 ) = (b (k+1) 1, b 2,..., b k ). (Recall that u 0 = 1.)Then u k+1 > d k u k + + d 0 u 0 = b (k+1) 1 u k + b 2 u k b k u 1 + d 0 u 0 b (k+1) 1 u k + b k u 1 + b k+1 u b m u k+1 m = u k+1, an impossibility. At this point we have shown that the greedy algorithm always provides a representation of the desired kind. To show that there is only one such representation we first give a lemma which is interesting in its own right. Lemma 2.3. To start with let t be any nonnegative integer and write t+1 = qm + r with 0 r < m where m is the m of Theorem 2.2. (i) Consider the following representation of a nonnegative integer f(t) in 10

11 the system S of Eq. 5: f(t) = b (t+1) 1 u t + b 2 u t b m 1 u t+2 m + (b m 1)u t+1 m + b (t+1 m) 1 u t m + b 2 u t 1 m + b m 1 u t+2 2m + (b m 1)u t+1 2m + + b (t+1 qm) 1 u t (q 1)m + b 2 u t 1 (q 1)m + + b m 1 u t+2 qm + (b m 1)u t+1 qm + b (t+1 qm) 1 u t qm + b 2 u t 1 qm + + b r 1 u t+2 r qm + d 0 u 0, d 0 = b m 1 (if r = 0); d 0 = m r j=0 b r+ju j 1 (if r > 0). Then f(t) = u t+1 1. (ii) Let N 1 = n i=0 d iu i and N 2 = l i=0 c iu i + n i=l+1 d iu i, where c l < d l, for l any integer in [0, n], and the c i, d i are arbitrary digits satisfying the condition of Theorem 2.2. Then N 2 < N 1. Part (i) of the lemma states that f(t) is the analog of (t s) in the decimal system. Part (ii) states that if two representations differ in the lth position, being identical to the left of it, then the representation with the larger digit in position l corresponds to the larger number. This is, of course, trivial for the decimal system. In the present more general case, however, this result is not a priori clear. Suppose, for example, that (for m > 3) three consecutive digits of some representation of some number satisfy (d k, d k 1, d k 2 ) = (b (k+1) 1, b 2, b 3 ). By the condition of Theorem 2.2 these digits are maximal, in the sense that none of them can be replaced by a larger one without violating the condition. However, replacing, say, d k 1 = b 2 by b 2 1 enables replacing b k 2 = b 3 by b (k 1) 1, which may be considerably larger than b 3. Part (ii) of the Lemma states that such a replacement yields a smaller, not a larger number as might be expected. Proof. It is straightforward to verify the following two facts: (a) The representation of f(t) as given in (i) satisfies the condition of Theorem 2.2. (b) Increasing any digit of this representation while leaving the digits to its left unchanged results in a representation violating the condition of Theorem

12 For the proof of (i) note that Eq. 5 implies directly that f(t) = (u t+1 u t+1 m ) + (u t+1 m u t+1 2m ) + + (u t+1 (q 1)m u t+1 qm ) + (u t+1 qm 1) = u t+1 1. Next, we prove (ii) by induction on the digital position l. The result is clear for l = 0. Suppose that the result holds for any two representations satisfying the condition of theorem 2.2 whose leftmost differing digits are in some position l. We have to show that, given any representation N 1 = n i=0 d iu i, we have N 3 < N 1, where N 3 = n i=l+2 l+1 d i u i + g i u i, g l+1 < d i+1, i=0 and the representations of N 1 and N 3 satisfy the condition of Theorem 2.2. Subtracting, we get N 1 N 3 = (d l+1 g l+1 )u l+1 + l (d i g i )u i u i+1 i=0 l g i u i. i=0 Let g(l) = l i=0 g iu i. If the representatons of f(l) = l i=0 f iu i as given in (i) of the lemma (with t replaced by l) and g(l) disagree, then the leftmost disagreement occurs in position k for some k [0, l], that is, f k g k, but f i = g i for k < i l. Since the representation g(l) = l i=0 g iu i satisfies the condition of Theorem 2.2, fact (b) implies g k < f k. by our induction hypothesis we thus have g(l) f(l). Since by (i) f(l) = u l+1 1, we must have N 1 N 3 1; that is N 3 < N 1. We now resume the proof of Theorem 2.2. Let N = n k i u i be a representation satisfying the condition of Theorem 2.2. If the representations of f(n) and N are different, then fact (b) implies d k < f k for some k [0, n]. By (ii) and (i) of Lemma 2.3, we thus have N f(n) < u n+1, so inequality Eq. 3 is satisfied. Hence the representation n i=0 d iu i of N is unique by Theorem

13 3 Combinatorial Numeration Theorem 3.1. Fix a positive integer k. Then each nonnegative integer n has a unique representation of k terms of the form ( ) ( ) ( ) b1 b2 bk n = + + +, 1 2 k in which the combinatorial digits b i are subject to 0 b 1 < b 2 < b 3 < < b k. The combinatorial digits b i of n are found recursively as follows: b k is the greatest integer such that ( b k k ) n, b k 1 is the greatest integer such that ( b k 1) n ( bk k ),. b r is the greatest integer such that ( b r r ) n k j=r+1 ( bj j ),. b 1 is the greatest integer such that b 1 n k ( bj ) j=2 j. Proof. It should be clear that the greedy algorithm given above to define the b j does give n = ( b 1 1 ) + ( b2 2 ) + + ( bk k ), for some nonnegative values of the b j. It will take some work to show that 0 b 1 < b 2 < b 3 < < b k and that such a representation is unique. Recall the well-known identity n ( ) ( ) r + j r + n + 1 =. (8) j n j=0 Suppose for now that this has been shown and let ( ) ( ) ( ) b1 b2 bk n = k be the representation obtained by the greedy algorithm, and let ( ) ( ) ( ) a1 a2 ak n = k 13

14 be any other representation satisfying 0 a 1 < a 2 < < a k < b k. Clearly b k has the largest possible value in any such representation of n. Then ( ) a1 + 1 ( ) a ( ) ak k k ( ) ( ) ak (k j) ak + 1 = 1 < j k j=1 ( ) bk. k Here we used the equality in Eq. 8. This shows that if there is a representation satisfying the conditions of the theorem, it must be unique. We now just have to show that the greedy algorithm gives such a representation. So suppose that the greedy algorithm gives n = ( ) b1 1 + ( ) b ( ) bk. k This means that b k is the largest integer such that ( b k ) k n. Suppose that b k 1 b k. Then ( ) ( ) ( ) ( ) ( ) bk 1 bk bk bk bk + 1 n + + =, k 1 k k 1 k k which is a contradiction. The same argument works at each stage for b k 2 down to b 1, so that indeed 0 b 1 < b 2 < < b k as desired. The article [1] goes on to study several types of numeration systems and to hint at uses of them for solving a variety of problems. However, we now turn to a study of the results in [3]. 4 Numeration with forbidden substrings Let U = {u n } n 0 be an increasing sequence of natural numbers starting with u 0 = 1. Also, from now on we assume that U is defined by a linear recurrence of the form u n = m a l u n l + u n m, 0 a i Z, 1 i m. (9) l=1 So all the information about a sequence U is encoded in the word a = (a 1, a 2,..., a m ) = a 1 a 2... a m : the coefficients of the order m recurrence are 14

15 a 1, a 2,..., a m 1, a m + 1. Later we will give the appropriate initial terms for counting words with specific forbidden substrings. Without loss of generality we ignore the case in which a is periodic, i.e., there exists a non-empty word b and an exponent s > 1 for which a = b s. If a = b s, the recurrence defined by a is equivalent to that defined by b. Given a sequence as above, we may associate a natural number with each finite word in the alphabet N {0} as follows. Denote the word by w = (d k, d k 1,..., d 0 ) = d k d k 1... d 0. The number k i=0 d iu i corresponding, in this base, to the word w will be denoted by N(w). If d k 0, the word w is a called a U-representation, or simply a representation, for the number N = N(w). As a consequence, the number 0 is represented by the empty word ε. We shall use the words (sub)word and (sub)string interchangeably, and all our subwords will be contiguous, i.e., u is a subword of w only if there are possibly empty words a and b such that w = aub. We saw in Section 2 that the greedy algorithm gives a uniquely defined representation of N in the system U characterized by N = n d i u i with i=0 i d j u j < u i+1 (i 0). The greedy U-representation of N will be denoted by N U. j=0 A word a = (a 1, a 2,..., a m ) = a 1 a 2 a m is said to be anti-lyndon provided it is greater than each of its other cyclic shifts. So 312 and 3231 are anti-lyndon, but 2131 and 3131 are not. In addition to the usual lexicographic order on words (denoted by < ) we will use an order called LenLex denoted. Specifically, let v, w be words in an alphabet over which a total order < is defined which induces a lexicographic order on the words. Then w v if l(w) > l(v) or if l(w) = l(v) and w > v in the lexicographic order. Given a sequence U, we are interested in the set of (words that are) greedy U-representations for the natural numbers. This set is denoted L(U). Let a = a 1 a 2 a m be any given anti-lyndon word. Let F a denote the set of words of length at most m that are lexicographically greater than a. A word is called F a -free provided it contains no substrings belonging to F a, i.e., provided each of its substrings is lexicographically less than or equal to a. In practice we use as our alphabet the set {0, 1,..., a 1 }. For example, if the alphabet is A = {0, 1, 2, 3}, if a = 312, the F a -free words are the words not containing as substrings the strings 32, 33 and

16 The word w = a k a 1... a r (where a k is the word consisting of a = a 1... a m repeated k times) is the lexicographically largest F a -free word of its length. Indeed, w is F a -free and any lexicographically larger word of the same length has a prefix a h a 1... a s in common with w, followed by a digit b greater than a s+1 : so a 1... a s b is in F a. Recall that the greedy expressions of natural numbers in Fibonacci base are exactly the binary words beginning with 1 and with no 11 substring, that is, the F a -free words for a = 10 (and beginning with 1 ). Generalizing the fact that, conversely, the n-th Fibonacci number enumerates the binary words beginning with 1 without 11 of length up to n, or equivalently, the n-th Fibonacci number enumerates all the binary words without 11, regardless of their leftmost digit, of length exactly n, we shall see that for an important class of recurrences, the n-th term u n counts the F a -free words of length n. 5 The dominant root of the recurrence relation The sequences U = {u n } with which we are dealing arise from recurrences of the form u n = b 1 u n b m 1 u n m+1 + b m u n m with nonnegative coefficients. The characteristic polynomials of these recurrences are of the form p(x) = x m b 1 x m 1 b m 1 x b m with b i 0 and b m 0. Such polynomials are called nonnegative. (See Chapter 5 of [2] for these ideas and results.) A dominant root is a root of the characteristic polynomial having largest modulus. A useful result is given by the following. Theorem 5.1. Let u n = b 1 u n 1 + +b m 1 u n m+1 +b m u n m be a recurrence such that b 1 b i 0 for 2 i m, and b m 0. Let p(x) = x m b 1 x m 1 b m 1 x b m be its characteristic polynomial. Then p has a unique dominant root and this root lies in (b 1, b 1 + 1). Proof. We start by showing that p(b 1 ) < 0. p(b 1 ) = b m 1 b 1 b m 1 1 b m 1 b 1 b m, 16

17 where the first wo terms cancel out and the other ones are negative or zero. Next we show p(b This proof proceeds by induction on m. If m = 1, the p(x) = x b 1, so p(b 1 + 1) = (b 1 + 1) b 1 1. Suppose m > 1 the result is true for m 1. Keep in mind that b 1 b i for i > 1 both for the polynomial of degree m and the polynomial of degree m 1 in the inductive step. Then we may write p(b 1 + 1) = (b 1 + 1) m = (b 1 + 1) [ m 1 i=1 b i (b 1 + 1) m i b m (b 1 + 1) m 1 (b 1 + 1) b m 1. m 1 i=1 b i (b 1 + 1) m i 1 ] b m By the induction hypothesis we know that the expression in large brackets is greater than or equal to 1, so we have proved that for all p we have p(b 1 + 1) 1. Descartes rule of signs states in this case that p has at most one positive root, so p has a unique positive root β. In polynomials with coefficient signs as given here the unique positive root is dominant (see [2]), so β is a dominant root. (See the preprint [3] for further comments about the dominant root.) Call a polynomial primitive if the greatest common divisor of the indices of its non-zero coefficients is 1. In particular, this happens if b 1 > 0, so our p is primitive. If a nonnegative polynomial is primitive, then it has a unique root of largest modulus ([2], page 106), and it is real. This concludes the proof. 6 Initial conditions Let U be as described above and put L(U) equal to the set of greedy expressions N U. We have seen that L(U) is the set of words such that each suffix of length n is less than or equal to (in the lexicographic order) u n 1 U. For instance, for the Fibonacci sequence, the numbers in the form u n 1 (excluding 1-1) are 1, 2, 4, 7, 12, 20,... which have greedy representations 1, 10, 101, 1010, 10101, , respectively. Note that these words are of the form a k where a = 10, possibly truncated. So in this case, as noted earlier, we have the fact that when writing numbers in the Fibonacci base greedily, all binary words with no substring 11 appear. 17

18 If the recurrence is defined by the word a = a 1... a m, we choose initial conditions for the sequence U so that the word a k a 1... a r is a U-expression for u s 1, where s = km + r with 0 r < m, and r = 0 means that the word is just a k. It turns out that these are also the correct initial conditions for enumerative purposes. Lemma 6.1. Consider a sequence U = {u n } n 0 defined by a recurrence of degree m and used as a base for numeration. Take as initial conditions for the numbers u 0,..., u m 1 the following: u 0 = 1; u 1 = a 1 +1 = N(a 1 )+1; u 2 = N(a 1 a 2 )+1;... u m 1 = N(a 1 a 2... a m 1 )+1. Then for s 0, if s = km + r with 0 r < m, with the convention that when r = 0, the word a 1... a r denotes the empty word, we have N(a k a 1... a r ) = u s 1. (10) Proof. The proof is by induction on k. If k = 0, the result is given by the hypothesis. For k > 0, just note that m u s 1 = a i u s i + u s m 1, i=1 by the recurrence defining the sequence, and the induction hypothesis says So N(a k 1 a 1... a r ) = u s m 1. N(a k a 1... a r ) = N(a ) + N(a k 1 a 1... a r ) m = a i u s i + u s m 1 i=1 = u s 1, where in N(a00 0) exactly s m zeros appear. Hence we now have a U-representation for u s 1, namely a k a 1... a r, since N(a k a 1... a r ) = u s 1. But we need the greedy representation for u s 1. It turns out that the expression a k a 1... a r is indeed the greedy representation if (and only if) the word a is anti-lyndon. This choice of initial conditions is, in the present context, the only right one. When a is anti-lyndon, since u n will count the number of F a -free words, the sequence starts off as given in the following lemma. 18

19 Lemma 6.2. If a is anti-lyndon, then for 0 i m 1, the number of F a -free words of length i is N(a 1... a i ) + 1. Proof. The claim of the lemma is trivially true for i = 0. (Note that regardless of which word a is, the empty word ε is F a -free. Suppose we are constructing all F a -free words of a fixed length i > 0, going from the left to the right. If we choose as the leftmost letter any of the a 1 digits 0, 1,..., a 1 1, we may complete the word with any of the u i 1 F a -free words of length i 1 without the risk of obtaining an occurrence of an F a -subword. So for the moment we have a 1 u i 1 words. We have still to count those words beginning with a 1. If the second letter is any of the a 2 digits less than a 2, the word can be completed with any one of the u i 2 F a -free words of length of length i 2. Now we have a 2 u i 2 more words, getting a 1 u i 1 + a 2 u i 2 words so far. We go on in the same way, but successively fixing the first k digits of the words to be constructed in common with the first k digits of a. So we construct all the words of length i, obtaining a 1 u i 1 + a 2 u i a i 1 u 1 + (a i + 1)u 0 of them (since the rightmost digit of any digit from 0 to a i can appear). 7 Numeration system corresponding to an anti- Lyndon word Let a = a 1 a 2 a m be an anti-lyndon word. The number system U determined by a is described as follows. At this point we merely state what the initial conditions are, but the next couple results will justify this choice. u 0 = 1 u 1 = N(a 1 ) + 1 = a u 2 = N(a 1 a 2 ) + 1 = a 1 u 1 + a 2 u u m 2 = N(a 1 a 2... a m 2 ) + 1 = a 1 u m 3 + a 2 u m a m 2 u u m 1 = N(a 1... a m 1 ) + 1 = a 1 u m 2 + a 2 u m a m 1 u u n = m i=1 a iu n i + u n m for n m. Consider again the anti-lyndon word a = 312. The associated number system U has u 0 = 1; u 1 = a = 4; u 2 = N(a 1 a 2 ) + 1 = 14; u 3 = 19

20 N(a 1 a 2 a 3 ) + 1 = 49. Then u n = 3u n 1 + u n 2 + 2u n 3 + u n 3. In particular, u 4 = 173. Consider the map N that assigns to a string w the integer it corresponds to (i.e., represents) in a particular numeration system. We first note that it does not preserve order. For example, N(1100) = 63 and N(1033) = 64, but The first representation is greedy and F a -free, but the second is neither. (The greedy and F a -free representation of 64 is 1101.) On the other hand, the following lemmas shows that for F a -free words the order is preserved. Lemma 7.1. Let w and v be distinct F a -free words not beginning with zero. If w v, then N(w) > N(v). Proof. Let u, v begiven as described in the lemma. The proof is by induction on l = l(w). If l = 1, the result is obvious. So suppose that l > 1. First suppose that l = l(w) is greater than l(v). Consider the following chain of identities: N(w) N( ) (l 1 zeros) > N((a 1 a 2... a m ) k a 1... a r ) N(v), where l 1 = km + r and 0 r < m. The first inequality holds because we are actually removing some (positive) summands, while the second one follows from Lemma 6.1. The last inequality holds by induction because the words (1 1 a 2... a m ) k a 1... a l 1 mk and v have length less than l, and the hypotheses of the lemma are satisfied: both words are F a -free, and the fact that v is F a -free implies that v is smaller than or equal to (in the LenLex order) the word (a 1... a m ) k a 1... a l 1 mk ) (indeed either the former is shorter than the latter or is lexicographically smaller than or equal to it by the penultimate paragraph of Section 4). This concludes the proof in case l(w) > l(v). Suppose that both words have length l, say w = w l 1... w 0 and v = v l 1... v 0 with w l 1 v l1. Consider then the word w obtained by substituting w l 1 v l 1 for w l 1 in w and then by stripping it of the leading zeros. Define analogously v starting from v. Now N(w ) = N(w) v l 1 u l 1 and N(v ) = N(v) v l 1 u l 1, the new words are still F a -free and w v. If w l 1 > v l 1, the new words have different lengths, and we may apply the argument given for different-length words. If w l 1 = v l 1, then these new words both have length less than l, and we may apply induction. 20

21 This lemma implies that there is at most one F a -free representation of a given natural number, since different F a -free words represent different numbers. We can also use the last lemma to prove that the greedy expression of a number n is F a -free: the next lemma shows that an expression containing a subword in F a does not satisfy the greediness condition in Eq. 3. Lemma 7.2. Let N = k l=0 d lu l, and assume that in this expression for N, a word in F a appears starting in the s-th position. That is, for some index s k and for some number j 1 of digits we have a i = d s+1 i for i = 1, 2,..., j 1, while a j < d s j+1. Then s l=0 d lu l u s+1, so that the given expression for N is not greedy. Proof. The proof is by induction on s. The basis of the induction is given by the cases s = 0, 1,..., m 1, that is, when the subword in F a starts in one of the m rightmost digits. The base cases will be covered later. For the inductive step we shall consider the subword starting with d s and show that it represents a number greater than or equal to u s+1. Now, d s u s + d s 1 u s d 0 u 0 d s u s + d s 1 u s d s j+1 u s j+1 a 1 u s + a 2 u s a j u s j+1 + u s j+1 = a 1 u s + a 2 u s a j u s j+1 + a 1 u s j + a 2 u s j+1 + a m u s j a m u s j (m 1) + u s j (m 1), (11) where in the last step we have applied the recurrence to u s j+1. Consider now the word w = a 1 a 2... a m with s j (m 1) zeros after a m. This word corresponds to the terms a 1 u s j + + a m u s j (m 1). The word w is greater lexicographically than a j+1 a j+2... a m a 1... a j (same number of zeros as above; the sums in the indices are taken modulo m) by the anti-lyndon condition, so we may apply Lemma 7.1. Hence the last sum in Eq. 11 is greater than or equal to a 1 u s + a 2 u s a j u s j+1 + a j+1 u s j + + a m u s m+1 +a 1 u s m + + a j u s j (m 1) + u s j (m 1). We now carry out the actual inductive step, by applying the result with s m in place of s and taking, as new d i s : d s m = a 1, s s m 1 = a 2, 21

22 ..., d s m (j 2) = a j 1, d s j (m 1) = a j + 1, d s j m = 0,..., d 0 = 0. In this way we obtain the inequality a 1 u s m + + a j u s j (m 1) + u s j (m 1) u s m+1. Thus the last previously displayed sum is greater than or equal to a 1 u s + a 2 u s a j u s j+1 + a j+1 u s j + + a m u s m+1 + u s m+1, which is equal to u s+1, as claimed, completing the general inductive step. The basis of induction works similarly, but when we rewrite the first few terms of the sequence or compare numbers represented using them we must take into account the fact that the recurrence has not yet kicked in. More precisely, as u s j+1 is one of the first m terms, it is given by the definition of the starting terms rather than by the recurrence: a 1 u s j + a 2 u s j a s j+1 u And when we use the inequality derived by the anti-lyndon condition, it involves now a word shorter than the full a. Howevr, the anti- Lyndon condition automatically implies that a prefex of a is lexicographically greater than or equal to the same length prefix of each cyclic shift. We have now proved that each natural integer has an F a -free expression, the greedy one. The uniqueness was proved in Lemma 7.1. This completes a proof of the following theorem. Theorem 7.3. Let U be a sequence defined by the recurrence m u n = a l u n l + u n m l=1 with a = a 1... a m an anti-lyndon word and with the initial conditions u 0 = 1, u 1 = a 1 u = N(a 1 ) + 1, u 2 = a 1 u 1 + a 2 u = N(a 1 a 2 ) + 1,..., u m 1 = a 1 u m 2 + a 2 u m 3 + a m 1 u = N(a 1 a 2... a m 1 ) + 1. Then each positive integer n has a unique F a -free representation, which turns out to be the greedy one. Moreover, considering the set of F a -free strings not beginning by zero with the LenLex order, the nth string represents the number n. This theorem has an enumerative counterpart. Corollary 7.4. If a = a 1... a m is an anti-lyndon word and U = {u n } n 0 is the sequence as defined in Theorem 7.3, then the number of F a -free words of length k is u k. 22

23 Proof. The proof is straightforward from the theorem, keeping in mind that we are now counting all words (including those beginning by zero). Remark 7.5. Note that, while in the context of numeration systems we are generally only interested in words without leading zeros (which in this context would be non-significant digits), when we enumerate words with prescribed conditions, those are just ordinary words. But this is not a problem, since counting all F a -free words of a certain length k is equivalent to counting the F a words not beginning with zero of length at most k (just pad the latter ones with zeros). 8 The lazy expression When representing natural numbers in terms of a given sequence we may act lazily rather than greedily, taking the smallest expression for a given integer, and if the sequence is given by an anti-lyndon word, then it is easy to obtain a characterization for the strings appearing as lazy expressions for the natural numbers, much in the same way as shown above for greedy expressions. 8.1 Example The lazy representation of an integer using Fibonacci numbers turns out to be its (unique) expression as a sum of distinct Fibonacci numbers without ever skipping more than one in a row. In terms of binary strings, this corresponds to strings with no consecutive zeros. For instance, the lazy expression of 22 is while the greedy one is (still another expression is ). It is easily seen that there is a simple procedure to get the lazy expression of N, which basically dualizes the greedy one. We describe the procedure for the case studied earlier, i.e., for a recurrent sequence arising from an anti-lyndon word a = a 1... a m, thus using the alphabet {0,..., a 1 }. Perform the following steps to obtain the lazy expression for a natural number N: (i) Determine the smallest k such that the number N(a 1 a 1... a 1 ) (k digits) is greater than or equal to N; 23

24 (ii) Find the greedy expression b k 1... b 0 of the number N(a 1 a 1... a 1 ) N (padded on the left with zeros if its length is less than k); (iii) Subtract termwise the string b k 1... b 0 from a 1... a 1. The result is the lazy expression for N. 8.2 Example Consider once more the sequence arising from the word a = a 1 a 2 a 3 = 312. So u 0 = 1, u 1 = 4, u 2 = 14, u 3 = 49, u 4 = 173. We want to apply the above procedure to N = 100. Then N(3) = 3, N(33) = 15, N(333) = 57, N(3333) = 204. So the k we need is k = 4. The greedy expression of = 104 is Hence the lazy expression for 100 is = Check: 100 = When the word is anti-lyndon, we have seen that the strings obtained with the greedy procedure have a simple characterization in terms of forbidden substrings. From the procedure described above, it follows easily that the same is true in the lazy case. Here the forbidden strings are the complements to a 1 a 1... a 1. For instance, in the example just given, the forbidden subwords in the greedy case are 32, 33, 313. Therefore in the lazy case the strings are characterized by forbidding 01, 00, 020. Recalling that, for an anti-lyndon word a = a 1... a m, the set F a was defined to be the set of words of length at most m lexicographically greater than a, we define F a to be the set of words of length at most m which are lexicographically less than a = (a 1 a 2 )(a 1 a 2 )... (a 1 a m ). With this notation, the above can be summarized in the following theorem. Theorem 8.3. If a = a 1... a m is an anti-lyndon word and {u n } is the sequence determined by the word a, the set of words that are lazy expressions of natural numbers is the set of F a -free words in the alphabet {0, 1,..., a 1 }. Note that, while this theorem mirrors clearly the situation for greedy strings, there are other slightly less obvious parallels between the greedy and the lazy cases. When we write numbers greedily, it is immediate to find the least natural number expressed with a given number k of digits: it is simply u k, the k-th term of the sequence, whose greedy representation is given by 1 followed by k zeros. The largest k-digit expression, on the other hand, is less immediate, and is described in Lemma

25 For lazy expressions, on the other hand, it is immediate to write the lexicographically largest one with k digits, which is simply a 1 a 1... a 1, while the smallest one can be once more described in terms of repetitions of the word a. For instance, as the threes complement of 312 is 021, the least number with a given number of digits in the base defined by this word has the form The Non-anti-Lyndon case The gist of the previous results culminating with Theorem 7.3 is that, when the recurrence is defined by an anti-lyndon word a, the structure of the set L(U) of greedy expressions of natural numbers is encoded in the greedy expression a k a 1... a r of the terms of the form u n 1, where n = mk + r. Indeed, (recall the first paragraph of Section 6), the greedy expression for u n 1 characterizes completely L(U): if a is anti-lyndon, the greedy expression has this neat periodic form. This is no longer true when a is not anti-lyndon. If the word a defining a recurrence is not anti-lyndon, then a k a 1... a r is by Lemma 6.1 a representation of the number u n 1 but is not its greedy expression. For instance, if a = 3132, then the first terms of its sequence are 1, 4, 14, 50, 179,.... The word 3132 represents u 4 1 = 178, but the greedy representation of 178 is Lemma 9.1. Let a = a 1... a m be a non-anti-lyndon (non-periodic) word. Let i + 1 (with i + 1 > 1) be the starting index of the anti-lyndon shift of a, so a i+1 a i+2... a m a 1... a i is an anti-lyndon word). Let a i+1... a i+k be the prefix of the anti-lyndon shift such that a i+1 = a 1, a i+2 = a 2,..., a i+k 1 = a k 1, a i+k > a k. Then the word a 1... a i a i+1... a i+k number N(a 1... a i a i+1... a i+k ). is not the greedy representation of the Proof. It suffices to show that a i+1... a i+k is not greedy. We have a i+k a k + 1. Then N(a i+1... a i+k ) N(a 1... a k ) + 1, which is denoted greedily by (k zeros). So we obtain the following characterization. 25

26 Theorem 9.2. Let U be the sequence obtained with the recurrence induced by the word a and the usual initial conditions. Then one has u n 1 U = a k a 1... a r if and only if a is an anti-lyndon word. 10 Fibonacci Nim Just for fun this time! RULES FOR FIBONACCI NIM 1. Play starts with one pile of counters having at least 2 counters. The first player may remove any positive number of counters, but not the whole pile. Thereafter, each player must remove at least one counter and may remove at most twice the number of counters his opponent took on the previous move. 2. The player who removes the last counter wins. NOTE: If both players play perfectly, the first player can win if the number of counters in the initial pile is not a Fibonacci number. If it is a Fibonacci number, the second player can win. STRATEGY Let s say you are playing first and your opponent is named Nim. Here is how to always win using Fibonacci numbers: On the first move, leave Nim a Fibonacci number of coins, or Nim will leave you with a Fibonacci number of coins and force you to lose. If possible without losing, always leave Nim a Fibonacci number of coins. But don t take too many, or Nim will take the rest. Otherwise, count the number of coins remaining. (If the count is a Fibonacci number, Nim will win no matter what you do.) Write down the number of coins on the board as the SUM of nonconsecutive Fibonacci numbers. Find the smallest Fibonacci number in the sum. Remove that number of coins from the board. Repeat this process each time you play. For example, if it is your turn and 15 coins remain on the board, write 15 as the sum of Then remove 2 coins leaving 13. Nim can then only remove 1 to twice as many coins as you removed: that would be 1 to 4 coins. Suppose Nim removes 2 coins leaving 11. Write 11 as 8+3. Then remove 3 coins leaving 8. Nim can now remove 1 to 6 coins (2x3=6). Suppose Nim 26

27 removes 2 coins leaving 6. Write 6 as 5+1. Then remove 1 coin leaving 5. Nim can only remove 1 or 2 coins now. Suppose Nim removes 1 coin leaving 4. Write 4 as 3+1. Then take 1 coin leaving 3. If Nim takes 1 coin, you will take 2 coins and win! If Nim takes 2 coins, you will take the last coin and win! Using this strategy, you will always win if you leave Nim a number of coins equal to the sum of Fibonacci numbers. Remember also that every Fibonacci number is the sum of Fibonacci numbers. So, if possible leave Nim a Fibonacci number of coins. Just make sure Nim cannot take all the remaining coins. For a proof that the strategy given above really works, see the article by Holshouser, Reiter and Rudzinski, [4]. References [1] Aviezri S. Fraenkel, Systems of numeration, Amer. Math. Monthly 92 (1985), [2] P. Cull, M. Flahive, R. Robson, Difference Equations From Rabbits to Chaos, Springer, [3] Daniele A. Gewurz and Francesca Merola, Numeration and enumeration, Proc. 4th Pythagorean [4] Arthur Holshouser, Harold Reiter and James Rudzinski, Dynamic one-pile Nim, Fibonacci Quarterly, 41 #3 (June-July) (2003), [5] D. H. Lehmer, The machine tools of combinatorics, in Applied Combinatorial Mathematics (E. F. Beckenbach, ed), Wiley, 1964, [6] E. Zeckendorf, Représentation des nombres naturels par une somme de nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sc i. Liège, 41 (1972),

On Aperiodic Subtraction Games with Bounded Nim Sequence

On Aperiodic Subtraction Games with Bounded Nim Sequence On Aperiodic Subtraction Games with Bounded Nim Sequence Nathan Fox arxiv:1407.2823v1 [math.co] 10 Jul 2014 Abstract Subtraction games are a class of impartial combinatorial games whose positions correspond

More information

REPRESENTING POSITIVE INTEGERS AS A SUM OF LINEAR RECURRENCE SEQUENCES

REPRESENTING POSITIVE INTEGERS AS A SUM OF LINEAR RECURRENCE SEQUENCES REPRESENTING POSITIVE INTEGERS AS A SUM OF LINEAR RECURRENCE SEQUENCES NATHAN HAMLIN AND WILLIAM A. WEBB Abstract. The Zeckendorf representation, using sums of Fibonacci numbers, is widely known. Fraenkel

More information

#A6 INTEGERS 17 (2017) AN IMPLICIT ZECKENDORF REPRESENTATION

#A6 INTEGERS 17 (2017) AN IMPLICIT ZECKENDORF REPRESENTATION #A6 INTEGERS 17 (017) AN IMPLICIT ZECKENDORF REPRESENTATION Martin Gri ths Dept. of Mathematical Sciences, University of Essex, Colchester, United Kingdom griffm@essex.ac.uk Received: /19/16, Accepted:

More information

One Pile Nim with Arbitrary Move Function

One Pile Nim with Arbitrary Move Function One Pile Nim with Arbitrary Move Function by Arthur Holshouser and Harold Reiter Arthur Holshouser 3600 Bullard St. Charlotte, NC, USA, 28208 Harold Reiter Department of Mathematics UNC Charlotte Charlotte,

More information

Fibonacci Nim and a Full Characterization of Winning Moves

Fibonacci Nim and a Full Characterization of Winning Moves Fibonacci Nim and a Full Characterization of Winning Moves Cody Allen and Vadim Ponomarenko January 8, 2014 Abstract In this paper we will fully characterize all types of winning moves in the takeaway

More information

Factorizations of the Fibonacci Infinite Word

Factorizations of the Fibonacci Infinite Word 2 3 47 6 23 Journal of Integer Sequences, Vol. 8 (205), Article 5.9.3 Factorizations of the Fibonacci Infinite Word Gabriele Fici Dipartimento di Matematica e Informatica Università di Palermo Via Archirafi

More information

arxiv: v1 [math.co] 30 Mar 2010

arxiv: v1 [math.co] 30 Mar 2010 arxiv:1003.5939v1 [math.co] 30 Mar 2010 Generalized Fibonacci recurrences and the lex-least De Bruijn sequence Joshua Cooper April 1, 2010 Abstract Christine E. Heitsch The skew of a binary string is the

More information

What is Zeckendorf s Theorem?

What is Zeckendorf s Theorem? What is Zeckendorf s Theorem? Nik Henderson July 23, 2016 Abstract While Fibonacci numbers can quite easily be classified as a complete sequence, they have the unusual property that a particular explicitly

More information

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4 Do the following exercises from the text: Chapter (Section 3):, 1, 17(a)-(b), 3 Prove that 1 3 + 3 + + n 3 n (n + 1) for all n N Proof The proof is by induction on n For n N, let S(n) be the statement

More information

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime. PUTNAM TRAINING NUMBER THEORY (Last updated: December 11, 2017) Remark. This is a list of exercises on Number Theory. Miguel A. Lerma Exercises 1. Show that the sum of two consecutive primes is never twice

More information

#A87 INTEGERS 18 (2018) A NOTE ON FIBONACCI NUMBERS OF EVEN INDEX

#A87 INTEGERS 18 (2018) A NOTE ON FIBONACCI NUMBERS OF EVEN INDEX #A87 INTEGERS 8 (208) A NOTE ON FIBONACCI NUMBERS OF EVEN INDEX Achille Frigeri Dipartimento di Matematica, Politecnico di Milano, Milan, Italy achille.frigeri@polimi.it Received: 3/2/8, Accepted: 0/8/8,

More information

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Sprague-Grundy Values of the R-Wythoff Game

Sprague-Grundy Values of the R-Wythoff Game Sprague-Grundy Values of the R-Wythoff Game Albert Gu Department of Mathematics Carnegie Mellon University Pittsburgh, PA 15213, U.S.A agu@andrew.cmu.edu Submitted: Aug 6, 2014; Accepted: Apr 10, 2015;

More information

Homework 1 (revised) Solutions

Homework 1 (revised) Solutions Homework 1 (revised) Solutions 1. Textbook, 1.1.1, # 1.1.2 (p. 24) Let S be an ordered set. Let A be a non-empty finite subset. Then A is bounded and sup A, inf A A Solution. The hint was: Use induction,

More information

4 a b 1 1 c 1 d 3 e 2 f g 6 h i j k 7 l m n o 3 p q 5 r 2 s 4 t 3 3 u v 2

4 a b 1 1 c 1 d 3 e 2 f g 6 h i j k 7 l m n o 3 p q 5 r 2 s 4 t 3 3 u v 2 Round Solutions Year 25 Academic Year 201 201 1//25. In the hexagonal grid shown, fill in each space with a number. After the grid is completely filled in, the number in each space must be equal to the

More information

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers. MATH 4 Summer 011 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

The subword complexity of a class of infinite binary words

The subword complexity of a class of infinite binary words arxiv:math/0512256v1 [math.co] 13 Dec 2005 The subword complexity of a class of infinite binary words Irina Gheorghiciuc November 16, 2018 Abstract Let A q be a q-letter alphabet and w be a right infinite

More information

One Pile Nim with Arbitrary Move Function

One Pile Nim with Arbitrary Move Function One Pile Nim with Arbitrary Move Function Arthur Holshouser 3600 Bullard St. Charlotte, NC, USA Harold Reiter Department of Mathematics, University of North Carolina Charlotte, Charlotte, NC 28223, USA

More information

THE RALEIGH GAME. Received: 1/6/06, Accepted: 6/25/06. Abstract

THE RALEIGH GAME. Received: 1/6/06, Accepted: 6/25/06. Abstract INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY 7(2) (2007), #A13 THE RALEIGH GAME Aviezri S. Fraenkel 1 Department of Computer Science and Applied Mathematics, Weizmann Institute of Science,

More information

DYNAMIC ONE-PILE NIM Arthur Holshouser 3600 Bullard St., Charlotte, NC, USA, 28208

DYNAMIC ONE-PILE NIM Arthur Holshouser 3600 Bullard St., Charlotte, NC, USA, 28208 Arthur Holshouser 3600 Bullard St., Charlotte, NC, USA, 28208 Harold Reiter Department of Mathematics, UNC Charlotte, Charlotte, NC 28223 James Riidzinski Undergraduate, Dept. of Math., UNC Charlotte,

More information

arxiv: v1 [math.co] 25 Apr 2018

arxiv: v1 [math.co] 25 Apr 2018 Nyldon words arxiv:1804.09735v1 [math.co] 25 Apr 2018 Émilie Charlier Department of Mathematics University of Liège Allée de la Découverte 12 4000 Liège, Belgium echarlier@uliege.be Manon Stipulanti Department

More information

RMT 2014 Power Round Solutions February 15, 2014

RMT 2014 Power Round Solutions February 15, 2014 Introduction This Power Round develops the many and varied properties of the Thue-Morse sequence, an infinite sequence of 0s and 1s which starts 0, 1, 1, 0, 1, 0, 0, 1,... and appears in a remarkable number

More information

A misère-play -operator

A misère-play -operator A misère-play -operator Matthieu Dufour Silvia Heubach Urban Larsson arxiv:1608.06996v1 [math.co] 25 Aug 2016 July 31, 2018 Abstract We study the -operator (Larsson et al, 2011) of impartial vector subtraction

More information

Fall 2017 November 10, Written Homework 5

Fall 2017 November 10, Written Homework 5 CS1800 Discrete Structures Profs. Aslam, Gold, & Pavlu Fall 2017 November 10, 2017 Assigned: Mon Nov 13 2017 Due: Wed Nov 29 2017 Instructions: Written Homework 5 The assignment has to be uploaded to blackboard

More information

Single Pile (Move Size) Dynamic Blocking Nim

Single Pile (Move Size) Dynamic Blocking Nim Single Pile (Move Size) Dynamic Blocking Nim Abstract: Several authors have written papers dealing with a class of combinatorial games consisting of one-pile counter pickup games for which the maximum

More information

THE ZECKENDORF ARRAY EQUALS THE WYTHOFF ARRAY

THE ZECKENDORF ARRAY EQUALS THE WYTHOFF ARRAY Clark Kimberllng University of Evansville, Evansville, IN 47722 (Submitted February 1993) 1. INTRODUCTION It is well known that every n in the set N of positive integers is uniquely a sum of nonconsecutive

More information

). In an old paper [11], I. N. Sanov

). In an old paper [11], I. N. Sanov ON TWO-GENERATOR SUBGROUPS IN SL 2 (Z), SL 2 (Q), AND SL 2 (R) ANASTASIIA CHORNA, KATHERINE GELLER, AND VLADIMIR SHPILRAIN ABSTRACT. We consider what some authors call parabolic Möbius subgroups of matrices

More information

Discrete Mathematics

Discrete Mathematics Discrete Mathematics 310 (2010) 109 114 Contents lists available at ScienceDirect Discrete Mathematics journal homepage: www.elsevier.com/locate/disc Total palindrome complexity of finite words Mira-Cristiana

More information

Some Examples of Lexicographic Order Algorithms and some Open Combinatorial Problems

Some Examples of Lexicographic Order Algorithms and some Open Combinatorial Problems Some Examples of Lexicographic Order Algorithms and some Open Combinatorial Problems Dimitar Vandev A general reasoning based on the lexicographic order is studied. It helps to create algorithms for generation

More information

EVERY POSITIVE K-BONACCI-LIKE SEQUENCE EVENTUALLY AGREES WITH A ROW OF THE K-ZECKENDORF ARRAY

EVERY POSITIVE K-BONACCI-LIKE SEQUENCE EVENTUALLY AGREES WITH A ROW OF THE K-ZECKENDORF ARRAY EVERY POSITIVE K-BONACCI-LIKE SEQUENCE EVENTUALLY AGREES WITH A ROW OF THE K-ZECKENDORF ARRAY PETER G. ANDERSON AND CURTIS COOPER Abstract. For k 2, a fixed integer, we work with the k-bonacci sequence,

More information

Games derived from a generalized Thue-Morse word

Games derived from a generalized Thue-Morse word Games derived from a generalized Thue-Morse word Aviezri S. Fraenkel, Dept. of Computer Science and Applied Mathematics, Weizmann Institute of Science, Rehovot 76100, Israel; fraenkel@wisdom.weizmann.ac.il

More information

FINITE ABELIAN GROUPS Amin Witno

FINITE ABELIAN GROUPS Amin Witno WON Series in Discrete Mathematics and Modern Algebra Volume 7 FINITE ABELIAN GROUPS Amin Witno Abstract We detail the proof of the fundamental theorem of finite abelian groups, which states that every

More information

February 2017 February 18, 2017

February 2017 February 18, 2017 February 017 February 18, 017 Combinatorics 1. Kelvin the Frog is going to roll three fair ten-sided dice with faces labelled 0, 1,,..., 9. First he rolls two dice, and finds the sum of the two rolls.

More information

SMT 2013 Power Round Solutions February 2, 2013

SMT 2013 Power Round Solutions February 2, 2013 Introduction This Power Round is an exploration of numerical semigroups, mathematical structures which appear very naturally out of answers to simple questions. For example, suppose McDonald s sells Chicken

More information

1 Examples of Weak Induction

1 Examples of Weak Induction More About Mathematical Induction Mathematical induction is designed for proving that a statement holds for all nonnegative integers (or integers beyond an initial one). Here are some extra examples of

More information

BOUNDS ON ZIMIN WORD AVOIDANCE

BOUNDS ON ZIMIN WORD AVOIDANCE BOUNDS ON ZIMIN WORD AVOIDANCE JOSHUA COOPER* AND DANNY RORABAUGH* Abstract. How long can a word be that avoids the unavoidable? Word W encounters word V provided there is a homomorphism φ defined by mapping

More information

Putnam Greedy Algorithms Cody Johnson. Greedy Algorithms. May 30, 2016 Cody Johnson.

Putnam Greedy Algorithms Cody Johnson. Greedy Algorithms. May 30, 2016 Cody Johnson. 1 Introduction Greedy Algorithms May 0, 2016 Cody Johnson ctj@math.cmu.edu A greedy algorithm is an algorithm that chooses the optimal choice in the short run. 2 Examples 1. Prove that every nonnegative

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

Dynamic Single-Pile Nim Using Multiple Bases

Dynamic Single-Pile Nim Using Multiple Bases Dynamic Single-Pile Nim Using Multiple Bases Arthur Holshouser 3600 Bullard St, Charlotte, NC 28208, USA Harold Reiter Department of Mathematics, University of North Carolina Charlotte, Charlotte, NC 28223,

More information

Partition of Integers into Distinct Summands with Upper Bounds. Partition of Integers into Even Summands. An Example

Partition of Integers into Distinct Summands with Upper Bounds. Partition of Integers into Even Summands. An Example Partition of Integers into Even Summands We ask for the number of partitions of m Z + into positive even integers The desired number is the coefficient of x m in + x + x 4 + ) + x 4 + x 8 + ) + x 6 + x

More information

k-protected VERTICES IN BINARY SEARCH TREES

k-protected VERTICES IN BINARY SEARCH TREES k-protected VERTICES IN BINARY SEARCH TREES MIKLÓS BÓNA Abstract. We show that for every k, the probability that a randomly selected vertex of a random binary search tree on n nodes is at distance k from

More information

On the Number of Distinct Squares

On the Number of Distinct Squares Frantisek (Franya) Franek Advanced Optimization Laboratory Department of Computing and Software McMaster University, Hamilton, Ontario, Canada Invited talk - Prague Stringology Conference 2014 Outline

More information

Generating Function Notes , Fall 2005, Prof. Peter Shor

Generating Function Notes , Fall 2005, Prof. Peter Shor Counting Change Generating Function Notes 80, Fall 00, Prof Peter Shor In this lecture, I m going to talk about generating functions We ve already seen an example of generating functions Recall when we

More information

DISTRIBUTION OF FIBONACCI AND LUCAS NUMBERS MODULO 3 k

DISTRIBUTION OF FIBONACCI AND LUCAS NUMBERS MODULO 3 k DISTRIBUTION OF FIBONACCI AND LUCAS NUMBERS MODULO 3 k RALF BUNDSCHUH AND PETER BUNDSCHUH Dedicated to Peter Shiue on the occasion of his 70th birthday Abstract. Let F 0 = 0,F 1 = 1, and F n = F n 1 +F

More information

Poset-Game Periodicity

Poset-Game Periodicity Poset-Game Periodicity Steven Byrnes Final Siemens-Westinghouse Version September 29, 2002 Abstract In this paper, we explore poset games, a large class of combinatorial games which includes Nim, Chomp,

More information

Solutions to the 74th William Lowell Putnam Mathematical Competition Saturday, December 7, 2013

Solutions to the 74th William Lowell Putnam Mathematical Competition Saturday, December 7, 2013 Solutions to the 74th William Lowell Putnam Mathematical Competition Saturday, December 7, 213 Kiran Kedlaya and Lenny Ng A1 Suppose otherwise. Then each vertex v is a vertex for five faces, all of which

More information

arxiv: v1 [math.co] 11 Aug 2015

arxiv: v1 [math.co] 11 Aug 2015 arxiv:1508.02762v1 [math.co] 11 Aug 2015 A Family of the Zeckendorf Theorem Related Identities Ivica Martinjak Faculty of Science, University of Zagreb Bijenička cesta 32, HR-10000 Zagreb, Croatia Abstract

More information

On a Balanced Property of Compositions

On a Balanced Property of Compositions On a Balanced Property of Compositions Miklós Bóna Department of Mathematics University of Florida Gainesville FL 32611-8105 USA Submitted: October 2, 2006; Accepted: January 24, 2007; Published: March

More information

GENERALIZATIONS OF THE DUAL ZECKENDORF INTEGER REPRESENTATION THEOREMS DISCOVERY BY FIBONACCI TREES AND WORD PATTERNS

GENERALIZATIONS OF THE DUAL ZECKENDORF INTEGER REPRESENTATION THEOREMS DISCOVERY BY FIBONACCI TREES AND WORD PATTERNS GENERALIZATIONS OF THE DUAL ZECKENDORF INTEGER REPRESENTATION THEOREMS DISCOVERY BY FIBONACCI TREES AND WORD PATTERNS J. C. T u r n e r a n d T. D. Robb University of Waikato, Hamilton, New Zealand (Submitted

More information

arxiv: v2 [math.co] 9 Aug 2011

arxiv: v2 [math.co] 9 Aug 2011 Winning strategies for aperiodic subtraction games arxiv:1108.1239v2 [math.co] 9 Aug 2011 Alan Guo MIT Computer Science and Artificial Intelligence Laboratory Cambridge, MA 02139, USA aguo@mit.edu Abstract

More information

Lecture 7: More Arithmetic and Fun With Primes

Lecture 7: More Arithmetic and Fun With Primes IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 7: More Arithmetic and Fun With Primes David Mix Barrington and Alexis Maciel July

More information

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2 8. p-adic numbers 8.1. Motivation: Solving x 2 a (mod p n ). Take an odd prime p, and ( an) integer a coprime to p. Then, as we know, x 2 a (mod p) has a solution x Z iff = 1. In this case we can suppose

More information

Rigid Divisibility Sequences Generated by Polynomial Iteration

Rigid Divisibility Sequences Generated by Polynomial Iteration Rigid Divisibility Sequences Generated by Polynomial Iteration Brian Rice Nicholas Pippenger, Advisor Christopher Towse, Reader May, 2008 Department of Mathematics Copyright c 2008 Brian Rice. The author

More information

Enumerating Binary Strings

Enumerating Binary Strings International Mathematical Forum, Vol. 7, 2012, no. 38, 1865-1876 Enumerating Binary Strings without r-runs of Ones M. A. Nyblom School of Mathematics and Geospatial Science RMIT University Melbourne,

More information

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 1 Chapter Summary Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 2 Section 5.1 3 Section Summary Mathematical Induction Examples of

More information

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Chapter : Logic Topics:. Statements, Negation, and Compound Statements.2 Truth Tables and Logical Equivalences.3

More information

Induction and Recursion

Induction and Recursion . All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Induction and Recursion

More information

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School Basic counting techniques Periklis A. Papakonstantinou Rutgers Business School i LECTURE NOTES IN Elementary counting methods Periklis A. Papakonstantinou MSIS, Rutgers Business School ALL RIGHTS RESERVED

More information

CSci 311, Models of Computation Chapter 4 Properties of Regular Languages

CSci 311, Models of Computation Chapter 4 Properties of Regular Languages CSci 311, Models of Computation Chapter 4 Properties of Regular Languages H. Conrad Cunningham 29 December 2015 Contents Introduction................................. 1 4.1 Closure Properties of Regular

More information

ODD FIBBINARY NUMBERS AND THE GOLDEN RATIO

ODD FIBBINARY NUMBERS AND THE GOLDEN RATIO ODD FIBBINARY NUMBERS AND THE GOLDEN RATIO LINUS LINDROOS, ANDREW SILLS, AND HUA WANG Abstract. The fibbinary numbers are positive integers whose binary representation contains no consecutive ones. We

More information

A PASCAL-LIKE BOUND FOR THE NUMBER OF NECKLACES WITH FIXED DENSITY

A PASCAL-LIKE BOUND FOR THE NUMBER OF NECKLACES WITH FIXED DENSITY A PASCAL-LIKE BOUND FOR THE NUMBER OF NECKLACES WITH FIXED DENSITY I. HECKENBERGER AND J. SAWADA Abstract. A bound resembling Pascal s identity is presented for binary necklaces with fixed density using

More information

BEATTY SEQUENCES AND WYTHOFF SEQUENCES, GENERALIZED

BEATTY SEQUENCES AND WYTHOFF SEQUENCES, GENERALIZED BEATTY SEQUENCES AND WYTHOFF SEQUENCES, GENERALIZED CLARK KIMBERLING Abstract. Joint rankings of certain sets yield sequences called lower and upper s-wythoff sequences. These generalizations of the classical

More information

Lecture 2: Connecting the Three Models

Lecture 2: Connecting the Three Models IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 2: Connecting the Three Models David Mix Barrington and Alexis Maciel July 18, 2000

More information

Subtraction games. Chapter The Bachet game

Subtraction games. Chapter The Bachet game Chapter 7 Subtraction games 7.1 The Bachet game Beginning with a positive integer, two players alternately subtract a positive integer < d. The player who gets down to 0 is the winner. There is a set of

More information

Fall 2017 Test II review problems

Fall 2017 Test II review problems Fall 2017 Test II review problems Dr. Holmes October 18, 2017 This is a quite miscellaneous grab bag of relevant problems from old tests. Some are certainly repeated. 1. Give the complete addition and

More information

Counting Palindromic Binary Strings Without r-runs of Ones

Counting Palindromic Binary Strings Without r-runs of Ones 1 3 47 6 3 11 Journal of Integer Sequences, Vol. 16 (013), Article 13.8.7 Counting Palindromic Binary Strings Without r-runs of Ones M. A. Nyblom School of Mathematics and Geospatial Science RMIT University

More information

Mathematical Reasoning & Proofs

Mathematical Reasoning & Proofs Mathematical Reasoning & Proofs MAT 1362 Fall 2018 Alistair Savage Department of Mathematics and Statistics University of Ottawa This work is licensed under a Creative Commons Attribution-ShareAlike 4.0

More information

PUTNAM TRAINING MATHEMATICAL INDUCTION. Exercises

PUTNAM TRAINING MATHEMATICAL INDUCTION. Exercises PUTNAM TRAINING MATHEMATICAL INDUCTION (Last updated: December 11, 017) Remark. This is a list of exercises on mathematical induction. Miguel A. Lerma 1. Prove that n! > n for all n 4. Exercises. Prove

More information

Identifying an m-ary Partition Identity through an m-ary Tree

Identifying an m-ary Partition Identity through an m-ary Tree Bridgewater State University Virtual Commons - Bridgewater State University Mathematics Faculty Publications Mathematics Department 06 Identifying an m-ary Partition Identity through an m-ary Tree Timothy

More information

Some Review Problems for Exam 3: Solutions

Some Review Problems for Exam 3: Solutions Math 3355 Spring 017 Some Review Problems for Exam 3: Solutions I thought I d start by reviewing some counting formulas. Counting the Complement: Given a set U (the universe for the problem), if you want

More information

CHAPTER 8: EXPLORING R

CHAPTER 8: EXPLORING R CHAPTER 8: EXPLORING R LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN In the previous chapter we discussed the need for a complete ordered field. The field Q is not complete, so we constructed

More information

PRACTICE PROBLEMS: SET 1

PRACTICE PROBLEMS: SET 1 PRACTICE PROBLEMS: SET MATH 437/537: PROF. DRAGOS GHIOCA. Problems Problem. Let a, b N. Show that if gcd(a, b) = lcm[a, b], then a = b. Problem. Let n, k N with n. Prove that (n ) (n k ) if and only if

More information

1 More finite deterministic automata

1 More finite deterministic automata CS 125 Section #6 Finite automata October 18, 2016 1 More finite deterministic automata Exercise. Consider the following game with two players: Repeatedly flip a coin. On heads, player 1 gets a point.

More information

Symbiosis and Reciprocity. a talk in honor of Richard A. Brualdi, RAB. April 30, 2005

Symbiosis and Reciprocity. a talk in honor of Richard A. Brualdi, RAB. April 30, 2005 Symbiosis and Reciprocity a talk in honor of Richard A. Brualdi, RAB April 30, 2005 Jim Propp Department of Mathematics University of Wisconsin - Madison slides on web at www.math.wisc.edu/ propp/brualdi.pdf

More information

Analytic Number Theory Solutions

Analytic Number Theory Solutions Analytic Number Theory Solutions Sean Li Cornell University sxl6@cornell.edu Jan. 03 Introduction This document is a work-in-progress solution manual for Tom Apostol s Introduction to Analytic Number Theory.

More information

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2,

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2, SOLUTIONS TO PROBLEM SET 1 Section 1.3 Exercise 4. We see that 1 1 2 = 1 2, 1 1 2 + 1 2 3 = 2 3, 1 1 2 + 1 2 3 + 1 3 4 = 3 4, and is reasonable to conjecture n k=1 We will prove this formula by induction.

More information

1 Basic Combinatorics

1 Basic Combinatorics 1 Basic Combinatorics 1.1 Sets and sequences Sets. A set is an unordered collection of distinct objects. The objects are called elements of the set. We use braces to denote a set, for example, the set

More information

COUNTING NUMERICAL SEMIGROUPS BY GENUS AND SOME CASES OF A QUESTION OF WILF

COUNTING NUMERICAL SEMIGROUPS BY GENUS AND SOME CASES OF A QUESTION OF WILF COUNTING NUMERICAL SEMIGROUPS BY GENUS AND SOME CASES OF A QUESTION OF WILF NATHAN KAPLAN Abstract. The genus of a numerical semigroup is the size of its complement. In this paper we will prove some results

More information

The halting problem is decidable on a set of asymptotic probability one

The halting problem is decidable on a set of asymptotic probability one The halting problem is decidable on a set of asymptotic probability one Joel David Hamkins The City University of New York http://jdh.hamkins.org Alexei Miasnikov The City University of New York http://www.cs.gc.cuny.edu/

More information

CHAPTER 8 Advanced Counting Techniques

CHAPTER 8 Advanced Counting Techniques 96 Chapter 8 Advanced Counting Techniques CHAPTER 8 Advanced Counting Techniques SECTION 8. Applications of Recurrence Relations 2. a) A permutation of a set with n elements consists of a choice of a first

More information

CHAPTER 4: EXPLORING Z

CHAPTER 4: EXPLORING Z CHAPTER 4: EXPLORING Z MATH 378, CSUSM. SPRING 2009. AITKEN 1. Introduction In this chapter we continue the study of the ring Z. We begin with absolute values. The absolute value function Z N is the identity

More information

Unbordered Factors and Lyndon Words

Unbordered Factors and Lyndon Words Unbordered Factors and Lyndon Words J.-P. Duval Univ. of Rouen France T. Harju Univ. of Turku Finland September 2006 D. Nowotka Univ. of Stuttgart Germany Abstract A primitive word w is a Lyndon word if

More information

Math Circle: Recursion and Induction

Math Circle: Recursion and Induction Math Circle: Recursion and Induction Prof. Wickerhauser 1 Recursion What can we compute, using only simple formulas and rules that everyone can understand? 1. Let us use N to denote the set of counting

More information

Properly forking formulas in Urysohn spaces

Properly forking formulas in Urysohn spaces Properly forking formulas in Urysohn spaces Gabriel Conant University of Notre Dame gconant@nd.edu March 4, 2016 Abstract In this informal note, we demonstrate the existence of forking and nondividing

More information

Pattern avoidance in ascent sequences

Pattern avoidance in ascent sequences Pattern avoidance in ascent sequences Paul Duncan 25 Vega Court Irvine, CA 92617, USA pauldncn@gmail.com Einar Steingrímsson Department of Computer and Information Sciences University of Strathclyde, Glasgow

More information

Theorem 1. Every P -position of the game can be written in the form (T n ; m 1 ; : : : ; m k?1 ), where the (k? 1)-tuples (m 1 ; : : : ; m k?1 ) range

Theorem 1. Every P -position of the game can be written in the form (T n ; m 1 ; : : : ; m k?1 ), where the (k? 1)-tuples (m 1 ; : : : ; m k?1 ) range A New Heap Game Aviezri S. Fraenkel and Dmitri Zusman Department of Applied Mathematics and Computer Science The Weizmann Institute of Science Rehovot 76100, Israel fraenkel@wisdom.weizmann.ac.il http://www.wisdom.weizmann.ac.il/~fraenkel

More information

Ramsey Theory. May 24, 2015

Ramsey Theory. May 24, 2015 Ramsey Theory May 24, 2015 1 König s Lemma König s Lemma is a basic tool to move between finite and infinite combinatorics. To be concise, we use the notation [k] = {1, 2,..., k}, and [X] r will denote

More information

THESIS. Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University

THESIS. Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University The Hasse-Minkowski Theorem in Two and Three Variables THESIS Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University By

More information

New Minimal Weight Representations for Left-to-Right Window Methods

New Minimal Weight Representations for Left-to-Right Window Methods New Minimal Weight Representations for Left-to-Right Window Methods James A. Muir 1 and Douglas R. Stinson 2 1 Department of Combinatorics and Optimization 2 School of Computer Science University of Waterloo

More information

Chapter 5. Number Theory. 5.1 Base b representations

Chapter 5. Number Theory. 5.1 Base b representations Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

More information

Sorting suffixes of two-pattern strings

Sorting suffixes of two-pattern strings Sorting suffixes of two-pattern strings Frantisek Franek W. F. Smyth Algorithms Research Group Department of Computing & Software McMaster University Hamilton, Ontario Canada L8S 4L7 April 19, 2004 Abstract

More information

The Distribution of Generalized Sum-of-Digits Functions in Residue Classes

The Distribution of Generalized Sum-of-Digits Functions in Residue Classes Journal of umber Theory 79, 9426 (999) Article ID jnth.999.2424, available online at httpwww.idealibrary.com on The Distribution of Generalized Sum-of-Digits Functions in Residue Classes Abigail Hoit Department

More information

Standard forms for writing numbers

Standard forms for writing numbers Standard forms for writing numbers In order to relate the abstract mathematical descriptions of familiar number systems to the everyday descriptions of numbers by decimal expansions and similar means,

More information

CS 361 Meeting 26 11/10/17

CS 361 Meeting 26 11/10/17 CS 361 Meeting 26 11/10/17 1. Homework 8 due Announcements A Recognizable, but Undecidable Language 1. Last class, I presented a brief, somewhat inscrutable proof that the language A BT M = { M w M is

More information

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2000 2013 Contents 9 Introduction to Number Theory 63 9.1 Subgroups

More information

Seunghee Ye Ma 8: Week 2 Oct 6

Seunghee Ye Ma 8: Week 2 Oct 6 Week 2 Summary This week, we will learn about sequences and real numbers. We first define what we mean by a sequence and discuss several properties of sequences. Then, we will talk about what it means

More information

32 Divisibility Theory in Integral Domains

32 Divisibility Theory in Integral Domains 3 Divisibility Theory in Integral Domains As we have already mentioned, the ring of integers is the prototype of integral domains. There is a divisibility relation on * : an integer b is said to be divisible

More information

On Minimal Words With Given Subword Complexity

On Minimal Words With Given Subword Complexity On Minimal Words With Given Subword Complexity Ming-wei Wang Department of Computer Science University of Waterloo Waterloo, Ontario N2L 3G CANADA m2wang@neumann.uwaterloo.ca Jeffrey Shallit Department

More information

Notes on Inductive Sets and Induction

Notes on Inductive Sets and Induction Notes on Inductive Sets and Induction Finite Automata Theory and Formal Languages TMV027/DIT21 Ana Bove, March 15th 2018 Contents 1 Induction over the Natural Numbers 2 1.1 Mathematical (Simple) Induction........................

More information