Straight from the Book Titu Andreescu Gabriel Dospinescu Straight from the Book XYZ~ Press Titu Andreescu Gabriel Dospinescu University of Texas at Dallas Ecole Normale Superieure, Lyon Library of Congress Control Number: 2012951362 ISBN-13: 978-0-9799269-3-8 ISBN-IO: 0-9799269-3-9 © 2012 XYZ Press, LLC All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (XYZ Press, LLC, 3425 Neiman Rd., Plano, TX 75025, USA) and the authors except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use in this publication of tradenames, trademarks, service marks and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. 9 8 7 6 5 4 3 2 1 www.awesomemath.org Cover design by Iury Ulzutuev The only way to learn mathematics is to do mathematics. , -Paul Halmos Foreword This book is a follow-on from the authors' earlier book, 'Problems from the Book'. However, it can certainly be read as a stand-alone book: it is not vital to have read the earlier book. The previous book was based around a collection of problems. In contrast, this book is based around a collection of solutions. These are solutions to some of the (often extremely challenging) problems from the earlier book. The topics chosen reflect those from the first twelve chapters of the previous book: so we have Cauchy-Schwarz, Algebraic Number Theory, Formal Series, Lagrange Interpolation, to name but a few. The book is one of the most remarkable mathematical texts I have ever seen. First of all, there is the richness of the problems, and the huge variety of solutions. The authors try to give several solutions to each problem, and moreover give insight about why each proof is the way it is, in what way the solutions differ from each other, and so on. The amount of work that has been put in, to compile and interrelate these solutions, is simply staggering. There is enough here to keep any devotee of problems going for years and years. Secondly, the book is far more than a collection of solutions. The solu- tions are used as motivation for the introduction of some very clear expositions of mathematics. And this is modern, current, up-to-the-minute mathematics. For example, a discussion of Extremal Graph Theory leads to the celebrated Szemen§di- Trotter theorem on crossing numbers, and to the amazing applica- tions of this by Szekely and then on to the very recent sum-product estimates of Elekes, Bourgain, Katz, Tao and others. This is absolutely state-of-the-art material. It is presented very clearly: in fact, it is probably the best exposition of this that I have seen in print. viii As another example, the Cauchy-Schwarz section leads on to the devel- opements of sieve theory, like the Large Sieve of Linnik and the Tunin-Kubilius inequality. And again, everything is incredibly clearly presented. The same applies to the very large sections on Algebraic Number Theory, on p-adic Analysis, and many others. It is quite remarkable that the authors even know so much current math- ematics I do not think any of my colleagues would be so well-informed over so wide an area. It is also remarkable that, at least in the areas in which I am competent to judge, their explanations of these topics are polished and exceptionally well thought-out: they give just the right words to help someone understand what is going on. Overall, this seems to me like an 'instant classic'. There is so much material, of such a high quality, wherever one turns. Indeed, if one opens the book at random (as I have done several times), one is pulled in immediately by the lovely exposition. Everyone who loves mathematics and mathematical thinking should acquire this book. Imre Leader \ Professor of Pure Mathematics University of Cambridge Preface This book is a compilation of many suggestions, much advice, an even more hard work. Its main objective is to provide solutions to the problems which were originally proposed in the first 12 chapters of Problems from the Book. We were not able to provide full solutions in our first volume due to the lack of space. In addition, the statements of the proposed problems contained' typos and some elementary mistakes which needed further editing. Finally, the problems were also considered to be quite difficult to tackle. With these points in mind, we came up with a two-part plan: to correct the identified errors and to publish comprehensive solutions to the problems. The first task, editing the statements of the proposed problems, was sim- ple and has already been completed in the second edition of Problems from the Book. Although we focused on changing several problems, we also introduced many new ones. The second task, providing full solutions, however, proved to be more challenging than expected, so we asked for help. We created a forum on www.mathlinks.ro (a familiar site for problem-solving enthusiasts) where solutions to the proposed problems were gathered. It was a great pleasure to witness the passion with which some of the best problem-solvers on mathlinks attacked these tough-nuts. This new book is the result of their common effort, and we thank them. Providing solutions to every problem within the limited space of one vol- ume turned out to be an optimistic plan. Only the solutions to problems from the first 12 chapters of the second edition of Problems from the Book are presented here. Furthermore, many of the problems are difficult and require a rather extensive mathematical background. We decided, therefore, to com- plement the problems and solutions with a series of addenda, using various problems as starting points for excursions into "real mathematics". Although x we never underestimated the role of problem solving, we strongly believe that the reader will benefit more from embarking on a mathematical journey rather than navigating a huge list of scattered problems. This book tries to reconcile problem-solving with "professional mathematics" . Let us now delve into the structure of the book which consists of 12 chap- ters and presents the problems and solutions proposed in the corresponding chapters of Problems from the Book, second edition. Many of these problems are fairly difficult and different approaches are presented for a majority of them. At the end of each chapter, we acknowledge those who provided so- lutions. Some chapters are followed by one or two addenda, which present topics of more advanced mathematics stemming from the elementary topics discussed in the problems of that chapter. The first two chapters focus on elementary algebraic inequalities (a no- table caveat is that some of the problems are quite challenging) and there is not much to comment regarding these chapters except for the fact that al- gebraic inequalities have proven fairly popular at mathematics competitions. To provide relief from this rather dry landscape (the reader will notice that most of the problems in these two chapters start with "Let a, b, c be positive real numbers"), we included an addendum presenting deep applications of the Cauchy-Schwarz inequality in analytic number theory. For instance, we dis- cuss Gallagher's sieve, Linnik's large sieve and its version due to Montgomery. We apply these results to the distribution of prime numbers (for instance Brun's famous theorem stating that the sum of the inverses of the twin primes converges). The note-worthy Tunin-Kubilius inequality and its classical appli- cations (the Hardy-Ramanujan theorem on the distribution of prime factors of n, Erdos' multiplication table problem, Wirsing's generalization of the prime number theorem) are also discussed. The reader will be exposed to the power of the Cauchy-Schwarz inequality in real mathematics and, hopefully, will un- derstand that the gymnastics of three-variables algebraic inequalities is not the Holy Grail. Chapter 3 discusses problems related to the unique factorization of inte- gers and the p-adic valuation maps. Among the topics discussed, we cover the local-global principle (which is extremely helpful in proving divisibilities or arithmetic identities), Legendre's formula giving the p-adic valuation of n!, xi a beneficial elementary result called lifting the exponent lemma, as well as more advanced techniques from p-adic analysis. One of the most beautiful re- sults presented in this chapter in the celebrated Skolem-Mahler-Lech theorem concerning the zeros of a linearly recursive sequence. Readers will perhaps appreciate the applications of p-adic analysis, which is covered extensively in a long addendum. This addendum discusses, from a foundational level, the arithmetic of p-adic numbers, a subject that plays a central role in modern number theory. Once the basic groundwork has been laid, we discuss the p-adic analogues of classical functions (exponential, logarithm, Gamma func- tion) and their applications to difficult congruences (for instance, Kazandzidis' famous supercongruence). This serves as a good opportunity to explore the arithmetic of Bernoulli numbers, Volkenborn's theory of p-adic integration, Mahler and Amice's classical theorems characterizing continuous and locally analytic functions on the ring of p-adic integers or Morita's construction of the p-adic Gamma function. A second addendum to this chapter discusses various classical estimates on prime numbers, which are used throughout the book. Chapter 4 discusses problems and elementary topics related to prime num- bers of the form 4k + 1 and 4k + 3. The most intriguing problem discussed is, without any doubt, Cohn's renowned theorem characterizing the perfect squares in the Lucas sequence. Chapter 5 is dedicated again to the yoga of algebraic inequalities and is followed by an addendum discussing applications of Holder's inequality. Chapter 6 focuses on extremal graph theory. Most of the problems revolve around Turan's theorem, however the reader will also be exposed to topics such as chromatic numbers, bipartite graphs, etc. This chapter is followed by a relatively advanced addendum, discussing various topics related to the Szemeredi- Trotter theorem, which gives bounds for the number of incidences between a set of points and a set of curves. We discuss the theorem's classical probabilistic proof, its generalization to multi-graphs due to Szekely and its application to the sum-product problem due to Elekes, as well as more recent developments due to Bourgain, Katz, and Tao. These results are then applied to natural and nontrivial geometric questions (for instance: what is the least number of distinct distances determined by n points in the plane? what is the maximal number of triangles of the same area?). Finally, another addendum Xll completes this chapter and is dedicated to the powerful probabilistic method. After a short discussion on finite probability spaces, we provide many examples of combinatorial applications. Chapter 7 involves combinatorial and number theoretic applications of finite Fourier analysis. The central principles of this chapter include the roots of unity and the fact that congruences between integers can be expressed in terms of sums of powers of roots of unity. To provide the reader with a broader view, we beefed-up this chapter with an addendum discussing Fourier analysis on finite abelian groups and applying it to Gauss sums of Dirichlet characters, additive problems, combinatorial or analytic number theory. For instance, the reader will find a discussion of the P6lya-Vinogradov inequality and Vina- gradov's beautiful use of this inequality to deduce a rather strong bound on the least quadratic non-residue mod p. At the same time, we explore Dirich- let's L-functions, culminating in a proof of Dirichlet's theorem on arithmetic progressions. This section is structured to first present the usual analytic proof (since it is really a masterpiece from all points of view), up to some important simplification due to Monsky. At the same time, we also discuss how to turn this into an elementary proof that avoids complex analysis and dramatically uses Abel's summation formula. Chapter 8 focuses on diverse applications of generating functions. This is an absolutely crucial tool in combinatorics, be it additive or enumerative. In this section, the reader will have the opportunity to explore enumerative problems (Catalan's problem, counting the number of solutions of linear dio- phantine equations or the number of irreducible polynomials mod p, of fixed degree). We also discuss exotic combinatorial identities or recursive sequences, which can be solved elegantly using generating functions, but also rather chal- lenging congruences that appear so often in number theory. The chapter is followed by an addendum presenting a very classical topic in enumerative combinatorics, Lagrange's inversion formula. Among the applications, let us mention Abel's identity, other derived combinatorial identities, Cayley's the- orem on labeled trees, and various related problems. Chapter 9 is rather extensive, due to the vast nature of the topic covered, algebraic number theory. While we are able only to scratch the surface, nev- ertheless the reader will find a variety of intriguing techniques and ideas. For xiii instance, we discuss arithmetic properties of cyclotomic polynomials (includ- ing Mann's beautiful theorem on linear equations in roots of unity), rationality problems, and various applications of the theorem of symmetric polynomials. In addition, we present techniques rooted in the theory of ideals in number fields, finite fields and p-adic methods. We also give an overview of the el- ementary algebraic number theory in the addendum following this chapter. After a brief review on ideals, field extensions, and algebraic numbers, we proceed with a discussion of the primitive element theorem and embeddings of number fields into C. We also briefly survey Galois theory, and the fun- damental theorem on the prime factorization of ideals in number fields, due to Kummer and Dedekind. Once the foundation has been set, we discuss the prime factorization in quadratic and cyclotomic fields and apply these tech- niques to basic problems that explore the aforementioned theories. Finally, we discuss various applications of Bauer's theorem and of Chebotarev's theorem. The next addendum is concerned with the fascinating topic of counting the number of solutions modulo p of systems of polynomial equations. We use this as an opportunity to state and prove the basic structural results on finite fields and introduce the Gauss and Jacobi sums. We go ahead and count the number of points over a finite field of a diagonal hypersurface and to compute its zeta function. This is a beautiful theorem of Weil, the very tip of a massive iceberg. Chapter 10 focuses on the arithmetic of polynomials with integer coeffi- cients. An essential aspect of the discussion concentrates on Mahler expan- sions, the theory of finite differences, and their applications. The techniques used in this chapter are rather diverse. Although the problems can be consid- ered basic, they are challenging and require advanced problem-solving skills. Chapter 11 provides respite from the difficult tasks mentioned above. It discusses Lagrange's interpolation formula, allowing a unified presentation of various estimates on polynomials. The longest and certainly most challenging chapter is the last one. It explores several algebraic techniques in combinatorics. The methods are stan- dard but powerful. The last part of the chapter deals with applications to geometry, presenting some of Dehn's wonderful ideas. The last problem pre- sented in the book is the famous Freiling, Laczkovich, Rinne, Szekeres theorem, xiv a stunningly beautiful application of algebraic combinatorics. We would like to thank, again, the members of the mathlinks site for their invaluable contribution in providing solutions to many of the problems in this book. Special thanks are due to Richard Stong, who did a remarkable job by pointing out many inaccuracies and suggesting numerous alternative solutions. We would also like to thank Joshua Nichols-Barrer, Kathy Cordeiro and Radu Sorici, who gave the manuscript a readable form and corrected several infelicities. Many of the problems and results in this book were used by the authors in courses at the AwesomeMath Summer Program, and students' reactions guided us in the process of simplifying or adding more details to the discussed problems. We wish to thank them all, for their courage in taking and sticking with these courses, as well as for their valuable suggestions. Titu Andreescu titu.andreescu@utdallas.edu Gabriel Dospinescu gdospi2002@yahoo.com Contents 1 Some Useful Substitutions 1.1 The relation a 2 + b 2 + e 2 = abc + 4 . . . . . . . . . . . . . . . 1.2 The relations abc = a + b + e + 2 and ab + be + ea + 2abe = 1 1.3 The relation a 2 + b 2 + e 2 + 2abe = 1 1.4 Notes . 1 2 9 21 27 2 Always Cauchy-Schwarz. . . 29 2.1 Notes 61 Addendum 2.A Cauchy-Schwarz in Number Theory 62 3 Look at the Exponent 91 3.1 Introduction 91 3.2 Local-global principle 92 3.3 Legendre's formula . . 96 3.4 Problems with combinatorial and valuation-theoretic aspects 104 3.5 Lifting exponent lemma 110 3.6 p-adic techniques . . . . 116 3.7 Miscellaneous problems 125 3.8 Notes 134 Addendum 3.A Classical Estimates on Prime Numbers 135 Addendum 3.B An Introduction to p-adic Numbers 141 4 Primes and Squares 4.1 Notes . 189 203 xvi 5 T 2 's Lemma 5.1 Notes . . . Addendum 5.A Holder's Inequality in Action. 6 Some Classical Problems in Extremal Graph Theory 6.1 Notes . Addendum 6.A Some Pearls of Extremal Graph Theory. Addendum 6.B Probabilities in Combinatorics . 7 Complex Combinatorics 7.1 Tiling and coloring problems 7.2 Counting problems . . . 7.3 Miscellaneous problems . 7.4 Notes . Addendum 7.A Finite Fourier Analysis 8 Formal Series Revisited 8.1 Counting problems . . 8.2 Proving identities using generating functions 8.3 Recurrence relations 8.4 Additive properties . . . 8.5 Miscellaneous problems 8.6 Notes . Addendum 8.A Lagrange's Inversion Theorem 9 A Little Introduction to Algebraic Number Theory 9.1 Tools from linear algebra 9.2 Cyclotomy . 9.3 The gcd trick . 9.4 The theorem of symmetric polynomials. 9.5 Ideal theory and local methods 9.6 Miscellaneous problems . 9.7 Notes . Addendum 9.A Equations over Finite Fields Addendum 9.B A Glimpse of Algebraic Number Theory Contents 205 226 . 227 235 251 252 265 281 281 285 299 309 310 337 339 349 354 361 371 375 377 395 396 402 408 410 420 426 433 434 456 Contents 10 Arithmetic Properties of Polynomials 10.1 The a - blf(a) - f(b) trick . 10.2 Derivatives and p-adic Taylor expansions. . 10.3 Hilbert polynomials and Mahler expansions 10.4 p-adic estimates 10.5 Miscellaneous problems 10.6 Notes . 11 Lagrange Interpolation Formula 11.1 Notes . 12 Higher Algebra in Combinatorics 12.1 The determinant trick . 12.2 Matrices over lF2 . 12.3 Applications of bilinear algebra 12.4 Matrix equations . 12.5 The linear independence trick 12.6 Applications to geometry 12.7 Notes . Bibliography xvii 485 485 494 497 506 513 520 521 537 539 541 546 552 561 568 576 583 585 Chapter 1 Some Useful Substitutions Let us first recall the classical substitutions that will be used in the fol- lowing problems. All of these are discussed in detail in [3], chapter 1 and the reader is invited to take a closer look there. Consider three positive real numbers a, b, c. If abc = 1, a classical substi- tution is x a= - , y b= ~ z , z c= x A less classical one is a=_x_, b=-Y- c=_z_ y+z z+x' x+y (for some positive real numbers x, y, z) whenever ab + bc + ca + 2abc = 1, or its equivalent version y+z a= x ' b=Z+x Y , x+y c= z when abc = a + b + c + 2 (the equivalence between the two relations follows from the substitution (a, b, c) t (~, i, ~)). Two other very useful substitutions concern the relations a 2 + b 2 + c 2 = abc + 4 and a 2 + b 2 + c 2 + 2abc = 1. In the first case, with the extra assumption max(a, b, c) 2: 2" one can find positive numbers x, y, Z such that xyz = 1 and 111 a=x+-, b=y+-, c=z+ x y z [...]... be obtained by computing the determinant of the associated matrix Now, the previous relation is almost the one given in the statement, up to a permutation of the variables So, since the conclusion is symmetric in the five variables, we will assume from now on that the previous relation is satisfied instead of the one given in the statement We claim that the previous expression is always at least 5/2... for the hard part of the inequality Among the three numbers a-I, b - 1, c - 1, two have the same sign, say b - 1 and c - 1 Thus (1 b)(1 - c) 2 0, implying that b + c :S bc + 1 and ab + ac - abc :S a -2-+ a 2c 2 b2c 2 29R2 a +-2 Nguyen Son Ha Proof If A, B, C are the angles of the triangle, the sine law and the identity sin 2 x + cos 2 X = 1 yield the equivalent form of the inequality Write cos 2 A Then... have and similarly for the other variables The result follows by adding up these inequalities D The following exercise combines an easy application of the CauchySchwarz inequality with some classical formulae from geometry Recall that r is the inradius and that s is the semi-perimeter of a triangle yielding 49(Z2 + 4y2 + 9x2) 2': 36(x + y + z)2 Thus, we are in the equality case of the Cauchy-Schwarz inequality,... precisely the case when there is a k > 0 such that X = 4k, z = 36k, y = 9k Then the sides of the triangle are 13k, 40k, 45k Thus the triangle is similar to the triangle with sidelengths 13,40,45, and the problem is solved D 6 The triangle ABC satisfies Show that ABC is similar to a triangle whose sides are integers, and find the smallest set of such integers Titu Andreescu, USAMO 2002 Proof Let the incircle... to the sides of the triangle at points which split the sides into segments of length X and y, X and z, and y and z Thus, the sides of the triangle have lengths X + y, X + z, y + z The statement of the following problem looks rather classical There are however some technical problems which make the problem more difficult than expected 7 Let n 2': 2 be an even integer We consider all polynomials of the. .. indeed, we can always add the same number to all xi'swithout changing the hypothesis or the conclusion of the problem Thus, we may assume that Xl + X2 + + Xn = O But then the previous inequalities allow us to conclude the proof 0 The following problem is a very tricky application of the Cauchy-Schwarz inequality The technique used in the proof is worth remembering, since it is quite useful It is also... X4 = ~ a2 The question is, of course, how on earth did we choose the value of X5? Well, simply by solving the system, as indicated in the beginning of the solution Note that we clearly have Xi > 0 and an easy computation shows that these are solutions of the system (we only have to check two equations, since three are satisfied by construction) The conclusion is that if the ai's satisfy the condition... in the other two equations and eliminating Xl, x5 between them, we obtain that the system has a nontrivial solution if and only if X3 ai + ala4 + a4 a 2 + a2 a 5 + a5 a 3 + a3 a l· Xl X5 -+ X2 + + X2 + X3 X3 + X4 Xl + X2 i=l All the previous (painful!) computations are left to the reader, since they are far from having anything conceptual Note that the same result can be obtained by computing the. .. lowering the constant term, corresponds geometrically to lowering the graph As we lower the graph, the smallest root increases, thus we maintain three positive real roots until the smallest root becomes a double root If the double root is at t = a and the larger root at t = b, then we have 2 2 171 = 2a + b, 172 = a + 2ab and 173 = a b If we fix 171 and 172 with 172 = 2171 as hypothesized , then we find... fix two of the variables, say aI, a2 and apply the CauchySchwarz inequality to get rid of the remaining variables Explicitly, this can be written in the form + ~) 2 2 ~ (al + a2 + + an) (~ + ~ + + ~) al a2 an ;, ( (a +a )(> :,)+n-2) 1 2 2 +4+ 2 n(n - 1) Proof The crucial idea is to write the hypothesis in a different way: expanding the product and rearranging terms shows that the hypothesis can . The book is one of the most remarkable mathematical texts I have ever seen. First of all, there is the richness of the problems, and the huge variety of solutions. The. optimistic plan. Only the solutions to problems from the first 12 chapters of the second edition of Problems from the Book are presented here. Furthermore, many of the problems are. challenging) problems from the earlier book. The topics chosen reflect those from the first twelve chapters of the previous book: so we have Cauchy-Schwarz, Algebraic Number Theory, Formal