text
stringlengths
8
1.01M
MathTalk™ For Visually Impaired (MT/VI) – working with Mathematics Accessible to Visually Impaired Students (MAVIS) at New Mexico State University and several teachers/counselors of the visually impaired, a concept for a voiced mathematics program for the visually impaired was prepared. This program uses DragonDictate™ and Scientific Notebook™. That concept has been beta tested and is now a reality. The following will demonstrate features of this product: The "echo" of each voiced math command. ( User voices the math) An exclusive corrections feature for any misrecognitions. (User can correct) An exclusive technique that reads back math expressions/equations. ( User can select math on the screen for read back) An exclusive technique for saving and retrieving files. (User can manage files) The beginning of mathematics is arithmetic. ArithmeticTalk was developed in response to educators' comments that higher mathematics programs were useless unless the student understood the basics. ArithmeticTalk meets this basic need. Dr. Gray wrote it to match the textbooks for grades two through five/six. The program utilizes MSWord (R)97 and DragonDictate(R) The following is a live presentation of ArithmeticTalk showing how to do addition, subtraction, multiplication and division with voice. Notice how the voice commands make the student "voice" arithmetic language such as carry the 1, one's place, ten's place, dividend and divisor. Students can do arithmetic, and the program can assist teachers in preparing lessons/homework. MathPad by Voice: This is a presentation using MathPad™ with voice commands. VoiceEZ™MathType™ (VE/MT): VE/MT was created for students in grade 6 through Ph.D. With over 3,000 voiced math commands, users can voice from beginning algebra, advanced algebra, calculus and to Ph.D. and professional levels. Numerous frequently used formulas such as quadratic formula, binomial formula, three d wave equation , Bessel function can be executed by just saying a SINGLE COMMAND. The program uses Word97, MathType(TM), and DragonDictate. Mathematics is voiced in MathType and a toggle command allows movement to Word for text insertion and back to MathType for mathematics. The user can do math lessons and/or prepare complex papers/presentations. We will now show a demonstration of VE/MT. MathBrailleTalk: This program was specifically designed for a sighted person to very easily and rapidly voice math lessons/papers for a visually impaired person. Then just say "translate to braille" and "emboss this". The program uses the Duxbury Braille Translator(R) (DBT) for Microsoft Windows® ,version 10.2, and DragonDictate. The teacher does not have to remember hundreds of keystrokes or the Nemeth Math Code. Voice over 2,000 math commands , translate to Braille, and emboss. Users have said the time saving is about 50% over manual methods. Voice complex math such "quadratic formula", "3 x 3 matrix", and "binomial formula" with a SINGLE COMMAND. These programs will solve, factor, equate, and more. from beginning algebra to advanced calculus. Additionally, the programs also have GRAPHING CAPABILITIES. 2D polar, 3D polar, and 3 D rectangular are examples of voicing graphs.
Intermediate Algebra for College Students -With CD - 7th edition Summary: This dynamic new edition of this proven series adds cutting edge print and media resources. An emphasis on the practical applications of algebra motivates learners and encourages them to see algebra as an important part of their daily lives. The reader-friendly writing style uses short, clear sentences and easy-to-understand language, and the outstanding pedagogical program makes the material easy to follow and comprehend. KEY TOPICS Chapter topics cover basic concepts;...show more equations and inequalities; graphs and functions; systems of equations and inequalities; polynomials and polynomial functions; rational expressions and equations; roots, radicals, and complex numbers; quadratic functions; exponential and logarithmic functions; conic sections; and sequences, series and the binomial theorem. For the study of Algebra. ...show less Book has a small amount of wear visible on the binding, cover, pages.Selection as wide as the Mississippi. $2.69 +$3.99 s/h Good SellBackYourBook Aurora, IL 0132383578 Item in good condition. Textbooks may not include supplemental items i.e. CDs, access codes etc... All day low prices, buy from us sell to us we do it all!!Good Once Upon A Time Books AR Tontitown, AR 200781 +$3.99 s/h VeryGood walker_bookstore tempe, AZ 0132383578 WE HAVE NUMEROUS COPIES, -HARDCOVER, mild wear to cover/edges/corners, pages have little to no use, school markings on book and inside
Basic Math's ongoing series on the elementals of mathematics teaches students the skills they'll need to become experts in math. Basic Math - The Complete Course - Lesson 25: Statistics movie In this lesson, "Statistics", students will learn to find the mean and median of a set of numbers, and why the mean is a better measure of tendency when the data contain extreme values. ...See Full Description
richly illustrated and clearly written undergraduate textbook captures the excitement and beauty of geometry. The approach is that of Klein in his Erlangen programme: a geometry is a space together with a set of transformations of the space. The authors explore various geometries: affine, projective, inversive, hyperbolic and elliptic. In each case they carefully explain the key results and discuss the relationships between the geometries. New features in this second edition include concise end-of-chapter summaries to aid student revision, a list of further reading and a list of special symbols. The authors have also revised many of the end-of-chapter exercises to make them more challenging and to include some interesting new results. Full solutions to the 200 problems are included in the text, while complete solutions to all of the end-of-chapter exercises are available in a new Instructors' Manual, which can be downloaded from less
Don't Stop Learning Now! Find Study Help Learn Concept Master Problems Synthesizer: Test Analysis Transcript [0:00:00] If you?re in AP calculus now, now you?re probably one of the Math champions. No, not probably you are one of the champions. So it?s most likely you get really good study skills. But you know, you can always use some extra tricks. Especially, when you?re taking an AP test where there?s really heavy time pressure. I?m going to explain an activity to you that will help speed up your working on the AP test. Will help organize your thoughts. But first I you need you to go and download three different things. The first thing is a synthesizer that?s called test analysis. You?ll find that in the bonus materials. The next item is a little cheat sheet I put together for you. It?s a list of all the episodes in our course, along with all the sub-topics. The purpose of this exercise, is to use the worksheet that I developed for you, and identify test problems according to episode and sub-topic. Finally, you need to follow the link to the official College Board website, where you will find the link to the May 2009, official course description for AP calculus. Now within that one, you?re going to find two different sections you need to download. One of them is the sample free response questions. The other is the sample multiple choice questions. We?re going to look at the sample multiple choice questions first, and I?m going to stop for a minute while you download all that stuff. Got all that stuff ready? Now again, look at the multiple choice. I?d like you to look at multiple question number one. Have your test analysis worksheet ready. Take a minute to read it. Take your time because right not you?re not on a time pressure. [0:02:00] Take your time, read it and try to think about when we covered it in the course. Look for some key words. This one doesn?t have a lot of writing in it, but it says limit, so limit. Pretty darn good chance that it?s in the episode where we talked about doing limits. Right now, next thing you know says what?s got Cosines in it? So maybe it?s that special cosine limit that I asked you to memorize. Look through the follow along and see if it?s in there. No it?s not quite that. But wait, look how long that thing is. Remind you of something? Yeah the definition of a derivative that's what it is. It?s one of the problems where you?re being asked to recognize the definition of a derivative. And look at that problem and just decide what derivative it is. So, let?s write that down. The episode name was manual limits. The sub-topic is recognizing the definition of a derivative. Now over in the notes section, you might want to write down anything that occurs to you, you might actually want to do the problem there. And if you?re not remembering how to do this kind of a problem very well, you?ll probably want to check out the box for review. You?re probably in the last stages of reviewing for AP test now, and you?re time is limited. So one thing you need you need to keep in mind is that, you might not actually do all of these problems. The goal right now is just to go through quickly and analyze all of the problems. Then go back later and as you have time, then actually try doing the problems. Right now just analyze them. [0:04:00] Your teacher might have told you by now, go back and study for the test. Well I hear this from students all time, ?Oh I can?t study for math test you just know it or you don?t.? Nonsense, but you do need to know how to structure what you?re doing to conserve your time. So if you?re going to go back and study, you probably have a stuck of notes about this big and you can?t possibly read it all. You need to prioritize your time. The purpose of this synthesizer is to help prioritize your study. The first thing I would like you to do, is download a copy of the synthesizer that is entitled 'review your old test'. Then go ahead and get all your old test. You might want to print a few copies of this synthesizer. When you?re prioritizing, what you need to do is rule out the stuff that you don?t need to spend any study time on. Now this activity again takes you again from our course and has you do a broad review of everything that you did in AP calculus. The first thing to do is to look for your old test. Now any problem that got right the first time, you might not need to review. Look at them again though quickly because, there might have been that you new a few months ago that you have forgotten. Make that a quick scan. If there is something that you have forgotten, well write it down. Let?s see, I?m looking through one of my old test, and oh no there?s an integral, I completely forgotten this thing. Oh no the problem asked me to do the integral of the secant of u, du, I?ve forgotten that thing done. So look it up write it down. This is one of the ones that you might need to memorize. They do show up on the AP test from time to time. They?re not supper common but you might see it. [0:06:00] This one is the natural logarithm of the secant of u plus the tangent of u, plus of course your old friend the constant of integration. So I wrote that down because I?m probably going to be needing that one. This one was maybe your chapter 4 and it was problem number 12 on the test. So what you?re writing down is a list of things that you?ll want to review now. And maybe briefly look at again the day before the test. Next, and very important, is to look at any problem that you got wrong the first time. If you did, you definitely want to circle that one and take a close at it. You might have gotten it down since then, but you want to be sure. The second page of this synthesizer asks you to research additional AP topics. Now, we?ve done our best to make this course complete as possible. I?ve included practically every kind of odd AP problem that I could think of, that I could find. Still, we couldn?t cover quite everything. We skipped a lot of the basic topics. The point of this course was to speed you up on the on the more complex topics. And there is one additional complex topic that you?ll see from time to time, exponentials ,that I didn?t really cover very well. When you download this, you?ll see a list of the topics that I?ve identified as ones that we haven?t covered thoroughly. Here is the one I just mentioned. Compare relative magnitudes of functions such as exponential, polynomial and logarithmic growth and the relative rates of change. So here is a possible example problem that you could do. [0:08:00] Your goal is to look through the list of additional topics that I made for you. Find where it is in your textbook or within your notes that will be great too, and try some examples. You?ve probably covered them in your course, but I?m sure you can use the review.
More About This Textbook Overview A guide to a rich and fascinating subject: algebraic curves and how they vary in families. Providing a broad but compact overview of the field, this book is accessible to readers with a modest background in algebraic geometry. It develops many techniques, including Hilbert schemes, deformation theory, stable reduction, intersection theory, and geometric invariant theory, with the focus on examples and applications arising in the study of moduli of curves. From such foundations, the book goes on to show how moduli spaces of curves are constructed, illustrates typical applications with the proofs of the Brill-Noether and Gieseker-Petri theorems via limit linear series, and surveys the most important results about their geometry ranging from irreducibility and complete subvarieties to ample divisors and Kodaira dimension. With over 180 exercises and 70 figures, the book also provides a concise introduction to the main results and open problems about important topics which are not
Beginning Math Concepts for Game Developers 9781598632903 ISBN: 1598632906 Edition: 1 Pub Date: 2006 Publisher: Course Technology Summary: Successful game programmers understand that in order to take their skills beyond the basics, they must have an understanding of central math topics; however, finding a guide that explains how these topics relate directly to games is not always easy. Beginning Math Concepts for Game Developers is the solution! It includes several hands-on activities in which basic math equations are used for the creation of graphs and..., ultimately, animations. By the time you finish, you will have developed a complete application from the ground up that allows you to endlessly explore game development scenarios for 2D games. If you have a basic understanding of programming essentials and a desire to hone your math skills, then get ready to take a unique journey that examines what is possible when you combine game development with basic math concepts. Flynt, John P. is the author of Beginning Math Concepts for Game Developers, published 2006 under ISBN 9781598632903 and 1598632906. Two hundred forty seven Beginning Math Concepts for Game Developers textbooks are available for sale on ValoreBooks.com, one hundred fourteen used from the cheapest price of $6.19, or buy new starting at $15
978007839 This text is written for the intermediate algebra course offered at both two- and four-year schools usually found in the department of mathematics. The focus of this series is to make students proficient in algebra while becoming better problem solvers. To accomplish this goal, the authors emphasize conceptual understanding. They ask students to think critically, to explore and explain concepts in writing and to extend their understanding through group activities. The environmental essays that open each chapter connect algebra to real world problem solving and can be used to stimulate class discussions and promote collaborative learning. Functions and graphing are introduced early, in Chapter Three, and then integrated throughout the rest of the text. This approach allows for visual interpretation of the mathematical concepts which in turn encourages students to develop an intuitive understanding of equations and their graphs. Also by introducing these topics early, students become familiar and comfortable with concepts that are critical to their success in future math courses. "Intermediate Algebra" includes marginal notes and examples that indicate how technology can enhance the study of algebra through exploration, visualization and geometric interpretation. The examples allow students to see the connection between algebra and the more intuitive graphic representation. They fall at the end of section discussions and may be omitted if a graphing tool is not being used. The text is written in a clear, concise style with numerous examples which are connected by thoughtful transitions that either reinforce the student's understanding of the previous concepts or prepare them for the next example. Each example is followed by a "Check Yourself" exercise that facilitates the student's active involvement in the learning
This introduction to Fourier and transform methods emphasizes basic techniques rather than theoretical concepts. It explains the essentials of the Fourier method and presents detailed considerations of modeling and solutions of physical problems. All solutions feature well-drawn outlines that allow students to follow an appropriate sequence of steps, and many of the exercises include answers. The chief focus of this text is the application of the Fourier method to physical problems, which are described mathematically in terms of boundary value problems. Problems involving separation of variables, Sturm-Liouville theory, superposition, and boundary complaints are addressed in a logical sequence. Multidimensional Fourier series solutions and Fourier integral solutions on unbounded domains are followed by the special functions of Bessel and Legendre, which are introduced to deal with the cylindrical and spherical geometry of boundary value problems. Students and professionals in mathematics, the physical sciences, and engineering will find this volume an excellent study guide and resource.
subject of algebra has always been important in American secondary mathematics education. However, algebra at the elementary level has been garnering increasing attention and importance over the past 15 years. There is consequently a dire need for ideas, suggestions and models for how best to achieve pre-algebraic instruction in the elementary grades. Planting the Seeds of Algebra will empower teachers with theoretical and practical knowledge about both the content and pedagogy of such instruction, and show them the different faces of algebra as it appears in the early grades. The book will walk teachers of young children through many examples of K-6 math lessons and unpack, step by step, the hidden connections to higher algebra. After reading this book, teachers will be better equipped to reflect on their teaching, renew their thinking, and change parts of their practice in order to transform their classroom culture into one where both students and teachers are attuned to algebraic thinking, reasoning, talking, writing, and doing.
Fundamentals of Algebra and Trigonometry - 9th edition Summary: This classic in the series of highly respected Swokowski/Cole mathematics texts retains the elements that have made it so popular with instructors and students alike: it is clearly written, the time-tested exercise sets feature a variety of applications, its exposition is clear, its uncluttered layout is appealing, and the difficulty level of problems is appropriate and consistent. Now this Ninth Edition of Fundamentals of Algebra and Trigonometry has been impr...show moreoved in three important ways. First, discussions have been rewritten to enable students to more easily understand the mathematical concepts presented. Second, exercises have been added that require students to estimate, approximate, interpret a result, write a summary, create a model, explore, or find a generalization. Third, graphing calculators have been incorporated to a greater extent through the addition of examples and exercises as well as the inclusion of a cross-referenced appendix on the use of the TI-82/83. All of this has been accomplished without compromising the mathematical integrity that is the hallmark of this text
This chapter discusses key concepts related to performing basic computations with Maple. It discusses important features that are relevant to all Maple users. After learning about these concepts, you will learn how to use Maple to solve problems in specific mathematical disciplines in the following chapter. Symbolic computation is the mathematical manipulation of expressions involving symbolic or abstract quantities, such as variables, functions, and operators; and exact numbers, such as integers, rationals, π, and The goal of such manipulations may be to transform an expression to a simpler form or to relate the expression to other, better understood formulas. Numeric computation is the manipulation of expressions in the context of finite-precision arithmetic. Expressions involving exact numbers, for example, are replaced by close approximations using floating-point numbers, for example 1.41421. These computations generally involve some error. Understanding and controlling this error is often of as much importance as the computed result. In Maple, numeric computation is normally performed if you use floating-point numbers (numbers containing a decimal point) or the evalf command. The plot command (see Plots and Animations) uses numeric computation, while commands such as int, limit, and gcd (see Integer Operations and Mathematical Problem Solving) generally use only symbolic computation to achieve their results. Exact Computations In Maple, integers, rational numbers, mathematical constants such as π and ∞, and mathematical structures such as matrices with these as entries are treated as exact quantities. Names, such as and mathematical functions, such as and are symbolic objects. Names can be assigned exact quantities as their values, and functions can be evaluated at symbolic or exact arguments. > Important: Unless requested to do otherwise (see the following section), Maple evaluates expressions containing exact quantities to exact results, as you would do if you were performing the calculation by hand, and not to numeric approximations, as you normally obtain from a standard hand-held calculator. > > > Floating-Point Computations In some situations, a numeric approximation of an exact quantity is required. For example, the plot command requires the expression it is plotting to evaluate to numeric values that can be rendered on the screen: π cannot be so rendered, but can be. Maple distinguishes approximate from exact quantities by the presence or absence of a decimal point: is approximate, while is exact. Note: An alternative representation of floating-point numbers, called e-notation, may not include an explicit decimal point: 1e5 , 3e-2 . In the presence of a floating-point (approximate) quantity in an expression, Maple generally computes using numeric approximations. Arithmetic involving mixed exact and floating-point quantities results in a floating-point result. > If a mathematical function is passed a floating-point argument, it normally attempts to produce a floating-point approximation of the result. By its nature, floating-point computation normally involves some error. Controlling the effect of this error is the subject of active research in Numerical Analysis. Some sources of error are: • An exact quantity may not be exactly representable in decimal form: and are examples. • Small errors can accumulate after many arithmetic operations. • Subtraction of nearly equal quantities can result in essentially no useful information. For example, consider the computation for > No correct digits remain. If, however, you use Maple to analyze this expression, and replace this form with a representation that is more accurate for small values of a fully accurate 10-digit result can be obtained. In addition to the basic arithmetic operators, Maple has many specialized commands for performing more complicated integer computations, such as factoring an integer, testing whether an integer is a prime number, and determining the greatest common divisor (GCD) of a pair of integers. Note: Many integer operations are available as task templates (Tools→Tasks→Browse, under Integer Operations). You can quickly perform many integer operations using context menus. Selecting an integer, and then right-clicking (for Macintosh, Control-clicking) displays a context menu with integer commands. For example, the context menu item Integer Factors applies the ifactorcommand to compute the prime factorization of the given integer. See Figure 4.1. Figure 4.1: Context Menu for an Integer The result of applying Integer Factors is shown: > (4.1) > (4.2) Maple inserts the command ifactor, using an equation label reference to the integer 946929. For more information on equation labels, see Equation Labels. For more information on using context menus in Worksheet mode, see Context Menus. For information on using context menus in Document mode, see Context Menus. Maple has many other integer commands, including those listed in Table 4.1. Enter i or j, and then press the symbol completion key. See Symbol Names. Note that the output will still be displayed with I, no matter what symbol was used for input. You can customize Maple's settings to use a different symbol for . For more information on entering complex numbers, including how to customize this setting, refer to the HowDoI help page. The GIsqrt command approximates the square root in the Gaussian integers. > For more information on Gaussian integers including a list of GaussInt package commands, refer to the GaussInthelp page. 4.4 Solving Equations You can solve a variety of equation types, including those described in Table 4.3. For information on solving equations and inequations symbolically using thesolvecommand, see the following section. For information on solving equations numerically using thefsolvecommand, see Numerically Solving Equations. Symbolically Solving Equations and Inequations The solve command is a general solver that determines exact symbolic solutions to equations or inequations. The solutions to a single equation or inequation are returned as an expression sequence. For details, see Creating and Using Data Structures. If Maple does not find any solutions, the solve command returns the empty expression sequence. > In general, solve computes solutions in the field of complex numbers. To restrict the problem to only real solutions, see Restricting the Domain. It is recommended that you verify the solutions returned by the solve command. For details, see Working with Solutions. To return the solutions as a list, enclose the calling sequence in brackets ([ ]). > Expressions: You can specify expressions instead of equations. The solve command automatically equates them to zero. Solving for Specific Unknowns: By default, the solve command returns solutions for all unknowns. You can specify the unknowns for which to solve. > To solve for multiple unknowns, specify them as a list. > Transcendental Equations: In general, the solve command returns one solution to transcendental equations. > > To produce all solutions, use the allsolutions option. > Maple uses variables of the form _ZN~, where N is a positive integer, to represent arbitrary integers. The tilde (~) indicates that it is a quantity with an assumption. For information about names with assumptions, see Assumptions on Variables . RootOf Structure: The solve command may return solutions, for example, to higher order polynomial equations, in an implicit form using RootOf structures. > (4.7) These RootOf structures are placeholders for the roots of the equation The index parameter numbers and orders the four solutions. Like any symbolic expression, you can convert RootOf structures to a floating-point value using the evalfcommand. > Some equations are difficult to solve symbolically. For example, polynomial equations of order five and greater do not in general have a solution in terms of radicals. If the solve command does not find any solutions, it is recommended that you use the Maple numerical solver, fsolve. For information, see the following section, Numerically Solving Equations. For more information on the solve command, including how to solve equations defined as procedures and how to find parametric solutions, refer to thesolve/detailshelp page. In the main ODE Analyzer Assistant window, you can define ODEs, initial or boundary value conditions, and parameters. To define derivatives, use the diff command. For example, diff(x(t), t) corresponds to and diff(x(t), t, t) corresponds to For more information on the diff command, see The diff Command. After defining an ODE, you can solve it numerically or symbolically. To solve a system numerically using the ODE Analyzer Assistant: 1. Ensure that the conditions guarantee uniqueness of the solution. 2. Ensure that all parameters have fixed values. 3. Click the Solve Numerically button. 4. In the Solve Numerically window (Figure 4.4), you can specify the numeric method and relevant parameters and error tolerances to use for solving the problem. 5. To compute solution values at a point, click the Solve button. x Figure 4.4: ODE Analyzer Assistant: Solve Numerically Dialog To solve a system symbolically using the ODE Analyzer Assistant: 1. Click the Solve Symbolically button. 2. In the Solve Symbolically window (Figure 4.5), you can specify the method and relevant method-specific options to use for solving the problem. 3. To compute the solution, click the Solve button. Figure 4.5: ODE Analyzer Assistant: Solve Symbolically Dialog When solving numerically or symbolically, you can view a plot of the solution by clicking the Plot button. • To plot the solution to a symbolic problem, all conditions and parameters must be set. • To customize the plot, click the Plot Options button to open the Plot Options window. To view the corresponding Maple commands as you solve the problem or plot the solution, select the Show Maple commands check box. You can control the return value of the ODE Analyzer using the On Quit, Return drop-down list. You can select to return nothing, the displayed plot, the computed numeric procedure (for numeric solutions), the solution (for symbolic solutions), or the Maple commands needed to produce the solution values and the displayed plot. Maple generally prints only the return value, errors, and warnings during a computation. To print information about the techniques Maple uses, increase the infolevelsetting for the command. To return all information, set infolevel to 5. > > Checking arguments ... First set of solution methods (general or quase general solution) Second set of solution methods (complete solutions) Trying methods for first order PDEs Second set of solution methods successful For more information on solving PDEs, including numeric solutions and solving PDE systems, refer to the pdsolvehelp page. Integer Equations To find only integer solutions to an equation, use the isolve command. The isolve command finds solutions for all variables. > Integer Equations in a Finite Field To solve an equation modulo an integer, use the msolve command. The msolve command finds solutions for all variables. > Solving Linear Systems To solve a linear system, use the LinearAlgebra[LinearSolve] command. The LinearSolve command returns the vector x that satisfies A . x = B. For example, construct an augmented matrix using the Matrix palette (see Creating Matrices and Vectors ) in which the first four columns contain the entries of A and the final column contains the entries of B. > > For more information on using Maple to solve linear algebra problems, see Linear Algebra. Solving Recurrence Relations To solve a recurrence relation, use the rsolve command. The rsolve command finds the general term of the function. > 4.5 Units, Scientific Constants, and Uncertainty In addition to manipulating exact symbolic and numeric quantities, Maple can perform computations with units and uncertainties. Maple has a library of hundreds of scientific constants with units, including element and isotope properties. To support computations with uncertainties, Maple propagates errors through computations. Units The Units package in Maple provides a library of units, and facilities for using units in computations. It is fully extensible so that you can add units and unit systems as required. Note: Some unit operations are available as task templates (see Tools→Tasks→Browse) and through context menus. Overview of Units A dimension is a measurable quantity, for example, length or force. The set of dimensions that are fundamental and independent are known as base dimensions. In Maple, the base dimensions include length, mass, time, electric current, thermodynamic temperature, amount of substance, luminous intensity, information, and currency. For a complete list, enter and execute Units[GetDimensions](). Complex dimensions (or composite dimensions) measure other quantities in terms of a combination of base dimensions. For example, the complex dimension force is a measurement of Each dimension, base or complex, has associated units. (Base units measure a base dimension. Complex units measure a complex dimension.) Maple supports over 40 units of length, including feet, miles, meters, angstroms, microns, and astronomical units. A length must be measured in terms of a unit, for example, a length of 2 parsecs. For the complete list of units (and their contexts and symbols) available for a dimension, refer to the corresponding help page, for example, theUnits/length help page for the units of length. Each unit has a context. The context differentiates between different definitions of the unit. For example, the standard and US survey miles are different units of length, and the second is a unit of time and of angle. You can specify the context for a unit by appending the context as an index to the unit, for example, mile[US_survey]. If you do not specify a context, Maple uses the default context. Units are collected into systems, for example, the foot-pound-second (FPS) system and international system, or système international, (SI). Each system has a default set of units used for measurements. In the FPS system, the foot, pound, and second are used to measure the dimensions of length, mass, and time. The unit of speed is the foot/second. In SI, the meter, kilogram, and second are used to measure the dimensions of length, mass, and time. The units of speed, magnetic flux, and power are the meter/second, weber, and watt, respectively. Unit Conversions To convert a value measured in a unit to the corresponding value in a different unit, use the Units Calculator. To insert a unit, use the Units palettes. The Units (FPS) palette (Figure 4.7) contains important units from the foot-pound-second system of units. The Units (SI) palette (Figure 4.8) contains important units from the international system of units. Figure 4.7: Units (FPS) Palette Figure 4.8: Units (SI) Palette To insert a unit: • In a Units palette, click a unit symbol. > To insert a unit that is unavailable in the palettes: 1. In a Units palette, click the unit symbol . Maple inserts a Unit object with the placeholder selected. 2. In the placeholder, enter the unit name (or symbol). For example, to enter standard (the default context) miles, you can specify the unit name, mile, or symbol, mi. > The context of a unit is displayed only if it is not the default context. Important: In 1-D Math input, the quantity and unit (entered using the top-level Unit command) are a product, not a single entity. The following calling sequences define different expressions. > 1*Unit(m)/(2*Unit(s)); > 1*Unit(m)/2*Unit(s); Some units support prefixes. For example, SI units support prefixes to names and symbols. You can specify 1000 meters using kilometer or km. > Performing Computations with Units In the default Maple environment, you cannot perform computations with quantities that have units. You can perform only unit conversions. For more information about the default environment, refer to theUnits/default help page. To compute with expressions that have units, you must load a Units environment, Natural or Standard. It is recommended that you use the Standard environment. > In the Standard Units environment, commands that support expressions with units return results with the correct units.
Purpose: Students credited with this module will have understanding of basic ideas of algebra and to apply the basic techniques in handling problems related to: the theory of polynomials, systems of linear equations, matrices, the complex number system, sequences, mathematical induction, and binomial theorem
UMCP Developmental Math Program What is the Developmental Math Program? Each student graduating from UMCP, unless exempted, must have passed the Fundamental Studies Mathematics requirement. In order to determine the student's mathematical preparation for taking one of the courses satisfying this requirement, or a math course satisfying a major requirement, all entering students must take the Mathematics Placement Test (except for students entering with college level calculus credits, either through AP or another college). Using the results of this test the student is placed into one of the Mathematics Department's courses. Students who do not place into the desired credit bearing courses (Math 110, 113, 111, 115 or higher) must take the developmental math course Math 003 or a combined developmental-fundamental course as described below. What is Math 003? Math 003 covers high school algebra I and II. A student receives no academic credit for Math 003 but will receive three "institutional" credits that count toward full time status at the university and for use in qualifying for scholarships and loans. A student must pay a special fee to take Math 003. How are students placed? Placement is based on a student's score on the Mathematics Placement Test. The "upper half" of the students who place into the Developmental Math Program will be invited to take a one semester course which will combine the appropriate Developmental Algebra course with a credit bearing course that will satisfy the Fundamental Studies Math requirement. The "lower half" of these students will be enrolled into Math 003 which will be taught using a self-paced computer program. (The actual determination of what is meant by "upper half" and "lower half" depends on the level of sophistication of the course for which the student is preparing.) How do the combined courses work? The courses Math 010, 013 and 015 are combined developmental/fundamental courses for Math 110, Math 113, and Math 115 (respectively). The purpose of the combined courses is to give a student the opportunity to get through both the developmental prerequisite and the credit-bearing course itself in a single semester. For example, suppose a student arrives at UMCP and wants to take Math 110 but qualifies only for the combined version of Math 110, and elects to take this course. The course will meet for 5 hours a week. The initial 5 weeks will be spent reviewing and teaching the algebra skills necessary to succeed in Math 110. The student will officially be enrolled in Math 010 during this time. At the end of the five week period, the student will retake the Placement Test. If this time around the student qualifies for Math 110 (as the great majority should) then she/he will continue in the class and the regular curriculum in Math 110 will be covered over the remainder of the semester. The student's registration will automatically change from Math 010 to Math 110. On the other hand, if after retaking the Placement Test the student still does not qualify for Math 110, then that student must go to the computer based developmental math course Math 003 for further work on the basic algebra skills. The student who qualifies into Math 110 after five weeks and is successful in completing Math 110 will receive 3 credits and a grade just as if she/he had started the semester in Math 110. And the student will have finished in one semester instead of the two required to take Math 003 followed by Math 110. The special developmental math fee charged to students taking Math 003 will also be charged to students taking one of the combined courses. How are prerequisites met in Math 003? Each student enrolled in this course will work individually, using a self-paced computer course. Students will be in sections that meet 6 hours per week in dedicated computer labs. Each section will be under the close supervision of an instructor who will place the students at the appropriate level in the program, help the students with questions on their work, present tutorials and mini-lectures on difficult points, administer homework, quizzes and exams, and certify the students' success or failure during and at the end of the course. There will always be someone in the room to assist the students. All students, regardless of their level of algebra skills, will be in the same section of Math 003. They will be working in different parts of the computer program depending on their skills and goals. There will be five distinct modules, subsets of the program, that the students will be working on. Completing one of these will be necessary for passing Math 003. The modules will be preparation for taking Math 110, 111, 113, or 115 and the additional module will be for the students who need pre-algebra preparation (LAS module). Progression from Math 003 to credit bearing courses will be as follows: Complete successfully May enroll in the following semester LAS Module Math 003, 010 Module 110 Module Math 110 111 Module Math 110, 113, 111, Stat 100 113 Module Math 110, 113 115 Module Math 110, 113,111, Stat 100, 115 There has been extensive experimentation with the computer program we use, and it has been successful in preparing students who conscientiously stick with it. In addition to the students being able to place into other courses as indicated above by passing one of the modules, the students will also be given the Math Placement Test again at the end of the term. The students' score on that test at that time will be allowed to override the placement determined by the modules. The course Math 003 was developed to replace two previous courses, Math 001 and 002 (corresponding to high school algebra I and II). Because students may begin Math 003 at different mathematical levels, a student is allowed to pass Math 003 twice for institutional credit. What changed in the developmental math program? Before Fall 2001, there were two courses (Math 001 and 002) instead of Math 003, and these courses were taught in a standard classroom environment. Math 003 uses the self-paced computer program to meet needs more individually, promote student involvement, and allow accelerated progress through developmental mathematics. Also before Fall 2001, there was no combined course alternative; for example, a student needing Math 113 for calculus but not placing into Math 113 would be forced to spend a semester on developmental math before spending a semester on Math 113.
Basic College Mathematics - With CD - 5th edition Summary: A worktext format for basic college math or arithmetic courses including lecture-based, self-paced, and modular classes. John Tobey and Jeff Slater are experienced developmental math authors and active classroom teachers. The Tobey approach focuses on building skills one at a time by breaking math down into manageable pieces. This building block organization is a practical approach to basic math skill development that makes it easier for students to unde...show morerstand each topic, gaining confidence as they move through each section. Knowing students crave feedback, Tobey has enhanced the new edition with a "How am I Doing?" guide to math success. The combination of continual reinforcement of basic skill development, ongoing feedback and a fine balance of exercises makes the fifth edition of Tobey/Slater Basic College Mathematics even more practical and accessible. Features Chapter Organizers neatly summarize the chapter topics, procedures and corresponding examples all in one place to simplify chapter review. Develop Your Study Skills boxes throughout remind and encourage students to hone these all-important study skills. A Mathematics Blueprint for Problem Solving provides a consistent and interactive outline that helps students organize their approach to problem solving. The Blueprint helps students know where to begin, and how to understand the process, plan subsequent steps, and successfully solve applications. Problem Solving is thorough, integrated throughout and easy to follow with key steps highlighted with the pedagogical use of color. Putting Your Skills to Work applications provide opportunities to solve real world situations using newly mastered math skills. Students utilize critical thinking skills, analyze and interpret data and solve using situations encountered in daily life. Math in the Media exercises offer students yet another opportunity to see how the math they are learning applies to the world around them. Exercises are paired and graded (easy to more difficult) and each exercise set includes Verbal and Writing Skills and Mixed Practice exercises. A built-in solutions manual offers worked out solutions to the practice problems and reinforces the problem solving process
Educational Use Browse Materials (293) This is a comprehensive Personal Finance text which includes a wide range ... (more) This is a comprehensive Personal Finance text which includes a wide range of pedagogical aids to keep students engaged and instructors on track. This book is arranged by learning objectives. The headings, summaries, reviews, and problems all link together via the learning objectives. This helps instructors to teach what they want, and to assign the problems that correspond to the learning objectives covered in class.Personal Finance includes personal finance planning problems with links to solutions, and personal application exercises, with links to their associated worksheet(s) or spreadsheet(s). In addition, the text boasts a large number of links to videos, podcasts, experts' tips or blogs, and magazine articles to illustrate the practical applications for concepts covered in the text. (less) In this course, you will cover some of the most basic math applications, like decimals, percents, and even fractions. You will not only learn the theory behind these topics, but also how to apply these concepts to your life. You will learn some basic mathematical properties, such as the reflexive property, associative property, and others. The best part is that you most likely already know them, even if you did not know the proper mathematical terminology. (less) An introduction to mathematical topics not included in the standard coursework, delivered ... (more) An introduction to mathematical topics not included in the standard coursework, delivered by topics and projects chosen by the student. The objective of this course is to study the basic theory and methods in the toolbox of the core of applied mathematics, with a central scheme that addresses "Ů_Ęinformation processing__" and with an emphasis on manipulation of digital image data This course was recently revised to meet the MIT Undergraduate Communication Requirement (CR). It covers the same content as 18.310, but assignments are structured with an additional focus on writing. (less) These resources are a selection of audio and video podcasts from a ... (more) These resources are a selection of audio and video podcasts from a first year Dynamics class MAM1044H at the University of Cape Town. The lectures cover a wide range of topics. Systematic introduction to the elements of mechanics kinematics in three dimensions Newtons laws of motion models of forces friction elastic springs fluid resistance Conservation of energy and momentum Simple systems of particles including brief introduction to rigid systems Orbital Mechanics with applications to the planning of space missions to the outer planets (less) " This course is about mathematical analysis of continuum models of various ... (more) " This course is about mathematical analysis of continuum models of various natural phenomena. Such models are generally described by partial differential equations (PDE) and for this reason much of the course is devoted to the analysis of PDE. Examples of applications come from physics, chemistry, biology, complex systems: traffic flows, shock waves, hydraulic jumps, bio-fluid flows, chemical reactions, diffusion, heat transfer, population dynamics, and pattern formation." agriculture ... (more) This task was developed by high school and postsecondary mathematics and agriculture health ... (more) This task was developed by high school and postsecondary mathematics and health
I like Artin's book, but I don't think I'd recommend it for self-study. It's excellent if you have a teacher to go through it with, but I think it's just too dense for a self-study course. Depending on what the OP is actually interested in, one or more cryptography texts might be appropriate: many of them introduce abstract algebra (with applications!), and a few of their introductions are actually good. I had a course using the book "Topics in Applied Abstract Algebra" by Nagpaul and Jain. It's a nice, short, self-contained book, covering wallpaper groups, some coding theory, BIBDs, encryption, boolean circuits, and something else I can't remember. :) It's a classic, has all you need, but may be a bit dry for someone who's starting out. Number theory, discrete math and graph theory is a fun and intuitive way to start toying with "applied" algebraic concepts. I am on a tour of the "major fields" in mathematics as defined by this wiki entry. Since I am not a mathematician, it really helps to know what kind of problems a particular field solves before I delve into the theorems and derivations. But to answer your question...I dont know exactly right now but I hope to use it somewhere : ) I do abstract algebra, but not with the intention of using it for anything. After a certain degree of abstractness, the only applications I know of are high end theoretical physics. Not that I can give examples. Mathematics may have some practical applications, but that's not why I do it. It's like sex, that way. (quote, some guy)
The American Mathematical Society (AMS) was founded in 1888 in order to further mathematical research and scholarship. Since that time, they have embarked on a number of outreach programs designed to educate the public... FREE (Federal Resources for Educational Excellence) is a website from the United States Department of Education that makes hundreds of learning resources from over forty federal organizations available and searchable in... A series of online tutorial units with quizzes designed for students in the introductory college or university physics course. The page includes topics from math, physics, and biophysics. Remedial material includes... Exercises posted on this web site offer an opportunity for students to evaluate how much they have retained in various subjects of Algebra. Topics covered include geometry, functions, vectors, and statistics. There are... This web page, authored and curated by David P. Stern, introduces vectors as an extension of numbers having both magnitude and direction. The initial motivation is to describe velocity but the material includes a...
More About This Textbook Overview This text includes a history of math and covers logic, computing, finance, and geometry. The numerous exercise and problem sets, including writing exercises, provide non-majors with a thorough foundation of mathematics. Optional Road Maps, included in the preface, provide different ways to organize chapter topics in a coherent fashion, and ideas and goals for various approaches to teaching the course. (This information is expanded upon in the Instructor's Manual
Casio FX 83 ES Date:11/11/12, updated on 12/11/12 (62 review reads) Rating: Advantages: Easy to use Disadvantages: Can swap modes accidently I was given this calculator free at a conference for maths teachers and was delighted with the gift. I've had it for at least three years now and its still going strong with daily use (including the odd lend to a pupil). As a scientific calculator, it has all the functions you would expect including powers and roots, trig functions, fraction keys, π and follows the mathematical standard BODMAS rules for calculation. It also allows you to easily swap between the different measures of angles and displays on screen which measure you are using. It will also give answers in a selected format either exact values (including surds and fractions) or decimals. You can set the calculator to one of these but also swap between options by the use of one button. From my perspective as a maths teacher, I recommend this calculator to pupils because of the following strengths: * Calculations, including applying a trig function, are input in the same order that they are written in class work and exams (this is not true of all calculators. * The description on buttons are very clear and again are similar to what would be used in written work. In my experience, most pupils can navigate their way around this keyboard with less support than other calculator makes. * The navigation button in the middle allows for checking of work where an incorrect working is obtained so pupils can see any keying errors. The one drawback that this calculator has is that it can change its setting if left loose in your bag. This can be easily rectified by using the reset key or changing the mode but can be off putting and lead to potential errors if not checked. From a teaching perspective it comes with good support. I have purchased a piece of software that allows me to project they keyboard onto the smart screen so allowing me to walk pupils through any calculations being done for the first time. Overall I would say this is a great wee calculator which will see any child through their high school maths career.
Easy Mathematics Step-by-Step Overview Take it step-by-step for math success! The quickest route to learning a subject is through a solid grounding in the basics. So what you won't find in Easy Mathematics Step-by-Step is a lot of endless drills. Instead, you get a clear explanation that breaks down complex concepts into easy-to-understand steps, followed by highly focused exercises that are linked to core skills--enabling learners to grasp when and how to apply those techniques. This book features: *Large step-by-step charts breaking down each step within a process and showing clear connections between topics and annotations to clarify difficulties *Stay-in-step panels show how to cope with variations to the core steps *Step-it-up exercises link practice to the core steps already presented *Missteps and stumbles highlight common errors to avoid You can master math as long as you take it Step-by-Step! Author Information SANDRA LUNA MCCUNEis a former Regents Professor and math specialist in the Department of Elementary Education at Stephen F. Austin State University, where she received the Distinguished Professor Award. She now is a full-time author and consultant and resides in Austin, Texas.
Contemporary Abstract Algebra - 8th edition Summary: CONTEMPORARY ABSTRACT ALGEBRA, EIGHTH EDITION provides a solid introduction to the traditional topics in abstract algebra while conveying to students that it is a contemporary subject used daily by working mathematicians, computer scientists, physicists, and chemists. The text includes numerous figures, tables, photographs, charts, biographies, computer exercises, and suggested readings giving the subject a current feel which makes the content interesting and relevant for students. ...
Pre-Algebra - GDA By Golden Delicious Apps Description Pre-Algebra One is a complete curriculum for students who need help mastering the skills needed for Algebra and beyond. This teaching tool provides guided instruction, video demonstrations and practice problems. Designed by veteran math teacher Joel Bezaire of the University School of Nashville, Pre-Algebra One will replace traditional text books in his classes.
algebra.help: This site has lessons on basic algebra topics and techniques, study tips, calculator advice, worksheets, and more. EdHelper: This site generates practice worksheets over a broad range of topics such as fractions, percents, ratios, polynomials, general algebra, geometry, trigonometry, and word problems. To receive an unlimited number of worksheets, or to get the answers, you will need to subscribe. Exercises in Math Readiness: EMR has lessons, examples, and short quizzes (complete with hints and solutions). They cover only a few topics, but the coverage is excellent, and extends from algebra to trigonometry and set theory. Home Schooling Unlimited: There are loads of worksheets available, with fresh exercises generated for each click. Scroll down to the bottom half of this page to find the algebra and graphing practice sheets. Infinite Algebra: Kuta Software offers many free algebra worksheets (in PDF form). The worksheets list the answers, but do not provide hints or worked solutions. (Note: The software package Kuta offers helps instructors with designing tests, and is not intended for students.) Maths Is Fun: If you'd like extra practice or instruction on pre-algebra or early-algebra topics, Maths Is Fun is a great resource. The site also has worksheets, a tutoring forum, puzzles, and teaching games. PiCrust's worksheet collection: Prof. Schulte has posted a collection of worksheets at her PiCrust site. The sheets, covering basic math through calculus, come from a variety of sources; most are Adobe Acrobat (that is, PDF) documents. U. of A. Software: This software contains self-testing quizzes, but the "Help" contains good lessons. The programs are DOS-based, but very user-friendly. Scroll down the page to "Are You Ready?", and choose your level. f you think your site should be listed here, please submit the URL, explaining how you think your free (or free-to-try) products and/or services would aid algebra students. Listings are added at the webmistress' discretion; listings for "calculators" and "graphers" are no longer being accepted. Sorry.
A diagnostic test with explained answers to help students identify their strengths and weaknesses Advice on using a graphing calculator A detailed review of all test topics, including polynomial, trigonometric, exponential, logarithmic, and rational functions; coordinate and three-dimensional geometry; numbers and operations; and much more Now fully adapted to reflect Canadian drug information, measurement, legislation, and standards, Henke's Med Math, First Canadian Edition is an excellent choice for giving students an in-depth understanding of dosage calculation and principles of drug administration. It presents step-by-step approaches to solving problems and includes dosage problems that simulate actual clinical experience. Each chapter includes numerous examples, self-tests, and proficiency tests. Multiple dosage calculation methodologiesŚformula, ratio, proportion, and dimensional analysisŚare taught, allowing students to adopt their preferred method. In addition, calculations are included for intravenous pediatric, PCA, and critical care medicationsAC circuit analysis gives many students problems, but in reality any student can fully understand how to analyze circuits that involve Alternating Current. In this course, the student will first begin by understanding what Alternating Current is and why it is important. Next, we'll review essential math concepts such as complex numbers and sinusoidal functions. Next, we will introduce the important topic of the Phasor, which will be the primary tool that we will use to solve AC circuits with sinusoidal sources. Finally, we will learn about impedance and how to solve AC circuits using phasors that involve kirchhoff's laws, series/parallel combinations, and more. Every topic is taught with step-by-step solved example problems.
"It is fun to figure out the puzzle of how children go about making sense of mathematics and then how to help teachers help kids.� John A. Van de Walle, Late of Virginia Commonwealth University  This is the philosophy behind Elementary and Middle School Mathematics: Teaching Developmentally. John A. Van de Walle wrote this book to help students understand mathematics and become confident in their ability to teach the subject to children in kindergarten through eighth grade. Although he could not have foreseen the changes in mathematics teaching over the last three decades, he was at the forefront of the movement towards a constructivist view of teaching, or teaching developmentally. Constructivism says that children construct their own knowledge. They are not blank slates waiting to absorb whatever the teacher tells them. Teachers must understand both mathematics itself and how students learn mathematics in order to teach it effectively.  Learning through problem solving is another major theme of this book. Students solve problems not just to apply mathematics, but also to learn new mathematics. Effective problems will take into account where students are, the problematic or engaging aspect of the problem must be due to the mathematics that the students are to learn and not be diluted by non-mathematical activities such as cutting or pasting, and the problem must require justifications and explanations for answers and methods. Learning then becomes an outcome of the problem solving process.  The book also addresses in more detail than any other book on the market the effect that the trends of standards-based education, increased pressure to test, and increased teacher accountability have had on teaching mathematics. He addresses the 2000 NCTM Standards in depth, in Chapter 1 on Teaching Mathematics in the Era of the NCTM Standards, through the NCTM icon that appears in the margins throughout ... Ess The Section Section 2 (chapters 11 and 12) discusses testing and evaluation, including the principles of test selection and administration as well as the scoring and interpretation of results. Section dynami... Success in your calculus course starts here! James Stewart's Single Variable Calculus texts are world-wide best-sellers for a reason: they are clear, accurate, and filled with relevant, real-world examples. With Single Variable Calculus: Early Transcendentals, 7thReaders continue to turn to Klein because it enables them to better understand fundamental principles, solve problems, and focus on what they need to know to succeed. This edition explores the major principles in the field and explains why they are relevant. It is written in a way that clearly shows the patterns in organic chemistry so that readers can gain a deeper conceptual understanding of the material. Topics are presented clearly in an accessible writing style along with numerous of hands-on problem solving exercises. The Publication Manual of the American Psychological Association" is the style manual of choice for writers, editors, students, and educators in the social and behavioral sciences. It provides invaluable guidance on all aspects of the writing process, from the ethics of authorship to the word choice that best reduces bias in language. Well-known for its authoritative and easy-to-use reference and citation system, the Publication Manual also offers guidance on choosing the headings, tables, figures, and tone that will result in strong, simple, and elegant scientific communication. The sixth edition offers new and expanded instruction on publication ethics, statistics, journal article reporting standards, electronic reference formats, and the construction of tables and figures. The sixth edition has been revised and updated to include: new ethics guidance on such topics as determining authorship and terms of collaboration, duplicate publication, plagiarism and self-plagiarism, disguising of participants, validity of instrumentation, and making data available to others for verification; new journal article reporting standards to help readers report empirical research with clarity and precision; simplified APA heading style to make it more conducive to electronic publication; updated guidelines for reducing bias in language to reflect current practices and preferences, including a new section on presenting historical language that is inappropriate by present standards; new guidelines for reporting inferential statistics and a significantly revised table of statistical abbreviations; and, new instruction on using supplemental files containing lengthy data sets and other media. This book includes significantly expanded content on the electronic presentation of data to help readers understand the purpose of each kind of display and choose the best match for communicating the results of the investigation, with new examples for a variety of data displays, including electro physiological and biological data. It offers ... Long acclaimed as the definitive introductory botany text for majors, Biology of Plants is especially known for its comprehensive coverage and its magnificent art program. The new edition offers a wealth of new information, especially in the areas of taxonomy, genomics, plant hormones, and Arabidopsis research. Discrete Mathematics and its Applications, 7th edition--from computer science to data networking, to psychology, to chemistry, to engineering, to linguistics, to biology, to business, and to many other important fields. Contemporary Human Behavior Theory: A Critical Perspective for Social Work, 3e approaches HBSE from a comparative theory perspective, providing coverage of the most current and contemporary theories as well as traditional theories. It includes contemporary developments in traditional lifespan theory, theories of political economy, and a separate chapter on transpersonal theory. Each chapter includes coverage of the research that supports a particular theory, an analysis of the validity of that research, and a discussion of updated "Contemporary Issues." The text encourages students to develop critical thinking skills in analyzing and comparing theories.
Introduction to Mathematical Thinking Book Description: In the twenty-first century, everyone can benefit from being able to think mathematically. This is not the same as "doing math." The latter usually involves the application of formulas, procedures, and symbolic manipulations; mathematical thinking is a powerful way of thinking about things in the world -- logically, analytically, quantitatively, and with precision. It is not a natural way of thinking, but it can be learned. Mathematicians, scientists, and engineers need to "do math," and it takes many years of college-level education to learn all that is required. Mathematical thinking is valuable to everyone, and can be mastered in about six weeks by anyone who has completed high school mathematics. Mathematical thinking does not have to be about mathematics at all, but parts of mathematics provide the ideal target domain to learn how to think that way, and that is the approach taken by this short but valuable book. The book is written primarily for first and second year students of science, technology, engineering, and mathematics (STEM) at colleges and universities, and for high school students intending to study a STEM subject at university. Many students encounter difficulty going from high school math to college-level mathematics. Even if they did well at math in school, most are knocked off course for a while by the shift in emphasis, from the K-12 focus on mastering procedures to the "mathematical thinking" characteristic of much university mathematics. Though the majority survive the transition, many do not. To help them make the shift, colleges and universities often have a "transition course." This book could serve as a textbook or a supplementary source for such a course. Because of the widespread applicability of mathematical thinking, however, the book has been kept short and written in an engaging style, to make it accessible to anyone who seeks to extend and improve their analytic thinking skills. Going beyond a basic grasp of analytic thinking that everyone can benefit from, the STEM student who truly masters mathematical thinking will find that college-level mathematics goes from being confusing, frustrating, and at times seemingly impossible, to making sense and being hard but doable. Dr. Keith Devlin is a professional mathematician at Stanford University and the author of 31 previous books and over 80 research papers. His books have earned him many awards, including the Pythagoras Prize, the Carl Sagan Award, and the Joint Policy Board for Mathematics Communications Award. He is known to millions of NPR listeners as "the Math Guy" on Weekend Edition with Scott Simon. He writes a popular monthly blog "Devlin's Angle" for the Mathematical Association of America, another blog under the name "profkeithdevlin", and also blogs on various topics for the Huffington Post
PAPERBACK Good 0766802302 Student Edition. No CD Included. Moderate dirt wear, wrinkling or creasing on cover or spine. Good binding. Moderate writing and highlighting. Cover has ...used book stickers or residue. Marker on cover or bottom edge of book.Read moreShow Less Ships from: Wentzville, MO innovative and highly unique approach responds to the current reform movement in mathematics and the need for effective solutions in the workplace. The many practical applications of math concepts are illustrated throughout each chapter. Through active participation in chapter projects, activities, labs and the use of the graphing calculator, the student learns how to intuitively and methodically develop an effective solution. Graphing calculators are introduced as tools to solve problems, explore quantitative relationships, and extend the students' understanding of math concepts. The classroom presentation of this material features a CD-ROM that provides simulations, data analysis techniques, graphical solutions and videos to further enhance delivery of this new and exciting approach to college mathematics. ALSO AVAILABLE Preliminary Volume II, ISBN: 0-7668-0208-6 Workbook, ISBN: 0-8273-8070-4 Presentation Software, ISBN: 0-8273-8465-3 INSTRUCTOR SUPPLEMENTS CALL CUSTOMER SUPPORT TO ORDER Diagnostic Software, ISBN: 0-8273-8486-6 Computerized Testbank, ISBN: 0-7668-0229-9 Solutions Manual, ISBN: 0-7668-0224-8 Instructor's Resource Guide, ISBN: 0-7668-0157-8 Related Subjects Meet the Author John C. Peterson is a retired Professor of Mathematics at Chattanooga State Technical Community College. He was a Vice President of the American Mathematical Association for Two-Year Colleges (AMATYC). He was also co-Project Director of the AMATYC project on Mathematics for the Emerging Technologies funded by the National Science Foundation and author of the project report: A Vision: Mathematics for the Emerging Technologies
Geometry: Euclid and Beyond (Undergraduate Texts in Mathematics) This book offers a unique opportunity to understand the essence of one of the great thinkers of western civilization. A guided reading of Euclid's Elements leads to a critical discussion and rigorous modern treatment of Euclid's geometry and its more recent descendants, with complete proofs. Topics include the introduction of coordinates, the theory of area, history of the parallel postulate, the various non-Euclidean geometries, and the regular and semi-regular polyhedra
The topics to be covered include the following: Groups and subgroups: revision of de nitions with the standard examples (GLn, Z, Z mod n, dihedral groups, Sn and An, introduction of basic properties such as uniqueness of identities and inverses, subgroup tests, Cayley tables, etc. Cosets and Lagrange's Theorem, direct products, statement without proof of the classification of fi nitely generated abelian groups. Homomorphisms. Quotient groups and normal subgroups. Group actions (orbits, stabilizers). First Isomorphism Theorem (2nd and 3rd stated without proof). Cayley graphs. Rings, Fields, Integral Domains. Field of fractions of an integral domain. Polynomial rings, including factorization of polynomials over a fi eld. Ring homomorphisms and quotient rings. Prime and maximal ideals. Introduction to extension fields: Algebraic extensions (defi nition of a vector space will be briefly recalled and hopefully de finition of a module will be at least mentioned in passing).UFDs and Euclidean domains. This course provides an introduction to the subject of topology, sometimes called "elastic geometry". This involves studying the most fundamental properties of geometric objects or spaces. The course will begin with the study of metric spaces – these are sets together with a function which gives the distance between any two points. Basic properties of these spaces and functions between them will be considered, and illustrated using examples such as Euclidean space, the taxicab metric, the chessboard metric and the railway metric. We will then see that metric spaces in turn are examples of topological spaces, and learn more about these more general objects. The course will continue with a look at surfaces (sphere, torus, and so on) and one of the crowning glories of 19th and early 20th century mathematics, the Classification of Surfaces, which tells us exactly what "and so on" means in this context. The ideas of the course are fundamental to analysis and topology, as well as many branches of geometry.
Subp. 2. Algebra. A. B. The student will use number sentences involving addition, subtraction, and unknowns to represent and solve real-world and mathematical problems. The student will create real-world situations corresponding to number sentences.
Math, Physics & Engineering Do you like math, but find traditional venues of learning math to be alienating? In this course, participants will decide how and what they want to learn, and support their fellow learners. A few things the group might do: help each other find topics to learn about hold each other accountable to goals set up study groups help each other find mentors have fun math parties At the first meeting, we'll determine the needs and goals of the individuals in the group and how best to support each other. We'll also determine the time that we'd like to meet. Location David and Maggie are second-year graduate students in the math department at the University of Minnesota. Both of us have a history of dropping out of school. We love math and we think it is more fun outside of the classroom. Like the idea of learning introductory Calculus without the pressures of the graded classroom? Have you ever wanted to see math put to practical use? This course will be intended to give anyone with a fluency in basic Algebra and Trigonometry the opportunity to learn introductory Calculus topics without the pressure. I am hoping to make this course fairly informal, interactive, and fun (Math fun?!). This course will give a slow to medium paced approach to basic Calculus with an abundance of real life applications, demos, pictures, and videos. What: Topics for the course include a review of basic algebra and trigonometry, the concept and use of derivation, an introduction to numerical methods, an introduction into the concept of integration and more. Practical examples will be an emphasis of this course; while the material may sound intimidating to the non-math saavy, these mathematical concepts CAN be used in everyday life and will give anyone a greater appreciation for physical phenomenon and Calculus application. When: This course will be offered in the summer of 2011, beginning in June and ending sometime in August. The times of the course offering are not yet set and will be determined by the availability of those interested in taking the class, but will most likely be once or twice a week in the afternoon or evening. Location is additionally unknown at this point in time. I will also be producing a course website for ease of access of materials and to host additional information for the more ambitious learner. Matt Hedlund is a Senior Undergraduate Student in the University of Minnesota, Biomedical Engineering Program. Don't be frightened, it's not as scary as it sounds. I have 4 years of experience in advanced mathematics and their applications into engineering problems. I am knowledgeable in Multivariable Calculus, Statistics, Thermodynamics, Fluid Mechanics, Statics and Dynamics, Deformable Body Mechanics and much more. I will be graduating in the spring of 2012 with a Bachelor's of Biomedical Engineering degree and a Bachelor of the Arts of Physiology. If you would like to learn more about myself or my intentions with this course, feel free to email me at [email protected] Facilitator phone number(s): 6125547635 Class minimum size: 5 Class maximum size: 20 Time/Location Class times: Thu, 07/14/2011 - 16:30 - 18:30 Thu, 07/21/2011 - 16:30 - 18:30 Thu, 07/28/2011 - 16:30 - 18:30 Thu, 08/04/2011 - 16:30 - 18:30 Thu, 08/11/2011 - 16:30 - 18:30 Thu, 08/18/2011 - 16:30 - 18:30 Thu, 08/25/2011 - 16:30 - 18:30 Additional class time information: This times and frequencies are only preliminary and are likely to change upon interest response
Calculus problems solved! by Help with calc If you are a college student or high school student and if you are taking a Math class, this is the app that you need! Not only does it give you the answer to any problem you compute into the program, it also gives you the step by step process on how to get that answer. It shows you the math and also tells you why each step is done. It is like having a personal tutor in your room helping you out on the problem. It has made calculus so much easier to understand and finish my homework without stress of what I just learned. If you hate getting stuck on your homework not knowing why you can't get the right answer or you don't know what the next step is, this will be so helpful for you. I promise you that the 3 dollars is well worth it, that you for sure will get your money's worth and then some. So if you are having problems with calculus or any math for that matter, this will be your dearest friend to put into your app library. Plus not only does it do math but it can answer a lot of other fact based questions as well. It's like google for facts. This App seems like it came from the future because it's just mind blowing! What are you waiting for? Your math homework awaits! Exceptional tool by Pale Glint While I haven't used any other functionality, its math-related abilities are incredible. As an early-level engineering student, the math I'm typically dealing with can be difficult to calculate, and in some cases, I'm unable to check my answer to fully make sure I'm understanding it. Wolfram Alpha helps me make sure I know that I got the correct answer. While its Boolean algebra abilities can be limited, it's amazing at differentiation and integration. By extension, it's been an incredible tool when using Laplace Transformation, as well as it's inverse operation, even in plain-text input It's plain-text abilities supersede any other math tool, and I can honestly say I use this app (and it's website) far more often than the program the school pays for. The additional keyboard with special symbols for math (such as an integral key and a square root key) are only bonuses. If you haven't used this app or this website, I definitely recommend it, even for its limitless non-math abilities. Almost by Conrad Lovejoy I haven't had a chance to browse through a significant portion of this app, but I was very interested when I noticed an engineering section, specifically a civil engineering section. Much to my disappointment there isn't much to it and the section regarding beam deflection consists of some pretty silly nonsense. WA needs some help in that section, especially if they are going to make me pay for an app that tells me the information that I input, which came straight from the AISC Manual (bible), is invalid. I'll have to look through the rest but it was disappointing to say the least. There are too many errors to even say that it's close so WA's best course of action might be to consult a structural engineer. You can borrow my AISC Manual at least if you'd like...try again, please.
Pure mathematics is one of the oldest creative human activities and this module introduces its main topics. Group Theory explores sets of mathematical objects that can be combined – such as numbers, which can be added or multiplied, or rotations and reflections of a shape, which can be performed in succession. Linear Algebra explores 2- and 3-dimensional space and systems of linear equations, and develops themes arising from the links between these topics. Analysis, the foundation of calculus, covers operations such as differentiation and integration, arising from infinite limiting processes. To study this module you should have a sound knowledge of relevant mathematics as provided by the appropriate Level 1 studyPure mathematics can be studied for its own sake, because of its intrinsic elegance and powerful ideas, but it also provides many of the principles that underlie applications of mathematics. This module is suitable whether you want a basic understanding of mathematics without taking the subject further, or to prepare for higher-level modules in pure mathematics, or if you teach mathematics (it includes a good deal of background to the A-level mathematics syllabuses, for example). You will become familiar with new mathematical ideas mainly by using pencil and paper and by thinking. You will need a scientific calculator but will not need it in the examination. You do not need a computer, though there are many opportunities to use one to reinforce your understanding of new topics if you so wish. IntroductionReal Functions and Graphs is a reminder of the principles underlying the sketching of graphs of functions and other curves. Mathematical Language covers the writing of pure mathematics and some of the methods used to construct proofs. Number Systems looks at the systems of numbers most widely used in mathematics: the integers, rational numbers, real numbers, complex numbers and modular or 'clock' arithmetics. Group Theory(A)Symmetry studies the symmetries of plane figures and solids, including the five 'Platonic solids', and leads to the definition of a group. Groups and Subgroups introduces the idea of a cyclic group, using a geometric viewpoint, as well as isomorphisms between groups. Permutations introduces permutations, the cycle decomposition of permutations, odd and even permutations, and the notion of conjugacy. Cosets and Lagrange's Theorem is about 'blocking' a group table, and leads to the notions of normal subgroup and quotient group. Linear AlgebraVectors and Conics is an introduction to vectors and to the properties of conic sections. Linear Equations and Matrices explains why simultaneous equations may have different numbers of solutions, and also explains the use of matrices. Vector Spaces generalises the plane and three-dimensional space, providing a common structure for studying seemingly different problems. Linear Transformations is about mappings between vector spaces that preserve many geometric and algebraic properties. Eigenvectors leads to the diagonal representation of a linear transformation, and applications to conics and quadric surfaces. Analysis (A)Numbers deals with real numbers as decimals, rational and irrational numbers, and goes on to show how to manipulate inequalities between real numbers. Sequences explains the 'null sequence' approach, used to make rigorous the idea of convergence of sequences, leading to the definitions of pi and e. Series covers the convergence of series of real numbers and the use of series to define the exponential function. Continuity describes the sequential definition of continuity, some key properties of continuous functions, and their applications. Group Theory (B)Conjugacy looks at conjugate elements and conjugate subgroups, and returns to the idea of normal subgroups in this context. Homomorphisms is a generalisation of isomorphisms, which leads to a greater understanding of normal subgroups. Group Actions is a way of relating groups to geometry, which can be used to count the number of different ways a symmetric object can be coloured. Analysis (B)Limits introduces the epsilon-delta approach to limits and continuity, and relates these to the sequential approach to limits of functions. Differentiation studies differentiable functions and gives l'Hôpital's rule for evaluating limits. Integration explains the fundamental theorem of calculus, the Maclaurin integral test and Stirling's formula. Power Series is about finding power series representations of functions, their properties and applications. You will learn Successful study of this module should improve your skills in working with abstract concepts, constructing solutions to problems logically and communicating mathematical ideas clearly. Entry This is a Level 2 module and you need a good knowledge of the subject area, obtained either from Level 1 study with the OU or from equivalent work at another university. You should have a good basic knowledge of elementary algebra, coordinate geometry, Euclidean geometry, trigonometry, functions, differentiation and integration. It would also be helpful to have met vectors, matrices and groups, though these are not essential. The ideal preparation would be good passes in both Essential mathematics 1 (MST124) and Essential mathematics 2 (MST125) (planned for October 2014), or their predecessors MST121 and MS221. Students are more likely to complete this module successfully if they have acquired their prerequisite knowledge through passing these modules. Our diagnostic quiz Am I ready to start M208? will help you to determine whether you are adequately prepared for this module. Preparatory work If you need to revise the subjects described in Entry, or you want to do some preparatory work, try reading some current A-level textbooks, such as the MEI Structured Mathematics texts on Pure Mathematics and Further Pure Mathematics published by Hodder. They contain plenty of exercises to get you used to regular study. For an exciting and accessible introduction to pure mathematics, try From Here to Infinity by Ian Stewart (Oxford Paperbacks). Regulations As a student of The Open University, you should be aware of the content of the Module Regulations and the Student Regulations which are available on our Essential documents website. If you have a disability Please be aware that the module contains a large number of diagrams. The study materials are available in Adobe Portable Document Format (PDF). Some Adobe PDF components may not be available or fully accessible using a screen reader and mathematical, scientific, and foreign language materials may be particularly difficult to read in this way. Written transcripts are available for the audio-visual material. The books are available in a comb-bound format DVDs, CDs, website. You will need DVD and CD playersStudents also studied How to register To register a place on this course return to the top of the page and use the Click to register button. Student Reviews "A great course. As an engineer by background (and therefore I've majored on very applied maths), this was a real ..." Read more "Overall, I am satisfied with the course. Some parts are quite challenging, however, this should not be taken as a
Homeschool View - Horizons Pre-Algebra Is Coming! The wait is over! With great excitement, Alpha Omega Publications is pleased to announce the upcoming release of its new math course for homeschooling families, Horizons Pre-Algebra! Available in mid-February of 2011, Horizons Pre-Algebra is the highly anticipated, colorful continuation of the award-winning K-6 math series. Recommended for 7th or 8th grade students, this fun-filled course is packed with diverse, colorful lessons that prepare your child for upper-level math courses with a review of vital basic math concepts and a robust introduction to algebra, trigonometry, and geometry. What's Inside? Comprised of three perfect-bound components, the packaged set includes a colorful student workbook, a user-friendly teacher's guide, and handy tests and resources book. Student Book Similar in layout to Horizons' popular K-6 math courses, the consumable, full-color Horizons Pre-Algebra Student Book includes 160 daily lessons. Designed for completion in 45-60 minutes, each engaging lesson displays an illustrated teaching box that details the new concept being taught, along with a new class work section which reinforces the information with guided practice. Also part of each lesson's assignment is an activities section that contains problems for reviewing both the current lesson topic and previously taught concepts. What will your child learn? Horizons Pre-Algebra readies your child for more advanced mathematics by teaching several new areas of math concepts, including the following: Another new feature of the 360-page student book is a set of college test prep questions. Following each block of ten lessons, these challenging problems are designed to help students prepare for standardized math testing. Also included in the Horizons Pre-Algebra Student Book is a new collection of interviews with ordinary people who use math in their daily vocations. Setting the stage for each group of lessons, these thought-provoking, math-minute interviews bring math concepts to life by adding a human interest touch to word problems. Teacher's Guide The 400-page Horizons Pre-Algebra Teacher's Guide makes homeschooling easier with a variety of helpful resources, including daily lesson plans with clearly-defined objectives, practical teaching tips, and suggested materials lists; a math readiness test for evaluation; an in-depth scope and sequence; appearance of concepts charts; and solution keys that making grading a breeze as they mirror a reduced version of student worksheet pages for daily lessons, bi-weekly tests, and quarterly exams. Tests and Resources Book The Horizons Pre-Algebra Tests and Resources Book gives peace of mind that your student is comprehending concepts with easy-to-use, tear-out materials that include 80 review worksheets, 16 tests, and 4 exams. Each test conveniently follows every10 lessons, and each exam comes after every group of 40 lessons. Along with a detailed guide that indicates when and where to use each worksheet, test, and exam, this Horizons Tests and Resources Book also provides hands-on, cut-out supplements that assist both visual and kinesthetic learners in mastering algebraic concepts. Included are formula strips, full-color net diagrams of 3-D shapes, and color-coded algebra squares printed on cardstock. Always a best-seller, Horizons is well-known for its captivating content, appealing activities, and solid results. Wondering if your child is ready for AOP's new Horizons Pre-Algebra? Find out now by downloading the Horizon Pre-Algebra Readiness Test today forWE ARE SOOO EXCITED. WE ARE FINISHING UP HORIZONS 6. IT WAS SAD TO THINK THAT WAS IT. NOW WE CAN CONTINUE WITH WHAT MY KIDS SAY IS THE BEST MATH OUT THERE - HORIZONS. THANK YOU! Posted on: 02.10.11 | Rating: 0 ELINE P Please, continue the serie. dc will never love math, I think, but after a few years in 4th grade she finally liked math. A great job. And please keep it spiral... Posted on: 08.19
Will students volunteer for the program or be referred from their Math 2 (or 3) class? Various methods of enrollment will be available. If a student is in the computer-aided program, will post-testing be done to document that he/she passes specific units? Yes. Will post- testing be conducted in the computer-aided setting? Yes. What are the specific steps to enter and exit the class? Compass testing will determine a student's starting point in RPM. Is the computer-aided setting for RPM open or is it scheduled like a regular class? RPM is scheduled like a regular class—students attend on a regular class schedule (as noted in the semester class schedule). Can students take the class online, as hybrid, or only in-person? Only in-person There are no costs for textbooks? Yes. Currently, the ebook for the RPM Math 2 and 3 classes is free. Does the computer-aided setting take the actual place of a traditional Math 2 or 3 class? Yes.
Linear Algebra 9780817642945 ISBN: 0817642943 Edition: 2 Pub Date: 2004 Publisher: Birkhauser Boston Summary: From a review of the first edition: "A logical development of the subject . . . all the important theorems and results are discussed in terms of simple worked examples. The student's understanding . . . is tested by problems at the end of each subsection, and every chapter ends with exercises." a?CURRENT SCIENCE A cornerstone of undergraduate mathematics, science, and engineering, this clear and rigorous presentation... of the fundamentals of linear algebra is unique in its emphasis and integration of computational skills and mathematical abstractions. The power and utility of this beautiful subject is demonstrated, in particular, in its focus on linear recurrence, difference and differential equations that affect applications in physics, computer science, and economics. Key topics and features: a? Linear equations, matrices, determinants, vector spaces, complex vector spaces, inner products, Jordan canonical forms, and quadratic forms a? Rich selection of examples and explanations, as well as a wide range of exercises at the end of every section a? Selected answers and hints a? Excellent index This second edition includes substantial revisions, new material on minimal polynomials and diagonalization, as well as a variety of new applications. The text will serve theoretical and applied courses and is ideal for self-study. With its important approach to linear algebra as a coherent part of mathematics and as a vital component of the natural and social sciences, Linear Algebra, Second Edition will challenge and benefit a broad audience. Kwak, Jin Ho is the author of Linear Algebra, published 2004 under ISBN 9780817642945 and 0817642943. Five hundred fifty five Linear Algebra textbooks are available for sale on ValoreBooks.com, two hundred three used from the cheapest price of $33.79, or buy new starting at $3.99
Quadratic By William Beastall Description Quadratic helps students learning how to solve quadratic equations for GCSE Maths exams, or equivalent. The 'plus': Quadratic retains rational numbers and surds (such as √5) in the solution whenever possible, unlike other software which just gives the numerical solution. Automatic generation of suitable quadratic equations to solve, or tap in your equation using the special keyboard. An interactive graph is built in and three other solution methods are available with the in app upgrade: solution by 'completing the square', finding factors or using the standard quadratic formula. Print the results or share them by email or message. What's New in Version 2.1 Updated for ios7. New: advanced mode solves simultaneous quadratic/linear equations. Free access to graphical solutions, upgrade for a small fee to use all the solution methods: completing the square, factors and the quadratic formula.
IMathAS (Internet Mathematics Assessment System) is a Web-based math testing and homework system. It is a light course/learning management system and testing system, similar to and inspired by WebWork and WIMS, and similar to textbook-bundled systems like iLrn and MathXL. It requires a browser with MathML and SVG support such as Firefox 1.5 or IE6 with plugins.
Stuck on a math problem? WSU's math center offers instant helpNathan Hamlin, director of the center, said some students use it as a kind of study hall, bringing math homework with them and working through problems; if they encounter an issue, they raise their hand for help. Others bring a list of issues they're having to work through all at once. And still other students gather at the center in teams, working through a set of problems and calling for aid if they need it. The center opened 18 months ago, and use has grown dramatically since that time. Last semester, the center averaged 1,729 visits from students each week. Overall, nearly 26,000 student visits were counted over the course of the 15-week semester, and students stayed for an average of 1.5 hours each time they dropped in. "I think this is one of the most important things WSU has done for undergraduate students in the 25 years I've been here," said Sandy Cooper, associate professor of mathematics and associate chair of the Department of Mathematics, in a statement
Share to your social networks. Mathematics 111.1 Introduction 11.2 Sets and their Representations 11.3 The Empty Set 51.4 Finite and Infinite Sets 61.5 Equal Sets 71.6 Subsets 91.7 Power Set 121.8 Universal Set 121.9 Venn Diagrams 131.10 Operations on Sets 141.11 Complement of a Set 181.12 Practical Problems on Union and Intersection of Two Sets 21 6.1 Introduction 1166.2 Inequalities 1166.3 Algebraic Solutions of Linear Inequalities in One Variableand their Graphical Representation 1186.4 Graphical Solution of Linear Inequalities in Two Variables 1236.5 Solution of System of Linear Inequalities in Two Variables 127
Beginning Algebra, CourseSmart eTextbook, 6th Edition Description Now with offline access functionality, CourseSmart offers instructors and students the freedom and convenience of online, offline, and mobile access using a single platform. CourseSmart eTextbooks do not include media or supplements that are packaged with the bound textbook. Elayn Martin-Gay's developmental math textbooks and video resources are motivated by her firm belief that every student can succeed. Martin-Gay's focus on the student shapes her clear, accessible writing, inspires her constant pedagogical innovations, and contributes to the popularity and effectiveness of her video resources (available separately). This revision of Martin-Gay's algebra series continues her focus on students and what they need to be successful. Table of Contents 1. Review of Real Numbers 1.1 Tips for Success in Mathematics 1.2 Symbols and Sets of Numbers 1.3 Fractions and Mixed Numbers 1.4 Exponents, Order of Operations, Variable Expressions and Equations
Calculus 1 Laminate Reference ChartThis 6-page laminated QuickStudy guide includes everything the first year calculus student needs to gain a strong understanding of the basic calculus concepts. It includes: functions, limits, continuity, derivatives & analysis, integration, and much more!
provides worked-out, step-by-step solutions to the odd-numbered problems in the text. This gives students the information as to how these ...Show synopsisThis manual provides worked-out, step-by-step solutions to the odd-numbered problems in the text. This gives students the information as to how these problems are solved Student Solutions Manual for Gustafson/Frisk's Beginning...Good. Student Solutions Manual for Gustafson/Frisk's Beginning and Intermediate Algebra: An Integrated App
Find a Peabody, MA Statistics Tutor Subject: Zip: ...Properly, discrete mathematics is simply the mathematics of systems that are not continuous, and formal definitions of what that means can be had at the asking. However, typically the utility of dealing with discrete as opposed to continuous distributions is that many practical applications of m
Practice makes perfect-and helps deepen your understanding of algebra 1,001 Algebra I Practice Problems For Dummies, with free access to online practice problems, takes you beyond the instruction and guidance offered in Algebra I For Dummies, giving you 1,001 opportunities to practice solving problems from the major topics in algebra. You start with some basic operations, move on to algebraic properties, polynomials, and quadratic equations, and finish up with graphing
Algebra and Geometry shape and graph maker. Multi-use.Description by developer:GeoGebra is dynamic mathematics software for... see more Algebra and Geometry shape and graph maker. Multi-use.Description by developer:GeoGebra is dynamic mathematics software for all levels of education that joins arithmetic, geometry, algebra and calculus. It offers multiple representations of objects in its graphics, algebra, and spreadsheet views that are all dynamically linked. The author offers reflections on specific questions mathematicians and philosophers have asked about the infinite over the... see more The author offers reflections on specific questions mathematicians and philosophers have asked about the infinite over the centuries. He examines why explorers of the infinite, even in its strictly mathematical forms, often find it to be sublime. This free and open online course in Logic was produced by the WA State Board for Community & Technical Colleges... see more This free and open online course in Logic was produced by the WA State Board for Community & Technical Colleges [ as an academic subject, is the systematic study of the standards of correct reasoning. In short, logic is the theory of reasoning. This fully online course is a comprehensive introduction to logic with an emphasis on modern logical theoryLogic & Proofs is an introduction to modern symbolic logic. It provides a rigorous presentation of the syntax and semantics of sentential and predicate logic. However, the distinctive emphasis is on strategic argumentation. Students learn effective strategies for constructing natural deduction proofs. This learning is supported by the Carnegie Proof Lab: it provides a sophisticated interface, in which students can give arguments by strategically guided forward and backward steps.״ This website is mostly for the lower grade levels, from elementary school to middle school. Contains alot of... see more This website is mostly for the lower grade levels, from elementary school to middle school. Contains alot of information, in the form of puzzles and quizzes mostly. This site is not just for students, it has some worksheets and puzzles that instructors could use to help keep the attention of their students. When you first open the website, it may look like it is really unorganized, infact you might be right. Even though it looks unorganized it is still really easy to navigate through. You have the option of using the left side of the screen, which lists categories and subjects, or in the body of the site there are little descriptions of each to help you decide what it is you might want to do. This site contains several hundred articles concerned with mathematics and physics. General topics include Number Theory,... see more This site contains several hundred articles concerned with mathematics and physics. General topics include Number Theory, Combinatorics, Geometry, Algebra, Calculus & Differential Equations, Probability & Statistics, Set Theory & Foundations, Reflections on Relativity, History, and Physics. The articles under each general heading are highly varied, many are quite advanced, and there is no apparent organizational scheme. For example, under Calculus & Differential Equations there is a proof that pi is irrational, a examination of the Limit Paradox, a discussion of Ptolemy's Orbit, and an historical review of the cycloid among many other articles. Visitors can browse by topics or search by keyword. (Anyone with information on the identity of the site author please contact the MERLOT submitter.) : This web site was extremely useful in my report on Mayan numeration. This site provides great information on Mayan... see more : This web site was extremely useful in my report on Mayan numeration. This site provides great information on Mayan numeration such as the background of the counting system devised using only three symbols, how you read the symbols and how the Mayan Numeration system works. It also contains many helpful charts and pictures lesson plan was developed to help early grade school teachers demonstrate to students how to use simple deductive logic... see more This lesson plan was developed to help early grade school teachers demonstrate to students how to use simple deductive logic to solve a simple 4x4 matrix Sudoku puzzle. There is a description of instructional objectives as they apply to the NET-S and to the Michigan Grade level Content Expectations. There is a description of important content for the learner to grasp in order to complete the objectives. There is a PDF of an example puzzle to use as practice or assessment. There is a link to developmentally appropriate puzzle web sites to be used as practice or assessment. Finally, there is a brief description of an instructional plan.
One of five textbooks for use in school and at home. Each left-hand page shows methods with worked examples. The corresponding right-hand page gives questions for the student to try. Topics covered include: algebra addition, subtraction, multiplication and division; brackets and factorization; fractions involving letters; perimeter, area and volume using letters; substitution; simple equations and inequalities; and formulae. Now students can bring home the classroom expertise of McGraw-Hill to help them sharpen their math skills!McGraw-Hill's Math Grade 5 helps your elementary-school student learn and practice basic math skills he or she will need in the classroom and on standardized NCLB tests. Its attractive four-color page design creates a student-friendly learning experience, and all pages are filled to the brim with activities for maximum educational value. All content aligned to state and national standards"You... This innovative series will help your child to learn and practice essential maths skills. Fun, magical characters and fantastic illustrations are combined with easy step-by-step activities, to encourage important early learning. Aptus Home Teach Part of the e-Careers Group of Educational Companies Gain an advantage when studying for your A Levels - Use the tool teachers use to complement their teaching. By using the teachers' digital teaching tool to deliver learning at home you can access lots of digital learning resources, with an easy to use tree structure which enables you to pinpoint the topics all mapped to the relevant key stage (which is clearly specified) within the national curriculum. Our unique software contains... Price : £320.00 Award Received : Course Code : ALV14 Do you need an A Level within 12 months to get into University? UK Open Learning now offers a range of A Levels where we guarantee to prioritise the marking of your coursework so you are fully ready to take your exams in June of each year. We also offer an instalment payment option: Deposit: £130 Instalments: £72.50 monthly over 4 months Total: £420 To pay by instalments call us on 0203 322 8085 In this book you'll learn the tricks of the trade for the areas where pilots have traditionally needed to sharpen their mental math skills: fuel planning, temperature conversions, reciprocal headings, turn radius, crosswind components, time-speed distance problems, calculating true airspeed, the 60 to 1 rule, and many others. Rather than asking, "what's it doing now?" you will stay ahead of the flight with cockpit tools you can use to assist you in planning the flight. Mental math tools and short... Disclaimer: Registration and attendance at or participation in InfoComm International meetings and other activities constitutes an agreement by the registrant to InfoComm's use and distribution (both now and in the future) of the registrant or attendee's image or voice in photographs, videotapes, electronic reproductions or audiotapes of such events and activities. By attending this event, you will be subscribed to emails from InfoComm International. You can manage your subscriptions individually... BrainBox my first maths is a fun way to get younger children engaging with basic mathematical concepts. Designed for Key Stage 1, this easy to pick up game has been developed in conjunction with an experienced primary school teacher. The... Set the clock and off you go! An easy to use timer is included with these colourful 80 page Maths development books. Simply press the go button and get practicing! Games and tests take a short amount of time - maximum fun for maximum effect. Supports Curriculum teaching. Paperback. Ages 3+. Description Built on the strengths of Collins best-selling Maths Dictionary by Kay Gardner, Collins Maths Dictionary is packed with the vocabulary definitions recommended for Years 3 to 6. * Contains over 375 entries following the yearly vocabulary recommended for Years 3 to 6 and beyond * Headwords, guidewords and a thumb index follow important dictionary conventions and support independent use * Includes introductory sections for teachers, pupils and parents * For ages 7+ Logical functionality, accuracy, and dependability make this pocket-sized calculator a great tool for math and science students and teachers. Features include a smart, intuitive design, a new textbook format display, and a two-line LCD display that lets you enter, view, and edit expressions as you would on paper. "Developing Numeracy: Primary Maths Dictionary" from A&C Black is an essential guide to the language and concepts used in Key Stage 2 mathematics. It gives clear, straightforward and concise definitions accompanied by many colourful diagrams and photographs to aid understanding. Worked examples offer further explanation. The words included come from all five strands of the Framework for Teaching Mathematics and cover all the words listed in the National Numeracy Strategy's Vocabulary Book. About this item Tweet This is Brooks' debut for Soundslike, and the four tracks seem tailor made for Herbert's label. Combining glitchy electronica, sweet Prince-esque soul vocals and stripped down click-house, these four cuts are a mouth watering precursor to his "Red Tape" LP (due Autumn 2004). Facet Orbi Mathieu Crepel - Snowboard goggles For Men EEQYTG00020-NBL These snowboard goggles have been designed, developed and tested in collaboration with Mathieu Crepel. There's more to the spherical lens than meets the eye. Besides its bubble appearance, it is curved, allowing the light to hit your eye naturally for incredible clarity of vision in whatever direction you're looking. The strategically planned PC injection, shape and tapering of the lens reduce glare, fogging and offer an impressive... No need to struggle with maths at home. This bumper value set of Flip-It cards will help your child master a variety of general maths topics. Essential maths skills for in and out of school. Each pack contains 54 cards including: Squared and Cube Root Place Value 2D and 3D Shapes Change from 50 and £1 Rounding up and Down Set 1 Evens, Primes and Factors. Pack 1 of 2. Ages 7+ Flip-It not included. GO PRINT MATHS are printable maths worksheets which are a very convenient resource for teachers in the classroom and also for tutors and parents at home. With a computer quickly and easily print off the sheets of this flexible maths resource. No need for a photocopier as there is with photocopiable workbooks. Hot Dots in a fun and innovative way to reinforce key maths skills. The Let's Learn Maths Set includes a Hot Dots Talking Pen and 3 interactive books. Work through 192 activities and position the pen on your chosen answers. The clever hand held device will detect whether or not the answer is correct and give immediate feedback. This self-checking feature allows children to play without assistance at home or in the classroom. The spiral bound books cover 3 different topics: addition, subtraction and... I Love Maths Badge, Heart, Algebra, SchoolI love maths, NOT! to create a...
Essentials of Geometry for College Students-Text Only - 2nd edition Summary: Written for students who need a refresher on Plane Euclidean Geometry, Essentials of Geometry for College Students, Second Edition, incorporates the American Mathematical Association of Two-Year Colleges (AMATYC) and National Council of Teachers of Mathematics (NCTM) Standards on geometry, modeling, reasoning, communication, technology, and deductive proof. To make learning interactive and enjoyable, this new edition includes exciting new features such as Technology ...show moreConnections and Hands-on Activities. Knowledge of beginning algebra and a scientific calculator are required for this text. ...show less A tradition of southern quality and service. All books guaranteed at the Atlanta Book Company. Our mailers are 100% recyclable. $7580116.86 +$3.99 s/h New Textbookcenter.com Columbia, MO Ships same day or next business day! UPS(AK/HI Priority Mail)/ NEW book $132.54 +$3.99 s/h New PaperbackshopUS Secaucus, NJ New Book. Shipped from US within 4 to 14 business days. Established seller since 2000 $136.59 +$3.99 s/h New indoo Avenel, NJ BRAND NEW $183.56 +$3.99 s/h New Lyric Vibes Geneva, IL Hardcover New 0201748827
Discrete mathematics is a branch of mathematics that models the world of information processing and social decision-making. Discrete (non-continuous) mathematics has become increasingly important as more situations are investigated, represented, and solved using computers. Examples of questions that can be studied via discrete mathematics are: What is the quickest way to sort a list of names alphabetically? Which way of connecting a number of sites into a telephone network requires the least amount of cable? Which version of a lottery gives the best odds? What is the best way for a robot to pick up items stored in an automated warehouse? How does a CD player interpret the codes on a CD correctly even if the CD is scratched? How can ice cream stands be placed at various street corners in a town so that at any corner there is a stand which is at most one block away? How can representatives be apportioned fairly among the states using current census information? Algorithmic solutions: Can we construct an efficient algorithm to solve the problem? Optimization: Which solution is best? We will use problems, both realistic and silly, and games we will learn about mathematical topics such as: Graph theory: using vertex-edge diagrams to model and investigate relationships among a finite number of elements; Combinatorics: systematic counting procedures; Recursion: describing and investigating sequential change; Algorithm development and analysis; Logic and proof Through problemse emphasis will be on modeling, problem solving, and learning to read and write mathematical proofs. Future teachers will look at the role of discrete mathematics in high school mathematics. Class Requirements Homework Policy: With few exceptions, you will have two assignments due each day: A reading covering the material to be discussed during that class period. For each reading assignment, you are to read the section carefully, identifying the main concepts and questions you may have. Your reading assignment is a very important part of your work in this class, and you will have Moodle quizzes over many of the reading assignments. They do count toward your grade. A writing assignment based on the material discussed in the previous class as well as often some preview problems from the next sections and possibly some review problems from previous sections. This assignment should be done in draft form by the next class day to allow for a small amount of explication in class. The final form of each assignment is due on the second class day after it is assigned. You are encouraged to work with other class members to do your homework assignments. The writing assignments will count toward your final grade in the course. No late homework will be accepted, but 3 writing homework scores and 3 Moodle quiz scores will be dropped. Computer Work: During the semester, we will have a few computer labs and computer components in other assignments. You will use the computer algebra system Maple 12 for these assignements. This program is available on the computers in SC 175. Some of the tests may have a take-home portion on which you will be expected to use Maple. Presentations: You will work in pairs for this part of the class. Each pair of students is responsible for making a 30 minute presentation to the class during the last half of the class. Your presentation should not be at the ``theorem-proof'' level of mathematics. Instead, it should show some application of discrete mathematics, to another discipline or to some interesting problems. Your presentation should involve some hands-on engagement by the rest of the class. Here are some possibilities. Other ideas will be provided after we get into the class material. Matching using graphs You could design a roommate match procedure, a dating service or some other situation matching one person with another. Network Flows This topic leads to solutions to problems involving getting traffic out of a city during rush hours, or getting a large group of people from the ground floor to a penthouse with a limited number of elevators. Voting theory An important topic, especially since we just finished a presidential election year. Codes and cryptography Create and decipher secret codes. Include public key codes, which are becoming even more important with increasing computer security issues. Games or magic tricks using discrete mathematical structures or topics. Collection of problems around a topic of your choosing. Examples include: Application of graph theory to management decision making. Application of graph theory or combinatorics to taking a trip, visiting a museum, or other situation. Creative story using discrete mathematics topics. Discrete mathematics in middle or high school. Most appropriate for students considering high school teaching. Other? Talk to me! Grading Policy: How does your work contribute to your final grade? What grade will you get in this class? Components: Points Possible: Total Points Earned as % of Possible Minimum Grade You Will Earn Homework, Labs and Moodle Quizzes 100-150 points 90% A- Presentation 50 points 80% B- 2 Tests 200 points 65% C- Final 150 points Total Possible 500-550 points Hints for Success: Reading the material carefully before it is covered in class is a big step toward success in any math course. Successful students typically outline or otherwise summarize the material briefly in their notebook and highlight questions to bring to class. A great way to become familiar with concepts and techniques is to work each of the examples. (This means work on paper -- don't just read and nod.) Be sure to work lots of problems -- they are fun! Make sure that you begin the assigned homework as soon as possible after it is assigned and bring a nearly complete homework paper to the following class so that you can get the most out of any homework discussion in class. Be sure to make connections in your mind between discrete concepts and the other mathematics that you have studied. Disability Policy: If you have a documented disability that will impact your work in this class, please contact me to discuss your needs. Additionally, you will need to register with Student Disability Services located at the Academic Support Center. All such discussions will be confident
... Show More preserves the author's highly regarded approach to technical math, while enhancing the integration of technology in the text. The book is intended for a two- or three-semester course and is taught primarily to students who plan to pursue technical fields. The primary strength of the text is the heavy integration of technical applications, which aids the student in pursuit of a technical career by showing the importance of a strong foundation in algebraic and trigonometric math. Allyn Washington defined the technical math market when he wrote the first edition of Basic Technical Mathematics over forty years ago. His continued vision is to provide highly accurate mathematical concepts based on technical applications. The course is designed to allow the student to be simultaneously enrolled in allied technical areas, such as physics or electronics. The material in the text can be easily rearranged to fit the needs of both instructor and students. Above all, the author's vision of this book is to continue to show today's students that an understanding of elementary math is critical in many aspects of life
Welcome to the Michigan Program As most of you know, there has been a national movement to "reform" the teaching and content of calculus and precalculus. Michigan's Introductory Mathematics Program is being used as a model for colleges and universities throughout the country. Our program takes a fresh approach which is designed to help students learn to think about the fundamental ideas of mathematics. The texts emphasize the underlying concepts and de-emphasize rote memorization. The concepts are presented from a variety of symbolic, numeric, visual, and verbal points of view. Since our goal is to prepare students for further study in all mathematical subjects, there will be a strong emphasis on mathematics in everyday life and many of the applications will come from the physical and social sciences. We use a teaching style which expands on the traditional lecture format. It incorporates cooperative learning into the classroom and organizes students into homework teams. The focus in our classes is on student learning rather than teaching. The purpose of this guide and our professional development program is to help accustom you to the new program. Throughout the term the instructors will have a weekly staff meeting to share ideas on what is working and what isn't working . Since our program is still fairly new, the courses evolve with each year's infusion of new teachers; we will be counting on you to help us make them successful. Your class is often a student's first experience with a university math course, and the quality of your teaching can make this first experience either rewarding or distressing. In the coming days and weeks we will try to help you master some of the principles and techniques of good teaching, but ultimately your success will depend on your ability to interact productively with your class. Your class will respond to your enthusiasm for the material and to your genuine efforts to help them understand. Student Learning Learning versus teaching. When we think about teaching, many of us imagine ourselves at the front of the classroom with all eyes on us. We think in terms of syllabus, coverage of material, and lecture notes. Teaching at Michigan is different and we'll talk about what you, the instructor, should be doing later; now we want you to imagine that you are sitting at a table with a small group of students working on a problem or watching over the student's shoulder as he or she experiments with a new concept or struggles to apply old ideas in a new setting. Learning versus training Learning is not the same as training. Training emphasizes rote learning, speed, and efficiency. The Army is expert in training: "Take the rifle apart and put it back together--blindfolded--in less than thirty seconds." Training has a place in this course. Of course, we want students to know that the derivative of the sine function is the cosine function and that . This aspect of the course is addressed in the homework and the gateway tests. In this section we consider how students learn... How students learn Students learn by thinking and doing, not by watching and listening. Learning is an active process; it is something the students must do, not have done to them. The Calculus course is structured around student activities--in the classroom and outside the classroom in homework teams. They are encouraged to experiment and conjecture, to describe and discuss. Students learn by working on real-world problems in which they have an interest--or at least in which they can see that others might have an interest. They are motivated by the visible or tangible, and they use this to "anchor" the more abstract concepts. Most of our students will not become mathematics majors; few of them share our interest in the subject for its own sake. Even those who will become mathematicians benefit by seeing how the ideas of calculus can be applied. Students learning calculus in a real-world context will gain a deeper understanding because the concepts are often presented numerically and graphically as well as algebraically. Students learn by working together. They are encouraged when they see their classmates struggling as they are struggling; they are rewarded when they have a good suggestion or a sudden insight. Problems seem less daunting when there is someone else with whom to work. Even dealing with the graphing calculator is more rewarding and fun with a partner. Students learn by talking about what they are doing--by explaining what they have discovered, by discussing a common strategy for to attack a problem, by asking questions. Students have little or no experience talking about mathematics; this takes time and practice. The results can be rewarding. In the first year of the project we knew the method was working when an entire homework group would show up together at the Math Lab and then proceed to hash the problem out themselves without any help from the tutor. They were learning much more than if someone had explained how to work the problem. Students learn by writing. Writing forces students to organize their ideas and experience. Often, real learning begins only when the students begin to write out the meaning of a particular problem or function. The more students are required to write and the more they see other students' writing the better they get in expressing their ideas and understanding mathematics. Students learn by reading--when they are actively engaged in the reading. Early in the course you will need to discuss with the students how to go about reading a chapter and how to best learn from the reading. This will help the students get the idea of what they are supposed to be doing when they read. It can head off the massive frustration that is likely to result from just turning them loose with what may be the first math book they have ever had to read. Don't try to cover everything in the book in class. This just discourages students from reading the book on their own and does a disservice to the students. Early on we learned that if the instructor tried to lecture in detail over everything in class, the students objected to the book--they found it confusing, ambiguous, and hard to read. In those classes where the instructors didn't "overcover" the material and trusted the students to read the text (always giving them hints on what to look for and any problems they might run into) the students liked the book. They found it readable and helpful. Almost all of these activities - cooperative learning, talking about mathematics, writing about mathematics, reading mathematics - are often unfamiliar to our students. They are used to learning how to solve template problems by appropriate symbol manipulation, and they have been encouraged to consider the task "done" when they circle the "answer." You will have to encourage them and repeatedly justify these new and difficult activities. Just affirming that "It is hard, it is supposed to be hard, and you have what it takes to do it!" can go a long way in supporting your students. As a reward you will see students blossom, including students who never before liked or did particularly well in mathematics. You will see creative students succeed who never developed the discipline to master algebra and trigonometry. And, as a consequence of this success, you will see them begin to work on those skills. You will see good students take off on their own, exploring ideas and connections you never imagined. You will see your students as individuals with different strengths and weaknesses, not just as points on a normal distribution. Some of the material in this section was adapted with permission of the authors from the Instructor's Guide that accompanies the math textbook The Calculus Reader by David A. Smith and Lawrence C. Moore, Published by D. C. Heath and Co. 1992. Student Reactions to the Course and Typical Problems These courses come as a shock to most students. This is not the way calculus (or precalculus) is "supposed to be." Most University of Michigan students were admitted because they performed well in traditional courses; our approach may be unsettling and painful. You can sometimes head off student uneasiness by being very specific about exactly how the course may be different from what they were accustomed to and why. This isn't calculus! I've had calculus and this isn't it! This complaint usually comes from exposure to the traditional high school calculus course where they spent a lot of time with symbolic manipulation. They may be a little disgruntled because they hoped that taking calculus in high school would give them a head start and possibly lead to an easy "A". Assure them that it is calculus but that we are purposefully using a different approach--that they will understand how calculus is used and gain some valuable skills that will help them throughout college. Tell them that it's hard, that it's supposed to be hard, and that they have what it takes to do it. My instructor isn't teaching; we have to teach ourselves. Students are used to template learning. They think that a "good" instructor should simply lead them through each problem step by step. Real understanding, the kind that lasts, comes from struggling with the ideas. In this course we are trying to develop problem-solvers. This course is taking too much time. The University's rule of thumb is that a student should allocate at least two hours of study time for each credit hour, so they can expect to spend 8-10 hours a week minimum on calculus. We are requiring new types of work; they may be inefficient in performing it. We have to help students learn to read, write, work, think, and cooperate without spending endless hours of wasted effort. Talk with students in or out of class; listen carefully to what they say about study habits and related matters. Remind them of the Math Lab, both as an environment conducive to getting work done and as a source of help with whatever may be slowing them down. Why are we having to do all this writing? Writing has nothing to do with mathematics! Certainly traditional calculus courses do not emphasize writing. Many students adopt the strategy of writing as little as possible; their expectation (not necessarily a conscious one) is that the instructor will supply the right words to make sense of the mathematical symbols. "If I write something out, then I stand a better chance of being found wrong." You should make the case that writing is a crucial part of the thinking process, and that it will help them understand the material. Our homework problems are completely right and you're taking all these points off. This stems from the common student view of grades as reward or punishment rather than feedback. Tell them that they are not competing against other teams. Explain what you mean by good work. They may think of a homework score such as 15/20 (which they convert to 75%--a high school C) as well below average, whereas you probably consider it to be a score indicating good progress. I've never gotten grades like these. From the point of view of many of our first-year students, a great deal hinges on getting the very high grades they are accustomed to getting in high school. The mean high school grade point average (recalculated using only their strictly academic classes) of the entering freshmen is 3.6, so most of our students think of themselves as "A" students. There is bound to be some resentment as students acclimate themselves to college grading standards. Just try to be both realistic and encouraging. I can't read the textbook--it is too confusing and ambiguous. Often this type of complaint comes from the fact that when they read the book they cannot find a "formula" for answering the problems at the end of the chapter as they are accustomed to doing with math books. Help them understand why the book is written the way it is and that the problems are meant to be hard and to require sustained thinking. Once they get used to thinking hard and develop some problem solving skills, they will find that everything they need to work out the answers is provided in the text. Let them know that one of the reasons for having homework teams is to help them learn the skills they need to succeed. Make sure they understand that reading mathematics is not like reading the newspaper. It is unlikely they are going to get everything they need the first time through. Help them learn how to read the text. Make sure they are trying the embedded exercises; encourage them to mark up the text, and ask to see their copy when you hear this complaint. Encourage them to discuss their reading with other students in the class (teammates or not), to ask questions in class, and to use the Math Lab. We never know if our answers are correct. There is a fundamental problem here. Students are conditioned to believe that the only way to know that an answer is correct is to see if it agrees with the back of the book or if the teacher says it is right. They need to be encouraged to look at problems in alternative ways, to see if the answer is consistent with intuition. Spend some class time on checking procedures. For example, it is not enough to tell students that derivative calculations can be checked by doing one or more difference quotients on their calculators--make them actually do it and share the results with each other. It isn't fair for my grade to depend on the work of others. Group work is a new idea; cooperation is a new idea. Tell students that there is research evidence that even the best students' grades can improve if their group is working together properly. Many students' normal mode of operation is cutthroat competition. Remind them that there is not a preordained number of A's, B's, etc. Point out that when they go to work in the real world, their performance will be judged on how their group works. Also, if you adopt some form of evaluation of individual efforts, this may help students accept the grading scheme as "fair." Someone in my group isn't doing enough work. One of the skills students need to learn is how to work together. Part of their responsibility is to ensure, as much as possible, that everyone is contributing. In most jobs they will work in later, they will be told to get together with certain people and do something. Their boss is not going to be impressed if they are not able to work together. This said, it still may be the case that one or more members of the group is (are) not doing enough work. Remind the students that teams will change. If a member of the team does no work on the homework or a project then his or her name need not appear on it. Students may find it difficult (especially at the start) to leave off the name of a non-contributing teammate, but this is one aspect of making the students responsible for what the group produces. Instructor Reactions to the Course and Typical Problems Giving up lectures: Lecturing is a very satisfying activity for us. We can organize the materials, display the logical structure, and introduce just the right examples. When the period is over, we feel that we have given a good account of ourselves, a good performance. It is hard to accept that this may not be the best way for students to learn. However, respectable educational research suggests that prolonged lecturing is the classroom activity least likely to result in learning. Giving up control: When you move to a classroom mode that is more student-directed, you will feel as if you are giving up control of the class. You cannot necessarily tell what students will want to discuss, what suggestions they will make. It is likely that students will ask questions for which you do not know the answer. This is painful the first couple of times it happens. However, it is very enlightening to the students. When you say, "I don't know what happens if we let b=10,000; let's try it and see," they realize that it is not a personal failing when they have to admit that they don't know the answer. To become good learners, they need a good learner as role model. Listening to students: One of the things you will learn as you read student papers and hear them discuss topics in their groups is that they are not thinking what we thought they were thinking. They have some surprising ideas fixed in their minds; a new, more useful concept cannot take the place of a faulty one until the old notion has been dealt with. This course has taught us to work harder at listening to what the students are telling us, not assume that we are going to hear or read one of the most "five common errors." One of the instructors told us that he always thought his students learned from an organized, interesting, informative lecture. He had always asked a few questions to be sure that the students were understanding. When he started to use cooperative learning in the classroom (after giving one of his thoughtful, informative lectures), he got a chance to listen in while students told each other what they thought they understood. He was amazed at how little of his careful, clear lecture they understood. Dealing with writing: Many mathematicians admit that they do not like to deal with student writing. One of the reasons they went into mathematics is that they did not like to write a lot of papers! The type of writing we are expecting of the student, expository writing, is not particularly hard as writing goes. Previous instructors have found themselves to have the ability to improve their students' writing level dramatically simply by stressing the importance of carefully written solutions. When you are working with student writing it helps to be very explicit about what you want students to do - what you expect an assignment to look like. You will find that the more writing the students do the better they will get. This is especially true if you ask various students to read what they have written out loud to each other in small groups and to the large group. Working too hard: It is hard teaching a new course for the first time; this course is newer than most. Instructors commonly report that teaching this way requires more emotional energy than teaching traditional math classes. If you actually know whether or not students are learning, you tend to maintain a higher level of personal engagement - you worry about them. There is a tendency in dealing with things we are unsure of (grading student writing, for example) to compensate by being too conscientious, spending too much time on the work. At the beginning, it is helpful to allow a limited amount of time for dealing with each paper. Nothing terrible happens if you do not make a comment that you might have made if you had more time. The students understand time pressure. You will find it useful to set a goal for the average time you will spend on each paper or set of homework, and then push yourself to keep up with that pace. This will vary somewhat with the nature of the assignment, but if you are taking much more than two hours per homework set, your students are making you work too hard. The better their work , the easier it will be for you to grade it. Be very explicit about what kind of papers you will accept. Tell the students that carefully done homework will always lead to a higher grade. Organization of the Introductory Course System Profile of the Fall Term Students in the Introductory Courses Math 105 - Data, Functions, and Graphs ~25 sections Students take this precalculus class either as a preparation for the calculus sequence or in order to satisfy a variety of University course requirements. They have typically taken 4 years of high school math. However, their placement scores, which are based on the combined results of a short precalculus test, their Scholastic Aptitude Test (SAT), and their overall high school grade point average (GPA), indicate that they lack some skills and mathematical maturity. For students in the college of Literature, Science and the Arts, the course satisfies the quantitative reasoning requirement and also fulfills the distribution requirement for mathematical and symbolic reasoning. Math 115 - Calculus I ~60 sections This is the first course in the standard 115-116-215 calculus sequence. Students in this course have different backgrounds. Some had a good high school course in calculus, some have had rudimentary high school calculus, and many have had only precalculus. The overwhelming majority of the students enrolled in this course are not math majors, but are required to take calculus for some other field such as engineering, business, or one of the natural sciences. For students in the college of Literature, Science and the Arts, the course satisfies the quantitative reasoning requirement and also fulfills the distribution requirement for mathematical and symbolic reasoning. Math 116 - Calculus II ~30 sections Some of the students in this course have taken 105 and then 115, while others are just entering the University prepared to take second term calculus. New freshmen in 116 generally have taken a year of advanced placement (AP) calculus in high school. Math 156 - Applied Honors Calculus II 6 sections The sequence 156-255-256 is an honors calculus sequence for engineering and science concentrators. Math 175 - Combinatorics and Calculus 1 section The sequence 175-176 is an honors sequence in combinatorics, dynamical systems, and the development of calculus in the context of dynamical systems. Math 185 - Honors Calculus I 4 sections The sequence 185-186-285-286 is for mathematics, science, and a variety of other concentrators who want a calculus course with a somewhat more theoretical approach. Math 215 - Calculus III 8 lecture sections This is a lecture (~100 students) in multi-variable calculus combined with a Maple computer lab. Math 216 - Introduction to Differential Equations 6 lecture sections This is a lecture (~100 students) in linear algebra and differential equations combined with a weekly MATLAB computer lab. The students are largely in engineering and science. Being an Instructor in the Uniform Course System As an instructor (GSI or faculty) in one of the large, introductory, multi-section courses courses you will be in complete charge of the day-to-day activities of a precalculus or first-semester calculus class of about 30 students. The Math 105 and 115 classes are scheduled to meet for three days per week for an hour and a half. Since these are only 4 credit hour courses, you can use the extra half hour per week of class time as you wish, e.g. office hours. The University semester lasts approximately 14 weeks. Your precise teaching assignment (days and hours) will not be made until just before the start of the term after both the undergraduate enrollments and the graduate student instructors' own course schedules are finalized. All the introductory courses are run according to uniform guidelines in an attempt to ensure that each student has every opportunity to learn the course material. All sections cover the same material. All the students in a given course take two common exams and a common final. These exams are graded by all of the course's instructors working together in a session which immediately follows the exam. Each of the introductory courses is under the supervision of a faculty coordinator assisted by a small team of department members who serve as a professional development staff. Feedback and the Evaluation of Your Teaching All instructors who are teaching 105, 115 or 116 for the first time will receive feedback on their teaching from both students and course staff. Following is a list of the processes that will be used. Observing your class: Course staff will be visiting all new instructors' classes within the first month of the course and they will give you feedback on what they observe. Although you may feel nervous about being observed, the tension usually disappears when the class gets underway. It helps to remember that the observer is there to help you gather data and information to improve your teaching . You will be contacted before such a visit. In previous terms the instructors have found the experience to be positive. Getting Informal Feedback from Students: You can usually find out how your students are reacting to your teaching by asking them. For example, you might ask them whether you are doing enough examples or whether the homework assignments are too easy or too hard. The Math Department will give you an informal questionnaire to have students fill out early in the term, and the responses will give you guidelines about necessary adjustments. Early student feedback: If you are teaching an introductory course for the first time, there will be an early student feedback session following the first exam. The procedure is that a course staff person will observe your class for the first hour of class. During the last 25 minutes of the class you will leave and she/he will facilitate a small group feedback session with your students. One or two days later the two of you will discuss the results and develop possible responses. Additional observation toward the end of the semester: For some instructors who may be working on basic teaching skills, a third observation will be done toward the end of the term. End-of-Course Student Ratings: At the end of each term the Office of Evaluations and Examinations sends all instructors a set of evaluation questionnaires for each class. The questions on these forms have been chosen by the Department (see sample form in the appendix). The packet comes with detailed instructions. Read the instructions very carefully. Generally, you will leave about 15 minutes for students to fill out the forms at the end of a class period during the last week of class. Instructors will not see individual ratings or the results of these ratings until after the grades are turned in. The actual forms and a statistical summary will be returned to you some time in the subsequent term. A copy of the summary goes to the Department. Plan to keep your evaluations both as a record of your progress and to assist future writers of teaching references. Since there is evidence that student ratings are more effective in helping instructors improve their teaching if the instructor discusses them with another person, it is a good idea for you to go over them with a colleague, a consultant from CRLT, the course coordinator or one of the other course staff. Grades and Grading The Uniform Grading System Semester Grades: All introductory math courses are graded from A to E, with pluses and minuses attached to the A's, B's, C's and D's but not the E's. (However, the grade of A+ is rare and is reserved for students who excel on course-wide criteria.) All sections of a course use the same grading guidelines to standardize the evaluation process. All students take the same uniform midterm tests and a common final exam. There are three components to the student's grade. As the instructor, you are responsible for the determining the section component and using it to adjust the student's final course grade. The grading scheme from the student guide is reproduced below. Evaluating the section component: Since we consider cooperative learning to be an essential feature of the introductory program, we require that team homework count for at least 60% of the section component. Aside from that, it is up to you how to determine the section component of the grade. For example, you may choose to give weekly individual or group quizzes and/or daily reading quizzes; you may choose to collect individual homework; you may choose to give credit for in-class work, presentations, extra credit, good team evaluations, etc. It helps to choose a system that encourages study habits that you believe will contribute to student learning. Informing the students. It is important that you explain your system for evaluating the section component clearly and carefully in your first day handout so that your students know how they will be evaluated. It is also important to ensure that the feedback you give students on their section work accurately reflects the impact it will have on their grade. There are many simple ways to achieve this. One is to grade section work with a median of approximately 70%. If that does not suit your class, or your grading, an alternative is to announce the median score each time you return graded work. The Grading System: Reproduced from the Student Guide Grades in this math course. All sections of this course use the same grading guidelines to standardize the evaluation process. Your final letter grade in the course will be based on three components: The uniform component. The section component. The gateway component. Your uniform component will determine your baseline letter grade for the course. Your baseline grade will be adjusted by the section and gateway components as described below to determine your course letter grade. 1. The uniform component. There are two uniform midterm exams and a uniform final exam. Each of these exams will be taken by all students in all sections at the same time, and are graded by all the instructors working together. Your uniform component score will be determined from your scores on each exam as follows: Midterm Exam 1 - 25% of uniform component score Midterm Exam 2 - 35% of uniform component score Final Exam - 40% of uniform component score After each exam, a letter grade will be assigned to your uniform component score using a scale determined by the course director specifically for that exam. We do not use the "10-point scale" often seen in high school courses in which scores in the 90's get an A, in the 80's get a B, and so forth; the level of difficulty of the exams will be considered. The scale for the uniform component score will apply to all students in all sections. 2. The section component. To help you learn the material, you will be given a variety of reading assignments, team homework, individual homework, quizzes and other in-class activities. Your instructor will decide how the section component is determined for your particular section and grade the section work to determine your section score. The section component has the potential to increase your final grade above the baseline grade by one third of a letter grade (e.g., from a B+ to an A-, etc.); and, assuming that the assigned work is completed, this component cannot lower your final grade below the baseline grade by more than one third of a letter grade. So, if you are keeping up with the course and doing well in your section work, it will not only help you to do well in the uniform exams, but may also add to your baseline grade. Similarly, if you fall behind in your section work, it may reduce your baseline grade. For example, Exam component grade Other work: Final course grade A Excellent A C Excellent C+ B ("good") Very good B+ B Good B B Poor B- B Abysmal (assignments not seriously attempted, quizzes not taken) C (A decrease by more than 1/3 of a letter is possible only in such extreme cases) It is up to each individual instructor to determine which homework and quiz scores constitute, for example, "excellent" work. 3. The gateway component. There will be one or two (depending on the course you are taking) online basic skills gateway test(s) which you need to pass by the deadline announced in the course schedule. These routine tests are repeatable, and in general do not pose a problem for students who are keeping up with the course work. You may practice each test online as many times as you like, and you may take a test for a score as often as twice per day until the deadline. The gateway tests do not have the potential to raise your baseline grade, but if they are not passed by the deadline, the gateway component will automatically reduce your final grade in the course. Deadlines and grade penalties will be announced in your class. All sections of your course have the same deadlines and penalties assigned to the gateway component. Section averages. Course policy is that a section's average final letter grade cannot differ too much from that section's average baseline letter grades. This means that the better your entire section does on the uniform exams, the higher average letter grade your instructor can assign in your section. It is therefore in your best interest to help your fellow students in your section do well in this course. In other words, cooperation counts! Grades at the university. Many students who come to the University of Michigan have to adjust themselves to college grading standards. The mean high school grade point average (recalculated using only strictly academic classes) of our entering students is around 3.6, so many of you were accustomed to getting "straight A's" in high school. Students' first reaction to college grades is often, "I've never gotten grades like these." However, a grade of 15/20 on a team homework assignment (which you might previously have converted to 75% - a high school C) may well be a good score in a college math course. Your own instructor is your best source of information on your progress in the class. Describing the grading system to students: You should state explicitly how you plan to arrive at semester grades - what exams will be given, approximately what weight they will have in the overall assessment of the student's work, how team homework is counted, how much quizzes will count, etc. The in-class component of the grade can be based on quiz scores, individual homework, class participation, or whatever you find appropriate. It is important to not to assign letter grades to the in-class component of the grade because the grades you award at the end of the term will have to be in alignment with the performance of your class on the uniform exams. Assigning final semester grades: The procedure for calculating semester grades will be discussed in course meetings as the term progresses. Grade books and records: Keep a good, clear record of your grades in a secure place. Don't lose it. Record all scores which will count towards students' grades. Many grades complaints can be prevented by keeping accurate records. It's easy to forget to record grades before returning papers, so record everything, including all grade changes, immediately. Students are very serious about their grades and expect them to be treated as a strictly private matter. You do not need to keep a record of students' attendance unless you choose to, however, you may want to note any extended absences. Complaints about your grading: From the point of view of University of Michigan students, a great deal hinges on getting the high grades they are accustomed to getting in high school. Many first term freshman have never had a grade lower than an A! They will often argue persistently over one or two points. This is not a sign that they don't respect you. Of course, you should treat all student complaints about grading mistakes or unfairness in a serious manner. Reporting Student Grades / Progress / Difficulties During the Term Progress updates You should be prepared to give students an assessment of how they are doing in the class. Early in the semester, students may want your advice on whether or not to drop the course. During staff meetings you will be given an indication of what would be appropriate advice. Reports to counselors If a student, particularly a freshman, is struggling during the term, it is important that you fill out an Academic Progress Report. The counselor can then look at the student's overall academic situation and give the necessary support. There are several types of formal reporting forms which can be used to communicate with advisors. Midterm Estimate Forms are sent out by the Comprehensive Studies Program (see "University Support Offices") to track the progress of students. Academic Progress Reports can be used to inform the Academic Counseling Office (see "University Support Offices") of any student in academic difficulty. Athletic Progress Forms are sent out to the instructors of athletes. Advising students Students may ask your advice when they are having difficulty in the class. Try to give them an accurate (but kindly) description of their status. Sometimes they are simply in the wrong course. And sometimes poor performance results from inadequate study time. Often students are not aware of the time demands of a math course (sometimes calculated at three hours of study for each credit hour). If you think that a student would benefit from more tutoring than you can provide during you office hours, suggest the Math Lab or the other sources of tutoring listed in under "Tutoring Facilities". When talking with a student who is performing poorly, you should think of it as providing information which the student can weigh in consultation with an academic advisor. You should carefully avoid attributing the student's failure (or success) to race or gender, and certainly don't suggest that the student may have a learning disability since even well-intentioned suggestions of this kind can be devastating. If the student seems to have more extensive academic or personal problems, this guide gives sources for additional help. (See "University Support Office: Academic and Personal".) Gateway Tests All instructors are to periodically give gateway tests on basic skills, e.g. differentiation. Students will be required to pass the gateway tests, but they can retake each test as many times as necessary in order to pass. We have found that students like being able to retake the tests, and it encourages them to continue studying until they know the material. The first test will be given during class time. Each additional test will be given and monitored during your office hours or administered in the Math Lab. There is a system of computerized practice tests on the Web, but the actual tests are administered in on-line in a proctored gateway testing center. You will be told the particulars of the procedure during a staff meeting. Quizzes The timing of exams is built into a syllabus, but you should give quizzes more frequently. Quizzes needn't be long to be effective, 15-20 minutes is plenty of time. All material which is handed out to a class should be written neatly and clearly. Try to get another instructor to check your quizzes for errors, because it's easy to make mistakes. Coordinators may ask to check your quizzes before you give them. The coordinator may have samples of quizzes given by instructors in previous years. Feel free to borrow each other's quizzes and share the work. Try not to bother with make-up quizzes; just announce that you'll drop one or two instead. If you have to give one, you may be able to borrow one from another instructor. Proctor quizzes carefully. Begin by having students spread out in the room and put away all other books and papers. The most frequent form of cheating is copying another student's work, so tell them to keep their eyes on their own papers, and make it clear to students that you are paying attention. (see The Instructor-Student Relationship, Dishonesty and Cheating) When you return quizzes, you may not have time to go over each question in class. You can either go over problems which were missed by many class members or distribute a solution sheet. Uniform Exams The introductory courses have two common 90 minute exams and a 2 hour final exam. All of the instructors are expected to monitor the exams and help in the collaborative grading of the exams. Find out when the exams are going to be given and put those dates on your calendars. Don't plan any other activity for that evening. Exams I and II Before Exam Day Date: The dates and times of the two exams are in the course syllabus. All the students in the course will take the same exam on the same evening (6:00-7:30 p.m.). Note that these exams start on the hour, not at ten minutes after the hour. Location: The exams are given in several large auditoriums scattered throughout central campus. Each auditorium will have several sections assigned to that location. The room assignment for your section will be sent to you via e-mail in time for you to announce it repeatedly to your class. The office (2084 EH) will post a complete listing of the exam rooms for all large courses. Make sure that both you and your students locate the exam room ahead of time. Communicate the time and place clearly to your students: Make sure you announce several times the room designated for their exam and what they should bring to the exam. Who writes the midterm exams: The course coordinator writes the uniform exams. Suggested problems are always welcome. The composition of the exam will be discussed in course meetings. Copies of practice exams: A collection of previous exams is included in the Student Guide which should have been purchased by the students at the beginning of the semester. Extra review sessions: If you want to hold extra evening or weekend review sessions you must fill out a room reservation form (2084 EH) ahead of time. Conflicts and alternates: In general, there are very few circumstances in which a student will be allowed to take these exams at any time other than the regularly-scheduled time. The course coordinator will tell you how he/she wants each individual case handled, however, the faster you report potential conflicts to the coordinator, the more easily they can be resolved. Announcing results of the exams: Don't promise students their grades immediately. You will often not know the results until the following day (or occasionally even longer). Exam Day Classes meet at their ordinary times on the day of the midterm. You will be given a written schedule of the routine for the evening of the exam. This will include directions on how to proctor effectively. You should be prepared to arrive early and stay until the end of the team grading session which starts immediately after the exam and usually lasts late into the evening. Start the exam on time. End the exam on time. Immediately take the finished exams to the designated room in the Math Department. Consult with the coordinator about any student who misses the exam. Grading the Exam You will be assigned to a grading team and your team will grade a specific problem (or page) for all the sections. This means that you will never grade an entire exam. You will have a team leader and she/he will direct the smooth facilitation of the grading. Your team will be given a solution sheet with an outline of how to award partial credit. As grading progresses your team will establish policies about how to grade specific types of mistakes. It is important that your grading stays consistent and conscientious until the end of the session. After all the exams have been graded, each scores is totaled and recorded. Then you can leave and take your students' exams with you. Getting the Results You will get a summary of the scores which will associate a letter grade with a range of scores. This will be the first time that you can give your students a letter grade. The letter grades are arranged so that the median score is near the B- / C+ line. Returning the Exams You should check the point totaling on your students' exams before you return them. You will get a complete grading guide for the entire exam. If a student believes that something was incorrectly graded, note the spot and take the exam back. Look it over to see if it was graded according to the guide, if so, don't change anything. If there was a mistake in grading, fix it yourself and adjust the score. The coordinator may want a record of grade changes. Final Exam Before Exam Day Study days: The time schedule provides for study days between the last class and the final exam. Date and time: The date and time are published in the university Time Schedule under the heading, "Examination Schedule" and they appear in the syllabus. Location, Extra review sessions, Alternates, Grading the final, etc.: The general procedures are the same as for previous exams. Inform students about when you will be holding office hours during study days and exam week. Tell students when and how their course grades will be available and when they can pick up their final exams. The department offices don't give out grades. Leave yourself plenty of time to decide on course grades, and try to schedule some time for students to discuss their final grades with you. Often a sympathetic explanation will forestall later grade complaints. Components of the Course Math Lab Location: B860 East Hall, 936-0160 Hours: Mon - Thurs, 11:00am - 4:00pm and 7:00pm - 9:00pm Fri, 11:00am - 4:00pm Sun, 7:00pm - 9:00pm The Math Lab provides tutorial help for students in all the introductory courses. It is staffed by graduate students and advanced undergraduates. As an instructor of one of the introductory courses, you will be asked to hold one of your weekly office hours in the Math Lab. Any student in your class who needs extra help should be strongly encouraged to see you during your own office hours, but the Math Lab with its convenient hours is a good alternative. If a team is having difficulty with a homework problem, please suggest that they go to the Math Lab together. When students have questions about the substance of the homework, we want the students to figure out as much as possible for themselves. Sometimes they need a hint, sometimes they need to reread the instructions or the relevant section of the book, sometimes they need to be given direct help, and sometimes they need to be told to go back and work on it. When a whole team comes in to get help, it is a good time to help them learn to work together and it may only take a few hints or steering-type questions to get the group unstuck. For the tutor (or the instructor) knowing how much and how little to say is an art that takes experience and restraint. The TI-83 Calculator Each student will be required to buy a calculator. In previous years some of the instructors were worried at the prospect of teaching students to use the calculator. It turned out to be a non-issue. Many students will come already knowing how to use the calculator, and they tend to help other students who need it. Encourage anyone who is having trouble to go to the Math Lab to get individual help. Mechanics of Starting and Running the Term Pacing the term The progress of the term is regulated by the syllabus which indicates how much material is to be covered, when tests and exams will be given, and the dates of holidays and vacation. You should make tentative plans about what you plan to cover during each class meeting and when you will schedule quizzes and review. Since the elementary courses proceed quickly, you may not have time to explain everything in the text or answer all of the students' questions. Stress the fundamentals and present the new material clearly so that the students leave the class prepared to do the homework. Students tend to catch on to the ideas as you progress, and you will often have a chance to revisit a topic later in the course. If you get behind or ahead of the syllabus, let the coordinator know and ask him/her for suggestions about slowing down or speeding up. Handling papers Be careful with students' written work. Don't lose it. Correct papers promptly and hand them back promptly. Remember to record all grades in your grade book. Keep copies of all handouts, e.g. tests, quizzes, problem solutions, and lecture supplements. Students may lose theirs, or you may need to give a copy to the coordinator, or you may want to use materials in future semesters. Record Keeping Keep your grades in a secure place. Record all scores which will count towards students' grades. You do not need to keep a record of students' attendance unless you choose to, however, you may want to note any extended absences. If you want to keep your grade records in computer form, you will get an e-mail description of how to get your class lists. Absences If you have to be absent, tell the coordinator well in advance and work with him or her to find a replacement. If you are sick, contact the course coordinator as soon as possible and arrange for your class to be covered. In no instances should you be gone without the course coordinator knowing about it and knowing who is responsible for your class while you are gone. Scheduling extra class sessions Extra class sessions (makeup classes or review, etc.) can be scheduled by filling out a room request in 2084 EH. It is often difficult to find a time which is convenient for all your students, but late afternoon times may work. Students may miss classes for a variety of reasons, but you should stress the importance of attendance. You can request documentation of a health-related excuse; however, you should use your own judgment about absences. Office Hours Be conscientious about keeping office hours. They provide time for you to give students extra help, answer questions which couldn't be answered during class time, and go over quizzes and tests individually. Encourage your students to make use of your office hours because the one-on-one help can make a considerable difference. You can often check on the effectiveness of your in-class explanations by talking with students during office hours. Before classes begin Attend any preliminary staff meetings for your course. Photocopy enough copies of the course Syllabus and the Student Data Form to distribute to your students. Tentatively schedule office hours (3). They should be arranged at scattered times so as to be available to the largest number of your students. One of your office hours will be held in the Math Lab (Room B860 EH). Your Math Lab time will be assigned during the second week of classes, after which you can finalize your office hour times. Develop a handout for the students in your section with all the pertinent information. Locate your classroom and the Math Lab. First Day of Class Pick up your class list from your mailbox before you go to class. Class lists will also be available electronically. Get to your class early so you can be there when the students come in, put any announcements on the board, and start on time. The University hour starts at 10 minutes after the hour and ends on the hour. Take attendance the first two days by calling roll or passing around a sign-up sheet. A student must attend one of those days to hold a place in class. You will get a form in your mailbox to list the names of any students who do not show up on either of the first two days. The office will drop their names from your class list and make the spaces available to other students. Class enrollment and section changes (drops/adds) are controlled by the Math Office in 2084 EH, DO NOT tell anyone that they can get into your section. DO NOT even tell them that it's "all right with you." Tell them that class size is handled in 2084 EH and send them there. First Few Days Students will continue to rearrange their class schedules, so you should take attendance until your class list stabilizes. Major religious holidays (Jewish, Rosh Hashanah) coincide with the start of classes in some academic years. This may create attendance problems for some students and faculty. Be as considerate as possible if the situation arises. Finalize your office hour times with your class. Remind students to make no travel plans which conflict with uniform exams. First Few Weeks During the first three weeks of classes students can shift sections or even change courses. For instance, students may decide to shift from calculus to precalculus, or drop math altogether. Any such change after the drop/add deadline will appear on the student's transcript. The gateway test, your quizzes and corrected homework will give the students a way to evaluate his/her standing in the class during these first few weeks. Some students will ask for your advice about remaining in your class, and you might want to ask the course coordinator about specific cases. It is reasonable to be accommodating to someone who changes to your section late, but they are responsible for catching up with the class. Updated class lists are distributed 4 weeks into the term. Homework Teams Mathematics 105, 115, and 116 assigns team homework as well as individual homework. Homework teams are created on the second day of class. Each week the teams are required to work together to analyze and solve the team homework problems and write up the solutions. Students are encouraged to meet twice a week: once to discuss the problems and find solutions and once to go over the final write-up. A preliminary reporter's page is due after their first meeting and the second is due with the final product. Each team turns in a single set of solutions. The instructor grades the homework and hands it back at the earliest possible date. (Feedback is more useful to students if they receive it soon after they have done the work.) Everyone on a particular team gets the same grade. It is the instructor's responsibility to assign teams. Instructors in previous years have found that teams of four worked best. Groups consisting of only two students working together failed to generate enough ideas, and teams larger than four often have trouble functioning. With four on a team, an occasional student's absence won't matter. A reasonable strategy for assigning the first teams when you know little about the students, is to group students who live near each other - preferably in the same dorm. (A list of dorms follows.) This minimizes logistic problems concerning where the group will meet. Until you know students better (and know when someone can hold their own), do not put one woman with three men. Some women put in this situation tend to participate less and often feel their contributions are not valued. We suggest that you change the makeup of homework teams two times during the semester (after each uniform exam.) This allows each student to get used to working with a range of other students. Mixing groups helps in dealing with problem students or with groups where one or two students tend to dominate. When you change the makeup of the teams, you may want to use a mixture of criteria for groups. There is evidence that having a mixture of levels in a group helps it function better. In this case, if everyone is working, both strong students and weak students grow stronger. It is also useful to have a mix of gender and race. When students have a good experience working together it leads them to respect the opinions of others. Objectives for using cooperative homework teams: Give students a chance to talk about mathematics. Give students the opportunity to teach each other. Help students learn how to communicate with each other about mathematics. Give students support in their anxiety about not being told what to do. Assigning the First Teams During the first day of class you will form groups of four. Try to form your teams with students who live close to each other (North Campus, South Quad, etc.) in order to make it as easy as possible for them to meet together. Make the teams as heterogeneous as possible (gender, race, etc.). There is evidence that when a heterogeneous group learns to work successfully together the members of the group become more tolerant and accepting of different ideas. Dorm locations (roughly three groupings of dorms) North Campus: Bursley Hall (This is where many of the engineering students will be housed.) Individual Roles in Homework Teams Giving students individual roles in homework teams helps students take individual responsibility for making their homework team function successfully. It is important to make sure that students change roles every week so everyone will get a chance to function in a particular role. Here is the description of the roles we suggest in the Student's Guide. Scribe: The scribe is responsible for writing up the single final version of the homework to be handed in. This is the only set of solutions which will be accepted or graded. Each member of the group will receive the same grade. Whenever possible, your solutions should include symbolic, graphical and verbal explanations or interpretations. Diagrams and pictures should also be provided if possible. Clarifier: During the team meeting the clarifier assists the group by paraphrasing the ideas presented by other group members, e.g. "Let me make sure I understand, the graph goes up...". The clarifier is responsible for making sure that everyone in the group understands the solutions to the problems and is prepared to present the problems to the class if the team is called on. Reporter: The reporter writes a record of how the homework sessions went, how long the team met, what difficulties or successes the team may have had (with math or otherwise). If there is disagreement about the solution of a problem, the reporter should present sketches of alternate solutions and explain the difference of opinion. The report should list the members of the team who attended the session and their roles. The report should be on a separate sheet of paper and be the first page of the teams homework solutions. Manager: The manager is responsible for arranging and running the meetings If the team has only three members, or if one of the four members cannot attend, the manager should also take one of the other roles. When the homework is returned, the manager sees that it is photocopied and distributed so that each team member's portfolio contains a copy of the corrected problems. Helping Homework Teams Function Effectively Students will be more likely to work at making their homework teams work if they perceive that what gets done within their group is an important part of the class. Some of the ways you can make this part of the class important are: Give team homework a fairly large part of the grade. Counting team homework as 60% of the section component of the course grade will ensure that students take it seriously. Have some method for letting students see what other teams do. For example, call on individuals (or pairs) to put solutions to particular problems up on the board and explain to the class why they did what they did. Don't always ask for volunteers. Students are going to be more likely to make sure they understand a particular problem if they think they might be called upon to explain it to the class. Photocopy good solutions and distribute them to other teams. In fact, you should resist the temptation to write up your own solutions. Their peers' good work is more impressive. Some instructors have found it helpful to students if at the beginning of the semester the groups start some of the difficult homework problems in class. If a group is getting stuck at a particular point the instructor can ask other groups to help out. For example, the instructor can ask two or three groups how they have decided to approach a particular problem. In this way the instructor can help guide the students in learning to solve problems. It also will help students quickly find out that there is more than one way to approach problems. How to deal with "sick" teams In most classes there will generally be at least one sick team -- a team that is not working together effectively. Some of the signs of a sick team might be: Students appear to be working individually and not as a group. The homework is not up to par. Student(s) complain that someone isn't pulling his or her weight (doesn't show up, hasn't tried to work with the material before the meeting, doesn't contribute to the group, etc.) Student(s) complain that one or two other students dominate the group and don't listen to him/her. Problems can often be minimized by giving students clear guidelines and instructions on what is expected, the goals of the group work, and the procedures for making the team work. Some strategies that instructors have used to help make a dysfunctional team function successfully: Meet with the students in the team and discuss with them their perceptions of what is going on, perhaps using the team evaluation forms from their Student Guide as a starting point. Give the students themselves the responsibility for making the team work. Change the teams around. Have the team meet in your office and practice working together. Using team evaluation forms Included in each Student's Guide is a team evaluation form. These may be used in a number of ways including: (1) each member of the group fills out a form for every other member and then they share and discuss the results, (2) everyone fills out one for each member of the group and hands it in to you. Whether or not you make use of the evaluation forms, it is helpful for students to use them when they are reflecting on how their group is working. Cooperative Learning in the Classroom The importance of the first day There are several things you can do on the first day of class that will make it easier to use cooperative learning throughout the semester. First, start getting students acquainted with each other and with you. Students are more likely to feel comfortable in participating if they know something about their classmates. Learning names as quickly as possible is imperative to making it all work and you can get a good start on the first day. Previous instructors used a variety of methods for learning names. Mort Brown took pictures of the students: "I really worked on memorizing their names. On the first day I took a picture of each student, they were either sitting or coming in the door--usually in bunches. By the time I'd written all the names out at the bottom of the pictures, I knew most of them already because those candid pictures really brought the person across. It really made a big difference." Other instructors use a variety of ways to start learning names including using name tags and having the students introduce themselves to each other and/or the class. It is also important to get students working in small groups in a cooperative assignment on the first day. Phil Hanlon, a faculty member in the Department who uses collaborative groups says: "I find it important to start building a good learning environment on the first day. I learn names and I start out on the first day using groups. On the first day I split them into groups of four and give them a problem they are to grapple with as a group. I do this toward the end of class so they must finish the problem on their own and report back later." Having students engage in a cooperative task on the first day gives them a chance to get to know some fellow students right away. It also helps build expectations that this class will be different in the sense that students will be required to actively think and participate. Getting students acquainted with each other quickly For the first few weeks remind students to introduce themselves to each other whenever you put them in a different group. This helps students become acquainted and comfortable with each other. Using names when you call on students in class also helps everyone become acquainted. Choosing appropriate group problems The type of problems that you choose for in-class work can make or break an activity. The type of problem you use will of course be different depending on how much time you have. Problems that work best are interesting and challenging and have a clear purpose as a group assignment. In other words, the students' understanding of the material will be enhanced by working in a group on the assignment. If the problems are too easy students don't take them seriously--they tend to feel as if it is "busy" work. Some instructors, have found it helpful to sometimes have homework teams start working on one of the more difficult homework problems and finish the problem outside of class. This is especially useful at the beginning of the semester. Students like it and it gives the instructor a chance to see how the different teams are working together. The instructor can go around to the groups and give hints and ask questions that help the groups get started and help model problem-solving strategies. Groups that are on the right track can be asked to share with the others how they decided what to do. Since most students are not used to working together and may not have a clue on how to approach these more difficult homework problems, making sure they are on the right track will make their first meetings more focused and productive. Forming in-class groups Instructors have found that in-class groups work better if students are required to get up and move to form the groups. Students are either asked to get into their homework teams or the instructor has them count off with the different numbered groups being spaced around the room. There are reasons for using different groups (than homework teams) for some of the in-class work. It gives students a chance to get acquainted and work with different students and it may help to break up patterns that tend to form when a group works together for an extended period of time. Communicating the guidelines for an exercise Being very clear about group assignments so that every student knows just what to do is crucial. Some instructors found it useful to have the problem(s) written on a piece of paper, giving each group only one piece of paper. This is a good technique to use to help students start thinking that you are on their side. The paper becomes associated with "them" outside of the class and the instructor becomes an ally against "them"---Mort found students even saying "They want us to do ______________." Also, with only one sheet of paper students can't go off and work the problem individually. Variation is important. Other possibilities are writing the problem on the board, or if you are going to have each group do a different problem, writing each problem on a different board and having students fill in the solutions. Other things that need to be communicated are any roles that are required (e.g., a scribe to write down the solution, etc.), how much time students have to finish the assignment and what is to happen with the product. Using a variety of methods for getting students to work together keeps the class interesting. Small problem solving groups (groups of three or four students). With small groups fairly sophisticated problems can be used. This works best when you have enough time for the groups to reach a solution. Here again it is advisable to give the students a few minutes to individually read through the problem and think about it before they have to talk about it. For variety you could have some groups go up to the board and work the problem together as they are standing at the board. Think-pair-share. Individual students work a problem or write about a process, in pairs students compare answers and reach a consensus, and some pairs are asked to share their results with the class. In this process each student does individual work before comparing with another student. (Whenever students are given time to do individual thinking before they are required to work in a group it will help distribute participation in the group.) Pairs. Using pairs to address short assignments can be used intermittently with mini lectures without too much moving around. These can be planned, short assignments or if no one can answer a question posed to the whole class, you can break them into pairs and have them try to come up with an answer. Group Quizzes. Students tend to like group quizzes, and a tremendous amount of learning goes on when they are hammering out the answers. Most groups tend to get everything right. More difficult questions can be used on group quizzes than can be used on individual quizzes. (It is, of course, important to have individual quizzes too. But using group testing 2 or 3 times a semester seems like a real treat for most students.) One idea that has worked well is to give students a 10 minute quiz individually, collect it, and then immediately give them the same quiz again as a group quiz. Getting groups "unstuck" As important as it is to have students grapple with a problem together, it is equally important that they don't spend a great deal of time frustrated. If no one in the group has any idea of how to get going, it is time for you to step in with a hint, or possibly a mini-lecture if several groups aren't getting anywhere. The rule of thumb here is class time needs to be productive, not threatening. Giving feedback to the groups, and using the results of group work Instructors have tried a variety of methods for using the results from group work. This is an important part of the learning process because it not only gives feedback to the groups, it gives students the opportunity to see other students' work and different ways of thinking about the problem. It also makes group work an important part of the in-class learning. If you give students practice in analyzing each others' work, it will help them become better problem solvers. Some of the methods that have been used: Ask one or two representatives from each group to put a problem on the board and explain it to the class. Some instructors have the whole group go up. Since students have been working in groups and have had time to think about the problem you might call on students instead of asking for volunteers. Groups will tend to make sure everyone understands the solution if any one of them might have to represent the group. Getting students in the class to analyze the solutions increases their learning. Some questions you might ask (whether the solution is right or wrong) are: -Do you agree or disagree with this solution and why? -Did anyone get a different solution or a different way of reaching the solution? -Is one way "better," if so, why? -Do you agree with what has been put up on the board? -Does anyone have any questions for the people who put this up? -Could anyone tell me to go about checking to see if this is a reasonable answer? Ask one group to put up its solution and then ask another group explain it to the class (if they agree with the solution) or tell the class how they might do it differently and why. Have the groups write their solution on an overhead transparency and have one or two students describe the results to the class. Or, you put up the transparencies and get students to comment on the results--that way the students who worked out the solution are distanced so others are more likely to be more open in analyzing it. Ask students to change papers with another group and critique and give feedback to the other group. If students know that other students will be seeing their papers they tend to be more careful and thoughtful. This process also helps students to learn how to critique their own papers, and allows them to see the thinking of another group. Have two groups get together and compare their answers, discuss the discrepancies, and come up with an agreed upon solution. Have students hand in the solutions for extra credit. (This takes little class time but takes more work for the instructor outside of class. It isn't always necessary to grade or make comments on these papers--just look them over and get an idea of where students might be having difficulties and then spend some class time addressing those areas. In this case students get the extra credit if they were engaged in the process.) Have students hand in their solutions as part of their homework assignment. Sometimes just discussing the problem as a whole group is enough. Making sure the ideas are clear before students leave class Students often have trouble understanding other students' work. If the wrap-up of a group exercise isn't completely clear, many students will become frustrated and blame the group work itself. You need to be prepared to recap the session for them if necessary. Further resources There are several videotapes of instructors teaching Calculus classes, many of them facilitating cooperative learning in the classroom. You may check out these videos and watch them to get other ideas. End of Term Procedures Scheduling review sessions If you plan to have review sessions for your class, please place a room request in 2084 EH. Room requests can take up to a week to fill, especially during the busy period of review sessions, so plan ahead. The seriousness of assigning student's grades Assigning final grades in a course deserves great care. The grades you give students are a part of their permanent records and may have far-reaching effects on their futures. So leave yourself time to think through this job. Return of exams Students can get their exams returned by mail. Please announce to your class that students requesting their final exams must provide the instructor with a stamped, self-addressed envelope of suitable size. In general, papers and examinations should be returned to students so that they may study from them. Examinations that are not picked up or mailed should be retained and not be destroyed for at least one year to provide for those who wait to pick up their exams until later, and also to protect you in cases where charges of improper grading are filed. Receipt of grades by students Please announce to your class that mathematics grades will not be given out through the departmental offices. As soon as grades are posted by the registrar's office, they can be viewed via Wolverine Access. However, students who wish to know their grade by postcard should provide you with a stamped postcard. Federal privacy regulations prohibit posting grades in hallways, even if the students are identified only by ID numbers rather than names. Non-Standard grades The grades of I (incomplete), X (excused absence form both the final exam and the alternate), and NR (no report) should be given very rarely. These grades always remain on a student's transcript to indicate an irregularity. Unless you report a different grade within the appropriate deadline, these grades will lapse to an E. You cannot give the grade of I to any student who has completed all the work, nor can you allow a student to do extra work to raise the grade. An incomplete should be used only in the case of a student who is passing the course, but is missing one portion of their grade (often a term paper or exam) and has arranged with their instructor to make it up. Please contact the course coordinator before giving a grade of I. Students who miss the final exam and the alternate should get a grade X only if they have contacted you and presented an excuse satisfactory to you that their absence was unavoidable. All X's should be given in consultation with the coordinator. NR (which means no report) should be used only when a student who has never attended your class (or attended only at the very beginning of the term) appears on your gradesheet. A student who has taken exams and has only recently ìdropped out of sightî should be given a grade in consultation with the course coordinator. Grade complaints You can prevent many complaints by agreeing to meet with students and explaining their performances on the final exam. There are times when students will insist that they know the material, but for various reasons their records don't show it. They need to see that the grades you give are a record of their actual performance, not your opinion of their potential. There is, however, an increasing tendency for students to make official complaints about their grades. If informal efforts do not resolve the problem, we have to set an elaborate and time-consuming appeals procedure. And beyond that, it is not unheard of for students to sue the University for alleged unfair grading. Your best form of preventive medicine is a good set of records. If you can show that grades were arrived at by a rational system, uniformly applied, most complaints will disappear. Returning your textbooks Return your textbooks to 2084 EH. If you are teaching, advising, or tutoring, or for some other reason want to keep your book for the summer, you still need to sign it out. Changing course grades It is unlikely that you will ever have the occasion to change a grade. If you should need to submit a different grade to remedy a clerical error or to replace a grade of I or X, you fill out a Supplementary Grade Report (available in 2084 EH). You will need to know both the student's ID number and college affiliation, e.g. LSA, Engineering, etc. Leaving Town If you are going to be unavailable after the term, graduate students should leave their gradebooks and exams in the Graduate Office, and let them know an address where you can be contacted. Faculty should leave their gradebooks and exams with the Associate Chairman, and a forwarding address in 2074 EH. Classroom Organization and Management Classroom Activities Activities in the classroom generally fall into the following categories: lectures, class discussions, group activities, etc. (Sample lesson plans are available.) Often several modes are mixed into one class period. The proportions of the mix will depend on the ideas to be investigated, the size and maturity of the class, and the personality and style of the instructor. Lectures We are convinced that giving frequent extended lectures is, in general, not an effective use of classroom time. There will be many times when you should lecture, but there is no need to systematically present all the material step by step. The book is very readable and students can learn the content by reading the book. Our rule of thumb has been to lecture no more than fifteen minutes at a time. The guiding principle is to tell the students something they want to know at the exact time they want to know it. Short "bursts" of lecture can be useful in the midst of a cooperative activity. If a large fraction of the students have run into difficulty, it may be time to intervene. You can spot this kind of moment by listening carefully to the conversations going on within groups and to the kinds of questions directed at you. Lecturing also may be useful to clarify a particular concept when you know that the students will have a hard time understanding the concept without additional assistance. Another good use of a short lecture is to give guidelines to the students on what to expect in the next readings and any pointers on how to learn the material. It is good to use short lectures (10-15 minutes) to preview new material or to review previous ideas. Quizzes Students need quizzes to evaluate their individual performance and to practice their test-taking skills. Many instructors include a problem from the individual homework to encourage their students to do all the homework. You should not let quizzes take up too much valuable class time. Try to have them no longer than 20 minutes at the most. Motivational talks Students (and instructors!) need frequent encouragement in these courses. There is a substantial payoff if you take a few moments to talk to your class about the progress they have made, for example, "Your writing has come a long way", or "Look how well you've learned to handle these long word problems." Getting Students to Read the Book 1.Don't lecture as if the students have never before seen the material! 2.Don't lecture as if the students have never before seen the material! 3.Don't lecture as if the students have never before seen the material! 4.You must really expect them to read the book, and always act as if you expect them to read the book. 5.You must set the tone the first day of class, saying that they must read the book and why. 6.You must read the book! 7.Make each day's assignment of reading an event, complete with coming attractions. 8.When you start the day's activities, do a brief activity that assumes the reading of the book. 9.As a rule, don't do examples directly from the book, unmodified -- it sends the wrong message. (But there are exceptions.) 10.When examples from the book are important and difficult, go over the difficult parts, only outlining the results of the easier parts, constantly tossing in phrases such as "as you saw in your reading,..." Better yet, get them involved in a group activity to work through the exercise themselves. 11.When they aren't doing the reading, try: (a) Brief quizzes over the reading at the beginning of the day. (b) Group activities based on the reading, as mentioned above. Most Importantly --- 12.Don't lecture as if the students have never before seen the material! Questioning Techniques An interactive teaching approach stimulates students to think rather than to listen passively, so show that you are open to questions by paying attention to your audience and asking questions frequently. Some of your questions will be addressed to the whole group and other questions to individuals. Don't hesitate to call on all of your students, not just the ones who raise their hands. You will find that the classroom atmosphere is improved when many students participate in the discussion and the whole class stays alert. Think about the types of questions you ask and try to vary them from easy and factual to more thought-provoking. Make sure that students can hear each others' questions and answers, and listen attentively yourself. A silent class is often an indication that the students have not understood the material easily. They may very well be completely confused and unable to phrase questions or simply intimidated. Teachers often sprinkle their lectures with the following questions: "Do you all understand?" or "Any questions?" or "Is this O.K.?" Students almost never answer these questions because they don't want to appear dumb. You will have better results asking more explicitly "Why did I multiply?" or "What other functions behave this way?" or "Am I going too fast?" After you ask a question, don't call on someone too quickly for an answer. Leave sufficient time for all of the students to think about how to answer. They will learn more. It's a good idea to wait at least 4 seconds (try counting). Don't answer your own questions. Questions phrased like "What shall we do now, graph it?" give the students the impression that you won't require them to think for themselves. If you are short of time, you can postpone a question to a later time or to a later class. If a question isn't of interest to the whole class, don't answer it during class. If you carry on a private conversation with one student, the rest will lose interest immediately, so answer very specialized questions after class or during office hours. Establishing and Maintaining Control in the Classroom Sometimes instructors teaching in the introductory courses have difficulty controlling their classes. It is uncomfortable when students have conversations during class, come in late, leave early, read the newspaper, or do homework from other classes. In classes that use group homework and in-class cooperative learning, students get to know each other much better than they do in ordinary classes, so they will have more to say to each other. Letting some students disrupt the class is not fair to the rest of the students who would like to listen. Here are some things that you might do to establish control of the class. Set a tone of authority from the beginning. Don't be overly friendly, especially at first. Establish that you are in charge. It is always easier to let up a little later than to tighten up after things get out of hand. Dress professionally (especially for the first few weeks of class). Have them call you by your last name (Mr. ______, Dr. Jones). Have a firm attitude in front of the class, polite and pleasant. Start on time and end on time. Hand out written, explicit ground rules of what you expect from the class. The ground rules might include: I expect mutual respect. I will be on time and start the class on time, and I expect you to be in your seats and ready to go at 10 minutes after the hour. When students are presenting their work everyone listens. When I am speaking, everyone stops what they are doing and listens. This class ends on the hour. I will do my best to finish at that time and I expect everyone to stay in their seats and to be attentive until that time. I will be at every class, and I expect you to be here also. Casual attendence is one of the major causes of poor performance. Reinforce the punctuality rules. Start the class on time. If someone comes in late, stop what you are saying and wait until he/she is seated and then quietly say, "Please be on time tomorrow" then continue on with what you are saying. (They will be on time if the ground rules are set, the instructor starts on time, and important stuff is covered in the first few minutes of class.) Do not cater to students who arrive at class late. For example, don't stop talking and hand back a paper to a latecoming student. If students start to pack up early, stop what you are doing and say, "This class ends at 9:00, there are still five minutes before it is time to pack up to go." If a student is frequently late, you may want to say (after class) that you are bothered by the disruption. Reinforce the "no conversation" rules. Talking and whispering, even when they concern the topic at hand, disturb both the class and the instructor. As a general rule, the students are more likely to start to whisper when the discussion is not pitched at the right level. If it's too easy, they feel that they don't have to listen, and if it's too incomprehensible, they try to explain it to each other When you are talking to the class (lecturing, explaining something) do not allow others to talk too (those old ground rules). If someone starts to talk, stand still and look at them until they are quiet and then go on with your lecture. If someone talks to another student while you are trying to explain something to the class, quietly remind them of the rule and wait until there is order. If a student keeps talking even when you have called for attention, or have said that you are going to make a really important point, ask that student (by name) a question about the point that you have made. When a student starts to answer a question, and there are others talking, say, "Wait a minute, I want everyone to hear." Say to the class that <student's name> is about to speak and you want everyone to hear it. When the talking stops, ask the student to answer the question, and thank him or her. Have students build on each other's comments, "John, do you have anything to add to Mary's answer?" If this is done enough students will start to listen to each other's answers. When you think that a student really understands a problem, ask him or her to explain the problem at the board. Tell the other students that <student's name> is going to explain the problem, and that they should all pay attention. Control the in-class cooperative learning activities. Don't give the impression that you're not watching the whole class even when you're walking around attending to individuals. When starting a group exercise, count the students off and have them move to their group for the exercise. Students tend to sit with people they know. Moving them will make it more likely that they will get right down to business. (Try to avoid having them work in their homework groups except on special occasions.) During a group exercise, watch out for groups that are talking about something other than the problem you have assigned. Following are some possible actions to take if they are not staying focused on the problem: Ask the students who are talking about something else to tell you where they are in the problem. If they are finished, ask them if they all understand it well enough to present it to the class. If not, have them explain it to each other. Have them go up to board and put up the solution. Have an extra group activity to give to groups who finish early. When you want to make a point or clarify something during a group activity, tell the class in a loud voice that you need their attention to make an important point. Wait for the talking to stop, and then make your point. When you are ending a group exercise, go to the front of the room and loudly ask for everyone's attention. Repeat yourself until the talking stops. One instructor who had a quiet voice used a bell to signify the end of a group exercise. Don't let a few students dominate the class. Make sure everyone gets equal time. One "expert" student may monopolize the discussion by answering all your questions almost as quickly as you pose them. The way to distribute the discussion more evenly is by calling on all of your students individually. A persistent student may repeatedly interrupt you with low-level questions or questions which seem to lag behind the lecture. This situation is difficult to handle because you can't cooperate without getting behind schedule and boring some of the other students. Be polite but encourage the student to see you after class or during office hours. You might also suggest that the student's speed of comprehension will be increased by reading the upcoming lecture material before class. An aggressive student will sometimes try to engage you in a dispute. Just listen and calmly insist that you will discuss the problem individually after class. If the issue is one of how some problem was graded, take the paper back and say that you will review the grading and discuss it later. It is far easier to consider partial credit when students are not watching. The Instructor - Student Relationship The classroom personalities of effective teachers range from quiet and scholarly to lively and entertaining, and your own teaching will change as you gain experience and try out new techniques. Regardless of your own individual style, the classroom atmosphere is best when the instructor is open, supportive and consistent in dealing with students. Mutual Respect Be positive about the course and course material to your students. Students do better and learn more when they trust that the Department has done its best to develop a good course and choose a good book. Learn your students' names and use their names as early in the term as possible. You may want to get to your classroom early to talk informally with students before you begin the class. Encourage the students to get to know each other and work on their homework in groups. Always treat students with courtesy and listen to them carefully. Expect them to treat both you and their fellow classmates respectfully. Don't be afraid to let your students know something about you personally outside of your role as teacher. Don't waste the students' time. Begin and end the class promptly. Prepare thoroughly for each class, paying special attention to the homework problems even though they may seem trivial. Students get restless and angry when the instructor reads, rereads and stumbles through a homework solution. Hand back the students' tests and papers promptly. Meet your obligations. Keep all appointments you make with students. When you hold office hours, don't leave early assuming that no one is coming. It's often a useful strategy to make specific appointments with students during your office hours, particularly if they could benefit from the extra attention. Discussions during office hours create good relations with students who then get a chance to know you more personally. Don't make snap judgments about students' capabilities - the students will often prove you wrong. Don't discuss a student's performance or behavior with other students. Be careful not to categorize students on the basis of race or gender. As a teacher in charge of a class (or even as a tutor or grader) you must be very careful to avoid any non-professional relationship with your students. Close personal or romantic attachments are inappropriate, even when completely mutual. Because a student might feel that he/she could gain academic favors by agreeing to a closer personal relationship (or suffer by refusing), any situation with the potential for exploitation, realized or not, must be scrupulously avoided. Dishonesty and Cheating An atmosphere of mutual trust and a sense of classroom community will relieve some of the competitive pressures on your students. However, there are certain specific steps which you can take to prevent cheating. Whenever you want problems done independently, state it clearly. Tell them that, in general, cooperative studying will improve their learning (it will), but that in this particular instance you want them to work alone. Unfortunately, classrooms are often too crowded to allow alternate seating, so you can only spread them out as much as possible. Have them put away all books and papers. The most common form of cheating is copying from a neighbor's paper. Don't hesitate to preface a quiz with something like, "I know we're crowded here, but there are serious penalties for academic dishonesty (see theStudent's Guide), so you must keep your eyes on your own paper." Proctor conspicuously and carefully. Detailed instructions for proctoring the uniform exams will be given to you before exam day. Occasionally a student will try to alter a test paper after you hand it back and then claim you made a grading error. You can discourage this as you correct by indicating errors in red pencil and drawing a line through any questions which are left blank. If you suspect a student of doing this, speak to the course coordinator before returning the paper. If you are concerned about a probable cheating incident, consult the coordinator. Don't try to handle it yourself. Don't accuse a student of cheating without very solid evidence. For your own protection it is better to go through channels. Keep your grades in a secure place. Many cases of dishonesty take the form of highly suspicious excuses. You can ask for documentation of any medical excuse but otherwise you will have to use your own judgment about whether or not to accept an excuse for late work, missed tests, etc. It's better not to challenge the validity of an excuse and certainly don't be sarcastic (sometimes an implausible story will turn out to be true). Remind students that they should alert you in advance if they encounter problems with keeping deadlines. Don't bother with excuses about missed quizzes; it's far easier to announce that you will drop one or more quiz scores. Whenever you find yourself negotiating with a student, be as charitable as possible without making extra work for yourself or being unfair to the other members of the class. Unusual Situations Which Can Arise With Individual Students Accomodate students with disabilities as much as possible. It is common for them to need extra time during tests. You may receive documentation about a student in your class from the Office of Services for Students With Disabilities. If the situation is complicated, contact your course coordinator. Some students become abnormally dependent on you and want you to give them excessive time. Don't let their demands make you late for your own courses or keep you after office hours. You are already spending considerable time on your teaching, so suggest that they find a classmate to work with or try one of the tutoring facilities (see Tutoring Facilities). It is very rare to have a student with severe test anxiety, however, many students worry about tests and don't perform as well on them as they do in their daily work. If you find yourself working with a student who is overly anxious, it helps to explain that the trouble often stems from an inability to choose an appropriate technique quickly when problems of several types are mixed together. Practicing old tests under simulated conditions is the best cure for this type of worry. Also, students are used to much easier test than the ones we give. It's useful to point out that our test questions are purposely never exactly like the homework but instead the questions may require them to apply their understanding in new situations. Tutoring Facilities Math Lab The Math Lab provides tutorial help for students in the introductory courses. It is staffed by instructors and advanced undergraduates. Any student in your class who needs extra help should be strongly encouraged to see you during your own office hours, but the Math Lab with its convenient hours is a good alternative. Announce this to your class. Math Lab B860 East Hall M-Th 11am-4pm and 7pm-9pm Friday 11am – 2pm Sunday 7pm – 9pm Tau Beta Pi (1228 EECS) The Tau Beta Pi engineering honors association has regular tutoring hours conducted in various libraries and dormitories during the term. You will receive an exact listing early in the term so you can announce it to your class. Comprehensive Studies Program (764-6410) The Comprehensive Studies Program is located in G155 Angell Hall (see "University Support Offices"). It provides free tutoring in scheduled individual and group sessions for students who have had limited access to high-quality academic resources prior to entering college. The tutors are graduate or upper-class undergraduate students with teaching experience. The services are open to all students. Minority Engineering Program (764-6497) The Minority Engineering Program operates the Engineering Learning Resource Center on North Campus in 2327 Electrical Engineering and Computer Science. Graduates and senior undergraduates tutor in all areas of math and engineering. Disabled Students Special assistance for students who are physically disabled or have learning disabilities is available through the Office of Disabled Student Services (see "Instructional Support Services"). Athletes The time commitment required by college athletics is substantial. Students participating in varsity athletics are eligible to receive academic support including tutoring, regularly scheduled study groups, skill development, academic advising and assistance with interpreting the regulations governing athletic participation. Departmentally Designated Private Tutors Early in each term the Undergraduate Program office in 2084 EH compiles a list of volunteer math tutors. Tutors indicate which courses they are interested in teaching. The list is available to students who then make individual arrangements about time and place and hourly payment rate.
Clearly written and comprehensive, the seventh edition of Gustafson and Frisk's popular book provides in-depth and precise coverage that is incorporated into a framework of tested teaching strategy. Gustafson and Frisk, both career mathematics educators, combine carefully selected pedagogical features and patient explanation to give students a book that preserves the integrity of mathematics, yet does not discourage them with material that is confusing or too rigorous. Long respected for its ability to help students quickly master difficult problems, this book also helps them develop the skills they'll need in future courses and in everyday life.
This textbook is an introduction to Scientific Computing, in which several numerical methods for the computer-based solution of certain classes of mathematical problems are illustrated. The authors show how to compute the zeros or the integrals of continuous functions, solve linear systems, approximate functions using polynomials and construct accurate approximations for the solution of ordinary and partial differential equations. To make the format concrete and appealing, the programming environments Matlab and Octave are adopted as faithful companions. The book contains the solutions to several problems posed in exercises and examples, often originating from important applications. At the end of each chapter, a specific section is devoted to subjects which were not addressed in the book and contains bibliographical references for a more comprehensive treatment of the material. 9783642124297 | 3 edition (Springer Verlag, August 27, 2010), cover price $69.95 | About this edition: This textbook is an introduction to Scientific Computing, in which several numerical methods for the computer-based solution of certain classes of mathematical problems are illustrated. Paperback: 9783642263941 | 3 edition (Springer-Verlag New York Inc, December 31, 2013), cover price $69.95 | About this edition: This textbook is an introduction to Scientific Computing, in which several numerical methods for the computer-based solution of certain classes of mathematical problems are illustrated. Product Description: Computational science is an exciting new field at the intersection of the sciences, computer science, and mathematics because much scientific investigation now involves computing as well as theory and experiment. This textbook provides students with a versatile and accessible introduction to the subject...read more 9780691160719 | 2 edition (Princeton Univ Pr, March 23, 2014), cover price $99.50 | About this edition: Computational science is an exciting new field at the intersection of the sciences, computer science, and mathematics because much scientific investigation now involves computing as well as theory and experiment. 9780691125657 | Princeton Univ Pr, May 2, 2006, cover price $99.95 | About this edition: Computational science is a quickly emerging field at the intersection of the sciences, computer science, and mathematics because much scientific investigation now involves computing as well as theory and experiment. Product Description: Proceedings of a meeting on large scale scientific computing held at the Oberwolfach Mathematical Institute, July 14-19, 1985, under the auspices of the Sonderforschungsbereich 123 of the Univ. of Heidelberg. 9781468467567 | Reprint edition (Birkhauser, December 12, 2012), cover price $99.00 | About this edition: Proceedings of a meeting on large scale scientific computing held at the Oberwolfach Mathematical Institute, July 14-19, 1985, under the auspices of the Sonderforschungsbereich 123 of the Univ. Product Description: This book describes the fundamentals of the use of quasi-cyclic low-density parity-check (QC-LDPC) codes within the framework of the McEliece cryptosystem. In the first part, different design techniques for QC-LDPC codes are examined, and the error correction performance of these codes is assessed through numerical simulations of transmission systems...read more 9783319025551 | Springer-Verlag New York Inc, March 16, 2014, cover price $69.99 | About this edition: This book describes the fundamentals of the use of quasi-cyclic low-density parity-check (QC-LDPC) codes within the framework of the McEliece cryptosystem. Product Description: Our digital technologies have inspired new ways of thinking about old religious topics. Digitalists include computer scientists, transhumanists, singularitarians, and futurists. Writers like Moravec, Bostrom, Kurzweil, and Chalmers are digitalists...read more Product Description: A mind-blowing glimpse into the near future, where quantum computing will have world-transforming effects.The quantum computer is no longer the stuff of science fiction. Pioneering physicists are on the brink of unlocking a new quantum universe which provides a better representation of reality than our everyday experiences and common sense ever could...read more Product Description: Since...read more 9780128001622 | Academic Pr, March 1, 2014, cover price $182.00 | About this edition: Since its first volume in 1960, Advances in Computers has presented detailed coverage of innovations in computer hardware, software, theory, design, and applications. 9780124080898 | Academic Pr, August 28, 2013, cover price $182.00 | About this edition: Since its first volume in 1960, Advances in Computers has presented detailed coverage of innovations in computer hardware, software, theory, design, and applications. 9780124080942 | Academic Pr, March 27, 2013, cover price $182.00 | About this edition: Since its first volume in 1960, Advances in Computers has presented detailed coverage of innovations in computer hardware, software, theory, design, and applications. 9780123965356 | Academic Pr, July 31, 2012, cover price $182.00 | About this edition: Since its first volume in 1960, Advances in Computers has presented detailed coverage of innovations in computer hardware, software, theory, design, and applications. 9780123965264 | Academic Pr, April 24, 2012, cover price $182.00 | About this edition: Since its first volume in 1960, Advances in Computers has presented detailed coverage of innovations in computer hardware, software, theory, design, and applications. Product Description: This book constitutes the thoroughly refereed post-conference proceedings of the 6th Conference on Theory of Quantum Computation, Communication, and Cryptography, TQC 2011, held in Madrid, Spain, in May 2011. The 14 revised papers presented were carefully selected from numerous submissions...read more 9783642544286 | Springer-Verlag New York Inc, March 31, 2014, cover price $72.00 | About this edition: This book constitutes the thoroughly refereed post-conference proceedings of the 6th Conference on Theory of Quantum Computation, Communication, and Cryptography, TQC 2011, held in Madrid, Spain, in May 2011. Product Description: Clearly explains the successful PCS 7 automation system architecture, functionality, and engineering philosophy Project engineers, systems integrators, and site engineers can master by themselves the skills required to use a modern control systems platform...read more 9783540746492 | Springer-Verlag New York Inc, February 28, 2014, cover price $139.00 | About this edition: Clearly explains the successful PCS 7 automation system architecture, functionality, and engineering philosophy Project engineers, systems integrators, and site engineers can master by themselves the skills required to use a modern control systems platform. Product Description: Support vector machines (SVM) have both a solid mathematical background and practical applications. This book focuses on the recent advances and applications of the SVM, such as image processing, medical practice, computer vision, and pattern recognition, machine learning, applied statistics, and artificial intelligence...read more 9783319022994 | Springer-Verlag New York Inc, March 31, 2014, cover price $179.00 | About this edition: Support vector machines (SVM) have both a solid mathematical background and practical applications. Product Description: The development of effective methods for the prediction of ontological annotations is an important goal in computational biology, yet evaluating their performance is difficult due to problems caused by the structure of biomedical ontologies and incomplete annotations of genes...read more 9783319041377 | Springer-Verlag New York Inc, January 23, 2014, cover price $54.99 | About this edition: The development of effective methods for the prediction of ontological annotations is an important goal in computational biology, yet evaluating their performance is difficult due to problems caused by the structure of biomedical ontologies and incomplete annotations of genes.
College Algebra : Graphs and Models -Text Only - 4th edition Summary: The approach of this text is more interactive than most precalculus texts and the goal of the author team is to enhance the learning process through the use of technology and to provide as much support and help for students as possible. In Connecting the Concepts, comprehension is streamlined and retention is maximized when the student views a concept in visual, rather than paragraph, form. Zeros, Solutions, and X-Intercepts Theme Carried Throughout helps students vi...show moresualize and connect the following three concepts when they are solving problems: the real zeros of the function, the solutions of the associated equation, and the x-coordinates of the x-intercept of the graph of the function. Each chapter begins with a relevant application highlighting how concepts presented in the chapter can be put to use in the real world. These applications are accompanied by numerical tables, equations, and grapher windows to show students the many different ways in which problems can be examined. End-of-Chapter material includes a summary and review of properties and formulas along with a complete set of review exercises. Review exercises also include synthesis, critical thinking, and writing exercises. The answers to all of the review exercises appear in the back of the text and have text section references to further aid students. For anyone interested in learning algebra00 +$3.99 s/h Good Campus_Bookstore Fayetteville, AR Used - Good Hardcover. Textbook only.
Linear Programing: The Simplex Method Summary: This chapter covers principles of the simplex method to Linear Programming. After completing this chapter students should be able to: solve linear programming maximization problems using the simplex method and solve the minimization problems using the simplex method. Chapter Overview Maximization By The Simplex Method In the last chapter, we used the geometrical method to solve linear programming problems, but the geometrical approach will not work for problems that have more than two variables. In real life situations, linear programming problems consist of literally thousands of variables and are solved by computers. We can solve these problems algebraically, but that will not be very efficient. Suppose we were given a problem with, say, 5 variables and 10 constraints. By choosing all combinations of five equations with five unknowns, we could find all the corner points, test them for feasibility, and come up with the solution, if it exists. But the trouble is that even for a problem with so few variables, we will get more than 250 corner points, and testing each point will be very tedious. So we need a method that has a systematic algorithm and can be programmed for a computer. The method has to be efficient enough so we wouldn't have to evaluate the objective function at each corner point. We have just such a method, and it is called the simplex method. The simplex method was developed during the Second World War by Dr. George Dantzig. His linear programming models helped the Allied forces with transportation and scheduling problems. In 1979, a Soviet scientist named Leonid Khachian developed a method called the ellipsoid algorithm which was supposed to be revolutionary, but as it turned out it is not any better than the simplex method. In 1984, Narendra Karmarkar, a research scientist at AT&T Bell Laboratories developed Karmarkar's algorithm which has been proven to be four times faster than the simplex method for certain problems. But the simplex method still works the best for most problems. The simplex method uses an approach that is very efficient. It does not compute the value of the objective function at every point, instead, it begins with a corner point of the feasibility region where all the main variables are zero and then systematically moves from corner point to corner point, while improving the value of the objective function at each stage. The process continues until the optimal solution is found. To learn the simplex method, we try a rather unconventional approach. We first list the algorithm, and then work a problem. We justify the reasoning behind each step during the process. A thorough justification is beyond the scope of this course. We start out with an example we solved in the last chapter by the graphical method. This will provide us with some insight into the simplex method and at the same time give us the chance to compare a few of the feasible solutions we obtained previously by the graphical method. But first, we list the algorithm for the simplex method. THE SIMPLEX METHOD Set up the problem. That is, write the objective function and the constraints. Convert the inequalities into equations. This is done by adding one slack variable for each inequality. Construct the initial simplex tableau. Write the objective function as the bottom row. The most negative entry in the bottom row identifies a column. Calculate the quotients. The smallest quotient identifies a row. The element in the intersection of the column identified in step 4 and the row identified in this step is identified as the pivot element. The quotients are computed by dividing the far right column by the identified column in step 4. A quotient that is a zero, or a negative number, or that has a zero in the denominator, is ignored. Perform pivoting to make all other entries in this column zero. This is done the same way as we did with the Gauss-Jordan method. When there are no more negative entries in the bottom row, we are finished; otherwise, we start again from step 4. Read off your answers. Get the variables using the columns with 1 and 0s. All other variables are zero. The maximum value you are looking for appears in the bottom right hand corner. Example 2 Problem 1 Niki holds two part-time jobs, Job I and Job II. She never wants to work more than a total of 12 hours a week. She has determined that for every hour she works at Job I, she needs 2 hours of preparation time, and for every hour she works at Job II, she needs one hour of preparation time, and she cannot spend more than 16 hours for preparation. If she makes $40 an hour at Job I, and $30 an hour at Job II, how many hours should she work per week at each job to maximize her income? Solution In solving this problem, we will follow the algorithm listed above. Set up the problem. That is, write the objective function and the constraints. Let x1=The number of hours per week Niki will work at Job Ix1=The number of hours per week Niki will work at Job I size 12{x rSub { size 8{1} } ="The number of hours per week Niki will work at Job I"} {}. and x2=The number of hours per week Niki will work at Job IIx2=The number of hours per week Niki will work at Job II size 12{x rSub { size 8{2} } ="The number of hours per week Niki will work at Job II"} {}. It is customary to choose the variable that is to be maximized as ZZ size 12{Z} {}. Here the variable y1y1 size 12{y rSub { size 8{1} } } {} picks up the slack, and it represents the amount by which x1+x2x1+x2 size 12{x rSub { size 8{1} } +x rSub { size 8{2} } } {} falls short of 12. In this problem, if Niki works fewer that 12 hours, say 10, then y1y1 size 12{y rSub { size 8{1} } } {} is 2. Later when we read off the final solution from the simplex table, the values of the slack variables will identify the unused amounts. Construct the initial simplex tableau. Write the objective function as the bottom row. Now that the inequalities are converted into equations, we can represent the problem into an augmented matrix called the initial simplex tableau as follows. Figure 1 Here the vertical line separates the left hand side of the equations from the right side. The horizontal line separates the constraints from the objective function. The right side of the equation is represented by the column CC size 12{C} {}. The reader needs to observe that the last four columns of this matrix look like the final matrix for the solution of a system of equations. If we arbitrarily choose x1=0x1=0 size 12{x rSub { size 8{1} } =0} {} and x2=0x2=0 size 12{x rSub { size 8{2} } =0} {}, we get The solution obtained by arbitrarily assigning values to some variables and then solving for the remaining variables is called the basic solution associated with the tableau. So the above solution is the basic solution associated with the initial simplex tableau. We can label the basic solution variable in the right of the last column as shown in the table below. Figure 2 The most negative entry in the bottom row identifies a column. The most negative entry in the bottom row is –40, therefore the column 1 is identified. Figure 3 Problem 2 Why do we choose the most negative entry in the bottom row? Solution The most negative entry in the bottom row represents the largest coefficient in the objective function – the coefficient whose entry will increase the value of the objective function the quickest. Calculate the quotients. The smallest quotient identifies a row. The element in the intersection of the column identified in step 4 and the row identified in this step is identified as the pivot element. As mentioned in the algorithm, in order to calculate the quotient, we divide the entries in the far right column by the entries in column 1, excluding the entry in the bottom row. Figure 4 The smallest of the two quotients, 12 and 8, is 8. Therefore row 2 is identified. The intersection of column 1 and row 2 is the entry 2, which has been highlighted. This is our pivot element. Problem 3 Why do we find quotients, and why does the smallest quotient identify a row? Solution When we choose the most negative entry in the bottom row, we are trying to increase the value of the objective function by bringing in the variable x1x1 size 12{x rSub { size 8{1} } } {}. But we cannot choose any value for x1x1 size 12{x rSub { size 8{1} } } {}. Can we let x1=100x1=100 size 12{x rSub { size 8{1} } ="100"} {}? Definitely not! That is because Niki never wants to work for more than 12 hours at both jobs combined. In other words, x1+x2≤12x1+x2≤12 size 12{x rSub { size 8{1} } +x rSub { size 8{2} } <= "12"} {}. Now can we let x1=12x1=12 size 12{x rSub { size 8{1} } ="12"} {}? Again, the answer is no because the preparation time for Job I is two times the time spent on the job. Since Niki never wants to spend more than 16 hours for preparation, the maximum time she can work is 16÷2=816÷2=8 size 12{"16" div 2=8} {}. Now you see the purpose of computing the quotients. Problem 4 Why do we identify the pivot element? Solution As we have mentioned earlier, the simplex method begins with a corner point and then moves to the next corner point always improving the value of the objective function. The value of the objective function is improved by changing the number of units of the variables. We may add the number of units of one variable, while throwing away the units of another. Pivoting allows us to do just that. The variable whose units are being added is called the entering variable, and the variable whose units are being replaced is called the departing variable. The entering variable in the above table is x1x1 size 12{x rSub { size 8{1} } } {}, and it was identified by the most negative entry in the bottom row. The departing variable y2y2 size 12{y rSub { size 8{2} } } {} was identified by the lowest of all quotients. In (Reference), we used pivoting to obtain the row echelon form of an augmented matrix. Pivoting is a process of obtaining a 1 in the location of the pivot element, and then making all other entries zeros in that column. So now our job is to make our pivot element a 1 by dividing the entire second row by 2. The result follows. Figure 5 To obtain a zero in the entry first above the pivot element, we multiply the second row by –1 and add it to row 1. We get Figure 6 To obtain a zero in the element below the pivot, we multiply the second row by 40 and add it to the last row. Figure 7 We now determine the basic solution associated with this tableau. By arbitrarily choosing x2=0x2=0 size 12{x rSub { size 8{2} } =0} {} and y2=0y2=0 size 12{y rSub { size 8{2} } =0} {}, we obtain x1=8x1=8 size 12{x rSub { size 8{1} } =8} {}, y1=4y1=4 size 12{y rSub { size 8{1} } =4} {}, and z=320z=320 size 12{z="320"} {}. If we write the augmented matrix, whose left side is a matrix with columns that have one 1 and all other entries zeros, we get the following matrix stating the same thing. When there are no more negative entries in the bottom row, we are finished; otherwise, we start again from step 4. Since there is still a negative entry, –10 , in the bottom row, we need to begin, again, from step 4. This time we will not repeat the details of every step, instead, we will identify the column and row that give us the pivot element, and highlight the pivot element. The result is as follows. Figure 8 We make the pivot element 1 by multiplying row 1 by 2, and we get Figure 9 Now to make all other entries as zeros in this column, we first multiply row 1 by −1/2−1/2 size 12{ - 1/2} {} and add it to row 2, and then multiply row 1 by 10 and add it to the bottom row. Figure 10 We no longer have negative entries in the bottom row, therefore we are finished. Problem 5 Why are we finished when there are no negative entries in the bottom row? Solution The answer lies in the bottom row. The bottom row corresponds to the following equation. We now read off our answers, that is, we determine the basic solution associated with the final simplex tableau. Again, we look at the columns that have a 1 and all other entries zeros. Since the columns labeled y1y1 size 12{y rSub { size 8{1} } } {} and y2y2 size 12{y rSub { size 8{2} } } {} are not such columns, we arbitrarily choose y1=0y1=0 size 12{y rSub { size 8{1} } =0} {}, and y2=0y2=0 size 12{y rSub { size 8{2} } =0} {}, and we get The final solution says that if Niki works 4 hours at Job I and 8 hours at Job II, she will maximize her income to $400. Since both slack variables are zero, it means that she would have used up all the working time, as well as the preparation time, and none will be left. Minimization By The Simplex Method In this section, we will solve the standard linear programming minimization problems using the simplex method. Once again, we remind the reader that in the standard minimization problems all constraints are of the form ax+by≥cax+by≥c size 12{ ital "ax"+ ital "by" >= c} {}. The procedure to solve these problems was developed by Dr. John Von Neuman. It involves solving an associated problem called the dual problem. To every minimization problem there corresponds a dual problem. The solution of the dual problem is used to find the solution of the original problem. The dual problem is really a maximization problem which we already learned to solve in the Section 2. We will first solve the dual problem by the simplex method and then, from the final simplex tableau, we will extract the solution to the original minimization problem. Before we go any further, however, we first learn to convert a minimization problem into its corresponding maximization problem called its dual. Solution To achieve our goal, we first express our problem as the following matrix. Figure 11 Observe that this table looks like an initial simplex tableau without the slack variables. Next, we write a matrix whose columns are the rows of this matrix, and the rows are the columns. Such a matrix is called a transpose of the original matrix. We get Figure 12 The following maximization problem associated with the above matrix is called its dual. A closer look at this table reveals that the x1x1 size 12{x rSub { size 8{1} } } {} and x2x2 size 12{x rSub { size 8{2} } } {} values along with the minimum value for the minimization problem can be obtained from the last row of the final tableau. We have highlighted these values by the arrows. We restate the solution as follows: The minimization problem has a minimum value of 400 at the corner point (20, 10). The optimal solution is found in the bottom row of the final matrix in the columns corresponding to the slack variables, and the minimum value of the objective function is the same as the maximum value of the dual
Description This is a textbook for upper-level economics students who need to study mathematics. The authors present the concepts by applying them closely to the economics students will need to study. Diagrams and a range of exercises reinforce what students have learned in each chapterMathematics for Economists
Concept, notation, order, equality, types of matrices, zero matrix, transpose of a matrix, symmetric and skew symmetric matrices. Addition, multiplication and scalar multiplication of matrices, simple properties of addition, multiplication and scalar multiplication. Non-commutativity of multiplication of matrices and existence of non-zero matrices whose product is the zero Determinant of a square matrix (up to 3 x 3 matrices), properties of determinants, minors, Cramer's rule and its applications. Derivative of logarithmic and exponential functions. Logarithmic differentiation, derivative of functions expressed in parametric forms. Second order derivatives. Rolle's and Lagrange's Mean Value Theorems (without proof) and their geometric interpretations and simple applications. ^2. Applications of Derivatives Applications of derivatives: rate of change, increasing/decreasing functions, tangents & normals, approximation, maxima and minima (first derivative test motivated geometrically and second derivative test given as a provable tool). Simple problems (that illustrate basic principles and understanding of the subject as well as real-life situations). 3. Integrals Integration as inverse process of differentiation. Integration of a variety of functions by substitution, by partial fractions and by parts, only simple integrals of the type to be evaluated. ,,, , . , Definite integrals as a limit of a sum, Fundamental Theorem of Calculus (without proof). Basic properties of definite integrals and evaluation of definite integrals. ^4. Applications of the Integrals Applications in finding the area under simple curves, especially lines, areas of circles/ parabolas/ellipses (in standard form only), area under the curve y = sin x, y = cos x, area between the two above said curves (the region should be clearly identifiable). ^5.+ py = q, where p and q are functions of x and + px = q, where p and q are functions of y. ^UNIT-IV: VECTORS AND THREE-DIMENSIONAL GEOMETRY 1. Vectors Vectors and scalars, magnitude and direction of a vector. Direction cosines/ratios of vectors. Types of vectors (equal, unit. Scalar triple product. ^2. Three - dimensional Geometry, (ii) two planes. (iii) a line and a plane. Distance of a point from a plane. Definition of a designs, experimental unit, treatment Principles of design of experiments, randomization, replication and local Control. Determination of number of replications, size and shape experimental Unit, Layouts of completely Randomized Block Design, Randomized Block Design, and Lalin square Design. Practical situations where these designs can be used. Merits and demerits of CDR, RDB & LSD. Regression analysis as the method of predicting the value of one quantitative variable from those of other quantitative variables, viz. Regression Coefficients and their properties, two regression equations, Graphing of regression lines, Angle between two lines of Regression. Introduction, Process control, control charts, control limits, tools for statistical quality control, Control chart for variables, X and R-charts; Critierion for detecting lack of control in X and R charts. Interpretation of X and R charts. Control charts for attributes; P-chart or control chart for fraction defective, control chart for number of defects per unit (C-chart). Application of C-Chart. ^Unit-IX : Curve Fitting and Method of Least Square 06 marks Curve fitting, straight line, Parabola, Freehand method of curve fitting. Method of least squares, normal equations, fitting of a straight line and fitting of second degree parabola. Fitting of Exponential land Geometric curves. What are computers? What they can perform and what they can not perform, role and use of computers in modern society, etc. Meaning of a problem-algorithm, a detailed and precise step by step method of solution of the problem illustrated by means of simple day to day problems (like buying and article, multiplication of numbers, etc) Simple flow charting (decision boxes included but not loops), Easy exercises. Organising raw data in a form in which it is more easily comprehended; Recall of frequency distribution and its graphical representation through bar diagram, pi-charts, etc. Relative frequency distribution as a tool for comparing two distributions. Measure of location and dispersion as methods of summarizing the information contained in a frequency distribution. Mean and standard deviation; Median and Mean deviation about the median. Methods of calculating mean, standard deviation and mean deviation. 10 marks ^Unit III Partnership Investment of capital for unequal period, sharing of profit, partners salaries, interest on capital, profit sharing on the admission of a new partners/retirement of an existing partner. 10 marks Unit IV Bill of Exchange Introduction of Bill of Exchange, Bankers discount, true discount and Bankers gain, Types of Bill of Exchange, Feature of a Bill of Exchange, Advantages of bill exchange. 10 marks ^Unit V Matrices and Determinants Matrix as rectangular arrangements of numbers. Type of matrices, equality of matrices; Addition, Scalar multiplication and multiplication of matrices, linear combinations of matrices, non-commutativity and associativity of matrix, multiplication, singular and non-singular matrices; Linear equation in matrix notation, Determinants; minors cofactors of determinants, expansion of a determinant, properties and elementary transformation of determinants, application of determinants in solution of equations and area of a triangle; Cramer's rule, adjoint and inverse of a matrix and its properties; Application of matrices in solving simultaneous equations in three variable. Integration as inverse process of differentiation. Integration of a variety of functions by substitution, by partial fraction and by parts, only simple integrals of the type to be evaluated. Definite integrals as a limit of a sum. Fundamental Theorem of Calculus (without proof). Basic properties of definite integrals and evaluation of definite integrals. 10 marks ^Unit VIII Application of Integrals Application in finding the area under simple curves, especially lines, arcs of circles/ parabolas/ellipse (in standard form only), area between the two above said curves (the region should be clearly identifiable). 10 marks ^Unit IX degree. Solutions of linear differential equation of the type: 10 marks Unit X Application of Calculus Commerce and Economics Average cost and marginal costs, total revenue, average revenue and marginal revenue, Break even analysis, maximization of total revenue and total profits, maximization of average cost. Definition of a class, Members of a class - Data Members and Member Functions (methods), Using Private and Public visibility modes, default visibility mode (private); Member function definition: inside class definition and outside class definition using scope resolution operator (::); Declaration of objects as instances of a class; accessing members from object(s), Array of type class, Objects as function arguments - pass by value and pass by reference; One and two Dimensional arrays: Sequential allocation and address calculation; One dimensional array: Traversal, Searching (Linear, Binary Search), Insertion of an element in an array, deletion of an element from an array, Sorting (Insertion, Selection, Bubble sort), concatenation of two linear arrays, merging of two sorted arrays; Two-dimensional arrays: Traversal, Finding sum/difference of two NxM arrays containing numeric values, Interchanging Row and Column elements in a two dimensional array; ^Stack (Array and Linked implementation of Stack): Operations on Stack (PUSH and POP) and its Implementation in C++, Converting expressions from INFIX to POSTFIX notation and evaluation of Postfix expression; Queue: (Circular Array and Linked Implementation): Operations on Queue (Insert and Delete) and its Implementation in C++. SQL functions: SUM, AVG, COUNT, MAX and MIN; obtaining results (SELECT query) from 2 tables using equi-join, cartesian product and union Note: Implementation of the above mentioned commands could be done on any SQL supported software on one or two tables. 15 SQL commands along with the output based on any table/relation: 3 Marks ^5. Viva Voce Marks 05 Viva will be asked from syllabus covered in class XII and the project developed by student. GUIDELINES FOR PROJECTS (Class XII) 1. Preamble 1.1 The academic course in Computer Science includes one Project. The Purpose behind this is to consolidate the concepts and practices imparted during the course and to serve as a record of competence. 1.2 A group of 2-4 students as team may be allowed to work on one project. ^2. Project content 2.1 Project for class XII should ensure the coverage of following areas of curriculum: 2.2 The aim of the project is to highlight the abilities of algorithmic formulation, modular programming, optimized code preparation, systematic documentation and other associated aspects of Software Development. 2.4 The assessment would be through the project demonstration and the Project Report, which should portray Programming Style, Structured Design, Minimum Coupling, High Cohesion, Good documentation of the code to ensure readability and ease of maintenance. ^INFORMATION PRACTICES Maximum Marks: 100 Theory: Marks 70 Time: 3 hours Practicals: Marks 30 1. NETWORKING AND OPEN STANDARDS Marks 10 2. PROGRAMMING Marks 25 3. RELATIONAL DATABASE MANAGEMENT SYSTEM Marks 30 4. IT APPLICATIONS Marks 05 ^UNIT 1: NETWORKING AND OPEN STANDARDS Computer Networking: Networking - a brief overview, Identifying computers and users over a Student will be given a problem to be solved using Java during practical Examination to be conducted at the end of the course. ^SQL Queries 5 marks Student will be asked to write 5 queries based on one or two tables during practical Examination to be conducted at the end of the course Practical Record File A practical record file is required to be created during the entire academic session. It should be duly signed by the concerned teacher on regular basis and is to be produced at the time of Final Practical Examination for evaluation. It should include the following: Students in group of 2-3 are required to work collaboratively to develop a project using Programming and Database skills learnt during the course. The project should be an application with GUI front-end based on any one of the following domains - e-Governance, e-Business and e-Learning Viva Voce (1+2+2) marks Students will be asked oral questions during practical Examination to be conducted at the end of the course. The questions will be from the entire course covered in the academic session ^ENGLISH LITERATURE Romeo and Juliet by Shakespeare – 40 marks An Anthology of Poems – 60 marks Max. Marks 100 Time 3 hrs Blossoms-II UNIT-I 01 Say This City Has Ten Million Souls W.H.Auden 02 A Far Cry From Africa Derek Walcott 03 Galib's Gazal Translated by Aga Shahid Ali 04 When I Have Fears That I May Cease To Be John Keats 05 Selections From Under Siege Mahmud Darwish 15 Marks UNIT- II 06 The Queen's Rival Sarojini Naidu 07 The Lotus Toru Dutt 08 A Memory Lost From Delhi Aga Shahid Ali 09 The Tiger And The Deer Sri Aurobindu 10 Ask Me Not For That Old Fervour Faiz Ahmad Faiz Translated by Shiv K.Kumar 15 Marks UNIT-III 11 Vaakhs of Lal Ded Translated by Prof. Neer ja Mattoo 12 Rubayat of Omar Khayyam Translated by Edward FitzGerald 13 Leave This Rabindra Nath Tagore 14 The Tale of Melon City Vikram Seth 15 Autumn Kalidasa Translated by Arthur W. Ryder 15 Marks UNIT-IV 16 Shrukhs of Sheikh Ul Alam Translated by Prof. G.R.Malik 17 A Will In The Name Of A New Man Kehari Singh Madhukar Translated by Shiv Nath 18 Seven Ages William Shakespeare 19 The Raven Edgar Allan Poe 15 Marks ^SYALLBI AND SCHEME OF ASSESSMENT ) 10 Minutes shall be exclusively provided to the students for understanding the question paper apart from the allotted time. The paper shall be divided into four sections, Section "A" shall be exclusively based on the play tilted Romeo and Juliet by Shakespare carrying 40 Marks while as Section "B" shall be based on Blossoms-II Anthology of poems carrying 60 Marks. ^SECTION "A" Play (40 Marks) Q 1. One question based on reference to context. This question shall carry two parts, A & B with internal choice. Each part shall carry 7½ Marks. [7½ X2=15] Marks. Q 2. One long answer type question on theme, plot, style, background, character etc. of the play . The candidate shall have to attempt one question out of two. [10X1=10 Marks] Q 3. This question shall be based on two parts i,e a & b . Part a (short answer type question) shall be based on specific scene, incident, situation etc. which has special importance in the play. Part b shall be based on the opinion, critical appreciation of the play. This shall be an open type question based on the student's understanding of the play with internal choice. Each part shall carry (05) marks. [05X02=10 Marks] Q 4. Objective type questions based on the play concerning profile of the playwright dates, theme, style, dramatic technique, plot, incident, dialogue, character etc. Each question shall carry one mark. [01X05=05 Marks] ^SECTION B (Poetry 60 Marks) Q. 5 One questions based on reference to context. This question shall carry two parts i,e a & b with internal choice . Each question shall carry 7½ Marks. [7½ X2=15] Marks. Q.6 This question shall be based on the poems emphasizing on poetic techniques / literary devices. The examiner may ask poetic techniques such as metaphor. Simile, personification, imagery paradox, irony, satire, supernaturalism etc. from the prescribed poems. Students shall have to attempt five questions out of eight each question shall carry four marks. [04X05=20 Marks] Q. 7. This question shall be based on two parts i,e a & b, each carrying 05 marks and shall be based on genre specificity of poems such as sonnet,. ode, ghazal, free verse etc. The candidate's comprehensive and critical understanding of poems shall also be tested. The candidate shall have to attempt two questions out of four. There shall be internal choice in questions. [05 X2=10] Marks. Q. 8. Two short answer type question based on textual understanding of the poems with internal choice. [05 X2=10] Marks.
Calculus and Analysis An Introduction to Dynamical Systems and Chaos Next: Introduction: So what's a In mathematics, catastrophe theory is a branch of bifurcation theory in the study of dynamical systems; it is also a particular special case of more general singularity theory in geometry. Catastrophe theory, which originated with the work of the French mathematician René Thom in the 1960s, and became very popular due to the efforts of Christopher Zeeman in the 1970s, considers the special case where the long-run stable equilibrium can be identified with the minimum of a smooth, well-defined potential function (Lyapunov function). Catastrophe theory Bifurcation In a dynamical system, a bifurcation is a period doubling, quadrupling, etc., that accompanies the onset of chaos. It represents the sudden appearance of a qualitatively different solution for a nonlinear system as some parameter is varied. The illustration above shows bifurcations (occurring at the location of the blue lines) of the logistic map as the parameter Dynamical System A means of describing how one state develops into another state over the course of time. Technically, a dynamical system is a smooth action of the reals or the integers on another object (usually a manifold). When the reals are acting, the system is called a continuous dynamical system, and when the integers are acting, the system is called a discrete dynamical system. Home - Math 106 Visualizing a function can give a mathematician enormous insight into the function's algebraic and geometrical properties. The easiest way to see what a function looks like is to use a computer as a graphing tool. Mathematics | 18.03 Differential Equations, Spring 2006 Weierstrass functions are famous for being continuous everywhere, but differentiable "nowhere". Find Derivative of y = x^x Note that the function defined by y = x x is neither a power function of the form x k nor an exponential function of the form b x and the formulas of Differentiation of these functions cannot be used.
Alhambra HS Mathematics Main menu PRECALCULUS THEORY Sequences RVW This might help you "visualize" a sequence (and later partial sums) Press MODE and for Graph -> 4: SEQUENCE Go to the Y= Editor, which now looks very weird Use the first equation of each pair for your sequence, e.g. an = (-1)^n/(n+1) would go in u1. Be sure to use … Continue reading → 8th Grade Orientation is ONE WEEK! Each of you will host a small group of 8th graders and tour them across campus. Your next major grades are the following items: Campus Tour Use multimedia (pics, video, etc..) to illustrate how you will tour the campus Here's a campus map in case you need one Make … Continue reading → Your final is scheduled for Tuesday, 12/17/2013 at 7:45am. We will begin reviewing for the Final on Wednesday, 12/11/2013, but you can get started reviewing now. Here's an updated layout for the Final Exam, complete with links to help you study. Remember, the final will be worth anywhere from 10-20% of your grade and will be graded using a bell curve – meaning you could earn a score over 100%. Part I: Formulas Covers Chapter 2-7 NO CALC, 20 Questions, 20 Minutes = 25% of Final This is only a sample of the formula chart you will receive based on past years. Please ignore marked questions (from Ch 8). There will be an emphasis on small, but important results that you should recall from the course.
NCERT Solution If you want detailed of Free NCERT solutions to the end-of-chapters questions of the NCERT textbooks online Maths, Science , English, Social Science. For class 7 to 12. These chapter-wise, detailed solutions to the end-of-chapter questions of the NCERT textbooks are quite a boon for students. cbse.entrancei.com is fully dedicated for cbse class 7 to class 12 students.we also provide study materials and sample papers.
Geometric Algebra with Applications in Engineering This book examines all aspects essential for a successful application of geometric algebra to engineering—the theoretical foundations, the representation of geometric constraints, and the numerical estimation from uncertain data. The application of geometric algebra to the engineering sciences is a young, active subject of research. The promise of this field is that the mathematical structure of geometric algebra together with its descriptive power will result in intuitive and more robust algorithms. This book examines all aspects essential for a successful application of geometric algebra: the theoretical foundations, the representation of geometric constraints, and the numerical estimation from uncertain data. Formally, the book consists of two parts: theoretical foundations and applications. The first part includes chapters on random variables in geometric algebra, linear estimation methods that incorporate the uncertainty of algebraic elements, and the representation of geometry in Euclidean, projective, conformal and conic space. The second part is dedicated to applications of geometric algebra, which include uncertain geometry and transformations, a generalized camera model, and pose estimation. Graduate students, scientists, researchers and practitioners will benefit from this book. The examples given in the text are mostly recent research results, so practitioners can see how to apply geometric algebra to real tasks, while researchers note starting points for future investigations. Students will profit from the detailed introduction to geometric algebra, while the text is supported by the author's visualization software, CLUCalc, freely available online, and a website that includes downloadable exercises, slides and tutorials. Table of Contents Table of Contents Introduction. Learning Geometric Algebra with CLUCalc. Algebra. Geometries. Numerics. Uncertain Geometric Entities and Operators. The Inversion Camera Model. Monocular Pose Estimation. Versor Functions. Random Variable Space
University preparation: mathematics Try using our navigation bar across the top to find upcoming events, or use the search just below the navigation if you are looking for a specific upcoming event. This course prepares students for future study of mathematics at university level by developing an understanding and application of algebra, geometry and calculus. Students will practise effective techniques for studying mathematics as well as learning to read and write mathematics clearly and intelligibly. Students will also develop an appreciation of the patterns which arise in mathematics and how they are applied in a number of different subject areas
Modify Your Results Glencoe Math with Business Applications is a comprehensive text that covers all the skills students need to manage their personal finances and excel at their first jobs and in everyday life. Math with Business Applications is a three-part program that takes students from basic math concepts to sophisticated financial strategies. Basic Math Skills reviews the fundamental math operations, Personal Finance teaches money management skills, and Business Math provides a thorough primer on launching and running a business. Math with Business Applications contains lessons, workshops, features and activities that comprise a well-rounded program. Glencoe?s new Mathematics for Business and Personal Finance is the only text on the market that offers teachers point-of-use online professional development, interactive online help for students and the option of purchasing an interactive online text with a grade book. As always, we have maintained our exclusive coverage of key core academic content, and our research-based reading strategies. When it comes to helping students and making life easier for teachers, Glencoe is number one!.
(Note: Each chapter begins with a Pretest and concludes with a Chapter Organizer, Review Problems, Chapter Test and Cumulative Test.) Preface Acknowledgments Diagnostic Pretest 1. Whole Numbers Understanding Whole Numbers. Addition of Whole Numbers. Subtraction of Whole Numbers. Multiplication of Whole Numbers. Division of Whole Numbers. Putting Your Skills to Work : Buying or Leasing a Car. Exponents and Order of Operations. Rounding and Estimation. Applied Problems. 2. Fractions Understanding Fractions. Simplifying Fractions. Improper Fractions and Mixed Numbers. Multiplication of Fractions and Mixed Numbers. Division of Fractions and Mixed Numbers. The Least Common Denominator and Building up Fractions. Addition and Subtraction of Fractions. Addition and Subtraction of Mixed Numbers. Putting Your Skills to Work: Farming on the Halves. Applied Problems Involving Fractions. 3. Decimals Decimal Notation. Compare, Order, and Round Decimals. Addition and Subtraction of Decimals. Putting Your Skills to Work : Personal Checking Account. Multiplication of Decimals. Division of Decimals. Converting Fractions to Decimals and Order of Operations. Applied Problems Using Decimals. 4. Ratio and Proportion Ratios and Rates. The Concept of Proportions. Solving Proportions. Applications of Proportions. Putting Your Skills to Work : How Crowded is This City? Putting Your Skills to Work : College Budget Problems. Circle Graphs. Bar Graphs and Line Graphs. Putting Your Skills to Work : The Aging of America's Trucks. Histograms. Mean and Median. 9. Signed Numbers Addition of Signed Numbers. Subtraction of Signed Numbers. Multiplication and Division of Signed Numbers. Order of Operations with Signed Numbers. Putting Your Skills to Work : Mathematics of Universal Time. Scientific Notation. 10. Introduction to Algebra Variables and Like Terms. The Distributive Property. Solve Equations Using the Addition Property. Solve Equations Using the Division or Multiplication Property. Solve Equations Using Two Properties. Putting Your Skills to Work : Using Mathematics to Predict Population Increases. Translating English to Algebra. Applications
Algebra for CollegeAlgebra for College Students, fourth edition, is written for students who have had the equivalent of one year of high school algebra. The content of the book is drawn from both intermediate algebra and college algebra and provides comprehensive coverage of the topics required in a strong one-term course in intermediate algebra or a one-term algebra for college students course. The goal of the Blitzer Algebra series is to provide students with a strong foundation in Algebra. Each text is designed to develop students' critical thinking and problem-solving capabilities and prepare students for subsequent Algebra courses as well as service math courses. Topics are presented in an interesting and inviting format, incorporating real world sourced data and encouraging modeling and problem-solving.
Calculus, Single Variable (Cloth) - 5th edition Summary: Calculus teachers recognize Calculus as the leading resource among the "reform" projects that employ the rule of four and streamline the curriculum in order to deepen conceptual understanding. The fifth edition uses all strands of the "Rule of Four" - graphical, numeric, symbolic/algebraic, and verbal/applied presentations - to make concepts easier to understand. The book focuses on exploring fundamental ideas rather than comprehensive coverage of...show more multiple similar cases that are not fundamentally unique. Readers will also gain access to WileyPLUS, an online tool that allows for extensive drills and practice. Calculus teachers will build on their understanding in the field and discover new ways to present concepts to their students. ...show less 0470131594 Item in good condition. Textbooks may not include supplemental items i.e. CDs, access codes etc... All day low prices, buy from us sell to us we do it all!! $9.40 +$3.99 s/h Good SellBackYourBook Aurora, IL 0470131594
Newly updated by the author, this text explores the solution of partial differential equations by separating variables, rather than by conducting qualitative theoretical analyses of their properties. These qualitative features--uniqueness, existence, elegance of composition, and convergence modes--arProduct Description: Newly updated by the author, this text explores the solution of partial differential equations by separating variables, rather than by conducting qualitative theoretical analyses of their properties. These qualitative features--uniqueness, existence, elegance of composition, and convergence modes--are substantiated by physical reasoning, rather than rigorous arguments. Geared toward applied mathematicians, physicists, engineers, and others seeking explicit solutions, the book offers heuristic justifications for each construction. The first three chapters review the necessary tools for understanding the separation of variables technique: basics of ordinary differential equations, Frobenius-series construction and properties of Bessel functions, and Fourier analysis. Subsequent chapters explore the exposition of the algorithmic nature of the separation of variables process, based on a sequence of steps that infallibly leads to the solution expansion, regardless of the nature of the boundary conditions
Saunders Mac Lane algebraBranch of mathematics in which arithmetical operations and formal manipulations are applied to abstract symbols rather than specific numbers. The notion that there exists such a distinct subdiscipline... geometryThe branch of mathematics concerned with the shape of individual objects, spatial relationships among various objects, and the properties of surrounding space. It is one of the oldest branches of mathematics,... mathematicsThe science of structure, order, and relation that has evolved from elemental practices of counting, measuring, and describing the shapes of objects. It deals with logical reasoning and quantitative calculation,... topologyBranch of mathematics, sometimes referred to as "rubber sheet geometry," in which two objects are considered equivalent if they can be continuously deformed into one another through such motions in space...
survey of modern algebra This classic, written by two young instructors who became giants in their field, has shaped the understanding of modern algebra for generations of ...Show synopsisThis classic, written by two young instructors who became giants in their field, has shaped the understanding of modern algebra for generations of mathematicians and remains a valuable reference and text for self study and college courses
More About This Textbook Overview BEGINNING AND INTERMEDIATE ALGEBRA: CONNECTING CONCEPTS THROUGH APPLICATIONS, shows students how to apply traditional mathematical skills in real-world contexts. The emphasis on skill building and applications engages students as they master algebraic concepts, problem solving, and communication skills. Students develop sound mathematical skills by learning how to solve problems generated from realistic applications, instead of learning techniques without conceptual understanding. Authors Mark Clark and Cynthia Anfinson have developed several key ideas to make concepts real and vivid for students. First, the authors place an emphasis on developing strong algebra skills that support the applications, enhancing student comprehension and developing their problem solving abilities. Second, applications are integrated throughout, drawing on realistic and numerically appropriate data to show students how to apply math and to understand why they need to know it. These applications require students to think critically and develop the skills needed to explain and think about the meaning of their answers. Third, important concepts are developed as students progress through the course and overlapping elementary and intermediate content in kept to a minimum. Chapter 8 sets the stage for the intermediate material where students explore the "eyeball best-fit" approach to modeling and understand the importance of graphs and graphing including graphing by hand. Fourth, Mark and Cynthia's approach prepares students for a range of courses including college algebra and statistics. In short, BEGINNING AND INTERMEDIATE ALGEBRA: CONNECTING CONCEPTS THROUGH APPLICATIONS develops strong mathematical skills using an engaging, application-driven and problem solving-focused approach to algebra. Product Details ISBN-13: 9781133365051 Publisher: Cengage Learning Publication date: 1/1/2012 Pages: 1488 Product dimensions: 8.30 (w) x 10.90 (h) x 1.80 (d) Meet the Author Mark Clark graduated from California State University, Long Beach, with a Bachelor's and Master's in Mathematics. He is a full-time Associate Professor at Palomar College and has taught there for the past 13 years. He is committed to teaching his students through applications and using technology to help them both understand the mathematics in context and communicate their results clearly. Intermediate algebra is one of his favorite courses to teach, and he continues to teach several sections of this course each year. He has collaborated with his colleague Cynthia Anfinson to write a new intermediate and beginning algebra text published by Cengage Learning—Brooks/Cole. It is an applications-first approach to algebra; applications and concepts drive the material, supported by traditional skills and techniques. Cynthia (Cindy) Anfinson graduated from UCSD's Revelle College in 1985, summa cum laude, with a Bachelor of Arts Degree in Mathematics and is a member of Phi Beta Kappa. She went to graduate school at Cornell University under the Army Science and Technology Graduate Fellowship. She graduated from Cornell in 1989 with a Master of Science Degree in Applied Mathematics. She is currently an Associate Professor of Mathematics at Palomar College and has been teaching there since 1995. Cindy Anfinson was a finalist in Palomar College's 2002 Distinguished
Jacobs Elementary Algebra Curriculum $5 Flat Rate Standard Shipping On Any Pre-Paid Order to Continental US. This algebra textbook by Harold R. Jacobs (First Edition, 1979) encourages an appreciation for math as well understanding of the concepts. It has midterm and final reviews. The textbook also includes the answers to the Set II Exercises. Now there is a Solutions Manual for this text by Harold R. Jacobs with Cassidy Cash. This was chosen by Cathy Duffy as on of her "100 Top Picks for Homeschool Curriculum" in the Mathematics category. Ask Dr. Callahan Algebra Instruction DVD For those of you who like help with teaching Algebra, Ask Dr. Callahan has created a teaching DVD featuring instruction by Cassidy Callahan that follows the Jacobs Algebra text. Jacobs Elementary Algebra Components Now there is a complete solutions manual for the Harold Jacob's text. There are no lesson plans or teacher's instructions in this book. Solutions vary in detail according to the complexity of the exercise/problem. This is what you should order if you want only the solutions and do not need lesson plans or teacher's info. The answers to the exercises in Sets I, II, III and IV are included in the Solutions Manual. The "solutions to many of the exercises appear in brackets following the answers. These solutions vary in detail according to the complexity of the exercise. For exercises that can be solved in a variety of ways, just one solution is given." The Test Bank has chapter tests, a midyear test, and a final exam. There are four versions of each chapter test, which will provide extra tests in case you need to retest. Since there are extra tests, you could also use them as "placement" tests if you aren't sure where to start your student. Another idea is to use one of them as a pretest, in case the student has used another algebra curriculum before starting Jacobs. The chapter tests should take about 45 minutes. Midyear and final tests should take 110 minutes. Answers are included for all the tests, but worked solutions are not provided. It is reproducible. The pages are perforated for removal to put in a copier.
Marlboro, MD Precalculus don't believe in equation memorization, in most instances, but rather believe in core equation understanding. Once you understand why an equation exists and how it can be manipulated and used, then the follow up equations become intuitive. An example of this is understanding that calculus is ...
Beginning Algebra - 10th edition Summary: The new edition of BEGINNING ALGEBRA is an exciting and innovative revision that takes an already successful text and makes it more compelling for today's instructor and student. The authors have developed a learning plan to help students succeed in Beginning Algebra and transition to the next level in their coursework. Based on their years of experience in developmental education, the accessible approach builds upon the book's known clear writing and engaging style which teaches stu...show moredents to develop problem-solving skills and strategies that they can use in their everyday lives. The authors have developed an acute awareness of students' approach to homework and present a learning plan keyed to Learning Objectives and supported by a comprehensive range of exercise sets that reinforces the material that students have learned setting the stage for their success. ...show less148.67 +$3.99 s/h VeryGood newrecycleabook centerville, OH 1435462475151.70 +$3.99 s/h VeryGood Bookbyte-OR Salem, OR Has minor wear and/or markings. SKU:9781435462472-3-0$156.18 +$3.99 s/h Good Textbook Tycoon Lexington, KY
More About This Textbook Overview For many years, this classroom-tested, best-selling text has guided mathematics students to more advanced studies in topology, abstract algebra, and real analysis. Elements of Advanced Mathematics, Third Edition retains the content and character of previous editions while making the material more up-to-date and significant. This third edition adds four new chapters on point-set topology, theoretical computer science, the P/NP problem, and zero-knowledge proofs and RSA encryption. The topology chapter builds on the existing real analysis material. The computer science chapters connect basic set theory and logic with current hot topics in the technology sector. Presenting ideas at the cutting edge of modern cryptography and security analysis, the cryptography chapter shows students how mathematics is used in the real world and gives them the impetus for further exploration. This edition also includes more exercises sets in each chapter, expanded treatment of proofs, and new proof techniques. Continuing to bridge computationally oriented mathematics with more theoretically based mathematics, this text provides a path for students to understand the rigor, axiomatics, set theory, and proofs of mathematics. It gives them the background, tools, and skills needed in more advanced courses. Editorial Reviews From the Publisher … one of the difficulties that students have with university mathematics is being able to relate it to what they've done at school. In this respect, the work on logic, sets, proof, relations and functions plays an essential bridging role. But another problem to be addressed is to re-present mathematics as a way of knowing—rather than a static body of formalised knowledge. In this book, Steven Krantz tackles this anomaly by including many open-ended problems in the rich collections of exercises. … The new chapters on theoretical computer science are concisely lucid, and I learned much by reading them. … this book engages the reader in really meaningful aspects of mathematics: it is well organized and is written with accuracy. … it is recommended as a possible course text for those who are planning to teach a foundation course. —P.N. Ruane, MAA Reviews, July 2012 Product Details ISBN-13: 9781439898345 Publisher: Taylor & Francis Publication date: 4/2/2012 Edition description: New Edition Edition number: 3 Pages: 367 Product dimensions: 6.30 (w) x 9.30 (h) x 0.90 (d) Meet the Author Steven G. Krantz is a professor of mathematics at Washington University in St. Louis, Missouri. He has published over 150 papers and nearly 70 books and has been an editor of several journals. He earned a Ph.D. in mathematics from Princeton University. His research interests include complex variables, harmonic analysis, partial differential equations, geometry, interpolation of operators, and real analysis. The P/NP Problem Introduction The Complexity of a Problem Comparing Polynomial and Exponential Complexity Polynomial Complexity Assertions That Can Be Verified in Polynomial Time Nondeterministic Turing Machines Foundations of NP-Completeness Polynomial Equivalence Definition of NP-Completeness Examples of Axiomatic Theories Group Theory Euclidean and Non-Euclidean Geometry Zero-Knowledge Proofs Basics and Background Preparation for RSA The RSA System Enunciated The RSA Encryption System Explicated Zero-Knowledge Proof
About This Book From abacus to zero property of multiplication, this handy reference guide for students contains more than five hundred common mathematical terms. Written in simple language and illustrated with hundreds of helpful photographs and drawings, "Math Dictionary" takes the mystery out of math
Secondary Solutions Intelligent mathematics software that adapts to meet the needs of ALL students. Based on over 20 years of research into how students think and learn, the Cognitive Tutor software was developed around an artificial intelligence model that identifies weaknesses in each individual student's mastery of mathematical concepts. It then customizes prompts to focus on areas where the student is struggling, and sends the student to new problems that address those specific concepts. The Cognitive Tutor software complements our textbooks. Additionally, it can be used as supplemental curricula for interventions, summer school, and other implementation options. Features include: When purchased as a standalone software title, the software is installed via an installation CD. Single copies are not available for purchase with a LAN, remote hosted, or web-based implementation option Cognitive Tutor program has taken the phrase, 'Why do we have to know this?' out of our math classrooms here at CBC. Our students are learning more than ever what a large role mathematics plays in everyday situations and Carnegie's program is directly responsible. – Mike England, Assistant Principal Christian Brothers College High School
Rent Book Buy New Book Used Book We're Sorry Sold Out eBook We're Sorry Not Available More New and Used from Private Sellers Starting at $12 the perfect introduction for those who have a lingering fear of math. If you think that math is difficult, confusing, dull or just plain scary, then The Math Handbookis your ideal companion . Covering all the basics including fractions, equations, primes, squares and square roots, geometry and fractals, Dr. Richard Elwes will lead you gently towards a greater understanding of this fascinating subject. Even apparently daunting concepts will be explained simply, with the assistance of useful diagrams, and with a refreshing lack of jargon. So whether you're an adult or a student, whether you're the sort of person who does Sudoku puzzles, crosswords, or has always been daunted by numbers at work, school or in everyday life, you won't find a better way of overcoming your nervousness about math and learning to enjoy this most amazing of human discoveries.
Product Details See What's Inside Product Description By Nathalie Sinclair, David Pimm, Melanie Skelin, Rose Mary Zbiek Why does it matter whether we state definitions carefully when we all know what particular geometric figures look like? What does it mean to say that a reflection is a transformation—a function? How does the study of transformations and matrices in high school connect with later work with vector spaces in linear algebra? How much do you know… and how much do you need to know? Helping your students develop a robust understanding of geometry requires that you understand this mathematics deeply. But what does that mean?Focus on the ideas that you need to understand thoroughly to teach confidently. Move beyond the mathematics you expect your students to learn. Students who fail to get a solid grounding in pivotal concepts struggle in subsequent work in mathematics and related disciplines. By bringing a deeper understanding to your teaching, you can help students who don't get it the first time by presenting the mathematics in multiple ways. The Essential Understanding Series addresses topics in school mathematics that are critical to the mathematical development of students but are often difficult to teach. Each book in the series gives an overview of the topic, highlights the differences between what teachers and students need to know, examines the big ideas and related essential understandings, reconsiders the ideas presented in light of connections with other mathematical ideas, and includes questions for readers' reflection. Related Products This eBook focuses on essential knowledge for teachers about geometry. It is organized around four big ideas, supported by multiple smaller, interconnected ideas--essential understandings. Please note: This product can only be purchased via NCTM's Online catalog. Non-web payment methods, such as POs, cannot be used to purchase this item. If you have questions, please call NCTM's Customer Service Department at 800-235-7566$35.95 Customers Who Bought This Also Bought...This book focuses on essential knowledge for teachers about mathematical reasoning. It is organized around one big idea, supported by multiple smaller, interconnected ideas—essential understandings.Taking you beyond a simple introduction to mathematical reasoningLike algebra at any level, early algebra is a way to explore, analyze, represent, and generalize mathematical ideas and relationships. This book shows that children can and do engage in generalizing about numbers and operations as their mathematical experiences expand. The authors identify and examine five big ideas and associated essential understandings for developing algebraic thinking in grades 3–5. The National Council of Teachers of Mathematics is the public voice of mathematics education, supporting teachers to ensure equitable mathematics learning of the highest quality for all students through vision, leadership, professional development, and research.
Discrete Mathematics: Elementary and Beyond L. Lovász J. Pelikán K. Vesztergombi Springer Preface For most students, the first and often only course in college mathematics is calculus. It is true that calculus is the single most important field of mathematics, whose emergence in the seventeenth century signaled the birth of modern mathematics and was the key to the successful applications of mathematics in the sciences and engineering. But calculus (or analysis) is also very technical. It takes a lot of work even to introduce its fundamental notions like continuity and the derivative (after all, it took two centuries just to develop the proper definition of these notions). To get a feeling for the power of its methods, say by describing one of its important applications in detail, takes years of study. If you want to become a mathematician, computer scientist, or engineer, this investment is necessary. But if your goal is to develop a feeling for what mathematics is all about, where mathematical methods can be helpful, and what kinds of questions do mathematicians work on, you may want to look for the answer in some other fields of mathematics. There are many success stories of applied mathematics outside calculus. A recent hot topic is mathematical cryptography, which is based on number theory (the study of the positive integers 1, 2, 3, . . .), and is widely applied, for example, in computer security and electronic banking. Other important areas in applied mathematics are linear programming, coding theory, and the theory of computing. The mathematical content in these applications is collectively called discrete mathematics. (The word "discrete" is used in the sense of "separated from each other," the opposite of "continuous;" it is also often used in the more restrictive sense of "finite." The more everyday version of this word, meaning "circumspect," is spelled "discreet.") vi Preface The aim of this book is not to cover "discrete mathematics" in depth (it should be clear from the description above that such a task would be ill-defined and impossible anyway). Rather, we discuss a number of selected results and methods, mostly from the areas of combinatorics and graph theory, with a little elementary number theory, probability, and combinatorial geometry. It is important to realize that there is no mathematics without proofs. Merely stating the facts, without saying something about why these facts are valid, would be terribly far from the spirit of mathematics and would make it impossible to give any idea about how it works. Thus, wherever possible, we will give the proofs of the theorems we state. Sometimes this is not possible; quite simple, elementary facts can be extremely difficult to prove, and some such proofs may take advanced courses to go through. In these cases, we will at least state that the proof is highly technical and goes beyond the scope of this book. Another important ingredient of mathematics is problem solving. You won't be able to learn any mathematics without dirtying your hands and trying out the ideas you learn about in the solution of problems. To some, this may sound frightening, but in fact, most people pursue this type of activity almost every day: Everybody who plays a game of chess or solves a puzzle is solving discrete mathematical problems. The reader is strongly advised to answer the questions posed in the text and to go through the problems at the end of each chapter of this book. Treat it as puzzle solving, and if you find that some idea that you came up with in the solution plays some role later, be satisfied that you are beginning to get the essence of how mathematics develops. We hope that we can illustrate that mathematics is a building, where results are built on earlier results, often going back to the great Greek mathematicians; that mathematics is alive, with more new ideas and more pressing unsolved problems than ever; and that mathematics is also an art, where the beauty of ideas and methods is as important as their difficulty or applicability. L´szl´ Lov´sz a o a J´zsef Pelik´n o a Katalin Vesztergombi Contents Preface 1 Let's Count! 1.1 A Party . . . . . . . . . . . . . . . . . . 1.2 Sets and the Like . . . . . . . . . . . . . 1.3 The Number of Subsets . . . . . . . . . 1.4 The Approximate Number of Subsets . . 1.5 Sequences . . . . . . . . . . . . . . . . . 1.6 Permutations . . . . . . . . . . . . . . . 1.7 The Number of Ordered Subsets . . . . 1.8 The Number of Subsets of a Given Size v 1 1 4 9 14 15 17 19 20 25 25 30 32 34 37 43 43 45 46 482 Combinatorial Tools 2.1 Induction . . . . . . . . . . . . . . . . . . . . . . 2.2 Comparing and Estimating Numbers . . . . . . . 2.3 Inclusion-Exclusion . . . . . . . . . . . . . . . . . 2.4 Pigeonholes . . . . . . . . . . . . . . . . . . . . . 2.5 The Twin Paradox and the Good Old Logarithm 3 Binomial Coefficients and Pascal's Triangle 3.1 The Binomial Theorem . . . . . . . . . . . 3.2 Distributing Presents . . . . . . . . . . . . . 3.3 Anagrams . . . . . . . . . . . . . . . . . . . 3.4 Distributing Money . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii Contents 3.5 3.6 3.7 3.8 Pascal's Triangle . . . . . . . . . . . . Identities in Pascal's Triangle . . . . . A Bird's-Eye View of Pascal's Triangle An Eagle's-Eye View: Fine Details49 50 54 57 65 65 68 71 77 77 79 80 83 87 87 88 90 93 97 99 105 107 114 117 4 Fibonacci Numbers 4.1 Fibonacci's Exercise . . . . . . . . . . . . . . . . . . . . . . 4.2 Lots of Identities . . . . . . . . . . . . . . . . . . . . . . . . 4.3 A Formula for the Fibonacci Numbers . . . . . . . . . . . . 5 Combinatorial Probability 5.1 Events and Probabilities . . . . . . . . . . . . . . . . . . . . 5.2 Independent Repetition of an Experiment . . . . . . . . . . 5.3 The Law of Large Numbers . . . . . . . . . . . . . . . . . . 5.4 The Law of Small Numbers and the Law of Very Large Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Integers, Divisors, and Primes 6.1 Divisibility of Integers . . . . . . . . . . . . 6.2 Primes and Their History . . . . . . . . . . 6.3 Factorization into Primes . . . . . . . . . . 6.4 On the Set of Primes . . . . . . . . . . . . . 6.5 Fermat's "Little" Theorem . . . . . . . . . 6.6 The Euclidean Algorithm . . . . . . . . . . 6.7 Congruences . . . . . . . . . . . . . . . . . . 6.8 Strange Numbers . . . . . . . . . . . . . . . 6.9 Number Theory and Combinatorics . . . . . 6.10 How to Test Whether a Number is a Prime?7 Graphs 125 7.1 Even and Odd Degrees . . . . . . . . . . . . . . . . . . . . . 125 7.2 Paths, Cycles, and Connectivity . . . . . . . . . . . . . . . . 130 7.3 Eulerian Walks and Hamiltonian Cycles . . . . . . . . . . . 135 8 Trees 8.1 How to Define Trees . . . . . . . 8.2 How to Grow Trees . . . . . . . . 8.3 How to Count Trees? . . . . . . . 8.4 How to Store Trees . . . . . . . . 8.5 The Number of Unlabeled Trees 141 141 143 146 148 1539 Finding the Optimum 157 9.1 Finding the Best Tree . . . . . . . . . . . . . . . . . . . . . 157 9.2 The Traveling Salesman Problem . . . . . . . . . . . . . . . 161 10 Matchings in Graphs 165 Contents ix 10.1 10.2 10.3 10.4 A Dancing Problem . . . . . . . Another matching problem . . . The Main Theorem . . . . . . . . How to Find a Perfect Matching165 167 169 171 179 179 181 184 11 Combinatorics in Geometry 11.1 Intersections of Diagonals . . . . . . . . . . . . . . . . . . . 11.2 Counting regions . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Convex Polygons . . . . . . . . . . . . . . . . . . . . . . . . 12 Euler's Formula 189 12.1 A Planet Under Attack . . . . . . . . . . . . . . . . . . . . 189 12.2 Planar Graphs . . . . . . . . . . . . . . . . . . . . . . . . . 192 12.3 Euler's Formula for Polyhedra . . . . . . . . . . . . . . . . . 194 13 Coloring Maps and Graphs 13.1 Coloring Regions with Two Colors . . . . . 13.2 Coloring Graphs with Two Colors . . . . . 13.3 Coloring graphs with many colors . . . . . . 13.4 Map Coloring and the Four Color Theorem 14 Finite Geometries, Codes, Latin Squares, and Other Pretty Creatures 14.1 Small Exotic Worlds . . . . . . . . 14.2 Finite Affine and Projective Planes 14.3 Block Designs . . . . . . . . . . . . 14.4 Steiner Systems . . . . . . . . . . . 14.5 Latin Squares . . . . . . . . . . . . 14.6 Codes . . . . . . . . . . . . . . . . 197 197 199 202 204211 211 217 220 224 229 232 239 239 242 244 246 246 247 251 287 15 A Glimpse of Complexity and Cryptography 15.1 A Connecticut Class in King Arthur's Court . 15.2 Classical Cryptography . . . . . . . . . . . . 15.3 How to Save the Last Move in Chess . . . . . 15.4 How to Verify a Password—Without Learning 15.5 How to Find These Primes . . . . . . . . . . 15.6 Public Key Cryptography . . . . . . . . . . . 16 Answers to Exercises Index . . . . . . it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Let's Count! 1.1 A Party Alice invites six guests to her birthday party: Bob, Carl, Diane, Eve, Frank, and George. When they arrive, they shake hands with each other (strange European custom). This group is strange anyway, because one of them asks, "How many handshakes does this mean?" "I shook 6 hands altogether," says Bob, "and I guess, so did everybody else." "Since there are seven of us, this should mean 7 · 6 = 42 handshakes," ventures Carl. "This seems too many" says Diane. "The same logic gives 2 handshakes if two persons meet, which is clearly wrong." "This is exactly the point: Every handshake was counted twice. We have to divide 42 by 2 to get the right number: 21," with which Eve settles the issue. When they go to the table, they have a difference of opinion about who should sit where. To resolve this issue, Alice suggests, "Let's change the seating every half hour, until we get every seating." "But you stay at the head of the table," says George, "since it is your birthday." How long is this party going to last? How many different seatings are there (with Alice's place fixed)? Let us fill the seats one by one, starting with the chair on Alice's right. Here we can put any of the 6 guests. Now look at the second chair. If Bob 2 1. Let's Count! sits in the first chair, we can put any of the remaining 5 guests in the second chair; if Carl sits in the first chair, we again have 5 choices for the second chair, etc. Each of the six choices for the first chair gives us five choices for the second chair, so the number of ways to fill the first two chairs is 5 + 5 + 5 + 5 + 5 + 5 = 6 · 5 = 30. Similarly, no matter how we fill the first two chairs, we have 4 choices for the third chair, which gives 6 · 5 · 4 ways to fill the first three chairs. Proceeding similarly, we find that the number of ways to seat the guests is 6 · 5 · 4 · 3 · 2 · 1 = 720. If they change seats every half hour, it will take 360 hours, that is, 15 days, to go through all the seating arrangements. Quite a party, at least as far as the duration goes! 1.1.1 How many ways can these people be seated at the table if Alice, too, can sit anywhere? After the cake, the crowd wants to dance (boys with girls, remember, this is a conservative European party). How many possible pairs can be formed? OK, this is easy: there are 3 girls, and each can choose one of 4 boys, this makes 3 · 4 = 12 possible pairs. After ten days have passed, our friends really need some new ideas to keep the party going. Frank has one: "Let's pool our resources and win the lottery! All we have to do is to buy enough tickets so that no matter what they draw, we will have a ticket with the winning numbers. How many tickets do we need for this?" (In the lottery they are talking about, 5 numbers are selected out of 90.) "This is like the seating," says George. "Suppose we fill out the tickets so that Alice marks a number, then she passes the ticket to Bob, who marks a number and passes it to Carl, and so on. Alice has 90 choices, and no matter what she chooses, Bob has 89 choices, so there are 90 · 89 choices for the first two numbers, and going on similarly, we get 90 · 89 · 88 · 87 · 86 possible choices for the five numbers." "Actually, I think this is more like the handshake question," says Alice. "If we fill out the tickets the way you suggested, we get the same ticket more then once. For example, there will be a ticket where I mark 7 and Bob marks 23, and another one where I mark 23 and Bob marks 7." Carl jumps up: "Well, let's imagine a ticket, say, with numbers 7, 23, 31, 34, and 55. How many ways do we get it? Alice could have marked any of them; no matter which one it was that she marked, Bob could have marked any of the remaining four. Now this is really like the seating problem. We get every ticket 5 · 4 · 3 · 2 · 1 times." "So," concludes Diane, "if we fill out the tickets the way George proposed, then among the 90 · 89 · 88 · 87 · 86 tickets we get, every 5-tuple occurs not 1.1 A Party 3 only once, but 5 · 4 · 3 · 2 · 1 times. So the number of different tickets is only 90 · 89 · 88 · 87 · 86 . 5·4·3·2·1 We only need to buy this number of tickets." Somebody with a good pocket calculator computed this value in a twinkling; it was 43,949,268. So they had to decide (remember, this happens in a poor European country) that they didn't have enough money to buy so many tickets. (Besides, they would win much less. And to fill out so many tickets would spoil the party!) So they decide to play cards instead. Alice, Bob, Carl and Diane play bridge. Looking at his cards, Carl says, "I think I had the same hand last time." "That is very unlikely" says Diane. How unlikely is it? In other words, how many different hands can you have in bridge? (The deck has 52 cards, each player gets 13.) We hope you have noticed that this is essentially the same question as the lottery problem. Imagine that Carl picks up his cards one by one. The first card can be any one of the 52 cards; whatever he picked up first, there are 51 possibilities for the second card, so there are 52 · 51 possibilities for the first two cards. Arguing similarly, we see that there are 52 · 51 · 50 · · · 40 possibilities for the 13 cards. But now every hand has been counted many times. In fact, if Eve comes to kibitz and looks into Carl's cards after he has arranged them and tries to guess (we don't know why) the order in which he picked them up, she could think, "He could have picked up any of the 13 cards first; he could have picked up any of the remaining 12 cards second; any of the remaining 11 cards third. . . . Aha, this is again like the seating: There are 13·12 · · · 2·1 orders in which he could have picked up his cards." But this means that the number of different hands in bridge is 52 · 51 · 50 · · · 40 = 635,013,559,600. 13 · 12 · · · 2 · 1 So the chance that Carl had the same hand twice in a row is one in 635,013,559,600, which is very small indeed. Finally, the six guests decide to play chess. Alice, who just wants to watch, sets up three boards. "How many ways can you guys be matched with each other?" she wonders. "This is clearly the same problem as seating you on six chairs; it does not matter whether the chairs are around the dinner table or at the three boards. So the answer is 720 as before." "I think you should not count it as a different pairing if two people at the same board switch places," says Bob, "and it shouldn't matter which pair sits at which board." 4 1. Let's Count! "Yes, I think we have to agree on what the question really means," adds Carl. "If we include in it who plays white on each board, then if a pair switches places we do get a different matching. But Bob is right that it doesn't matter which pair uses which board." "What do you mean it does not matter? You sit at the first board, which is closest to the peanuts, and I sit at the last, which is farthest," says Diane. "Let's just stick to Bob's version of the question" suggests Eve. "It is not hard, actually. It is like with handshakes: Alice's figure of 720 counts every pairing several times. We could rearrange the 3 boards in 6 different ways, without changing the pairing." "And each pair may or may not switch sides" adds Frank. "This means 2 · 2 · 2 = 8 ways to rearrange people without changing the pairing. So in fact, there are 6 · 8 = 48 ways to sit that all mean the same pairing. The 720 seatings come in groups of 48, and so the number of matchings is 720/48 = 15." "I think there is another way to get this," says Alice after a little time. "Bob is youngest, so let him choose a partner first. He can choose his partner in 5 ways. Whoever is youngest among the rest can choose his or her partner in 3 ways, and this settles the pairing. So the number of pairings is 5 · 3 = 15." "Well, it is nice to see that we arrived at the same figure by two really different arguments. At the least, it is reassuring" says Bob, and on this happy note we leave the party. 1.1.2 What is the number of pairings in Carl's sense (when it matters who sits on which side of the board, but the boards are all alike), and in Diane's sense (when it is the other way around)? 1.1.3 What is the number of pairings (in all the various senses as above) in a party of 10? 1.2 Sets and the Like We want to formalize assertions like "the problem of counting the number of hands in bridge is essentially the same as the problem of counting tickets in the lottery." The most basic tool in mathematics that helps here is the notion of a set. Any collection of distinct objects, called elements, is a set. The deck of cards is a set, whose elements are the cards. The participants in the party form a set, whose elements are Alice, Bob, Carl, Diane, Eve, Frank, and George (let us denote this set by P ). Every lottery ticket of the type mentioned above contains a set of 5 numbers. For mathematics, various sets of numbers are especially important: the set of real numbers, denoted by R; the set of rational numbers, denoted by Q; the set of integers, denote by Z; the set of non-negative integers, denoted 1.2 Sets and the Like 5 by Z+ ; the set of positive integers, denoted by N. The empty set, the set with no elements, is another important (although not very interesting) set; it is denoted by ∅. If A is a set and b is an element of A, we write b ∈ A. The number of elements of a set A (also called the cardinality of A) is denoted by |A|. Thus |P | = 7, |∅| = 0, and |Z| = ∞ (infinity).1 We may specify a set by listing its elements between braces; so P = {Alice, Bob, Carl, Diane, Eve, Frank, George} is the set of participants in Alice's birthday party, and {12, 23, 27, 33, 67} is the set of numbers on my uncle's lottery ticket. Sometimes, we replace the list by a verbal description, like {Alice and her guests}. Often, we specify a set by a property that singles out the elements from a large "universe" like that of all real numbers. We then write this property inside the braces, but after a colon. Thus {x ∈ Z : x ≥ 0} is the set of non-negative integers (which we have called Z+ before), and {x ∈ P : x is a girl} = {Alice, Diane, Eve} (we will denote this set by G). Let us also tell you that {x ∈ P : x is over 21 years old} = {Alice, Carl, Frank} (we will denote this set by D). A set A is called a subset of a set B if every element of A is also an element of B. In other words, A consists of certain elements of B. We can allow A to consist of all elements of B (in which case A = B) or none of them (in which case A = ∅), and still consider it a subset. So the empty set is a subset of every set. The relation that A is a subset of B is denoted by A ⊆ B. For example, among the various sets of people considered above, G ⊆ P and D ⊆ P . Among the sets of numbers, we have a long chain: ∅ ⊆ N ⊆ Z+ ⊆ Z ⊆ Q ⊆ R. mathematics one can distinguish various levels of "infinity"; for example, one can distinguish between the cardinalities of Z and R. This is the subject matter of set theory and does not concern us here. 1 In 6 1. Let's Count! The notation A ⊂ B means that A is a subset of B but not all of B. In the chain above, we could replace the ⊆ signs by ⊂. If we have two sets, we can define various other sets with their help. The intersection of two sets is the set consisting of those elements that are elements of both sets. The intersection of two sets A and B is denoted by A ∩ B. For example, we have G ∩ D = {Alice}. Two sets whose intersection is the empty set (in other words, they have no element in common) are called disjoint. The union of two sets is the set consisting of those elements that are elements of at least one of the sets. The union of two sets A and B is denoted by A ∪ B. For example, we have G ∪ D = {Alice, Carl, Diane, Eve, Frank}. The difference of two sets A and B is the set of elements that belong to A but not to B. The difference of two sets A and B is denoted by A \ B. For example, we have G \ D = {Diane, Eve}. The symmetric difference of two sets A and B is the set of elements that belong to exactly one of A and B. The symmetric difference of two sets A and B is denoted by A B. For example, we have G D = {Carl, Diane, Eve, Frank}. Intersection, union, and the two kinds of differences are similar to addition, multiplication, and subtraction. However, they are operations on sets, rather than operations on numbers. Just like operations on numbers, set operations obey many useful rules (identities). For example, for any three sets A, B, and C, A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C). (1.1) To see that this is so, think of an element x that belongs to the set on the left-hand side. Then we have x ∈ A and also x ∈ B ∪ C. This latter assertion is the same as saying that either x ∈ B or x ∈ C. If x ∈ B, then (since we also have x ∈ C) we have x ∈ A ∩ B. If x ∈ C, then similarly we get x ∈ A∩C. So we know that x ∈ A∩B or x ∈ A∩C. By the definition of the union of two sets, this is the same as saying that x ∈ (A ∩ B) ∪ (A ∩ C). Conversely, consider an element that belongs to the right-hand side. By the definition of union, this means that x ∈ A ∩ B or x ∈ A ∩ C. In the first case, we have x ∈ A and also x ∈ B. In the second, we get x ∈ A and also x ∈ C. So in either case x ∈ A, and we either have x ∈ B or x ∈ C, which implies that x ∈ B ∪ C. But this means that A ∩ (B ∪ C). This kind of argument gets a bit boring, even though there is really nothing to it other than simple logic. One trouble with it is that it is so lengthy that it is easy to make an error in it. There is a nice graphic way to support such arguments. We represent the sets A, B, and C by three overlapping circles (Figure 1.1). We imagine that the common elements of A, B, and C are put in the common part of the three circles; those elements of A that are also in B but not in C are put in the common part of circles A and B outside C, etc. This drawing is called the Venn diagram of the three sets. 1.2 Sets and the Like A A 7 C B C B FIGURE 1.1. The Venn diagram of three sets, and the sets on both sides of (1.1). Now, where are those elements in the Venn diagram that belong to the left-hand side of (1.1)? We have to form the union of B and C, which is the gray set in Figure 1.1(a), and then intersect it with A, to get the dark gray part. To get the set on the right-hand side, we have to form the sets A ∩ B and A ∩ C (marked by vertical and horizontal lines, respectively in Figure 1.1(b)), and then form their union. It is clear from the picture that we get the same set. This illustrates that Venn diagrams provide a safe and easy way to prove such identities involving set operations. The identity (1.1) is nice and quite easy to remember: If we think of "union" as a sort of addition (this is quite natural), and "intersection" as a sort of multiplication (hmm. . . not so clear why; perhaps after we learn about probability in Chapter 5 you'll see it), then we see that (1.1) is completely analogous to the familiar distributive rule for numbers: a(b + c) = ab + ac. Does this analogy go any further? Let's think of other properties of addition and multiplication. Two important properties are that they are commutative, a + b = b + a, ab = ba, and associative, (a + b) + c = a + (b + c), (ab)c = a(bc). It turns out that these are also properties of the union and intersection operations: A ∪ B = B ∪ A, A ∩ B = B ∩ A, (1.2) and (A ∪ B) ∪ C = A ∪ (B ∪ C), (A ∩ B) ∩ C = A ∩ (B ∩ C). (1.3) The proof of these identities is left to the reader as an exercise. Warning! Before going too far with this analogy, let us point out that there is another distributive law for sets: A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C). (1.4) 8 1. Let's Count! We get this simply by interchanging "union" and "intersection" in (1.1). (This identity can be proved just like (1.1); see Exercise 1.2.16.) This second distributivity is something that has no analogue for numbers: In general, a + bc = (a + b)(a + c) for three numbers a, b, c. There are other remarkable identities involving union, intersection, and also the two kinds of differences. These are useful, but not very deep: They reflect simple logic. So we don't list them here, but state several of these below in the exercises. 1.2.1 Name sets whose elements are (a) buildings, (b) people, (c) students, (d) trees, (e) numbers, (f) points. 1.2.2 What are the elements of the following sets: (a) army, (b) mankind, (c) library, (d) the animal kingdom? 1.2.3 Name sets having cardinality (a) 52, (b) 13, (c) 32, (d) 100, (e) 90, (f) 2,000,000. 1.2.4 What are the elements of the following (admittedly peculiar) set: {Alice, {1}}? 1.2.5 Is an "element of a set" a special case of a "subset of a set"? 1.2.6 List all subsets of {0, 1, 3}. How many do you get? 1.2.7 Define at least three sets of which {Alice, Diane, Eve} is a subset. 1.2.8 List all subsets of {a, b, c, d, e}, containing a but not containing b. 1.2.9 Define a set of which both {1, 3, 4} and {0, 3, 5} are subsets. Find such a set with the smallest possible number of elements. 1.2.10 (a) Which set would you call the union of {a, b, c}, {a, b, d} and {b, c, d, e}? (b) Find the union of the first two sets, and then the union of this with the third. Also, find the union of the last two sets, and then the union of this with the first set. Try to formulate what you have observed. (c) Give a definition of the union of more than two sets. 1.2.11 Explain the connection between the notion of the union of sets and Exercise 1.2.9. 1.2.12 We form the union of a set with 5 elements and a set with 9 elements. Which of the following numbers can we get as the cardinality of the union: 4, 6, 9, 10, 14, 20? 1.3 The Number of Subsets 9 1.2.13 We form the union of two sets. We know that one of them has n elements and the other has m elements. What can we infer about the cardinality of their union? 1.2.14 What is the intersection of (a) the sets {0, 1, 3} and {1, 2, 3}; (b) the set of girls in this class and the set of boys in this class; (c) the set of prime numbers and the set of even numbers? 1.2.15 We form the intersection of two sets. We know that one of them has n elements and the other has m elements. What can we infer about the cardinality of their intersection? 1.2.16 Prove (1.2), (1.3), and (1.4). 1.2.17 Prove that |A ∪ B| + |A ∩ B| = |A| + |B|. 1.2.18 (a) What is the symmetric difference of the set Z+ of nonnegative integers and the set E of even integers (E = {. . . , −4, −2, 0, 2, 4, . . . } contains both negative and positive even integers). (b) Form the symmetric difference of A and B to get a set C. Form the symmetric difference of A and C. What did you get? Give a proof of the answer. 1.3 The Number of Subsets Now that we have introduced the notion of subsets, we can formulate our first general combinatorial problem: What is the number of all subsets of a set with n elements? We start with trying out small numbers. It makes no difference what the elements of the set are; we call them a, b, c etc. The empty set has only one subset (namely, itself). A set with a single element, say {a}, has two subsets: the set {a} itself and the empty set ∅. A set with two elements, say {a, b}, has four subsets: ∅, {a}, {b}, and {a, b}. It takes a little more effort to list all the subsets of a set {a, b, c} with 3 elements: ∅, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, {a, b, c}. We can make a little table from these data: Number of elements Number of subsets 0 1 1 2 2 4 3 8 (1.5) Looking at these values, we observe that the number of subsets is a power of 2: If the set has n elements, the result is 2n , at least on these small examples. 10 1. Let's Count! It is not difficult to see that this is always the answer. Suppose you have to select a subset of a set A with n elements; let us call these elements a1 , a2 , . . . , an . Then we may or may not want to include a1 , in other words, we can make two possible decisions at this point. No matter how we decided about a1 , we may or may not want to include a2 in the subset; this means two possible decisions, and so the number of ways we can decide about a1 and a2 is 2 · 2 = 4. Now no matter how we decide about a1 and a2 , we have to decide about a3 , and we can again decide in two ways. Each of these ways can be combined with each of the 4 decisions we could have made about a1 and a2 , which makes 4 · 2 = 8 possibilities to decide about a1 , a2 and a3 . We can go on similarly: No matter how we decide about the first k elements, we have two possible decisions about the next, and so the number of possibilities doubles whenever we take a new element. For deciding about all the n elements of the set, we have 2n possibilities. Thus we have derived the following theorem. Theorem 1.3.1 A set with n elements has 2n subsets. a‰S Y b‰S N b‰S Y c‰S N c‰S Y c‰S N c‰S Y {a,b,c} N {a,b} Y {a,c} N {a} Y {b,c} N {b} Y {c} N ∅ FIGURE 1.2. A decision tree for selecting a subset of {a, b, c}. We can illustrate the argument in the proof by the picture in Figure 1.2. We read this figure as follows. We want to select a subset called S. We start from the circle on the top (called a node). The node contains a question: Is a an element of S? The two arrows going out of this node are labeled with the two possible answers to this question (Yes and No). We make a decision and follow the appropriate arrow (also called an edge) to the node at the other end. This node contains the next question: Is b an element of S? Follow the arrow corresponding to your answer to the next node, which 1.3 The Number of Subsets 11 contains the third (and in this case last) question you have to answer to determine the subset: Is c an element of S? Giving an answer and following the appropriate arrow we finally get to a node that does not represent a question, but contains a listing of the elements of S. Thus to select a subset corresponds to walking down this diagram from the top to the bottom. There are just as many subsets of our set as there are nodes on the last level. Since the number of nodes doubles from level to level as we go down, the last level contains 23 = 8 nodes (and if we had an n-element set, it would contain 2n nodes). Remark. A picture like this is called a tree. (This is not a formal definition; that will follow later.) If you want to know why the tree is growing upside down, ask the computer scientists who introduced this convention. (The conventional wisdom is that they never went out of the room, and so they never saw a real tree.) We can give another proof of Theorem 1.3.1. Again, the answer will be made clear by asking a question about subsets. But now we don't want to select a subset; what we want is to enumerate subsets, which means that we want to label them with numbers 0, 1, 2, . . . so that we can speak, say, about subset number 23 of the set. In other words, we want to arrange the subsets of the set in a list and then speak about the 23rd subset on the list. (We actually want to call the first subset of the list number 0, the second subset on the list number 1 etc. This is a little strange, but this time it is the logicians who are to blame. In fact, you will find this quite natural and handy after a while.) There are many ways to order the subsets of a set to form a list. A fairly natural thing to do is to start with ∅, then list all subsets with 1 element, then list all subsets with 2 elements, etc. This is the way the list (1.5) is put together. Another possibility is to order the subsets as in a phone book. This method will be more transparent if we write the subsets without braces and commas. For the subsets of {a, b, c}, we get the list ∅, a, ab, abc, ac, b, bc, c. These are indeed useful and natural ways of listing all subsets. They have one shortcoming, though. Imagine the list of the subsets of 10 elements, and ask yourself to name the 233rd subset on the list, without actually writing down the whole list. This would be difficult! Is there a way to make it easier? Let us start with another way of denoting subsets (another encoding in the mathematical jargon). We illustrate it on the subsets of {a, b, c}. We look at the elements one by one, and write down a 1 if the element occurs in the subset and a 0 if it does not. Thus for the subset {a, c}, we write down 101, since a is in the subset, b is not, and c is in it again. This way every 12 1. Let's Count! subset is "encoded" by a string of length 3, consisting of 0's and 1's. If we specify any such string, we can easily read off the subset it corresponds to. For example, the string 010 corresponds to the subset {b}, since the first 0 tells us that a is not in the subset, the 1 that follows tells us that b is in there, and the last 0 tells us that c is not there. Now, such strings consisting of 0's and 1's remind us of the binary representation of integers (in other words, representations in base 2). Let us recall the binary form of nonnegative integers up to 10: 0 = 02 1 = 12 2 = 102 3 = 2 + 1 = 112 4 = 1002 5 = 4 + 1 = 1012 6 = 4 + 2 = 1102 7 = 4 + 2 + 1 = 1112 8 = 10002 9 = 8 + 1 = 10012 10 = 8 + 2 = 10102 (We put the subscript 2 there to remind ourselves that we are working in base 2, not 10.) Now, the binary forms of integers 0, 1, . . . , 7 look almost like the "codes" of subsets; the difference is that the binary form of an integer (except for 0) always starts with a 1, and the first 4 of these integers have binary forms shorter than 3, while all codes of subsets of a 3-element set consist of exactly 3 digits. We can make this difference disappear if we append 0's to the binary forms at their beginning, to make them all have the same length. This way we get the following correspondence: 0 1 2 3 4 5 6 7 ⇔ 02 ⇔ 12 ⇔ 102 ⇔ 112 ⇔ 1002 ⇔ 1012 ⇔ 1102 ⇔ 1112 ⇔ ⇔ ⇔ ⇔ ⇔ ⇔ ⇔ ⇔ 000 001 010 011 100 101 110 111 ⇔ ∅ ⇔ {c} ⇔ {b} ⇔ {b, c} ⇔ {a} ⇔ {a, c} ⇔ {a, b} ⇔ {a, b, c} So we see that the subsets of {a, b, c} correspond to the numbers 0, 1, . . . , 7. What happens if we consider, more generally, subsets of a set with n elements? We can argue just as we did above, to get that the subsets of 1.3 The Number of Subsets 13 an n-element set correspond to integers, starting with 0 and ending with the largest integer that has n digits in its binary representation (digits in the binary representation are usually called bits). Now, the smallest number with n+1 bits is 2n , so the subsets correspond to numbers 0, 1, 2, . . . , 2n −1. It is clear that the number of these numbers in 2n , and hence the number of subsets is 2n . Now we can answer our question about the 233rd subset of a 10-element set. We have to convert 233 to binary notation. Since 233 is odd, its last binary digit (bit) will be 1. Let us cut off this last bit. This is the same as subtracting 1 from 233 and then dividing it by 2: We get (233−1)/2 = 116. This number is even, so its last bit will be 0. Let us cut this off again; we get (116 − 0)/2 = 58. Again, the last bit is 0, and cutting it off we get (58 − 0)/2 = 29. This is odd, so its last bit is 1, and cutting it off we get (29 − 1)/2 = 14. Cutting off a 0, we get (14 − 0)/2 = 7; cutting off a 1, we get (7 − 1)/2 = 3; cutting off a 1, we get (3 − 1)/2 = 1; cutting off a 1, we get 0. So the binary form of 233 is 11101001, which corresponds to the code 0011101001. It follows that if a1 , . . . , a10 are the elements of our set, then the 233rd subset of a 10-element set consists of the elements {a3 , a4 , a5 , a7 , a10 }. Comments. We have given two proofs of Theorem 1.3.1. You may wonder why we needed two proofs. Certainly not because a single proof would not have given enough confidence in the truth of the statement! Unlike in a legal procedure, a mathematical proof either gives absolute certainty or else it is useless. No matter how many incomplete proofs we give, they don't add up to a single complete proof. For that matter, we could ask you to take our word for it, and not give any proof. Later, in some cases this will be necessary, when we will state theorems whose proofs are too long or too involved to be included in this introductory book. So why did we bother to give any proof, let alone two proofs of the same statement? The answer is that every proof reveals much more than just the bare fact stated in the theorem, and this revelation may be more valuable than the theorem itself. For example, the first proof given above introduced the idea of breaking down the selection of a subset into independent decisions and the representation of this idea by a "decision tree"; we will use this idea repeatedly. The second proof introduced the idea of enumerating these subsets (labeling them with integers 0, 1, 2, . . . ). We also saw an important method of counting: We established a correspondence between the objects we wanted to count (the subsets) and some other kinds of objects that we can count easily (the numbers 0, 1, . . . , 2n − 1). In this correspondence: — for every subset, we had exactly one corresponding number, and — for every number, we had exactly one corresponding subset. 14 1. Let's Count! A correspondence with these properties is called a one-to-one correspondence (or bijection). If we can make a one-to-one correspondence between the elements of two sets, then they have the same number of elements. 1.3.1 Under the correspondence between numbers and subsets described above, which numbers correspond to (a) subsets with 1 element, (b) the whole set? (c) Which sets correspond to even numbers? 1.3.2 What is the number of subsets of a set with n elements, containing a given element? 1.3.3 Show that a nonempty set has the same number of odd subsets (i.e., subsets with an odd number of elements) as even subsets. 1.3.4 What is the number of integers with (a) at most n (decimal) digits; (b) exactly n digits (don't forget that there are positive and negative numbers!)? 1.4 The Approximate Number of Subsets So, we know that the number of subsets of a 100-element set is 2100 . This is a large number, but how large? It would be good to know, at least, how many digits it will have in the usual decimal form. Using computers, it would not be too hard to find the decimal form of this number (2100 = 1267650600228229401496703205376), but suppose we have no computers at hand. Can we at least estimate the order of magnitude of it? We know that 23 = 8 < 10, and hence (raising both sides of this inequality to the 33rd power) 299 < 1033 . Therefore, 2100 < 2 · 1033 . Now 2 · 1033 is a 2 followed by 33 zeros; it has 34 digits, and therefore 2100 has at most 34 digits. We also know that 210 = 1024 > 1000 = 103 ; these two numbers are quite close to each other2 . Hence 2100 > 1030 , which means that 2100 has at least 31 digits. This gives us a reasonably good idea of the size of 2100 . With a little more high-school math, we can get the number of digits exactly. What does it mean that a number has exactly k digits? It means that it is between 10k−1 and 10k (the lower bound is allowed, the upper is not). We want to find the value of k for which 10k−1 ≤ 2100 < 10k . 2 The fact that 210 is so close to 103 is used—or rather misused—in the name "kilobyte," which means 1024 bytes, although it should mean 1000 bytes, just as a "kilogram" means 1000 grams. Similarly, "megabyte" means 220 bytes, which is close to 1 million bytes, but not exactly equal. 1.5 Sequences 15 Now we can write 2100 in the form 10x , only x will not be an integer: the appropriate value of x is x = lg 2100 = 100 lg 2 (we use lg to denote logarithm with base 10). We have then k − 1 ≤ x < k, which means that k − 1 is the largest integer not exceeding x. Mathematicians have a name for this: It is the integer part, or floor, of x, and it is denoted by x . We can also say that we obtain k by rounding x down to the next integer. There is also a name for the number obtained by rounding x up to the next integer: It is called the ceiling of x, and denoted by x . Using any scientific calculator (or table of logarithms), we see that lg 2 ≈ 0.30103, thus 100 lg 2 ≈ 30.103, and rounding this down we get that k −1 = 30. Thus 2100 has 31 digits. 1.4.1 How many bits (binary digits) does 2100 have if written in base 2? 1.4.2 Find a formula for the number of digits of 2n . 1.5 Sequences Motivated by the "encoding" of subsets as strings of 0's and 1's, we may want to determine the number of strings of length n composed of some other set of symbols, for example, a, b and c. The argument we gave for the case of 0's and 1's can be carried over to this case without any essential change. We can observe that for the first element of the string, we can choose any of a, b and c, that is, we have 3 choices. No matter what we choose, there are 3 choices for the second element of the string, so the number of ways to choose the first two elements is 32 = 9. Proceeding in a similar manner, we get that the number of ways to choose the whole string is 3n . In fact, the number 3 has no special role here; the same argument proves the following theorem: Theorem 1.5.1 The number of strings of length n composed of k given elements is k n . The following problem leads to a generalization of this question. Suppose that a database has 4 fields: the first, containing an 8-character abbreviation of an employee's name; the second, M or F for sex; the third, the birthday of the employee, in the format mm-dd-yy (disregarding the problem of not being able to distinguish employees born in 1880 from employees born in 1980); and the fourth, a job code that can be one of 13 possibilities. How many different records are possible? The number will certainly be large. We already know from theorem 1.5.1 that the first field may contain 268 > 200,000,000,000 names (most of 16 1. Let's Count! these will be very difficult to pronounce, and are not likely to occur, but let's count all of them as possibilities). The second field has 2 possible entries. The third field can be thought of as three separate fields, having 12, 31, and 100 possible entries, respectively (some combinations of these will never occur, for example, 04-31-76 or 02-29-13, but let's ignore this). The last field has 13 possible entries. Now how do we determine the number of ways these can be combined? The argument we described above can be repeated, just "3 choices" has to be replaced, in order, by "268 choices," "2 choices," "12 choices," "31 choices," "100 choices," and "13 choices." We get that the answer is 268 · 2 · 12 · 31 · 100 · 13 = 201,977,536,857,907,200. We can formulate the following generalization of Theorem 1.5.1 (the proof consists of repeating the argument above). Theorem 1.5.2 Suppose that we want to form strings of length n by using any of a given set of k1 symbols as the first element of the string, any of a given set of k2 symbols as the second element of the string, etc., any of a given set of kn symbols as the last element of the string. Then the total number of strings we can form is k1 · k2 · · · kn . As another special case, consider the following problem: how many nonnegative integers have exactly n digits (in decimal)? It is clear that the first digit can be any of 9 numbers (1, 2, . . . , 9), while the second, third, etc., digits can be any of the 10 digits. Thus we get a special case of the previous question with k1 = 9 and k2 = k3 = · · · = kn = 10. Thus the answer is 9 · 10n−1 (cf. Exercise 1.3.4). 1.5.1 Draw a tree illustrating the way we counted the number of strings of length 2 formed from the characters a, b, and c, and explain how it gives the answer. Do the same for the more general problem when n = 3, k1 = 2, k2 = 3, k3 = 2. 1.5.2 In a sports shop there are T-shirts of 5 different colors, shorts of 4 different colors, and socks of 3 different colors. How many different uniforms can you compose from these items? 1.5.3 On a Toto (soccer poll) ticket, you have to bet 1, 2, or X for each of 13 games. In how many different ways can you fill out the ticket? 1.5.4 We roll a die twice; how many different outcomes can we have? (A 1 followed by a 4 is different from a 4 followed by a 1.) 1.5.5 We have 20 different presents that we want to distribute to 12 children. It is not required that every child get something; it could even happen that we give all the presents to the same child. In how many ways can we distribute the presents? 1.6 Permutations 17 1.5.6 We have 20 kinds of presents; this time, we have a large supply of each kind. We want to give presents to 12 children. Again, it is not required that every child gets something; but no child can get two copies of the same present. In how many ways can we give presents? 1.6 Permutations During Alice's birthday party, we encountered the problem of how many ways can we seat n people on n chairs (well, we have encountered it for n = 6 and n = 7, but the question is natural enough for any n). If we imagine that the seats are numbered, then finding a seating for these people is the same as assigning them to the numbers 1, 2, . . . , n (or 0, 1, . . . , n−1 if we want to please the logicians). Yet another way of saying this is to order the people in a single line, or write down an (ordered) list of their names. If we have a list of n objects (an ordered set, where it is specified which element is the first, second, etc.), and we rearrange them so that they are in another order, this is called permuting them; the new order is called a permutation of the objects. We also call the rearrangement that does not change anything a permutation (somewhat in the spirit of calling the empty set a set). For example, the set {a, b, c} has the following 6 permutations: abc, acb, bac, bca, cab, cba. So the question is to determine the number of ways n objects can be ordered, i.e., the number of permutations of n objects. The solution found by the people at the party works in general: We can put any of the n people in the first place; no matter whom we choose, we have n − 1 choices for the second. So the number of ways to fill the first two positions is n(n − 1). No matter how we have filled the first and second positions, there are n − 2 choices for the third position, so the number of ways to fill the first three positions is n(n − 1)(n − 2). It is clear that this argument goes on like this until all positions are filled. The second to last position can be filled in two ways; the person put in the last position is determined, once the other positions are filled. Thus the number of ways to fill all positions is n · (n − 1) · (n − 2) · · · 2 · 1. This product is so important that we have a notation for it: n! (read n factorial). In other words, n! is the number of ways to order n objects. With this notation, we can state our second theorem. Theorem 1.6.1 The number of permutations of n objects is n!. Again, we can illustrate the argument above graphically (Figure 1.3). We start with the node on the top, which poses our first decision: Whom do we seat in the first chair? The 3 arrows going out correspond to the three 18 1. Let's Count! first? a second? b second? c second? b abc c acb a bac c bca a cab b cba FIGURE 1.3. A decision tree for selecting a permutation of {a, b, c}. possible answers to the question. Making a decision, we can follow one of the arrows down to the next node. This carries the next decision problem: whom do we put in the second chair? The two arrows out of the node represent the two possible choices. (Note that these choices are different for different nodes on this level; what is important is that there are two arrows going out from each node.) If we make a decision and follow the corresponding arrow to the next node, we know who sits in the third chair. The node carries the whole seating order. It is clear that for a set with n elements, n arrows leave the top node, and hence there are n nodes on the next level. Then n − 1 arrows leave each of these, hence there are n(n − 1) nodes on the third level. Then n − 2 arrows leave each of these, etc. The bottom level has n! nodes. This shows that there are exactly n! permutations. 1.6.1 n boys and n girls go out to dance. In how many ways can they all dance simultaneously? (We assume that only couples of mixed gender dance with each other.) 1.6.2 (a) In how many ways can 8 people play chess in Alice's interpretation of the question? (b) Can you give a general formula for 2n people? 1.7 The Number of Ordered Subsets 19 1.7 The Number of Ordered Subsets At a competition of 100 athletes, only the order of the first 10 is recorded. How many different outcomes does the competition have? This question can be answered along the lines of the arguments we have seen. The first place can be won by any of the athletes; no matter who wins, there are 99 possible second place winners, so the first two prizes can go 100 · 99 ways. Given the first two, there are 98 athletes who can be third, etc. So the answer is 100 · 99 · · · 91. 1.7.1 Illustrate this argument by a tree. 1.7.2 Suppose that we record the order of all 100 athletes. (a) How many different outcomes can we have then? (b) How many of these give the same result for the first 10 places? (c) Show that the result above for the number of possible outcomes for the first 10 places can be also obtained using (a) and (b). There is nothing special about the numbers 100 and 10 in the problem above; we could carry out the same for n athletes with the first k places recorded. To give a more mathematical form to the result, we can replace the athletes by any set of size n. The list of the first k places is given by a sequence of k elements chosen from among n elements, which all have to be different. We may also view this as selecting a subset of the athletes containing k elements, and then ordering them. Thus we have the following theorem. Theorem 1.7.1 The number of ordered k-element subsets of a set with n elements is n(n − 1) · · · (n − k + 1). (Note that if we start with n and count down k numbers, the last one will be n − k + 1.) It is lengthy to talk about "sets with n elements" and "subsets with k elements"; it is convenient to abbreviate these expressions to "n-sets" and k-subsets." So the number of ordered k-subsets of an n-set is n(n − 1) · · · (n − k + 1). 1.7.3 If you generalize the solution of Exercise 1.7.2, you get the answer in the form n! (n − k)! Check that this is the same number as given in Theorem 1.7.1. 1.7.4 Explain the similarity and the difference between the counting questions answered by Theorem 1.7.1 and Theorem 1.5.1. 20 1. Let's Count! 1.8 The Number of Subsets of a Given Size From here, we can easily derive one of the most important counting results. Theorem 1.8.1 The number of k-subsets of an n-set is n(n − 1) · · · (n − k + 1) n! = . k! k!(n − k)! Proof. Recall that if we count ordered subsets, we get n(n − 1) · · · (n − k + 1) = n!/(n − k)!, by Theorem 1.7.1. Of course, if we want to know the number of unordered subsets, then we have overcounted; every subset was counted exactly k! times (with every possible ordering of its elements). So we have to divide this number by k! to get the number of subsets with k elements (without ordering). The number of k-subsets of an n-set is such an important quantity that there is a special notation for it: n (read "n choose k"). Thus k n k = n! . k!(n − k)! (1.6) The number of different lottery tickets is 90 , the number of handshakes 5 at the start of Alice's birthday party is 7 , etc. The numbers n are also 2 k called binomial coefficients (in Section 3.1 we will see why). The value of n is 1, since an n-element set has exactly one n-element n subset, namely itself. It may look a bit more tricky to find that n = 1, 0 but it is just as easy to explain: Every set has a single 0-element subset, namely the empty set. This is true even for the empty set, so that 0 = 1. 0 1.8.1 Which problems discussed during the party were special cases of theorem 1.8.1? 1.8.2 Tabulate the values of n k for 0 ≤ k ≤ n ≤ 5. 1.8.3 Find the values of n for k = 0, 1, n − 1, n using (1.6), and explain the k results in terms of the combinatorial meaning of n . k Binomial coefficients satisfy many important identities. In the next theorem we collect some of these; some other identities will occur in the exercises and in the next chapter. Theorem 1.8.2 Binomial coefficients satisfy the following identities: n k = n ; n−k (1.7) 1.8 The Number of Subsets of a Given Size 21 If n, k > 0, then n n−1 n−1 ; = + k k k−1 n n n n n + + ··· + + + n n−1 2 1 0 (1.8) = 2n . (1.9) Proof. We prove (1.7) by appealing to the combinatorial meaning of both sides. We have an n-element set, say S. The left hand side counts k-element subsets of S, while the right hand side counts (n − k)-element subsets of S. To see that these numbers are the same, we only need to notice that for every k-element subset there is a corresponding (n − k)-element subset: its complement in S , which contains exactly those elements of S that are not contained in the k-element set. This pairs up the k-element subsets with the (n−k)-element subsets, showing that there is the same number of each. Let's prove (1.8) using the algebraic formula (1.6). After substitution, the identity becomes (n − 1)! (n − 1)! n! = + . k!(n − k)! (k − 1)!(n − k)! k!(n − k − 1)! We can divide both sides by (n − 1)! and multiply by (k − 1)!(n − k − 1)!; then the identity becomes 1 1 n = + , k(n − k) n−k k which can be verified by an easy algebraic computation. Finally, we prove (1.9) through the combinatorial interpretation again. Again, let S be an n-element set. The first term on the left-hand side counts the 0-element subsets of S (there is only one, the empty set); the second term counts 1-element subsets; the next term, 2-element subsets, etc. In the whole sum, every subset of S is counted exactly once. We know that 2n (the right-hand side) is the number of all subsets of S. This proves (1.9), and completes the proof of Theorem 1.8.2. 1.8.4 Find a proof of (1.7) using the algebraic formula for (1.8), using the combinatorial meaning of both sides. n k and a proof of 1.8.5 Prove that n + n+1 = n2 ; give two proofs, one using the combina2 2 torial interpretation, and the other using the algebraic formula for the binomial coefficients. 1.8.6 Prove (again in two ways) that n k = n n−1 k k−1 . 1.8.7 Prove (in two ways) that for 0 ≤ c ≤ b ≤ a, a b a a−c = b c a−c b−c 22 1. Let's Count! Review Exercises 1.8.8 In how many ways can you seat 12 people at two round tables with 6 places each? Think of possible ways of defining when two seatings are different, and find the answer for each. 1.8.9 Name sets with cardinality (a) 365, (b) 12, (c) 7, (d) 11.5, (e) 0, (f) 1024. 1.8.10 List all subsets of {a, b, c, d, e} containing {a, e} but not containing c. 1.8.11 We have not written up all subset relations between various sets of numbers; for example, Z ⊆ R is also true. How many such relations can you find between the sets ∅, N, Z+ , Z, Q, R? 1.8.12 What is the intersection of (a) the set of positive integers whose last digit is 3, and the set of even numbers; (b) the set of integers divisible by 5 and the set of even integers? 1.8.13 Let A = {a, b, c, d, e} and B = {c, d, e}. List all subsets of A whose intersection with B has 1 element. 1.8.14 Three sets have 5, 10, and 15 elements, respectively. How many elements can their union and their intersection have? 1.8.15 What is the symmetric difference of A and A? 1.8.16 Form the symmetric difference of A and B to get a set C. Form the symmetric difference of A and C. What set do you get? 1.8.17 Let A, B, C be three sets and assume that A is a subset of C. Prove that A ∪ (B ∩ C) = (A ∪ B) ∩ C. Show by an example that the condition that A is a subset of C cannot be omitted. 1.8.18 What is the difference A \ B if (a) A is the set of primes and B is the set of odd integers? (b) A is the set of nonnegative real numbers and B is the set of nonpositive real numbers? 1.8.19 Prove that for any three sets A, B, C, ((A \ B) ∪ (B \ A)) ∩ C = ((A ∩ C) ∪ (B ∩ C)) \ (A ∩ B ∩ C). 1.8 The Number of Subsets of a Given Size 23 1.8.20 Let A be a set and let A denote the set of all 2-element subsets of A. 2 Which of the following statements is true? A∪B A B A∪B A B = ∪ ; ⊇ ∪ ; 2 2 2 2 2 2 A∩B 2 = A 2 ∩ B ; 2 A∩B 2 ⊆ A 2 ∩ B . 2 1.8.21 Let B be a subset of A, |A| = n, |B| = k. What is the number of all subsets of A whose intersection with B has 1 element? 1.8.22 Compute the binary form of 25 and 35, and compute their sum in the binary notation. Check the results against adding 25 and 35 in the usual decimal notation and then converting it to binary. 1.8.23 Prove that every positive integer can be written as the sum of different powers of 2. Also prove that for a given number, there is only one way to do so. 1.8.24 How many bits does 10100 have if written in base 2? 1.8.25 Starting from Washington, DC, how many ways can you visit 5 of the 50 state capitals and return to Washington? 1.8.26 Find the number of all 20-digit integers in which no two consecutive digits are the same. 1.8.27 Alice has 10 balls (all different). First, she splits them into two piles; then she picks one of the piles with at least two elements, and splits it into two; she repeats this until each pile has only one element. (a) How many steps does this take? (b) Show that the number of different ways in which she can carry out this procedure is 10 9 3 2 · ··· · . 2 2 2 2 [Hint: Imagine the procedure backward.] 1.8.28 You want to send postcards to 12 friends. In the shop there are only 3 kinds of postcards. In how many ways can you send the postcards, if (a) there is a large number of each kind of postcard, and you want to send one card to each friend; (b) there is a large number of each kind of postcard, and you are willing to send one or more postcards to each friend (but no one should get two identical cards); (c) the shop has only 4 of each kind of postcard, and you want to send one card to each friend? 24 1. Let's Count! 1.8.29 What is the number of ways to color n objects with 3 colors if every color must be used at least once? 1.8.30 Draw a tree for Alice's solution of enumerating the number of ways 6 people can play chess, and explain Alice's argument using the tree. 1.8.31 How many different "words" can you get by rearranging the letters in the word MATHEMATICS? 1.8.32 Find all positive integers a, b, and c for which a b b c =2 a . c 1.8.33 Prove that n k = n−2 k n−2 +2 k−1 + n−2 . k−2 1.8.34 20 persons are sitting around a table. How many ways can we choose 3 persons, no two of whom are neighbors? 2 Combinatorial Tools 2.1 Induction It is time to learn one of the most important tools in discrete mathematics. We start with a question: We add up the first n odd numbers. What do we get? Perhaps the best way to try to find the answer is to experiment. If we try small values of n, this is what we find: 1=1 1+3=4 1+3+5=9 1 + 3 + 5 + 7 = 16 1 + 3 + 5 + 7 + 9 = 25 1 + 3 + 5 + 7 + 9 + 11 = 36 1 + 3 + 5 + 7 + 9 + 11 + 13 = 49 1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 = 64 1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 = 81 1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 = 100 It is easy to observe that we get squares; in fact, it seems from these examples that the sum of the first n odd numbers is n2 . We have observed 26 2. Combinatorial Tools this for the first 10 values of n; can we be sure that it is valid for all? Well, I'd say we can be reasonably sure, but not with mathematical certainty. How can we prove the assertion? Consider the sum for a general n. The nth odd number is 2n−1 (check!), so we want to prove that 1 + 3 + · · · + (2n − 3) + (2n − 1) = n2 . (2.1) If we separate the last term in this sum, we are left with the sum of the first (n − 1) odd numbers: 1 + 3 + · · · + (2n − 3) + (2n − 1) = 1 + 3 + · · · + (2n − 3) + (2n − 1). Now, here the sum in the large parenthesis is (n − 1)2 , since it is the sum of the first n − 1 odd numbers. So the total is (n − 1)2 + (2n − 1) = (n2 − 2n + 1) + (2n − 1) = n2 , (2.2) just as we wanted to prove. Wait a minute! Aren't we using in the proof the statement that we are trying to prove? Surely this is unfair! One could prove everything if this were allowed! In fact, we are not quite using the assertion we are trying to prove. What we were using, was the assertion about the sum of the first n − 1 odd numbers; and we argued (in (2.2)) that this proves the assertion about the sum of the first n odd numbers. In other words, what we have actually shown is that if the assertion is true for a certain value (n − 1), then it is also true for the next value (n). This is enough to conclude that the assertion is true for every n. We have seen that it is true for n = 1; hence by the above, it is also true for n = 2 (we have seen this anyway by direct computation, but this shows that this was not even necessary: It follows from the case n = 1). In a similar way, the truth of the assertion for n = 2 implies that it is also true for n = 3, which in turn implies that it is true for n = 4, etc. If we repeat this sufficiently many times, we get the truth for any value of n. So the assertion is true for every value of n. This proof technique is called induction (or sometimes mathematical induction, to distinguish it from a notion in philosophy). It can be summarized as follows. Suppose that we want to prove a property of positive integers. Also suppose that we can prove two facts: (a) 1 has the property, and (b) whenever n−1 has the property, then n also has the property (n > 1). 2.1 Induction 27 The Principle of Induction says that if (a) and (b) are true, then every natural number has the property. This is precisely what we did above. We showed that the "sum" of the first 1 odd numbers is 12 , and then we showed that if the sum of the first n − 1 odd numbers is (n − 1)2 , then the sum of the first n odd numbers is n2 , for whichever integer n > 1 we consider. Therefore, by the Principle of Induction we can conclude that for every positive integer n, the sum of the first n odd numbers is n2 . Often, the best way to try to carry out an induction proof is the following. First we prove the statement for n = 1. (This is sometimes called the base case.) We then try to prove the statement for a general value of n, and we are allowed to assume that the statement is true if n is replaced by n − 1. (This is called the induction hypothesis.) If it helps, one may also use the validity of the statement for n − 2, n − 3, etc., and in general, for every k such that k < n. Sometimes we say that if 1 has the property, and every integer n inherits the property from n − 1, then every positive integer has the property. (Just as if the founding father of a family has a certain piece of property, and every new generation inherits this property from the previous generation, then the family will always have this property.) Sometimes we start not with n = 1 but with n = 0 (if this makes sense) or perhaps with a larger value of n (if, say, n = 1 makes no sense for some reason, or the statement is not for n = 1). For example, we want to prove that n! is an even number if ≥ 1. We check that this is true for n = 2 (indeed, 2! = 2 is even), and also that it is inherited from n − 1 to n (indeed, if (n − 1)! is even, then so is n! = n · (n − 1)!, since every multiple of an even number is even). This proves that n! is even for all values of n from the base case n = 2 on. The assertion is false for n = 1, of course. 2.1.1 Prove, using induction but also without it, that n(n+1) is an even number for every nonnegative integer n. 2.1.2 Prove by induction that the sum of the first n positive integers is n(n + 1)/2. 2.1.3 Observe that the number n(n + 1)/2 is the number of handshakes among n + 1 people. Suppose that everyone counts only handshakes with people older than him/her (pretty snobbish, isn't it?). Who will count the largest number of handshakes? How many people count 6 handshakes? (We assume that no two people have exactly the same age.) Give a proof of the result of Exercise 2.1.2, based on your answer to these questions. 2.1.4 Give a proof of Exercise 2.1.2, based on Figure 2.1. 28 2. Combinatorial Tools 1+2+3+4+5 = ? 2(1+2+3+4+5) = 5 . 6 = 30 FIGURE 2.1. The sum of the first n integers 2.1.5 Prove the following identity: 1 · 2 + 2 · 3 + 3 · 4 + · · · + (n − 1) · n = (n − 1) · n · (n + 1) . 3 Exercise 2.1.2 relates to a well-known anecdote from the history of mathematics. Carl Friedrich Gauss (1777–1855), one of the greatest mathematicians of all times, was in elementary school when his teacher gave the class the task to add up the integers from 1 to 1000. He was hoping that he would get an hour or so to relax while his students were working. (The story is apocryphal, and it appears with various numbers to add: from 1 to 100, or 1900 to 2000.) To the teacher's great surprise, Gauss came up with the correct answer almost immediately. His solution was extremely simple: Combining the first term with the last, you get 1 + 1000 = 1001; combining the second term with the last but one, you get 2 + 999 = 1001; proceeding in a similar way, combining the first remaining term with the last one (and then discarding them) you get 1001. The last pair added this way is 500 + 501 = 1001. So we obtained 500 times 1001, which makes 500500. We can check this answer against the formula given in exercise 2.1.2: 1000 · 1001/2 = 500500. 2.1.6 Use the method of the young Gauss to give a third proof of the formula in exercise 2.1.2 2.1.7 How would the young Gauss prove the formula (2.1) for the sum of the first n odd numbers? 2.1.8 Prove that the sum of the first n squares 1 + 4 + 9 + · · · + n2 is n(n + 1)(2n + 1)/6. 2.1.9 Prove that the sum of the first n powers of 2 (starting with 1 = 20 ) is 2n − 1. In Chapter 1 we often relied on the convenience of saying "etc.": we described some argument that had to be repeated n times to give the 2.1 Induction 29 result we wanted to get, but after giving the argument once or twice, we said "etc." instead of further repetition. There is nothing wrong with this, if the argument is sufficiently simple so that we can intuitively see where the repetition leads. But it would be nice to have some tool at hand that could be used instead of "etc." in cases where the outcome of the repetition is not so transparent. The precise way of doing this is using induction, as we are going to illustrate by revisiting some of our results. First, let us give a proof of the formula for the number of subsets of an n-element set, given in Theorem 1.3.1 (recall that the answer is 2n ). As the Principle of Induction tells us, we have to check that the assertion is true for n = 0. This is trivial, and we already did it. Next, we assume that n > 0, and that the assertion is true for sets with n − 1 elements. Consider a set S with n elements, and fix any element a ∈ S. We want to count the subsets of S. Let us divide them into two classes: those containing a and those not containing a. We count them separately. First, we deal with those subsets that don't contain a. If we delete a from S, we are left with a set S with n − 1 elements, and the subsets we are interested in are exactly the subsets of S . By the induction hypothesis, the number of such subsets is 2n−1 . Second, we consider subsets containing a. The key observation is that every such subset consists of a and a subset of S . Conversely, if we take any subset of S , we can add a to it to get a subset of S containing a. Hence the number of subsets of S containing a is the same as the number of subsets of S , which is, by the induction hypothesis, 2n−1 . (We can exercise another bit of mathematical jargon introduced before: The last piece of the argument establishes a one-to-one correspondence between those subsets of S containing a and those not containing a.) To conclude: The total number of subsets of S is 2n−1 +2n−1 = 2·2n−1 = n 2 . This proves Theorem 1.3.1 (again). 2.1.10 Use induction to prove Theorem 1.5.1 (the number of strings of length n composed of k given elements is kn ) and Theorem 1.6.1 (the number of permutations of a set with n elements is n!). 2.1.11 Use induction on n to prove the "handshake theorem" (the number of handshakes between n people is n(n − 1)/2). 2.1.12 Read carefully the following induction proof: Assertion: n(n + 1) is an odd number for every n. Proof: Suppose that this is true for n − 1 in place of n; we prove it for n, using the induction hypothesis. We have n(n + 1) = (n − 1)n + 2n. 30 2. Combinatorial Tools Now here (n−1)n is odd by the induction hypothesis, and 2n is even. Hence n(n + 1) is the sum of an odd number and an even number, which is odd. The assertion that we proved is obviously wrong for n = 10: 10 · 11 = 110 is even. What is wrong with the proof? 2.1.13 Read carefully the following induction proof: Assertion: If we have n lines in the plane, no two of which are parallel, then they all go through one point. Proof: The assertion is true for one line (and also for 2, since we have assumed that no two lines are parallel). Suppose that it is true for any set of n − 1 lines. We are going to prove that it is also true for n lines, using this induction hypothesis. So consider a set S = {a, b, c, d, . . . } of n lines in the plane, no two of which are parallel. Delete the line c; then we are left with a set S of n − 1 lines, and obviously, no two of these are parallel. So we can apply the induction hypothesis and conclude that there is a point P such that all the lines in S go through P . In particular, a and b go through P , and so P must be the point of intersection of a and b. Now put c back and delete d, to get a set S of n − 1 lines. Just as above, we can use the induction hypothesis to conclude that these lines go through the same point P ; but just as above, P must be the point of intersection of a and b. Thus P = P . But then we see that c goes through P . The other lines also go through P (by the choice of P ), and so all the n lines go through P . But the assertion we proved is clearly wrong; where is the error? 2.2 Comparing and Estimating Numbers It is nice to have formulas for certain numbers (for example, for the number n! of permutations of n elements), but it is often more important to have a rough idea about how large these numbers are. For example, how many digits does 100! have? Let us start with simpler questions. Which is larger, n or n ? For n = 2 2, 3, 4 the value of n is 1, 3, 6, so it is less than n for n = 2, equal for 2 n = 3, but larger for n = 4. In fact, n = n < n if n ≥ 4. 1 2 More can be said: The quotient n 2 n = n−1 2 becomes arbitrarily large as n becomes large; for example, if we want this quotient to be larger than 1000, it suffices to choose n > 2001. In the 2.2 Comparing and Estimating Numbers 31 language of calculus, we have n 2 n →∞ (n → ∞) . Here is another simple question: Which is larger, n2 or 2n ? For small values of n, this can go either way: 12 < 21 , 22 = 22 , 32 > 23 , 42 = 24 , 52 < 25 . But from here on, 2n takes off and grows much faster than n2 . For example, 210 = 1024 is much larger than 102 = 100. In fact, 2n /n2 becomes arbitrarily large, as n becomes large. 2.2.1 (a) Prove that 2n > n (b) Use (a) to prove that 2 /n2 becomes arbitrarily large as n becomes large. n 3 if n ≥ 3. Now we tackle the problem of estimating 100! or, more generally, n! = 1 · 2 · · · n. The first factor 1 does not matter, but all the others are at least 2, so n! ≥ 2n−1 . Similarly, n! ≤ nn−1 , since (ignoring the factor 1 again) n! is the product of n − 1 factors, each of which is at most n. (Since all but one of them are smaller than n, the product is in fact much smaller.) Thus we know that (2.3) 2n−1 ≤ n! ≤ nn−1 . These bounds are very far apart; for n = 10, the lower bound is 29 = 512, while the upper bound is 109 (one billion). Here is a question that is not answered by the simple bounds in (2.3). Which is larger, n! or 2n ? In other words, does a set with n elements have more permutations or more subsets? For small values of n, subsets are winning: 21 = 2 > 1! = 1, 22 = 4 > 2! = 2, 23 = 8 > 3! = 6. But then the picture changes: 24 = 16 < 4! = 24, 25 = 32 < 5! = 120. It is easy to see that as n increases, n! grows much faster than 2n : If we go from n to n + 1, then 2n grows by a factor of 2, while n! grows by a factor of n + 1. 2.2.2 Use induction to make the previous argument precise, and prove that n! > 2n if n ≥ 4. There is a formula that gives a very good approximation of n!. We state it without proof, since the proof (although not terribly difficult) needs calculus. Theorem 2.2.1 [Stirling's formula] n n√ 2πn. e Here π = 3.14 . . . is the area of the circle with unit radius, e = 2.718 . . . is the base of the natural logarithm, and ∼ means approximate equality in the precise sense that n! ∼ n n e n! √ 2πn →1 (n → ∞). 32 2. Combinatorial Tools Both of the funny irrational numbers e and π occur in the same formula! Let us return to the question: How many digits does 100! have? We know by Stirling's formula that √ 100! ≈ (100/e)100 · 200π. The number of digits of this number is its logarithm, in base 10, rounded up. Thus we get √ lg(100!) ≈ 100 lg(100/e) + 1 + lg 2π = 157.969 . . . . So the number of digits in 100! is about 158 (this is, in fact, the right value). 2.3 Inclusion-Exclusion In a class of 40, many students are collecting the pictures of their favorite rock stars. Eighteen students have a picture of the Beatles, 16 students have a picture of the Rolling Stones and 12 students have a picture of Elvis Presley (this happened a long time ago, when we were young). There are 7 students who have pictures of both the Beatles and the Rolling Stones, 5 students who have pictures of both the Beatles and Elvis Presley, and 3 students who have pictures of both the Rolling Stones and Elvis Presley. Finally, there are 2 students who possess pictures of all three groups. Question: How many students in the class have no picture of any of the rock groups? First, we may try to argue like this: There are 40 students altogether in the class; take away from this the number of those having Beatles pictures (18), those having Rolling Stones picture (16), and those having Elvis pictures (12); so we take away 18 + 16 + 12. We get −6; this negative number warns us that there must be some error in our calculation; but what was not correct? We made a mistake when we subtracted the number of those students who collected the pictures of two groups twice! For example, a student having the Beatles and Elvis Presley was subtracted with the Beatles collectors as well as with the Elvis Presley collectors. To correct our calculations, we have to add back the number of those students who have pictures of two groups. This way we get 40 − (18 + 16 + 12) + (7 + 5 + 3). But we must be careful; we shouldn't make the same mistake again! What happened to the 2 students who have the pictures of all three groups? We subtracted these 3 times at the beginning, and then we added them back 3 times, so we must subtract them once more! With this correction, our final result is: 40 − (18 + 16 + 12) + (7 + 5 + 3) − 2 = 7. (2.4) We can not find any error in this formula, looking at it from any direction. But learning from our previous experience, we must be much more careful: We have to give an exact proof! 2.3 Inclusion-Exclusion 33 So suppose that somebody records picture collecting data of the class in a table like Table 2.1 below. Each row corresponds to a student; we did not put down all the 40 rows, just a few typical ones. Name Al Bel Cy Di Ed . . . Bonus 1 1 1 1 1 Beatles 0 −1 −1 −1 −1 Stones 0 0 −1 0 −1 Elvis 0 0 0 −1 −1 BS 0 0 1 0 1 BE 0 0 0 1 1 SE 0 0 0 0 1 BSE 0 0 0 0 −1 TABLE 2.1. Strange record of who's collecting whose pictures. The table is a bit silly (but with reason). First, we give a bonus of 1 to every student. Second, we record in a separate column whether the student is collecting (say) both the Beatles and Elvis Presley (the column labeled BE), even though this could be read off from the previous columns. Third, we put a −1 in columns recording the collecting of an odd number of pictures, and a 1 in columns recording the collecting of an even number of pictures. We compute the total sum of entries in this table in two different ways. First, what are the row sums? We get 1 for Al and 0 for everybody else. This is not a coincidence. If we consider a student like Al, who does not have any picture, then this student contributes to the bonus column, but nowhere else, which means that the sum in the row of this student is 1. Next, consider Ed, who has all 3 pictures. He has a 1 in the bonus column; in the next 3 columns he has 3 terms that are −1. In each of the next 3 columns he has a 1, one for each pair of pictures; it is better to think of this 3 as 3 . His row ends with 3 −1's ( 3 equals 1, but in writing it 2 3 3 this way the general idea can be seen better). So the sum of the row is 1− 3 3 3 − + 3 2 1 = 0. Looking at the rows of Bel, Cy, and Di, we see that their sums are 1 1 2 2 + 1− 2 1 1− =0 =0 for Bel (1 picture), for Cy and Di (2 pictures). If we move the negative terms to the other side of these equations, we get an equation with a combinatorial meaning: The number of subsets of an 34 2. Combinatorial Tools n-set with an even number of elements is the same as the number of subsets with an odd number of elements. For example, 3 3 + 2 0 = 3 3 . + 3 1 Recall that Exercise 1.3.3 asserts that this is indeed so for every n ≥ 1. Since the row sum is 0 for all those students who have any picture of any music group, and it is 1 for those having no picture at all, the sum of all 40 row sums gives exactly the number of those students having no picture at all. On the other hand, what are the column sums? In the "bonus" column, we have 40 times +1; in the "Beatles" column, we have 18 times −1; then we have 16 and 12 times −1. Furthermore, we get 7 times +1 in the BS column, then 5- and 3 times +1 in the BE and SE columns, respectively. Finally, we get 2 −1's in the last column. So this is indeed the expression in (2.4). This formula is called the Inclusion–Exclusion Formula or Sieve Formula. The origin of the first name is obvious; the second refers to the image that we start with a large set of objects and then "sieve out" those objects we don't want to count. We could extend this method if students were collecting pictures of 4, or 5, or any number of rock groups instead of 3. Rather than stating a general theorem (which would be lengthy), we give a number of exercises and examples. 2.3.1 In a class of all boys, 18 boys like to play chess, 23 like to play soccer, 21 like biking and 17 like hiking. The number of those who like to play both chess and soccer is 9. We also know that 7 boys like chess and biking, 6 boys like chess and hiking, 12 like soccer and biking, 9 boys like soccer and hiking, and finally 12 boys like biking and hiking. There are 4 boys who like chess, soccer, and biking, 3 who like chess, soccer, and hiking, 5 who like chess, biking, and hiking, and 7 who like soccer, biking, and hiking. Finally there are 3 boys who like all four activities. In addition we know that everybody likes at least one of these activities. How many boys are there in the class? 2.4 Pigeonholes Can we find in New York two persons having the same number of strands of hair? One would think that it is impossible to answer this question, since one does not even know how many strands of hair there are on one's own head, let alone about the number of strands of hair on every person living in New York (whose exact number is in itself quite difficult to determine). But there are some facts that we know for sure: Nobody has more than 500,000 strands of hair (a scientific observation), and there are more than 10 million 2.4 Pigeonholes 35 inhabitants of New York. Can we now answer our original question? Yes. If there were no two people with the same number of strands of hair, then there would be at most one person having 0 strands, at most one person having exactly 1 strand, and so on. Finally, there would be at most one person having exactly 500,000 strands. But then this means that there are no more than 500,001 inhabitants of New York. Since this contradicts what we know about New York, it follows that there must be two people having the same number of strands of hair.1 We can formulate our solution as follows. Imagine 500,001 enormous boxes (or pigeon holes). The first one is labeled "New Yorkers having 0 strands of hair," the next is labeled "New Yorkers having 1 strand of hair," and so on. The last box is labeled "New Yorkers having 500,000 strands of hair". Now if everybody goes to the proper box, then about 10 million New Yorkers are properly assigned to some box (or hole). Since we have only 500,001 boxes, there certainly will be a box containing more than one New Yorker. This statement is obvious, but it is very often a powerful tool, so we formulate it in full generality: If we have n boxes and we place more than n objects into them, then there will be at least one box that contains more than one object. Very often, the above statement is formulated using pigeons and their holes, and is referred to as the Pigeonhole Principle. The Pigeonhole Principle is simple indeed: Everybody understands it immediately. Nevertheless, it deserves a name, since we use it very often as the basic tool of many proofs. We will see many examples for the use of the Pigeonhole Principle, but to show you its power, we discuss one of them right away. This is not a theorem of any significance; rather, and exercise whose solution is given in detail. Exercise. We shoot 50 shots at a square target, the side of which is 70 cm long. We are quite a good shot, because all of our shots hit the target. Prove that there are two bulletholes that are closer than 15 cm. Solution: Imagine that our target is an old chessboard. One row and one column of it has fallen off, so it has 49 squares. The board received 50 shots, so there must be a square that received at least two shots (putting bulletholes in pigeonholes). We claim that these two shots are closer to each other than 15 cm. is an interesting feature of this argument: we end up knowing that two such persons exist, without having the slightest hint about how to find these people. (Even if we suspect that two people have the same number of strands of hair, it is essentially impossible to verify that this is indeed so!) Such proofs in mathematics are called pure existence proofs. 1 There 36 2. Combinatorial Tools The side of the square is obviously 10 cm, the diagonals of it are equal, √ and (from the Pythagorean Theorem) their length is 200 ≈ 14.1 cm. We show that (∗) the two shots cannot be at a larger distance than the diagonal. It is intuitively clear that two points in the square at largest distance are the endpoints of one of the diagonals, but intuition can be misleading; let us prove this. Suppose that two points P and Q are farther away then the length of the diagonal. Let A, B, C, and D be the vertices of the square. Connect P and Q by a line, and let P and Q be the two points where this line intersects the boundary of the square (Figure 2.2). Then the distance of P and Q is even larger, so it is also larger than the diagonal. C Q' Q cm B 10 cm P P' A D FIGURE 2.2. Two shots in the same square We may assume without loss of generality that P lies on the side AB (if this is not the case, we change the names of the vertices). One of the angles Q P A and Q P B is at least 90◦ ; we may assume (again without loss of generality) that Q P A is this angle. Then the segment AQ is the edge of the triangle Q P A opposite the largest angle, and so it is even longer than P Q , and so it is longer than the diagonal. We repeat this argument to show that if we replace Q by one of the endpoints of the side it lies on, we get a segment that is longer than the diagonal. But now we have a segment both of whose endpoints are vertices of the square. So this segment is either a side or a diagonal of the square, and in neither case is it longer than the diagonal! This contradiction shows that the assertion (∗) above must be true. So we got not only that there will be two shots that are closer than 15 cm, but even closer than 14.2 cm. This concludes the solution of the exercise. If this is the first time you have seen this type of proof, you may be surprised: we did not argue directly to prove what we wanted, but instead assumed that the assertion was not true, and then using this additional 14 .1 2.5 The Twin Paradox and the Good Old Logarithm 37 assumptions, we argued until we got a contradiction. This form of proof is called indirect, and it is quite often used in mathematical reasoning, as we will see throughout this book. (Mathematicians are strange creatures, one may observe: They go into long arguments based on assumptions they know are false, and their happiest moments are when they find a contradiction between statements they have proved.) 2.4.1 Prove that we can select 20 New Yorkers who all have the same number of strands of hair. 2.5 The Twin Paradox and the Good Old Logarithm Having taught the Pigeonhole Principle to his class, the professor decides to play a little game: "I bet that there are two of you who have the same birthday! What do you think?" Several students reply immediately: "There are 366 possible birthdays, so you could only conclude this if there were at least 367 of us in the class! But there are only 50 of us, and so you'd lose the bet." Nevertheless, the professor insists on betting, and he wins. How can we explain this? The first thing to realize is that the Pigeonhole Principle tells us that with 367 students in the class, the professor always wins the bet. But this is uninteresting as bets go; it is enough for him that he has a good chance of winning. With 366 students, he may already lose; could it be that with only 50 students he still has a good chance of winning? The surprising answer is that even with as few as 23 students, his chance of winning is slightly larger than 50%. We can view this fact as a "Probabilistic Pigeonhole Principle", but the usual name for it is the Twin Paradox. Let us try to determine the professor's chances. Suppose that on the class list, he writes down everybody's birthday. So he has a list of 50 birthdays. We know from Section 1.5 that there are 36650 different lists of this type. For how many of these does he lose? Again, we already know the answer from Section 1.7: 366 · 365 · · · 317. So the probability that he loses the bet is2 366 · 365 · · · 317 36650 . With some effort, we could calculate this value "by brute force", using a computer (or just a programmable calculator), but it will be much more we made the implicit assumption that all the 36650 birthday lists are equally likely. This is certainly not true; for example, lists containing February 29 are clearly much less likely. There are also (much smaller) variations between the other days of the year. It can be shown, however, that these variations only help the professor, making collisions of birthdays more likely. 2 Here 38 2. Combinatorial Tools useful to get upper and lower bounds by a method that will work in a more general case, when we have n possible birthdays and k students. In other words, how large is the quotient n(n − 1) · · · (n − k + 1) ? nk It will be more convenient to take the reciprocal (which is then larger than 1): nk . (2.5) n(n − 1) · · · (n − k + 1) We can simplify this fraction by cancelling an n, but then there is no obvious way to continue. A little clue may be that the number of factors is the same in the numerator and denominator, so let us try to write this fraction as a product: n n n nk = · ··· . n(n − 1) . . . (n − k + 1) n−1 n−2 n−k+1 These factors are quite simple, but it is still difficult to see how large their product is. The individual factors are larger than 1, but (at least at the beginning) quite close to 1. But there are many of them, and their product may be large. The following idea helps: Take the logarithm!3 We get ln nk n(n − 1) · · · (n − k + 1) = ln + ln n n + ln n−1 n−2 n . n−k+1 + ··· (2.6) (Naturally, we took the natural logarithm, base e = 2.71828 . . . .) This way we can deal with addition instead of multiplication, which is nice; but the terms we have to add up became much uglier! What do we know about these logarithms? Let's look at the graph of the logarithm function (Figure 2.3). We have also drawn the line y = x − 1. We see that the function is below the line, and touches it at the point x = 1 (these facts can be proved by really elementary calculus). So we have ln x ≤ x − 1. (2.7) Can we say something about how good this upper bound is? From the figure we see that at least for values of x close to 1, the two graphs are 3 After all, the logarithm was invented in the seventeenth century by Buergi and Napier to make multiplication easier, by turning it into addition. 2.5 The Twin Paradox and the Good Old Logarithm 1 39 1 0 2 3 –1 –2 FIGURE 2.3. The graph of the natural logarithm function. Note that near 1, it is very close to the line x − 1. quite close. Indeed, we can do the following little computation: ln x = − ln 1 ≥− x 1 −1 x = x−1 . x (2.8) If x is a little larger than 1 (as are the values we have in (2.6)), then x−1 is x only a little smaller than x − 1, and so the upper bound in (2.7) and lower bound in (2.8) are quite close. These bounds on the logarithm function are very useful in many applications in which we have to do approximate computations with logarithms, and it is worthwhile to state them in a separate lemma. (A lemma is a precise mathematical statement, just like a theorem, except that it is not the goal itself, but some auxiliary result used along the way to the proof of a theorem. Of course, some lemmas are more interesting than some theorems!) Lemma 2.5.1 For every x > 0, x−1 ≤ ln x ≤ x − 1. x First we use the lower bound in this lemma to estimate (2.6) from below. For a typical term in the sum in (2.6) we get ln n n−j ≥ n n−j − n n−j 1 = j , n 40 2. Combinatorial Tools and hence ln nk n(n − 1) · · · (n − k + 1) = ≥ 1 2 k−1 + + ··· + n n n 1 k(k − 1) (1 + 2 + · · · + (k − 1)) = n 2n (remember the young Gauss's problem!). Thus we have a simple lower bound on (2.6). To get an upper bound, we can use the other inequality in Lemma 2.5.1; for a typical term, we get ln n n−j ≤ n j −1= . n−j n−j We have to sum these for j = 1, . . . , k − 1 to get an upper bound on (2.6). This is not as easy as in young Gauss's case, since the denominator is changing. But we only want an upper bound, so we could replace the denominator by the smallest value it can have for various values of j, namely n − k + 1. We have j/(n − j) ≤ j/(n − k + 1), and hence ln nk n(n − 1) · · · (n − k + 1) 1 2 k−1 + + ··· + n−k+1 n−k+1 n−k+1 1 = (1 + 2 + · · · + (k − 1)) n−k+1 k(k − 1) . = 2(n − k + 1) ≤ Thus we have these similar upper and lower bounds on the logarithm of the ratio (2.5), and applying the exponential function to both sides, we get the following: e k(k−1) 2n ≤ k(k−1) nk ≤ e 2(n−k+1) . n(n − 1) · · · (n − k + 1) (2.9) Does this help to understand the professor's trick in the classroom? Let's apply (2.9) with n = 366 and k = 50; using our calculators, we get that 28.4 ≤ 36650 ≤ 47.7. 366 · 364 · · · 317 (Using more computation, we can determine that the exact value is 33.414 . . . .) So the probability that all students in the class have different birthdays (which is the reciprocal of this number) is less than 1/28. This means that if the professor performs this trick every year, he will likely fail only once or twice in his career! 2.5 The Twin Paradox and the Good Old Logarithm 41 Review Exercises 2.5.1 What is the following sum? 1 1 1 1 + + + ··· + . 1·2 2·3 3·4 (n − 1) · n Experiment, conjecture the value, and then prove it by induction. 2.5.2 What is the following sum? n 0 n 1 n 2 + · · · + (n − 1) · 0· +1· +2· n n−1 +n· n . n Experiment, conjecture the value, and then prove it. (Try to prove the result by induction and also by combinatorial arguments.) 2.5.3 Prove the following identities: 1 · 20 + 2 · 21 + 3 · 22 + · · · + n · 2n−1 = (n − 1)2n + 1. 13 + 2 3 + 3 3 + · · · + n3 = 1 + 3 + 9 + 27 + · · · + 3n−1 2.5.4 Prove by induction on n that (a) n2 − 1 is a multiple of 4 if n is odd, (b) n3 − n is a multiple of 6 for every n. 2.5.5 There is a class of 40 girls. There are 18 girls who like to play chess, and 23 who like to play soccer. Several of them like biking. The number of those who like to play both chess and soccer is 9. There are 7 girls who like chess and biking, and 12 who like soccer and biking. There are 4 girls who like all three activities. In addition we know that everybody likes at least one of these activities. How many girls like biking? 2.5.6 There is a class of all boys. We know that there are a boys who like to play chess, b who like to play soccer, c who like biking and d who like hiking. The number of those who like to play both chess and soccer is x. There are y boys who like chess and biking, z boys who like chess and hiking, u who like soccer and biking, v boys who like soccer and hiking, and finally w boys who like biking and hiking. We don't know how many boys like, e.g.,chess, soccer and hiking, but we know that everybody likes at least one of these activities. We would like to know how many boys are in the class. (a) Show by an example that this is not determined by what we know. (b) Prove that we can at least conclude that the number of boys in the class is at most a + b + c + d, and at least a + b + c + d − x − y − z − u − v − w. n2 (n + 1)2 . 4 n 3 −1 . = 2 42 2. Combinatorial Tools 2.5.7 We select 38 even positive integers, all less than 1000. Prove that there will be two of them whose difference is at most 26. 2.5.8 A drawer contains 6 pairs of black, 5 pairs of white, 5 pairs of red, and 4 pairs of green socks. (a) How many single socks do we have to take out to make sure that we take out two socks with the same color? (b) How many single socks do we have to take out to make sure that we take out two socks with different colors? 3 Binomial Coefficients and Pascal's Triangle 3.1 The Binomial Theorem In Chapter 1 we introduced the numbers n and called them binomial k coefficients. It is time to explain this strange name: it comes from a very important formula in algebra involving them, which we discuss next. The issue is to compute powers of the simple algebraic expression (x+y). We start with small examples: (x + y)2 = x2 + 2xy + y 2 , (x + y)3 = (x + y) · (x + y)2 = (x + y) · (x2 + 2xy + y 2 ) = x3 + 3x2 y + 3xy 2 + y 3 , and continuing like this, (x + y)4 = (x + y) · (x + y)3 = x4 + 4x3 y + 6x2 y 2 + 4xy 3 + y 4 . These coefficients are familiar! We have seen them, e.g., in exercise 1.8.2, as the numbers n . Let us make this observation precise. We illustrate the k argument for the next value of n, namely n = 5, but it works in general. Think of expanding (x + y)5 = (x + y)(x + y)(x + y)(x + y)(x + y) so that we get rid of all parentheses. We get each term in the expansion by selecting one of the two terms in each factor, and multiplying them. If we 44 3. Binomial Coefficients and Pascal's Triangle choose x, say, 2 times, then we must choose y 3 times, and so we get x2 y 3 . How many times do we get this same term? Clearly, as many times as the number of ways to select the three factors that supply y (the remaining factors supply x). Thus we have to choose three factors out of 5, which can be done in 5 ways. 3 Hence the expansion of (x + y)5 looks like this: (x + y)5 = 5 5 5 4 5 3 2 5 2 3 5 5 5 x + x y+ x y + x y + xy 4 + y . 0 1 2 3 4 5 We can apply this argument in general to obtain the Binomial Theorem: Theorem 3.1.1 (The Binomial Theorem) The coefficient of xn−k y k in the expansion of (x + y)n is n . In other words, we have the identity k (x+y)n = n n n n−1 n n−2 2 n n n x + x x xy n−1 + y . y+ y +· · ·+ 0 1 2 n−1 n This important identity was discovered by the famous Persian poet and mathematician Omar Khayyam (1044?–1123?). Its name comes from the Greek word binome for an expression consisting of two terms, in this case, x + y. The appearance of the numbers n in this theorem is the source of k their name: binomial coefficients. The Binomial Theorem can be applied in many ways to get identities concerning binomial coefficients. For example, let us substitute x = y = 1. Then we get identity (1.9): 2n = n n n n n . + + ··· + + + n n−1 2 1 0 (3.1) Later on, we are going to see trickier applications of this idea. For the time being, another twist on it is contained in exercise (3.1.2). 3.1.1 Give a proof of the Binomial Theorem by induction, based on (1.8). 3.1.2 (a) Prove the identity n 0 − n n n 1 + n 2 − n 3 + · · · = 0. = 1, with the sign of the last term depending on (The sum ends with the parity of n.) (b) This identity is obvious if n is odd. Why? 3.1.3 Prove the identity in Exercise 3.1.2, using a combinatorial interpretation of the positive and negative terms. 3.2 Distributing Presents 45 3.2 Distributing Presents Suppose we have n different presents, which we want to distribute to k children, where for some reason, we are told how many presents each child should get. So Adam should get nAdam presents, Barbara, nBarbara presents, etc. In a mathematically convenient (though not very friendly) way, we call the children 1, 2, . . . , k; thus we are given the numbers (nonnegative integers) n1 , n2 , . . . , nk . We assume that n1 + n2 + · · · + nk = n, else there is no way to distribute all the presents and give each child the right number of them. The question is, of course, how many ways can these presents be distributed? We can organize the distribution of presents as follows. We lay out the presents in a single row of length n. The first child comes and takes the first n1 presents, starting from the left. Then the second comes and takes the next n2 ; then the third takes the next n3 presents etc. Child k gets the last nk presents. It is clear that we can determine who gets what by choosing the order in which the presents are laid out. There are n! ways to order the presents. But of course, the number n! overcounts the number of ways to distribute the presents, since many of these orderings lead to the same results (that is, every child gets the same set of presents). The question is, how many? So let us start with a given distribution of presents, and let's ask the children to lay out the presents for us, nicely in a row, starting with the first child, then continuing with the second, third, etc. This way we get back one possible ordering that leads to the current distribution. The first child can lay out his presents in n1 ! possible orders; no matter which order he chooses, the second child can lay out her presents in n2 ! possible ways, etc. So the number of ways the presents can be laid out (given the distribution of the presents to the children) is a product of factorials: n1 ! · n2 ! · · · nk ! . Thus the number of ways of distributing the presents is n! . n1 !n2 ! · · · nk ! 3.2.1 We can describe the procedure of distributing the presents as follows. First, we select n1 presents and give them to the first child. This can be done in n ways. Then we select n2 presents from the remaining n − n1 and give them n1 to the second child, etc. Complete this argument and show that it leads to the same result as the previous one. 3.2.2 The following special cases should be familiar from previous problems and theorems. Explain why. 46 3. Binomial Coefficients and Pascal's Triangle (a) n = k, n1 = n2 = · · · = nk = 1; (b) n1 = n2 = · · · = nk−1 = 1, nk = n − k + 1; (c) k = 2; (d) k = 3, n = 6, n1 = n2 = n3 = 2. FIGURE 3.1. Placing 8 nonattacking rooks on a chessboard. 3.2.3 (a) How many ways can you place n rooks on a chessboard so that no two attack each other (Figure 3.1)? We assume that the rooks are identical, so interchanging two rooks does not count as a separate placement. (b) How many ways can you do this if you have 4 wooden and 4 marble rooks? (c) How many ways can you do this if all the 8 rooks are different? 3.3 Anagrams Have you played with anagrams? One selects a word (say, COMBINATORICS) and tries to compose from its letters meaningful or, even better, funny words or expressions. How many anagrams can you build from a given word? If you try to answer this question by playing around with the letters, you will realize that the question is badly posed; it is difficult to draw the line between meaningful and nonmeaningful anagrams. For example, it could easily happen that A CROC BIT SIMON. And it may be true that Napoleon always wanted a TOMB IN CORSICA. It is questionable, but certainly grammatically correct, to assert that COB IS ROMANTIC. Some universities may have a course on MAC IN ROBOTICS. 3.3 Anagrams 47 But one would have to write a book to introduce an exciting character, ROBIN COSMICAT, who enforces a COSMIC RIOT BAN, while appealing TO COSMIC BRAIN. And it would be terribly difficult to explain an anagram like MTBIRASCIONOC. To avoid this controversy, let's accept everything; i.e., we don't require the anagram to be meaningful (or even pronounceable). Of course, the production of anagrams then becomes uninteresting; but at least we can tell how many of them there are! 3.3.1 How many anagrams can you make from the word COMBINATORICS? 3.3.2 Which word gives rise to more anagrams: COMBINATORICS or COMBINATORICA? (The latter is the Latin name of the subject.) 3.3.3 Which word with 13 letters gives rise to the most anagrams? Which word gives rise to the least? So let's see the general answer to the question of counting anagrams. If you have solved the problems above, it should be clear that the number of anagrams of an n-letter word depends on how many times letters of the word are repeated. So suppose that there are k letters A, B, C, . . . Z in the alphabet, and the word contains letter A n1 times (this could be 0), letter B, n2 times, etc., letter Z, nk times. Clearly, n1 + n2 + · · · + nk = n. Now, to form an anagram, we have to select n1 positions for letter A, n2 positions for letter B, etc., nk positions for letter Z. Having formulated it this way, we can see that this is nothing but the question of distributing n presents to k children when it is prescribed how many presents each child gets. Thus we know from the previous section that the answer is n! . n1 !n2 ! · · · nk ! 3.3.4 It is clear that STATUS and LETTER have the same number of anagrams (in fact, 6!/(2!2!) = 180). We say that these words are "essentially the same" (at least as far as counting anagrams goes): They have two letters repeated twice and two letters occurring only once. We call two words "essentially different", if they are not "essentially the same." (a) How many 6-letter words are there, if, to begin with, we consider any two words different if they are not completely identical? (As before, the words don't have to be meaningful. The alphabet has 26 letters.) (b) How many words with 6 letters are "essentially the same" as the word LETTER? (c) How many "essentially different" 6-letter words are there? (d) Try to find a general answer to question (c) (that is, how many "essentially different" words are there with n letters?). If you can't find the answer, read the following section and return to this exercise afterwards. 48 3. Binomial Coefficients and Pascal's Triangle ¢ ¢ Alice ¢ ¢ ¢ ¢ ¢ ¢ ¢ ¢ Diane ¢ ¢ Bob Carl FIGURE 3.2. How to distribute n pennies to k children? 3.4 Distributing Money Instead of distributing presents, let's distribute money. Let us formulate the question in general: We have n pennies that we want to distribute among k kids. Each child must get at least one penny (and, of course, an integer number of pennies). How many ways can we distribute the money? Before answering this question, we must clarify the difference between distributing money and distributing presents. If you are distributing presents, you have to decide not only how many presents each child gets, but also which of the different presents the child gets. If you are distributing money, only the quantity matters. In other words, presents are distinguishable while pennies are not. (A question like that in section 3.2 where we specify in advance how many presents a given child gets would be trivial for money: There is only one way to distribute n pennies so that the first child gets n1 , the second child gets n2 , etc.) Even though the problem is quite different from the distribution of presents, we can solve it by imagining a similar distribution method. We line up the pennies (it does not matter in which order; they are all alike), and then let the first child begin to pick them up from left to right. After a while we stop him and let the second child pick up pennies, etc. (Figure 3.2). The distribution of the money is determined by specifying where to start with a new child. Now, there are n − 1 points (between consecutive pennies) where we can let a new child in, and we have to select k − 1 of them (since the first child always starts at the beginning, we have no choice there). Thus we have to select a (k − 1)-element subset from an (n − 1)-element set. The number of ways of doing so is n−1 . k−1 To sum up, we have the following theorem: Theorem 3.4.1 The number of ways to distribute n identical pennies to k children so that each child gets at least one is n−1 . k−1 It is quite surprising that the binomial coefficients give the answer here, in a quite nontrivial and unexpected way! Let's also discuss the natural (though unfair) modification of this question, where we also allow distributions in which some children get no money at all; we consider even giving all the money to one child. With the follow- 3.5 Pascal's Triangle 49 ing trick, we can reduce the problem of counting such distributions to the problem we just solved: We borrow 1 penny from each child, and then distribute the whole amount (i.e., n + k pennies) to the children so that each child gets at least one penny. This way every child gets back the money we borrowed from him or her, and the lucky ones get some more. The "more" is exactly n pennies distributed to k children. We already know that the number of ways to distribute n + k pennies to k children so that each child gets at least one penny is n+k−1 . So we have the next result: k−1 Theorem 3.4.2 The number of ways to distribute n identical pennies to k children is n+k−1 . k−1 3.4.1 In how many ways can you distribute n pennies to k children if each child is supposed to get at least 2? 3.4.2 We distribute n pennies to k boys and girls in such a way that (to be really unfair) we require that each of the girls gets at least one penny (but we do not insist on the same thing for the boys). In how many ways can we do this? 3.4.3 A group of k earls are playing cards. Originally, they each have p pennies. At the end of the game, they count how much money they have. They do not borrow from each other, so that each cannot loose more than his p pennies. How many possible results are there? 3.5 Pascal's Triangle To study various properties of binomial coefficients, the following picture is very useful. We arrange all binomial coefficients into a triangular scheme: in the "zeroth" row we put 0 ; in the first row, we put 1 and 1 ; in the 0 0 1 second row, 2 , 2 , and 2 ; etc. In general, the nth row contains the num0 1 2 bers n , n , . . . , n . We shift these rows so that their midpoints match; 0 1 n this way we get a pyramidlike scheme, called Pascal's Triangle (named after the French mathematician and philosopher Blaise Pascal, 1623–1662). The figure below shows only a finite piece of Pascal's Triangle. 0 0 2 1 4 2 6 3 6 0 5 0 4 0 6 1 3 0 5 1 2 0 4 1 6 2 1 0 3 1 5 2 1 1 3 2 5 3 2 2 4 3 6 4 3 3 5 4 4 4 6 5 5 5 6 6 50 3. Binomial Coefficients and Pascal's Triangle We can replace each binomial coefficient by its numerical value to get another version of Pascal's Triangle (going a little further down, to the eighth row): 1 1 1 1 1 1 1 1 1 8 7 28 6 21 56 5 15 35 70 4 10 20 35 56 3 6 10 15 21 28 2 3 4 5 6 7 8 1 1 1 1 1 1 1 1 3.5.1 Prove that Pascal's Triangle is symmetric with respect to the vertical line through its apex. 3.5.2 Prove that each row of Pascal's Triangle starts and ends with 1. 3.6 Identities in Pascal's Triangle Looking at Pascal's Triangle, it is not hard to notice its most important property: Every number in it (other than the 1's on the boundary) is the sum of the two numbers immediately above it. This, in fact, is a property of the binomial coefficients we already met, namely, equation (1.8) in Section 1.8: n−1 n−1 n . (3.2) + = k k−1 k This property of Pascal's Triangle enables us to generate the triangle very fast, building it up row by row, using (3.2). It also gives us a tool to prove many properties of the binomial coefficients, as we shall see. As a first application, let us give a new solution to exercise 3.1.2. There the task was to prove the identity n n n n n + · · · + (−1)n − + − 3 2 1 0 n = 0, (3.3) using the Binomial Theorem. Now we give a proof based on (3.2): We can replace n by n−1 (both are just 1), n by n−1 + n−1 , n by 0 0 1 0 1 2 n−1 + n−1 , etc. Thus we get the sum 1 2 n−1 − 0 n−1 n−1 + 1 0 + n−1 n−1 + 2 1 3.6 Identities in Pascal's Triangle 51 + · · · + (−1)n−1 n−1 n−1 + n−1 n−2 + (−1)n n−1 , n−1 which is clearly 0, since the second term in each pair of brackets cancels with the first term in the next pair of brackets. This method gives more than just a new proof of an identity we already know. What do we get if we start the same way, adding and subtracting binomial coefficients alternatingly, but stop earlier? Writing this as a formula, we take n n n n n + · · · + (−1)k − + − . 3 2 1 0 k If we do the same trick as above, we get n−1 − 0 n−1 n−1 + 1 0 +(−1)k + n−1 n−1 + 2 1 . − ··· n−1 n−1 + k k−1 Here again every term cancels except the last one; so the result is (−1)k n−1 . k There are many other surprising relations satisfied by the numbers in Pascal's Triangle. For example, let's ask, what is the sum of the squares of elements in each row? Let's experiment by computing the sum of the squares of elements in the first few rows: 12 = 1, 12 + 12 = 2, 12 + 22 + 12 = 6, 12 + 32 + 32 + 12 = 20, 12 + 42 + 62 + 42 + 12 = 70. We may recognize these numbers as the numbers in the middle column of Pascal's Triangle. Of course, only every second row contains an entry in the middle column, so the last value above, the sum of squares in the fourth row is the middle element in the eighth row. So the examples above suggest the following identity: n 0 2 + n 1 2 + n 2 2 + ··· + n n−1 2 + n n 2 = 2n . n (3.4) Of course, the few experiments above do not prove that this identity always holds, so we need a proof. 52 3. Binomial Coefficients and Pascal's Triangle We will give an interpretation of both sides of the identity as the result of a counting problem; it will turn out that they count the same things, so they are equal. It is obvious what the right-hand side counts: the number of subsets of size n of a set of size 2n. It will be convenient to choose the set S = {1, 2, . . . , 2n} as our 2n-element set. The combinatorial interpretation of the left-hand side is not so easy. 2 Consider a typical term, say n . We claim that this is the number of k n-element subsets of {1, 2, . . . , 2n} that contain exactly k elements from {1, 2, . . . , n} (the first half of our set S). In fact, how do we choose such an n-element subset of S? We choose k elements from {1, 2, . . . , n} and then n − k elements from {n + 1, n + 2, . . . , 2n}. The first can be done in n k ways; no matter which k-element subset of {1, 2, . . . , n} we selected, n we have n−k ways to choose the other part. Thus the number of ways to choose an n-element subset of S having k elements from {1, 2, . . . , n} is n n · n−k k = n k 2 (by the symmetry of Pascal's Triangle). Now, to get the total number of n-element subsets of S, we have to sum these numbers for all values of k = 0, 1, . . . , n. This proves identity (3.4). 3.6.1 Give a proof of the formula (1.9), n 1 + n 2 1+ + ··· + n n−1 + n n = 2n , along the lines of the proof of (3.3). (One could expect that, as with the "alternating" sum, we could get a nice formula for the sum obtained by stopping earlier, like n + n + · · · + n . But this is not the case: No simpler expression 0 1 k is known for this sum in general.) 3.6.2 By the Binomial Theorem, the right-hand side in identity (3.4) is the coefficient of xn y n in the expansion of (x + y)2n . Write (x + y)2n in the form (x + y)n (x + y)n , expand both factors (x + y)n using the Binomial Theorem, and then try to figure out the coefficient of xn y n in the product. Show that this gives another proof of identity (3.4). 3.6.3 Prove the following identity: n 0 m k + n 1 m k−1 + ··· + n k−1 m 1 + n k m 0 = n+m . k You can use a combinatorial interpretation of both sides, as in the proof of (3.4) above, or the Binomial Theorem as in the previous exercise. 3.6 Identities in Pascal's Triangle 53 Here is another relation between the numbers in Pascal's Triangle. Let us start with the first element in the nth row, and sum the elements moving down diagonally to the right (Figure 3.3). For example, starting with the first element in the second row, we get 1 = 1, 1 + 3 = 4, 1 + 3 + 6 = 10, 1 + 3 + 6 + 10 = 20, 1 + 3 + 6 + 10 + 15 = 35. These numbers are just the numbers in the next skew line of the table! 1 1 1 1 1 1 1 1 1 8 7 28 6 21 56 5 15 35 70 4 10 20 35 56 2 3 3 6 4 10 5 15 6 21 28 7 8 1 1 1 1 1 1 1 1 FIGURE 3.3. Adding up entries in Pascal's Triangle diagonally. If we want to put this in a formula, we get n+k n+2 n+1 n + ··· + + + k 2 1 0 = n+k+1 . k (3.5) To prove this identity, we use induction on k. If k = 0, the identity just says that 1 = 1, so it is trivially true. (We can check it also for k = 1, even though this is not necessary. Anyway, it says that 1 + (n + 1) = n + 2.) So suppose that the identity (3.5) is true for a given value of k, and we want to prove that it also holds for k + 1 in place of k. In other words, we want to prove that n+k+1 n+k n+2 n+1 n + +· · ·+ + + k+1 k 2 1 0 Here the sum of the first k terms on the left-hand side is induction hypothesis, and so the left-hand side is equal to n+k+1 n+k+1 . + k+1 k But this is indeed equal to n+k+2 by the fundamental property (3.2) of k+1 Pascal's Triangle. This completes the proof by induction. = n+k+2 . k+1 by the n+k+1 k 54 3. Binomial Coefficients and Pascal's Triangle 3.6.4 Suppose that you want to choose a (k+1)-element subset of the (n+k+1)element set {1, 2, . . . , n+k +1}. You decide to do this by choosing first the largest element, then the rest. Show that counting the number of ways to choose the subset this way, you get a combinatorial proof of identity (3.5). 3.7 A Bird's-Eye View of Pascal's Triangle Let's imagine that we are looking at Pascal's Triangle from a distance. Or to put it differently, we are not interested in the exact numerical values of the entries, but rather in their order of magnitude, rise and fall, and other global properties. The first such property of Pascal's Triangle is its symmetry (with respect to the vertical line through its apex), which we already know. Another property one observes is that along any row, the entries increase until the middle, and then decrease. If n is even, there is a unique middle element in the nth row, and this is the largest; if n is odd, then there are two equal middle elements, which are largest. So let us prove that the entries increase until the middle (then they begin to decrease by the symmetry of the table). We want to compare two consecutive entries: n n . ? k+1 k If we use the formula in Theorem 1.8.1, we can write this as n(n − 1) · · · (n − k + 1) n(n − 1) · · · (n − k) ? . k(k − 1) · · · 1 (k + 1)k · · · 1 There are many common factors on both sides that are positive, and so we can simplify. We get the really simple comparison 1? Rearranging, we get n−k . k+1 n−1 . 2 n n n So if k < (n−1)/2, then k < k+1 ; if k = (n−1)/2, then n = k+1 (this k is the case of the two entries in the middle if n is odd); and if k > (n − 1)/2, n then n > k+1 . k It will be useful later that this computation also describes by how much consecutive elements increase or decrease. If we start from the left, the second entry (namely, n) is larger by a factor of n than the first; the third (namely, n(n − 1)/2) is larger by a factor of (n − 1)/2 than the second. In general, n n−k k+1 . (3.6) = n k+1 k k? 3.7 A Bird's-Eye View of Pascal's Triangle 3.7.1 For which values of n and k is Triangle? n k+1 55 twice the previous entry in Pascal's 3.7.2 Instead of the ratio, look at the difference of two consecutive entries in Pascal's Triangle: n n − . k+1 k For which value of k is this difference largest? We know that each row of Pascal's Triangle is symmetric. We also know that the entries start with 1, rise to the middle, and then fall back to 1. Can we say more about their shape? 250 200 150 100 50 10 29 0 2 4 6 8 10 0 20 40 60 80 100 FIGURE 3.4. Bar chart of the nth row of Pascal's Triangle, for n = 10 and n = 100. Figure 3.4 shows the graph of the numbers n (k = 0, 1, . . . , n) for the k values n = 10 and n = 100. We can make several further observations. — First, the largest number gets very large. — Second, not only do these numbers increase to the middle and then decrease, but the middle ones are substantially larger than those at the beginning and end. For n = 100, we see bars only in the range 100 100 100 25 , 26 , . . . , 75 ; the numbers outside this range are so small compared to the largest that they do not show in the figure. — Third, we can observe that the shape of the graph is quite similar for different values of n. Let's look more carefully at these observations. For the discussions that follow, we shall assume that n is even (for odd values of n, the results would be quite similar, except that one would have to word them differently). If 56 3. Binomial Coefficients and Pascal's Triangle n is even, then we already know that the largest entry in the nth row is n the middle number n/2 , and all other entries are smaller. How large is the largest number in the nth row of Pascal's Triangle? We know immediately an upper bound on this number: n n/2 < 2n , since 2n is the sum of all entries in the row. It only takes a little more sophistication to get a lower bound: n n/2 > 2n , n+1 since 2n /(n + 1) is the average of the numbers in the row, and the largest number is certainly at least as large as the average. n These bounds already give a pretty good idea about the size of n/2 ; in particular, they show that this number gets very large. Take, say, n = 500. Then we get 2500 500 < 2500 . < 250 501 If we want to know the number of digits of 500 , we just have to take the 250 logarithm (in base 10) of it. From the bounds above, we get 500 lg 2−lg 501 = 147.8151601 · · · < lg 500 250 < 500 lg 2 = 150.5149978 . . . . This inequality gives the number of digits with a small error: If we guess that it is 150, then we are off by at most 2 (actually, 150 is the true value). Using Stirling's formula (Theorem 2.2.1), one can get an even better approximation of this largest entry. We know that n n/2 Here, by the Stirling's formula, n! ∼ and so n n/2 ∼ √ 2πn n e n = n! . (n/2)!(n/2)! , √ 2πn (n/2)! ∼ n n e n n 2e √ πn n 2e n/2 , πn = 2 n 2 . πn (3.7) So we know that the largest entry in the nth row of Pascal's Triangle is in the middle, and we know approximately how large this element is. We also know that going either left or right, the elements begin to drop. How 3.8 An Eagle's-Eye View: Fine Details 57 fast do they drop? Figure 3.4 suggests that starting from the middle, the binomial coefficients drop just by a little at the beginning, but pretty soon this accelerates. Looking from the other end, we see this even more clearly. Let us consider, say, row 57 (just to take a non-round number for a change). The first few elements are 1, 57, 1596, 29260, 395010, 4187106, 36288252, 264385836, 1652411475, 8996462475, 43183019880, 184509266760, 707285522580, . . . and the ratios between consecutive entries are: 57, 28, 18.33, 13.5, 10.6, 8.67, 7.29, 6.25, 5.44, 4.8, 4.27, 3.83, . . . While the entries are growing fast, these ratios get smaller and smaller, and we know that when we reach the middle, they have to turn less than 1 (since the entries themselves begin to decrease). But what are these ratios? We computed them above, and found that n k+1 n k = n−k . k+1 n+1 n−k = − 1, k+1 k+1 then we see immediately that the ratio of two consecutive binomial coefficients decreases as k increases. If we write this as 3.8 An Eagle's-Eye View: Fine Details Let us ask a more quantitative question about the shape of a row in Pascal's Triangle: Which binomial coefficient in this row is (for example) half of the largest? We consider the case where n is even; then we can write n = 2m, where m is a positive integer. The largest, middle entry in the nth row is 2m . m Consider the binomial coefficient that is t steps from the middle. It does 2m not matter whether we go left or right, so take, say, m−t . We want to compare it with the largest coefficient. The following formula describes the rate at which the binomial coefficients drop: 2 2m 2m ≈ e−t /m . (3.8) m m−t The graph of right-hand side of (3.8) (as a function of t) is shown in Figure 3.5 for m = 50. This is the famous Gauss curve (sometimes also called the 58 10 29 3. Binomial Coefficients and Pascal's Triangle 10 29 0 20 40 60 80 100 2 0 20 40 60 80 100 FIGURE 3.5. The Gauss curve e−t /m for m = 50, and the chart of binomial coefficients in the 100th row of Pascal's Triangle. "bell curve"). Plotting many types of statistics gives a similar picture. In Figure 3.5 we show the curve alone and also overlaid with the binomial coefficients, to show the excellent fit. Equation (3.8) is not an exact equation, and to make it a precise mathematical statement, we need to tell how large the error can be. Below, we shall derive the following inequalities: e−t 2 /(m−t+1) ≤ 2m m−t 2m m ≤ e−t 2 /(m+t) . (3.9) The upper and lower bounds in this formula are quite similar to the 2 (imprecise) approximation e−t /m given in (3.8), and it is easy to see that the latter value is between them. The right hand side of (3.8) in fact gives a better approximation than either the upper or the lower bound. For 100 example, suppose that we want to estimate the ratio 100 40 50 , which is 0.1362 . . . . From (3.9) we get 0.08724 ≤ 100 40 100 50 ≤ 0.1889, while the approximation given in (3.8) is 0.1353 . . . , much closer to the truth. Using heavier calculus (analysis) would give tighter bounds; we give here only as much as we can without appealing to calculus. To derive (3.9), we start with transforming the ratio in the middle; or rather, we take its reciprocal, which is larger than 1 and therefore a bit easier to work with: 2m m 2m m−t = (2m)! (2m)! (m − t)!(m + t)! = m!m! (m − t)!(m + t)! m!m! (m + t)(m + t − 1) · · · (m + 1) . = m(m − 1) · · · (m − t + 1) 3.8 An Eagle's-Eye View: Fine Details 59 So we have some sort of a formula for this ratio, but how useful is it? How do we tell, for example, for which value of t this ratio becomes larger than 2? We can certainly write this as a formula: (m + t)(m + t − 1) · · · (m + 1) > 2. m(m − 1) · · · (m − t + 1) (3.10) We could try to solve this inequality for t (similar to the proof that the entries are increasing to the middle), but it would be too complicated to solve. So even to answer such a simple question about binomial coefficients like, how far from the middle do they drop to half of the maximum? needs more work, and we have to do some arithmetic trickery. We divide the first factor of the numerator by the first factor of the denominator, the second factor by the second factor etc., to get m+1 m+t m+t−1 · ··· . m m−1 m−t+1 This product is still not easy to handle, but we have met similar ones in Section 2.5! There the trick was to take the logarithm, and this works here just as well. We get ln m+t m + ln m+t−1 m−1 + · · · + ln m+1 m−t+1 . Just as in Section 2.5, we can estimate the logarithms on the left-hand side using the inequalities in Lemma 2.5.1. Let's start with deriving an upper bound. For a typical term in the sum we have ln and so ln m+t m + ln m+t−1 m+1 + · · · + ln m−1 m−t+1 t t t ≤ + + ··· + . m m−1 m−t+1 m+t−k m−k ≤ m+t−k t −1= , m−k m−k Can we bring this sum into a closed form? No, but we can use another trick from section 2.5. We replace each denominator by m − t + 1, since this is the smallest; then we increase all the fractions (except the last one, which we don't change) and get an upper bound: t t t t t t + + ··· + ≤ + + ··· + m m−1 m−t+1 m−t+1 m−t+1 m−t+1 t2 . = m−t+1 60 3. Binomial Coefficients and Pascal's Triangle Remember, this is an upper bound on the logarithm of the ratio 2n 2m m m−t ; to get an upper bound on the ratio itself, we have to apply the exponential function. Then we have another step to undo: we have to take the reciprocal, to get the lower bound in (3.9). The upper bound in (3.9) can be derived using similar steps; the details are left to the reader as an exercise 3.8.2. Let us return to our earlier question: We want to know when (for which value of t) the quotient in (3.9) will be larger than 2. We might need similar information for other numbers instead of 2, so let's try to answer the question for a general number C > 1. Thus we want to know for which value of t we get 2m 2m > C. (3.11) m−t m From (3.8) we know that the left-hand side is about et solving the equation et 2 2 /m , so we start with /m = C. The exponential function on the left looks nasty, but the good old logarithm helps again: We get t2 = ln C, m which is now easy to solve: t= √ m ln C. So we expect that if t is larger than this, than (3.11) holds. But of course we have to be aware of the fact that this is only an approximation, not a precise result! Instead of (3.8), we can use the exact inequalities (3.9) to get the following lemma: √ √ Lemma 3.8.1 If t ≥ m ln C + ln C, then (3.11) holds; if t ≤ m ln C − ln C, then (3.11) does not hold. The derivation of these conditions from (3.9) is similar to the derivation of the approximate result from (3.8) and is left to the reader as exercise 3.8.3 (difficult!). In important applications of binomial coefficients (one of which, the law of large numbers, will be discussed in Chapter 5) we also need to know a good bound on the sum of the smallest binomial coefficients, compared with the sum of all of them. Luckily, our previous observations and lemmas enable us to get an answer with some computation but without substantial new ideas. 3.8 An Eagle's-Eye View: Fine Details 61 Lemma 3.8.2 Let 0 ≤ k ≤ m and c = 2m k 2m m . Then c 2m ·2 . 2 (3.12) 2m 2m 2m + ··· + + k−1 1 0 < To digest the meaning of this, choose m = 500, and let's try to see how many binomial coefficients in the 1000th row we have to add up (starting with 1000 ) to reach 0.5% of the total. Lemma 3.8.2 tells us that if we 0 1000 < 1/100, then adding up the choose 0 ≤ k ≤ 500 so that 1000 k 500 first k binomial coefficients gives a sum less than 0.5% of the total. In turn, Lemma 3.8.1 tells us a k that will be certainly good: any k ≤ 500 − √ 500 ln 100 − ln 100 = 447.4. So the first 447 entries in the 1000th row of Pascal's Triangle make up less than 0.5% of the total sum. By the symmetry of Pascal's Triangle, the last 447 add up to another less than 0.5%. The middle 107 terms account for 99% of the total. Proof. To prove this lemma, let us write k = m − t, and compare the sum on the left-hand side of (3.12) with the sum 2m 2m 2m . + ··· + + m−1 m−t+1 m−t Let us denote the sum 2m 2m m−t + m−t+1 + · · · + We have 2m + 0 2m m−1 (3.13) + ··· + by B. 2m 1 2m m−t−1 by A, and the sum 2m m−t =c 2m m by the definition of c. This implies that 2m m−t−1 <c 2m , m−1 2m since we know that binomial coefficients drop by a larger factor from m−t 2m 2m to m−t−1 than they do from 2m to m−1 . Repeating the same argum 1 ment, we get that 2m 2m <c m−i m−t−i for every i ≥ 0. Hence it follows that the sum of any t consecutive binomial coefficients is less than c times the sum of the next t (as long as these are all on the left 2m hand side of Pascal's Triangle). Going back from m−1 , the first block of t binomial coefficients adds up to A (by the definition of A); the next block 1 In other words, using induction. 62 3. Binomial Coefficients and Pascal's Triangle of t adds up to less than cA, the next block to less than c2 A, etc. Adding up, we get that B < cA + c2 A + c3 A . . . On the right-hand side we only have to sum (m − t)/t terms, but we are generous and let the summation run to infinity! The geometric series on c the right-hand side adds up to 1−c A, so we get that B< c A. 1−c We need another inequality involving A and B, but this is easy: B+A< 1 2m 2 2 (since the sum on the left-hand side includes only the left-hand side of Pascal's Triangle, and the middle element is not even counted). From these two inequalities we get B< and hence 1+ c 1−c B< c 1 2m 2 . 1−c2 c c A< 1−c 1−c 1 2m 2 −B , 2 Multiplying by 1 − c gives that B < c 1 22m , which proves the lemma. 2 3.8.1 (a) Check that the approximation in (3.8) is always between the lower and upper bounds given in (3.9). (b) Let 2m = 100 and t = 10. By what percentage is the upper bound in (3.9) larger than the lower bound? 3.8.2 Prove the upper bound in (3.9). 3.8.3 Complete the proof of Lemma 3.8.1. Review Exercises 3.8.4 Find all values of n and k for which 3.8.5 Find the value of k for which k 99 k n k+1 =3 n k . is largest. 3.8 An Eagle's-Eye View: Fine Details 63 3.8.6 In city with a regular "chessboard" street plan, the North-South streets are called 1st Street, 2nd Street, . . . , 20th Street, and the East-West streets are called 1st Avenue, 2nd Avenue, . . . , 10th Avenue. What is the minimum number of blocks you have to walk to get from the corner of 1st Street and 1st Avenue to the corner of 20th Street and 10th Avenue? In how many ways can you get there walking this minimum number of blocks? 3.8.7 In how many ways can you read off the word MATHEMATICS from the following tables: M A T H E M A T H E M A T H E M A T H E M A T I E M A T I C M A T I C S M A T H A T H E M T H H E M A T I A A T I C I C S 3.8.8 Prove the following identities: m k=0 : : (−1)k n k = (−1)m n k=0 n−1 ; m n k k m = n n−m 2 . m 3.8.9 Prove the following inequalities: nk ≤ kk n k ≤ nk . k! 3.8.10 In how many ways can you distribute n pennies to k children if each child is supposed to get at least 5? 3.8.11 Prove that if we move straight down in Pascal's Triangle (visiting every other row), then the numbers we see are increasing. 3.8.12 Prove that 1+ n 2+ 1 n 4 + ··· + 2 n 2n−1 + n−1 n n 2 = 3n . n Try to find a combinatorial proof. 3.8.13 Suppose that you want to choose a (2k + 1)-element subset of the nelement set {1, 2, . . . , n}. You decide to do this by choosing first the middle element, then the k elements to its left, then the k elements to its right. Formulate the combinatorial identity you get from this. 64 3. Binomial Coefficients and Pascal's Triangle 3.8.14 Let n be a positive integer divisible by 3. Use Stirling's formula to find n the approximate value of n/3 . 3.8.15 Prove that n 10 ∼ n10 . 10! 4 Fibonacci Numbers 4.1 Fibonacci's Exercise In the thirteenth century, the Italian mathematician Leonardo Fibonacci studied the following (not too realistic) question: A farmer raises rabbits. Each rabbit gives birth to one rabbit when it turns 2 months old, and then to one rabbit each month thereafter. Rabbits never die, and we ignore male rabbits. How many rabbits will the farmer have in the nth month if he starts with one newborn rabbit? Leonardo Fibonacci It is easy to figure out the answer for small values of n. The farmer has 1 rabbit in the first month and 1 rabbit in the second month, since the rabbit has to be 2 months old before starting to reproduce. He has 2 rabbits during the third month, and 3 rabbits during the fourth, since his first rabbit delivered a new one after the second and one after the third. After 4 months, the second rabbit also delivers a new rabbit, so two new 66 4. Fibonacci Numbers rabbits are added. This means that the farmer will have 5 rabbits during the fifth month. It is easy to follow the multiplication of rabbits for any number of months if we notice that the number of new rabbits added each months is just the same as the number of rabbits who are at least 2 months old, i.e., who were already there in the previous month. In other words, to get the number of rabbits in the next month, we have to add the number of rabbits in the previous month to the number of rabbits in the current month. This makes it easy to compute the numbers one by one: 1, 1, 1 + 1 = 2, 2 + 1 = 3, 3 + 2 = 5, 5 + 3 = 8, 8 + 5 = 13, . . . (It is quite likely that Fibonacci did not get his question as a real applied math problem; he played with numbers, noticed that this procedure gives numbers that were new to him but nevertheless had very interesting properties—as we'll see ourselves—and then tried to think of an "application.") To write this as a formula, let us denote by Fn the number of rabbits during the nth month. Then we have, for n = 2, 3, 4, . . . , Fn+1 = Fn + Fn−1 . (4.1) We also know that F1 = 1, F2 = 1, F3 = 2, F4 = 3, F5 = 5. It is convenient to define F0 = 0; then equation (4.1) will remain valid for n = 1 as well. Using equation (4.1), we can easily determine any number of terms in this sequence of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, . . . . The numbers in this sequence are called Fibonacci numbers. We see that equation (4.1), together with the special values F0 = 0 and F1 = 1, uniquely determines the Fibonacci numbers. Thus we can consider (4.1), together with F0 = 0 and F1 = 1, as the definition of these numbers. This may seem a somewhat unusual definition: Instead of telling what Fn is (say, by a formula), we just give a rule that computes each Fibonacci number from the two previous numbers, and specify the first two values. Such a definition is called a recurrence. It is quite similar to induction in spirit (except that it is not a proof technique, but a definition method), and is sometimes also called definition by induction. 4.1.1 Why do we have to specify exactly two of the elements to begin with? Why not one or three? Before trying to say more about these numbers, let us consider another counting problem: A staircase has n steps. You walk up taking one or two at a time. How many ways can you go up? 4.1 Fibonacci's Exercise 67 For n = 1, there is only 1 way. For n = 2, you have 2 choices: take one step twice or two once. For n = 3, you have 3 choices: three single steps, or one single followed by one double, or one double followed by one single. Now stop and try to guess what the answer is in general! If you guessed that the number of ways to go up on a stair with n steps is n, you are wrong. The next case, n = 4, gives 5 possibilities (1 + 1 + 1 + 1, 2 + 1 + 1, 1 + 2 + 1, 1 + 1 + 2, 2 + 2). So instead of guessing, let's try the following strategy. Let's denote by Jn the answer. We try to figure out what Jn+1 is, assuming we know the value of Jk for 1 ≤ k ≤ n. If we start with a single step, we have Jn ways to go up the remaining n steps. If we start with a double step, we have Jn−1 ways to go up the remaining n − 1 steps. These are all the possibilities, and so Jn+1 = Jn + Jn−1 . This equation is the same as the equation we have used to compute the Fibonacci numbers Fn . Does this means that Fn = Jn ? Of course not, as we see by looking at the beginning values: for example, F3 = 2 but J3 = 3. However, it is easy to observe that all that happens is that the Jn are shifted by one: Jn = Fn+1 . This is valid for n = 1, 2, and then of course it is valid for every n, since the sequences F2 , F3 , F4 , . . . and J1 , J2 , J3 , . . . are computed by the same rule from their first two elements. 4.1.2 We have n dollars to spend. Every day we buy either a candy for 1 dollar or an ice cream for 2 dollars. In how many ways can we spend the money? 4.1.3 How many subsets does the set {1, 2, . . . , n} have that contain no two consecutive integers? 68 4. Fibonacci Numbers 4.2 Lots of Identities There are many interesting relations valid for the Fibonacci numbers. For example, what is the sum of the first n Fibonacci numbers? We have 0 = 0, 0 + 1 = 1, 0 + 1 + 1 = 2, 0 + 1 + 1 + 2 = 4, 0 + 1 + 1 + 2 + 3 = 7, 0 + 1 + 1 + 2 + 3 + 5 = 12, 0 + 1 + 1 + 2 + 3 + 5 + 8 = 20, 0 + 1 + 1 + 2 + 3 + 5 + 8 + 13 = 33. Staring at these numbers for a while, it is not hard to recognize that by adding 1 to the right-hand sides we get Fibonacci numbers; in fact, we get Fibonacci numbers two steps after the last summand. As a formula, we have F0 + F1 + F2 + · · · + Fn = Fn+2 − 1. Of course, at this point this is only a conjecture, an unproven mathematical statement we believe to be true. To prove it, we use induction on n (since the Fibonacci numbers are defined by recurrence, induction is the natural and often only proof method at hand). We have already checked the validity of the statement for n = 0 and 1. Suppose that we know that the identity holds for the sum of the first n − 1 Fibonacci numbers. Consider the sum of the first n Fibonacci numbers: F0 + F1 + · · · + Fn = (F0 + F1 + · · · + Fn−1 ) + Fn = (Fn+1 − 1) + Fn , by the induction hypothesis. But now we can use the recurrence equation for the Fibonacci numbers to get (Fn+1 − 1) + Fn = Fn+2 − 1. This completes the induction proof. 4.2.1 Prove that F3n is even. 4.2.2 Prove that F5n is divisible by 5. 4.2.3 Prove the following identities. (a) F1 + F3 + F5 + · · · + F2n−1 = F2n . (b) F0 − F1 + F2 − F3 + · · · − F2n−1 + F2n = F2n−1 − 1. 4.2 Lots of Identities 2 2 2 2 (c) F0 + F1 + F2 + · · · + Fn = Fn · Fn+1 . 2 (d) Fn−1 Fn+1 − Fn = (−1)n . 69 4.2.4 We want to extend the Fibonacci numbers in the other direction; i.e., we want to define Fn for negative values of n. We want to do this so that the basic recurrence (4.1) remain valid. So from F−1 + F0 = F1 we get F−1 = 1; then from F−2 + F−1 = F0 we get F−2 = −1, etc. How are these "Fibonacci numbers with negative indices" related to those with positive indices? Find several values, conjecture, and then prove the answer. Now we state a little more difficult identity: 2 2 Fn + Fn−1 = F2n−1 . (4.2) It is easy to check this for many values of n, and we can be convinced that it is true, but to prove it is a bit more difficult. Why is this more difficult than previous identities? Because if we want to prove it by induction (we don't really have other means at this point), then on the right-hand side we have only every other Fibonacci number, and so we don't know how to apply the recursion there. One way to fix this is to find a similar formula for F2n , and prove both of them by induction. With some luck (or deep intuition?) you can conjecture the following: (4.3) Fn+1 Fn + Fn Fn−1 = F2n . Again, it is easy to check that this holds for many small values of n. To prove (4.3), let us use the basic recurrence (4.1) twice: Fn+1 Fn + Fn Fn−1 = (Fn + Fn−1 )Fn + (Fn−1 + Fn−2 )Fn−1 2 2 = Fn + Fn−1 + (Fn Fn−1 + Fn−1 Fn−2 ) (apply (4.2) to the first term and induction to the second term) = F2n−1 + F2n−2 = F2n . The proof of (4.2) is similar: 2 2 2 Fn + Fn−1 = (Fn−1 + Fn−2 )2 + Fn−1 2 2 2 = (Fn−1 + Fn−2 ) + 2Fn−1 Fn−2 + Fn−1 2 2 = Fn−1 + Fn−2 + Fn−1 (Fn−2 + Fn−1 ) + Fn−1 Fn−2 2 2 = Fn−1 + Fn−2 + Fn Fn−1 + Fn−1 Fn−2 (apply induction to the first term and (4.3) to the second term) = F2n−3 + F2n−2 = F2n−1 . 70 4. Fibonacci Numbers Wait a minute! What kind of trickery is this? We use (4.3) in the proof of (4.2), and then (4.2) in the proof of (4.3)? Relax, the argument is OK: It is just that the two induction proofs have to go simultaneously. If we know that both (4.3) and (4.2) are true for a certain value of n, then we prove (4.2) for the next value (if you look at the proof, you can see that it uses smaller values of n only), and then use this and the induction hypothesis again to prove (4.3). This trick is called simultaneous induction, and it is a useful method to make induction more powerful. 4.2.5 Prove that the following recurrence can be used to compute Fibonacci numbers of odd index, without computing those with even index: F2n+1 = 3F2n−1 − F2n−3 . Use this identity to prove (4.2) without the trick of simultaneous induction. Give a similar proof of (4.3). 4.2.6 Mark the first entry of any row of Pascal's triangle (this is a 1). Move one step east and one step northeast, and mark the entry there. Repeat this until you get out of the triangle. Compute the sum of the entries you marked. (a) What numbers do you get if you start from different rows? First conjecture, than prove your answer. (b) Formulate this fact as an identity involving binomial coefficients. Suppose that Fibonacci's farmer starts with A newborn rabbits. At the end of the first month (when there is no natural population increase yet), he buys B −A newborn rabbits so that he has B rabbits. From here on, rabbits begin to multiply, and so he has A + B rabbits after the second month, A + 2B rabbits after the third month, etc. How many rabbits will he have after the nth month? Mathematically, we define a sequence E0 , E1 , E2 , . . . by E0 = A, E1 = B, and from then on, En+1 = En + En−1 (the rabbits multiply by the same rule of biology; just the starting numbers are different). For every two numbers A and B, we have this "modified Fibonacci sequence." How different are they from the real Fibonacci sequence? Do we have to study them separately for every choice of A and B? It turns out that the numbers En can be expressed quite easily in terms of the Fibonacci numbers Fn . To see this, let us compute a few beginning values of the sequence En (of course, the result will contain the starting 4.3 A Formula for the Fibonacci Numbers 71 values A and B as parameters). E0 = A, E1 = B, E2 = A + B, E3 = B + (A + B) = A + 2B, E4 = (A + B) + (A + 2B) = 2A + 3B, E5 = (A + 2B) + (2A + 3B) = 3A + 5B, E6 = (2A + 3B) + (3A + 5B) = 5A + 8B, E7 = (3A + 5B) + (5A + 8B) = 8A + 13B, . . . . It is easy to recognize what is going on: Each En is the sum of a multiple of A and a multiple of B, and the coefficients are ordinary Fibonacci numbers! For a formula, we can conjecture En = Fn−1 A + Fn B. (4.4) Of course, we have not proved this formula; but once we write it up, its proof is so easy (by induction on n, of course) that it is left to the reader as Exercise 4.3.10. There is an important special case of this identity: We can start with two consecutive Fibonacci numbers A = Fa and B = Fa+1 . Then the sequence En is just the Fibonacci sequence, but shifted to the left. Hence we get the following identity: (4.5) Fa+b+1 = Fa+1 Fb+1 + Fa Fb . This is a powerful identity for the Fibonacci numbers, which can be used to derive many others; some applications follow as exercises. 4.2.7 Give a proof of (4.2) and (4.3), based on (4.5). 4.2.8 Use (4.5) to prove the following generalization of Exercises 4.2.1 and 4.2.2: If n is a multiple of k, then Fn is a multiple of Fk . 4.2.9 Cut a chessboard into 4 pieces as shown in Figure 4.1 and assemble a 5 × 13 rectangle from them. Does this prove that 5 · 13 = 82 ? Where are we cheating? What does this have to do with Fibonacci numbers? 4.3 A Formula for the Fibonacci Numbers How large are the Fibonacci numbers? Is there a simple formula that expresses Fn as a function of n? An easy way out, at least for the author of a book, is to state the answer right away: Theorem 4.3.1 The Fibonacci numbers are given by the formula √ n √ n 1+ 5 1 1− 5 . − Fn = √ 2 2 5 72 4. Fibonacci Numbers 1 2 2 3 4 4 3 1 5·13 = 65 8·8 = 64 FIGURE 4.1. Proof of 64 = 65. Proof. It is straightforward to check that this formula gives the right value for n = 0, 1, and then one can prove its validity for all n by induction. 4.3.1 Prove Theorem 4.3.1 by induction on n. Do you feel cheated by this proof? You should; while it is, of course, logically correct what we did, one would like to see more: How can one arrive at such a formula? What should we try to get a similar formula if we face a similar, but different, recurrence? So let us forget Theorem 4.3.1 for a while and let us try to find a formula for Fn "from scratch." One thing we can try is to experiment. The Fibonacci numbers grow quite fast; how fast? Let's grab our calculator and compute the ratio of consecutive Fibonacci numbers: 1 2 3 5 = 1, = 2, = 1.5, = 1.666666667, 1 1 2 3 8 13 21 = 1.600000000, = 1.625000000, = 1.615384615, 5 8 13 34 55 89 = 1.619047619, = 1.617647059, = 1.618181818, 21 34 55 144 233 377 = 1.617977528, = 1.618055556, = 1.618025751. 89 144 233 It seems that the ratio of consecutive Fibonacci numbers is very close to 1.618, at least if we ignore the first few values. This suggests that the Fibonacci numbers behave like a geometric progression (for a geometric progression, the ratio of any two consecutive elements would be exactly the same). So let's see whether there is any geometric progression that satisfies the same recurrence as the Fibonacci numbers. Let Gn = c · q n be a geometric progression (c, q = 0). Then Gn+1 = Gn + Gn−1 4.3 A Formula for the Fibonacci Numbers 73 translates into c · q n+1 = c · q n + c · q n−1 , which after simplification becomes q 2 = q + 1. So both numbers c and n disappear.1 So we have a quadratic equation for q, which we can solve and get √ √ 1+ 5 1− 5 ≈ 1.618034, q2 = ≈ −0.618034. q1 = 2 2 This gives us two kinds of geometric progressions that satisfy the same recurrence as the Fibonacci numbers: √ n √ n 1+ 5 1− 5 , Gn = c Gn = c 2 2 (where c is an arbitrary constant). Unfortunately, neither Gn nor Gn gives the Fibonacci sequence: for one, G0 = G0 = c, while F0 = 0. But notice that the sequence Gn − Gn also satisfies the recurrence: Gn+1 − Gn+1 = (Gn + Gn−1 ) − (Gn + Gn−1 ) = (Gn − Gn ) + (Gn−1 − Gn−1 ) (using that Gn and Gn satisfy the recurrence). So we have matched the have first value F√ since G0 − G0 = 0. What about the next one? We√ 0, G1 − G1 = c 5. We can match this with F1 = 1 if we choose c = 1/ 5. Thus we have two sequences, Fn and Gn − Gn , that both begin with the same two numbers and satisfy the same recurrence. So we can use the same rule to compute the numbers Fn as the numbers Gn − Gn , and it follows that they must be the same: Fn = Gn − Gn . Now you can substitute for the values of Gn and Gn and see that we got the formula in the theorem! The formula we just derived gives new kind of information about the Fibonacci numbers. The first base in the exponential expression is q1 = √ (1 + 5)/2 ≈ 1.618034 > 1, while the second base q2 is between −1 and 0. Hence if n increases, then Gn will become very large, while |Gn | < 1 once 2 n ≥ 2, and in fact, Gn becomes very small. This means that √ n 1+ 5 1 , Fn ≈ Gn = √ 2 5 disappearance of c and n from the equation could be expected. The reason behind it is that if we find a sequence that satisfies Fibonacci's recurrence, then we can multiply its elements by any other real number and get another sequence that satisfies the recurrence. This means that we should not get any condition on c. Further, if we have a sequence that satisfies Fibonacci's recurrence, then starting the sequence anywhere later, it will also satisfy the recurrence. This suggests that we should not get any condition on n. 1 This 74 4. Fibonacci Numbers where the term we ignore is less than 1 if n ≥ 2 (and tends to 0 if n tends 2 to infinity); this implies that Fn is the integer nearest to Gn . √ The base τ = (1+ 5)/2 is a famous number: It is called the golden ratio, and it comes up all over mathematics; for example, it is the ratio between the diagonal and side of a regular pentagon. Another way to characterize it is the following: If b/a = τ , then (a + b)/b = τ . So if the ratio between the longer and shorter sides of a rectangle is τ , then cutting off a square, we are left with a rectangle that is similar to the original. 4.3.2 Define a sequence of integers Ln by L1 = 1, L2 = 3, and Ln+1 = Ln + Ln−1 . (These numbers are called Lucas numbers.) Show that Ln can be expressed n n in the form a · q1 + b · q2 (where q1 and q2 are the same numbers as in the proof above), and find the values of a and b. 4.3.3 Define a sequence of integers In by I0 = 0, I1 = 1, and In+1 = 4In + In−1 . (a) Find a combinatorial counting problem to which the answer is In . (b) Find a formula for In . 4.3.4 Alice claims that she knows another formula for the Fibonacci numbers: Fn = en/2−1 for n = 1, 2, . . . (where e = 2.718281828 . . . is, naturally, the base of the natural logarithm). Is she right? Review Exercises 4.3.5 In how many ways can you cover a 2 × n chessboard by dominoes? 4.3.6 How many subsets does the set {1, 2, . . . , n} have that contain no two consecutive integers if 0 and n also count as consecutive? 4.3.7 How many subsets does the set {1, 2, . . . , n} have that contain no three consecutive integers? Find a recurrence. 4.3.8 Which number is larger, 2100 or F100 ? 4.3.9 Prove the following identities: (a) F2 + F4 + F6 + · · · + F2n = F2n+1 − 1; 2 2 (b) Fn+1 − Fn = Fn−1 Fn+2 ; (c) (d) n 0 n 0 F0 + F1 + n 1 n 1 F1 + F2 + n 2 n 2 F2 + · · · + F3 + · · · + n n n n Fn = F2n ; Fn+1 = F2n+1 . 4.3.10 Prove (4.4). 4.3.11 Is it true that if Fn is a prime, then n is a prime? 4.3 A Formula for the Fibonacci Numbers 75 4.3.12 Consider a sequence of numbers b0 , b1 , b2 , . . . such that b0 = 0, b1 = 1, and b2 , b3 , . . . are defined by the recurrence bk+1 = 3bk − 2bk−1 . Find the value of bk . 4.3.13 Assume that the sequence (a0 , a1 , a2 , . . . ) satisfies the recurrence an+1 = an + 2an−1 . We know that a0 = 4 and a2 = 13. What is a5 ? 4.3.14 Recalling the Lucas numbers Ln introduced in Exercise 4.3.2, prove the following identities: (a) F2n = Fn Ln ; (b) 2Fk+n = Fk Ln + Fn Lk ; (c) 2Lk+n = 5Fk Fn + Lk Ln ; (d) L4k = L2 − 2; 2k (e) L4k+2 = L2 2k+1 + 2. 4.3.15 Prove that if n is a multiple of 4, then Fn is a multiple of 3. 4.3.16 (a) Prove that every positive integer can be written as the sum of different Fibonacci numbers. (b) Prove even more: every positive integer can be written as the sum of different Fibonacci numbers, so that no two consecutive Fibonacci numbers are used. (c) Show by an example that the representation in (a) is not unique, but also prove that the more restrictive representation in (b) is. This page intentionally left blank 5 Combinatorial Probability 5.1 Events and Probabilities Probability theory is one of the most important areas of mathematics from the point of view of applications. In this book we do not attempt to introduce even the most basic notions of probability theory; our only goal is to illustrate the importance of combinatorial results about Pascal's Triangle by explaining a key result in probability theory, the Law of Large Numbers. To do so, we have to talk a little about what probability is. If we make an observation about our world, or carry out an experiment, the outcome will always depend on chance (to a varying degree). Think of the weather, the stock market, or a medical experiment. Probability theory is a way of modeling this dependence on chance. We start with making a mental list of all possible outcomes of the experiment (or observation, which we don't need to distinguish). These possible outcomes form a set S. Perhaps the simplest experiment is tossing a coin. This has two outcomes: H (heads) and T (tails). So in this case S = {H, T }. As another example, the outcomes of throwing a die form the set S = {1, 2, 3, 4, 5, 6}. In this book we assume that the set S = {s1 , s2 , . . . , sk } of possible outcomes of our experiment is finite. The set S is often called a sample space. Every subset of S is called an event (the event that the observed outcome falls in this subset). So if we are throwing a die, the subset E = {2, 4, 6} ⊆ S can be thought of as the event that we throw an even number. Similarly, 78 5. Combinatorial Probability the subset L = {4, 5, 6} ⊆ S corresponds to the event that we throw a number larger than 3. The intersection of two subsets corresponds to the event that both events occur; for example, the subset L ∩ E = {4, 6} corresponds to the event that we throw a better-than-average number that is also even. Two events A and B (i.e., two subsets of S) are called exclusive if they never occur at the same time, i.e., A ∩ B = ∅. For example, the event O = {1, 3, 5} that the outcome of tossing a die is odd and the event E that it is even are exclusive, since E ∩ O = ∅. 5.1.1 What event does the union of two subsets corresponds to? So let S = {s1 , s2 , . . . , sk } be the set of possible outcomes of an experiment. To get a probability space we assume that each outcome si ∈ S has a "probability" P(si ) such that (a) P(si ) ≥ 0 for all si ∈ S, and (b) P(s1 ) + P(s2 ) + · · · + P(sk ) = 1. Then we call S, together with these probabilities, a probability space. For example, if we toss a "fair" coin, then P(H) = P(T ) = 1 . If the dice in our 2 example is of good quality, then we will have P(i) = 1 for every outcome i. 6 A probability space in which every outcome has the same probability is called a uniform probability space. We shall only discuss uniform spaces here, since they are the easiest to imagine and they are the best for the illustration of combinatorial methods. But you should be warned that in more complicated modeling, nonuniform probability spaces are very often needed. For example, if we are observing whether a day is rainy or not, we will have a 2-element sample space S = {RAINY, NONRAINY}, but these two will typically not have the same probability. The probability of an event A ⊆ S is defined as the sum of probabilities of outcomes in A, and is denoted by P(A). If the probability space is uniform, then the probability of A is P(A) = |A| |A| = . |S| k 5.1.2 Prove that the probability of any event is at most 1. 5.1.3 What is the probability of the event E that we throw an even number with the die? What is the probability of the event T = {3, 6} that we toss a number that is divisible by 3? 5.1.4 Prove that if A and B are exclusive, then P(A) + P(B) = P(A ∪ B). 5.1.5 Prove that for any two events A and B, P(A ∩ B) + P(A ∪ B) = P(A) + P(B). 5.2 Independent Repetition of an Experiment 79 5.2 Independent Repetition of an Experiment Let us repeat our experiment n times. We can consider this as a single big experiment, and a possible outcome of this repeated experiment is a sequence of length n, consisting of elements of S. Thus the sample space corresponding to this repeated experiment is the set S n of such sequences. Consequently, the number of outcomes of this "big" experiment is k n . We consider every sequence equally likely, which means that we consider it a uniform probability space. Thus if (a1 , a2 , . . . , an ) is an outcome of the "big" experiment, then we have P(a1 , a2 , . . . , an ) = 1 . kn As an example, consider the experiment of tossing a coin twice. Then S = {H, T } (heads, tails) for a single coin toss, and so the sample space for the two coin tosses is {HH, HT, T H, T T }. The probability of each of these outcomes is 1 . 4 This definition intends to model the situation where the outcome of each repeated experiment is independent of the previous outcomes, in the everyday sense that "there cannot possibly be any measurable influence of one experiment on the other." We cannot go here into the philosophical questions that this notion raises; all we can do is to give a mathematical definition that we can check, using examples, that it correctly expresses the informal notion above. A key notion in probability is independence of events. Informally, this means that information about one event (whether or not it occurred) does not influence the probability of the other. Formally, two events A and B are independent if P(A ∩ B) = P(A)P(B). Consider again the experiment of tossing a coin twice. Let A be the event that the first toss is heads; let B be the event that the second toss is heads. Then we have P(A) = P(HH) + P(HT ) = 1 + 1 = 1 , similarly P(B) = 1 , 4 4 2 2 and P(A ∩ B) = P(HH) = 1 = 1 · 1 . Thus A and B are independent events 4 2 2 (as they should be). As another example, suppose that we toss a coin and simultaneously throw a die. The event H that we toss heads has probability 1 . The event 2 K that we see 5 or 6 on the die has probability 1 . The event H ∩ K that 3 we see heads on the coin and 5 or 6 on the die has probability 1 , since out 6 of the 12 possible outcomes (H1, H2, H3, H4, H5, H6, T1, T2, T3, T4, T5, T6) two will have this property. So P(H ∩ K) = 1 1 1 = · = P(H) · P(E), 6 2 3 and thus the events H and K are independent. Independence of events is a mathematical notion and it does not necessarily mean that they have physically nothing to do with each other. If 80 5. Combinatorial Probability E = {2, 4, 6} is the event that the result of throwing a dice is even, and T = {3, 6} is the event that it is a multiple of 3, then the event E and the event T are independent: we have E ∩ T = {6} (the only possibility to throw a number that is even and divisible by 3 is to throw 6), and hence P(E ∩ T ) = 1 1 1 = · = P(E)P(T ). 6 2 3 5.2.1 Which pairs of the events E, O, T, L are independent? Which pairs are exclusive? 5.2.2 Show that ∅ is independent of every event. Is there any other event with this property? 5.2.3 Consider an experiment with sample space S repeated n times (n ≥ 2). Let s ∈ S. Let A be the event that the first outcome is s, and let B be the event that the last outcome is s. Prove that A and B are independent. 5.2.4 How many people do you think there are in the world who have the same birthday as their mother? How many people have the same birthday as their mother, father, and spouse? 5.3 The Law of Large Numbers In this section we study an experiment that consists of n independent coin tosses. For simplicity, assume that n is even, so that n = 2m for some integer m. Every outcome is a sequence of length n, in which each element is either H or T . A typical outcome would look like this: HHT T T HT HT T HT HHHHT HT T (for n = 20). The Law of Large Numbers says that if we toss a coin many times, the number of "heads" will be about the same as the number of "tails". How can we make this statement precise? Certainly, this will not always be true; one can be extremely lucky or unlucky, and have a winning or loosing streak of arbitrary length. Also, we can't claim that the number of heads is equal to the number of tails; only that they are very likely to be close: Flipping a coin n times, the probability that the percentage of heads is between 49% and 51% tends to 1 as n tends to ∞. The statement remains true if we replace 49% by 49.9% and 51% by 50.1%, or indeed by any two numbers strictly less 50% and larger than 50%, respectively. We can state this as a theorem, which is the simplest form of the Law of Large Numbers: 5.3 The Law of Large Numbers 81 Theorem 5.3.1 Fix an arbitrarily small positive number . If we flip a coin n times, the probability that the fraction of heads is between 0.5 − and 0.5 + tends to 1 as n tends to ∞. This theorem says, for example, that flipping a coin n times, the probability that the number of heads is between 49% and 51% is at least 0.99, if n is large enough. But how large must n be for this to hold? If n = 49 (which may sound pretty large) the number of heads can never be in this range; there are simply no integers between 49% of 49 (24.01) and 51% of 49 (24.99). How much larger does n have to be to assure that the number of heads is in this range for the majority of outcomes? This is an extremely important question in the statistical analysis of data: we want to know whether a deviation from the expected value is statistically significant. Fortunately, much more precise formulations of the Law of Large Numbers can be made; one of these we can prove relatively easily, based on what we already know about Pascal's triangle. This proof will show that the Law of Large Numbers is not a mysterious force, but a simple consequence of the properties of binomial coefficients. Theorem 5.3.2 Let 0 ≤ t ≤ m. Then the probability that out of 2m coin tosses, the number of heads is less than m − t or larger than m + t, is at 2 most e−t /(m+t) . To illustrate the power of this theorem, let's go back to our earlier question: How large should n be in order that the probability that the number of heads is between 49% and 51% is at least 0.99? We want m − t to be 49% of n = 2m, which means that t = m/50. The theorem says that the proba2 bility that the number of heads is not in this interval is at most e−t /(m+t) . The exponent here is − ( m )2 m t2 = − 50 m = − . m+t m + 50 2550 We want e−m/2550 < 0.01; taking the logarithm and solving for m, we get m ≥ 11744 suffices. (This is pretty large, but, after all, we are talking about the "Law of Large Numbers.") Observe that m is in the exponent, so that if m increases, the probability that the number of heads is outside the given interval drops very fast. For example, if m = 1,000,000, then this probability is less than 10−170 . Most likely, over the lifetime of the universe it never happens that out of a million coin tosses less than 49% or more than 51% are heads. Normally, we don't need such a degree of certainty. Suppose that we want to make a claim about the number of heads with 95% certainty, but we would like to narrow the interval into which it falls as much as possible. In other words, we want to choose the smallest possible t so that 82 5. Combinatorial Probability the probability that the number of heads is less than m − t or larger than m + t less than 0.05. By Theorem 5.3.2, this will be the case if e−t 2 /(m+t) < 0.05. (This is only a sufficient condition; if this holds, then the number of heads will be between m − t and m + t with probability at least 0.95. Using more refined formulas, we would find a slightly smaller t that works.) Taking the logarithm, we get t2 − < −2.996. m+t This leads to a quadratic inequality, which √ could solve for t; but it we should suffice for this discussion that t = 2 m + 2 satisfies it (which is easy to check). So we get an interesting special case: With probability at least 0.95, the number of heads among 2m √ √ coin tosses is between m − 2 m − 2 and m + 2 m + 2. √ If m is very large, then 2 m + 2 is much smaller than m, so we get that the number of heads is very close to m. For example, if m = 1,000,000 then √ 2 m = 2,002 ≈ 0.002m, and so it follows that with probability at least 0.95, the number of heads is within 1 of a percent of m = n/2. 5 It is time now to turn to the proof of Theorem 5.3.2. Proof. Let Ak denote the event that we toss exactly k heads. It is clear that the events Ak are mutually exclusive. It is also clear that for every outcome of the experiment, exactly one of the Ak occurs. The number of outcomes for which Ak occurs is the number of sequences of length n consisting of k heads and n − k tails. If we specify which of the n positions are heads, we are done. This can be done in n ways, so the k set Ak has n elements. Since the total number of outcomes is 2n , we get k the following: P(Ak ) = n k 2n . What is the probability that the number of heads is far from the expected, which is m = n/2; say, it is less than m − t or larger than m + t, where t is any positive integer not larger than m? Using Exercise 5.1.4, we see that the probability that this happens is 1 22m 2m 2m 2m 2m + ··· + + ··· + + m+t+1 m−t−1 1 0 + 2m 2m . + 2m 2m − 1 Now we can use Lemma 3.8.2, with k = m − t, and get that 2m 2m 2m + ··· + + m−t−1 1 0 < 22m−1 2m m−t 2m m . 5.4 The Law of Small Numbers and the Law of Very Large Numbers 83 By (3.9), this can be bounded from above by 22m−1 e−t 2 /(m+t) . By the symmetry of Pascal's triangle, we also have 2m 2m 2m + + ··· + 2m 2m − 1 m+t+1 < 22m e−t 2 /(m+t) . Hence we get that the probability that we toss either fewer than m − t or 2 more than m + t heads is less than e−t /(m+t) . This proves the theorem. 5.4 The Law of Small Numbers and the Law of Very Large Numbers There are two further statistical "laws" (half serious): the Law of Small Numbers and the Law of Very Large Numbers. The first one says that if you look at small examples, you can find many strange or interesting patterns that do not generalize to larger numbers. Small numbers exhibit only a small number of patterns, and looking at various properties of small numbers, we are bound to see coincidences. For example, "every odd number is a prime" is true for 3, 5 and 7 (and one may be tempted to say that it is also true for 1, which is even "simpler" than primes: instead of two divisors, it has only one). Of course, this fails for 9. Primes are strange (as we'll see) and in their irregular sequence, many strange patterns can be observed, which than fail if we move on to larger numbers. A dramatic example is the formula n2 −n+41. This gives a prime for n = 0, 1, . . . , 40, but for n = 41 we get 412 − 41 + 41 = 412 , which is not a prime. Fibonacci numbers are not as strange as primes: We have seen many interesting properties of them, and derived an explicit formula in Chapter 4. Still, one can make observations for the beginning of the sequence that do not remain valid if we check them far enough. For example, Exercise 4.3.4 gave a (false) formula for the Fibonacci numbers, namely en/2−1 , which was correct for the first 10 positive integers n. There are many formulas that give integer sequences, but these sequences can start only so many ways: we are bound to find different sequences that start out the same way. So the moral of the "Law of Small Numbers" is that to make a mathematical statement, or even to set up a mathematical conjecture, it is not enough to observe some pattern or rule, because you can only observe small instances and there are many coincidences for these. There is nothing wrong with making conjectures in mathematics, generalizing facts observed in special cases, but even a conjecture needs some other justification (an imprecise 84 5. Combinatorial Probability argument, or a provable special case). A theorem, of course, needs much more: an exact proof. The Law of Very Large Numbers says that strange coincidences can also be observed if we look at large sets of data. A friend of ours says, "I know two people who were both born on Christmas day. They complain that they get only one set of presents. . . . That's really strange. Are there many more people born on Christmas day than on other days?" No, this is not the explanation. The probability that a person is born on Christmas day is 1/365 (let's ignore leap years), so if you know, say, 400 people, then you can expect 1 or 2 of them to have a birthday on Christmas. Of course, you probably don't remember the birthdays of most people you know; but you are likely to remember those who complain about not getting enough presents! Would you find it strange, even spooky, if somebody had the same birthday as his/her mother, father, and spouse? But if you have solved Exercise 5.2.4, you know that we have probably about 40 or so such people in the world, and probably a couple of them in the United States. This is a fertile area for the tabloids and also for believers in the paranormal. We had better leave it at that. Review Exercises 5.4.1 We throw a die twice. What is the probability that the sum of the points is 8? 5.4.2 Choose an integer uniformly from the set {1, 2, 3, . . . , 30}. Let A be the event that it is divisible by 2; let B be the event that it is divisible by 3; let C be the event that it is divisible by 7. (a) Determine the probabilities of A, B, and C. (b) Which of the pairs (A, B), (B, C), and (A, C) are independent? 5.4.3 Let A and B be independent events. Express the probability P(A ∪ B) in terms of the probabilities of A and B. 5.4.4 We select a subset X of the set S = {1, 2, . . . , 100} randomly and uniformly (so that every subset has the same probability of being selected). What is the probability that (a) X has an even number of elements; (b) both 1 and 100 belong to X; (c) the largest element of S is 50; (d) S has at most 2 elements. 5.4 The Law of Small Numbers and the Law of Very Large Numbers 85 5.4.5 We flip a coin n times (n ≥ 1). For which values of n are the following pairs of events independent? (a) The first coin flip was heads; the number of all heads was even. (b) The first coin flip was head; the number of all heads was more than the number of tails. (c) The number of heads was even; the number of heads was more than the number of tails. This page intentionally left blank 6 Integers, Divisors, and Primes In this chapter we discuss properties of integers. This area of mathematics is called number theory, and it is a truly venerable field: Its roots go back about 2500 years, to the very beginning of Greek mathematics. One might think that after 2500 years of research, one would know essentially everything about the subject. But we shall see that this is not the case: There are very simple, natural questions that we cannot answer; and there are other simple, natural questions to which an answer has been found only in the last few years! 6.1 Divisibility of Integers We start with some very basic notions concerning integers. Let a and b be two integers. We say that a divides b, or a is a divisor of b, or b is a multiple of a (these phrases mean the same thing), if there exists an integer m such that b = am. In notation: a | b. If a is not a divisor of b, then we write a b. If a = 0, then a | b means that the ratio b/a is an integer. If a b and a > 0, then we can still divide b by a with remainder. The remainder r of the division b ÷ a is an integer that satisfies 0 ≤ r < a. If the quotient of the division with remainder is q, then we have b = aq + r. This is a very useful way of thinking about a division with remainder. You have probably seen these notions before; the following exercises should help you check whether you remember enough. 88 6. Integers, Divisors, and Primes 6.1.1 Check (using the definition) that 1 | a, −1 | a, a | a and −a | a for every integer a. 6.1.2 What does it mean for a, in more everyday terms, if (a) 2 | a; (b) 2 - a; (c) 0 | a. 6.1.3 Prove that (a) if a | b and b | c then a | c; (b) if a | b and a | c then a | b + c and a | b − c; (c) if a, b > 0 and a | b then a ≤ b; (d) if a | b and b | a then either a = b or a = −b. 6.1.4 Let r be the remainder of the division b ÷ a. Assume that c | a and c | b. Prove that c | r. 6.1.5 Assume that a | b, and a, b > 0. Let r be the remainder of the division c ÷ a, and let s be the remainder of the division c ÷ b. What is the remainder of the division s ÷ a? 6.1.6 (a) Prove that for every integer a, a − 1 | a2 − 1. a − 1 | an − 1. (b) More generally, for every integer a and positive integer n, 6.2 Primes and Their History An integer p > 1 is called a prime if it is not divisible by any integer other than 1, −1, p, and −p. Another way of saying this is that an integer p > 1 is a prime if it cannot be written as the product of two smaller positive integers. An integer n > 1 that is not a prime is called composite (the number 1 is considered neither prime nor composite). Thus 2, 3, 5, 7, 11 are primes, but 4 = 2 · 2, 6 = 2 · 3, 8 = 2 · 4, 9 = 3 · 3, 10 = 2 · 5 are not primes. Table 6.1 shows the primes up to 500. Primes have fascinated people ever since ancient times. Their sequence seems very irregular, yet on closer inspection it seems to carry a lot of hidden structure. The ancient Greeks already knew that there are infinitely many such numbers. (Not only did they know this; they proved it!) It was not easy to prove any further facts about primes. Their sequence is reasonably smooth, but it has holes and dense spots (see Figure 6.1). How large are these holes? For example, is there a prime number with any given number of digits? The answer to this question will be important for us when we discuss cryptography. The answer is in the affirmative, but this fact was not proved until the mid-nineteenth century, and many similar questions are open even today. 6.2 Primes and Their History 89 1 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 153, 171, 189, 207, 225, 243, 261, 279, 297, 315, 333, 351, 369, 387, 405, 423, 441, 459, 477, 495, 136, 154, 172, 190, 208, 226, 244, 262, 280, 298, 316, 334, 352, 370, 388, 406, 424, 442, 460, 478, 496, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 335, 336, 337, 353, 354, 355, 371, 372, 373, 389, 390, 391, 407, 408, 409, 338, 356, 374, 392, 410, 339, 357, 375, 393, 411, 340, 358, 376, 394, 412, 341, 342, 343, 344, 345, 346, 347, 348, 349, 359, 360, 361, 362, 363, 364, 365, 366, 367, 377, 378, 379, 380, 381, 382, 383, 384, 385, 395, 396, 397, 398, 399, 400, 401, 402, 403, 413, 414, 415, 416, 417, 418, 419, 420, 421, 152, 170, 188, 206, 224, 242, 260, 278, 296, 314, 332, 350, 368, 386, 404, 422, 440, 458, 476, 494, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 497, 498, 499, 500 TABLE 6.1. The primes up to 500. A new wave of developments in the theory of prime numbers came with the spread of computers. How do you decide about a positive integer n whether it is a prime? Surely, this is a finite problem (you can try out all smaller positive integers to see whether any of them is a proper divisor), but such simple methods become impractical as soon as the number of digits is more than 20 or so. It is only 25 years since much more efficient algorithms (computer programs) have existed to test whether a given integer is a prime. We will get a glimpse of these methods later. Using these methods, one can now rather easily determine about a number with 1000 digits whether it is a prime or not. If an integer larger than 1 is not itself a prime, then it can be written as a product of primes: We can write it as a product of two smaller positive integers; if one of these is not a prime, we write it as the product of two smaller integers, etc; sooner or later we must end up with only primes. The ancient Greeks also knew (and proved!) a subtler fact about this represen- 90 6. Integers, Divisors, and Primes 0 200 400 600 800 1000 FIGURE 6.1. A bar chart of primes up to 1000. tation, that it is unique. What this means is that there is no other way of writing n as a product of primes (except, of course, we can multiply the same primes in a different order). To prove this takes some sophistication (as we'll see in the next section), and to recognize the necessity of such a result was quite an accomplishment; but this is all more than 2000 years old! It is really surprising that, even today, no efficient way is known to find such a decomposition. Of course, powerful supercomputers and massively parallel systems can be used to find decompositions by brute force for fairly large numbers; the current record is around 140 digits, and the difficulty grows very fast (exponentially) with the number of digits. To find the prime decomposition of a given number with 400 digits, by any of the known methods, is way beyond the possibilities of computers in the foreseeable future. 6.3 Factorization into Primes We have seen that every integer larger than 1 that is not a prime itself can be written as a product of primes. We can even say that every positive integer can be written as a product of primes: Primes can be considered as "products with one factor," and if you wish, the integer 1 can be thought of as the "empty product." With this in mind, we can state and prove the following theorem, announced above, sometimes called the "Fundamental Theorem of Arithmetic". Theorem 6.3.1 Every positive integer can be written as the product of primes, and this factorization is unique up to the order of the prime factors. Proof. We prove this theorem by a version of induction, which is sometimes called the "minimal criminal" argument. The proof is indirect: we suppose that the assertion is false, and using this assumption, we derive a logical contradiction. 6.3 Factorization into Primes 91 So assume that there exists an integer with two different factorizations; call such an integer a "criminal." There may be many criminals, but we consider the smallest one. Being a criminal, this has at least two different factorizations: n = p1 · p2 · · · pm = q1 · q2 · · · qk . We may assume that p1 is the smallest prime occurring in these factorizations. (Indeed, if necessary, we can interchange the left-hand side and the right-hand side so that the smallest prime in any of the two factorizations occurs on the left-hand side; and then change the order of the factors on the left-hand side so that the smallest factor comes first. In the usual slang of mathematics, we say that we may assume that p1 is the smallest prime without loss of generality.) We are going to produce a smaller criminal; this will be a contradiction, since we assumed that n was the smallest one. The number p1 cannot occur among the factors qi ; otherwise, we can divide both sides by p1 and get a smaller criminal. Divide each qi by p1 with residue: qi = p1 ai + ri , where 0 ≤ ri < p1 . We know that ri = 0, since a prime cannot be a divisor of another prime. Let n = r1 r2 · · · rk . We show that n is a smaller criminal. Trivially ri < p1 < qi , and so n = r1 r2 · · · rk < q1 q2 · · · qk = n. We show that n , too, has two different factorizations into primes. One of these can be obtained from the definition n = r1 r2 · · · rk . Here the factors may not be primes, but we can break them down into products of primes, so that we end up with a decomposition of n . To get another decomposition, we observe that p1 | n . Indeed, we can write the definition of n in the form n = (q1 − a1 p1 )(q2 − a2 p1 ) · · · (qk − ak p1 ), and if we expand, then every term will be divisible by p1 . (One of the terms is q1 q2 · · · qk , which is equal to n and so divisible by p1 . All the other terms contain p1 as a factor.) Now we divide n by p1 and then continue to factor n /p1 , to get a factorization of n . But are these two factorizations different? Yes! The prime p1 occurs in the second, but it cannot occur in the first, where every prime factor is smaller than p1 . Thus we have found a smaller criminal. Since n was supposed to be the smallest among all criminals, this is a contradiction. The only way to resolve this contradiction is to conclude that there are no criminals; our "indirect assumption" was false, and no integer can have two different prime factorizations. 6.3.1 Read carefully the following "minimal criminal" argument: Assertion. Every negative integer is odd. 92 6. Integers, Divisors, and Primes Proof. Suppose, by way of contradiction, that there are negative integers that are even. Call these integers criminals, and let n be a minimal criminal. Consider the number 2n. This is smaller than n (recall that n is negative!), so it is a smaller criminal. But we assumed that n was the smallest criminal, so this is a contradiction. This assertion is obviously wrong. Where is the error in the proof? As an application of Theorem 6.3.1, we prove a fact that was known to the Pythagoreans (students of the great Greek mathematician and philosopher Pythagoras) in the sixth century B.C. √ Theorem 6.3.2 The number 2 is irrational. (A real number is irrational if it cannot be written as the ratio of two integers. For the Pythagoreans, the question arose from geometry: They wanted to know whether the diagonal of a square is "commeasurable" with its side, that is, whether there is any segment that is contained in both of them an integer number of times. The above theorem answered this question in the negative, causing a substantial turmoil in their ranks.) √ Proof. We give an indirect proof again: We suppose that 2 is rational, √ and derive a contradiction. What the indirect assumption means is that 2 √ can be written as the quotient of two positive integers: 2 = a/b. Squaring both sides and rearranging, we get 2b2 = a2 . Now consider the prime factorization of both sides, and in particular, the prime number 2 on both sides. Suppose that 2 occurs m times in the prime factorization of a and n times in the prime factorization of b. Then it occurs 2m times in the prime factorization of a2 . On the other hand, it occurs 2n times in the prime factorization of b2 , and thus it occurs 2n + 1 times in the prime factorization of 2b2 . Since 2b2 = a2 , and the prime factorization is unique, we must have 2n + 1 = 2m. But this is impossible, since 2n + 1 is √ odd but 2m is even. This contradiction proves that 2 must be irrational. 6.3.2 Are there any even primes? 6.3.3 (a) Prove that if p is a prime, a and b are integers, and p | ab, then either p | a or p | b (or both). (b) Suppose that a and b are integers and a | b. Also suppose that p is a prime and p | b but p - a. Prove that p is a divisor of the ratio b/a. 6.3.4 Prove that the prime factorization of a number n contains at most log2 n factors. 6.3.5 Let p be a prime and 1 ≤ a ≤ p − 1. Consider the numbers a, 2a, 3a, . . . , (p − 1)a. Divide each of them by p, to get residues r1 , r2 , . . . , rp−1 . Prove that every integer from 1 to p−1 occurs exactly once among these residues. [Hint: First prove that no residue can occur twice.] 6.4 On the Set of Primes 93 √ 6.3.6 Prove that if p is a prime, then p is irrational. More generally, prove √ that if n is an integer that is not a square, then n is irrational. 6.3.7 Try to formulate and prove an even more general theorem about the √ irrationality of the numbers k n. 6.4 On the Set of Primes The following theorem was known to Euclid in the third century B.C. Theorem 6.4.1 There are infinitely many primes. Proof. What we need to do is to show that for every positive integer n, there is a prime number larger than n. To this end, consider the number n! + 1, and any prime divisor p of it. We show that p > n. Again, we use an indirect proof, supposing that p ≤ n and deriving a contradiction. If p ≤ n then p | n!, since it is one of the integers whose product is n!. We also know that p | n! + 1, and so p is a divisor of the difference (n! + 1) − n! = 1. But this is impossible, and thus p must be larger than n. If we look at various charts or tables of primes, our main impression is that there is a lot of irregularity in them. For example, Figure 6.1 represents each prime up to 1000 by a bar. We see large "gaps", and then we also see primes that are very close. We can prove that these gaps get larger and larger as we consider larger and larger numbers; somewhere out there is a string of 100 consecutive composite numbers; somewhere (much farther away) there is a string of 1000 consecutive composite numbers, etc. To state this in a mathematical form: Theorem 6.4.2 For every positive integer k, there exist k consecutive composite integers. Proof. We can prove this theorem by an argument quite similar to the proof of Theorem 6.4.1. Let n = k + 1 and consider the numbers n! + 2, n! + 3, . . . , n! + n. Can any of these be a prime? The answer is no: The first number is even, since n! and 2 are both even. The second number is divisible by 3, since n! and 3 are both divisible by 3 (assuming that n > 2). In general n! + i is divisible by i, for every i = 2, 3, . . . , n. Hence these numbers cannot be primes, and so we have found n − 1 = k consecutive composite numbers. What about the opposite question, finding primes very close to each other? Since all primes except 2 are odd, the difference between two primes 94 6. Integers, Divisors, and Primes must be at least two, except for 2 and 3. Two primes whose difference is 2 are called twin primes. Thus (3, 5), (5, 7), (11, 13), (17, 19) are twin primes. Looking at the table of the primes up to 500, we find many twin primes; extensive computation shows that there are twin primes with hundreds of digits. However, it is not known whether there are infinitely many twin primes! (Almost certainly there are, but no proof of this fact has been found, in spite of the efforts of many mathematicians for over 2000 years!) Another way of turning Theorem 6.4.2 around is to ask, how large can these gaps be, relative to where they are on the number line? Could it happen that there is no prime at all with, say, 100 digits? This is again a very difficult question, but here we do know the answer. (No, this does not happen.) 25 20 15 10 5 0 20 40 60 80 100 FIGURE 6.2. The graph of π(n) from 1 to 100. One of the most important questions about primes is, how many primes are there up to a given number n? We denote the number of primes up to n by π(n). Figure 6.2 illustrates the graph of this function in the range 1 to 100, and Figure 6.3 shows the range 1 to 2000. We can see that the function grows reasonably smoothly, and that its slope decreases slowly. An exact formula for π(n) is certainly impossible to obtain. Around 1900, a powerful result called the Prime Number Theorem was proved by Hadamard and de la Vall´e Poussin. e 6.4 On the Set of Primes 95 300 250 200 150 100 50 0 400 800 1200 1600 2000 FIGURE 6.3. The graph of π(n) from 1 to 2000. Theorem 6.4.3 (The Prime Number Theorem) Let π(n) denote the number of primes among 1, 2, . . . , n. Then π(n) ∼ n . ln n (Here ln n means the "natural logarithm," i.e., to logarithm to the base e = 2.718281 . . . . Also recall that the notation means that the quotient π(n) n ln n will be arbitrarily close to 1 as n gets large.) The proof of the Prime Number Theorem is very difficult; the fact that the number of primes up to n is about n/ ln n was observed empirically in the eighteenth century, but it took more than 100 years until Hadamard and de la Vall´e Poussin proved it in 1896. e As an illustration of the use of this theorem, let us find the answer to a question that we have posed in the introduction: How many primes with (say) 200 digits are there? We get the answer by subtracting the number of primes up to 10199 from the number of primes up to 10200 . By the Prime Number Theorem, this number is about 10199 10200 − ≈ 1.95 · 10197 . 200 ln 10 199 ln 10 96 6. Integers, Divisors, and Primes This is a lot of primes! Comparing this with the total number of positive integers with 200 digits, which we know is 10200 − 10199 = 9 · 10199 , we get 9 · 10199 ≈ 460. 1.95 · 10197 Thus among the integers with 200 digits, about one in every 460 is a prime. (Warning: This argument is not precise; the main source of concern is that in the Prime Number Theorem we stated only that π(n) is close to n/ ln n if n is sufficiently large. One can say more about how large n has to be to have, say, an error less than 1 percent, but this leads to even more difficult questions, which are even today not completely resolved.) There are many other simple observations one can make by looking at tables of primes, but they tend to be very difficult, and most of them are not resolved even today, in some cases after 2,500 years of attempts. We have already mentioned the problem of twin primes. Another famous unsolved problem is Goldbach's conjecture. This states that every even integer larger than 2 can be written as the sum of two primes. Goldbach also formulated a conjecture about odd numbers: Every odd integer larger than 5 can be written as the sum of three primes. This second conjecture was essentially proved, using very deep methods, by Vinogradov in the 1930s. We said "essentially" since the proof works only for numbers that are very large, and the possibility of a finite number of exceptions remains open. Suppose that we have an integer n and want to know how soon after n we can be sure of finding a prime. For example, how small, or large, is the first prime with at least 100 digits? Our proof of the infinitude of primes gives that for every n there is a prime between n and n! + 1. This is a very week statement; it says, for example, that there is a prime between 10 and 10!+1 = 3,628,801, while of course the next prime is 11. The Russian mathematician P.L. Chebyshev proved in the mid-nineteenth century that there is always a prime between n and 2n. It has now been proved that there is always a prime between two consecutive cubes (say, between 103 = 1000 and 113 = 1331). But it is another old, famous, and still unsolved problem whether there is always a prime between two consecutive squares. (Try this out: you'll in fact find many primes. For example, between 100 = 102 and 121 = 112 we find 101, 103, 107, 109, 113. Between 1002 = 10,000 and 1012 = 10,201 we find 10,007, 10,009, 10,037, 10,039, 10,061, 10,067, 10,069, 10,079, 10,091, 10,093, 10,099, 10,103, 10,111, 10,133, 10,139, 10,141, 10,151, 10,159, 10,163, 10,169, 10,177, 10,181, 10,193.) 6.4.1 Show that among k-digit numbers, one in about every 2.3k is a prime. 6.5 Fermat's "Little" Theorem 97 Pierre de Fermat 6.5 Fermat's "Little" Theorem Primes are important because we can compose every integer from them; but it turns out that they also have many other, often surprising, properties. One of these was discovered by the French mathematician Pierre de Fermat (1601–1655), now called the "Little" Theorem of Fermat. Theorem 6.5.1 (Fermat's Theorem) If p is a prime and a is an integer, then p | ap − a. Before proving this theorem, we remark that it is often stated in the following form: If p is a prime and a is an integer not divisible by p, then p | ap−1 − 1. (6.1) The fact that these two assertions are equivalent (in the sense that if we know the truth of one, it is easy to prove the other) is left to the reader as Exercise 6.10.20. To prove Fermat's Theorem, we need a lemma, which states another divisibility property of primes (but is easier to prove): Lemma 6.5.2 If p is a prime and 0 < k < p, then p | Proof. We know by Theorem 1.8.1 that p k = p(p − 1) · · · (p − k + 1) . k(k − 1) · · · 1 p k . 98 6. Integers, Divisors, and Primes Here p divides the numerator, but not the denominator, since all factors in the denominator are smaller than p, and we know by Exercise 6.3.3(a) that if a prime p does not divide any of these factors, then it does not divide the product. Hence it follows (see Exercise 6.3.3(b)) that p is a divisor of p k . Proof [of Theorem 6.5.1]. Now we can prove Fermat's Theorem by induction on a. The assertion is trivially true if a = 0. Let a > 0, and write a = b + 1. Then ap − a = (b + 1)p − (b + 1) p p−1 p b b+1−b−1 + ··· + 1 p−1 p p−1 p b b. = (bp − b) + + ··· + 1 p−1 = bp + Here the expression bp − b in parenthesis is divisible by p by the induction hypothesis, while the other terms are divisible by p by lemma 6.5.2. It follows that ap − a is also divisible by p, which completes the induction. Let us make a remark about the history of mathematics here. Fermat is most famous for his "last" Theorem, which is the following assertion: If n > 2, then the sum of the nth powers of two positive integers is never the nth power of a positive integer. (The assumption that n > 2 is essential: There are examples of two squares whose sum is a third square. For example, 32 + 42 = 52 , or 52 + 122 = 132 . In fact, there are infinitely many such triples of squares, see Exercise 6.6.7.) Fermat claimed in a note that he had proved this, but never wrote down the proof. This statement remained perhaps the most famous unsolved problem in mathematics until 1995, when Andrew Wiles (in one part with the help of Robert Taylor) finally proved it. 6.5.1 Show by examples that neither the assertion in lemma 6.5.2 nor Fermat's "Little" Theorem remains valid if we drop the assumption that p is a prime. 6.5.2 Consider a regular p-gon, and for a fixed k (1 ≤ k ≤ p − 1), consider all k-subsets of the set of its vertices. Put all these k-subsets into a number of boxes: We put two k-subsets into the same box if they can be rotated into each other. For example, all k-subsets consisting of k consecutive vertices will belong to one and the same box. (a) Prove that if p is a prime, then each box will contain exactly p of these rotated copies. (b) Show by an example that (a) does not remain true if we drop the assumption that p is a prime. 6.6 The Euclidean Algorithm (c) Use (a) to give a new proof of Lemma 6.5.2. 99 6.5.3 Imagine numbers written in base a, with at most p digits. Put two numbers in the same box if they arise by a cyclic shift from each other. How many will be in each class? Give a new proof of Fermat's Theorem this way. 6.5.4 Give a third proof of Fermat's "Little" Theorem based on Exercise 6.3.5. [Hint: Consider the product a(2a)(3a) · · · ((p − 1)a).] 6.6 The Euclidean Algorithm So far, we have discussed several notions and results concerning integers. Now we turn our attention to the question of how to do computations in connection with these results. How do we decide whether or not a given number is a prime? How do we find the prime factorization of a number? We can do basic arithmetic—addition, subtraction, multiplication, division with remainder—efficiently, and we will not discuss this here. The key to a more advanced algorithmic number theory is an algorithm that computes the greatest common divisor of two positive integers a and b. This is defined as the largest positive integer that is a divisor of both a and b. (Since 1 is always a common divisor, and no common divisor is larger than either integer, this definition makes sense: There is always at least one common divisor, and in the set of common divisors there must be a greatest element.) The greatest common divisor of a and b is denoted by gcd(a, b). Thus gcd(1, 6) = 1, gcd(4, 6) = 2, gcd(2, 6) = 2, gcd(5, 6) = 1, gcd(3, 6) = 3, gcd(6, 6) = 6. We say that two integers are relatively prime if their greatest common divisor is 1. It will be convenient to define gcd(a, 0) = a for every a ≥ 0. A somewhat similar notion is the least common multiple of two integers, which is the least positive integer that is a multiple of both integers. It is denoted by lcm(a, b). For example, lcm(1, 6) = 6, lcm(4, 6) = 12, lcm(2, 6) = 6, lcm(5, 6) = 30, lcm(3, 6) = 6, lcm(6, 6) = 6. The greatest common divisor of two positive integers can be found quite simply by using their prime factorizations: Look at the common prime factors, raise each to the smaller of the two exponents, and take the product of these prime powers. For example, 900 = 22 · 32 · 52 and 54 = 2 · 33 , and hence gcd(900, 54) = 2 · 32 = 18. 100 6. Integers, Divisors, and Primes The trouble with this method is that it is very difficult to find the prime factorization of large integers. The algorithm to be discussed in this section will compute the greatest common divisor of two integers in a much faster way, without finding their prime factorizations. This algorithm is an important ingredient of almost all other algorithms involving computation with integers. (And, as we see it from its name, it goes back to the great Greek mathematician Euclid!) 6.6.1 Show that if a and b are positive integers with a | b, then gcd(a, b) = a. 6.6.2 (a) Prove that gcd(a, b) = gcd(a, b − a). (b) Let r be the remainder if we divide b by a. Then gcd(a, b) = gcd(a, r). 6.6.3 (a) If a is even and b is odd, then gcd(a, b) = gcd(a/2, b). (b) If both a and b are even, then gcd(a, b) = 2gcd(a/2, b/2). 6.6.4 How can you express the least common multiple of two integers if you know the prime factorization of each? 6.6.5 Suppose that you are given two integers, and you know the prime factorization of one of them. Describe a way of computing the greatest common divisor of these numbers. 6.6.6 Prove that for any two integers a and b, gcd(a, b)lcm(a, b) = ab. 6.6.7 Three integers a, b, and c form a Pythagorean triple if a2 + b2 = c2 . (a) Choose any three integers x, y, and z, and let a = 2xyz, b = x2 − y 2 z, c = x2 + y 2 z. Check that (a, b, c) is a Pythagorean triple. (b) Prove that all Pythagorean triples arise this way: If a, b, c are integers such that a2 + b2 = c2 , then there are other integers x, y, and z such that a, b, and c can be expressed by the formulas above. [Hint: First, show that the problem can be reduced to the case where gcd(a, b, c) = 1, a is even, and b, c are odd. Second, write a2 = (b − c)(b + c) and use this to argue that (b + c)/2 and b − c)/2 are squares.] Now we turn to the Euclidean Algorithm. It is based on two simple facts, already familiar as Exercises 6.6.1 and 6.6.2. Suppose that we are given two positive integers a and b, and we want to find their greatest common divisor. Here is what we do: 1. If a > b then we interchange a and b. 2. If a > 0, divide b by a, to get a remainder r. Replace b by r and return to 1. 6.6 The Euclidean Algorithm 101 3. Else (if a = 0), return b as the g.c.d. and halt. When you carry out the algorithm, especially by hand, there is no reason to interchange a and b if a < b: we can simply divide the larger number by the smaller (with remainder), and replace the larger number by the remainder if the remainder is not 0. Let us do some examples. gcd(300, 18) = gcd(12, 18) = gcd(12, 6) = 6. gcd(101, 100) = gcd(1, 100) = 1. gcd(89, 55) = gcd(34, 55) = gcd(34, 21) = gcd(13, 21) = gcd(13, 8) = gcd(5, 8) = gcd(5, 3) = gcd(2, 3) = gcd(2, 1) = 1. You can check in each case (using the prime factorization of the numbers) that the result is indeed the g.c.d. If we describe an algorithm, the first thing to worry about is whether it terminates at all. So why is the Euclidean Algorithm finite? This is easy: The numbers never increase, one of them decreases whenever step 2 is executed, and the remain nonnegative; so the whole procedure cannot last infinitely long. Then, of course, we have to make sure that our algorithm yields what we need. This is clear: Step 1 (interchanging the numbers) trivially does not change the greatest common divisor; step 3 (replacing the larger number by the remainder of a division) does not change the greatest common divisor by Exercise 6.6.2(b). And when we halt at step 2, the number returned is indeed the greatest common divisor of the two current numbers by Exercise 6.6.1. A third, and more subtle, question you should ask when designing an algorithm: How long does it take? How many steps will it make before it terminates? We can get a bound from the argument that proves finite termination: Since one or the other number decreases any time the loop of steps 1 and 2 is executed, it will certainly halt in fewer than a + b iterations. This is really not a great time bound: If we apply the Euclidean Algorithm to two numbers with 100 digits, then this bound of a + b says that it will not last longer than 2 · 10100 steps, which is an astronomical number, and therefore useless. But luckily this is only an upper bound, and a most pessimistic one at that; the examples we considered seem to show that the algorithm terminates much faster than this. But the examples also suggest that this question is quite delicate. We see that the Euclidean Algorithm may be quite different in length, depending on the numbers in question. Some of the possible observations made from these examples are contained in the following exercises. 6.6.8 Show that the Euclidean Algorithm can terminate in two steps for arbitrarily large positive integers, even if their g.c.d. is 1. 102 6. Integers, Divisors, and Primes 6.6.9 Describe the Euclidean Algorithm applied to two consecutive Fibonacci numbers. Use your description to show that the Euclidean Algorithm can take arbitrarily many steps. So what can we say about how long the Euclidean Algorithm lasts? The key to the answer is the following lemma: Lemma 6.6.1 During the execution of the Euclidean Algorithm, the product of the two current numbers drops by a factor of at least 2 in each iteration. Proof. To see that this is so, consider the step where the pair (a, b) (a < b) is replaced by the pair (r, a) (recall that r is the remainder of b when divided by a). Then we have r < a and a + r ≤ b. Hence b ≥ a + r > 2r, and so ar < 1 ab as claimed. 2 Suppose that we apply the Euclidean Algorithm to two numbers a and b and we make k steps. It follows by Lemma 6.6.1 that after the k steps, the product of the two current numbers will be at most ab/2k . Since this is a positive integer and so at least 1, we get that ab ≥ 2k , and hence k ≤ log2 (ab) = log2 a + log2 b. Thus we have proved the following. Theorem 6.6.2 The number of steps of the Euclidean Algorithm applied to two positive integers a and b is at most log2 a + log2 b. We have replaced the sum of the numbers by the sum of the logarithms of the numbers in the bound on the number of steps, which is a really substantial improvement. For example, the number of iterations in computing the g.c.d. of two 300-digit integers is less than 2 log2 10300 = 600 log2 10 < 2000. Quite a bit less than 2 · 10300 , which was our first naive estimate! Note that log2 a is less than the number of bits of a (when written in base 2), so we can say that the Euclidean Algorithm does not take more iterations than the number of bits needed to write down the numbers in base 2. The theorem above gives only an upper bound on the number of steps the Euclidean Algorithm takes; we can be much luckier. For example, when we apply the Euclidean Algorithm to two consecutive integers, it takes only one step. But sometimes, one cannot do much better. If you did exercise 6.6.9, you saw that when applied to two consecutive Fibonacci numbers Fk and Fk+1 , the Euclidean Algorithm takes k − 1 steps. On the other hand, 6.6 The Euclidean Algorithm 103 the lemma above gives the bound  √ 1 1+ 5 log2 Fk +log2 Fk+1 ≈ log2  √ 2 5 k   1 +log2  √ 5 √ 1+ 5 2 k+1   = − log2 5 + (2k + 1) log2 √ 1+ 5 2 ≈ 1.388k − 1.628, so we have overestimated the number of steps only by a factor of about 1.388, or less than 40%. Fibonacci numbers are not only good for giving examples of large numbers for which we can see how the Euclidean Algorithm works; they are also useful in obtaining an even better bound on the number of steps. We state the result as an exercise. Its content is that, in a sense, the Euclidean Algorithm is longest on two consecutive Fibonacci numbers. 6.6.10 Suppose that a < b and the Euclidean Algorithm applied to a and b takes k steps. Prove that a ≥ Fk and b ≥ Fk+1 . 6.6.11 Consider the following version of the Euclidean Algorithm to compute gcd(a, b): (1) Swap the numbers if necessary to have a ≤ b; (2) if a = 0, then return b; (3) if a = 0, then replace b by b − a and go to (1). (a) Carry out this algorithm to compute gcd(19, 2). (b) Show that the modified Euclidean Algorithm always terminates with the right answer. (c) How long does this algorithm take, in the worst case, when applied to two 100-digit integers? 6.6.12 Consider the following version of the Euclidean Algorithm to compute gcd(a, b). Start with computing the largest power of 2 dividing both a and b. If this is 2r , then divide a and b by 2r . After this "preprocessing," do the following: (1) Swap the numbers if necessary to have a ≤ b. (2) If a = 0, then check the parities of a and b; if a is even, and b is odd, then replace a by a/2; if both a and b are odd, then replace b by b − a; in each case, go to (1). (3) if a = 0, then return 2r b as the g.c.d. Now come the exercises: (a) Carry out this algorithm to compute gcd(19, 2). (b) It seems that in step (2), we ignored the case where both a and b are even. Show that this never occurs. (c) Show that the modified Euclidean Algorithm always terminates with the right answer. 104 6. Integers, Divisors, and Primes (d) Show that this algorithm, when applied to two 100-digit integers, does not take more than 1500 iterations. The Euclidean Algorithm gives much more than just the greatest common divisor of the two numbers. The main observation is that if we carry out the Euclidean Algorithm to compute the greatest common divisor of two positive integers a and b, all the numbers we produce during the computation can be written as the sum of an integer multiple of a and an integer multiple of b. As an example, let's recall the computation of gcd(300, 18): gcd(300, 18) = gcd(12, 18) = gcd(12, 6) = 6. Here the number 12 was obtained as the remainder of the division 300 ÷ 18; this means that it was obtained by subtracting from 300 the highest multiple of 18 that is smaller that 300: 12 = 300 − 16 · 18. Let's record it in this form: gcd(300, 18) = gcd(300 − 16 · 18, 18). Next, we obtained 6 by subtracting 12 from 18, which we can do so that we maintain the form of (multiple of 300)+(multiple of 18): gcd(300 − 16 · 18, 18) = gcd(300 − 16 · 18, 17 · 18 − 300). So it follows that the g.c.d. itself, namely 6, is of this form: 6 = 17 · 18 − 300. Let us prove formally that all the numbers produced by the Euclidean Algorithm for gcd(a, b) can be written as the sum of an integer multiple of a and an integer multiple of b. Suppose that this holds for two consecutive numbers we computed, so that one is a = am + bn, and the other is b = ak + bl, where m, n, k, l are integers (not necessarily positive). Then in the next step we compute (say) the remainder of b modulo a , which is a − qb = (am + bn) − q(ak + bl) = a(m − qk) + b(n − ql), which is of the right form again. In particular, we get the following: Theorem 6.6.3 Let d = gcd(a, b). Then d can be written in the form d = am + bn, where m and n are integers. As in the example worked out above, we can maintain the representation of integers in the form am+bn during the computation. This shows that the expression for d in the theorem not only exists, but is easily computable. 6.7 Congruences 105 6.7 Congruences Notation is not part of the bare logical structure of mathematics: we could denote the set of real numbers by V, or addition by #, and the meaning of mathematical results would be the same. But a good notation may be wonderfully suggestive, leading to a real conceptual breakthrough. One such important step was taken when Carl Friedrich Gauss noticed that we use the phrase "a gives the same remainder as b when divided by m" very often, and that this relation behaves quite similarly to equality. He introduced a notation for this, called congruence. FIGURE 6.4. Carl Friedrich Gauss (1777–1855). If a and b give the same remainder when divided by m (where a, b, m are integers and m > 0), then we write a ≡ b (mod m) (read: a is congruent to b modulo m). An equivalent way of saying this is that m is a divisor of b − a. The number m is called the modulus of the congruence relation. This notation suggests that we want to consider this relation as an analogue of equality. And indeed, many of the properties of equality are valid for congruences, at least if we keep the modulus m fixed. We have reflexivity, a ≡ a (mod m), symmetry, a ≡ b (mod m) =⇒ b ≡ a (mod m), 106 6. Integers, Divisors, and Primes and transitivity, a ≡ b (mod m), b ≡ c (mod m) =⇒ a ≡ c (mod m). These are trivial if we think of the congruence relation as claiming equality: namely, equality of the remainders when divided by m. We can compute with congruences just as we can with equations. If we have two congruences with the same modulus, a ≡ b (mod m) and c ≡ d (mod m), then we can add them, subtract them, and multiply them to get a + c ≡ b + d (mod m), a − c ≡ b − d (mod m), ac ≡ bd (mod m) (we'll return to division later). A useful special case of the multiplication rule is that we can multiply both sides of a congruence by the same number: if a ≡ b (mod m), then ka ≡ kb (mod m) for every integer k. These properties need to be proved, however. By hypothesis, a − b and c − d are divisible by m. To see that congruences can be added, we must verify that (a + c) − (b + d) is divisible by m. To this end, we write it in the form (a − b) + (c − d), which shows that it is the sum of two integers divisible by m and so it is also divisible by m. The proof that congruences can be subtracted is very similar, but multiplication is a bit trickier. We have to show that ac − bd is divisible by m. To this end, we write it in the form ac − bd = (a − b)c + b(c − d). Here a − b and c − d are divisible by m, and hence so are (a − b)c and b(c − d), and hence so is their sum. The congruence notation is very convenient in formulating various statements and arguments about divisibility. For example, Fermat's Theorem (Theorem 6.5.1) can be stated as follows: If p is a prime then ap ≡ a (mod p). 6.7.1 What is the largest integer m for which 12345 ≡ 54321 (mod m)? 6.7.2 Which of the following "rules" are true? (a) a ≡ b (mod c) ⇒ a + x ≡ b + x (mod c + x); (b) a ≡ b (mod c) ⇒ ax ≡ bx (mod cx). (c) (d) a ≡ b (mod c) x ≡ y (mod z) a ≡ b (mod c) x ≡ y (mod z) ⇒ a + x ≡ b + y (mod c + z); ⇒ ax ≡ by (mod cz). 6.8 Strange Numbers 6.7.3 How would you define a ≡ b (mod 0)? 107 6.7.4 (a) Find two integers a and b such that 2a ≡ 2b (mod 6), but a ≡ b (mod 6). (b) Show that if c = 0 and ac ≡ bc (mod mc), then a ≡ b (mod m). 6.7.5 Let p be a prime. Show that if x, y, u, v are integers such that x ≡ y (mod p), u, v > 0, and u ≡ y (mod p − 1), then xu ≡ y v (mod p). 6.8 Strange Numbers What is Thursday + Friday? If you don't understand the question, ask a child. He/she will tell you that it is Tuesday. (There may be some discussion as to whether the week starts with Monday or Sunday; but even if we feel it starts with Sunday, we can still say that Sunday is day 0.) Now we should not have difficulty figuring out that Wednesday · Tuesday = Saturday, Thursday2 = Tuesday, Monday − Saturday = Tuesday, etc. This way we can do arithmetic operations with the days of the week: We have introduced a new number system! In this system there are only 7 numbers, which we call Su, Mo, Tu, We, Th, Fr, Sa, and we can carry out addition, subtraction, and multiplication just as with numbers (we could call them Sleepy, Dopey, Happy, Sneezy, Grumpy, Doc, and Bashful; what is important is how the arithmetic operations work). Not only can we define these operations; they work pretty much like operations with integers. Addition and multiplication are commutative, Tu + Fr = Fr + Tu, and associative, (Mo + We) + Fr = Mo + (We + Fr), and distributive, (Mo + We) · Fr = (Mo · Fr) + (We · Fr). Subtraction is the inverse of addition: (Mo + We) − We = Mo. Sunday acts like 0: We + Su = We, and Monday acts like 1: We · Mo = We. We · Su = Su, (Mo · We) · Fr = Mo · (We · Fr), Tu · Fr = Fr · Tu, 108 6. Integers, Divisors, and Primes All this is nothing new if we think of "Monday" as 1, "Tuesday" as 2, etc., and realize that since day 8 is Monday again, we have to replace the result of any arithmetic operation by its remainder modulo 7. All the above identities express congruence relations, and are immediate from the basic properties of congruences. What about division? In some cases, this is obvious. For example, what is Sa/We? Translating to integers, this is 6/3, which is 2, i.e., Tu. Check: Tu · We = Sa. But what is Tu/We? In our more familiar number systems, this would be 2/3, which is not an integer; in fact, rational numbers were introduced precisely so that we could talk about the result of all divisions (except divisions by 0). Do we have to introduce "fractional days of the week"? It turns out that this new number system (with only 7 "numbers") is nicer! What does Tu/We mean? It is a "number" X such that X ·We = Tu. But it is easy to check that We · We = Tu; so we have (or at least it seems to make sense to say that we have) that Tu/We = We. This gives an example showing that we may be able to carry out division without introducing new "numbers" (or new days of the week), but can we always carry out the division? To see how this works, let's take another division: We/Fr, and let's try not to guess the result; instead, call it X and show that one of the days of the week must be appropriate for X. So let X = We/Fr. This means that X · Fr = We. For each day X of the week, the product X · Fr is some day of the week. The main claim is that for different days X, the products X · Fr are all different. Indeed, suppose that X · Fr = Y · Fr. Then (X − Y ) · Fr = Su (6.2) (we used here the distributive law and the fact that Sunday acts like 0). Now, Sunday is analogous to 0 also in the sense that just as the product of two nonzero numbers is nonzero, the product of two non-Sunday days is non-Sunday. (Check!) So we must have X − Y = Su, or X = Y + Su = Y . So the days X · Fr are all different, and there are seven of them, so every day of the week must occur in this form. In particular, "We" will occur. This argument works for any division, except when we try to divide by Sunday; we already know that Sunday acts like 0, and so Sunday multiplied by any day is Sunday, so we cannot divide any other day by Sunday (and the result of Su/Su is not well defined; it could be any day). Congruences introduced in Section 6.7 provide an often very convenient way to handle these strange numbers. For example, we can write (6.2) in the form (x − y) · 5 ≡ 0 (mod 7) 6.8 Strange Numbers 109 (where x and y are the numbers corresponding to the days X and Y ), and so 7 is a divisor of (x − y)5. But 5 is not divisible by 7 and neither is x − y (since these are two different nonnegative integers smaller than 7). Since 7 is a prime, this is a contradiction. This way can talk about ordinary numbers instead of the days of the week; the price we pay is that we have to use congruences instead of equality. 6.8.1 Find We/Fr; Tu/Fr; Mo/Tu; Sa/Tu. Is there anything special about the number 7 here? In a society where the week consists of 10 or 13 or 365 days, we could define addition, subtraction, and multiplication of the days of the week similarly. Let m be the number of days of the week, which in mathematical language we call the modulus. It would be impractical to introduce new names for the days of the week,1 so let's just call them 0, 1, . . . , m − 1. The overlining indicates that, for example, 2 refers not only to day 2, but also to day m + 2, day 2m + 2, etc. Addition is defined by a + b = c, where c is the remainder of a + b modulo m. Multiplication and subtraction are defined in a similar way. This way we have a new number system: It consists of only m numbers, and the basic arithmetic operations can be carried out. These operations will obey the basic laws of computation, which follows just as in the case m = 7 above. This version of arithmetic is called modular arithmetic. What about division? If you carefully read the proof that we can do division when m = 7, you see that it uses one special property of 7: that it is a prime! There is indeed a substantial difference between modular arithmetic with prime and nonprime moduli.2 In what follows, we shall restrict our attention to the case where the modulus is a prime, and to emphasize this, we will denote it by p. This number system consisting of 0, 1, . . . , p − 1, with the four operations defined as above, is called a prime field. The 2-element field. The smallest prime number is 2, and the simplest prime field has only 2 elements, 0 and 1. It is easy to give the addition and multiplication tables: + 0 1 0 0 1 1 1 0 · 0 1 0 0 0 1 0 1 (There is really only one operation here that does not follow from the general properties of 0 and 1, namely, 1 + 1 = 0. There is no need to specify 1 In 2 Plural many languages, the names of some days are derived from numbers. of "modulus." 110 6. Integers, Divisors, and Primes the subtraction table, since in this field a + b = a − b for every a and b (check!), nor the division table, since this is obvious: We cannot divide by 0, and dividing by 1 does not change the dividend.) It is inconvenient to write all these bars over the numbers, so we most often omit them. But then we have to be careful, because we must know whether 1 + 1 means 2 or 0; therefore, we change the sign of addition, and use ⊕ for the addition in the 2-element field. In this notation, the addition and multiplication tables look like this: ⊕ 0 1 0 0 1 1 1 0 · 0 1 0 0 0 1 0 1 (we did not have to introduce a new multiplication symbol, because the multiplication table for 0 and 1 is the same in the 2-element field as for ordinary numbers). This field is very small but very important, because a lot of computer science, information theory, and mathematical logic uses it: Its two elements can be interpreted as "YES–NO," "TRUE–FALSE," "SIGNAL–NO SIGNAL," etc. 6.8.2 Let 0 mean "FALSE" and 1 mean "TRUE." Let A and B be two statements (which are either true or false). Express, using the operations ⊕ and ·, the truth of "not A," "A or B," "A and B." 6.8.3 Let the modulus be 6; show by an example that division by a nonzero "number" cannot always be carried out. Generalize the example to every composite modulus. Division in modular arithmetic. Our argument that division in modular arithmetic can be carried out if the modulus is a prime was reasonably simple but it did not tell us how to carry out the division. To find the quotient by this method would involve looking at all numbers between 0 and p − 1, which was OK for p = 7, but would be quite tedious for a prime like p = 234,527 (not to mention the really huge primes used in cryptography and computer security, as we'll see). So how do we divide, say, 53 by 2 modulo 234,527? We can simplify the problem, and just ask about dividing 1 by 2 modulo 234,527. If we have that 1/2 = a, then we can get 53/2 = 53 · a, which we know how to compute. At this point the proof can be explained better in the general case. We are given a prime modulus p and an integer a (1 ≤ a ≤ p − 1), and want to find an integer x (0 ≤ x ≤ p − 1) such that ax = 1. Using the congruence notation from Section 6.7, we can write this as ax ≡ 1 (mod p). 6.8 Strange Numbers 111 The key to solving this problem is the Euclidean Algorithm. Let us compute the greatest common divisor of a and p. This sounds silly, since we know the answer right away: p is a prime and 1 ≤ a < p, so they cannot have any common divisor greater than 1, and so gcd(p, a) = 1. But recall that the Euclidean Algorithm gives more: it will provide the greatest common divisor in the form au + pv, where u ad v are integers. Thus we get au + pv = 1, which implies that au ≡ 1 (mod p). We are almost done; the only problem is that the integer u may not be between 1 and p − 1. But if x is the remainder of u modulo p, then multiplying the congruence x ≡ u (mod p) by a (recall from Section 6.7 that this is a legal operation on congruences), we get ax ≡ au ≡ 1 (mod p), and since 0 ≤ x ≤ p − 1, this solves our problem. Let us follow this algorithm on our example above, with a = 2 and p = 234,527. The Euclidean Algorithm works really simply in this case: Divide 234,527 by 2 with remainder, and the remainder is already down to 1. This gives 2 · (−117,263) + 234,527 · 1 = 1. The remainder of -117,263 modulo 234,527 is 117,264, so we get that 1/2 = 117,264. 6.8.4 Compute 1/53 modulo 234527. Once we know how to do basic arithmetic, more involved tasks like solving linear equations can be done by recalling what we would do with ordinary numbers. We illustrate this by some examples, where we use the congruence notation along with its basic properties from Section 6.7. Example 1. Consider a linear equation, say 7X + 3 = 0, where the modulus is 47 (check in the table that this is a prime!). We can rewrite this as a congruence: 7x + 3 ≡ 0 (mod 47). This second form is the more usual, so let's work with this. Just as we would do with an equation, we transform this as 7x ≡ −3 (mod 47) (6.3) 112 6. Integers, Divisors, and Primes (we could replace −3 by its remainder 44 modulo 47 if we wanted to keep numbers positive, but this is optional). Next we have to find the reciprocal of 7 modulo 47. The Euclidean Algorithm gives gcd(7, 47) = gcd(7, 5) = gcd(2, 5) = gcd(2, 1) = 1, and following the extended version we get 5 = 47 − 6 · 7, 2 = 7 − 5 = 7 − (47 − 6 · 7) = 7 · 7 − 47, 1 = 5 − 2 · 2 = (47 − 6 · 7) − 2 · (7 · 7 − 47) = 3 · 47 − 20 · 7, which shows that (−20) · 7 ≡ 1 (mod 47). So the reciprocal of 7 modulo 47 is −20 (which again we could write as 27). Now dividing both sides of (6.3) by 7, which is the same as multiplying both sides by 27, we get x ≡ 13 (mod 47). (Here we get 13 either as the remainder of (−3)(−20), or as the remainder of 44 · 27 modulo 47; the result is the same.) Example 2. Next, let us solve a system of two linear equations, with two variables. We'll make the numbers a little bigger, to see that we can cope with larger numbers too. Let the modulus be p = 127, and consider the equations 12X + 31Y = 2, 2X + 89Y = 23. We can rewrite these as congruences: 12x + 31y ≡ 2x + 89y ≡ 2 (mod 127), 23 (mod 127). (6.4) a. Eliminate a variable. How would we solve this system if these were ordinary equations? We could multiply the second equation by 6 and subtract it from the first, to eliminate the x terms. We can do this in this prime field as well, and get (31 − 6 · 89)y ≡ 2 − 6 · 23 (mod 127), or (−503)y ≡ −136 (mod 127). We can replace these negative numbers by their remainders modulo 127 to get 5y ≡ 118 (mod 127). (6.5) 6.8 Strange Numbers 113 Division. Next, we want to divide the equation by 5. This is what we discussed above: We have to use the Euclidean Algorithm. The computation of the greatest common divisor is easy: gcd(127, 5) = gcd(2, 5) = gcd(2, 1) = 1. This does not give anything new: We knew in advance that this greatest common divisor will be 1. To get more, we have to follow this computation by another one, where each number is written as an integer multiple of 127 plus an integer multiple of 5: gcd(127, 5) = gcd(127 − 25 · 5, 5) = gcd(127 − 25 · 5, (−2) · 127 + 51 · 5) = 1. This gives that (−2) · 127 + 51 · 5 = 1. Thus 5 · 51 ≡ 1 (mod 127), and so we have found the "reciprocal" of 5 modulo 127. Instead of dividing equation (6.4) by five, we multiply by its "reciprocal," 51, to get y ≡ 51 · 118 (mod 127). (6.6) Conclusion. If we evaluate the right-hand side of (6.6) and then compute its remainder modulo 127, we get that y ≡ 49 (mod 127), or in other words, Y = 49 is the solution. To get x, we have to substitute this value back into one of the original equations: 2x + 89 · 49 ≡ 23 (mod 127), whence 2x ≡ 23 − 89 · 49 ≡ 107 (mod 127). So we have to do one more division. In analogy with what we did above, we get (−63) · 2 + 127 = 1, and hence 64 · 2 ≡ 1 (mod 127). So instead of dividing by 2, we can multiply by 64, to get x ≡ 64 · 107 (mod 127). Computing the right-hand side and its remainder modulo 127, we get that x ≡ 117 (mod 127), or in other words, X = 117. Thus we have solved (6.4). Example 3. We can even solve some quadratic equations; for example, x2 − 3x + 2 ≡ 0 (mod 53). 114 6. Integers, Divisors, and Primes We can write this as (x − 1)(x − 2) ≡ 0 (mod 53). One of the factors on the left-hand side must be congruent to 0 modulo 53, whence either x ≡ 1 (mod 53) or x ≡ 2 (mod 53). Here we found a way to write the left-hand side as a product just by looking at it. What happens if we have an equation with larger numbers, say x2 + 134517x + 105536 ≡ 0 (mod 234527)? We doubt that anybody can guess a decomposition. In this case, we can try to follow the high-school procedure for solving quadratic equations. This works, but one step of it is quite difficult: taking square roots. This can be done efficiently, but the algorithm is too complicated to be included here. 6.8.5 Solve the congruence system 2x + 3y ≡ x + 4y ≡ 6.8.6 Solve the "congruence equations" (a) x2 − 2x ≡ 0 (mod 11), (b) x2 ≡ 4 (mod 23). 1 (mod 11), 4 (mod 11). 6.9 Number Theory and Combinatorics Many of the combinatorial tools that we have introduced are very useful in number theory as well. Induction is used all over the place. We show some elegant arguments based on the Pigeonhole Principle and on inclusion– exclusion. We are given n natural numbers: a1 , a2 , . . . , an . Show that we can choose a (nonempty) subset of these numbers whose sum is divisible by n. (It is possible that this subset contains all n numbers.) Solution. Consider the following n numbers: b 1 = a1 , b2 = a1 + a2 , b3 = a1 + a2 + a3 , . . . bn = a1 + a2 + a3 + · · · + an . 6.9 Number Theory and Combinatorics 115 If there is a number among these n numbers that is divisible by n, then we have found what we want. If there is none, then let us divide all the numbers b1 , b2 , . . . , bn by n with residue. Write down these residues. What are the numbers we were getting? It could be 1, 2, . . . , or n − 1. But we have a total of n numbers! So by the pigeonhole principle, there will be two numbers among b1 , b2 , . . . , bn that give the same residue when we divide them by n. Say these two numbers are bi and bj (i < j). Then their difference bj − bi is divisible by n. But bj − bi = ai+1 + ai+2 + · · · + aj . So we have found a special subset of the numbers a1 , a2 , . . . , an , namely ai+1 , ai+2 , . . . , aj , whose sum is divisible by n. And this is what we wanted to prove. 6.9.1 We are given n numbers from the set {1, 2, . . . , 2n − 1}. Prove that we can always find two numbers among these n numbers that are relatively prime to each other. As a very important application of inclusion–exclusion, let's answer the following question about numbers: How many numbers are there up to 1200 that are relatively prime to 1200? Since we know the prime factorization of 1200,namely, 1200 = 24 · 3 · 52 , we know that the numbers divisible by any of 2, 3, or 5 are precisely those that have a common divisor with 1200. So we are interested in counting the positive integers smaller than 1200 and not divisible by 2, 3, or 5. One can easily compute that up to 1200, there are 1200 numbers divisible by 2 2 (every second number is even), 1200 numbers divisible by 3, 3 1200 numbers divisible by 5. 5 Those numbers divisible by both 2 and 3 are just those that are divisible by 6. Therefore up to 1200 there are 1200 numbers divisible by 2 and 3, 6 and similarly, there are 1200 numbers divisible by 2 and 5, 10 1200 numbers divisible by 3 and 5. 15 116 6. Integers, Divisors, and Primes Finally, the numbers divisible by all of 2, 3, 5 are precisely those that are divisible by 30; so there are 1200 numbers divisible by all of 2, 3, 5. 30 Now with these data, we can use inclusion–exclusion to compute the number we are looking for: 1200 − 1200 1200 1200 + + 2 3 5 + 1200 1200 1200 1200 + + − = 320. 2·3 2·5 3·5 2·3·5 If we pull out 1200 from the left-hand side of the above equality, what remains can be transformed into a nice product form (check the calculations!): 1200 · 1 − 1 1 1 1 1 1 1 − − + + + − 2 3 5 2·3 2·5 3·5 2·3·5 1 2 · 1− 1 3 · 1− 1 5 . = 1200 · 1 − Let n be a natural number. We denote by φ(n) the number of those numbers that are not larger than n and are relatively prime to n (we used here "not larger," instead of "smaller," which has significance only if n = 1, since this is the only case when the number itself is relative prime to itself; so φ(1) = 1). Primes, of course, have the most numbers relatively prime to them: If p is a prime, then every smaller positive integer is counted in φ(p), so φ(p) = p − 1. In general, the number φ(n) can be computed as we did in the concrete case above: if p1 , p2 , . . . , pr are the different prime factors of n, then φ(n) = n · 1 − 1 p1 · 1− 1 p2 ··· 1 − 1 pr . (6.7) The proof follows the calculations above, and is given as Exercise 6.9.2. 6.9.2 Prove (6.7). 6.9.3 Let n be a natural number. We compute φ(d) of every divisor d of n, then add up all these numbers. What is the sum? (Experiment, formulate a conjecture, and prove it.) 6.9.4 We add up all the positive integers smaller than n and relatively prime to n. What do we get? 6.9.5 Prove the following extension of Fermat's Theorem: If gcd(a, b) = 1, then aφ(b) − 1 is divisible by b. [Hint: Generalize the proof of Fermat's Theorem in Exercise 6.5.4.] 6.10 How to Test Whether a Number is a Prime? 117 6.10 How to Test Whether a Number is a Prime? Is 123,456 a prime? Of course not, it is even. Is 1,234,567 a prime? This is not so easy to answer, but if you are hard pressed, you can try all numbers 2, 3, 4, 5 . . . to see if they are divisors. If you have the patience to go up to 127, then you are done: 1234567 = 127 · 9721. What about 1,234,577? Again you can try to find a divisor by trying out 2, 3, 4, 5, . . . . But this time you don't find a proper divisor! Still, if you are really patient and keep on until you get to the square root of 1234577, which is 1111.1 . . . , you know that you are not going to find a proper divisor (why?). Now what about the number 1,111,222,233,334,444,555,566,667,777,888,899,967? If this is a prime (as it is), then we have to to try out all numbers up to its square root; since the number is larger than 1036 , its square root is larger than 1018 . Trying out more than 1018 numbers is a hopeless task even for the world's most powerful computer. The Fermat test. So how do we know that this number is a prime? Well, our computer tells us, but how does the computer know? An approach is offered by Fermat's Theorem. Its simplest nontrivial case says that if p is a prime, then p | 2p − 2. If we assume that p is odd (which only excludes the case p = 2), then we also know that p | 2p−1 − 1. What happens if we check the divisibility relation n | 2n−1 − 1 for composite numbers? It obviously fails if n is even (no even number is a divisor of an odd number), so let's restrict our attention to odd numbers. Here are some results: 9 28 − 1 = 255, 15 214 − 1 = 16,383, 21 220 − 1 = 1,048,575, 25 224 − 1 = 16,777,215. This suggests that perhaps we could test whether the number n is a prime by checking whether the relation n | 2n−1 − 1 holds. This is a nice idea, but it has several major shortcomings. How to compute LARGE powers. It is easy to write up the formula 2n−1 − 1, but it is quite a different matter to compute it! It seems that to get 2n−1 , we have to multiply by 2 n − 2 times. For a 100-digit number n, this is about 10100 steps, which we will never be able to carry out. But we can be tricky when we compute 2n−1 . Let us illustrate this on the example of 224 : We could start with 23 = 8, square it to get 26 = 62, square it again to get 212 = 4096, and square it once more to get 224 = 16,777,216. Instead of 23 multiplications, we needed only 5. It seems that this trick worked only because 24 was divisible by such a large power of 2, and so we could compute 224 by repeated squaring, 118 6. Integers, Divisors, and Primes starting from a small number. Let us show how to do a similar trick if the exponent is a less friendly integer, say 29. Here is a way compute 229 : 22 = 4, 23 = 8, 26 = 64, 27 = 128, 214 = 16,384, 228 = 268,435,456, 229 = 536,870,912. It is perhaps best to read this sequence backwards: If we have to compute an odd power of 2, we obtain it by multiplying the previous power by 2; if we have to compute an even power, we obtain it by squaring the appropriate smaller power. 6.10.1 Show that if n has k bits in base 2, then 2n can be computed using fewer than 2k multiplications. How to avoid LARGE numbers. We have shown how to overcome the first difficulty; but the computations above reveal the second: the numbers grow too large! Let's say that n has 100 digits; then not only is 2n−1 astronomical, the number of its digits is astronomical! We could never write it down, let alone check whether it is divisible by n. The way out is to divide by n as soon as we get any number that is larger than n, and just work with the remainder of the division (or we could say we work in modular arithmetic with modulus n; we won't have to do divisions, so n does not have to be a prime). For example, if we want to check whether 25 | 224 − 1, then we have to compute 224 . As above, we start with computing 23 = 8, then square it to get 26 = 64. We immediately replace it by the remainder of the division 64 ÷ 25, which is 14. Then we compute 212 by squaring 26 , but instead we square 14 to get 196, which we replace by the remainder of the division 196 ÷ 25, which is 21. Finally, we obtain 224 by squaring 212 , but instead we square 21 to get 441, and then divide this by 25 to get the remainder 16. Since 16 − 1 = 15 is not divisible by 25, it follows that 25 is not a prime. This does not sound like an impressive conclusion, considering the triviality of the result, but this was only an illustration. If n has k bits in base 2, then as we have seen, it takes only 2k multiplications to compute 2n , and all we have to do is one division (with remainder) in each step to keep the numbers small. We never have to deal with numbers larger than n2 . If n has 100 digits, then n2 has 199 or 200; not much fun to multiply by hand, but quite easily manageable by computers. Pseudoprimes. But here comes the third shortcoming of the primality test based on Fermat's Theorem. Suppose that we carry out the test for a number n. If it fails (that is, n is not a divisor of 2n−1 − 1), then of course we know that n is not a prime. But suppose we find that n | 2n−1 − 1. Can we conclude that n is a prime? Fermat's Theorem certainly does not justify this conclusion. Are there composite numbers n for which n | 2n−1 − 1? 6.10 How to Test Whether a Number is a Prime? 119 Unfortunately, the answer is yes. The smallest such number is 341 = 11·31. This is not a prime, but it satisfies 341 | 2340 − 1. (6.8) (How do we know that this divisibility relation holds without extensive computation? We can use Fermat's Theorem. It is sufficient to argue that both 11 and 31 are divisors of 2340 − 1, since then so is their product, 11 and 31 being different primes. By Fermat's Theorem, 11 | 210 − 1. Next we invoke the result of Exercise 6.1.6: It implies that 210 − 1 | 2340 − 1. Hence 11 | 2340 − 1. For 31, we don't need Fermat's Theorem, but only exercise (6.1.6) again: 31 = 25 − 1 | 2340 − 1. This proves (6.8).) Such numbers, which are not primes but behave like primes in the sense that Fermat's Theorem with base a = 3 holds true for them, are called pseudoprimes (fake primes), or more precisely, pseudoprimes to base 2. While such numbers are quite rare (there are only 22 pseudoprimes to base 2 between 1 and 10,000), they do show that our primality test can give a "false positive," and thus (in a strict mathematical sense) it is not a primality test at all. (If we can afford to make an error every now and then, then we can live with the simple Fermat test with base 2. If the worst that can happen when a composite number is believed to be a prime is that a computer game crashes, we can risk this; if the security of a bank, or a country, depends on not using a fake prime, we have to find something better.) One idea that comes to the rescue is that we haven't used the full force of Fermat's Theorem: We can also check that n | 3n − 3, n | 5n − 5, etc. These tests can be carried out using the same tricks as described above. And in fact, already the first of these tests rules out the "fake prime" 341: it is not a divisor of 3340 − 1. The following observation tells us that this always works, at least if we are patient enough: A positive integer n > 1 is a prime if and only if it passes the Fermat test n | an−1 − 1 for every base a = 1, 2, 3, . . . , n − 1. 120 6. Integers, Divisors, and Primes Fermat's Theorem tells us that primes do pass the Fermat test for every base. On the other hand, if n is composite, then there are numbers a, 1 ≤ a ≤ n − 1, that are not relatively prime to n, and every such a will fail the Fermat test: Indeed, if p is a common prime divisor of a and n, then p is a divisor of an−1 , so it cannot be a divisor of an−1 − 1, and hence n cannot be a divisor of an−1 − 1. But this general Fermat test is not efficient enough. Imagine that we are given a natural number n, with a few hundred digits, and we want to test whether or not it is a prime. We can carry out the Fermat test with base 2. Suppose it passes. Then we can try base 3. Suppose it passes again, etc. How long do we have to go before we can conclude that n is a prime? Looking at the argument above justifying the general Fermat test, we see that we don't have to go farther than the first number having a common divisor with n. It is easy to see that the smallest such number is the least prime divisor of n. For example, if n = pq, where p and q are distinct primes, having say 100 digits each (so n has 199 or 200 digits), then we have to try everything up to the smaller of p and q, which is more than 1099 trials, which is hopelessly large. (And furthermore, if we go this far anyway, we may do a simple divisibility test, no need for anything fancy like Fermat's Theorem!) Instead of starting with 2, we could start checking whether Fermat's Theorem holds with any other base a; for example, we could choose a random integer a in the range 1 ≤ a ≤ n − 1. We know that it fails if we hit any a that is not relatively prime to n. Does this give us a good chance of discovering that n is not a prime if in fact it is not? This depends on n, but certain values of n are definitely bad. For example, suppose that n = pq where p and q are different primes. It is easy to list those numbers a that are not relatively prime to n: these are the multiples of p (p, 2p, . . . , (q −1)p, qp) and the multiples of q (q, 2q, . . . , (p − 1)q, pq). The total number of such numbers a is q + p − 1 (since pq = n occurs on both lists). This number is larger than 2 · 1099 , but less than 2 · 10100 , and so the probability that we hit one of these number when we choose a random a is less than 2 · 10100 = 2 · 10−99 , 10199 which shows that this event has way too small a probability to ever happen in practice. Carmichael numbers. Our next hope is that perhaps for a composite number n, the Fermat test will fail much earlier than its smallest prime divisor, or else for a random choice of a it will fail for many other numbers besides those not relatively prime to n. Unfortunately, this is not always so. There are integers n, called Carmichael numbers, which are even worse than pseudoprimes: They pass the Fermat test for every base a relatively 6.10 How to Test Whether a Number is a Prime? 121 prime to n. In other words, they satisfy n | an−1 − 1 for every a such that gcd(n, a) = 1. The smallest such number is n = 561. While such numbers are very rare, they do show that the Fermat test is not completely satisfactory. The Miller–Rabin test. But in the late 1970's, M. Rabin and G. Miller found a very simple way to strengthen Fermat Theorem just a little bit, and thereby overcome the difficulty caused by Carmichael numbers. We illustrate the method on the example of 561. We use some high-school math, namely, the identity x2 − 1 = (x − 1)(x + 1), to factor the number a560 − 1: a560 − 1 = a280 − 1 a280 + 1 = a140 − 1 a140 + 1 a280 + 1 = a70 − 1 a70 + 1 a140 + 1 a280 + 1 = a35 − 1 a35 + 1 a70 + 1 a140 + 1 a280 + 1 . Now suppose that 561 were a prime. Then by Fermat's "Little" Theorem, it would have to divide a560 − 1 for every 1 ≤ a ≤ 560. If a prime divides a product, it divides one of the factors (exercise 6.3.3), and hence at least one of the relations 561 | a35 − 1 561 | a35 + 1 561 | a70 + 1 561 | a140 + 1 561 | a280 + 1 must hold. But already for a = 2, none of these relations hold. The Miller–Rabin test is an elaboration of this idea. Given an odd integer n > 1 that we want to test for primality, we choose an integer a from the range 0 ≤ a ≤ n − 1 at random, and consider an − a. We factor it as a(an−1 − 1), and then go on to factor it, using the identity x2 − 1 = (x − 1)(x + 1), as long as we can. Then we test that one of the factors must be divisible by n. If the test fails, we can be sure that n is not a prime. But what happens if it succeeds? Unfortunately, this can still happen even if n is composite; but the crucial point is that this test gives a false positive with probability less than 1 (remember that we chose a random a). 2 Reaching a wrong conclusion half of the time does not sound so good at all; but we can repeat the experiment several times. If we repeat it 10 times (with a new randomly chosen a each time), the probability of a false positive is less than 2−10 < 1/1000 (since to conclude that n is prime, all 10 runs must give a false positive, independently of each other). If we repeat the experiment 100 times, the probability of a false positive drops below 2−100 < 10−30 , which is astronomically small. 122 6. Integers, Divisors, and Primes So this algorithm, when repeated sufficiently often, tests primality with error probability that is much less than the probability of, say, hardware failure, and therefore it is quite adequate for practical purposes. It is widely used in programs like Maple and Mathematica and in cryptography. Suppose that we test a number n for primality and find that it is composite. Then we would like to find its prime factorization. It is easy to see that instead of this, we could ask for less: for a decomposition of n into the product of two smaller positive integers, n = ab. If we have a method to find such a decomposition efficiently, then we can go on and test a and b for primality. If they are primes, we have found the prime factorization of n; if (say) a is not a prime, we can use our method to find a decomposition of a into the product of two smaller integers, etc. Since n has at most log2 n prime factors (Exercise 6.3.4), we have to repeat this at most log2 n times (which is less than the number of its bits). But unfortunately (or fortunately? see Chapter 15 on cryptography), no efficient method is known to write a composite number as a product of two smaller integers. It would be very important to find an efficient factorization method, or to give a mathematical proof that no such method exists; but we don't know what the answer is. 6.10.2 Show that 561 is a Carmicheal number; more exactly, show that 561 | a561 − a for every integer a. [Hint: Since 561 = 3 · 11 · 17, it suffices to prove that 3 | a561 − a, 11 | a561 − 1 and 17 | a561 − a. Prove these relations separately, using the method of the proof of the fact that 341 | 2340 − 1.] Review Exercises 6.10.3 Prove that if c = 0 and ac | bc, then a | b. 6.10.4 Prove that if a | b and a | c, then a | b2 + 3c + 2b c. 6.10.5 Prove that every prime larger than 3 gives a remainder of 1 or −1 if divided by 6. 6.10.6 Let a > 1, and k, n > 0. Prove that ak − 1 | an − 1 if and only if k | n. 6.10.7 Prove that if a > 3, then a, a + 2, and a + 4 cannot be all primes. Can they all be powers of primes? 6.10.8 How many integers are there that are not divisible by any prime larger than 20 and not divisible by the square of any prime? 6.10.9 Find the prime factorization of (a) 20 10 ; (b) 20!. 6.10 How to Test Whether a Number is a Prime? 123 6.10.10 Show that a number with 30 digits cannot have more than 100 prime factors. 6.10.11 Show that a number with 160 digits has a prime power divisor that is at least 100. This is not true if we want a prime divisor that is at least 100. 6.10.12 Find the number of (positive) divisors of n, for 1 ≤ n ≤ 20 (example: 6 has 4 divisors: 1, 2, 3, 6). Which of these numbers have an odd number of divisors? Formulate a conjecture and prove it. 6.10.13 Find the g.c.d. of 100 and 254, using the Euclidean Algorithm. 6.10.14 Find pairs of integers for which the Euclidean Algorithm lasts (a) 2 steps; (b) 6 steps. 6.10.15 Recalling the Lucas numbers Ln introduced in Exercise 4.3.2, prove the following: (a) gcd(F3k , L3k ) = 2; (b) if n is not a multiple of 3, then gcd(Fn , Ln ) = 1; (c) L6k ≡ 2 (mod 4). 6.10.16 Prove that for every positive integer m there is a Fibonacci number divisible by m (well, of course, F0 = 0 is divisible by any m; we mean a larger one). 6.10.17 Find integers x and y such that 25x + 41y = 1. 6.10.18 Find integers x and y such that 2x + y ≡ 4 (mod 17), 5x − 5y ≡ 9 (mod 17). 6.10.19 Prove that √ 3 5 is irrational. 6.10.20 Prove that the two forms of Fermat's Theorem, Theorem 6.5.1 and (6.1), are equivalent. 6.10.21 Show that if p > 2 is a prime modulus, then 1 p+1 . = 2 2 6.10.22 We are given n + 1 numbers from the set {1, 2, . . . , 2n}. Prove that there are two numbers among them such that one divides the other. 6.10.23 What is the number of positive integers not larger than 210 and not divisible by 2, 3 or 7? This page intentionally left blank 7 Graphs 7.1 Even and Odd Degrees We start with the following exercise (admittedly of no practical significance). Prove that at a party with 51 people, there is always a person who knows an even number of others. (We assume that acquaintance is mutual. There may be people who don't know each other. There may even be people who don't know anybody else. Of course, such people know an even number of others, so the assertion is true if there is such a person.) If you don't have any idea how to begin a solution, you should try to experiment. But how to experiment with such a problem? Should we find 51 names for the participants, then create, for each person, a list of those people he or she knows? This would be very tedious, and we would be lost among the data. It would be good to experiment with smaller numbers. But which number can we take instead of 51? It is easy to see that 50, for example, would not do: If, say, we have 50 people who all know each other, then everybody knows 49 others, so there is no person with an even number of acquaintances. For the same reason, we could not replace 51 by 48, or 30, or any even number. Let's hope that this is all; let's try to prove that at a party with an odd number of people, there is always a person who knows an even number of others. 126 7. Graphs Now we can at least experiment with smaller numbers. Let us have, say, 5 people: Alice, Bob, Carl, Diane, and Eve. When they first met, Alice knew everybody else; Bob and Carl knew each other, and Carl also knew Eve. So the numbers of acquaintances are: Alice 4, Bob 2, Carl 3, Diane 1, and Eve 2. We have not only one but three people with an even number of acquaintances. It is still rather tedious to consider examples by listing people and listing pairs knowing each other, and it is quite easy to make mistakes. We can, however, find a graphic illustration that helps a lot. We represent each person by a point in the plane (well, by a small circle, to make the picture nicer), and we connect two of these points by a segment if the people know each other. This simple drawing contains all the information we need (Figure 7.1). A E B D C FIGURE 7.1. The graph depicting acquaintance between our friends A picture of this kind is called a graph. More exactly, a graph consists of a set of nodes (also known as points, or vertices) with some pairs of these (not necessarily all pairs) connected by edges. It does not matter whether these edges are straight or curvy; all that is important is which pairs of nodes they connect. The set of nodes of a graph G is usually denoted by V ; the set of edges, by E. Thus we write G = (V, E) to indicate that the graph G has node set V and edge set E. The only thing that matters about an edge is the pair of nodes it connects; hence the edges can be considered as 2-element subsets of V . This means that the edge connecting nodes u and v is just the set {u, v}. We'll further simplify notation and denote this edge by uv. Can two edges connect the same pair of nodes (parallel edges)? Can an edge connect a node to itself (loop)? The answer to these questions is, of course, our decision. In some applications it is advantageous to allow such edges; in others, they must be excluded. In this book, we generally assume that a pair of nodes is connected by at most one edge, and no node is connected to itself. Such graphs are often called simple graphs. If parallel edges are allowed, the graph is often called a multigraph to emphasize this fact. If two nodes are connected by an edge, then they are called adjacent. Nodes adjacent to a given node v are called its neighbors. 7.1 Even and Odd Degrees 127 Coming back to our problem, we see that we can represent the party by a graph very conveniently. Our concern is the number of people known by a given person. We can read this off the graph by counting the number of edges leaving a given node. This number is called the degree of the node. The degree of node v is denoted by d(v). So A has degree 4, B has degree 2, etc. If Frank now arrives, and he does not know anybody, then we add a new node that is not connected to any other node. So this new node has degree 0. In the language of graph theory, we want to prove the following: If a graph has an odd number of nodes, then it has a node with even degree. Since it is much easier to experiment with graphs than with tables of acquaintances, we can draw many graphs with an odd number of nodes, and count the number of nodes with even degree (Figure 7.2). We find that they contain 5, 1, 1, 7, 3, 3 such nodes (the last one is a single graph on 7 nodes, not two graphs). So we observe that not only is there always such a node, but the number of such nodes is odd. FIGURE 7.2. Some graphs with an odd number of nodes. Black circles mark nodes of even degree. Now, this is a case in which it is easier to prove more: If we formulate the following stronger statement, If a graph has an odd number of nodes, then the number of nodes with even degree is odd, then we made an important step towards the solution! (Why is this statement stronger? Because 0 is not an odd number.) Let's try to find an even stronger statement by looking also at graphs with an even number of nodes. Experimenting on several small graphs again (Figure 7.3), we find that the number of nodes with even degree is 2, 4, 0, 6, 2, 4. So we conjecture the following: if a graph has an even number of nodes, then the number of nodes with even degree is even. This is nicely parallel to the statement about graphs with an odd number of nodes, but it would be better to have a single common statement for the odd and even case. We get such a version if we look at the number of nodes with odd, rather than even, degree. This number is obtained by subtracting 128 7. Graphs FIGURE 7.3. Some graphs with an even number of nodes. Black circles mark nodes of even degree. the number of nodes with even degree from the total number of nodes, and hence both statements will be implied by the following: Theorem 7.1.1 In every graph, the number of nodes with odd degree is even. So what we have to prove is this theorem. It seems that having made the statement stronger and more general in several steps, we have made our task harder and harder. But in fact, we have gotten closer to the solution. Proof. One way of proving the theorem is to build up the graph one edge at a time, and observe how the parities of the degrees change. An example is shown in Figure 7.4. We start with a graph with no edge, in which every degree is 0, and so the number of nodes with odd degree is 0, which is an even number. FIGURE 7.4. Building up a graph one edge at a time. Black circles mark nodes of even degree. Now if we connect two nodes by a new edge, we change the parity of the degrees at these nodes. In particular, — if both endpoints of the new edge had even degree, we increase the number of nodes with odd degree by 2; — if both endpoints of the new edge had odd degree, we decrease the number of nodes with odd degree by 2; — if one endpoint of the new edge had even degree and the other had odd degree, then we don't change the number of nodes with odd degree. 7.1 Even and Odd Degrees 129 Thus if the number of nodes with odd degree was even before adding the new edge, it remained even after this step. This proves the theorem. (Note that this is a proof by induction on the number of edges.) Graphs are very handy in representing a large variety of situations, not only parties. It is quite natural to consider the graph whose nodes are towns and whose edges are highways (or railroads, or telephone lines) between these towns. We can use a graph to describe an electrical network, say the printed circuit on a card in your computer. In fact, graphs can be used in any situation where a "relation" between certain objects is defined. Graphs are used to describe bonds between atoms in a molecule, connections between cells in the brain, descent between species, etc. Sometimes the nodes represent more abstract things: For example, they may represent stages of a large construction project, and an edge between two stages means that one arises from the other in a single phase of work. Or the nodes can represent all possible positions in a game (say, chess, although you don't really want to draw this graph), where we connect two nodes by an edge if one can be obtained from the other in a single move. 7.1.1 Find all graphs with 2, 3, and 4 nodes. 7.1.2 (a) Is there a graph on 6 nodes with degrees 2, 3, 3, 3, 3, 3? (b) Is there a graph on 6 nodes with degrees 0, 1, 2, 3, 4, 5? (c) How many graphs are there on 4 nodes with degrees 1, 1, 2, 2? (d) How many graphs are there on 10 nodes with degrees 1, 1, 1, 1, 1, 1, 1, 1, 1, 1? 7.1.3 At the end of the party with n people, everybody knows everybody else. Draw the graph representing this situation. How many edges does it have? 7.1.4 (a) Draw a graph with nodes representing the numbers 1, 2, . . . , 10, in which two nodes are connected by an edge if and only if one is a divisor of the other. (b) Draw a graph with nodes representing the numbers 1, 2, . . . , 10, in which two nodes are connected by an edge if and only if they have no common divisor larger than 1.1 (c) Find the number of edges and the degrees in these graphs, and check that Theorem 7.1.1 holds. 7.1.5 What is the largest number of edges a graph with 10 nodes can have? 1 This is an example where loops could play a role: Since gcd(1, 1) = 1 but gcd(k, k) > 1 for k > 1, we could connect 1 to itself by a loop, if we allowed loops at all. 130 7. Graphs 7.1.6 How many graphs are there on 20 nodes? (To make this question precise, we have to make sure we know what it means that two graphs are the same. For the purpose of this exercise, we consider the nodes given, and labeled, say, as Alice, Bob, . . . . The graph consisting of a single edge connecting Alice and Bob is different from the graph consisting of a single edge connecting Eve and Frank.) 7.1.7 Formulate the following assertion as a theorem about graphs, and prove it: At every party one can find two people who know the same number of other people (like Bob and Eve in our first example). It will be instructive to give another proof of the theorem formulated in the last section. This will hinge on the answer to the following question: How many edges does a graph have? This can be answered easily if we think back to the problem of counting handshakes: For each node, we count the edges that leave that node (this is the degree of the node). If we sum these numbers, we count every edge twice. So dividing the sum by two, we get the number of edges. Let us formulate this observation as a theorem: Theorem 7.1.2 The sum of degrees of all nodes in a graph is twice the number of edges. In particular, we see that the sum of degrees in any graph is an even number. If we omit the even terms from this sum, we still get an even number. So the sum of odd degrees is even. But this is possible only if the number of odd degrees is even (since the sum of an odd number of odd numbers is odd). Thus we have obtained a new proof of Theorem 7.1.1. 7.2 Paths, Cycles, and Connectivity Let us get acquainted with some special kinds of graphs. The simplest graphs are the edgeless graphs, having any number of nodes but no edges. We get another very simple kind of graphs if we take n nodes and connect any two of them by an edge. Such a graph is called a complete graph (or a clique). A complete graph with n nodes is denoted by Kn . It has n edges 2 (recall Exercise 7.1.3). If we think of a graph as representing some kind of relation, then it is clear that we could just as well represent the relation by connecting two nodes if they are not related. So for every graph G, we can construct another graph G that has the same node set but in which two nodes are connected precisely if they are not connected in the original graph G. The graph G is called the complement of G. If we take n nodes and connect one of them to all the others, we get a star. This star has n − 1 edges. Let us draw n nodes in a row and connect the consecutive ones by an edge. This way we obtain a graph with n − 1 edges, which is called a path. 7.2 Paths, Cycles, and Connectivity 131 The first and last nodes in the row are called the endpoints of the path. If we also connect the last node to the first, we obtain a cycle (or circuit). The number of edges in a path or cycle is called its length. A cycle of length k is often called a k-cycle. Of course, we can draw the same graph in many other ways, placing the nodes elsewhere, and we may get edges that intersect (Figure 7.5). FIGURE 7.5. Two paths and two cycles A graph H is called a subgraph of a graph G if it can be obtained from G by deleting some of its edges and nodes (of course, if we delete a node we automatically delete all the edges that connect it to other nodes). 7.2.1 Find all complete graphs, paths, and cycles among the graphs in Figures 7.1–7.5. 7.2.2 How many subgraphs does an edgeless graph on n nodes have? How many subgraphs does a triangle have? 7.2.3 Find all graphs that are paths or cycles and whose complements are also paths or cycles. A key notion in graph theory is that of a connected graph. It is intuitively clear what this should mean, but it is also easy to formulate the property as follows: A graph G is connected if every two nodes of the graph are connected by a path in G. To be more precise: A graph G is connected if for every two nodes u and v, there exists a path with endpoints u and v that is a subgraph of G (Figure 7.6). It will be useful to include a little discussion of this notion. Suppose that nodes a and b are connected by a path P in our graph. Also suppose that nodes b and c are connected by a path Q. Can a and c be connected by a path? The answer seems to be obviously "yes," since we can just go from a to b and then from b to c. But there is a difficulty: Concatenating (joining together) the two paths may not yield a path from a to c, since P and Q may intersect each other (Figure 7.7). But we can construct a path from a to c easily: Let us follow the path P to its first common node d with Q; then let us follow Q to c. Then the nodes we traversed are all distinct. Indeed, 132 7. Graphs FIGURE 7.6. A path in a graph connecting two nodes the nodes on the first part of our walk are distinct because they are nodes of the path P ; similarly, the nodes on the second part are distinct because they are nodes of the path Q; finally, any node of the first part must be distinct from any node of the second part (except, of course, the node d), because d is the first common node of the two paths and so the nodes of P that we passed through before d are not nodes of Q at all. Hence the nodes and edges we have traversed form a path from a to c as claimed.2 A walk in a graph G is a sequence of nodes v0 , v1 , . . . , vk such that v0 is adjacent to v1 , which is adjacent to v2 , which is adjacent to v3 , etc.; any two consecutive nodes in the sequence must be connected by an edge. This sounds almost like a path: The difference is that a walk may pass through the same node several times, while a path must go through different nodes. Informally, a walk is a "path with repetition"; more correctly, a path is a walk without repetition. Even the first and last nodes of the walk may be the same; in this case, we call it a closed walk. The shortest possible walk consists of a single node v0 (this is closed). If the first node v0 is different from the last node vk , then we say that this walk connects nodes v0 and vk . have given more details of this proof than was perhaps necessary. One should note, however, that when arguing about paths and cycles in graphs, it is easy to draw pictures (on the paper or mentally) that make implicit assumptions and are therefore misleading. For example, when joining together two paths, one's first mental image is a single (longer) path, which may not be the case. 2 We 7.2 Paths, Cycles, and Connectivity 133 a a b c b c FIGURE 7.7. Selecting a path from a to c, given a path from a to b and a path from b to c. Is there a difference between connecting two nodes by a walk and connecting them by a path? Not really: If two nodes can be connected by a walk, then they can also be connected by a path. Sometimes it is more convenient to use paths, sometimes, to use walks (see Exercise 7.2.6). Let G be a graph that is not necessarily connected. G will have connected subgraphs; for example, the subgraph consisting of a single node (and no edge) is connected. A connected component H is a maximal subgraph that is connected; in other words, H is a connected component if it is connected but every other subgraph of G that contains H is disconnected. It is clear that every node of G belongs to some connected component. It follows by Exercise 7.2.7 that different connected components of G have no node in common (otherwise, their union would be a connected subgraph containing both of them). In other words, every node of G is contained in a unique connected component. 7.2.4 Is the proof as given above valid if (a) the node a lies on the path Q; (b) the paths P and Q have no node in common except b? 7.2.5 (a) We delete an edge e from a connected graph G. Show by an example that the remaining graph may not be connected. (b) Prove that if we assume that the deleted edge e belongs to a cycle that is a subgraph of G, then the remaining graph is connected. 7.2.6 Let G be a graph and let u and v be two nodes of G. (a) Prove that if there is a walk in G from u to v, then G contains a path connecting u and v. (b) Use part (a) to give another proof of the fact that if G contains a path connecting a and b, and also a path connecting b and c, then it contains a path connecting a and c. 134 7. Graphs 7.2.7 Let G be a graph, and let H1 = (V1 , E1 ) and H2 = (V2 , E2 ) be two subgraphs of G that are connected. Assume that H1 and H2 have at least one node in common. Form their union, i.e., the subgraph H = (V , E ), where V = V1 ∪V2 and E = E1 ∪ E2 . Prove that H is connected. 7.2.8 Determine the connected components of the graphs constructed in Exercise 7.1.4. 7.2.9 Prove that no edge of G can connect nodes in different connected components. 7.2.10 Prove that a node v is a node of the connected component of G containing node u if and only if g contains a path connecting u to v. 7.2.11 Prove that a graph with n nodes and more than connected. n−1 2 edges is always 7.3 Eulerian Walks and Hamiltonian Cycles 135 7.3 Eulerian Walks and Hamiltonian Cycles Perhaps the oldest result in graph theory was discovered by Leonhard Euler, the greatest mathematician of the eighteenth century. FIGURE 7.8. Leonhard Euler 1707–1783 It started with a recreational challenge that the citizens of K¨nigsberg o (today, Kaliningrad) raised. The city was divided into four districts by branches of the river Pregel (Figure 7.9), which were connected by seven bridges. It was nice to walk around, crossing these bridges, and so the question arose, is it possible to take a walk so that one crosses every bridge exactly once? KNEIPHOFF FIGURE 7.9. The bridges of K¨nigsberg in Euler's time, and the graph modeling o them. 136 7. Graphs Euler published a paper in 1736 in which he proved that such a walk was impossible. The argument is quite simple. Suppose that there is such a walk. Consider any of the four parts of the town, say the island Kneiphoff, and suppose that our walk does not start here. Then at some point in time, we enter the island by crossing a bridge; somewhat later, we leave it through another bridge (by the rules of the walk). Then we enter it again through a third bridge, then leave it through a fourth, then enter it through the fifth, then. . . . We cannot leave the island (at least not as part of the walk), since we have used up all the bridges that lead to it. We must end our walk on the island. So we must either start or end our walk on the island. This is OK—the rules don't forbid it. The trouble is that we can draw the same conclusion for any of the other three districts of the town. The only difference is that instead of five bridges, these districts are connected to the rest of the town by only three bridges; so if we don't start there, we get stuck there at the second visit, not the third. But now we are in trouble: we cannot start or end the walk in each of the four districts! This proves that no walk can cross every bridge exactly once. Euler remarked that one could reach this conclusion by making an exhaustive list of all possible routes, and checking that none of them can be completed as required; but this would be impractical due to the large number of possibilities. More significantly, he formulated a general criterion by which one could decide for every city (no matter how many islands and bridges it had) whether one could take a walk crossing every bridge exactly once. Euler's result is generally regarded as the first theorem of graph theory. Of course, Euler did not have the terminology of graphs (which was not to appear for more than a century), but we can use it to state Euler's theorem. Let G be a graph; for the following discussion, we allow parallel edges, i.e., several edges connecting the same pair of nodes. A walk in such a graph is a bit more difficult to define. It consists of a sequence of nodes again such that any two consecutive nodes are connected by an edge; but if there are several edges connecting these consecutive nodes, we also have to specify which of these edges is used to move from one node to the next. So formally, a walk in a graph with parallel edges is a sequence v0 , e1 , v1 , e2 , v2 , . . . , vk−1 , ek , vk , where v0 , v1 , . . . , vk are nodes, e1 , e2 , . . . , ek are edges, and edge ei connects nodes vi−1 and vi (i = 1, 2, . . . , k). An Eulerian walk is a walk that goes through every edge exactly once (the walk may or may not be closed; see Figure 7.10). To see how to cast the problem of the K¨nigsberg bridges into this language, let us represent o each district by a node and draw an edge connecting two nodes for every bridge connecting the two corresponding districts. We get the little graph on the right hand side of Figure 7.9. A walk in the town corresponds to a walk in this graph (at least, if only crossing the bridges matters), and 7.3 Eulerian Walks and Hamiltonian Cycles 137 a walk that crosses every bridge exactly once corresponds to an Eulerian walk. FIGURE 7.10. An Eulerian walk in a graph. Recast in this language, Euler's criteria are stated in the following theorem. Theorem 7.3.1 (a) If a connected graph has more than two nodes with odd degree, then it has no Eulerian walk. (b) If a connected graph has exactly two nodes with odd degree, then it has an Eulerian walk. Every Eulerian walk must start at one of these and end at the other one. (c) If a connected graph has no nodes with odd degree, then it has an Eulerian walk. Every Eulerian walk is closed. Proof. Euler's argument above gives the following: If a node v has odd degree, then every Eulerian walk must either start or end at v. Similarly, we can see that if a node v has even degree, then every Eulerian walk either starts and ends at v, or starts and ends somewhere else. This observation immediately implies (a), as well as the second assertions in (b) and (c). To finish the proof, we have to show that if a connected graph has 0 or 2 nodes with odd degree, then it has an Eulerian walk. We describe the proof in the case where there is no node of odd degree (part (c)); the other case is left to the reader as Exercise 7.3.14. Let v be any node. Consider a closed walk starting and ending at v that uses every edge at most once. Such a walk exists. For example, we can take the walk consisting of the node v only. But we don't want this very short walk; instead, we consider a longest closed walk W starting at v, using every edge at most once. We want to show that this walk W is Eulerian. Suppose not. Then there is at least one edge e that is not used by W . We claim that we can choose this edge so that W passes through at least one of its endpoints. Indeed, if 138 7. Graphs p and q are the endpoints of e and W does not pass through them, then we take a path from p to v (such a path exists since the graph is connected), and look at the first node r on this path that is also on the walk W (Figure 7.11(a)). Let e = sr be the edge of the path just before r. Then W does p s r v e q W' p v W (a) W (b) FIGURE 7.11. (a) Finding an edge not in W but meeting W . (b) Combining W and W . not pass through e (because it does not pass through s), so we can replace e by e , which has one endpoint on W . So let e be an edge that is not used by W but has an endpoint p that is used by W . Then we start a new walk W at p. We start through e, and continue walking as we please, only taking care that (i) we don't use the edges of W , and (ii) we don't use any edge twice. Sooner of later we get stuck, but where? Let u be the node where we get stuck, and suppose that u = p. Node u has even degree; W uses up an even number of edges incident with u; every previous visit of the new walk to this node used up two edges (in and out); our last entrance used up one edge; so we have an odd number of edges that are edges neither of W nor of W . But this means that we can continue our walk! So the only node we can get stuck in is node p. This means that W is a closed walk. Now we take a walk as follows. Starting at v, we follow W to p; then follow W all the way through, so that eventually we get back to p; then follow W to its end at v (Figure 7.11(b)). This new walk starts and ends at v, uses every edge at most once, and is longer than W , which is a contradiction. Euler's result above is often formulated as follows: A connected graph has a closed Eulerian walk if and only if every node has even degree. 7.3.1 Which of the graphs in Figure 7.12 have an Eulerian walk? Which of them have a closed Eulerian walk? Find an Eulerian walk if it exists. 7.3 Eulerian Walks and Hamiltonian Cycles 139 FIGURE 7.12. Which of these graphs has an Eulerian walk? 7.3.2 When does a connected graph contain two walks such that every edge is used by exactly one of them, exactly once? A question similar to the problem of the Bridges of K¨nigsberg was raised o by another famous mathematician, the Irish William R. Hamilton, in 1856. A Hamiltonian cycle is a cycle that contains all nodes of a graph. The Hamilton cycle problem is the problem of deciding whether or not a given graph has a Hamiltonian cycle. Hamiltonian cycles sound quite similar to Eulerian walks: Instead of requiring that every edge be used exactly once, we require that every node be used exactly once. But much less is known about them than about Eulerian walks. Euler told us how to decide whether a given graph has an Eulerian walk; but no efficient way is known to check whether a given graph has a Hamiltonian cycle, and no useful necessary and sufficient condition for the existence of a Hamiltonian cycle is known. If you solve Exercise 7.3.3, you'll get a feeling about the difficulty of the Hamiltonian cycle problem. 7.3.3 Decide whether the graphs in Figure 7.13 have a Hamiltonian cycle. FIGURE 7.13. Two famous graphs: the dodecahedron graph (cf. Chapter 12) and the Petersen graph. 140 7. Graphs Review Exercises 7.3.4 Draw all graphs on 5 nodes in which every node has degree at most 2. 7.3.5 Does there exists a graph with the following degrees: (a) 0, 2, 2, 2, 4, 4, 6; (b) 2, 2, 3, 3, 4, 4, 5. 7.3.6 Draw the graphs representing the bonds between atoms in (a) a water molecule; (b) a methane molecule; (c) two water molecules. 7.3.7 At a party there were 7 boys and 6 girls. Every boy danced with every girl. Draw the graph representing the dancing. How many edges does it have? What are its degrees? 7.3.8 How many subgraphs does a 4-cycle have? 7.3.9 Prove that at least one of G and G is connected. 7.3.10 Let G be a connected graph with at least two nodes. Prove that it has a node such that if this node is removed (along with all edges incident with it), the remaining graph is connected. 7.3.11 Let G be a connected graph that is not a path. Prove that it has at least three vertices such that if any of them is removed, the remaining graph is still connected. 7.3.12 Let G be a connected graph in which every pair of edges have an endpoint in common. Show that G is either a star or a K3 . 7.3.13 There are (m − 1)n + 1 people in a room. Show that either there are m people who mutually do not know each other, or there is a person who knows at least n others. 7.3.14 Prove part (b) of Theorem 7.3.1. 7.3.15 Theorem 7.3.1 talks about connected graphs. Which disconnected graphs have an Eulerian walk? 8 Trees 8.1 How to Define Trees We have met trees when we were studying enumeration problems; now we take a look at them as graphs. A graph G = (V, E) is called a tree if it is connected and contains no cycle as a subgraph. The simplest tree has one node and no edges. The second simplest tree consists of two nodes connected by an edge. Figure 8.1 shows a variety of other trees. FIGURE 8.1. Five trees. Note that the two properties defining trees work in opposite directions: Connectedness means that the graph cannot have "too few" edges, while the exclusion of cycles means that it cannot have "too many." To be more precise, if a graph is connected, then if add a new edge to it, it remains connected (while if we delete an edge, it may become disconnected). If a graph contains no cycle, then if we delete any edge, the remaining graph 142 8. Trees will still not contain a cycle (while adding a new edge may create a cycle). The following theorem shows that trees can be characterized as "minimally connected" graphs as well as "maximally cycle-free" graphs. Theorem 8.1.1 (a) A graph G is a tree if and only if it is connected, but deleting any of its edges results in a disconnected graph. (b) A graph G is a tree if and only if it contains no cycles, but adding any new edge creates a cycle. Proof. We prove part (a) of this theorem; the proof of part (b) is left as an exercise. First, we have to prove that if G is a tree then it satisfies the condition given in the theorem. It is clear that G is connected (by the definition of a tree). We want to prove that if we delete any edge, it cannot remain connected. The proof is indirect: Assume that when the edge uv is deleted from a tree G, the remaining graph G is connected. Then G contains a path P connecting u and v. But then, if we put the edge uv back, the path P and the edge uv will form a cycle in G, which contradicts the definition of trees. Second, we have to prove that if G satisfies the condition given in the theorem, then it is a tree. It is clear that G is connected, so we only have to argue that G does not contain a cycle. Again by an indirect argument, assume that G does contain a cycle C. Then deleting any edge of C, we obtain a connected graph (Exercise 7.2.5). But this contradicts the condition in the theorem. Consider a connected graph G on n nodes, and an edge e of G. If we delete e, the remaining graph may or may not remain connected. If it is disconnected, then we call e a cut-edge. Part (a) of Theorem 8.1.1 implies that every edge of a tree is a cut-edge. If we find an edge that is not a cut-edge, delete it. Go on deleting edges until a graph is obtained that is still connected, but deleting any edge from it leaves a disconnected graph. By part (a) of Theorem 8.1.1, this is a tree, with the same node set as G. A subgraph of G with the same node set that is a tree is called a spanning tree of G. The edge deletion process above can, of course, be carried out in many ways, so a connected graph can have many different spanning trees. Rooted trees. Often, we use trees that have a special node, which we call the root. For example, trees that occurred in counting subsets or permutations were built starting with a given node. We can take any tree, select any of its nodes, and call it a root. A tree with a specified root is called a rooted tree. Let G be a rooted tree with root r. Given any node v different from r, we know from Exercise 8.1.3 below that the tree contains a unique path connecting v to r. The node on this path next to v is called the father of 8.2 How to Grow Trees 143 v. The other neighbors of v are called the sons of v. The root r does not have a father, but all its neighbors are called its sons. We now make a basic genealogical assertion: Every node is the father of its sons. Indeed, let v be any node, and let u be one of its sons. Consider the unique path P connecting v to r. The node u cannot lie on P : It cannot be the first node after v, since then it would be the father of v, and not its son; and it cannot be a later node, since then in going from v to u on the path P and then back to v on the edge uv we would traverse a cycle. But this implies that in adding the node u and the edge uv to P we get a path connecting u to r. Since v is the first node on this path after u, it follows that v is the father of u. (Is this argument valid when v = r? Check!) We have seen that every node different from the root has exactly one father. A node can have any number of sons, including zero. A node with no sons is called a leaf. In other words, a leaf is a node with degree 1, different from r. 8.1.1 Prove part (b) of Theorem 8.1.1. 8.1.2 Prove that connecting two nodes u and v in a graph G by a new edge creates a new cycle if and only if u and v are in the same connected component of G. 8.1.3 Prove that in a tree, every two nodes can be connected by a unique path. Conversely, prove that if a graph G has the property that every two nodes can be connected by a path, and there is only one connecting path for each pair, then the graph is a tree. 8.2 How to Grow Trees The following is one of the most important properties of trees. Theorem 8.2.1 Every tree with at least two nodes has at least two nodes of degree 1. Proof. Let G be a tree with at least two nodes. We prove that G has a node of degree 1, and leave it to the reader as an exercise to prove that it has at least one more. (A path has only two such nodes, so this is the best possible we can claim.) Let us start from any node v0 of the tree and take a walk (climb?) on the tree. Let's say we never want to turn back from a node on the edge through which we entered it; this is possible unless we get to a node of degree 1, in which case we stop and the proof is finished. So let's argue that this must happen sooner or later. If not, then eventually we must return to a node we have already visited; but then the 144 8. Trees nodes and edges we have traversed between the two visits form a cycle. This contradicts our assumption that G is a tree and hence contains no cycle. 8.2.1 Apply the argument above to find a second node of degree 1. A real tree grows by developing new twigs again and again. We show that graph-trees can be grown in the same way. To be more precise, consider the following procedure, which we call the Tree-growing Procedure: — Start with a single node. — Repeat the following any number of times: If you have any graph G, create a new node and connect it by a new edge to any node of G. Theorem 8.2.2 Every graph obtained by the Tree-growing Procedure is a tree, and every tree can be obtained this way. Proof. The proof of this is again rather straightforward, but let us go through it, if only to gain practice in arguing about graphs. First, consider any graph that can be obtained by this procedure. The starting graph is certainly a tree, so it suffices to argue that we never create a nontree; in other words, if G is a tree, and G is obtained from G by creating a new node v and connecting it to a node u of G, then G is a tree. This is straightforward: G is connected, since any two "old" nodes can be connected by a path in G, while v can be connected to any other node w by first going to u and then connecting u to w. Moreover, G cannot contain a cycle: v has degree 1, and so no cycle can go through v, but a cycle that does not go through v would be a cycle in the old graph, which is supposed to be a tree. Second, let's argue that every tree can be constructed this way. We prove this by induction on the number of nodes.1 If the number of nodes is 1, then the tree arises by the construction, since this is the way we start. Assume that G is a tree with at least 2 nodes. Then by Theorem 8.2.1, G has a node of degree 1 (at least two nodes, in fact). Let v be a node with degree 1. Delete v from G, together with the edge with endpoint v, to get a graph G. We claim that G is a tree. Indeed, G is connected: Any two nodes of G can be connected by a path in G, and this path cannot go through v, since v has degree 1. So this path is also a path in G . Furthermore, G does not contain a cycle since G does not. 1 The first part of the proof is also an induction argument, even though it was not phrased as such. 8.2 How to Grow Trees 145 By the induction hypothesis, every tree with fewer nodes than G arises by the construction; in particular, G does. But then G arises from G by one more iteration of the second step. This completes the proof of Theorem 8.2.2. Figure 8.2 shows how trees with up to 4 nodes arise by this construction. Note that there is a "tree of trees" here. The fact that the logical structure of this construction is a tree does not have anything to do with the fact that we are constructing trees: any iterative construction with free choices at each step results in a similar "descent tree". FIGURE 8.2. The descent tree of trees The Tree-growing Procedure can be used to establish a number of properties of trees. Perhaps most important of these concerns the number of edges. How many edges does a tree have? Of course, this depends on the number of nodes; but surprisingly, it depends only on the number of nodes: Theorem 8.2.3 Every tree on n nodes has n − 1 edges. Proof. Indeed, we start with one more node (1) than edge (0), and at each step, one new node and one new edge are added, so this difference of 1 is maintained. 8.2.2 Let G be a tree, which we consider as the network of roads in a medieval country, with castles as nodes. The king lives at node r. On a certain day, the lord of each castle sets out to visit the king. Argue carefully that soon after they have left their castles, there will be exactly one lord on each edge. Give a proof of Theorem 8.2.3 based on this. 146 8. Trees 8.2.3 If we delete a node v from a tree (together with all edges that end there), we get a graph whose connected components are trees. We call these connected components the branches at node v. Prove that every tree has a node such that every branch at this node contains at most half the nodes of the tree. 8.3 How to Count Trees? We have counted all sorts of things in the first part of this book; now that we are familiar with trees, it is natural to ask: How many trees are there on n nodes? Before attempting to answer this question, we have to clarify an important issue: when do we consider two trees different? There is more than one reasonable answer to this question. Consider the trees in Figure 8.3. Are they the same? One could say that they are; but then, if the nodes are, say, towns, and the edges represent roads to be built between them, then clearly the inhabitants of the towns will consider the two plans very different. FIGURE 8.3. Are these trees the same? So we have to define carefully when we consider two trees the same. The following are two possibilities: — We fix the set of nodes, and consider two trees the same if the same pairs of nodes are connected in each. (This is the position the townspeople would take when they consider road construction plans.) In this case, it is advisable to give names to the nodes, so that we can distinguish them. It is convenient to use the numbers 0, 1, 2, . . . , n − 1 as names (if the tree has n nodes). We express this by saying that the vertices of the tree are labeled by 0, 1, 2, . . . n − 1. Figure 8.4 shows a labeled tree. Interchanging the labels 2 and 4 (say) would yield a different labeled tree. — We don't give names to the nodes, and consider two trees the same if we can rearrange the nodes of one so that we get the other tree. More exactly, we consider two trees the same (the mathematical term for this is isomorphic) if there exists a one-to-one correspondence 8.3 How to Count Trees? 147 between the nodes of the first tree and the nodes of the second tree such that two nodes in the first tree that are connected by an edge correspond to nodes in the second tree that are connected by an edge, and vice versa. If we speak about unlabeled trees, we mean that we don't distinguish isomorphic trees from each other. For example, all paths on n nodes are the same as unlabeled trees. So we can ask two questions: How many labeled trees are there on n nodes? and how many unlabeled trees are there on n nodes? These are really two different questions, and we have to consider them separately. 8.3.1 Find all unlabeled trees on 2, 3, 4, and 5 nodes. How many labeled trees do you get from each? Use this to find the number of labeled trees on 2, 3, 4, and 5 nodes. 8.3.2 How many labeled trees on n nodes are stars? How many are paths? The number of labeled trees. For the case of labeled trees, there is a very nice solution. Theorem 8.3.1 (Cayley's Theorem) The number of labeled trees on n nodes is nn−2 . The formula is elegant, but the surprising fact about it is that it is quite difficult to prove! It is substantially deeper than any of the previous formulas for the number of this and that. There are various ways to prove it, but each uses some deeper tool from mathematics or a deeper idea. We'll give a proof that is perhaps best understood by first discussing a quite different question in computer science: how to store trees. 7 9 3 0 2 4 8 1 6 5 FIGURE 8.4. A labeled tree 148 8. Trees 8.4 How to Store Trees Suppose that you want to store a labeled tree, say the tree in Figure 8.4, in a computer. How would you do this? Of course, the answer depends on what you need to store the tree for, what information about it you want to retrieve and how often, etc. Right now, we are concerned only with the amount of memory we need. We want to store the tree so that it occupies the least amount of memory. Let's try some simple solutions. (a) Suppose that we have a tree G with n nodes. One thing that comes to mind is to make a big table, with n rows and n columns, and put (say) the number 1 in the jth position of the ith row if nodes i and j are connected by an edge, and the number 0, if they are not. It will be convenient to place the node labeled 0 last, so it corresponds to the 10th row and to the 10th column: 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 (8.1) This method of storing the tree can, of course, be used for any graph (it is called the adjacency matrix of the graph, just to mention its name). It is often very useful, but at least for trees, it is very wasteful. We need one bit to store each entry of this table, so this takes n2 bits. We can save a little by noticing that it is enough to store the part below the diagonal, since the diagonal is always 0 and the other half of the table is just the reflection of the half below the diagonal. But this is still (n2 − n)/2 bits. (b) We fare better if we specify each tree by listing all its edges. We can specify each edge by its two endpoints. It will be convenient to arrange this list in an array whose columns correspond to the edges. For example, the tree in Figure 8.4 can be encoded by 7 9 8 9 9 2 6 2 3 0 0 2 2 4 6 1 6 5 Instead of a table with n rows, we get a table just with two rows. We pay a little for this: Instead of just 0 and 1, the table will contain integers between 0 and n − 1. But this is certainly worth it: Even if we count bits, to write 8.4 How to Store Trees 149 down the label of a node takes log2 n bits, so the whole table occupies only 2n log2 n bits, which is much less than (n2 − n)/2 if n is large. There is still a lot of free choice here, which means that the same tree may be encoded in different ways: We have freedom in choosing the order of the edges, and also in choosing the order in which the two endpoints of an edge are listed. We could agree on some arbitrary conventions to make the code well defined (say, listing the two endnodes of an edge in increasing order, and then the edges in increasing order of their first endpoints, breaking ties according to the second endpoints); but it will be more useful to do this in a way that also allows us to save more memory. (c) The father code. From now on, the node with label 0 will play a special role; we'll consider it the "root" of the tree. Then we can list the two endnodes of an edge by listing the endpoint further from the root first, and then the endpoint nearer to the root second. So for every edge, the node written below is the father of the node written above. For the order in which we list the edges, let us take the order of their first nodes. For the tree in Figure 8.4, we get the table 1 6 2 3 0 0 4 2 5 6 6 2 7 9 8 9 9 2 Do you notice anything special about this table? The first row consists of the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, in this order. Is this a coincidence? Well, the order is certainly not (we ordered the edges by the increasing order of their first endpoints). The root 0 does not occur, since it is not the son of any other node. But why do we get every other number exactly once? After a little reflection, this should also be clear: If a node occurs in the first row, then its father occurs below it. Since a node has only one father, it can occur only once. Since every node other than the root has a father, every node other than the root occurs in the first row. Thus we know in advance that if we have a tree on n nodes, and write up the array using this method, then the first row will consist of 1, 2, 3, . . . , n− 1. So we may as well suppress the first row without losing any information; it suffices to store the second row. So we can specify the tree by a sequence of n − 1 numbers, each between 0 and n − 1. This takes (n − 1) log2 n bits. This coding is not optimal, in the sense that not every "code" gives a tree (see Exercise 8.4.1). But we'll see that this method is already nearly optimal. 8.4.1 Consider the following "codes": (0, 1, 2, 3, 4, 5, 6, 7); (7, 6, 5, 4, 3, 2, 1, 0); (0, 0, 0, 0, 0, 0, 0, 0); (2, 3, 1, 2, 3, 1, 2, 3). Which of these are "father codes" of trees? 8.4.2 Prove, based on the "father code" method of storing trees, that the number of labeled trees on n nodes is at most nn−1 . 150 8. Trees (d) Now we describe a procedure, called the Pr¨fer code, that will assign u to any n-point labeled tree a sequence of length n − 2, not n − 1, consisting of the numbers 0, . . . , n − 1. The gain is small, but important: we'll show that every such sequence corresponds to a tree. Thus we will establish a bijection, a one-to-one correspondence, between labeled trees on n nodes and sequences of length n−2, consisting of numbers 0, 1, . . . , n−1. Since the number of such sequences is nn−2 , this will also prove Cayley's Theorem. The Pr¨fer code can be considered as a refinement of method (c). We u still consider 0 as the root, we still order the two endpoints of an edge so that the son comes first, but we order the edges (the columns of the array) not by the magnitude of their first endpoint but a little differently, more closely related to the tree itself. So again, we construct a table with two rows, whose columns correspond to the edges, and each edge is listed so that the node farther from 0 is on the top, its father on the bottom. The issue is the order in which we list the edges. Here is the rule for this order: We look for a node of degree 1, different from 0, with the smallest label, and write down the edge with this endnode. In our example, this means that we write down 1 . Then we delete this node 6 and edge from the tree, and repeat: We look for the endnode with smallest label, different from 0, and write down the edge incident with it. In our case, this means adding a column 3 to the table. Then we delete this node 0 and edge, etc. We go until all edges are listed. The array we get is called the extended Pr¨fer code of the tree (we call it extended because, as we'll u see, we need only a part of it as the "real" Pr¨fer code). The extended u Pr¨fer code of the tree in Figure 8.4 is: u 1 6 3 4 0 2 5 6 6 2 7 9 8 9 9 2 2 0 Why is this any better than the "father code"? One little observation is that the last entry in the second row is now always 0, since it comes from the last edge and since we never touched the node 0, this last edge must be incident with it. But we have paid a lot for this, it seems: It is no longer clear that the first row is superfluous; it still consists of the numbers 1, 2, . . . , n − 1, but now they are not in increasing order. The key lemma is that the first row is determined by the second: Lemma 8.4.1 The second row of an extended Pr¨fer code determines the u first. Let us illustrate the proof of the lemma by an example. Suppose that somebody gives us the second row of an extended Pr¨fer code of a labeled u tree on 8 nodes; say, 2 4 0 3 3 1 0 (we have one edges fewer than nodes, so the second row consists of 7 numbers, and as we have seen, it must end with a 0). Let us figure out what the first row must have been. 8.4 How to Store Trees 151 7 6 5 2 4 3 1 0 FIGURE 8.5. A tree reconstructed from its Pr¨ fer code u How does the first row start? Remember that this is the node that we delete in the first step; by the rule of constructing the Pr¨fer code, this is u the node with degree 1 with smallest label. Could this node be node 1? No, because then we would have to delete it in the first step, and it could no longer occur, but it does. By the same token, no number occurring in the second row could be a leaf of the tree at the beginning. This rules out 2, 3, and 4. What about 5? It does not occur in the second row; does this mean that it is a leaf of the original tree? The answer is yes; otherwise, 5 would have been the father of some other node, and it would have been written in the second row when this other node was deleted. Thus 5 was a leaf with smallest label, and the first row of the extended Pr¨fer code must start u with 5. Let's try to figure out the next entry in the first row, which is, as we know, the leaf with smallest label of the tree after 5 was deleted. The node 1 is still ruled out, since it occurs later in the second row ; but 2 does not occur again, which means (by the same argument as before) that 2 was the leaf with smallest label after 5 was deleted. Thus the second entry in the first row is 2. Similarly, the third entry must be 4, since all the smaller numbers either occur later or have been used already. Continuing in a similar fashion, we get that the full array must have been 5 2 2 4 4 0 6 3 7 3 3 1 1 0 This corresponds to the tree in Figure 8.5 Proof. [of Lemma 8.4.1] The considerations above are completely general, and can be summed up as follows: Each entry in the first row of the extended Pr¨fer code is the u smallest integer that does not occur in the first row before it, nor in the second row below or after it. 152 8. Trees Indeed, when this entry (say, the k-th entry in the first row) was recorded, the nodes before it in the first row were deleted (together with the edges corresponding to the first k − 1 columns). The remaining entries in the second row are exactly those nodes that are fathers at this time, which means that they are not leaves. This describes how the first row can be reconstructed from the second. So we don't need the full extended Pr¨fer code to store the tree; it suffices u to store the second row. In fact, we know that the last entry in the second row is 0, so we don't have to store this either. The sequence consisting of the first n − 2 entries of the second row is called the Pr¨fer code of the tree. u Thus the Pr¨fer code is a sequence of length n − 2, each entry of which is u a number between 0 and n − 1. This is similar to the father code, just one shorter; not much gain here for all the work. But the beauty of the Pr¨fer code is that it is optimal, in u the sense that every sequence of numbers between 0 and n − 1, of length n − 2, is a Pr¨fer code of some tree on n nodes. u This can be proved in two steps. First, we extend this sequence to a table with two rows: We add a 0 at the end, and then write above each entry in the first row the smallest integer that does not occur in the first row before it, nor in the second row below or after it (note that it is always possible to find such an integer: the condition excludes at most n − 1 values out of n). Now this table with two rows is the Pr¨fer code of a tree. The proof of u this fact, which is no longer difficult, is left to the reader as an exercise. 8.4.3 Complete the proof. Let us sum up what the Pr¨fer code gives. First, it proves Cayley's u theorem. Second, it provides a theoretically most efficient way of encoding trees. Each Pr¨fer code can be considered as a natural number written u in the base-n number system; in this way, we associate a "serial number" between 0 and nn−2 − 1 with each n-point labeled tree. Expressing these serial numbers in base two, we get a code using 0–1 sequences of length at most (n − 2) log2 n . As a third use of the Pr¨fer code, let's suppose that we want to write a u program that generates a random labeled tree on n nodes in such a way that all trees occur with the same probability. This is not easy from scratch; but the Pr¨fer code gives an efficient solution. We just have to generate u n−2 independent random integers between 0 and n−1 (most programming languages have a statement for this) and then "decode" this sequence as a tree, as described. 8.5 The Number of Unlabeled Trees 153 8.5 The Number of Unlabeled Trees The number of unlabeled trees on n nodes, usually denoted by Tn , is even more difficult to handle. No simple formula like Cayley's theorem is known for this number. Our goal is to get a rough idea of how large this number is. There is only one unlabeled tree on 1, 2, or 3 nodes; there are two on 4 nodes (the path and the star). There are 3 on 5 nodes (the star, the path, and the tree in Figure 8.3. These numbers are much smaller than the number of labeled trees with these numbers of nodes, which are 1, 1, 3, 16, and 125 by Cayley's theorem. It is of course clear that the number of unlabeled trees is less than the number of labeled trees; every unlabeled tree can be labeled in many ways. How many ways? If we draw an unlabeled tree, we can label its nodes in n! ways. The labeled trees we get this way are not necessarily all different. For example, if the tree is a star, then no matter how we permute the labels of the leaves, we get the same labeled tree. So an unlabeled star yields n labeled stars. But at least we know that each labeled tree can be labeled in at most n! ways. Since the number of labeled trees is nn−2 , it follows that the number of unlabeled trees is at least nn−2 /n!. Using Stirling's formula (Theorem √ 2.2.1), we see that this number is about en /n5/2 2π. This number is much smaller than the number of labeled trees, nn−2 , but of course it is only a lower bound on the number of unlabeled trees. How can we obtain an upper bound on this number? If we think in terms of storage, the issue is, can we store an unlabeled tree more economically than labeling its nodes and then storing it as a labeled tree? Very informally, how should we describe a tree if we want only the "shape" of it, and don't care which node gets which label? Take an n-point tree G, and specify one of its leaves as its "root." Next, draw G in the plane without crossing edges; this can always be done, and we almost always draw trees this way. Now we imagine that the edges of the tree are walls, perpendicular to the plane. Starting at the root, walk around this system of walls, keeping the wall always to your right. We'll call walking along an edge a step. Since there are n − 1 edges, and each edge has two sides, we'll make 2(n − 1) steps before returning to the root (Figure 8.6). Each time we make a step away from the root (i.e., a step from a father to one of its sons), we write down a 1; each time we make a step toward the root, we write down a 0. This way we end up with a sequence of length 2(n − 1), consisting of 0's and 1's. We call this sequence the planar code of the (unlabeled) tree. The planar code of the tree in Figure 8.6 is 1111100100011011010000. Now this name already indicates that the planar code has the following important property: 154 8. Trees FIGURE 8.6. Walking around a tree. Every unlabeled tree is uniquely determined by its planar code. Let us illuminate the proof of this by assuming that the tree is covered by snow, and we have only its code. We ask a friend of ours to walk around the tree just as above, and uncover the walls, and we look at the code in the meanwhile. What do we see? Any time we see a 1, he walks along a wall away from the root, and he cleans the snow from it. We see this as growing a new twig. Any time we see a 0, he walks back, along an edge already uncovered, toward the root. Now, this describes a perfectly good way to draw the tree: We look at the bits of the code one by one, while keeping the pen on the paper. Any time we see a 1, we draw a new edge to a new node (and move the pen to the new node). Any time we see a 0, we move the pen back by one edge toward the root. Thus the tree is indeed determined by its planar code. Since the number of possible planar codes is at most 22(n−1) = 4n−1 , we get that the number of unlabeled trees is at most this large. Summing up: Theorem 8.5.1 The number Tn of unlabeled trees with n nodes satisfies nn−2 ≤ Tn ≤ 4n−1 . n! The exact form of this lower bound does not matter much; we can conclude, just to have a statement simpler to remember, that the number of unlabeled trees on n nodes is larger than 2n if n is large enough (n > 30 if you work it out). So we get, at least for n > 30, the following bounds, which are easy to remember: 2n ≤ Tn ≤ 4n . The planar code is far from optimal; every unlabeled tree has many different codes (depending on how we draw it in the plane and how we choose the root), and not every 0–1 sequence of length 2(n − 1) is a code of a tree (for example, it must start with a 1 and have the same number of 0's 8.5 The Number of Unlabeled Trees 155 as 1's). Still, the planar code is quite an efficient way of encoding unlabeled trees: It uses less than 2n bits for trees with n nodes. Since there are more than 2n unlabeled trees (at least for n > 30), we could not possibly get by with codes of length n: there are just not enough of them. In contrast to what we know for labeled trees, we don't know a simple formula for the number of unlabeled trees on n nodes, and probably none exists. According to a difficult result of George P´lya, the number of uno labeled trees on n nodes is asymptotically an−5/2 bn , where a = 0.5349 . . . and b = 2.9557 . . . are real numbers defined in a complicated way. 8.5.1 Does there exist an unlabeled tree with planar code (a) 1111111100000000; (b) 1010101010101010; (c) 1100011100? Review Exercises 8.5.2 Let G be a connected graph, and e an edge of G. Prove that e is not a cut-edge if and only if it is contained in a cycle of G. 8.5.3 Prove that a graph with n nodes and m edges has at least n−m connected components. 8.5.4 Prove that if a tree has a node of degree d, then it has at least d leaves. 8.5.5 Find the number of unlabeled trees on 6 nodes. 8.5.6 A double star is a tree that has exactly two nodes that are not leaves. How many unlabeled double stars are there on n nodes? 8.5.7 Construct a tree from a path of length n−3 by creating two new nodes and connecting them to the same endpoint of the path. How many different labeled trees do you get from this tree? 8.5.8 Consider any table with 2 rows and n − 1 columns; the first row holds 1, 2, 3, . . . , n − 1; the second row holds arbitrary numbers between 1 and n. Construct a graph on nodes labeled 1, . . . , n by connecting the two nodes in each column of our table. (a) Show by an example that this graph is not always a tree. (b) Prove that if the graph is connected, then it is a tree. (c) Prove that every connected component of this graph contains at most one cycle. 8.5.9 Prove that in every tree, any two paths with maximum length have a node in common. This is not true if we consider two maximal (i.e., nonextendable) paths. 156 8. Trees 8.5.10 If C is a cycle, and e is an edge connecting two nonadjacent nodes of C, then we call e a chord of C. Prove that if every node of a graph G has degree at least 3, then G contains a cycle with a chord. [Hint: Follow the proof of the theorem that a tree has a node of degree 1.] 8.5.11 Take an n-cycle, and connect two if its nodes at distance 2 by an edge. Find the number of spanning trees in this graph. 8.5.12 A (k, l)-dumbbell graph is obtained by taking a complete graph on k (labeled) nodes and a complete graph on l (labeled) nodes, and connecting them by a single edge. Find the number of spanning trees of a dumbbell graph. 8.5.13 Prove that if n ≥ 2, then in Theorem 8.5.1 both inequalities are strict. 9 Finding the Optimum 9.1 Finding the Best Tree A country with n towns wants to construct a new telephone network to connect all towns. Of course, they don't have to build a separate line between every pair of towns; but they do need to build a connected network; in our terms, this means that the graph of direct connections must form a connected graph. Let's assume that they don't want to build a direct line between towns that can be reached otherwise (there may be good reasons for doing so, as we shall see later, but at the moment let's assume their only goal is to get a connected network). Thus they want to build a minimal connected graph with these nodes, i.e., a tree. We know that no matter which tree they choose to build, they have to construct n − 1 lines. Does this mean that it does not matter which tree they build? No, because lines are not equally easy to build. Some lines between towns may cost much more than some other lines, depending on how far the towns are, whether there are mountains or lakes between them, etc. So the task is to find a spanning tree whose total cost (the sum of costs of its edges) is minimal. How do we know what these costs are? Well, this is not something mathematics can tell you; it is the job of the engineers and economists to estimate the cost of each possible line in advance. So we just assume that these costs are given. At this point, the task seems trivial (very easy) again: Just compute the cost of each tree on these nodes, and select the tree with smallest cost. 158 9. Finding the Optimum We dispute the claim that this is easy. The number of trees to consider is enormous: We know by Cayley's Theorem (Theorem 8.3.1) that the number of labeled trees on n nodes is nn−2 . So for 10 cities, we'd have to look at 108 (one hundred million) possible trees; for 20 cities, the number is astronomical (more than 1020 ). We have to find a better way to select an optimal tree; and that's the point where mathematics comes to the rescue. There is this story about the pessimist and the optimist: They each get a box of assorted candies. The optimist always picks the best; the pessimist always eats the worst (to save the better candies for later). So the optimist always eats the best available candy, and the pessimist always eats the worst available candy; and yet, they end up with eating same candies. So let's see how the optimistic government would build the telephone network. They start with raising money; as soon as they have enough money to build a line (the cheapest line), they build it. Then they wait until they have enough money to build a second connection. Then they wait until they have enough money to build a third connection. . . It may happen that the third-cheapest connection forms a triangle with the first two (say, three towns are close to each other). Then, of course, they skip this and raise enough money to build the fourth-cheapest connection. At any time, the optimistic government will wait until they have enough money to build a connection between two towns that are not yet connected by any path, and build this connection. Finally, they will get a connected graph on the n nodes representing the towns. The graph does not contain a cycle, since the edge of the cycle constructed last would connect two towns that are already accessible from each other through the other edges of the cycle. So, the graph they get is indeed a tree. But is this network the least expensive possible? Could the cheap attitude at the beginning backfire and force the government to spend much more at the end? We'll prove below that our optimistic government has undeserved success: The tree they build is as inexpensive as possible. Before we jump into the proof, we should discuss why we said that the government's success was "undeserved." We show that if we modify the task a little, the same optimistic approach might lead to very bad results. Let us assume that for reasons of reliability, they require that between any two towns there should be at least two paths with no edge in common (this guarantees that when a line is inoperational because of failure or maintenance, any two towns can still be connected). For this, n − 1 lines are not enough (n − 1 edges forming a connected graph must form a tree, but then if any edge is deleted, the rest will not be connected any more). But n lines suffice: All we have to do is to draw a single cycle through all the towns. This leads to the following task: Find a cycle with n given towns as nodes such that the total cost of constructing its edges is minimum. 9.1 Finding the Best Tree 159 (This problem is one of the most famous tasks in mathematical optimization: it is called the Traveling Salesman Problem. We'll say more about it later.) Our optimistic government would do the following: Build the cheapest line, then the second cheapest, then the third cheapest, etc., skipping the construction of lines that are superfluous: It will not build a third edge out of a town that already has two, and will not build an edge completing a cycle unless this cycle connects all nodes. Eventually, they get a cycle through all towns, but this is not necessarily the best! Figure 9.1 shows an example where the optimistic method (called "greedy" in this area of applied mathematics) gives a cycle that is quite a bit worse than optimal. FIGURE 9.1. Failure of the greedy method. Construction costs are proportional to the distance. The first figure shows a cheapest (shortest) cycle through all 4 towns; the second shows the cycle obtained by the optimistic (greedy) method. So the greedy method can be bad for the solution of a problem that is only slightly different from the problem of finding the cheapest tree. Thus the fact (to be proved below) that the optimistic government builds the best tree is indeed undeserved luck. So let us return to the solution of the problem of finding a tree with minimum cost, and prove that the optimistic method yields a cheapest tree. The optimistic method is often called the greedy Algorithm; in the context of spanning trees, it is called Kruskal's Algorithm. Let us call the tree obtained by the greedy method the greedy tree, and denote it by F . In other words, we want to prove that any other tree would cost at least as much as the greedy tree (and so no one could accuse the government of wasting money and justify the accusation by exhibiting another tree that would have been cheaper). So let G be any tree different from the greedy tree F . Let us imagine the process of constructing F , and the step when we first pick an edge that is not an edge of G. Let e be this edge. If we add e to G, we get a cycle C. This cycle is not fully contained in F , so it has an edge f that is not an edge of F (Figure 9.2). If we add the edge e to G and then delete f , we get a (third) tree H. (Why is H a tree? Give an argument!) We want to show that H is at most as expensive as G. This clearly means that e is at most as expensive as f . Suppose (by indirect argument) that f is cheaper than e. Now comes a crucial question: Why didn't the optimistic government select f instead of e at this point in time? The only reason could be that 160 9. Finding the Optimum 11 7 1 9 10 3 FIGURE 9.2. The greedy tree is optimal 5 4e 8 2 6 f f was ruled out because it would have formed a cycle C with the edges of F already selected. But all these previously selected edges are edges of G, since we are inspecting the step when the first edge not in G was added to F . Since f itself is an edge of G, it follows that all edges of C are edges of G, which is impossible, since G is a tree. This contradiction proves that f cannot be cheaper than e and hence G cannot be cheaper than H. So we replace G by this tree H that is not more expensive. In addition, the new tree H has the advantage that it coincides with F in more edges, since we deleted from G an edge not in F and added an edge in F . This implies that if H is different from F and we repeat the same argument again and again, we get trees that are not more expensive than G, and coincide with F in more and more edges. Sooner of later we must end up with F itself, proving that F was no more expensive than G. 9.1.1 A pessimistic government could follow the following logic: If we are not careful, we may end up with having to build that extremely expensive connection through the mountain; so let us decide right away that building this connection is not an option, and mark it as "impossible." Similarly, let us find the second most expensive line and mark it "impossible," etc. Well, we cannot go on like this forever: We have to look at the graph formed by those edges that are still possible, and this "possibility graph" must stay connected. In other words, if deleting the most expensive edge that is still possible from the possibility graph would destroy the connectivity of this graph, then like it or not, we have to build this line. So we build this line (the pessimistic government ends up building the most expensive line among those that are still possible). Then they go on to find the most expensive line among those that are still possible and not yet built, mark it impossible if this does not disconnect the possibility graph, etc. Prove that the pessimistic government will have the same total cost as the optimistic. 9.1.2 Formulate how the pessimistic government will construct a cycle through all towns. Show by an example that they don't always get the cheapest solution. 9.2 The Traveling Salesman Problem 161 9.2 The Traveling Salesman Problem Let us return to the question of finding a cheapest possible cycle through all the given towns: We have n towns (points) in the plane, and for any two of them we are given the "cost" of connecting them directly. We have to find a cycle with these nodes such that the cost of the cycle (the sum of the costs of its edges) is as small as possible. This problem is one of the most important in the area of combinatorial optimization, the field dealing with finding the best possible design in various combinatorial situations, like finding the optimal tree discussed in the previous section. It is called the Traveling Salesman Problem, and it appears in many disguises. Its name comes from the version of the problem where a traveling salesman has to visit all towns in a region and then return to his home, and of course, he wants to minimize his travel costs. It is clear that mathematically, this is the same problem. It is easy to imagine that one and the same mathematical problem appears in connection with designing optimal delivery routes for mail, optimal routes for garbage collection, etc. The following important question leads to the same mathematical problem, except on an entirely different scale. A machine has to drill a number of holes in a printed circuit board (this number could be in the thousands), and then return to the starting point. In this case, the important quantity is the time it takes to move the drilling head from one hole to the next, since the total time a given board has to spend on the machine determines the number of boards that can be processed in a day. So if we take the time needed to move the head from one hole to another as the "cost" of this edge, we need to find a cycle with the holes as nodes, and with minimum cost. The Traveling Salesman Problem is closely related to Hamiltonian cycles. First of all, a traveling salesman tour is just a Hamiltonian cycle in the complete graph on the given set of nodes. But there is a more interesting connection: The problem of whether a given graph has a Hamiltonian cycle can be reduced to the Traveling Salesman Problem. Let G be a graph with n nodes. We define the "distance" of two nodes as follows: adjacent nodes have distance 1; nonadjacent nodes have distance 2. What do we know about the Traveling Salesman Problem on the set of nodes of G with this new distance function? If the graph contains a Hamiltonian cycle, then this is a traveling salesman tour of length n. If the graph has no Hamiltonian cycle, then the shortest traveling salesman tour has length at least n + 1. This shows that any algorithm that solves the Traveling Salesman Problem can be used to decide whether or not a given graph has a Hamiltonian cycle. The Traveling Salesman Problem is much more difficult than the problem of finding the cheapest tree, and there is no algorithm to solve it that would 162 9. Finding the Optimum be anywhere nearly as simple, elegant and efficient as the "optimistic" algorithm discussed in the previous section. There are methods that work quite well most of the time, but they are beyond the scope of this book. But we want to show at least one simple algorithm that, even though it does not give the best solution, never loses more than a factor of 2. We describe this algorithm in the case where the cost of an edge is just its length, but it would not make any difference to consider any other measure (like time, or the price of a ticket), as long as the costs c(ij) satisfy the triangle inequality: c(ij) + c(jk) ≥ c(ik). (9.1) (Distances in Euclidean geometry satisfy this condition by classical results in geometry: The shortest route between two points is a straight line. Airfares sometimes don't satisfy this inequality: It may be cheaper to fly from New York to Chicago to Philadelphia then to fly from New York to Philadelphia. But in this case, of course, we might consider the flight New York–Chicago–Philadelphia as one "edge," which does not count as a visit in Chicago. The distance function on a graph we introduced above when we discussed the connection between the Traveling Salesman Problem and Hamiltonian cycles satisfies the triangle inequality.) We begin by solving a problem we know how to solve: Find a cheapest tree connecting up the given nodes. We can use any of the algorithms discussed in the previous section for this. So we find the cheapest tree T , with total cost c. Now, how does this tree help in finding a tour? One thing we can do is to walk around the tree just as we did when constructing the "planar code" of a tree in the proof of Theorem 8.5.1 (see Figure 8.6). This certainly gives a walk that goes through each town at least once, and returns to the starting point. Of course, this walk may pass through some of the towns more than once. But this is good for us: We can make shortcuts. If the walk takes us from i to j to k, and we have seen j already, we can proceed directly from i to k. Doing such shortcuts as long as we can, we end up with a tour that goes through every town exactly once (Figure 9.3). Let us call the algorithm described above the Tree Shortcut Algorithm. Theorem 9.2.1 If the costs in a Traveling Salesman Problem satisfy the triangle inequality (9.1), then the Tree Shortcut Algorithm finds a tour that costs less than twice as much as the optimum tour. Proof. The cost of the walk around the tree is exactly twice the cost c of T , since we used every edge twice. The triangle inequality guarantees that we have only shortened our walk by doing shortcuts, so the cost of the tour we found is not more than twice the cost of the cheapest spanning tree. But we want to relate the cost of the tour we obtained to the cost of the optimum tour, not to the cost of the optimum spanning tree! Well, this is 9.2 The Traveling Salesman Problem 163 FIGURE 9.3. The cheapest tree connecting 15 given towns, the walk around it, and the tour produced by shortcuts (light edges on the right hand side are edges of the tree that are not used in the tour). Costs are proportional to distances. easy now: The cost of a cheapest spanning tree is always less than the cost of the cheapest tour. Why? Because we can omit any edge of the cheapest tour to get a spanning tree. This is a very special kind of tree (a path), and as a spanning tree it may or may not be optimal. However, its cost is certainly not smaller than the cost of the cheapest tree, but smaller than the cost of the optimal tour, which proves the assertion above. To sum up, the cost of the tour we constructed is at most twice that of the cheapest spanning tree, which in turn is less than twice the cost of a cheapest tour. 9.2.1 Is the tour in Figure 9.3 shortest possible? 9.2.2 Prove that if all costs are proportional to distances, then a shortest tour cannot intersect itself. Review Exercises 9.2.3 Prove that if all edge-costs are different, then there is only one cheapest tree. 9.2.4 Describe how you can find a spanning tree for which (a) the product of the edge-costs is minimal; (b) the maximum of the edge-costs is minimal. 164 9. Finding the Optimum 9.2.5 In a real-life government, optimists and pessimists win in unpredictable order. This means that sometimes they build the cheapest line that does not create a cycle with those lines already constructed; sometimes they mark the most expensive lines "impossible" until they get to a line that cannot be marked impossible without disconnecting the network, and then they build it. Prove that they still end up with the same cost. 9.2.6 If the seat of the government is town r, then quite likely the first line constructed will be the cheapest line out of r (to some town s, say), then the cheapest line that connects either r or s to a new town, etc. In general, there will be a connected graph of telephone lines constructed on a subset S of the towns including the capital, and the next line will be the cheapest among all lines that connect S to a node outside S. Prove that the lucky government still obtains a cheapest possible tree. 9.2.7 Find the shortest tour through the points of a (a) 3 × 3 square grid; (b) 4 × 4 square grid; (c) 5 × 5 square grid; (d) generalize to n × m grids. 9.2.8 Show by an example that if we don't assume the triangle inequality, then the tour found by the Tree Shortcut Algorithm can be longer than 1000 times the optimum tour. 10 Matchings in Graphs 10.1 A Dancing Problem At the prom, 300 students took part. They did not all know each other; in fact, every girl knew exactly 50 boys and every boy knew exactly 50 girls (we assume, as before, that acquaintance is mutual). We claim that the students can all dance simultaneously so that only pairs who know each other dance with each other. Since we are talking about acquaintances, it is natural to describe the situation by a graph (or at least, imagine the graph that describes it). So we draw 300 nodes, each representing a student, and connect two of them if they know each other. Actually, we can make the graph a little simpler: the fact that two boys, or two girls, know each other plays no role whatsoever in this problem: so we don't have to draw those edges that correspond to such acquaintances. We can then arrange the nodes, conveniently, so that the nodes representing boys are on the left, and nodes representing girls are on the right; then every edge will connect a node on the left to a node on the right. We shall denote the set of nodes on the left by A, the set of nodes on the right by B. This way we obtain a special kind of graph, called a bipartite graph. Figure 10.1 shows such a graph (of course, depicting a smaller party). The thick edges show one way to pair up people for dancing. Such a set of edges is called a perfect matching. 166 10. Matchings in Graphs FIGURE 10.1. A bipartite graph with a perfect matching. To be precise, let's give the definitions of these terms: A graph is bipartite if its nodes can be partitioned into two classes, say A and B, such that every edge connects a node in A to a node in B. A perfect matching is a set of edges such that every node is incident with exactly one of these edges. After this, we can formulate our problem in the language of graph theory as follows: We have a bipartite graph with 300 nodes, in which every node has degree 50. We want to prove that it contains a perfect matching. As before, it is good idea to generalize the assertion to any number of nodes. Let's be daring and guess that the numbers 300 and 50 play no role whatsoever. The only condition that matters is that all nodes have the same degree (and this is not 0). Thus we set out to prove the following theorem, named after the Hungarian mathematician D. K¨nig (who wrote o the first book on graph theory). Theorem 10.1.1 If every node of a bipartite graph has the same degree d ≥ 1, then it contains a perfect matching. Before proving the theorem, it will be useful to solve some exercises, and then discuss another problem in the next section. 10.1.1 It is obvious that for a bipartite graph to contain a perfect matching, it is necessary that |A| = |B|. Show that if every node has the same degree, then this is indeed so. 10.1.2 Show by examples that the conditions formulated in the theorem cannot be dropped: (a) A nonbipartite graph in which every node has the same degree need not contain a perfect matching. (b) A bipartite graph in which every node has positive degree (but not all the same) need not contain a perfect matching. 10.1.3 Prove Theorem 10.1.1 for d = 1 and d = 2. 10.2 Another matching problem 167 2 1 A 3 B C F E D 4 5 6 A, B areas of tribes ,... border between tribes border between tortoises 1, 2 . ,.. areas of tortoises FIGURE 10.2. Six tribes and six tortoises on an island 10.2 Another matching problem An island is inhabited by six tribes. They are on good terms and split up the island between them, so that each tribe has a hunting territory of 100 square miles. The whole island has an area of 600 square miles. The tribes decide that they all should choose new totems. They decide that each tribe should pick one of the six species of tortoise that live on the island. Of course, they want to pick different totems, and in such a way that the totem of each tribe should occur somewhere on their territory. It is given that the territories where the different species of tortoises live don't overlap, and they have the same area, 100 square miles (so it also follows that every part of the island is inhabited by some kind of tortoise). Of course, the way the tortoises divide up the island may be entirely different from the way the tribes do (Figure 10.2) We want to prove that such a selection of totems is always possible. To see the significance of the conditions, let's assume that we did not stipulate that the area of each tortoise species is the same. Then some species could occupy more, say, 200 square miles. But then it could happen that two of tribes are living on exactly these 200 square miles, and so their only possible choice for a totem would be one and the same species. Let's try to illustrate our problem by a graph. We can represent each tribe by a node, and also each species of tortoise by a node. Let us connect a tribenode to a tortoise-node if the species occurs somewhere on the territory of the tribe (we could also say that the tribe occurs on the territory of the 168 10. Matchings in Graphs species, just in case the tortoises want to pick totems too). Drawing the tribe-nodes on the left and the tortoise-nodes on the right makes it clear that we get a bipartite graph (Figure 10.3). And what is it that we want to prove? It is that this graph has a perfect matching! A B C D E F 1 2 3 4 5 6 FIGURE 10.3. The graph of tribes and tortoises So this is very similar to the problem discussed (but not solved!) in the previous section: We want to prove that a certain bipartite graph has a perfect matching. Theorem 10.1.1 says that for this conclusion it suffices to know that every node has the same degree. But this is too strong a condition; it is not at all fulfilled in our example (tribe B has only two tortoises to choose from, while tribe D has four). So what property of this graph should guarantee that a perfect matching exists? Turning this question around: What would exclude a perfect matching? For example, it would be bad if a tribe could not find any tortoises on its own territory. In the graph, this would correspond to a node with degree 0. Now this is not a danger, since we know that tortoises occur everywhere on the island. It would also be bad (and this has come up already) if two tribes could only choose one and the same tortoise. But then this tortoise would have an area of at least 200 square miles, which is not the case. A somewhat more subtle sort of trouble would arise if three tribes had only two tortoises on their combined territory. But this, too, is impossible: The two species of tortoises would cover an area of at least 300 square miles, so one of them would have to cover more than 100. More generally, we can see that the combined territory of any k tribes holds at least k species of tortoises. In terms of the graph, this means that for any k nodes on the left, there are 10.3 The Main Theorem 169 at least k nodes on the right connected to at least one of them. We'll see in the next section that this is all we need to observe about this graph. 10.3 The Main Theorem Now we state and prove a fundamental theorem about perfect matchings. This will complete the solution of the problem about tribes and tortoises, and (with some additional work) of the problem about dancing at the prom (and some problems further down the road from the prom, as its name shows). Theorem 10.3.1 (The Marriage Theorem) A bipartite graph has a perfect matching if and only if |A| = |B| and for any subset of (say) k nodes of A there are at least k nodes of B that are connected to at least one of them. This important theorem has many variations; some of these occur in the exercises. These were discovered by the German mathematician G. Frobenius, by the Hungarian D. K¨nig, the American P. Hall, and others. o Before proving this theorem, let us discuss one more question. If we interchange "left" and "right," perfect matchings remain perfect matchings. But what happens to the condition stated in the theorem? It is easy to see that it remains valid (as it should). To see this, we have to argue that if we pick any set S of k nodes in B, then they are connected to at least k nodes in A. Let n = |A| = |B| and let us color the nodes in A connected to nodes in S black, the other nodes white (Figure 10.4). Then the white nodes are connected to at most n−k nodes (since they are not connected to any node in S). Since the condition holds "from left to right," the number of white nodes is at most n − k. But then the number of black nodes is at least k, which proves that the condition also holds "from right to left." Proof. Now we can turn to the proof of Theorem 10.3.1. We shall have to refer to the condition given in the theorem so often that it will be convenient to call graphs satisfying this conditions "good" (just for the duration of this proof). Thus a bipartite graph is "good" if it has the same number of nodes left and right, and any k "left" nodes are connected to at least k "right" nodes. It is obvious that every graph with a perfect matching is "good," so what we need to prove is the converse: Every "good" graph contains a perfect matching. For a graph on just two nodes, being "good" means that these two nodes are connected. Thus for a graph to have a perfect matching means that it can be partitioned into "good" graphs with 2 nodes. (To partition a graph means that we divide the nodes into classes, and keep an edge between two nodes only if they are in the same class.) 170 10. Matchings in Graphs n-k k FIGURE 10.4. The good graph is also good from right to left. Now our plan is to partition our graph into two "good" parts, then partition each of these into two "good" parts, etc., until we get "good" parts with 2 nodes. Then the edges that remain form a perfect matching. To carry out this plan, it suffices to prove that if a "good" bipartite graph has more than 2 nodes, then it can be partitioned into two good bipartite graphs. Let us try a very simple partition first: Select nodes a ∈ A and b ∈ B that are connected by an edge; let these two nodes be the first part, and the remaining nodes the other. There is no problem with the first part: it is "good." But the second part may not be good: It can have some set S of k nodes on the left connected to fewer than k nodes on the right (Figure 10.5). In the original graph, these k nodes were connected to at least k nodes in B; this can hold only if the kth such node was the node b. Let T denote the set of neighbors of S in the original graph. What is important to remember is that |S| = |T |. Now we try another way of partitioning the graph: We take S ∪ T (together with the edges between them) as one part, and the rest of the nodes as the other. (This rest is not empty: The node a belongs to it, for example.) Let's argue that both these parts are "good." Take the first graph first. Take any subset of, say, j nodes in S (the left-hand side of the first graph). Since the original graph was good, they are connected to at least j nodes, which are all in T by the definition of T . 10.4 How to Find a Perfect Matching 171 a b k k-1 FIGURE 10.5. Goodness lost when two nodes are removed For the second graph, it follows similarly that it is good if we interchange "left" and "right." This completes the proof. We still have to prove Theorem 10.1.1. This is now quite easy and is left to the reader as Exercise 10.3.1. 10.3.1 Prove that if in a bipartite graph every node has the same degree d = 0, then the bipartite graph is "good" (and hence contains a perfect matching; this proves Theorem 10.1.1). 10.3.2 Suppose that in a bipartite graph, for any subset X of nodes of A there are at least |X| nodes in B that are connected to one of them (but in contrast to Theorem 10.3.1, we don't assume that |A| = |B|). Prove that there is a set of edges that match every node of A with a node of B, where different nodes of A are matched with different nodes of B (but some nodes of B may remain unmatched). 10.4 How to Find a Perfect Matching We have a condition for the existence of a perfect matching in a graph that is necessary and sufficient. Does this condition settle this issue once and for all? To be more precise: Suppose that somebody gives us a bipartite graph; what is a good way to decide whether it contains a perfect matching? And how do we find a perfect matching if there is one? 172 10. Matchings in Graphs We may assume that |A| = |B| (where, as before, A is the set of nodes on the left and B is the set of nodes on the right). This is easy to check, and if it fails, then it is obvious that no perfect matching exists, and we have nothing else to do. One thing we can try is to look at all subsets of the edges, and see whether any of these is a perfect matching. It is easy enough to do so; but there are terribly many subsets to check! Say, in our introductory example, we have 300 nodes, so |A| = |B| = 150; every node has degree 50, so the number of edges is 150 · 50 = 7500; the number of subsets of a set of this size is 27500 > 102257 , a number that is more than astronomical. We can do a little bit better if instead of checking all subsets of the edges, we look at all possible ways to pair up elements of A with elements of B, and check whether any of these pairings matches only nodes that are connected to each other by an edge. Now the number of ways to pair up the nodes is "only" 150! ≈ 10263 . Still hopeless. Can we use Theorem 10.3.1? To check that the necessary and sufficient condition for the existence of a perfect matching is satisfied, we have to look at every subset S of A, and see whether the number of it neighbors in B is at least as large as S itself. Since the set A has 2150 ≈ 1045 subsets, this takes a much smaller number of cases to check than any of the previous possibilities, but still astronomical! So Theorem 10.3.1 does not really help too much in deciding whether a given graph has a perfect matching. We have seen that it does help in proving that certain properties of a graph imply that the graph has a perfect matching. We'll come back to this theorem later and discuss its significance. Right now, we have to find some other way to deal with our problem. Let us introduce one more expression: By a matching we mean a set of edges that have no endpoint in common. A perfect matching is the special case when, in addition, the edges cover all the nodes. But a matching can be much smaller: the empty set, or any edge by itself, is a matching. Let's try to construct a perfect matching in our graph by starting with the empty set and building up a matching one by one. So we select two nodes that are connected, and mark the edge between them; then we select two other nodes that are connected, and mark the edge between them etc. we can do this until no two unmatched nodes are connected by an edge. The edges we have marked form a matching M . This is often called the greedy matching, since it is constructed greedily, without consideration for the future consequences of our choice. If we are lucky, then the greedy matching is perfect, and we have nothing else to do. But what do we do if M is not perfect? Can we conclude that the graph has no perfect matching at all? No, we cannot; it may happen that the graph has a perfect matching, but we made some unlucky choices when selecting the edges of M . 10.4 How to Find a Perfect Matching 173 10.4.1 Show by an example that it may happen that a bipartite graph G has a perfect matching, but if we are unlucky, the greedy matching M constructed above is not perfect. 10.4.2 Prove that if G has a perfect matching, then every greedy matching matches up at least half of the nodes. So suppose that we have constructed a matching M that is not perfect. We have to try to increase its size by "backtracking," i.e., by deleting some of its edges and replacing them by more edges. But how do we find the edges we want to replace? The trick is the following. We look for a path P in G of the following type: P starts and ends at nodes u and v that are unmatched by M ; and every second edge of P belongs to M (Figure 10.6). Such a path is called an augmenting path. It is clear that an augmenting path P contains an odd number of edges, and in fact, the number of its edges not in M is one larger than the number of its edges in M . u v Edges in M Edges in P not in M FIGURE 10.6. An augmenting path in a bipartite graph. 174 10. Matchings in Graphs If we find an augmenting path P , we can delete those edges of P that are in M and replace them by those edges of P that are not in M . It is clear that this results in a matching M that is larger than M by one edge. (The fact that M is a matching follows from the observation that the remaining edges of M cannot contain any node of P : The two endpoints of P were supposed to be unmatched, while the interior nodes of P were matched by edges of M that we deleted.) So we can repeat this until we get either a perfect matching or a matching M for which no augmenting path exists. So we have two questions to answer: how do we find an augmenting path if it exists? And if it does not exist, does this mean that there is no perfect matching at all? It will turn out that an answer to the first question will also imply the (affirmative) answer to the second. Let U be the set of unmatched nodes in A and let W be the set of unmatched nodes in B. As we noted, any augmenting path must have an odd number of edges, and hence it must connect a node in U to a node in W . Let us try to find such an augmenting path starting from some node in U . Let's say that a path Q is almost augmenting if it starts at a node in U , ends at a node in A, and every second edge of it belongs to M . An almost augmenting path must have an even number of edges, and must end with an edge of M . What we want to do is to find the set of nodes in A that can be reached on an almost augmenting path. Let's agree that we consider a node in U to be an almost augmenting path in itself (of length 0); then we know that every node in U has this property. Starting with S = U , we build up a set S gradually. At any stage, the set S will consist of nodes we already know are reachable by some almost augmenting path. We denote by T the set of nodes in B that are matched with nodes in S (Figure 10.7). Since the nodes of U have nothing matched with them and they are all in S, we have |S| = |T | + |U |. We look for an edge that connects a node s ∈ S to some node r ∈ B that is not in T . Let Q be an almost augmenting path starting at some node u ∈ U and ending at s. Now there are two cases to consider: — If r is unmatched (which means that it belongs to W ), then by appending the edge sr to Q we get an augmenting path P . So we can increase the size of M (and forget about S and T ). — If r is matched with a node q ∈ A, then we can append the edges sr and rq to Q to get an almost augmenting path from U to q. So we can add q to S. So if we find an edge connecting a node in S to a node not in T , we can increase either the size of M or the set S (and leave M as it was). Sooner or later we must encounter a situation where either M is a perfect matching 10.4 How to Find a Perfect Matching 175 U S s r? W T q r? FIGURE 10.7. Reaching nodes by almost augmenting paths. Only edges on these paths, and of M , are shown. (and we are done), or M is not perfect, but no edge connects S to any node outside T . So what are we to do in this case? Nothing! If this occurs, we can conclude that there is no perfect matching at all. In fact, all neighbors of the set S are in T , and |T | = |S| − |U | < |S|. We know that this implies that there is no perfect matching at all in the graph. Figure 10.8 shows how this algorithm finds a matching in the bipartite graph that is a subgraph of the "grid." To sum up, we do the following. At any point in time, we will have a matching M and a set S of nodes in A that we know can be reached on almost augmenting paths. If we find an edge connecting S to a node not matched with any node in S, we can either increase the size of M or the set S, and repeat. If no such edge exists, then either M is perfect or no perfect matching exists at all. Remark. In this chapter we restricted our attention to matchings in bipartite graphs. One can, of course, define matchings in general (nonbipartite) graphs. It turns out that both the necessary and sufficient condition given in Theorem 10.3.1 and the algorithm described in this section can be extended to nonbipartite graphs. However, this requires methods that are quite a bit more involved, which lie beyond the scope of this book. 10.4.3 Follow how the algorithm works on the graph in Figure 10.9. 10.4.4 Show how the description of the algorithm above contains a new proof of Theorem 10.3.1. 176 10. Matchings in Graphs (a) (b) (c) (d) FIGURE 10.8. (a) The graph in which we want to find a perfect matching. (b) Pick a starting matching, and mark the unmatched nodes. There are 3 black and 3 white unmatched nodes. Broken lines indicate an augmenting path. (c) The new matching and the unmatched nodes after augmentation. Broken lines indicate a new augmenting path (much longer this time). (d) The final situation: Nodes that are accessible on almost augmenting paths are marked black. They have fewer neighbors than their number, so the matching is maximum. Review Exercises 10.4.5 Is there a bipartite graph with degrees 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, 6? (These can be distributed in the two classes of nodes arbitrarily.) 10.4.6 A bipartite graph has 16 nodes of degree 5, and some nodes of degree 8. We know that all degree-8 nodes are on the left hand side. How many degree 8 nodes can the graph have? 10.4.7 Let G be a bipartite graph with the same number of nodes on both sides. Suppose that every nonempty subset A on the left has at least |A| + 1 neighbors on the right. Prove that each edge of G can be extended to a perfect matching of G. 10.4 How to Find a Perfect Matching 177 FIGURE 10.9. A graph for trying out the algorithm. 10.4.8 Now suppose that we have the weaker condition that every nonempty subset A on the left has at least |A| − 1 neighbors on the right. Prove that G contains a matching that matches up all but one node on each side. 10.4.9 Let G be a bipartite graph with m nodes on both sides. Prove that if each node has degree larger than m/2, then it has a perfect matching. 10.4.10 Does the graph in Figure 10.10 have a perfect matching? FIGURE 10.10. A truncated chessboard. 10.4.11 Draw a graph whose nodes are the subsets of {a, b, c}, and for which two nodes are adjacent if and only if they are subsets that differ in exactly one element. (a) What is the number of edges and nodes in this graph? Can you name this graph? (b) Is this graph connected? Does it have a perfect matching? Does it have a Hamilton cycle? 178 10. Matchings in Graphs 10.4.12 Draw a graph whose nodes are the 2-subsets of {a, b, c, d, e}, and two nodes are adjacent if and only if they are disjoint subsets. (a) Show that you get the Petersen graph (Figure 7.13). (b) How many perfect matchings does the Petersen graph have? 10.4.13 (a) How many perfect matchings does a path on n nodes have? (b) How many matchings (not necessarily perfect) does a path on n nodes have? [Find a recurrence first.] (b) How many matchings does a cycle on n nodes have? 10.4.14 Which 2-regular bipartite graph with n nodes has the largest number of perfect matchings? 10.4.15 How many perfect matchings does the "ladder" with 2n nodes (Figure 10.11) have? ... ... FIGURE 10.11. The ladder graph. 11 Combinatorics in Geometry 11.1 Intersections of Diagonals At first you may be surprised: What is the connection between combinatorics and geometry? There are many geometric questions that can be solved by combinatorial methods, but the opposite case may also occur: We can solve combinatorial exercises and problems using geometrical tools. Consider a convex polygon with n vertices. (We call a polygon convex if every angle of it is convex, i.e., less than 180◦ .) Assume that it has no 3 diagonals going through the same point. How many intersection points do the diagonals have? (The vertices are not counted as intersections, and we do not consider intersections of diagonals outside the n-gon. In Figure 11.1, the black point is a "good" intersection, so it is counted, but the circled point outside the polygon is not counted.) FIGURE 11.1. 180 11. Combinatorics in Geometry The first natural idea to solve this problem is the following: Count the intersection points on each diagonal, and then add up these numbers. Let's follow through this method in the case of a hexagon (Figure 11.2). First consider a diagonal which connects two second-neighboring vertices of the hexagon, say these are A and C. This diagonal AC intersects all three diagonals that start in B, which means that there are three intersections on the diagonal AC. There are six diagonals of this type, so altogether we count 6 · 3 = 18 intersections. C D E B C D E B C D E B A F A F A F FIGURE 11.2. Now consider a diagonal that connects two opposite vertices of the hexagon, say AD. One can see in the figure that there are four intersections on this diagonal. We have three diagonals of this type, which means that we get 3 · 4 = 12 further intersections. Is it true that we have 18+12 = 30 intersections? We must be more careful! The intersection of the diagonals AC and BD was counted twice: Once when we considered the intersections on AC, and also when we counted the intersections on BD. The same holds for any other intersection too: we counted all of them exactly twice. So we have to divide our result by 2, so our final, correct result is 15, which can be easily checked in the figure. One can see that already for the case of such a small n, we have to consider several cases, so our method is too complicated, even though it can be carried through for arbitrary n (try it!). But we can find a much more elegant enumeration of the intersections if we use our combinatorial knowledge. Label every intersection point by the endpoints of the diagonals intersecting at this point. For instance, the intersection of the diagonals AC and BD gets the label ABCD, the intersection of the diagonals AD and CE gets the label ACDE, and so on. Is this labeling good, by which we mean that different intersection points get different labels? The labeling is good, since the labels A, B, C, D are given only to the intersection of the diagonals of the convex quadrilateral ABCD (AC and BD). Furthermore, every set of 4 vertices are used to label an intersection point of the diagonals; for instance, the 4-tuple ACEF denotes the intersection of the diagonals AE and CF (Figure 11.3). 11.2 Counting regions ABEF A £ ¤ £ ¤ 181 B F D ACDE FIGURE 11.3. Now if we want to count all the intersection points, it suffices to count quadruples of vertices; the number of intersections of the diagonals is just the number of 4-element subsets of the set of vertices. So if n = 6, then it is 6 , which we may compute even faster, if we recall that it is the same 4 as 6 = 6·5 = 15. In general, we get n intersections of diagonals of a 2·1 2 4 convex n-gon. 11.1.1 How many diagonals does a convex n-gon have? 11.2 Counting regions Let us draw n lines in the plane. These lines divide the plane into some number of regions. How many regions do we get? The first thing to notice is that this question does not have a single answer. For example, if we draw two lines, we get 3 regions if the two are parallel, and 4 regions if they are not. OK, let us assume that no two of the lines are parallel; then 2 lines always give us 4 regions. But if we go on to three lines, we get 6 regions if the lines go through one point, and 7 regions if they do not (Figure 11.4). 4 1 2 3 1 2 3 FIGURE 11.4. OK, let us also exclude this, and assume that no 3 lines go through the same point. One might expect that the next unpleasant example comes with 4 lines, but if you experiment with drawing 4 lines in the plane, with no two ¢ ¢ C E 6 1 5 4 3 2 1 6 5 7 2 4 3 182 11. Combinatorics in Geometry parallel and no three going through the same point, then you invariably get 11 regions. In fact, we'll have a similar experience for any number of lines (check this in Figure 11.5). FIGURE 11.5. Four lines determine 11 regions, five lines determine 16. A set of lines in the plane such that no two are parallel and no three go through the same point is said to be in general position. If we choose the lines "randomly," then accidents like two being parallel or three going through the same point will be very unlikely, so our assumption that the lines are in general position is quite natural. Even if we accept that the number of regions is always the same for a given number of lines, the question still remains, what is this number? Let us collect our data in a little table (including also the observation that 0 lines divide the plane into 1 region, and 1 line divides the plane into 2): 0 1 1 2 2 4 3 7 4 11 Staring at this table for a while, we observe that each number in the second row is the sum of the number above it and the number to the left of it. This suggests a rule: The nth entry is n plus the previous entry. In other words: If we have a set of n − 1 lines in the plane in general position, and add a new line (preserving general position), then the number of regions increases by n. Let us prove this assertion. How does the new line increase the number of regions? By cutting some of them into two. The number of additional regions is just the same as the number of regions intersected. So, how many regions does the new line intersect? At a first glance, this is not easy to answer, since the new line can intersect very different sets of regions, depending on where we place it. But imagine walking along the new line, starting from very far away. We get to a new region every time we cross a line. So the number of regions the new line intersects is one larger than the number of crossing points on the new line with other lines. Now, the new line crosses every other line (since no two lines are parallel), and it crosses them in different points (since no three lines go through the same point). Hence during our walk, we see n − 1 crossing points. So we see n different regions. This proves that our observation about the table is true for every n. 11.2 Counting regions 183 We are not done yet; what does this give for the number of regions? We start with 1 region for 0 lines, and then add to it 1, 2, 3, . . . , n. This way we get n(n + 1) 1 + (1 + 2 + 3 + · · · + n) = 1 + 2 (in the last step we used the "young Gauss' problem from Chapter 1). Thus we have proved: Theorem 11.2.1 A set of n lines in general position in the plane divides the plane into 1 + n(n + 1)/2 regions. 11.2.1 Describe a proof of Theorem 11.2.1 using induction on the number of lines. Let us give another proof of Theorem 11.2.1. Proof. This time, we will not use induction, but rather try to relate the number of regions to other combinatorial problems. One gets a hint from writing the number in the form 1 + n + n . 2 FIGURE 11.6. Assume that the lines are drawn on a vertical blackboard (Figure 11.6), which is large enough so that all the intersection points appear on it. We also assume that no line is perfectly horizontal (it it is, we tilt the picture a little), and that the blackboard is very long, so that every line intersects the bottom edge of the blackboard. We may also assume that the lower ¢ ¢ 184 11. Combinatorics in Geometry edge of the blackboard tilts a little to the left (else, we tilt the blackboard by a tiny amount). Now consider the lowest point in each region on the blackboard. Each region has exactly one lowest point, since all regions are finite, and the bordering lines are not horizontal. This lowest point is then an intersection point of two of our lines, or the intersection point of a line with the lower edge of the blackboard, or the lower left corner of the blackboard. Furthermore, each of these points is the lowest point of one and only one region. For example, if we consider any intersection point of two lines, then we see that four regions meet at this point, and the point is the lowest point of exactly one of them. Thus the number of lowest points is the same as the number of intersection points of the lines, plus the number of intersection points between lines and the lower edge of the blackboard, plus one for the lower left corner of the blackboard. Since any two lines intersect, and these intersection points are all different (this is where we use that the lines are in general position), the number of such lowest points is n + n + 1. 2 11.3 Convex Polygons Let us finish our excursion to combinatorial geometry with a problem that can be easily stated, but which is still unsolved. It is often called the Happy End Problem, because the mathematician who raised it, Esther Klein, and the mathematician who proved the first bounds on it, Gy¨rgy Szekeres o (together with P´l Erd˝s), got married shortly after. a o We start with an exercise: Prove that if we are given five points in the plane such that no three of them are on a line, then we can always find four points among them that form the vertices of a convex quadrilateral. For a quadrilateral, convexity means that the two diagonals intersect inside the quadrilateral. In Figure 11.7, the first quadrilateral is convex; the second is concave. FIGURE 11.7. A convex and a concave quadrilateral. 11.3 Convex Polygons 185 In the sequel, for the sake of brevity we will say that certain points are in general position, if no three of them are on a line. Imagine that our five points (in general position) are drawn on the blackboard. Let us hammer nails into the points (only in imagination!) and stretch a rubber band around them. The rubber band encloses a convex polygon, the vertices of which are among the original points, and the other points are inside of this polygon. This polygon is called the convex hull of the points (Figure 11.8). FIGURE 11.8. The convex hull of a set of points in the plane. Using this construction, it is quite easy to solve our problem. What can we get as the convex hull of our five points? If this is a pentagon, then any four of these points form a convex quadrilateral, and we are done. If the convex hull is a quadrilateral, then this quadrilateral itself is the desired convex quadrilateral. So we may assume that the convex hull is a triangle. Let's denote the vertices of this triangle by A, B, and C, and the two other given points by D and E. The points D and E are inside the triangle ABC, so the line through D and E intersects the circumference of the triangle in two points. Assume that these two points are on the sides AB and AC (if this is not the case, then we can relabel the vertices of the triangle). Now you can easily show that the points B, C, D, and E form the vertices of a convex quadrilateral (see Figure 11.9). The next fact in the line concerns convex pentagons. If we have 9 points in the plane in general position, then one can choose five points among them that are the vertices of a convex pentagon. The proof of this statement is too lengthy to give it as an exercise, but the reader may try to work out a proof. 11.3.1 Draw eight points in the plane in such a way that no five of them span a convex pentagon. One can give 16 points in general position in the plane such that no 6 of them form a convex hexagon. Nobody has been able to construct 17 186 11. Combinatorics in Geometry A D E C B FIGURE 11.9. Finding a convex quadrilateral. points with this property, and in fact (as we are writing this), substantial computer assisted research is underway to show that one can always find a convex hexagon among any 17 points in general position in the plane. More generally, we can ask, How many points (in general position) do we need to make sure that we find a convex n-gon among them? In other words: What is the maximum number of points in the plane, in general position, that do not contain the vertices of a convex n-gon? If we make a table from the known cases, it is not too hard to conjecture the answer: n 2 1 3 2 4 4 5 8 6 16? (We didn't mention the cases for n = 2 and 3 before, because these are not interesting, but for the sake of completeness we added them to the table. The "twogon" is nothing but a segment, so it is convex, and every triangle is convex as well.) We may notice that the number of points not containing a convex n-gon doubles as n increases by 1, at least in the known cases. It is natural to suppose that this will be the truth for larger numbers too, so the conjectured number is 2n−2 . It is known that for every n > 1, there exists a set of 2n−2 points in the plane, in general position, that do not contain a convex n-gon. But whether or not one more point guarantees a convex n-gon is still unknown as of today. Review Exercises 11.3.2 Given n ≥ 3 lines in the plane in general position (no two are parallel and no three go through a point), prove that among the regions they divide the plane into, there is at least one triangle. 11.3 Convex Polygons 11.3.3 Into how many parts do two triangles divide the plane? 11.3.4 Into how many parts do two quadrilaterals divide the plane, if (a) they are convex, (b) they are not necessarily convex? 11.3.5 Into how many parts do two convex n-gons divide the plane? 187 11.3.6 Into how many parts can n circles divide the plane, maximum and minimum? 11.3.7 Prove that 6 points in the plane, no 3 on a line, form at least 3 convex quadrilaterals. 11.3.8 Given a set S of 100 points in the plane, no 3 on a line, show that there is a convex polygon whose vertices are in the set S and that contains exactly 50 points of S (including its vertices). This page intentionally left blank 12 Euler's Formula 12.1 A Planet Under Attack In Chapter 11 we considered problems that can be cast in the language of graph theory: If we draw some special graphs in the plane, into how many parts do these graphs divide the plane? Indeed, we start with a set of lines; we consider the intersections of the given lines as nodes of the graph, and the segments arising on these lines as the edges of our graph. (For the time being, let us forget about the infinite half-lines. We'll come back to the connection between graphs and sets of lines later.) More generally, we study a planar map: a graph that is drawn in the plane so that its edges are nonintersecting continuous curves. We also assume that the graph is connected. Such a graph divides the plane into certain parts, called countries. Exactly one country is infinite, the other countries are finite. A very important result, discovered by Euler, tells us that we may determine the number of countries in a connected planar map if we know the number of nodes and edges of the graph. Euler's Formula is the following: Theorem 12.1.1 number of countries + number of nodes = number of edges + 2. Proof. To make the proof of this theorem more plausible, we'll tell a little story. This does not jeopardize the mathematical correctness of our proof. Let us consider the given planar map as the map of a water system of a planet with a single very low continent. We consider the edges not as 190 12. Euler's Formula boundaries between countries but as dams, with watchtowers at the nodes. So the enclosed areas are not countries, but basins. The outermost "basin" is the sea, and all the other "basins" are dry (Figure 12.1). One advantage of this formulation is that we can allow a cut-edge in the graph, which we can think of as a kind of dam, or pier; this could not be considered as a boundary of two countries, since on both sides of it we would have the same ''country" (in this case, the sea). FIGURE 12.1. A graph of dams and watchtowers. There are 14 watchtowers, 7 basins (including the see), and 19 dams. Euler's Formula checks our: 14 + 7 = 19 + 2. One day, an enemy attacks the island, and the defenders decide to flood it with seawater by blowing up certain dams. The defenders are hoping to defeat the attack and return to their island, so they try to blow up the smallest possible number of dams. They figured out the following procedure: They blow up one dam at a time, and then only in the case if one side of the dam is already flooded, and the other side is dry. After the destruction of this dam the ocean fills up the previously dry basin with seawater. Notice that all the other dams (edges) around this basin are intact at this stage (because whenever a dam is blown up, the basins on both sides of it are flooded), so the seawater fills up only this particular basin. In Figure 12.2 we have indicated by numbers one possible order in which the dams can be blown up to flood the whole island. Let us count the number of destroyed and intact dams. We denote the number of watchtowers (nodes) by v, the number of dams (edges) by e, and the number of basins, including the ocean, by f (we'll give an explanation later why are we using these letters). To flood all the f − 1 basins of the island, we had to destroy exactly f − 1 dams. To count the surviving dams, let us look at the graph remaining after the explosions (Figure 12.3). First, one can notice that it contains no cycles, because the interior of any cycle would have remained dry. A second observation is that the remaining system of dams forms a connected graph, since every dam that was blown up was an edge of a cycle (the boundary 12.1 A Planet Under Attack 191 1 2 3 4 6 5 FIGURE 12.2. Flooding the island. To flood 6 basins, 6 dams must be blown up. FIGURE 12.3. The island flooded. 13 dams remain intact, forming a tree. of the basin that was flooded by this last explosion), and we know from exercise 7.2.5(b) that omitting such an edge would not destroy the connectivity of our graph. So the resulting graph after the explosions is connected and does not contain any cycle; therefore, it is a tree. Now we apply the important fact that if a tree has v nodes, than it has v − 1 edges. Summarizing what we have learned, we know that f −1 dams were blown up and v − 1 dams survived. So the number of edges is the sum of these two numbers. Expressing this fact as an equation yields (v − 1) + (f − 1) = e. Rearranging, we get f + v = e + 2, and this is just Euler's Formula. 12.1.1 Into how many parts do the diagonals divide a convex n-gon (we assume that no 3 diagonals go through the same point)? 12.1.2 On a circular island we build n straight dams going from sea to sea, so that every two intersect but no three go through the same point. Use Euler's Formula to determine how many parts we get. As a hint look at Figure 12.4 (the solution of this exercise will be the third method for solving the same problem). 192 12. Euler's Formula FIGURE 12.4. The planar map given by n straight lines. 12.2 Planar Graphs Which graphs can be drawn as planar maps? This question is important not only because we want to know to which graphs we can apply Euler's Formula, but also in many applications of graph theory, for example, placing a network on a printed circuit board. A graph is called planar if it can be drawn as a map in the plane, that is, if we can represent its nodes by different points in the plane, and its edges by curves connecting the appropriate points in such a way that these curves don't intersect each other (except, of course, when two edges have a common endpoint, in which case the two corresponding curves will have this one common point). Are there graphs that are not planar? As a nice application of Euler's Formula, we can prove the following: Theorem 12.2.1 The complete graph K5 on five nodes is not a planar graph. One could prove this by distinguishing a large number of cases and using various intuitive but potentially misleading properties of curves in the plane. But we are able to give an elegant proof now, using Euler's Formula. Proof. Our proof is indirect: Assuming that K5 can be drawn in the plane without any edges crossing, we get a contradiction. (It is not surprising that we are not able to provide a figure, since the impossibility of such a figure is what we want to prove.) Let us compute the number of countries that we would have in such a drawing. We have 5 nodes and 5 = 10 edges; 2 hence the number of countries is, by Euler's Formula, 10 + 2 − 5 = 7. Every country has at least 3 edges on its boundary, so we must have at least 3·7 2 = 10.5 edges. (We had to divide by 2, because we counted every edge 12.2 Planar Graphs 193 for two different countries.) The assumption that K5 is planar led us to a contradiction, namely, 10 > 10.5, so our assumption must have been false, and the complete graph on 5 nodes (K5 ) is not planar. One of the most interesting phenomena in mathematics occurs when in the proof of some result one can make use of theorems that at a first glance do not have any connection with the actual problem. Would any of you guess that one can use the nonplanarity of the complete graph on five points to give another proof of the starting exercise of Section 11.3? Given our five points in the plane, connect any two of them by a segment. The resulting graph is a complete graph on five vertices, which is not a planar graph, as we already know; therefore, we can find two segments that intersect each other. The four endpoints of these two segments form a quadrilateral whose diagonals intersect; therefore, this quadrilateral is convex. As another application of Euler's Formula, let's answer the following question: How many edges can a planar map with n nodes have? Theorem 12.2.2 A planar graph on n nodes has at most 3n − 6 edges. Proof. The derivation of this bound is quite similar to our argument above showing that K5 is not a planar graph. Let the graph have n nodes, e edges, and f faces. We know by Euler's Formula that n + f = e + 2. We obtain another relation among these numbers if we count edges face by face. Each face has at least 3 edges on its boundary, so we count at least 3f edges. Every edge is counted twice (it is on the border of two faces), so the number of edges is at least 3f /2. In other words, f ≤ 2 e. Using this 3 with Euler's Formula, we get 2 e + 2 = n + f ≤ n + e, 3 which after rearrangement gives e ≤ 3n − 6. 12.2.1 Is the graph obtained by omitting an edge of K5 planar? 12.2.2 There are three houses and three wells. Can we build a path from every house to every well so that these paths do not cross? (The paths are not necessarily straight lines.) 194 12. Euler's Formula 12.3 Euler's Formula for Polyhedra There is still an apparently irrelevant question to deal with. Why did we denote the number of countries by f ? Well, this is the starting letter of the word face. When Euler was trying to find "his" formula, he was studying polyhedra (solids bounded by plane polygons) like the cube, pyramids, and prisms. Let us count for some polyhedra the number of faces, edges, and vertices (Table 12.1). Polyhedron cube tetrahedron triangular prism pentagonal prism pentagonal pyramid dodecahedron icosahedron # of vertices 8 4 6 10 6 20 12 TABLE 12.1. # of edges 12 6 9 15 10 30 30 # of faces 6 4 5 7 6 12 20 (You don't know what the dodecahedron and icosahedron are? These are two very pretty regular polyhedra; their faces are regular pentagons and triangles, respectively. They can be seen in Figure 12.5.) FIGURE 12.5. Two regular polyhedra: the dodecahedron and the icosahedron. Staring at these numbers for a little while, one discovers that in every case the following relation holds: number of faces + number of vertices = number of edges + 2. This formula strongly resembles Euler's Formula; the only difference is that instead of nodes, we speak of vertices, and instead of countries, here we speak of faces. This similarity is not a coincidence; we may get the formula for polyhedra from the formula for planar maps very easily as follows. Imagine that our polyhedron is made out of rubber. Punch a hole 12.3 Euler's Formula for Polyhedra 195 into one of the faces and blow it up like balloon. The most familiar solids will be blown up to spheres (for instance the cube and prism). But we have to be careful here: There are solids that cannot be blown up to a sphere. For instance, the "picture frame" shown on Figure 12.6 blows up to a "torus," similar to a life buoy (or doughnut). Be careful, the above relation holds only for solids that can be blown up to spheres! (Just to reassure you, all the convex solids can be blown up to spheres.) Now grab the rubber sphere at the side of the hole and stretch it until you get a huge rubber plane. If we paint the edges of the original solid with black ink, then we will see a map on the plane. The nodes of this map are the vertices of the solid, the edges are the edges of the solid, and the countries are the faces of the body. Therefore, if we use Euler's Formula for maps, we get Euler's Formula for polyhedra (Euler himself stated the theorem in the polyhedral form). FIGURE 12.6. A nonconvex polyhedron that blows up to a torus. Review Exercises 12.3.1 Is the complement of the cycle of length 6 (C6 ) a planar graph? 12.3.2 Take a hexagon and add the three longest diagonals. Is the graph obtained this way planar? 12.3.3 Does the "picture frame" polyhedron in Figure 12.6 satisfy Euler's Formula? 12.3.4 Prove that a planar bipartite graph on n nodes has at most 2n−4 edges. 12.3.5 Using Euler's Formula, show that the Petersen graph is not planar. 12.3.6 A convex polyhedron has only pentagonal and hexagonal faces. Prove that it has exactly 12 pentagonal faces. 12.3.7 Every face of a convex polyhedron has at least 5 vertices, and every vertex has degree 3. Prove that if the number of vertices is n, then the number of edges is at most 5(n − 2)/3. 196 12. Euler's Formula 12.3.8 Does the "picture frame" polyhedron in Figure 12.6 satisfy Euler's Formula? 13 Coloring Maps and Graphs 13.1 Coloring Regions with Two Colors We draw some circles on the plane (say, n in number). These divide the plane into a number of regions. Figure 13.1 shows such a set of circles, and also an "alternating" coloring of the regions with two colors; it gives a nice pattern. Now our question is, can we always color these regions this way? We'll show that the answer is yes. Let us state this more exactly: Theorem 13.1.1 The regions formed by n circles in the plane can be colored with red and blue in such a way that any two regions that share a common boundary arc will be colored differently. (If two regions have only one or two boundary points in common, then they may get the same color.) Let us first see why a direct approach to proving this theorem does not work. We could start with coloring the outer region, say blue; then we have to color its neighbors red. Could it happen that two neighbors are at the same time neighbors of each other? Perhaps drawing some pictures and then arguing carefully about them, you can design a proof that this cannot happen. But then we have to color the neighbors of the neighbors blue again, and we would have to prove that no two of these are neighbors of each other. This could get quite complicated! And then we would have to repeat this for the neighbors of the neighbors of the neighbors. . . . We should find a better way to prove this, and fortunately, there is a better way! 198 13. Coloring Maps and Graphs FIGURE 13.1. Two-coloring the regions formed by a set of circles. Proof. We prove the assertion by induction on n, the number of circles. If n = 1, then we get only two regions, and we can color one of them red, the other one blue. So let n > 1. Select any of the circles, say C, and forget about it for the time being. We assume that the regions formed by the remaining n − 1 circles can be colored with red and blue so that regions that share a common boundary arc get different colors (this is just the induction hypothesis). Now we put back the remaining circle, and change the coloring as follows: Outside C, we leave the coloring as it was; inside C, we interchange red and blue (Figure 13.2). FIGURE 13.2. Adding a new circle and recoloring. It is easy to see that the coloring obtained this way satisfies what we wanted. In fact, look at any small piece of arc of any of the circles. If this arc is outside C, then the two regions on its two sides were different and their colors did not change. If the arc is inside C, then again, the two regions on its two sides were differently colored, and even though their colors were switched, they are still different. Finally, the arc could be on C itself. Then 13.2 Coloring Graphs with Two Colors 199 the two regions on both sides of the arc were one and the same before we put C back, and so they had the same color. Now, one of them is inside C and this switched its color; the other is outside, and this did not. So after the recoloring, their colors will be different. Thus we have proved that the regions formed by n circles can be colored with two colors, provided that the regions formed by n − 1 circles can be colored with 2 colors. By the Principle of Induction, this proves the theorem. ? FIGURE 13.3. Find the color of a region. 13.1.1 Assume that the color of the outer region is blue. Then we can describe what the color of a particular region R is without having to color the whole picture as follows: — if R lies inside an even number of circles, it will be colored blue; — if R lies inside an odd number of circles, it will be colored red. Prove this assertion (see Figure 13.3). 13.1.2 (a) Prove that the regions, into which n straight lines divide the plane, are colorable with 2 colors. (b) How could you describe what the color of a given region is? 13.2 Coloring Graphs with Two Colors Jim has six children, and it is not an easy bunch. Chris fights with Bob, Faye, and Eve all the time; Eve fights (besides with Chris) with Al and Di all the time; and Al and Bob fight all the time. Jim wants to put the children in two rooms so that pairs of fighters should be in different rooms. Can he do this? 200 13. Coloring Maps and Graphs As in Chapter 7, the solution is much easier if we make a drawing of the information we have. We construct a "fighting graph": We represent each child by a node, and connect two nodes if these children fight all the time. We get the graph in Figure 13.4(a). Jim's task is to split the nodes into two groups so that every fighting pair is separated. A solution is shown in part (b) of the figure. A B B A A B F C F C F C E D E D E D (a) (b) (c) FIGURE 13.4. The fight graph of Jim's children; how to put them in two rooms; and how this translates to a 2-coloring. Instead of redrawing the graph putting its nodes left and right, we can indicate which child goes in which room by coloring the corresponding node black or white. The rule of the coloring is that adjacent nodes must be colored with different colors. Figure 13.4(c) shows the corresponding coloring. Jim can put the children represented by white nodes in one room, and the others (represented by black nodes) in the other. Looking at Figure 13.4(b), we notice that we have already met such graphs: we called them bipartite, since the vertex set of these graphs can be split into two disjoint sets (or parts) such that edges go only between vertices belonging to different sets. The problem of coloring the regions formed by circles in the previous section can also be stated as a problem on coloring the nodes of graphs with 2 colors. We associate a graph with the regions formed by circles the following way: Represent every region by a vertex of the graph. Two vertices are connected by an edge in the graph if and only if the corresponding regions share a common boundary arc (just sharing a point at a vertex does not qualify). Which graphs are 2-colorable (in other words, bipartite)? It is clear that if a graph consists of isolated vertices, 1 color is enough to get a good coloring. If the graph has at least one edge, then we need at least two colors. It is easy to see that a triangle, the complete graph on 3 vertices, needs 3 colors to be well colored. It is also obvious that if a graph contains a triangle, then it needs at least 3 colors for a good coloring. But a graph need not contain a triangle and may still not be 2-colorable. A little more involved example is a pentagon: It is easy to convince ourselves that no matter how we color its vertices with 2 colors, we'll necessarily end 13.2 Coloring Graphs with Two Colors 201 up with two adjacent vertices with the same color. We can generalize this observation to any cycle of odd length: If we start coloring any node with (say) black, then as we walk along the cycle we must color the next node white, the third node black, and so on. We must alternate with colors black and white. But because the cycle is odd, we return to the start node in the wrong phase, ending up with coloring the last node black, and so having two adjacent black nodes. It follows that if a graph contains an odd cycle, then it cannot be 2colorable. The following simple theorem asserts that nothing more complicated can go wrong: Theorem 13.2.1 A graph is 2-colorable if and only if it contains no odd cycle. Proof. We already know the "only if" part of this theorem. To prove the "if" part, suppose that our graph has no odd cycle. Pick any vertex a and color it black. Color all its neighbors white. Notice that there cannot be an edge connecting two neighbors of a, because this would give a triangle. Now color every uncolored neighbor of these white vertices black. We have to show that there is no edge between the black vertices: no edge goes between u and the new black vertices, since the new black vertices didn't belong to the neighbors of a; no edge can go between the new black vertices, because it would give a cycle of length 3 or 5. Continuing this procedure the same way, if our graph is connected, we'll end up with 2-coloring all vertices. It is easy to argue that there is no edge between two vertices of the same color: Suppose that this is not the case, so we have two adjacent vertices u and v colored black (say). The node u is adjacent to a node u1 colored earlier (which is white); this in turn is adjacent to a node u2 colored even earlier (which is black); etc. This way we can pick a path P from u that goes back all the way to the starting node. Similarly, we can pick a path Q from v to the starting node. Starting from v, let's follow Q back until it first hits P , and then follow P forward to u. This path forms a cycle with the edge uv. Since the nodes along the path alternate in color, but start and end with black, this cycle is odd, a contradiction (Figure 13.5). If the graph is connected, we are done: We have colored all vertices. If our graph is not connected, we perform the same procedure in every component, and obviously, this will give a good 2-coloring of the whole graph. This proves Theorem 13.2.1. It is worth pointing out that in the proof above we did not really have much choice: We could choose the color of the starting node, but then our hands were forced all the way through coloring the connected component of that point. Then we had a free choice for the color of the first node of the next component, but then the rest of the component was forced again. This means that we not only proved Theorem 13.2.1, but also gave an algorithm for finding a 2-coloring if it exists (and to find an odd cycle if it does not). 202 13. Coloring Maps and Graphs u u1 u2 v a FIGURE 13.5. Bad 2-coloring yields an odd cycle. 13.2.1 Prove that the graph obtained from the regions of a system of circles contains no odd cycle. 13.3 Coloring graphs with many colors Suppose that we have a graph, and we find that it cannot be colored with two colors; we may want to color it with more colors. (The rule of the game is the same: the two endpoints of any edge must be colored differently.) If we have many colors, then we can just color every node with a different color. If the graph has n nodes, then n colors are always sufficient. Obviously, if the graph is complete, then we do need n colors, since every node must get a different color (recall the Pigeonhole Principle!). If we can color a graph with k colors, we say that the graph is k-colorable. The smallest k for which the graph is k-colorable is called the chromatic number of the graph. Suppose that we want to use, say, only 3 colors. Can we decide whether they are enough to color the nodes? It turns out that going from 2 colors to 3 is a real jump in difficulty. We can try to proceed as in the case of 2 colors. Let the 3 colors be red, blue and green. We start with any node a, and color it red. This we can do without loss of generality, since all colors play the same role. Then we take a neighbor b of a, and color it blue (this is still no restriction of generality). Now we proceed to another neighbor c of a. If c is connected to b by an edge, then its color is forced to be green. But suppose that it is not connected to b. Then we have two choices to color c, blue or green, and these are not alike: It makes a difference whether b and c have the same color or not. So we make a choice and proceed. In the next step, we may have to make a choice again, etc. If any of these choices turns out to be wrong, we'll have to backtrack and try the other one. Eventually, if a 3-coloring is possible at all, we'll find it. 13.3 Coloring graphs with many colors 203 All this backtracking takes a lot of time. We don't give a rigorous analysis here, just note that in general, we may have to go through both choices for a large fraction (say, half) of the nodes, which will take time 2n/2 . We have seen that this number becomes astronomical for very moderate sizes of n. But the jump in difficulty is not that this simple procedure takes so long: the real trouble is that nothing substantially better is known! And there are results in complexity theory (cf. Section 15.1) that suggest that nothing substantially better can be designed at all. The situation is similar for coloring with any number k of colors, once k > 2. Suppose that we have a graph and we badly need to color it with k colors. Are there at least some special cases when we can do so? One such case is described in the following result, called Brooks's Theorem: Theorem 13.3.1 If every node in a graph has degree at most d, then the graph can be colored with d + 1 colors. Of course, the condition given in Brooks's Theorem is only sufficient, but not necessary: there are graphs in which some nodes, possibly even all nodes have high degree, and the graph is colorable with 2 colors. Proof. We give a proof using the Principle of Induction. We can start our proof with small graphs. If the graph has less than d + 1 vertices, then it can be colored by d + 1 (or fewer) colors, since every vertex can be colored differently. Suppose that our theorem is true for any graph with fewer than n vertices. Pick a point v of our graph G, and omit from G this vertex v and the edges incident to it. The remaining graph G has n − 1 vertices. Obviously every degree is at most d (omitting a vertex does not increase the degrees), so G can be colored by d + 1 colors, by the induction hypothesis. Since v has at most d neighbors, but we have d + 1 colors, there must be a color that does not occur among the neighbors of v. Coloring v with this color, we get a coloring of G by d + 1 colors. This completes the induction. Brooks, in fact, proved more: With some simple exceptions, a graph in which all nodes have degree at most d can be colored with d colors. The exceptions can be described as follows. For d = 2, the graph has a connected component that is an odd cycle; for d > 2, the graph has a connected component that is a complete graph with d + 1 nodes. The proof that these graphs are exceptions is easy; the proof that these are the only exceptions is harder and not given in this book. Returning to the situation where you want to k-color a graph, suppose you find that Brooks's Theorem does not apply, and say a large number of random trials to color the graph also fail, and you begin to suspect that no k-coloring exists at all. How can you convince yourself that this is indeed the case? One lucky break is if you find k + 1 nodes in the graph forming a complete subgraph. Obviously, this part of the graph needs k + 1 colors. 204 13. Coloring Maps and Graphs Unfortunately, for every positive integer k there are graphs that contain no such complete graph and yet they are not k-colorable. It may even happen that a graph contains no triangle and it is not k-colorable. Figure 13.6 shows a graph that contains no complete graph with 4 vertices but is not 3-colorable, and a more complicated graph that does not contain a triangle but is not 3-colorable (see also Exercise 13.3.1). On this sad note we leave the topic of coloring general graphs. FIGURE 13.6. Two non-3-colorable graphs. 13.3.1 Prove that the graphs in Figure 13.6 are not 3-colorable. 13.3.2 Draw n lines in the plane such that no 3 of them go through the same point. Prove that their intersection points can be colored with 3 colors so that on every line, consecutive intersection points get different colors. 13.3.3 Let G be a connected graph such that all vertices but one have degree at most d (one vertex may have degree larger than d). Prove that G is (d + 1)colorable. 13.3.4 Prove that if every subgraph of G has a node of degree at most d, then G is (d + 1)-colorable. 13.4 Map Coloring and the Four Color Theorem We started this chapter by coloring the regions formed by a set of circles in the plane. But when do we need to color drawings in the plane? Such a task arises in cartography: It is a natural requirement to color maps in such a way that neighboring countries (or counties) get different colors. In the previous example we saw that in special cases (like maps derived from circles), we may find "good" colorings of the maps in the previous sense, using just two colors. "Real" maps are much more complicated configurations, so it is not surprising that they need more than two colors. It is very easy to draw four countries so that any two of them have a common 13.4 Map Coloring and the Four Color Theorem 205 FIGURE 13.7. Four mutually neighboring countries boundary, and so all four need different colors in a "good" coloring (see Figure 13.7). Now consider a "real-life" planar map, for instance the map of the states of the continental US. We assume that each country (state) is connected (consists of one piece). In school maps usually six colors are used, but four colors are enough, as shown in Figure 13.8. FIGURE 13.8. Coloring the states of the United States. Would three colors be enough? One can easily see that the answer is negative. Let's start to color our map with three colors, say red, blue, and yellow (it does not make any difference which of the three colors we start with); we have to prove that sooner or later we get stuck. Let's start by coloring Nevada red. Then all the neighboring states can get only colors blue or yellow. Let's color California blue (without loss of generality). Then the next neighboring state clockwise, Oregon, is a common neighbor of both Nevada and California, so it must be colored yellow; the next state, Idaho, must be blue again; the next state, Utah, must be yellow. But now we are stuck, because the last state among the neighbors of Nevada, Arizona, 206 13. Coloring Maps and Graphs cannot get any of the three colors red, blue, or yellow, so we must use a fourth color (see Figure 13.8). It is not by accident that in two different cases to color a map we needed four colors, but four colors were enough. It is a theorem that to color any planar map, four colors always suffice. This famous theorem has a history well over a century old. It was raised by Francis Guthrie in England in 1852. For decades it was kicked around by mathematicians as a simple but elusive puzzle, until the difficulties in obtaining a proof became apparent in the 1870s. An erroneous proof was published in 1879 by Alfred Kempe , and the problem was regarded as solved for a good decade before the error was discovered. The difficulty of the problem was overlooked to the degree that in 1886 it was posed at Clifton College as a challenge problem to students; part of the requirement was that "No solution may exceed one page, 30 lines of MS., and one page of diagrams." (The real solution 90 years later used more than 1000 hours of CPU time!) After the collapse of Kempe's proof, for more than a century many mathematicians, amateur and professional, tried in vain to solve this intriguing question, called the Four Color Conjecture. Several further erroneous proofs were published and the refuted. A whole new area of mathematics, graph theory, grew out of attempts to prove the Four Color Conjecture. Finally, in 1976 events took a surprising turn: Kenneth Appel and Wolfgang Haken gave a proof of the Four Color Conjecture (which is therefore the Four Color Theorem now), but their proof used computers very heavily to check an enormous number of cases. Even today, the use of computers could not be eliminated from the proof (although nowadays it takes much less time than the first proof, partly because computers are faster, partly because a better arrangement of the case distinction was found); we still don't have a "pure" mathematical proof of this theorem. It is beyond the scope of this book even to sketch this proof; but we can use the results about graphs that we have learned to prove the weaker fact that 5 colors suffice to color every planar map. We can transform this to a graph coloring problem. In each country we pick a point; let's call this the capital of the country. Now, if two countries share a border, then we can connect their capitals by a railway line that stays in the two countries and crosses the border only once. Furthermore, we can design these lines so that the lines from any capital to various points on the border of the country (going on to capitals of adjacent countries) do not cross each other. Then the capitals and the lines connecting them form a graph, which also is planar. This graph is called the dual graph of the original map (Figure 13.9). A word here to make things precise: It could happen that the common border of two countries consists of several pieces. (For example, in our world the border of China and Russia consists of two pieces, separated by 13.4 Map Coloring and the Four Color Theorem 207 FIGURE 13.9. A graph and its dual Mongolia.) For the purpose of studying colorings, it suffices to connect the capitals of these two countries by one line only, through either one of these pieces of their common border. There is another graph in the picture, consisting of the borders between countries. The nodes of this graph are the "triangles," points where three or more countries meet. But we have to be careful: This "graph" may have two or more edges connecting the same pair of nodes! So this is an example where we need multigraphs to model the situation correctly. We don't need to bother about this, however: we can just talk about a planar map and its dual graph. Instead of coloring the countries of the original map, we could color the nodes of its dual graph: Then the rules of the game would be that two nodes connected by an edge must be colored with different colors. In other words, this is graph coloring as defined in Section 13.3. So we can rephrase the Four Color Theorem as follows: Theorem 13.4.1 Every planar graph can be colored with 4 colors. Our more modest goal is to prove the "Five Color Theorem" : Theorem 13.4.2 Every planar graph can be colored with 5 colors. Let us start with something even more modest: Every planar graph can be colored with 6 colors. (7 colors or 8 colors would be even more modest, but would not be any easier.) Let us look at what we already know about graph coloring; is any of it applicable here? Do we know any condition that guarantees that the graph is 6-colorable? One such condition is that all points in a graph have degree at most 5 (Theorem 13.3.1). This result is not applicable here, though, 208 13. Coloring Maps and Graphs because a planar graph can have points of degree higher than 5 (the "dual" graph in Figure 13.9 has a point of degree 7, for example). But if you solved the exercises, you may recall that we don't have to assume that all nodes of the graph have degree at most 5. The same procedure as used in the proof of Theorem 13.3.1 gives a 6-coloring if we know that the graph has at least one point of degree 5 or less, and so do all its subgraphs (Exercise 13.3.4). Is this condition applicable here? The answer is yes: Lemma 13.4.3 Every planar graph has a point of degree at most 5. Proof. This lemma follows from Euler's Formula. In fact, we only need a consequence of Euler's Formula, namely, Theorem 12.2.2: A planar graph with n nodes has at most 3n − 6 edges. Assume that our graph violates Lemma 13.4.3, and so every node has degree at least 6. Then counting the edges node by node, we count at least 6n edges. Each edge is counted twice, so the number of edges is at least 3n, contradicting Theorem 12.2.2. Since the subgraphs of a planar graph are planar as well, it follows that they too have a point of degree at most 5, and so Exercise 13.3.4 can be applied, and we get that every planar graph is 6-colorable. So we have proved the "Six Color Theorem." We want to shave off 1 color from this result (how nice it would be to shave off 2!). For this, we use the same procedure of coloring points one by one again, together with Lemma 13.4.3; but we have to look at the procedure more carefully. Proof [of the Five Color Theorem]. So, we have a planar graph with n nodes. We use induction on the number of nodes, so we assume that planar graphs with fewer than n nodes are 5-colorable. We also know that our graph has a node v with degree at most 5. If v has degree 4 or less, then the argument is easy: Let us delete v from the graph, and color the remaining graph with 5 colors (which is possible by the induction hypothesis, since this is a planar graph with fewer nodes). The node v has at most 4 neighbors, so we can find a color for v that is different from the colors of its neighbors, and extend the coloring to v. So the only difficult case occurs when the degree of v is exactly 5. Let u and w be two neighbors of v. Instead of just deleting v, we change the graph a bit more: We use the place freed up by the deletion of v to merge u and w to a single point, which we call uw. Every edge that entered either u or w will be redirected to the new node uw (Figure 13.10). This modified graph is planar and has fewer nodes, so it can be colored with 5 colors by the induction hypothesis. If we pull the two points u and w apart again, we get a coloring of all nodes of G except v with 5 colors. What we gained by this trick of merging u and w is that in this coloring they have the same color! So even though v has 5 neighbors, two of those have 13.4 Map Coloring and the Four Color Theorem w 209 uw v u FIGURE 13.10. Proof of the 5-color theorem. the same color, so one of the 5 colors does not occur among the neighbors at all. We can use this color as the color of v, completing the proof. Warning! We have overlooked a difficulty here. (You can see how easy it is to make errors in these kinds of arguments!) When we merged u and w, two bad things could have happened: (a) u and w were connected by an edge, which after the merging became an edge connecting a node to itself; (b) there could have been a third node p connected to both u and w, which after the merging became a node connected to uw by two edges. We did not allow for either of these! The second trouble (b) is in fact no trouble at all. If we get two edges connecting the same pair of nodes, we could just ignore one of them. The graph remains planar, and in the 5-coloring the color of p would be different from the common color of u and w, so when we pull them apart, both edges connecting p to u and w would connect nodes with different color. But the first trouble (a) is serious. We cannot just ignore the edge connecting uw to itself; in fact, there is no way that u and w can get the same color in the final coloring, since they are connected by an edge! What comes to the rescue is the fact that we can choose another pair u, w of neighbors of v. Could it happen that we have this problem with every pair? No, because then every pair of neighbors would be adjacent, and this would mean a complete graph with 5 nodes, which we know is not planar. So we can find at least one pair u and w for which the procedure above works. This completes the proof of the Five Color Theorem. Review Exercises 13.4.1 We draw a closed curve in the plane without lifting the pencil, intersecting itself several times (Figure 13.11). Prove the fact (familiar from boring classes) that the regions formed by this curve can be colored with 2 colors. 210 13. Coloring Maps and Graphs FIGURE 13.11. 2-coloring the regions of a curve 13.4.2 Let G be a connected graph such that all vertices have degree at most d, and there exists vertex with degree strictly less than d. Prove that G is dcolorable. 13.4.3 Let G be a connected graph such that all vertices but d + 1 have degree at most d (the remaining d + 1 vertices may have degree larger than d). Prove that G is (d + 1)-colorable. 13.4.4 Construct a graph G as follows: The vertices of G are the edges of a complete graph K5 on 5 vertices. The vertices of G are adjacent if and only if the corresponding edges of K5 have an endpoint in common. Determine the chromatic number of this graph. 13.4.5 Let Gn be the graph arising from Kn (where Kn is the complete graph on n vertices) by omitting the edges of a Hamiltonian cycle. Determine the chromatic number of Gn . 13.4.6 Show by an example that on a continent where countries are not necessarily connected (as in medieval Europe), 100 colors may not be enough to color a map. 13.4.7 If every face of a planar map has an even number of edges, then the graph is bipartite. 13.4.8 If every node of a planar map has even degree, then the faces can be 2-colored. 13.4.9 (a) Consider a planar map in which every node has degree 3. Suppose that the faces can be 3-colored. Prove that the graph of the map is bipartite. (b) [A challenge exercise.] Prove the converse: If every node of a bipartite planar graph has degree 3, then in the map obtained by drawing it in the plane, the faces can be 3-colored. 14 Finite Geometries, Codes, Latin Squares, and Other Pretty Creatures 14.1 Small Exotic Worlds The Fano plane is a really small world (Figure 14.1). It only has 7 points, which form 7 lines. In the figure, 6 of these lines are straight and one is circular; but for the inhabitants of this tiny world (the Fanoans), the straight and curved lines look the same. Also, in our figure it seems that the circular line intersects some of the straight lines twice; but the intersection points that are not marked are not real intersection points, they are there only because we want to draw a picture of this very different world in our Euclidean plane. FIGURE 14.1. The Fano plane. The Fanoans are very proud of their world. They say that it is tiny but perfect in various ways. They point out that (a) through any two points their world has a unique line. 212 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures If you check this out and admit it's true, but reply that this also holds in our own world, they go on and boast that (b) any two lines have exactly one intersection point. This is certainly not true in our Euclidean world (we have parallel lines), so we have to admit that this is nice indeed. But then we can draw a new figure (Figure 14.2) and point out that this rather uninteresting construction also has properties (a) and (b). But the Fanoans are ready for this attack: "It would be enough if we pointed out that in our world, (c) every line has at least 3 points." FIGURE 14.2. An ugly plane Our Fanoan friend goes on: "Theoretical physicists have shown that just from (a), (b), and (c), many properties of our world can be derived. For example, (d) all our lines have the same number of points. "Indeed, let K and L be two lines. By (b), they have an intersection point p; by (c), they contain other points (at least two, but we only need one right now). Let us select a point q from K and a point r from L that are both different from p. By (a), there is a line M through q and r. Let s be a third point on M (which exists by (c); see Figure 14.3). s x p x´ q r K L FIGURE 14.3. All lines have the same number of points. "Consider any point x on K, and connect it to s. This line intersects L at a point x (we can think of this as projecting K onto L from center s). Conversely, given x , we get x by the same construction. Thus this projection establishes a bijection between K and L, and so they have the same number of points. "This argument also shows that 14.1 Small Exotic Worlds 213 (e) all our points have the same number of lines through them. "No doubt you can prove this yourself, if you study the previous argument carefully." Our intelligent Fanoan friend adds, "These theoretical physicists (obviously having a lot of time on their hands) also determined that the fact that the number of points on each line is 3 does not follow from (a), (b), and (c); they say that alternative universes can exist with 4, 5 or 6 points on a line. Imagining this is beyond me, though! But they say that no universe could have 7 points on a line; there could be universes with 8, 9, and 10 points on each line, but 11 points are impossible again. This is, of course, a favorite topic for our science fiction writers." The Fanoans hate Figure 14.2 for another reason: they are true egalitarians, and the fact that one point is special is intolerable in their society. You may raise here that the Fano plane also has a special point, the one in the middle. But they immediately explain that this is again an artifact of our drawing. "In our world, (f) all points and all lines are alike in the sense that if we pick any two points (or two lines), we can just rename every point so that one of them becomes the other, and nobody will notice the difference." You may trust them about this, or you may verify this claim by solving exercise 14.1.7. Let us leave the Fano plane now and visit a larger world, the Tictactoe plane. This has 9 points and 12 lines (Figure 14.4). We have learned from our excursion to the Fano plane that we have to be careful with drawing these strange worlds, and so we have drawn it in two ways: In the second figure, the first two columns are repeated, so that the two families of lines (one leaning right, one leaning left) can be seen better.1 The Tictacs boast that they have a much more interesting world than the Fanoans. It is still true that any two points determine a single line; but two lines may be intersecting or parallel (which simply means that they don't intersect). One of our Tictac friends explains: "I heard that your mathematicians have been long concerned about the statement that (g) for any line and any point not on the line, there is one and only one line that goes through the point and is parallel to the given line. They called it the Axiom of Parallels or Euclid's Fifth Postulate. They were trying to prove it from other basic properties of your world, until eventually you have learned about matrices and determinants, you may recognize the following description of this world: if we think of the points in this plane as the entries of a 3 × 3 matrix, then the lines are the rows and columns of the matrix and expansion terms of its determinant. The second drawing in the figure corresponds to Sarrus's Rule in the theory of determinants. 1 If 214 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures FIGURE 14.4. The Tictactoe plane. they showed that this cannot be done. Well, this is true in our world, and since our world is finite, it is easy to check that it is true." (We hope our readers will accept the challenge.) "We have 3 points on each line just as in the Fano plane, but we have 4 lines through each point—more than those Fanoans. All of our points are alike, and so are all of our lines (even though the way you draw them in your own geometry seems to differentiate between straight and curved lines)." FIGURE 14.5. Extending the Tictactoe plane by 1 line and 4 points at infinity. When we point out how the Fanoans love their property (b), our Tictac guide replies, "We could easily achieve this ourselves. All we'd have to do is add 4 new points to our plane. Each line should go through exactly one of these new points; parallel lines should go through the same new point, nonparallel lines through different new points. And we could even things out by declaring that the 4 new points also form a line. We could call the new points 'points at infinity' and the new line, the 'line at infinity' (Figure 14.1 Small Exotic Worlds 215 14.5). Then we would have properties (a) through (g) ourselves.2 But we prefer to distinguish between finite and infinite points, which makes our world more interesting." FIGURE 14.6. The Cube space. Finally, we visit a third tiny world called the Cube space (Figure 14.6). While this one has only 8 points, it is much richer than the Tictactoe plane in one sense: It is 3-dimensional! Its lines are uninteresting: Every line has just 2 points, and any two points form a line. But it has planes! In our (deficient) Euclidean picture, the points are arranged as the vertices of a cube. The planes are (1) 4-tuples of points forming a face of the cube (there are six of these), (2) 4-tuples of points on two opposite edges of the cube (6 of these again), (3) the four black points, and (4) the four light points. The Cube space has the following very nice properties (whose verification is left to the reader): (A) Any three points determine a unique plane. (The Cubics remark at this point, "In your world, this is only true if the three points are not on a line. Luckily, we never have three points on a line!") (B) Any two planes are either parallel (nonintersecting), or their intersection is a line. (C) For any plane and any point outside it, there is exactly one plane through the given point parallel to the given plane. (D) Any two points are alike. (E) Any two planes are alike. This last claim looks so unlikely, considering that we have such different kinds of planes, that a proof is in order. Let us label the points of the cube by A, . . . , H as in Figure 14.7. It is clear that the faces of the cube are alike 2 This construction appending new points at infinity can be carried out in our own Euclidean plane, leading to an interesting kind of geometry, called projective geometry. 216 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures (one can be moved onto any other by appropriately rotating the cube, and this rotation maps all the other planes onto planes). It is also clear that the planes formed by two opposite edges are alike, and the all-black plane is like the all-light plane (reflecting the cube in its center will interchange black and light vertices). This was the easy part. Now we do a trickier transformation: We interchange E with F and G with H (Figure 14.7). What happens to the planes? H E F G F G E H D A B C A D B C FIGURE 14.7. Why different-looking planes are alike. Some of them are not changed (even though their points will change places): The top, bottom, front, and back faces and the planes ABGH and CDEF are mapped onto themselves. The left face ADEH is mapped onto the plane ADF G, and vice versa. Similarly, the right face BCF G is mapped onto the plane BCEH, and vice versa. The all-black plane is mapped onto the plane ACEG, and vice versa. The all-light plane is mapped onto the plane BDF H, and vice versa. Thus all planes are accounted for. We make two observations: — Every plane is mapped onto a plane, and so if we relabel the cube as above, the Cubics won't notice the difference! — There is a face-plane mapped onto an opposite-edge-plane, and there is an opposite-edge-plane mapped onto the all-black plane. This implies that the Cubics cannot see any difference between these three types of planes. 14.1.1 Fanoan philosophers have long been troubled by the difference between points and lines. There are many similarities (for example, there are 7 of each); why are they different? Represent each line by a new point; for each old point, take the 3 lines through it, and connect the 3 new points representing them by a (new) line. What structure do you get? 14.1.2 The Fanoans call a set of 3 points a circle if they are not on a line. For example, the 3 vertices in figure 14.1 form a circle. They call a line a tangent to 14.2 Finite Affine and Projective Planes 217 the circle, if it contains exactly one point of the circle. Show that at every point of a circle there is exactly one tangent. 14.1.3 The Fanoans call a set of 4 points a hypercircle if no 3 of them are a line. Prove that the 3 points not on a hypercircle form a line, and vice versa. 14.1.4 Representatives of the 7 points in the Fano plane often vote on different issues. In votes where everyone has to vote yes or no, they have a strange rule to count ballots, however: it is not the majority who wins, but "line wins": if all 3 points on a line want something, then this is so decided. Show that (a) it cannot happen that contradictory decisions are reached because the points on another line want the opposite, and (b) in every issue there is a line whose points want the same, and so decision is reached. 14.1.5 Prove that the Tictactoe plane, extended with elements at infinity, satisfies all properties (a)–(d). 14.1.6 In response to the Tictacs' explanation about how they could extend their world with infinite elements, the Fanoans decided to declare one of their lines the "line at infinity," and the points on this line "points at infinity." The remaining 4 points and 6 lines form a really tiny plane. Will property (g) of parallel lines be valid in this geometry? 14.1.7 We want to verify the claim of the Fanoans that all their points are alike, and rearrange the points of the Fano plane so that the middle point becomes (say) the top point, but lines remain lines. Describe a way to do this. 14.1.8 Every point of the Cube space is contained in 7 lines and 7 planes. Is this numerical similarity with the Fano plane a coincidence? 14.2 Finite Affine and Projective Planes It is time to leave our excursion to imaginary worlds and introduce mathematical names for the structures we studied above. If we have a finite set V whose elements are called points, and some of its subsets are called lines, and (a), (b), and (c) above are satisfied, then we call it a finite projective plane. The Fano plane (named after the Italian mathematician Gino Fano) is one projective plane (we'll see that it has the least possible number, 7, of points), and another one was constructed by the Tictac theoretical physicists by adding to their world 4 points and a line at infinity. We have heard the proof from Fanoan scientists that every line in a finite projective plane has the same number of points; for reasons that should become clear soon, this number is denoted by n + 1, where the positive integer n is called the order of the plane. So the Fano plane has order 2, and the extended Tictactoe plane has order 3. The Fanoans also know that 218 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures if a finite projective plane has order n, then n + 1 lines go through every point of it. 14.2.1 Prove that a finite projective plane of order n has n2 + n + 1 points and n2 + n + 1 lines. We can also study structures consisting of points and lines, where (a) and the "Axiom of Parallels" (g) are assumed; to exclude trivial (ugly?) examples, we assume that each line has at least 2 points. Such a structure is called a finite affine plane. The "Axiom of Parallels" implies that all lines parallel to a given line L are also parallel to each other (if two of them had a point p in common, then we would have two lines through p parallel to L). So all lines parallel to L form a "parallel class" of mutually parallel lines, which cover every point in the affine plane. Affine versus projective planes. The construction used by the Tictacs to extend their plane can be used in general. To every parallel class of lines we append a new "point at infinity" and create a new "line at infinity" going through all points at infinity. Then (a) remains satisfied: Two "ordinary" points are still connected by a line (the same line as before), two "infinite" points are connected by a line (the "infinite" line), and an ordinary and an infinite point are connected by a line (the parallel class belonging to the infinite point contains a line through the given ordinary point). It is even easier to see that we do not have two lines through any pair of points. Furthermore, (b) is satisfied: Two ordinary lines intersect each other unless they are parallel, in which case they share a point at infinity; an ordinary line intersects the infinite line at its point at infinity. We leave it to you to check (c), (d), and (e) (condition (f) does not hold for every finite projective plane; it is a special feature of the Fano plane and some other projective planes). The construction in Exercise 14.1.6 is again quite general. We can take any finite projective plane, and call any of its lines along with the points on this line "infinite." The remaining points and lines form a finite affine plane. So in spite of the rivalry between the Fanoans and Tictacs, finite affine planes and projective planes are essentially the same structures. To sum up, we have the following theorem. Theorem 14.2.1 Every finite affine plane can be extended to a finite projective plane by adding new points and a single new line. Conversely, from every projective plane we can construct an affine plane by deleting any line and its points. A projective plane of order n has n + 1 points on each line; the corresponding affine plane has n. We call this number the order of the affine plane. (So this turns out to be more natural for affine planes than for projective planes. We'll see soon why we chose the number of points on a line 14.2 Finite Affine and Projective Planes 219 of the affine plane, rather than on a line of the projective plane, to be called the order.) We have seen (Exercise 14.2.1) that the projective plane has n2 + n + 1 points. To get the affine plane, we delete the n + 1 points on a line, so the affine plane has n2 points. Coordinates. We have discussed two finite planes (affine or projective; we know it does not matter much): the Fano and the Tictactoe planes. Are there any others? Coordinate geometry gives the solution: Just as we can describe the Euclidean plane using real coordinates, we can describe finite affine planes using the strange arithmetic of prime fields from Section 6.8. Let us fix a prime p, and consider the "numbers" (elements of the prime field) 0, 1, . . . , p − 1. In the Euclidean plane, every point has two coordinates, so let's do the same here: Let the points of the plane be all pairs (u, v). This gives us p2 points. We have to define the lines. In the Euclidean plane, these are given by linear equations, so let's do the same here: For every equation ax + by = c, we take the set of all pairs (u, v) for which x = u, y = v satisfies the equation, and introduce a line containing all these points. To be precise, we have to assume that the above equation is proper, in the sense that at least one of a and b is different from 0. Now we have to verify that (a) through any two points there is exactly one line, (b) for any line and any point outside it, there is exactly one line through the point that is parallel to the line, and (c) there are at least 2 points on each line. We'll not go through this proof, which is not difficult, but lengthy. It is more important to realize that all this works because it works in the Euclidean plane, and we can do arithmetic in prime fields just as with real numbers. This construction provides an affine plane for every prime order (from this we can construct a projective plane for every prime order). Let's see what we get from the smallest prime field, the 2-element field. This will have 22 = 4 points, given by the four pairs (0, 0), (0, 1), (1, 0), (1, 1). The lines will be given by linear equations, of which there are six: x = 0, x = 1, y = 0, y = 1, x + y = 0, x + y = 1. Each of these lines goes through 2 points; for example, y = 1 goes through (0, 1) and (1, 1), and x + y = 0 goes through (0, 0) and (1, 1). So we get the very trivial affine plane (already familiar from Exercise 14.1.6) consisting of 4 points and 6 lines. If we extend this to a projective plane, we get the Fano plane. Figure 14.8 shows the affine plane of order 5 obtained this way (we don't show all the lines; there are too many). 14.2.2 Show that the Cube space can be obtained by 3-dimensional coordinate geometry from the 2-element field. 220 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures (0, 4) (2, 4) (4, 4) (1, 3) (0, 2) 2x+3y=1 (4, 1) (0, 0) (3, 0) (4, 0) FIGURE 14.8. An affine plane of order 5. Only one line is shown besides the trivial "vertical" and "horizontal" lines. What are the possible orders of planes? The construction with coordinates above shows that for every prime number there is a finite affine (or projective) plane of that order. Using similar but more involved algebra, one can construct projective planes for every order that is a higher power of a prime number (so for 4, 8, 9 etc.) Theorem 14.2.2 For every order that is a power of a prime (including the primes themselves) there is a finite affine (as well as a finite projective) plane of that order. The smallest positive integer that is not a prime power is 6, and Gaston Tarry proved in 1901 that no finite plane of order 6 exists. The next one is 10; the nonexistence of a finite projective plane of order 10 was proved in 1988 by Lam, Thiel and Swiercz based on an extensive use of computers. Nobody has ever found a projective plane whose order is not a prime power, but the question whether such a plane exists is unsolved. 14.2.3 Suppose that we want to verify the nonexistence of a finite projective plane of order 10 by computer, by simple "brute force": We check that no matter how we specify the appropriate number of subsets of points as lines, one of the conditions (a), (b), or (c) will not hold. How may possibilities do we have to try? About how long would this take? 14.3 Block Designs The inhabitants of a town like to form clubs. They are socially very sensitive (almost as sensitive as the Fanoans), and don't tolerate any inequalities. 14.3 Block Designs 221 Therefore, they don't allow larger and smaller clubs (because they are afraid that larger clubs might suppress smaller ones). Furthermore, they don't allow some people to be members of more clubs than others, since those who are members of more clubs would have larger influence than the others. Finally, there is one further condition: Each citizen A must behave "equally" toward citizens B and C, A can not be in a tighter relationship with B than C. So A must meet B in the same number of clubs as he/she meets C. We can formulate these strongly democratic conditions mathematically as follows. The town has v inhabitants; they organize b clubs; every club has the same number of members, say k; everybody belongs to exactly r clubs, and for any pair of citizens, there are exactly λ clubs where both of them are members. The structure of clubs discussed in the previous paragraphs is called a block design. Such a structure consists of a set of v elements, together with a family of k-element subsets of this set (called blocks) in such a way that every element occurs in exactly r blocks, and every pair of elements occurs in λ blocks jointly. We denote the number of blocks by b. It is clear that block designs describe what we were discussing when talking about the clubs in the town. In the sequel, sometimes we use this everyday description and sometimes the block design formulation. Let us see some concrete examples for block designs. One example is given by the Fano plane (Figure 14.1). The points represent the inhabitants of the town, and 3 people form a club if they are on a line. Let us check that this configuration is indeed a block design: Every club consists of 3 elements (so k = 3). Every person belongs to exactly 3 clubs (which means that r = 3). Finally, any pair of people belongs to exactly one club by (a) (which means λ = 1). Thus our configuration is indeed a block design (the number of elements is v = 7, the number of blocks is b = 7). The Tictactoe plane gives another block design. Here we have nine points, so v = 9; the blocks are the lines, having 3 points on each (so k = 3), and there are 12 of them (so b = 12). Each point is contained in 4 lines (r = 4), and through each pair of points there is a unique line (so λ = 1). A block design in which λ = 1 can be obtained from the Cube space if we take the planes as blocks. Clearly, we have v = 8 elements; each block contains k = 4 elements, the number of blocks is b = 14 and every block is contained in r = 7 planes. The crucial property is that every pair of points is contained in exactly 3 planes, so we have λ = 3. There are some uninteresting, trivial block designs. For k = 2, there is only one block design on a given number v of elements: It consists of all v 2 pairs. The same construction gives a block design for every k ≥ 2: We can v v−1 take all k-subsets as blocks to get a block design with b = k , r = k−1 , v−2 and λ = k−2 . The most boring block design consists of a single block 222 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures (k = v, b = r = λ = 1). This is so uninteresting that we exclude it from further consideration and don't call it a block design. Parameters of block designs. Are there any relations among the numbers b, v, r, k, λ? One equation can be derived from the following. Suppose that every club gives a membership card to every one of its members; how many membership cards do they need? There are b clubs and every club has k members, so altogether there are bk membership cards. On the other hand, the town has v inhabitants and everybody has r membership cards, so counting this way we get vr membership cards. In counting the number of membership cards two ways we have to get the same number, so we get bk = vr. (14.1) Let us find another relation. Imagine that the clubs want to strengthen the friendship among their members, so they require that every member should have a dinner one-on-one with each of his/her fellow club members in the clubhouse. How many dinners will a citizen C eat? We can count this in the following two ways: First reasoning: There are v − 1 other citizens in the town, and each of them is in λ clubs jointly with C, so with every one of the other v − 1 citizens, C will have to eat λ dinners in the different clubhouses. This means altogether λ(v − 1) dinners. Second reasoning: C is a member in r clubs. Every club has k − 1 further members, so in every club C is a member of, C has to eat k − 1 dinners. Altogether this means r(k − 1) dinners. The result of the two counts must be equal: λ(v − 1) = r(k − 1). (14.2) 14.3.1 If a town has 924 clubs, each club has 21 members, and any 2 persons belong to exactly 2 clubs jointly, then how many inhabitants does the town have? How many clubs does each person belong to? (Don't be surprised: This is a very small town, and everybody belongs to many clubs!) 14.3.2 Show that the assumption that every person is in the same number of clubs is superfluous: It follows from the other assumptions we made about the clubs. It follows that among the numbers b, v, r, k, λ we can specify at most three freely, and the other two are already determined by the relations (14.1) and (14.2). In fact, we cannot arbitrarily specify even three. Is it possible, for instance, that in a town of 500 people all the clubs have 11 members, and everybody belongs to 7 clubs? The answer is no; please don't read on, but try to prove it yourself (it is not too hard). 14.3 Block Designs 223 Here is our proof: If this were possible, then for the number of clubs b we would get from (14.1) that b= 500 · 7 v·r = . k 11 But this is not an integer, so these numbers cannot occur. OK, there is a rather trivial answer to this problem: We must specify three of the given numbers so that in computing the other two using (14.1) and (14.2) we get integer values. But this is not the whole story. There is an important inequality that holds true in every block design, called Fisher's Inequality: b ≥ v. (14.3) The proof of this inequality uses mathematical tools that go beyond the scope of this book. Unfortunately, one can find five numbers b, v, r, k, λ satisfying conditions (14.1), (14.2), and (14.3) for which no block design with these parameters exists. But we are running out of simple, easily checkable necessary conditions. For instance, there is no block design with parameters b = v = 43, k = r = 7, λ = 1 (since this block design would be a finite projective plane of order 6, which we know does not exist). These numbers satisfy (14.1), (14.2), and (14.3), and there is no simple way to rule out this block design (just a tedious study of many cases). 14.3.3 (a) Find an example of specific values for v, r, and k where computing b from (14.1) gives an integer value, but (14.2) leads to a contradiction. (b) Find an example of 5 integers b, v, k, r, λ (b, k, v, r ≥ 2, λ ≥ 1) that satisfy both (14.1) and (14.2), but b < v. 14.3.4 For every v > 1, construct a block design with b = v. Club badges. In our town, every club has a badge. The town organizes a parade in which everybody participates and everybody is required to wear the badge of one of the clubs where he/she is a member. Can the badges be chosen so that no two persons wear the same badge? We need, of course, that there are enough different badges, at least as many as citizens. That is, b ≥ v. This is indeed guaranteed by Fisher's Inequality (14.3). But is this enough? We have to make sure that every citizen is wearing a badge of one of his or her clubs; not just different badges. The question has some resemblance to the Marriage Theorem (Theorem 10.3.1) described in Chapter 10. To make use of this resemblance, we assign a bipartite graph to our block design (Figure 14.9). The lower set of points represents the people; the upper set of points represents the clubs. We connect point a to point X if citizen a is a member in club X (in Figure 224 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures Clubs member of... Citizens FIGURE 14.9. Representing club membership by a graph 14.9 we have drawn only one edge of the graph). We know the following properties of our graph: from every point below, exactly r edges go up, and from every upper point exactly k edges go down. Below we have v points, above we have b points. If we choose n points from the lower set (obviously, n ≤ v), then we know that from these n points nr edges leave. Let us denote by m the number of other endpoints of these nr edges. We claim that n ≤ m. Since every upper point has degree k, altogether this makes mk edges. The nr edges mentioned above are among these mk edges, and hence nr ≤ mk. (14.4) On the other hand, bk = vr by (14.1). By b ≥ v we get k ≤ r, and so mk ≤ mr. From (14.4) and (14.5) we get nr ≤ mr, and therefore n ≤ m, as claimed. So any n lower points are connected to at least n upper points. We invoke the Marriage Theorem, more precisely, its version stated in Exercise 10.3.2: We get that there exists a matching of the lower set into the upper set, i.e., there exist v independent edges that connect every lower point to a different point above. This matching tells every citizen which badge to wear. (14.5) 14.4 Steiner Systems We have seen that block designs with k ≤ 2 are trivial; we take a closer look at the next case, k = 3. We also take the smallest possible value for λ, namely λ = 1. Block designs with k = 3 and λ = 1 are called Steiner systems (named after Jakob Steiner, a Swiss mathematician in the nineteenth century). The Fano plane and the Tictactoe plane are Steiner systems, but the Cube space is not. 14.4 Steiner Systems 225 How many inhabitants must a town have to allow a system of clubs that is a Steiner system? In other words, what conditions do we get for v if our block design is a Steiner system? We use equations (14.1) and (14.2), substituting the values k = 3 and λ = 1. We get 3b = vr and hence r= and and 2r = v − 1, v−1 2 (14.6) v(v − 1) . (14.7) 6 The numbers r and v must be integers, which imposes some conditions on v. Since the denominator in (14.7) is 6 and that in (14.6) is a divisor of 6, the condition imposed concerns the remainder of v upon division by 6. From (14.6) it follows that v must be an odd number, so if we divide it by 6, the remainders can be 1, 3, or 5. This means that v can be written in the forms 6j + 1, 6j + 3, or 6j + 5, where j is an integer. Furthermore, v can not be of the form 6j + 5, because then by (14.7) we get b= b= 1 (6j + 5)(6j + 4) = 6j 2 + 9j + 3 + , 6 3 which is not an integer. So v must be of the form 6j + 1 or 6j + 3. Taking into consideration that we must have v > k = 3, we see that one can have a Steiner system only in towns where the number of inhabitants is v = 7, 9, 13, 15, 19, 21, . . . etc. For these numbers one can construct Steiner systems indeed. In the case v = 7 we already have seen the Fano plane, and for v = 9, the Tictactoe plane. The general construction is quite involved, and we don't describe it here. 14.4.1 Show that for for v = 7, the Fano plane is the only Steiner system. (Of course, 7 citizens can set up their clubs in many different ways, by "switching identities." We can think of 7 chairs, with triples forming the clubs specified. The citizens can choose chairs in many different ways.) 14.4.2 Does the Fisher inequality give any further condition on the number of elements in a Steiner system? Representing the clubs. Imagine that in a town of v people, where the clubs form a Steiner system, people become unhappy about the membership fees, and they create a committee whose task is to protest these high fees. The committee needs at least one member from every club. How many members does this protest committee need to have? 226 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures This problem sounds similar to the badge problem discussed at the end of section 14.3, but there are two differences: First, in the badge problem every citizen (his or her interest) was "represented" by one of the clubs the citizen belonged to, while here the clubs will be represented by one of their members; and second (and more significantly), one and the same person can represent several clubs. Consider citizen Andrew, who does not belong to the committee. Andrew is a member of r clubs, and since the clubs form a Steiner system, we have r= v−1 2 (see equation (14.6)). Every club in which Andrew is a member has two other members, and since Andrew is a member jointly in exactly one club with every other citizen, these (v − 1)/2 clubs have no members in common other than Andrew. The protest committee must have a member from each of them, and since this member is not Andrew (since he is not a member of the committee), the committee has at least v−1 members. This means that 2 one needs quite a large committee—almost half of the citizens! And even this is only a lower bound! Can it be realized, or is there some other argument that gives perhaps an even larger lower bound on the size of the committee? In the case of the Fano plane, our lower bound is (7 − 1)/2 = 3, and indeed, the three points of any line represent every line (any two lines intersect). In the case of the Tictactoe plane, our lower bound is (9 − 1)/2 = 4, but there is no obvious choice of a committee of 4 representing every line; in fact, there is no such choice at all! This can be seen by a tedious case distinction, but let us offer a nice argument that takes care of many other cases as well. We claim the following surprising fact: Theorem 14.4.1 If there exists a committee of size v−1 representing every 2 club, then this committee itself is also a Steiner system. To be more precise, the elements of this new Steiner system will be the v1 people in the committee, and its blocks will be those clubs for which all three members belong to the committee (such clubs will be called privileged). Proof. To prove that this is indeed a Steiner system, first we show that every two committee members are contained in a privileged club. Suppose not, say Bob and Carl are two committee members who are not jointly contained in a privileged club. This means that the third member of the club to which both Bob and Carl belong (in the original Steiner system) is not on the committee. We may assume that this third member is Andrew. But then in the argument above we see that each club containing Andrew has at least one representative in the committee, and one club has two (Bob and 14.4 Steiner Systems 227 Carl). This implies that the committee has at least (v −3)/2+2 = (v +1)/2 members, a contradiction. So any two committee members belong to a privileged club. Since no two citizens belong to more than one club in common, no two committee members belong to more than one privileged club in common. So every pair of committee members belongs to exactly one privileged club in common. This proves that the committee is indeed a Steiner system. Now, if the 9-element Steiner system could be represented by 4 elements, then we would get a Steiner system on 4 elements, which we already know cannot exist! We get similarly that for Steiner systems on 13, 21, 25, 33, . . . points, more than half of the citizens are needed to represent every club. 14.4.3 Suppose that a Steiner system on v elements contains a subset S of (v − 1)/2 elements such that those triples of the original system that belong totally to S form a Steiner system. Prove that in this case S forms a representative committee (so every triple of the original Steiner system contains an element of S). Gender balance. The inhabitants of our town want to set up their clubs so that in addition to forming a Steiner system, they should be "genderbalanced." Ideally, they would like to have the same number of males and females in each club. But realizing that this cannot happen (3 being an odd number), they would settle for less: They require that every club must contain at least one male and at least one female. In mathematical terms, we have a Steiner system, and we want to color the elements with 2 colors (red and blue, corresponding to "female" and "male") in such a way that no block (club) gets only one color. Let us call such a coloring a good 2-coloring of the Steiner system. Is this possible? Let's start with the first nontrivial special case, the case v = 7. We have seen (Exercise 14.4.1) that the only Steiner system in this case is the Fano plane. After a little experimentation we can convince ourselves that there is no way to 2-color this system. In fact, we have stated this already in exercise 14.1.2: If a good 2-coloring were possible, then in any case where the males vote one way and the females the other way, the "line rule" would not provide a clear-cut decision. But it is not only the Fano plane for which no good 2-coloring is possible: Theorem 14.4.2 No Steiner system has a good 2-coloring. Proof. After our preparations, this is not hard to prove. Suppose that we have found a good 2-coloring (thus every triple contains differently colored elements). Then the set of red points and the set of blue points each represent all clubs, so (by our discussion above) both sets must contain at least v−1 elements. Altogether this gives v − 1 points, so there is only one 2 further point, which is blue or red; say it is red. Then the (v − 1)/2 blue 228 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures points form a representative committee, and as we have seen, it is itself a Steiner system. But then any club that is a block in this smaller Steiner system contains only blue points, contradicting the fact that we supposed we had a good coloring. 14.4.4 Show that if we allow 3 colors, then both the Fano plane and the Tictactoe plane can be colored so that every block gets at least two colors (but not necessarily all three). The Schoolgirls' Walking Schedule. A teacher has a group consisting of 9 schoolgirls. She takes them for a walk every day; they walk in three lines, with three girls in each line. The teacher wants to arrange the walks so that after several days, every girl should have walked with every other girl in one line exactly once. 14.4.5 How many days do they need for that? If you've solved the previous exercise, then you know how many days they need, but is it possible to arrange the walk as the teacher wishes? Trying to make a plan from scratch is not easy. An observation that helps is the following. Call a triple of girls a block if they walk in one line at any time. This way we get a Steiner system. We already know a Steiner system on 9 elements, the Tictactoe plane. Are we done? No, because the problem asks for more than simply a Steiner system: We have to specify which blocks (triples) form lines on each day. The order of the days is clearly irrelevant, so what we need is a splitting of the 12 triples into 4 classes such that each class consists of three disjoint triples (thus giving a walk plan for a day). If we take a careful look at the Tictactoe plane, then we notice that this is exactly how it is constructed: a set of 3 parallel lines gives a walk plan for one day. Thomas Kirkman, an English amateur mathematician, asked this question about 15 girls (then the girls need 7 days to complete a walking plan). The question for 15 girls remained unsolved for several years, but finally mathematicians found a solution. Obviously, once you have the right plan, it is easy to check the correctness of it, but there are many possible plans to try. To find a perfect walking plan for the general case when v = 6j + 3, instead of 9 or 15, turned out to be a much harder question. It was solved only more than 100 years later, in 1969, by the Indian-American mathematician Ray-Chaudhuri. One should notice that from this result it follows that there exists a Steiner system for every v = 6j + 3; even to prove this simpler fact is quite hard. There is a related question: Suppose that the teacher wants a plan in which every three girls walk together in a line exactly once. It is not hard to see that such a plan would last for 15 /5 = 91 days. The triples that 3 14.5 Latin Squares 229 walk together form a block design again, but now this is what we called above "trivial" (all triples out of 15 points). So this problem appears easier than the Kirkman Schoolgirl Problem, but its solution (in general, with v schoolgirls walking in lines of k) took even more time: it was solved in 1974 by the Hungarian mathematician Zsolt Baranyai. 14.5 Latin Squares Look at the little 4 × 4 tables below. Each of them has the property that on every field we have one of the numbers 0, 1, 2, and 3, in such a way that no number occurs in any row or in any column, more than once. A table with this property is called a (4 × 4) Latin square. 0 1 2 3 0 1 2 3 1 2 3 0 1 0 3 2 2 3 0 1 2 3 0 1 3 0 1 2 3 2 1 0 0 2 1 3 0 3 1 2 2 1 3 0 1 2 0 3 1 3 0 2 2 1 3 0 3 0 2 1 3 0 2 1 (14.8) (14.9) It is easy to construct many Latin squares with any number of rows and columns (see Exercise 14.5.2). Once we have a Latin square, it is easy to make many more from it. We can reorder the rows, reorder the columns, or permute the numbers 0, 1, . . . occurring in them. For example, if we replace 1 by 2 and 2 by 1 in the first Latin square in (14.8), we get the second Latin square. 14.5.1 How many 4 × 4 Latin squares are there? What is the answer if we don't consider two Latin squares different if one of them can be obtained from the other by permuting rows, columns, and numbers? 14.5.2 Construct an n × n Latin square for every n > 1. Let us have a closer look at the Latin squares in (14.9). If we place these two squares on top of each other, in every field we get an ordered pair of numbers: The first element of the pair comes from the appropriate field of the first square, and the second element from the appropriate field of the 230 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures second: 0, 0 1, 3 2, 1 3, 2 1, 1 0, 2 3, 0 2, 3 2, 2 3, 1 0, 3 1, 0 3, 3 2, 0 1, 2 0, 1 (14.10) Do you notice something about this composite square? Every field contains a different pair of numbers! From this it follows that each of the possible 42 = 16 pairs occurs exactly once (Pigeonhole Principle). If two Latin squares have this property, we call them orthogonal. One may check the orthogonality of two Latin squares in the following way: We take all the fields in the first Latin square that contain 0, and we check the same fields on the second square, to see whether they contain different integers. We do the same with 1, 2, etc. If the squares pass all these checks, then the first square is orthogonal to the second one, and vice versa. 14.5.3 Find two orthogonal 3 × 3 Latin squares. Magic squares. If we have two orthogonal Latin squares, we may very easily construct from them a magic square. (In a magic square the sums of the numbers in every row and every column are equal.) Consider the pairs in the fields in (14.10). Replace each pair (a, b) by ab = 4a + b (in other words, consider ab as a two-digit number in base 4). Writing our numbers in decimal notation, we get the magic square shown in (14.11). 0 7 9 14 5 2 12 11 10 13 3 4 15 8 6 1 (14.11) (This is a magic square indeed: Every row and column sum is 30.) From any two orthogonal Latin squares we can get a magic square using the same method. In every row (and also in every column) the numbers 0, 1, 2, 3 occur exactly once in the first position and exactly once in the second position, so in every row (and column) the sum of the elements is exactly (0 + 1 + 2 + 3) · 4 + (0 + 1 + 2 + 3) = 30, as required in a magic square. 14.5.4 In our magic square we have the numbers 0 through 15, instead of 1 through 16. Try to make a magic square from (14.10) formed by the numbers 1 through 16. 14.5.5 The magic square constructed from our two orthogonal Latin squares is not "perfect", because in a perfect magic square the sums on the diagonals are 14.5 Latin Squares 231 the same as the row and column sums. From which orthogonal Latin squares can we make perfect magic squares? Is there a 4 × 4 Latin square that is orthogonal to both of our Latin squares making up (14.10)? The answer is yes; try to construct it yourself before looking at (14.12). It is interesting to notice that these three Latin squares consist of the same rows, but in different orders. 0 2 1 3 1 3 0 2 2 0 3 1 3 1 2 0 (14.12) 14.5.6 Prove that there does not exist a fourth 4 × 4 Latin square orthogonal to all three Latin squares in (14.9) and (14.12). 14.5.7 Consider the Latin square (14.13). It is almost the same as the previous one in (14.12); but (prove!) there does not exist any Latin square orthogonal to it. So Latin squares that look similar can be very different! 0 1 2 3 1 3 0 2 2 0 3 1 3 2 1 0 (14.13) Latin squares and finite planes. There is a very close connection between Latin squares and finite affine planes. Consider an affine plane of order n; pick any class of parallel lines, and call them "vertical"; pick another class and call them "horizontal". Enumerate the vertical lines arbitrarily, and also the horizontal lines arbitrarily. Thus we can think of the points of the plane as entries of an n × n table in which every row as well as every column is a line (this is the way we presented the Tictactoe plane at the beginning of this Chapter). Now consider an arbitrary third parallel class of lines, and again, label the lines arbitrarily 0, 1, . . . , n − 1. Each entry of the table (point in the plane) belongs to exactly one line of this third parallel class, and we can write the label of this line in the field. So all the 0 entries will form a line of the plane, all the 1 entries a different, but parallel, line, etc. Since any two nonparallel lines have exactly one point in common, the line of 0's will meet every row (and similarly every column) exactly once, and the same holds for the lines of 1's, 2's, etc. This implies that the table we constructed is a Latin square. This is not too exiting so far, since Latin squares are easy to construct. But if we take a fourth parallel class, and construct a Latin square from it, 232 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures then these two Latin squares will be orthogonal! (This is just a translation of the fact that every line from the third parallel class intersects every line from the fourth exactly once.) The affine plane has n + 1 parallel classes; two of these were used to set up the table, but the remaining n − 1 provide n − 1 mutually orthogonal Latin squares. From the Tictactoe plane we get two orthogonal 3 × 3 Latin squares this way (not surprisingly, they are just the ones found directly in exercise 14.5.3). From the affine plane of order 5 constructed earlier, we get 4 mutually orthogonal Latin squares, as shown below. 0 1 2 3 4 0 3 1 4 0 1 2 3 4 0 1 4 2 0 1 2 3 4 0 1 2 0 3 1 2 3 4 0 1 2 3 1 4 2 3 4 0 1 2 3 4 2 0 3 4 0 2 4 1 3 0 4 3 2 1 1 3 0 2 4 1 0 4 3 2 2 4 1 3 0 2 1 0 4 3 3 0 2 4 1 3 2 1 0 4 4 1 3 0 2 4 3 2 1 0 This nice connection between Latin squares and affine planes works both ways: If we have n − 1 mutually orthogonal Latin squares, we can use them to construct an affine plane in a straightforward way. The points of the plane are the fields in an n × n table. The lines are the rows and columns, and for every number in {0, 1, . . . , n − 1} and every Latin square, we form a line from those fields that contain this number. Recall that we have constructed finite planes only of prime order, even though we remarked that they exist for all prime power orders. We can now settle at least the first of the missing orders: Just use this reverse construction to get an affine plane of order 4 from our three mutually orthogonal 4 × 4 Latin squares in (14.9) and (14.12). 14.6 Codes We are ready to talk about some real applications of the ideas discussed in this Chapter. Suppose that we want to send a message through a noisy channel. The message is (as usual) a long string of bits (0's and 1's), and "noisy" means that some of these bits may be corrupted (changed from 0 to 1 or vice versa). The channel itself could be radio transmission, telephone, internet, or just your compact disc player (in which case the "noise" may be a piece of dirt or a scratch on the disc). 14.6 Codes 233 How can we cope with these errors and recover the original message? Of course, a lot depends on the circumstances. Can we ask for a few bits to be resent, if we notice that there is an error? In internet protocols we can; in transmissions from a Mars probe or in listening to music on compact discs, we can't. So in some cases it is enough if we can detect whether there is an error in the message we receive, while in other cases we have to be able to correct the error just from the received message itself. The simplest solution is to send the message twice, and check whether any of the bits arrives differently in the two messages (we can repeat each bit immediately, or repeat the whole message; it does not make any difference at this point). This is called a repetition code. Certainly, if a bit does not match, then we know something is wrong, but of course we don't know whether the first or second copy of the bit was wrong. So we detect an error, but cannot correct it. (Of course, it may happen that both copies of the bit are corrupted; we have to make the assumption that the channel is not too noisy, so that the probability that this happens is small. We'll come back to this issue.) An easy way to strengthen this is to send the message three times. Then we can also correct the error (for every bit, take as correct the version that arrives at least twice), or in the very noisy situation, at least detect it even if 2 (but not 3) copies of a bit are corrupted. There is another simple way of detecting errors: a parity check. This is the simple trick of appending a bit to each string of a given length (say, after 7 bits) so that the number of 1's in the extended message is even (so we append a 0 if the number of 1's is already even, and append a 1 if it is odd). The recipient can look at the received block of 8 bits (a byte), and check whether it has an even number of 1's. If so, we consider it OK; otherwise, we know that it contains an error. (Again, in a very noisy channel errors may remain undetected: If two bits of the 8 are changed, then the parity check does not reveal it.) Here is an example of how a string (namely, 10110010000111) is encoded in these two ways: 1100111100001100000000111111 1011001000001111 (repetition code) (parity check) These solutions are not cheap; their main cost is that the messages become longer. In the repetition code, the increase is 100%; in the parity check, it is about 14%. If the errors are so rare that we can safely assume that only one bit in (say) every 127 is corrupted, then it suffices to append a parity check bit after every 127 bits, at a cost of less than 1%. (Note that the repetition code can be thought of as inserting a parity check bit after every single bit!) Is this the best way? To answer this question, we have to make an assumption about the noisiness of the channel. So we assume that we are sending a message of length k, and that there are no more than e errors (corrupted bits). We cannot use all strings of length k to send messages 234 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures (since then any error would result in another possible message, and the error could not be detected). The set of strings that we use is called a code. So a code is a set of 0-1 strings of length k. For k = 8 (one byte), the repetition code consists of the following 16 strings: 00000000, 00000011, 00001100, 00001111, 00110000, 00110011, 00111100, 00111111, 11000000, 11000011, 11001100, 11001111, 11110000, 11110011, 11111100, 11111111; the parity check code consists of all strings of length 8 in which the number of 1's is even (there are 27 = 128 of these, and so we don't list them all here). We have seen that the parity check code is 1-error-detecting, and so is the repetition code. What is the strongest code on 8 bits (detecting the largest number of errors)? The answer is easy: the code consisting of the two codewords 00000000, 11111111 is 7-error-detecting: All 8 bits must be corrupted before we can be fooled. But this code comes with a very high price tag: What it means is that we resend every bit 8 times. We can construct a more interesting code from the Cube space. This has 8 points, corresponding to the 8 bits. Let us fix an ordering of the points, say ABCDEF GH in Figure 14.7. Every plane P in the geometry will provide a codeword: We send a 1 if the corresponding point lies in the plane P . For example, the bottom-face plane gives the codeword 11110000; the black plane gives the codeword 10100101. We also add the words 00000000 and 11111111, to get a total of 16 codewords. How good is this code? How many bits must be corrupted before one codeword is changed into another? Assume that the two codewords come from two planes P and Q, which by property (B) of the Cube space are either parallel or intersect each other in a line (i.e., in two points). First suppose that these planes are parallel. For example, if they are the "black" and "light" planes, then the two codewords they provide are 10100101 01011010. We wrote the codewords above each other, so that it should be easier to make the following observation: The two planes have no point in common, which (according to the way we constructed the code) means that in no position can both of them have a "1". Since each of them has four 1's, it follows that in no position can both of them have a "0" either. So all 8 bits must be changed before one of them becomes the other. 14.6 Codes 235 Second, suppose that the two planes intersect in two points. For example, the "black" plane and the "bottom" plane give the codewords 10100101, 11110000. The two codewords will have two common 1's, and (since each has four 1's) two common 0's. So 4 bits must be changed before one of them becomes the other. The two further codewords that we added as a kind of an afterthought, all-0 and all-1, are easy to check: We must change 4 bits in them to get a codeword coming from a plane, and 8 bits in them to get one from the other. What is important from these is that if we change up to 3 bits in any codeword, we get a string that is not a codeword. In other words, this code is 3-error-detecting. 0 1 0 0 0 1 1 1 1 1 1 0 0 0 FIGURE 14.10. Two codewords from one line. The Fano plane provides another interesting code. Again, let each point correspond to a position in the codewords (so the codewords will consist of 7 bits). Each line will provide two codewords, one in which we put 1's for the points on the line and 0's for the points outside, and one in which it is the other way around. Again, we add the all-0 and all-1 strings to get 16 codewords. Instead of ordering the bits of the codeword, we can think of them as writing 0 or 1 next to each point of the Fano plane. Figure 14.10 illustrates the two codewords associated with a line. Since we have 16 codewords again, but use only 7 bits, we expect less from these codes than from the codes coming from the Cube space. Indeed, these Fano codes can no longer detect 3 errors. If we start with the codeword defined by a line L (1 on the line and 0 elsewhere), and change the three 1's to 0's, then we get the all-0 string. But it is not only these two special codewords that cause the problem: Again, if we start with the same codeword, and flip the 3 bits on any other line K (from 1 to 0 at the intersection point of K and L, from 0 to 1 at the other two points of K), then we get a codeword coming from a third line (Figure 14.11). 236 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures 0 0 0 0 0 0 1 1 1 1 1 0 1 1 FIGURE 14.11. Three errors are too much for the Fano code: flipping the bits along the dotted line produces another valid codeword. Going through an argument as above, we can see that the Fano code is 2-error-detecting: We cannot get a valid codeword from another valid codeword by flipping 1 or 2 bits. This implies that the Fano code is 1-error-correcting. What this means is that not only can we detect if there is an erroneous bit, but we can correct it. Suppose that we receive a string that comes from a valid codeword a by changing a single bit. Could this string come from another valid codeword b? The answer is no: Otherwise, the codewords a and b would differ in only two places, which is not possible. The codes we derived from the Fano plane and the Cube space are special cases of a larger family of codes called Reed–M¨ller codes. These are very u important in practice. For example, the NASA Mariner probes used them to send back images from the Mars. Just as the Cube Code was based on 2-dimensional subspaces of a 3-dimensional space, the code used by the Mariner probes were based on 3-dimensional subspaces of a 5-dimensional space. They worked with blocks of size 32 (instead of 8 as we did), and could correct up to 7 errors in each block. The price was, of course, pretty stiff: There were only 64 codewords used, so to safely transmit 6 bits, one had to package them in 32 bits. But of course, the channel (the space between Earth and Mars) was very noisy! Error-correcting codes are used all around us. Your CD player uses a more sophisticated error-correcting code (called the Reed–Solomon code) to produce a perfect sound even if the disk is scratched or dusty. Your Internet connection and digital phone use such codes to correct for noise on the line. 14.6.1 Prove that a code is d-error-correcting if and only if it is (2d)-errordetecting. 14.6.2 Show that every string of length 7 is either a codeword of the Fano code or arises from a unique codeword by flipping one bit (a code with this property is called perfect 1-error-correcting). 14.6 Codes 237 Review Exercises 14.6.3 Verify that the Tictactoe plane is the same as the affine plane over the 3-element field. 14.6.4 A lab has 7 employees. Everybody works 3 nights a week: Alice on Monday, Tuesday, and Thursday; Bob on Tuesday, Wednesday, and Friday; etc. Show that any two employees meet exactly one night a week, and for any two nights there is an employee who is working on both. What is the connection with the Fano plane? 14.6.5 The game SMALLSET (which is a simplified version of the commercial card game SET) is played with a deck of 27 cards. Each card has 1, 2, or 3 identical shapes; each shape can be a circle, triangle, or square, and it can be red, blue, or green. There is exactly one card with 2 green triangles, exactly one with 3 red circles, etc. A SET is a triple of cards such that the number of shapes on them is either all the same or all different; the shapes are either all the same or all different; and their colors are all the same or all different. The game consists of putting down 9 cards, face up, and recognizing and removing SETs as quickly as you can; if no SETs are left, 3 new cards are turned up. If no SETs are left and all the remaining cards are turned up, the game is over. (a) What is the number of SETs? (b) Show that for any two cards there is exactly one third card that forms with them a SET. (c) What is the connection between this game and the affine space over the 3-element field? (d) Prove that at the end of the game, either no cards or at least 6 cards remain. 14.6.6 How many points do the two smallest projective planes have? 14.6.7 Consider the prime field with 13 elements. For every two numbers x and y in the field, consider the triple {x + y, 2x + y, 3x + y} of elements of the field. Show that these triples form a block design, and compute its parameters. 14.6.8 Determine whether there exists a block design with the following parameters: (a) v = 15, k = 4, λ = 1; (b) v = 8, k = 4, λ = 3; (c) v = 16, k = 6, λ = 1. 14.6.9 Prove that the Tictactoe plane is the only Steiner system with v = 9. 14.6.10 Consider the addition table of the "Days of the Week" number system in Section 6.8. Show that this table is a Latin square. Can you generalize this observation? 238 14. Finite Geometries, Codes,Latin Squares,and Other Pretty Creatures 14.6.11 Describe the code you get from the projective plane over the 3-element field, analogously to the Fano code. How much error correction/detection does it provide? 15 A Glimpse of Complexity and Cryptography 15.1 A Connecticut Class in King Arthur's Court In the court of King Arthur1 there dwelt 150 knights and 150 ladies-inwaiting. The king decided to marry them off, but the trouble was that some pairs hated each other so much that they would not get married, let alone speak! King Arthur tried several times to pair them off but each time he ran into conflicts. So he summoned Merlin the Wizard and ordered him to find a pairing in which every pair was willing to marry. Now, Merlin had supernatural powers, and he saw immediately that none of the 150! possible pairings was feasible, and this he told the king. But Merlin was not only a great wizard, but a suspicious character as well, and King Arthur did not quite trust him. "Find a pairing or I shall sentence you to be imprisoned in a cave forever!" said Arthur. Fortunately for Merlin, he could use his supernatural powers to browse forthcoming scientific literature, and he found several papers in the early twentieth century that gave the reason why such a pairing could not exist. He went back to the king when all the knights and ladies were present, and asked a certain 56 ladies to stand on one side of the king and 95 knights on the other side, and asked, "Is any one of you ladies willing to marry any of L. Lov´sz and M.D. Plummer: Matching Theory, Akad´miai Kiad´, North a e o Holland, Budapest, 1986 (with slight modifications), with the kind permission of Mike Plummer. The material was developed as a handout at Yale University, New Haven, Connecticut. 1 From 240 15. A Glimpse of Complexity and Cryptography these knights?" and when all said "No!" Merlin said, "Oh King, how can you command me to find a husband for each of these 56 ladies among the remaining 55 knights?" So the king, whose courtly education did include the Pigeonhole Principle, saw that in this case Merlin had spoken the truth, and he graciously dismissed him. Some time elapsed and the king noticed that at the dinners served for the 150 knights at the famous round table, neighbors often quarreled and even fought. Arthur found this bad for the digestion and so once again he summoned Merlin and ordered him to find a way to seat the 150 knights around the table so that each of them should sit between two friends. Again, using his supernatural powers Merlin saw immediately that none of the 150! seatings would do, and this he reported to the king. Again, the king bade him find one or explain why it was impossible. "Oh, I wish there were some simple reason I could give to you! With some luck there could be a knight having only one friend, and so you, too, could see immediately that what you demand from me is impossible. But alas!, there is no such simple reason here, and I cannot explain to you mortals why no such seating exists, unless you are ready to spend the rest of your life listening to my arguments!" The king was naturally unwilling to do that, and so Merlin has lived imprisoned in a cave ever since. (A severe loss for applied mathematics!) The moral of this tale is that there are properties of graphs that when they hold, are easily proven to hold. If a graph has a perfect matching, or a Hamilton cycle, this can be "proved" easily by exhibiting one. If a bipartite graph does not have a perfect matching, then this can be "proved" by exhibiting a subset X of one color class that has fewer than |X| neighbors in the other. The reader (and King Arthur!) are directed to Figure 15.1, in which the graph on the left-hand side has a perfect matching (indicated by the heavy lines), but the graph on the right-hand side does not. To convince ourselves (and the king) of the latter, consider the four black points and their neighbors. FIGURE 15.1. A bigraph with a perfect matching and one without Most graph-theoretic properties that interest us have this logical structure. If it is easy to prove (certify, exhibit) that the property holds, then the property is called (in the jargon of computer science) an NP property (if 15.1 A Connecticut Class in King Arthur's Court 241 you really want to know, NP is the abbreviation of Nondeterministic Polynomial Time, but it would be difficult to explain where this highly technical phrase comes from). The two problems that Merlin had to face—the existence of a perfect matching and the existence of a Hamilton cycle—are clearly NP properties. But NP properties also appear quite frequently in other parts of mathematics. A very important NP property of natural numbers is their compositeness: If a natural number is composite, then this can be exhibited easily by showing a decomposition n = ab (a, b > 1). The remarks we have made so far explain how Merlin can remain free if he is lucky and the task assigned to him by King Arthur has a solution. For instance, suppose he could find a good way to seat the knights for dinner. He could then convince King Arthur that his seating plan was "good" by asking if there was anybody sitting beside any enemy of his (or just wait and see if the dinner was quiet). This shows that the property of the corresponding "graph of friendships" that it contains a Hamilton cycle is an NP property. But how could he survive Arthur's wrath in the case of the marriage problem and not in the case of the seating problem when these problems do not have solutions? What distinguishes the nonexistence of a Hamilton cycle in a graph from the nonexistence of a perfect matching in a bipartite graph? From our tale, we hope the answer is clear: the nonexistence of a perfect matching in a bipartite graph is also an NP property (this is a main implication of the Marriage Theorem, Theorem 10.3.1), while the nonexistence of a Hamilton cycle in a graph is not! (To be precise, no proof of this latter fact is known, but there is strong evidence in favor of it.) So for certain NP properties the negation of the property is again an NP property. A theorem asserting the equivalence of an NP property with the negation of another NP property is called a good characterization. There are famous good characterizations throughout graph theory and elsewhere. Many NP properties are even better. Facing the problem of marrying off his knights and ladies, Arthur himself (say, after reading this book) could decide himself whether or not it was solvable: He could run the algorithm described in Section 10.4. A lot of work, but probably doable with the help of quite ordinary people, without using the supernatural talents of Merlin. Properties that can be decided efficiently are called properties in the class P (here P stand for Polynomial Time, an exact but quite technical definition of the phrase "efficiently"). Many other simple properties of graphs discussed in this book also belong to this class, such as connectivity and the existence of a cycle. One of our favorite problems, that of deciding whether a number is prime, was shown to be in this class just before our book went to press. (The algorithm we described in Section 6.10 does not quite qualify for the class P, because it uses a random selection of the base a.) The introduction of the notions of Polynomial Time and NP properties signaled the birth of modern complexity theory. Notions and paradigms from this theory have penetrated a large part of mathematics and its applications. In the sequel we describe how ideas of complexity theory can be 242 15. A Glimpse of Complexity and Cryptography applied in one of the most important areas of theoretical computer science, namely, cryptography. 15.2 Classical Cryptography Ever since writing was invented, people have been interested not only in using it to communicate with their partners, but also in trying to conceal the content of their messages from their adversaries. This leads to cryptography (or cryptology), the science of secret communication. The basic situation is that one party, say King Arthur, wants to send a message to King Bela. There is, however, a danger that the evil Caesar Caligula intercepts the message and learns things that he is not supposed to know about. The message, understandable even for Caligula, is called the plain text. To protect its content, King Arthur encrypts his message. When King Bela receives it, he must decrypt it in order to be able to read it. For the kings to be able to encrypt and decrypt the message, they must know something that Caligula does not know: this information is the key. Many cryptosystems have been used in history; most of them, in fact, turn out to be insecure, especially if the adversary can use powerful computing tools to break it. Perhaps the simplest method is substitution code: We replace each letter of the alphabet by another letter. The key is the table that contains for each letter the letter to be substituted for it. While a message encrypted this way looks totally scrambled, substitution codes are, in fact, easy to break. Solving Exercise 15.2.1 will make it clear how the length and positions of the words can be used to figure out the original meaning of letters if the word breaks are preserved (i.e., "space" is not replaced by another character). But even if the splitting into words is hidden, an analysis of the frequency of various letters provides enough information to break the substitution code. One-time pads. There is another simple frequently used method that is much more secure: the use of "one-time pads." This method is very safe; it was used during World War II for communication between the American president and the British prime minister. Its disadvantage is that it requires a very long key ("pad"), which can only be used once. A one-time pad is a randomly generated string of 0's and 1's. Here is one: 11000111000010000110010100100100101100110010101100001110110000010 Both Kings Arthur and Bela know this sequence (it was sent well in advance by a messenger). Now King Arthur wants to send the following message to King Bela: ATTACK MONDAY 15.2 Classical Cryptography 243 First, he has to convert it to 0's and 1's. It is not clear that medieval kings had the knowledge to do so, but the reader should be able to think of various ways: using ASCII codes, or Unicodes of the letters, for example. But we want to keep things simple, so we just number the letters from 1 to 26, and then write down the binary representation of the numbers, putting 0's in front so that we get a string of length 5 for each letter. Thus we have "00001" for A, "00010" for B, etc. We use "00000" for "space." The above message becomes 00001100101001000001000110101100000011010111101110001000000111001 This might look cryptic enough, but Caligula (or rather one of the excellent Greek scientists he keeps in his court as slaves) could easily figure out what it stands for. To encrypt it, Arthur adds the one-time pad to the message bit-by-bit. To the first bit of the message (which is 0) he adds the first bit of the pad (1) and writes down the first bit of the encoded message: 0 ⊕ 1 = 1. He computes the second, third, etc., bits similarly: 0 ⊕ 1 = 1, 0 ⊕ 0 = 0, 0 ⊕ 0 = 0, 1 ⊕ 0 = 1, 1 ⊕ 1 = 0, . . . . (Note that he uses this strange addition from the 2-element field, for which 1 ⊕ 1 = 0.) Another way of saying what King Arthur does is the following: if the k-th bit of the pad is 1, he flips the k-th bit of the text; else, he leaves it as it was. So Arthur computes the encoded message: 11001011101011000111010010001000101111100101000010000110110111011 He sends this to King Bela, who, using the one-time pad, can easily flip back the appropriate bits, and recover the original message. But Caligula does not know the one-time pad (nor do his excellent scientists), so he has no idea about which bits were flipped, and so he is helpless. The message is safe. It can be expensive to make sure that the sender and the receiver both have such a common key; but note that the key can be sent at a safer time and by a completely different method than the message (moreover, it may be possible to agree on a key even without actually passing it; but this would lead us too far into cryptography). Once the Kings managed to pass the key to each other, it is tempting to reuse it; after all, if Bela encrypts his reply by the same pad, it is still completely random-looking. In solving exercises 15.2.2 and 15.2.3 you will see that this is not a good idea, along with some other weaknesses of the one-time pad method. 15.2.1 For the following message, the kings used substitution code. Caligula intercepted the message and quite easily broke it. Can you do it too? U GXUAY LS ZXMEKW AMG TGGTIY HMD TAMGXSD LSSY, FEG GXSA LUGX HEKK HMDIS. FSKT 244 15. A Glimpse of Complexity and Cryptography 15.2.2 At one time, Arthur made the mistake of using the one-time pad shifted: The first bit of the plain text he encoded using the second bit of the pad, the second bit of the plain text he encoded using the third bit of the pad etc. He noticed his error after he sent the message off. Being afraid that Bela would not understand his message, he encoded it again (now correctly) using the same one-time pad, and sent it to Bela by another courier, explaining what happened. Caligula intercepted both messages, and was able to recover the plain text. How? 15.2.3 The Kings were running low on one-time pads, and so Bela had to use the same pad to encode his reply as they used for Arthur's message. Caligula intercepted both messages, and was able to reconstruct both plain texts. How? 15.3 How to Save the Last Move in Chess Modern cryptography started in the late 1970's with the idea that it is not only lack of information that can protect our message against an unauthorized eavesdropper, but also the computational complexity of processing it. The idea can be illustrated by the following simple example. Alice and Bob are playing chess over the phone. They want to interrupt the game for the night; how can they do it so that the person to move should not get the improper advantage of being able to think about his move the whole night? At a tournament, the last move is not made on the board, only written down, put in an envelope, and deposited with the referee. The next morning, the envelope is opened, and the other player learns what the move was as his clock begins to run. But now the two players have no referee, no envelope, no contact other than the telephone line. The player making the last move (say, Alice) has to send Bob some message. The next morning (or whenever they continue the game) she has to give some additional information, some "key," which allows Bob to reconstruct the move. Bob should not be able to reconstruct Alice's move without the key; Alice should not be able to change her mind overnight and modify her move. Surely, this seems to be impossible! If she gives enough information the first time to uniquely determine her move, Bob will know the move too soon; if the information given the first time allows several moves, then she can think about it overnight, figure out the best among these, and give the remaining information, the "key," accordingly. If we measure information in the sense of classical information theory, then there is no way out of this dilemma. But complexity comes to our help: it is not enough to communicate information, it must also be processed. So here is a solution to the problem, using elementary number theory! (Many other schemes can be designed.) Alice and Bob agree to encode every move as a 4-digit number (say, '11' means 'K', '6' means 'f', and '3' means itself, so '1163' means 'Kf3'). So far, this is just notation. 15.3 How to Save the Last Move in Chess 245 Next, Alice extends the four digits describing her move to a prime number p = 1163 . . . with 200 digits. She also generates another prime q with 201 digits and computes the product N = pq (this would take rather long on paper, but is trivial using a personal computer). The result is a number with 400 or 401 digits; she sends this number to Bob. Next morning, she sends both prime factors p and q to Bob. He reconstructs Alice's move from the first four digits of the smaller prime. To make sure that Alice was not cheating, he should check that p and q are primes and that their product is N . Let us argue that this protocol does the job. First, Alice cannot change her mind overnight. This is because the number N contains all the information about her move: This is encoded as the first four digits of the smaller prime factor of N . So Alice commits herself to the move when sending N . But exactly because the number N contains all the information about Alice's move, Bob seems to have the advantage, and he indeed would have if he had unlimited time or unbelievably powerful computers. What he has to do is to find the prime factors of the number N . But since N has 400 digits (or more), this is a hopelessly difficult task with current technology. Can Alice cheat by sending a different pair (p , q ) of primes the next morning? No, because Bob can easily compute the product p q , and check that this is indeed the number N that was sent the previous night. (Note the role of the uniqueness of prime factorization, Theorem 6.3.1.) All the information about Alice's move is encoded in the first 4 digits of the smaller prime factor p. We could say that the rest of p and the other prime factor q serve as a "deposit box": This box hides this information from Bob, and it can be opened only if the appropriate key (the factorization of N ) is available. The crucial ingredient of this scheme is complexity: the computational difficulty to find the factorization of an integer. With the spread of electronic communication in business, many solutions of traditional correspondence and trade must be replaced by electronic versions. We have seen an electronic "deposit box" above. Other schemes (similar or more involved) can be found for electronic passwords, authorization, authentication, signatures, watermarking, etc. These schemes are extremely important in computer security, cryptography, automatic teller machines, and many other fields. The protocols are often based on simple number theory; in the next section we discuss (a very simplified version of) one of them. 15.3.1 Motivated by the one-time pad method, Alice suggests the following protocol for saving the last move in their chess game: In the evening, she encrypts her move (perhaps with other text added, to make it reasonably long) using a randomly generated 0-1 sequence as the key (just like in the one-time pad method). The next morning she sends the key to Bob, so that he can decrypt the message. Should Bob accept this suggestion? 246 15. A Glimpse of Complexity and Cryptography 15.3.2 Alice modifies her suggestion as follows: instead of the random 0-1 sequence, she offers to use a random, but meaningful text as the key. For whom would this be advantageous? 15.4 How to Verify a Password—Without Learning it In a bank, a cash machine works by name and password. This system is safe as long as the password is kept secret. But there is one weak point: The computer of the bank must store the password, and the administrator of this computer may learn it and later misuse it. Complexity theory provides a scheme whereby the bank can verify that the customer does indeed know the password—without storing the password itself! At first glance this looks impossible—just as the problem with filing the last chess move was. And the solution (at least the one we discuss here) uses the same kind of construction as our telephone chess example. Suppose that the password is a 100-digit prime number p (this is, of course, too long for everyday use, but it illustrates the idea best). When the customer chooses the password, he chooses another prime q with 101 digits, forms the product N = pq of the two primes, and tells the bank the number N . When the teller machine is used, the customer tells his name and the password p. The computer of the bank checks whether or not p is a divisor of N ; if so, it accepts p as a proper password. The division of a 200 digit number by a 100 digit number is a trivial task for a computer. Let us assume that the system administrator learns the number N stored along with the files of our customer. To use this in order to impersonate the customer, he has to find a 100-digit number that is a divisor of N ; but this is essentially the same problem as finding the prime factorization of N , and this is hopelessly difficult. So—even though all the necessary information is contained in the number N —the computational complexity of the factoring problem protects the password of the customer! 15.5 How to Find These Primes In our two simple examples of "modern cryptography," as well as in almost all the others, one needs large prime numbers. We know that there are arbitrarily large primes (Theorem 6.4.1), but are there any with 200 digits, starting with 1163 (or any other 4 given digits)? Maple found (in a few seconds on a laptop!) the smallest such prime number: 15.6 Public Key Cryptography 11630000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000371 247 The smallest 200 digit integer starting with 1163 is 1163·10196 . This is of course not a prime, but above we found a prime very close by. There must be zillions of such primes! Indeed, a computation very similar to what we did in section 6.4 shows that the number of primes Alice can choose from is about 1.95 · 10193 . This is a large number of possibilities, but how do we find one? It would not be good to use the prime above (the smallest eligible): Bob could guess this and thereby find out Alice's move. What Alice can do is to fill in the missing 196 digits randomly, and then test whether the number she obtains is a prime. If not, she can throw it away and try again. As we computed in Section 6.4, one in every 460 numbers with 200 digits is a prime, so on the average in 460 trials she gets a prime. This looks like a lot of trials, but of course she uses a computer; here is one we computed for you with this method (in a few seconds again): 11631467128765557632799097045596606908283654760066 68873814489354662474360419891104680411103886895880 57457155724800095696391740333854584185935354886223 23782317577559864739652701127177097278389465414589 So we see that in the "envelope" scheme above, both computational facts mentioned in Section 6.10 play a crucial role: It is easy to test whether a number is a prime (and thereby it is easy to compute the encryption), but it is difficult to find the prime factors of a composite number (and so it is difficult to break the cryptosystem). 15.6 Public Key Cryptography Cryptographic systems used in real life are more complex than those described in the previous section; but they are based on similar principles. In this section we sketch the math behind the most commonly used system, the RSA code (named after its inventors, Rivest, Shamir, and Adleman). The protocol. Alice generates two 100-digit prime numbers, p and q and computes their product m = pq. Then she generates two 200-digit numbers d and e such that (p − 1)(q − 1) is a divisor ed − 1. (We will return to the question of how this is done.) The numbers m and e she publishes on her web site (or in the phone book), but the prime factors p and q and the number d remain her closely guarded secrets. The number d is called her private key, and the number 248 15. A Glimpse of Complexity and Cryptography e, her public key (the numbers p and q she may even forget; they will not be needed to operate the system, just to set it up). Suppose that Bob wants to send a message to Alice. He writes the message as a number x (we have seen before how to do this). This number x must be a non-negative integer less than m (if the message is longer, he can just break it up into smaller chunks). The next step is the trickiest: Bob computes the remainder of xe modulo m. Since both x and e are huge integers (200 digits), the number xd has more than 10200 digits; we could not even write it down, let alone compute it! Luckily, we don't have to compute this number, only its remainder when dividing by m. This is still a large number, but at least it can be written down in 2 or 3 lines. So let r be this remainder; this is sent to Alice. When she receives it, she can decrypt it using her private key d by carrying out essentially the same procedure as Bob did: She computes the remainder of rd modulo m. And—a black magic of number theory, until you see the explanations—this remainder is just the plain text x. What if Alice wants to send a message to Bob? He also needs to go through the trouble of generating his private and public keys. He has to pick two primes p and q , compute their product m , select two positive integers d and e such that (p − 1)(q − 1) is a divisor of e d − 1, and finally publish m and e . Then Alice can send him a secure message. The black math magic behind the protocol. The key fact from mathematics we use is Fermat's Theorem, Theorem 6.5.1. Recall that x is the plain text (written as an integer) and the encrypted message r is the remainder of xe modulo m. So we can write r ≡ xe (mod m). To decrypt, Alice raises this to the dth power to get rd ≡ xed (mod m). To be more precise, Alice computes the remainder x of rd modulo m, which is the same as the remainder of xed modulo m. We want to show that this remainder is precisely x. Since 0 ≤ x < m, it suffices to argue that xed − x is divisible by m. Since m = pq is the product of two distinct primes, it suffices to prove that xed − x is divisible by both p and q. Let us consider divisibility by p, for example. The main property of e and d is that ed − 1 is divisible by (p − 1)(q − 1), and hence also by p − 1. This means that we can write ed = (p−1)l +1, where l is a positive integer. We have xed − x = x x(p−1)l − 1 . Here x(p−1)l − 1 is divisible by xp−1 − 1 (see Exercise 6.1.6), and so x x(p−1)l − 1 is divisible by xp − x, which in turn is divisible by p by Fermat's Theorem. 15.6 Public Key Cryptography 249 How to do all this computation. We already discussed how to find primes, and Alice can follow the method described in section 6.10. The next issue is the computation of the two keys e and d. One of them, say e, Alice can choose at random, from the range 1, . . . , (p − 1)(q − 1) − 1. She has to check that it is relatively prime to (p−1)(q −1); this can be done efficiently with the help of the Euclidean Algorithm discussed in Section 6.6. If the number she chose is not relatively prime to (p − 1)(q − 1), she just throws it out and tries another one. This is similar to the method we used to find a prime, and it is not hard to see that she will find a good number in about the same number of trials as it takes to find a prime. But if she finally succeeds and the Euclidean Algorithm shows that she found a number e relatively prime to (p − 1)(q − 1), then (as in Section 6.6) it also gives two integers u and v such that eu − (p − 1)(q − 1)v = 1. So eu − 1 is divisible by (p − 1)(q − 1). Let d denote the remainder of u modulo (p − 1)(q − 1), then ed − 1 is also divisible by (p − 1)(q − 1), and so we have found a suitable private key d. Finally, how do we compute the remainder of xe modulo m, when just to write down xe would fill the universe? This is done in the same way as described in Section 6.10. Signatures, etc. There are many other useful things this system can do. For example, suppose that Alice gets a message from Bob as described above. How can she know that it indeed came from Bob? Just because it is signed "Bob," it could have come from anybody. But Bob can do the following. First, he encrypts the message with his private key, then adds "Bob," and encrypts it again with Alice's public key. When Alice receives it, she can decrypt it with her private key. She'll see a still encrypted message, signed "Bob." She can cut away the signature, look up Bob's public key in the phonebook, and use it to decrypt the message. Could anyone have faked this message? No, because the interloper would have to use Bob's private key to encrypt the message (using any other key would mean that Alice gets garbage when she decrypts the message by Bob's public key, and she would know immediately that it is a fake). One can use similar tricks to implement many other electronic gadgets, using the RSA public key system: authentication, watermarking, etc. Security. The security of the RSA protocol is a difficult issue, and since its inception in 1977, thousands of researchers have investigated it. The fact that no attack has been generally successful is a good sign; but unfortunately, no exact proof of its security has been found (and it appears that current mathematics lacks the tools to provide such a proof). We can give, however, at least some arguments that support its security. Suppose that you intercept the message of Bob, and want to decipher it. 250 15. A Glimpse of Complexity and Cryptography You know the remainder r (this is the intercepted message). You also know Alice's public key e, and the number m. One could think of two lines of attack: Either you can figure out her private key d and then decrypt the message just as she does, or you could somehow more directly find the integer x, knowing the remainder of xe modulo m. Unfortunately, there is no theorem stating that either of this is impossible in less than astronomical time. But one can justify the security of the system with the following fact: if one can break the RSA system, then one can use the same algorithm to find the prime factors of m (see Exercise 15.6.1). The factorization problem has been studied by many people, and no efficient method has been found, which makes the security of RSA quite probable. 15.6.1 Suppose that Bob develops an algorithm that can break RSA in the first, more direct, way described above: Knowing Alice's public key m and e, he can find her private key d. (a) Show that he can use this to find the number (p − 1)(q − 1); (b) from this, he can find the prime factorization m = pq. The real world. How practical could such a complicated system be? It seems that only a few mathematicians could ever use it. But in fact you have probably used it yourself hundreds of times! RSA is used in SSL (Secure Socket Layer), which in turn is used in https (secure http). Any time you visit a "secure site" on the Internet (to read your e-mail or to order merchandise), your computer generates a public and private key for you, and uses them to make sure that your credit card number and other personal data remain secret. It does not have to involve you in this at all; all you notice is that the connection is a bit slower. In practice, the two 100-digit primes are not considered sufficiently secure. Commercial applications use more than twice this length, military applications, more than 4 times. While the hairy computations of raising the plain text x to an exponent that itself has hundreds of digits are surprisingly efficient, it would still be too slow to encrypt and decrypt each message this way. A way out is to send, as a first message, the key to a simpler encryption system (think of a one-time pad, although one uses a more efficient system in practice, like DES, the Digital Encryption Standard). This key is then used for a few minutes to encode the messages going back and force, then thrown away. The idea is that in a short session, the number of encoded messages is not enough for an eavesdropper to break the system. 16 Answers to Exercises 1 Let's Count! 1.1 A Party 1.1.1. 7 · 6 · · · 2 · 1 = 5040. 1.1.2. Carl: 15 · 23 = 120. Diane: 15 · 3 · 2 · 1 = 90. 1.1.3. Bob: 9·7·5·3 = 945. Carl: 945·25 = 302,40. Diane: 945·5·4·3·2·1 = 113,400. 1.2 Sets and the Like 1.2.1. (a) all houses in a street; (b) an Olympic team; (c) class of '99; (d) all trees in a forest; (e) the set of rational numbers; (f) a circle in the plane. 1.2.2. (a) soldiers; (b) people; (c) books; (d) animals. 1.2.3. (a) all cards in a deck; (b) all spades in a deck; (c) a deck of Swiss cards; (d) nonnegative integers with at most two digits; (e) nonnegative integers with exactly two digits; (f) inhabitants of Budapest, Hungary. 1.2.4. Alice, and the set whose only element is the number 1. 1.2.5. No. 1.2.6. ∅, {0}, {1}, {3}, {0, 1}, {0, 3}, {1, 3}, {0, 1, 3}. 8 subsets. 1.2.7. women; people at the party; students of Yale. 252 16. Answers to Exercises 1.2.8. {a}, {a, c}, {a, d}, {a, e}, {a, c, d}, {a, c, e}, {a, d, e}, {a, c, d, e}. 1.2.9. Z or Z+ . The smallest is {0, 1, 3, 4, 5}. 1.2.10. (a) {a, b, c, d, e}. (b) The union operation is associative. (c) The union of any set of sets consists of those elements that are elements of at least one of the sets. 1.2.11. The union of a set of sets {A1 , A2 , . . . , Ak } is the smallest set containing each Ai as a subset. 1.2.12. 6, 9, 10, 14. 1.2.13. The cardinality of the union is at least the larger of n and m and at most n + m. 1.2.14. (a) {1, 3}; (b) ∅; (c) {2}. 1.2.15. The cardinality of the intersection is at most the minimum of n and m. 1.2.16. Commutativity (1.2) is obvious. To show that (A ∩ B) ∩ C = A ∩ (B ∩ C), it suffices to check that both sides consist of those elements that belong to all three of A, B, and C. The proof of the other identity in (1.3) is similar. Finally, one can prove (1.4) completely analogously to the proof of (1.1). 1.2.17. The common elements of A and B are counted twice on both sides; the elements in either A or B but not both are counted once on both sides. 1.2.18. (a) The set of negative even integers and positive odd integers. (b) B. 1.3 The Number of Subsets 1.3.1. (a) Powers of 2. (b) 2n − 1. (c) sets not containing the last element. 1.3.2. 2n−1 . 1.3.3. Divide all subsets into pairs such that each pair differs only in their first element. Each pair contains an even and an odd subset, so their numbers are the same. 1.3.4. (a) 2 · 10n − 1; (b) 2 · (10n − 10n−1 ). 1.4.1. 101. 1.4.2. 1 + n lg 2 . 1.5 Sequences 1.5.1. The trees have 9 and 12 leaves, respectively. 1.5.2. 5 · 4 · 3 = 60. 16. Answers to Exercises 253 1.5.3. 313 . 1.5.4. 6 · 6 = 36. 1.5.5. 1220 . 1.5.6. (220 )12 . 1.6 Permutations 1.6.1. n!. 1.6.2. (a) 7 · 5 · 3 · 1 = 105. (b) (2n − 1) · (2n − 3) · · · 3 · 1. 1.7 The Number of Ordered Subsets 1.7.1. (We don't think you could really draw the whole tree; it has almost 1020 leaves. It has 11 levels of nodes.) 1.7.2. (a) 100!. (b) 90!. (c) 100!/90! = 100 · 99 · · · 91. 1.7.3. n! (n−k)! = n(n − 1) · (n − k + 1). 1.7.4. In one case, repetition is not allowed, while in the other case, it is allowed. 1.8 The Number of Subsets of a Given Size 1.8.1. Handshakes; lottery; hands in bridge. 1.8.2. See Pascal's Triangle in Chapter 3. 1.8.3. n 0 n n n 1 n n−1 = = 1, = = n. 1.8.4. An algebraic proof of (1.7) is straightforward. In (1.8), the righthand side counts k-subsets of an n-element set by separately counting those that contain a given element and those that do not. 1.8.5. An algebraic proof is easy. A combinatorial interpretation: n2 is the number of all ordered pairs (a, b) with a, b ∈ {1, 2, . . . , n}, and n is the 2 number of ordered pairs (a, b) among these with a < b (why?). To count the remaining ordered pairs (a, b) (those with a ≥ b), add 1 to their first entry. Then we get a pair (a , b) with 1 ≤ a , b ≤ n + 1, a > b, and conversely, every such pair is obtained this way. Hence the number of these pairs is n+1 2 . 1.8.6. Again, an algebraic proof is easy. A combinatorial interpretation: We can choose a k-element set by first choosing one element (n possibilities) and then choosing a (k − 1)-element subset of the remaining n − 1 elements ( n−1 possibilities). But we get every k-element subset exactly k times k−1 (depending on which of its elements was chosen first), so we have to divide the result by k. 254 16. Answers to Exercises 1.8.7. Both sides count the number of ways to divide an a-element set into three sets with a − b, b − c, and c elements. 2 Combinatorial Tools 2.1 Induction 2.1.1. One of n and n + 1 is even, so the product n(n + 1) is even. By induction: true for n = 1; if n > 1, then n(n + 1) = (n − 1)n + 2n, and n(n − 1) is even by the induction hypothesis, 2n is even, and the sum of two even numbers is even. 2.1.2. True for n = 1. If n > 1, then 1 + 2 + · · · + n = (1 + 2 + · · · + (n − 1)) + n = n(n + 1) (n − 1)n +n= . 2 2 2.1.3. The youngest person will count n handshakes. The 7th oldest will count 6 handshakes. So they count 1 + 2 + · · · + n handshakes. We already know that there are n(n + 1)/2 handshakes. 2.1.4. Compute the area of the rectangle in two different ways. 2.1.5. By induction on n. True for n = 2. For n > 2, we have 1 · 2 + 2 · 3 + 3 · 4 + · · · + (n − 1) · n = (n − 2) · (n − 1) · n + (n − 1) · n 3 (n − 1) · n · (n + 1) . = 3 2.1.6. If n is even, then 1 + n = 2 + (n − 1) = · · · = n − 1 + n = n + 1, so 2 2 the sum is n (n + 1) = n(n+1) . If n is odd, then we have to add the middle 2 2 term separately. 2.1.7. If n is even, then 1+(2n−1) = 3+(2n−3) = · · · = (n−1)+(n+1) = 2n, so the sum is n (2n) = n2 . Again, if n is odd, then the solution is similar, 2 but we have to add the middle term separately. 2.1.8. By induction. True for n = 1. If n > 1, then 12 + 22 + · · · + (n − 1)2 = 12 + 22 + · · · + (n − 1)2 + n2 = (n − 1)n(2n − 1) n(n + 1)(2n + 1) + n2 = . 6 6 2.1.9. By induction. True for n = 1. If n > 1 then 20 + 21 + 22 + · · · + 2n−1 = (20 + 21 + · · · + 2n−2 ) + 2n−1 = (2n−1 − 1) + 2n−1 = 2n − 1. 16. Answers to Exercises 255 2.1.10. (Strings) True for n = 1. If n > 1 then to get a string of length n we can start with a string of length n − 1 (this can be chosen in k n−1 ways by the induction hypothesis) and append an element (this can be chosen in k ways). So we get k n−1 · k = k n . (Permutations) True for n = 1. To seat n people, we can start with seating the oldest (this can be done in n ways) and then seating the rest (this can be done in (n − 1)! ways by the induction hypothesis). We get n · (n − 1)! = n!. 2.1.11. True if n = 1. Let n > 1. The number of handshakes between n people is the number of handshakes by the oldest person (this is n − 1) plus the number of handshakes between the remaining n − 1 persons (which is (n − 1)(n − 2)/2 by the induction hypothesis). We get (n − 1) + (n − 1)(n − 2)/2 = n(n − 1)/2 handshakes. 2.1.12. We did not check the base case n = 1. 2.1.13. The proof uses that there are at least four lines. But we checked only n = 1, 2 as base cases. The assertion is false for n = 3 and for every value of n after that. 2.2 Comparing and Estimating Numbers 2.2.1. (a) The left-hand side counts all subsets of an n-set; the right-hand side counts only the 3-element subsets. (b) 2n /n2 > n /n2 = (n − 1)(n − 3 2)/(6n), which becomes arbitrarily large. 2.2.2. Start the induction with n = 4: 4! = 24 > 16 = 24 . If the inequality holds for n, then (n + 1)! = (n + 1)n! > (n + 1)2n > 2 · 2n = 2n+1 . 2.3 Inclusion–Exclusion 2.3.1. 18 + 23 + 21 + 17 − 9 − 7 − 6 − 12 − 9 − 12 + 4 + 3 + 5 + 7 − 3 = 40. 2.4 Pigeonholes 2.4.1. If each of the giant boxes contains at most 20 New Yorkers, then 500,000 boxes contain at most 20·500,000 = 10,000,000 New Yorkers, which is a contradiction. 256 16. Answers to Exercises 3 Binomial Coefficients and Pascal's Triangle 3.1 The Binomial Theorem 3.1.1. (x + y)n+1 = (x + y)n (x + y) n n−1 n n n x xy n + y (x + y) y + ··· + 1 n−1 n n n−1 x y(x + y) + · · · = xn (x + y) + 1 n n n y (x + y) xy n−1 (x + y) + + n n−1 n xn y + xn−1 y 2 + · · · = xn+1 + xn y + 1 n n xy n + y n+1 x2 y n−1 + xy n + + n n−1 n n n xn−1 y 2 + · · · xn y + + = xn+1 + 1 + 2 1 1 n n xy n + y n+1 + + n n−1 n+1 n n + 1 n−1 2 n+1 x y+ x xy n + y n+1 . = xn+1 + y + ··· + 1 2 n = xn + 3.1.2. (a) (1 − 1)n = 0. (b) By n k = n n−k . 3.1.3. The identity says that the number of subsets of an n-element set with an even number of elements is the same as the number of subsets with an odd number of elements. We can establish a bijection between even and odd subsets as follows: If a subset contains 1, delete it from the subset; otherwise, add it to the subset. 3.2 Distributing Presents 3.2.1. n n1 · n − n1 n − n1 − · · · − nk−1 ··· n2 nk n! (n − n1 − · · · − nk−1 )! (n − n1 )! = ··· n1 !(n − n1 )! n2 !(n − n1 − n2 )! nk−1 !(n − n1 − · · · − nk )! n! = , n1 !n2 ! · · · nk ! 16. Answers to Exercises 257 since n − n1 − · · · − nk−1 − nk = 0. 3.2.2. (a) n! (distribute positions instead of presents). (b) n(n − 1) · · · (n − k + 1) (distribute as "presents" the first k positions at the competition and n n − k certificates of participation). (c) n1 . (d) Chess seating in Diane's sense (distribute players to boards). 3.2.3. (a) [n = 8] 8!. (b) 8! · 8 4 . (c) (8!)2 . 3.3 Anagrams 3.3.1. 13!/23 . 3.3.2. COMBINATORICS. 3.3.3. Most: any word with 13 different letters; least: any word with 13 identical letters. 3.3.4. (a) 266 . (b) 26 ways to select the four letters that occur; for each selection, 4 4 2 ways to select the two letters that occur twice; for each selection, we distribute 6 positions to these letters (2 of them get 2 positions); this gives 26 4 6! 6! 2!2! ways. Thus we get 4 2 2!2! . (There are many other ways to arrive at the same number!) (c) Number of ways to partition 6 into a sum of positive integers: 6=6=5+1=4+2=4+1+1=3+3=3+2+1=3+1+1+1 = 2 + 2 + 2 = 2 + 2 + 1 + 1 = 2 + 1 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 + 1, which makes 11 possibilities. (d) This is too difficult in this form. What we meant is the following: how many words of length n are there such that none is an anagram of another? This means distributing n pennies to 26 children, and so the answer is n+25 25 . 3.4 Distributing Money 3.4.1. 3.4.2. 3.4.3. n−k−1 . k−1 n+k−1 . +k−1 kp + k − 1 . k−1 3.5 Pascal's Triangle 3.5.1. This is the same as n k = n n−k . 258 16. Answers to Exercises n 0 3.5.2. cients). = n n = 1 (e.g., by the general formula for the binomial coeffi- 3.6 Identities in Pascal's Triangle 3.6.1. 1+ n n n n + + ··· + + n n−1 2 1 n−1 n−1 n−1 n−1 + + + =1+ 2 1 1 0 n−1 n−1 +1 + ··· + n−1 n−2 n−1 n−1 n−1 n−1 + + ··· + + =2 n−1 n−2 1 0 = 2 · 2n−1 = 2n . 3.6.2. The coefficient of xn y n in n n−1 n n n n n x xy n−1 + y x + y + ··· + 1 n−1 n 0 is n 0 n n + 1 n n n + ··· + n−1 n−1 n n + n 1 2 + n . 0 3.6.3. The left-hand side counts all k-element subsets of an (n + m)element set by distinguishing them according to how many elements they pick up from the first n. 3.6.4. If the largest element is j (which is at least n + 1), then the rest can be chosen j−1 ways. If we sum over all j ≥ n + 1, we get the identity n n+k n+1 n + ··· + + n n n Using that n+i n = n+k+1 . n+1 = n+i i , we get (3.5). 3.7 A Bird's Eye View of Pascal's Triangle 3.7.1. n = 3k + 2. 3.7.2. This is not easy. We want to determine the first value of k where the difference of differences turns nonpositive: n n − k k+1 − n n − k−1 k ≤ 0. 16. Answers to Exercises 259 We can divide the equation by n k−1 and multiply by k(k + 1) to get (n − k + 1)(n − k) − 2(n − k + 1)(k + 1) + k(k + 1) ≤ 0. Simplifying, we obtain 4k 2 − 4nk + n2 − n − 2 < 0. Solving for k, we get that the left-hand side is nonpositive between the two roots: n 1√ n 1√ n+2≤k ≤ + n + 2. − 2 2 2 2 So the first integer k for which this is nonpositive is k= n 1√ n+2 . − 2 2 3.8 An Eagle's-Eye View: Fine Details 3.8.2. We apply the lower bound in Lemma 2.5.1 to the logarithms. For a typical term, we get ln and so ln m+t m + ln ≥ m+t−1 m−1 + · · · + ln m+1 m−t+1 m+t−k m−k ≥ m+t−k m−k − m+t−k m−k 1 = t , m+t−k t t t + + ··· + . m+t m+t−1 m+1 We replace each denominator by the largest one to decrease the sum: t t t2 t + + ··· + ≥ . m+t m+t−1 m+1 m+t Inverting the steps of taking the logarithm and taking the reciprocal, this gives the upper bound in (3.9). 3.8.1. (a) We have to show that e−t /(m−t+1) ≤ e−t /m ≤ e−t /(m+t) . This is straightforward using that ex is a monotone increasing function. (b) Take the ratio of the upper and lower bounds; we obtain e−t e 2 2 2 2 /(m+t) −t2 /(m−t+1) = et 2 /(m−t+1)−t2 /(m+t) . 260 16. Answers to Exercises Here the exponent is t2 t2 (2t − 1)t2 − = . m−t+1 m+t (m − t + 1)(m + t) In our case, this is 1900/(41∗60) ≈ 0.772, and so the ratio is e0.772 ≈ 2.1468. 3.8.3. By (3.9), we have 2m m 2m m−t ≥ et 2 /(m+t) . Here the exponent is a monotone increasing function of t for t ≥ 0 (to m see this, write it as t(1 − m+t ), or take its derivative), and so from our √ assumption that t ≥ m ln C + ln C it follows that √ √ ln C(m + 2 m ln C + ln C) ( m ln C + ln C)2 t2 √ √ = ≥ m+t m + m ln C + ln C m + m ln C + ln C > ln C, which implies that 2m m 2m m−t > C. The proof of the other half is similar. 4 Fibonacci Numbers 4.1 Fibonacci's Exercise 4.1.1. Because we use the two previous elements to compute the next. 4.1.2. Fn+1 . 4.1.3. Let us denote by Sn the number of good subsets. If n = 1, then S1 = 2 (the empty set and the set {1}. If n = 2, then ∅, {1}, {2}, so S2 =3. For any n, if the subset contains n, then it can not contain n − 1, so there are Sn−2 subsets of this type; if it does not contain n, then there are Sn−1 subsets. So we have the same recursive formula, so Sn = Fn+2 . 4.2 Lots of Identities 4.2.1. It is clear from the recurrence that two odd members are followed by an even, then by two odd numbers again. 4.2.2. We formulate the following nasty-looking statement: If n is divisible by 5, then so is Fn ; if n has remainder 1 when divided by 5, then Fn has remainder 1; if n has remainder 2 when divided by 5, then Fn has remainder 16. Answers to Exercises 261 1; if n has remainder 3 when divided by 5, then Fn has remainder 2; if n has remainder 4 when divided by 5, then Fn has remainder 3. This is then easily proved by induction on n. 4.2.3. By induction. All of them are true for n = 1 and n = 2. Assume that n ≥ 3. (a) F1 + F3 + F5 + · · · + F2n−1 = (F1 + F3 + · · · + F2n−3 ) + F2n−1 = F2n−2 + F2n−1 = F2n . (b) F0 − F1 + F2 − F3 + · · · − F2n−1 + F2n = (F0 − F1 + F2 − · · · + F2n−2 ) + (−F2n−1 + F2n ) = (F2n−3 − 1) + F2n−2 = F2n−1 − 1. 2 2 2 2 2 2 2 2 2 (c) F0 +F1 +F2 +· · ·+Fn = (F0 +F1 +· · ·+Fn−1 )+Fn = Fn−1 Fn +Fn = Fn (Fn−1 + Fn ) = Fn · Fn+1 . 2 2 2 (d) Fn−1 Fn+1 − Fn = Fn−1 (Fn−1 + Fn ) − Fn = Fn−1 + Fn (Fn−1 − Fn ) = 2 n−1 n = (−1) . Fn−1 − Fn Fn−2 = −(−1) 4.2.4. We can write (4.1) as Fn−1 = Fn+1 − Fn , and use this to compute Fn for negative n recursively (going backwards): . . . , −21, 13, −8, 5, −3, 2, −1, 1, 0. It is easy to recognize that these are the same as the ordinary Fibonacci numbers, except that every second number has a negative sign. As a formula, we have F−n = (−1)n+1 Fn . This is now easily proved by induction on n. It is true for n = 0, 1, and assuming that it is true for n and n − 1, we get for n + 1, F−(n+1) = F−(n−1) − F−n = (−1)n Fn−1 − (−1)n+1 Fn = (−1)n (Fn−1 + Fn ) = (−1)n Fn+1 = (−1)n+2 Fn+1 , which completes the induction. 4.2.5. Fn+2 = Fn+1 + Fn = (Fn + Fn−1 ) + Fn = 2Fn + (Fn − Fn−2 ) = 3Fn − Fn−2 . Replacing n by 2n − 1, we get the recurrence for odd-index Fibonacci numbers. Using this to prove (4.2): 2 2 2 2 2 Fn+1 + Fn = (Fn + Fn−1 )2 + Fn = 2Fn + Fn−1 + 2Fn Fn−1 2 2 2 2 2 = 3Fn + 2Fn−1 − (Fn − Fn−1 )2 = 3Fn + 2Fn−1 − Fn−2 2 2 2 2 = 3(Fn + Fn−1 ) − (Fn−1 + Fn−2 ) = 3F2n−1 − F2n−3 = F2n+1 . 262 16. Answers to Exercises 4.2.6. The identity is n−k n−2 n−1 n + ··· + + + k 2 1 0 = Fn+1 , where k = n/2 . Proof by induction. True for n = 0 and n = 1. Let n ≥ 2. Assume that n is odd; the even case is similar, except that the last term below needs a little different treatment. n−k n−2 n−1 n + ··· + + + k 2 1 0 n−3 n−3 n−2 n−2 + ··· + + + =1+ 2 1 1 0 n−k−1 n−k−1 + + k k−1 n−k−1 n−3 n−2 n−1 + ··· + + + = k 2 1 0 n−k−1 n−3 n−2 + ··· + + + k−1 1 0 = Fn + Fn−1 = Fn+1 . 4.2.7. (4.2) follows by taking a = b = n − 1. (4.3), follows by taking a = n, b = n − 1. 4.2.8. Let n = km. We use induction on m. For m = 1 the assertion is obvious. If m > 1, then we use (4.5) with a = k(m − 1), b = k − 1: Fka = F(k−1)a Fa−1 + F(k−1)a+1 Fa . By the induction hypothesis, both terms are divisible by Fa . 4.2.9. The "diagonal" is in fact a very long and narrow parallelogram 2 with area 1. The trick depends on the fact Fn+1 Fn−1 − Fn = (−1)n is very 2 small compared to Fn . 16. Answers to Exercises 263 4.3 A Formula for the Fibonacci Numbers 4.3.1. True for n = 0, 1. Let n ≥ 2. Then by the induction hypothesis, Fn = Fn−1 + Fn−2   √ n−1 √ n−1 1  1+ 5 1− 5  =√ − 2 2 5   √ n−2 √ n−2 1  1+ 5 1− 5  +√ − 2 2 5  √ n−2 √ √ 1+ 5 1  1+ 5 1− 5 =√ +1 + 2 2 2 5 √ n √ n 1+ 5 1− 5 1 . − =√ 2 2 5 n−2  √ 1− 5 +1  2 4.3.2. For n = 1 and n = 2, if we require that Ln be of the given form, then we get √ √ 1+ 5 1− 5 L1 = 1 = a + b, L2 = 3 = a +b . 2 2 Solving for a and b, we get √ √ 1− 5 1+ 5 , b= . a= 2 2 Then √ n √ n 1+ 5 1− 5 + , Ln = 2 2 which follows by induction on n just as in the previous problem. 4.3.3. (a) For example, every day Jack buys either an ice cream for $1 or a giant sundae for $2. There are 4 different flavors of ice cream, but only one kind of sundae. If he has n dollars, in how many ways can he spend the money? √ √ 1 In = √ (2 + 5)n − (2 − 5)n . 2 5 4.3.4. The formula works for n = 1, 2, . . . , 10 but fails for n = 11, when it gives 91. In fact, it will be more and more off as we increase n. We have seen that √ n 1+ 5 1 = (0.447 . . . ) · (1.618 . . . )n . Fn ∼ √ 2 5 264 16. Answers to Exercises In the formula of Alice, the rounding plays less and less of a role, so en/2−1 ∼ en/2−1 = (0.367 . . . ) · (1.648 . . . )n , and so the ratio between Alice's numbers and the corresponding Fibonacci numbers is en/2−1 (0.367 . . . ) · (1.648 . . . )n ≈ = (0.822 . . . ) · (1.018 . . . )n . Fn 0.447 . . . Since the base of the exponential is larger than 1, this tends to infinity as n grows. 5 Combinatorial Probability 5.1 Events and Probabilities 5.1.1. The union of two events A and B corresponds to "A or B", i.e., at least one of A or B occurs. 5.1.2. It is the sum of some of the probabilities of outcomes, and even if we add up all of the probabilities, we get just 1. 5.1.3. P(E) = 1 , P(T ) = 1 . 2 3 5.1.4. The same probabilities P(s) are added up on both sides. 5.1.5. Every probability P(s) with s ∈ A ∩ B is added twice to both sides; every probability P(s) with s ∈ A ∪ B but s ∈ A ∩ B is added once to both / sides. 5.2 Independent Repetition of an Experiment 5.2.1. The pairs (E, T ), (O, T ), (L, T ) are independent. The pair (E, O) is exclusive. Neither the pair (E, L) nor the pair (O, L) is independent. 5.2.2. P(∅ ∩ A) = P(∅) = 0 = P(∅)P(A). The set S also has this property: P(S ∩ A) = P(A) = P(S)P(A). 5.2.3. P(A) = |S| n = |S| 1 |S|2 = P(A)P(B). n−1 1 |S| , P(B) = |S|n−1 |S|n = 1 |S| , P(A ∩ B) = |S|n−2 |S|n = 5.2.4. The probability that your mother has the same birthday as you is 1/365 (here we assume that birthdays are distributed evenly among all numbers of the year, and we ignore leap years). There are (roughly) 7 billion people in the word. This means that one could expect that 7·109 /365 (about 20 million) people have the same birthday as their mother. The events that your birthday coincides with that of your mother, father, or spouse are independent, so the probability that for a given person, all three were born 16. Answers to Exercises 265 on his or her birthday is 1/3653 = 1/48,627,125. Let's say there are 2 billion married people; then we can expect that 2,000,000,000/48,627,125 ≈ 41 of them have the same birthday as their mother, father, and spouse. 6 Integers, Divisors, and Primes 6.1 Divisibility of Integers 6.1.1. a = a · 1 = (−a) · (−1). 6.1.2. (a) even; (b) odd; (c) a = 0. 6.1.3. (a) If b = am and c = bn, then c = amn. (b) If b = am and c = an, then b + c = a(m + n) and b − c = a(m − n). (c) If b = am and a, b > 0, then m > 0; hence m ≥ 1, and so b ≥ a. (d) Trivial if a = 0. Assume a = 0. If b = am and a = bn, then a = amn, so mn = 1. Hence either m = n = 1 or m = n = −1. 6.1.4. We have a = cn and b = cm, hence r = b − aq = c(m − nq). 6.1.5. We have b = am, c = aq + r and c = bt + s. Hence s = c − bt = (aq + r) − (am)t = (q − mt)a + r. Since 0 ≤ r < a, the remainder of the division s ÷ a is r. 6.1.6. (a) a2 − 1 = (a − 1)(a + 1). (b) an − 1 = (a − 1)(an−1 + · · · + a + 1). 6.3 Factorization into Primes 6.3.1. There is a smallest one among positive criminals (indeed, in every set of positive integers), but a set of negative integers need not have a smallest element (if it is infinite). 6.3.2. Yes, the number 2. 6.3.3. (a) p occurs in the prime factorization of ab, so it must occur in the prime factorization of a or in the prime factorization of b. (b) p | a(b/a), but p a, so by (a), we must have p | (b/a). 6.3.4. Let n = p1 p2 · · · pk ; each pi ≥ 2; hence n ≥ 2k . 6.3.5. If ri = rj , then ia − ja is divisible by p. But ia − ja = (i − j)a and neither a nor i − j is divisible by p. Hence the ri are all different. None of them is 0. Their number is p − 1, so every value 1, 2, . . . , p − 1 must occur among the ri . 6.3.6. For a prime p, the proof is the same as for 2. If n is composite but not a square, then there is a prime p that occurs in the prime factorization of n an odd number of times. We can repeat the proof by looking at this p. √ 6.3.7. Fact: If k n is not an integer, then it is irrational. Proof: There is a prime that occurs in the prime factorization of n, say t times, where k t. If 266 16. Answers to Exercises √ (indirect assumption) k n = a/b then nbk = ak , and so the number of times p occurs in the prime factorization of the left-hand side is not divisible by k, while the number of times it occurs in the prime factorization of the right-hand side is divisible by k. A contradiction. 6.4 On the Set of Primes 6.4.1. Just as in the treatment of the case k = 200 above, we subtract the number of primes up to 10k−1 from the number of primes up to 10k . By the Prime Number Theorem, this number is about 10k 10k−1 (9k − 10)10k−1 − = . k ln 10 (k − 1) ln 10 k(k − 1) ln 10 1 9k − 10 =9− k−1 k−1 is very close to 9 if k is large, we get that the number of primes with k digits is approximately 9 · 10k−1 . k ln 10 Comparing this with the total number of positive integers with k digits, which we know is 10k − 10k−1 = 9 · 10k−1 , we get 1 9 · 10k−1 1 = ≈ . k−1 k ln 10 · 9 · 10 (ln 10)k 2.3k Since 6.5 Fermat's "Little" Theorem 6.5.1. 4 4 2 = 6. 4 24 − 2 = 14. 6.5.2. (a) We need that each of the p rotated copies of a set are different. Suppose that there is a rotated copy that occurs a times. Then trivially every other rotated copy occurs a times. But then a | p, so we must have a = 1 or a = p. If all p rotated copies are the same, then trivially either k = 0 or k = p, which were excluded. So we have a = 1 as claimed. (b) Consider the set of two opposite vertices of a square. (c) If each box contains p subsets of size k, the total number of subsets must be divisible by p. 6.5.3. We consider each number to have p digits by appending zeros at the front if necessary. We get p numbers from each number a by a cyclic shift. These are all the same when all digits of a are the same, but all different otherwise (why? the assumption that p is a prime is needed here!). So we get ap − a numbers that are divided into classes of size p. Thus p | ap − a. 6.5.4. Assume that p a. Consider the product a(2a)(3a) · · · ((p − 1)a) = (p − 1)!ap−1 . Let ri be the remainder of ia when divided by p. Then the 16. Answers to Exercises 267 product above has the same remainder when divided by p as the product r1 r2 · · · rp−1 . But this product is just (p − 1)!. Hence p is a divisor of (p − 1)!ap−1 − (p − 1)! = (p − 1)!(ap−1 − 1). Since p is a prime, it is not a divisor of (p − 1)!, and so it is a divisor of ap−1 − 1. 6.6 The Euclidean Algorithm 6.6.1. gcd(a, b) ≤ a, but a is a common divisor, so gcd(a, b) = a. 6.6.2. (a) Let d = gcd(a, b). Then d | a and d | b, and hence d | b − a. Thus d is a common divisor of a and b − a, and hence d ≤ gcd(a, b). A similar argument shows the reverse inequality. (b) By repeated application of (a). 6.6.3. (a) gcd(a/2, b) | (a/2) and hence gcd(a/2, b) | a. So gcd(a/2, b) is a common divisor of a and b, and hence gcd(a/2, b) ≤ gcd(a, b). The reverse inequality follows similarly, using that gcd(a, b) is odd, and hence gcd(a, b) | (a/2). (b) gcd(a/2, b/2) | (a/2) and hence 2gcd(a/2, b/2) | a. Similarly, we have 2gcd(a/2, b/2) | b, and hence 2gcd(a/2, b/2) ≤ gcd(a, b). Conversely, gcd(a, b) | a and hence 1 gcd(a, b) | a/2. Similarly, 1 gcd(a, b) | b/2, and 2 2 hence 1 gcd(a, b) ≤ gcd(a/2, b/2). 2 6.6.4. Consider each prime that occurs in either one of them, raise it to the larger of the two exponents, and multiply these prime powers. 6.6.5. If a and b are the two integers, and you know the prime factorization of a, then take a prime factor of a, divide b by this prime repeatedly to determine its exponent in the prime factorization of b, and raise this prime to the smaller of its exponent in the prime factorizations of a and b. Repeat this for all prime factors of a, and multiply these prime powers. 6.6.6. By the descriptions of the gcd and lcm above, each prime occurs the same number of times in the prime factorization of both sides. 6.6.7. (a) Straightforward. (b) Let z = gcd(a, b, c), and let A = a/z, B = b/z, C = c/z. Then A, B, and C are relatively prime and form a Pythagorean triple. One of A and B must be odd, since if both of them were even, then C would be even as well, and so the three numbers would not be relatively prime. Suppose that B is odd. Then A must be even. Indeed, the square of an odd number gives a remainder of 1 when divided by 4, so if both A and B were odd, then C 2 = A2 + B 2 would give a remainder of 2 when divided by 4, which is impossible. It follows that C must be odd. So A is even, and we can write it in the form A = 2A0 . Write the equation in the form C +B C −B . A2 = 0 2 2 268 16. Answers to Exercises Let p be any prime number dividing A0 . Then p must divide either (C + B)/2 or (C − B)/2. But p cannot divide both, since then it would also divide the sum C+B + C−B = C as well as the difference C+B − C−B = B, 2 2 2 2 contradicting the assumption that A, B, and C are relatively prime. The prime p may occur in the prime decomposition of A0 several times, say k times. Then in the prime decomposition of A2 , p occurs 2k times. By 0 the argument above, p must occur 2k times in the prime decomposition of one of (C + B)/2 and (C − B)/2, and not at all in the prime decomposition of the other. So we see that in the prime decomposition of (C + B)/2 (and similarly in the prime decomposition of (C − B)/2), every prime occurs to an even power. This is the same as saying that both (C + B)/2 and (C − B)/2 are squares; say, (C + B)/2 = x2 and (C − B)/2 = y 2 for some integers x and y. Now we can express A, B, and C in terms of x and y: B= C +B C −B − = x2 − y 2 , 2 2 A = 2A0 = 2 C= C +B C −B + = x2 + y 2 , 2 2 C +B C −B = 2xy. 2 2 We get a, b, and c by multiplying A, B, and C by z, which completes the solution. 6.6.8. gcd(a, a + 1) = gcd(a, 1) = gcd(0, 1) = 1. 6.6.9. The remainder of Fn+1 divided by Fn is Fn−1 . Hence gcd(Fn+1 , Fn ) = gcd(Fn , Fn−1 ) = · · · = gcd(F3 , F2 ) = 1. This lasts n − 1 steps. 6.6.10. By induction on k. True if k = 1. Suppose that k > 1. Let b = aq + r, 1 ≤ r < a. Then the Euclidean Algorithm for computing gcd(a, r) lasts k − 1 steps; hence a ≥ Fk and r ≥ Fk−1 by the induction hypothesis. But then b = aq + r ≥ a + r ≥ Fk + Fk−1 = Fk+1 . 6.6.11. (a) Takes 10 steps. (b) Follows from gcd(a, b) = gcd(a − b, b). (c) gcd 10100 − 1, 10100 − 2 takes 10100 − 1 steps. 6.6.12. (a) Takes 8 steps. (b) At least one of the numbers remains odd all the time. (c) Follows from Exercises 6.6.2 and 6.6.3. (d) The product of the two numbers drops by a factor of two in one of any two iterations. 6.7 Congruences 6.7.1. m = 54321 − 12345 = 41976. 6.7.2. Only (b) is correct. 6.7.3. a ≡ b (mod 0) should mean that there exists an integer k such that a − b = 0 · k. This means that a − b = 0, that is, a = b. So equality can be considered as a special case of congruence. 16. Answers to Exercises 269 6.7.4. (a) Take a = 2 and b = 5. (b) If ac ≡ bc (mod mc), then mc | ac−bc, so there is an integer k such that ac − bc = kmc. Since c = 0, this implies that a − b = km, and so a ≡ b (mod m). 6.7.5. First, from x ≡ y (mod p) it follows (by the multiplication rule) that xv ≡ y v (mod p), so it suffices to prove that xu ≡ xv (mod p). (16.1) If x ≡ 0 (mod p), then both sides of (16.1) are divisible by p, and the assertion follows. Suppose that x ≡ 0 (mod p). Suppose that (say) u < v. We know that p − 1 | v − u, so we can write v − u = k(p − 1) with some positive integer k. Now we know by Fermat's Little Theorem that xp−1 ≡ 1 (mod p), hence by the multiplication rule of congruences, we have xk(p−1) ≡ 1 (mod p), and by the multiplication rule again, we get xv = xu · xk(p−1) ≡ xu (mod p), which proves (16.1). 6.8 Strange Numbers 6.8.1. Tu; Sa; Th; We. 6.8.2. not-A = 1 ⊕ A; A-or-B = A ⊕ B ⊕ A · B; A-and-B = A · B. 6.8.3. 2 · 0 ≡ 2 · 3 (mod 6) but 0 ≡ 3 (mod 6). More generally, if m = ab (a, b > 1) is a composite modulus, then a · 0 ≡ a · b (mod m), but 0 ≡ b (mod m). 6.8.4. We start with the Euclidean Algorithm: gcd(53, 234527) = gcd(53, 2) = gcd(1, 2) = 1. Here we got 2 as 2 = 234527 − 4425 · 53, and then 1 as 1 = 53 − 26 · 2 = 53 − 26(234527 − 4425 · 53) = 115051 · 53 − 26 · 234527. It follows that 1 ≡ 115051 · 53 (mod 234527), and so 1/53 = 115051. 6.8.5. x ≡ 5, y ≡ 8 (mod 11). 6.8.6. (a) We have 11 | x2 − 2x = x(x − 2); hence either 11 | x or 11 | x − 2, so x ≡ 0 (mod 11) and x ≡ 2 (mod 11) are the two solutions. (b) Similarly from 23 | x2 −4 = (x−2)(x+2) we get x ≡ 2 (mod 23) or x ≡ −2 (mod 23). 6.9 Number Theory and Combinatorics 6.9.1. There are two neighboring integers k and k + 1 among the given n numbers (Pigeonhole Principle) that are relatively prime. 6.9.2. By the rules of inclusion-exclusion, we have to subtract from n the number of multiples of pi (between 1 and n) for every pi ; then we have to 270 16. Answers to Exercises add the number of common multiples of pi and pj for any two primes pi and pj ; then we have to subtract the number of common multiples of pi , pj , and pk for any three primes pi , pj , and pk , etc. Just as in the numerical example, the number of multiples of pi is n/pi ; the number of common multiples of pi and pj is n/(pi pj ); the number of common multiples of pi , pj , and pk is n/(pi pj pk ), etc. So we get φ(n) = n − n n n n n n − ··· − + + + ··· + − − ··· . p1 pr p1 p2 p1 p3 pr−1 pr p 1 p2 p2 This is equal to the expression in (6.7). Indeed, if we expand the product, 1 1 every term arises by picking either "1" or "− pi " from each factor 1 − pi , which gives a term of the form (−1)k 1 . pi 1 · · · p i k This is just a typical term in the inclusion-exclusion formula above. 6.9.3. It is not hard to come up with the conjecture that the answer is 1 2 n. To prove this, consider the fractions n , n , . . . , n , and simplify them as n much as possible. We get fractions of the form a , where d is a divisor of d n, 1 ≤ a ≤ d, and gcd(a, d) = 1. It is also clear that we get every such fraction. The number of such fractions with a given denominator is φ(d). Since the total number of fractions we started with is n, this proves our conjecture. 6.9.4. For n = 1 and 2 the answer is 1. Suppose that n > 2. If k is such an integer, then so is n − k. So these integers come in pairs adding up to n (we have to add that n/2 is not among these numbers). There are φ(n)/2 such pairs, so the answer is nφ(n)/2. 6.9.5. The proof is similar to the solution of Exercise 6.5.4. Let s1 , . . . , sk be the numbers between 1 and b relatively prime to b; so k = φ(b). Let ri be the remainder of si a when divided by p. We have gcd(b, ri ) = 1, since if there were a prime p dividing both b and ri , then p would also divide si a, which is impossible, since both si and a are relatively prime to b. Second, r1 , r2 , . . . , rk are different, since ri = rj would mean that b | si a − sj a = (si − sj )a; since gcd(a, b) = 1, this would imply that b | si − sj , which is clearly impossible. Hence it follows that r1 , r2 , . . . , rk are just the numbers s1 , s2 , . . . , sk , in a different order. Consider the product (s1 a)(s2 a) · · · (sk a). On the one hand, we can write this as (s1 a)(s2 a) · · · (sk a) = (s1 s2 · · · sk )ak , on the other, (s1 a)(s2 a) · · · (sk a) ≡ r1 r2 · · · rk = s1 s2 · · · sk (mod b). 16. Answers to Exercises 271 Comparing, we see that (s1 s2 · · · sk )ak ≡ s1 s2 · · · sk (mod b), or b (s1 s2 · · · sk ) ak − 1 . Since s1 s2 . . . sk is relatively prime to b, this implies that b | ak − 1 as claimed. 6.10 How to Test Whether a Number is a Prime 6.10.1. By induction on k. True if k = 1. Let n = 2m + a, where a is 0 or 1. Then m has k − 1 bits, so by induction, we can compute 2m using at most 2(k − 1) multiplications. Now 2n = (2m )2 if a = 0 and 2n = (2m )2 · 2 if a = 1. 6.10.2. If 3 | a, then clearly 3 | a561 − a. If 3 a, then 3 | a2 − 1 by Fermat, hence 3 | (a2 )280 − 1 = a560 − 1. Similarly, if 11 a, then 11 | a10 − 1 and hence 11 | (a10 )56 − 1 = a560 − 1. Finally, if 17 a, then 17 | a16 − 1 and hence 17 | (a16 )35 − 1 = a560 − 1. 7 Graphs 7.1 Even and Odd Degrees 7.1.1. There are 2 graphs on 2 nodes, 8 graphs on 3 nodes (but only four "essentially different"), 64 graphs on 4 nodes (but only 11 "essentially different"). 7.1.2. (a) No; the number of odd degrees must be even. (b) No; node with degree 5 must be connected to all other nodes, so we cannot have a node with degree 0. (c) 12 (but they are all "essentially the same"). (d) 9 · 7 · 5 · 3 · 1 = 945 (but again they are all "essentially the same"). 7.1.3. This graph (which we will call a complete graph) has has n nodes. n 2 edges if it 7.1.4. In graph (a), the number of edges is 17, the degrees are 9, 5, 3, 3, 2, 3, 1, 3, 2, 3. In graph (b), the number of edges is 31, the degrees are 9, 5, 7, 5, 8, 3, 9, 5, 7, 4. 7.1.5. 10 2 20 = 45. 7.1.6. 2( 2 ) = 2190 . 7.1.7. Every graph has two nodes with the same degree. Since each degree is between 0 and n − 1, if all degrees were different, then they would be 0, 1, 2, 3, . . . n − 1 (in some order). But the node with degree n − 1 must be 272 16. Answers to Exercises connected to all the others, in particular to the node with degree 0, which is impossible. 7.2 Paths, Cycles, and Connectivity 7.2.1. There are 4 paths, 6 cycles, and 1 complete graph. 7.2.2. The edgeless graph on n nodes has 2n subgraphs. The triangle has 18 subgraphs. 7.2.3. The path of length 3 and the cycle of length 5 are the only examples. (The complement of a longer path or cycle has too many edges.) 7.2.4. Yes, the proof remains valid. 7.2.5. (a) Delete any edge from a path. (b) Consider two nodes u and v. the original graph contains a path connecting them. If this does not go through e, then it remains a path after e is deleted. If it goes through e, then let e = xy, and assume that the path reaches x first (when traversed from u to v). Then after e is deleted, there is a path in the remaining graph from u to x, and also from x to y (the remainder of the cycle), so there is one from u to y. But there is also one from y to v, so there is also a path from u to v. 7.2.6. (a) Consider a shortest walk from u to v; if this goes through any nodes more than once, the part of it between two passes through this node can be deleted, to make it shorter. (b) The two paths together form a walk from a to c. 7.2.7. Let w be a common node of H1 and H2 . If you want a path between nodes u and v in H, then you can take a path from u to w, followed by a path from w to v, to get a walk from u to w. 7.2.8. Both graphs are connected. 7.2.9. The union of this edge and one of these components would form a connected graph that is strictly larger than the component, contradicting the definition of a component. 7.2.10. If u and v are in the same connected component, then this component, and hence G too, contains a path connecting them. Conversely, if there is a path P in G connecting u and v, then this path is a connected subgraph, and a maximal connected subgraph containing P is a connected component containing u and v. 7.2.11. Assume that the graph is not connected and let a connected component H of it have k nodes. Then H has at most k edges. The rest 2 of the graph has at most n−k edges. Then the number of edges is at most 2 n−k k + 2 2 = n−1 − (k − 1)(n − k − 1) ≤ 2 n−1 . 2 16. Answers to Exercises 273 7.13 Eulerian Walks and Hamiltonian Cycles 7.3.1. The upper left graph does not have an Eulerian walk. The lower left graph has an open Eulerian walk. The two graphs on the right have closed Eulerian walks. 7.3.2. Every node with an odd degree must be the endpoint of one of the two walks, so a necessary condition is that the number of nodes with odd degree to be at most four. We show that this condition is also sufficient. We know that the number of nodes with odd degree is even. If this number is 0 or 2, then there is a single Eulerian walk (and we can take any single node as the other walk). Suppose that this number is four. Add a new edge connecting two of the nodes with odd degree. Then there are only two nodes with odd degree left, so the graph has an Eulerian walk. Deleting the edge splits this walk into two, which together use every edge exactly once. 7.3.3. The first graph does; the second does not. 8 Trees 8.1 How to Define a Tree 8.1.1. If G is a tree, then it contains no cycles (by definition), but adding any new edge creates a cycle (with the path in the tree connecting the endpoints of the new edge). Conversely, if a graph has no cycles but adding any edge creates a cycle, then it is connected (either two nodes u and v are connected by an edge, or else adding an edge connecting them creates a cycle, which contains a path between u and v in the old graph), and therefore it is a tree. 8.1.2. If u and v are in the same connected component, then the new edge uv forms a cycle with the path connecting u and v in the old graph. If joining u and v by a new edge creates a cycle, then the rest of this cycle is a path between u and v, and hence u and v are in the same component. 8.1.3. Assume that G is a tree. Then there is at least one path between two nodes, by connectivity. But there cannot be two paths, since then we would get a cycle (find the node v where the two paths branch away, and follow the second path until it hits the first path again; follow the first path back to v to get a cycle). Conversely, assume that there is a unique path between each pair of nodes. Then the graph is connected (since there is a path) and cannot contain a cycle (since two nodes on the cycle would have at least two paths connecting them). 274 16. Answers to Exercises 8.2 How to Grow Trees 8.2.1. Start the path from a node of degree 1. 8.2.2. Any edge has only one lord, since if there were two, they would have to start from different ends, and they would have then two ways to get to the king: either continuing as they started, or waiting for the other and walking together. Similarly, an edge with no lord would have to lead to two different ways of walking. 8.2.3. Start at any node v. If one of the branches at this node contains more than half of all nodes, move along the edge leading to this branch. Repeat. You'll never backtrack, because this would mean that there is an edge whose deletion results in two connected components, both containing more than half of the nodes. You'll never cycle back to a node already seen, because the graph is a tree. Therefore, you must get stuck at a node such that each branch at this node contains at most half of all nodes. 8.3 How to Count Trees 8.3.1. The number of unlabeled trees on 2, 3, 4, 5 nodes is 1, 1, 2, 3. They give rise to a total of 1, 3, 16, 125 labeled trees. 8.3.2. There are n stars and n!/2 paths on n nodes. 8.4 How to Store Trees 8.4.1. The first is the father code of a path; the third is the father code of a star. The other two are not father codes of trees. 8.4.2. This is the number of possible father codes. 8.4.3. Define a graph on {1, . . . , n} by connecting all pairs of nodes in the same column. If we do it backwards, starting with the last column, we get a procedure for growing a tree by adding a new node and an edge connecting it to an old node. 8.5.1. (a) encodes a path; (b) encodes a star; (c) does not encode any tree (there are more 0's than 1's among the first 5 elements, which is impossible in the planar code of any tree). 9 Finding the Optimum 9.1 Finding the Best Tree 9.1.1. Let H be an optimal tree and let G be the tree constructed by the pessimistic government. Look at the first step at which an edge e = uv of H is eliminated. Deleting e from H we get two components; since G is 16. Answers to Exercises 275 connected, it has an edge f connecting these two components. The edge f cannot be more expensive than e, or else the pessimistic government would have chosen f to eliminate instead of e. But then we can replace e by f in H without increasing its cost. Hence we conclude as in the proof given above. 9.1.2. Take nodes 1, 2, 3, 4 and costs c(12) = c(23) = c(34) = c(41) = 3, c(13) = 4, c(24) = 1. The pessimistic government builds (12341), while the best solution is 12431. 9.2 Traveling Salesman 9.2.1. No, because it intersects itself (see next exercise). 9.2.2. Replacing two intersecting edges by two other edges pairing up the same 4 nodes, just differently, gives a shorter tour by the triangle inequality. 10 Matchings in graphs 10.1 A Dancing Problem 10.1.1. If every degree is d, then the number of edges is d · |A|, but also d · |B|. 10.1.2. (a) a triangle; (b) a star. 10.1.3. A graph in which every node has degree 2 is the union of disjoint cycles. If the graph is bipartite, these cycles have even length. 10.3 The Main Theorem 10.3.1. Let X ⊆ A and let Y denote the set of neighbors of X in B. There are exactly d|X| edges starting from X. Every node in Y accommodates no more than d of these; hence |Y | ≥ |X|. 10.3.2. The assumption for X = A yields that |B| ≥ |A|. If |B| = |A|, then we already know the assertion (Theorem 10.3.1), so suppose that |B| > |A|. Add |B|−|A| new nodes to A to get a set A with |A | = |B|. Connect every new node to every node in B. The graph we get satisfies the conditions in the Marriage Theorem (Theorem 10.3.1): We have |A | = |B|, and if X ⊆ A then either X ⊆ A (in which case it has at least |X| neighbors in B by the assumption of the exercise), or X contains a new node, in which case every node in B is a neighbor of X. So the new graph has a perfect matching. Deleting the newly added nodes, we see that the edges of the perfect matching that remain match all nodes of A with different nodes of B. 276 16. Answers to Exercises 10.4 How to Find a Perfect Matching 10.4.1. On a path with 4 nodes, we may select the middle edge. 10.4.2. The edges in the greedy matching M must meet every edge in G (otherwise, we could further extend M ), in particular every edge in the perfect matching matching. So every edge in the perfect matching has at most one endpoint unmatched by M . 10.4.3. The largest matching has 5 edges. 10.4.4. If the algorithm terminates without a perfect matching, then the set S shows that the graph is not "good." 11 Combinatorics in Geometry 11.1 Intersections of Diagonals 11.1.1. n(n−3) . 2 11.2 Counting Regions 11.2.1. True for n = 1. Let n > 1. Delete any line. The remaining lines divide the plane into (n − 1)n/2 + 1 regions by the induction hypothesis. The last line cuts n of these into two. So we get n(n + 1) (n − 1)n +1+n= + 1. 2 2 11.3 Convex Polygons 11.3.1. See Figure 16.1. FIGURE 16.1. 16. Answers to Exercises 277 12 Euler's Formula 12.1 A Planet Under Attack 12.1.1. There are n nodes of degree n − 1 and n nodes of degree 4 4 (see Section 11.1). So the number of edges is 1 n · (n − 1) + n · 4 . From 2 4 Euler's Formula, the number of countries is 2 n n + 2 4 − n+ n 4 +2= n n − n + 2; + 2 4 you have to subtract 1 for the country outside. 12.1.2. Let f be the number of regions of the island. Consider the graph formed by the dams and also the boundary of the island. There are 2n nodes of degree 3 (along the shore), and n nodes of degree 4 (the intersection 2 points of straight dams). So the number of edges is 1 2 (2n) · 3 + n ·4 2 =2 n + 3n. 2 The number of countries is f +1 (we have to count the ocean too), so Euler's formula gives f + 1 + 2n + n = 2 n + 3n + 2, whence f = n + n + 1. 2 2 2 12.2 Planar Graphs 12.2.1. Yes, see Figure 16.2. FIGURE 16.2. 12.2.2. No; the argument is similar to the one showing that K5 is not planar. The houses, wells, and paths form a bipartite graph with 6 nodes and 9 edges. Suppose that this can be drawn in the plane without intersections. Then we have 9 + 2 − 6 = 5 regions. Each region has at least 4 edges (since there are no triangles), and hence the number of edges is at least 1 · 5 · 4 = 10, which is a contradiction. 2 278 16. Answers to Exercises 13 Coloring Maps and Graphs 13.1 Coloring Regions with Two Colors 13.1.1. By induction. True if n = 1. Let n > 1. Assume that the description of the coloring is valid for the first n − 1 circles. If we add the nth, the color and the parity don't change outside this circle; both change inside the circle. So the description remains valid. 13.1.2. (a) By induction. True for 1 line. Adding a line, we recolor all regions on one side. (b) One possible description: Designate a direction as "up." Let p any point not on any of the lines. Start a half-line "up" from P . Count how many of the given lines intersect it. Color according to the parity of this intersection number. 13.2 Coloring Graphs with Two Colors 13.2.1. This graph cannot contain any odd cycle. Indeed, if we consider any cycle C, then each edge of it contains exactly one intersection point with the union of circles. The contribution of every circle is even, since walking around C, we cross the circle alternatingly in and out. 13.3 Coloring Graphs with Many Colors 13.3.1. Suppose that we have a good 3-coloring of the first graph. Starting from above, the first vertex gets (say) color 1, the vertices on the second level must get colors 2 and 3, and then both of the lowest two vertices must get color 1. But this is impossible, since they are connected. Suppose that we have a good 3-coloring of the second graph. Starting from the center, we may assume that it has color 1, so its neighbors get colors 2 or 3. Now recolor each outermost vertex with color 1 by giving it the color of its inner "twin". This coloring would give a good coloring of a 5-cycle by 2 colors, since "twins" have the same neighbors (except that the inner twin is also connected to the center). This is a contradiction. 13.3.2. By rotating the plane a little, we may assume that all intersection points have different y coordinates (which we just call "heights"). Starting with the highest intersection point, and moving down, we can color the intersection points one by one. Each time, there are at most two intersection points that are adjacent to the current point along the two lines that were colored previously, and so we can find a color for the current point different from these. 13.3.3. We may assume that there are at least 2 nodes, and so there is a node of degree at most d. We delete it, recursively color the remaining 16. Answers to Exercises 279 graph by d + 1 colors, and then we can extend this coloring to the last point, since its d neighbors exclude only d colors. 13.3.4. We delete a point of degree d, and recursively color the remaining graph with d + 1 colors. We can extend this as in the previous solution. 14 Finite Geometries, Codes, Latin Squares, and Other Pretty Creatures 14.1 Small Exotic Worlds 14.1.1. The Fano plane itself. 14.1.2. Let abc be a circle. Then two of the lines through a contain b and c, respectively, so they are not tangents. The third line through a is the tangent. 14.1.3. If H is a hypercircle, then its 4 points determine 6 lines, and 3 of these 6 lines go through each of its points. So the seventh line does not go through any of the 4 points of the hypercircle. Conversely, if L is a line, then the 4 points not on L cannot contain another line (otherwise, these two lines would not intersect), and so these 4 points form a hypercircle. 14.1.4. (a) If everybody on line L votes yes, then (since every line intersects L) every line has at least one point voting yes, and so no line will vote all no. (b) We may assume that at least 4 points vote yes; let a, b, c, and d be 4 of them. Suppose that there is no line voting all yes. Then each of the 3 lines through a contains at most one further yes vote, so each of them must contain exactly one of b, c, and d. So the remaining 3 points vote no. The yes votes form a hypercircle (exercise 14.1.3), so the no votes form a line. 14.1.5. (a) Through two original points there is the original line; through an original point a and a new point b there is a unique line through a among all parallel lines to which b was added; and for two new points there is the new line. (b) is similar. (c) is obvious. (d) follows from (a), (b), and (c), as we saw above. 14.1.6. Yes, for every line (2 points) there is exactly one line that is disjoint from it (the other 2 points). 14.1.7. See Figure 16.3 (there are many other ways to map the points). 14.1.8. This is not a coincidence. Fix any point A of the Cube space. Every plane through A contains 3 lines through A. If we call the lines through a given point "POINTS," and those triples of these lines that belong to one plane "LINES," then these POINTS and LINES form a Fano plane. 280 16. Answers to Exercises 1 4 2 4 5 6 3 6 5 7 1 3 2 7 FIGURE 16.3. 14.2 Finite Affine and Projective Planes 14.2.1. Fix any point a. There are n + 1 lines through a, which have no other points in common and cover the whole plane by (a). Each of these lines has n points besides a, so there are (n + 1)n points besides a, and n(n + 1) + 1 = n2 + n + 1 points altogether. 14.2.2. We can assign coordinates to the vertices of the cube as if it were in Euclidean space, but think of the coordinates as elements of the 2-element field (Figure 16.4). Then it is straightforward (if lengthy) to check that the planes of the Cube space are precisely the sets of points given by linear equations. For example, the linear equation x + y + z = 1 gives the points 001, 010, 011, 111 (don't forget that we are working in the 2-element field), which is just the plane consisting of the light points. 011 001 101 111 010 110 000 100 FIGURE 16.4. 14.2.3. A projective plane of order 10 ought to have 102 + 10 + 1 = 111 points, 111 lines, with 11 points on each line. The number of ways to select a candidate line is 111 ; the number of ways to select 111 candidate lines 11 16. Answers to Exercises 281 is 111 11 111 = 473239787751081 11 > 101448 . One could not check so many possibilities even with the fastest computer within the lifetime of the universe! Lam, Thiel, and Swiercz had to work in a much more sophisticated manner. 14.3 Block Designs 14.3.1. 441, 44. 14.3.2. For any two citizens C and D, there are λ clubs containing both. If we add this up for every D, we count (v − 1)λ clubs containing C. Each such club is counted k − 1 times (once for every member different from C, so the number of clubs containing C is (v − 1)λ/k. This is the same for every citizen C. 14.3.3. (a) v = 6, r = 3, k = 3 gives b = 6 by (14.1), but λ = 6/5 by (14.2). (b) b = 8, v = 16, r = 3, k = 6, λ = 1 (there are many other examples in both cases). 14.3.4. Take b = v clubs, and construct for every citizen C a club in which everybody else is a member except C. Then b = v, k = v − 1, r = v − 1, λ = v − 2. 14.4 Steiner Systems 14.4.1. Let A, B, C be 3 elements that do not form a club. There is a unique club containing A and B, which has a unique third element; call this D. Similarly, there is a unique element E such that ACE is a club, and a unique element F such that BCF is a club. The elements D, E, F must be distinct, since if (say) D = E, then A and D are contained in two clubs (one with B and one with C). Let the seventh element be G. There is a unique club containing C and D, and the third member of this club must be G (we can check that any of the other 4 choices would yield two clubs with two members is common). Similarly, AF G and BEG are clubs. Similarly, there is a unique club containing D and E, whose third member must be F . So, apart from the names of the citizens, the club structure is uniquely determined. 14.4.2. We have r = (v − 1)/2 by (14.2), and hence b = v(v − 1)/6 by (14.1). Since v − 1 ≥ 6, we have b ≥ v. 14.4.3. Call a triple contained in S an S-triple. The total number of triples is b = v(v − 1)/6, the number of S-triples is b = v−1 2 v−1 2 −1 6 = (v − 1)(v − 3) , 24 282 16. Answers to Exercises and so the number of non-S-triples is b − b = (v+1)(v−1) . Every non-S8 triple has at most one point in S and thus at least two points not in S. But the number of pairs not is S is (v+1)/2 = (v+1)(v−1) , and since these 8 2 pairs can belong to one of the non-S-triples only, it follows that each of the non-S-triples must contain exactly one pair of elements outside S. This proves that each non-S-triple must contain an element of S. 14.4.4. See Figure 16.5. FIGURE 16.5. 14.4.5. Every girl has 8 other girls to walk with; every day she can walk with 2 in a line. So 4 days are necessary for her to walk with everybody exactly once. 14.5 Latin Squares 14.5.1. There are 576 different 4 × 4 Latin squares. There are many ways to arrive at this figure; we sketch one. The first row can be filled out 4! ways. These are all equivalent in the sense that the number of ways they can be completed is the same for each of them, so we may fix the first row as 0 1 2 3 and just count the number of ways to complete this. The first column now can be filled out in 3! ways, and again all of these are equivalent, so let's fix it as 0 1 2 3. If the 0 in the second row is in the second position, then the rest of the second row and second column is forced, but we get two ways to fill out the 4 fields in the lower right corner. If the 0 in the second row is in the third or fourth position, then the way to fill out the rest is forced. Thus we get the 4 Latin squares below: 0 1 2 3 1 0 3 2 2 3 0 1 3 2 1 0 0 1 2 3 1 0 3 2 2 3 1 0 3 2 0 1 0 1 2 3 1 2 3 0 2 3 0 1 3 0 1 2 0 1 2 3 1 3 0 2 2 0 3 1 3 2 1 0 Therefore, the number of ways to fill out the remaining 9 fields is 4, so the total number is 4! · 3! · 4 = 576. 16. Answers to Exercises 283 These four may look different, but if we flip 1 and 2 in the third, flip rows 2 and 3, and flip columns 2 and 3, we get the second. Similarly, if we flip 1 and 3 in the fourth, flip rows 2 and 4, and flip columns 2 and 4, we get the second. So the last 3 of these are not essentially different. There is no way to get the second square from the first by such operations (this follows, e.g., by Exercise 14.5.7). So there are two essentially different 4 × 4 Latin squares. 14.5.2. This is quite simple. For example, the table below is good (there are many other possibilities): 0 1 2 . . . n−1 1 2 3 0 2 3 4 1 ... ... ... ... 1 3 2 n−2 n−1 0 n−3 2 1 3 3 2 1 n−1 0 1 . . . n−2 14.5.3. 1 2 3 2 3 1 3 1 2 14.5.4. We add 1 to every number; in this way, every row and column sum increases by 4. 14.5.5. We need two Latin squares where not only in the rows and columns, but also in the diagonals every number occurs once. These two will do: 0 1 2 3 0 1 2 3 2 3 0 1 3 2 1 0 3 2 1 0 1 0 3 2 1 0 3 2 2 3 0 1 From these two we get the following perfect magic square: 0 11 13 6 5 14 8 3 10 1 7 12 15 4 2 9 14.5.6. If there exists such a Latin square, then arbitrarily permuting the numbers 0, 1, 2, 3 in it would give another square orthogonal to the three squares in (14.9) and (14.12). (Prove!) So we may start with a square having its first row 0 1 2 3. But then what can its first entry in the second row be? Zero is impossible (because the entry above it is also 0), but 1, 2, or 3 are also ruled out: for instance, if we had 2, then it wouldn't be orthogonal to square (14.12), because the pair (2, 2) would occur twice. So there does not exist such a Latin square. (Try to generalize this result: From the n × n 284 16. Answers to Exercises Latin squares we can choose at most n − 1 squares pairwise orthogonal to each other.) 14.5.7. If we had a square orthogonal to (14.13), then using the same argument as in the solution of Exercise 14.5.6, we may suppose that the first row is 0 1 2 3. Then the pairs (0, 0), (1, 1), (2, 2), and (3, 3) occur in the first row, which implies that in the other rows, the two squares cannot have the same number in the same position. In particular, the first entry of the second row cannot be 1, and it cannot be 0 (because the entry above it is 0). So it is 2 or 3. Suppose it is 2. Then the second entry in this row cannot be 1 or 2 (there is a 1 above it and a 2 before it), and it cannot be 3, so it is 0. The fourth entry cannot be 2, 0 or 3, so it must be 1; it follows that the second row is 2 0 3 1 (the same as the third row in (14.13)). Next we can figure out the last row: Each entry is different from the two above it in the first and second row, and also from the last row of (14.13), which implies that this row must be the same as the second row of (14.13): 1 3 0 2. Hence the third row must be 3 2 1 0; but now the pair (3, 1) occurs twice when the last two rows are overlaid. The case where the second row starts with a 3 can be argued in the same way. 14.6 Codes 14.6.1. Suppose that a code is d-error-correcting. We claim that for any two codewords we must flip at least 2d+1 bits to get from one to the other. Indeed, if we could get from codeword u to codeword v by flipping only 2d bits, then consider the codeword w obtained from u by flipping d of these bits. We could receive w instead of u, but also instead of v, so the code is not d-error-correcting. Now if we receive any message that has at most 2d errors, then this message is not another codeword, so we can detect up to 2d errors. The converse is proved similarly. 14.6.2. If the string has no 1's, then it is a codeword. If it contains one 1, this can be flipped to get a codeword. If it has two 1's, then there is a line through the corresponding two points of the Fano plane, and flipping the 0 in the position corresponding to the third point gives a codeword. If it has three 1's, and these are collinear, then it is a codeword. If it has three 1's, and these are not collinear, then there is a unique point not on any of the three lines determined by them, and flipping this we get a codeword. If it contains at least four 1's, then we can argue similarly, interchanging the role of 1's and 0's. 16. Answers to Exercises 285 15 A Glimpse of Complexity and Cryptography 15.2 Classical cryptography 15.2.1. I THINK WE SHOULD NOT ATTACK FOR ANOTHER WEEK, BUT THEN WITH FULL FORCE. BELA 15.2.2. Let a1 a2 . . . an be the key and b1 b2 . . . bn the plain text. Caligula intercepts one message whose bits are a2 ⊕ b1 , a3 ⊕ b2 , . . . an ⊕ bn−1 , and another message whose bits are a1 ⊕ b1 , a2 ⊕ b2 , . . . , an ⊕ bn . (The second message is one bit longer, which may give him a hint of what happened.) He can compute the binary sum of the first bits, second bits, etc. So he gets (a2 ⊕ b1 ) ⊕ (a1 ⊕ b1 ) = a1 ⊕ a2 , (a3 ⊕ b2 ) ⊕ (a2 ⊕ b2 ) = a2 ⊕ a3 , etc. Now he guesses that a1 = 0; since he knows a1 ⊕ a2 , he can compute a2 , then similarly a3 , and so on, until he gets the whole key. It may be that his initial guess was wrong, which he notices, since in trying to decode the message he gets garbage; but then he can try out a1 = 1, and recover the key. One of the two guesses will work. 15.2.3. Let a1 a2 . . . an be the key and let b1 b2 . . . bn and c1 c2 . . . cn be the two plain texts. Caligula intercepts one message whose bits are a1 ⊕b1 , a2 ⊕ b2 , . . . an ⊕bn , and another message whose bits are a1 ⊕c1 , a2 ⊕c2 , . . . , an ⊕cn . As before, he computes the binary sum of the first bits, second bits, etc., to get (a1 ⊕ b1 ) ⊕ (a1 ⊕ c1 ) = b1 ⊕ c1 , (a2 ⊕ b2 ) ⊕ (a2 ⊕ c2 ) = b2 ⊕ c2 , etc. The rest is not as straightforward as in the previous exercise, but suppose that Caligula can guess part of (say) Arthur's message (signature, or address, or the like). Then, since he knows the bit-by-bit binary sum of the two messages, he can recover the corresponding part of Bela's message. With luck, this is not a full phrase, and it contains part of a word. Then he can guess the rest of the word, and this gives him a few more letters of Arthur's message. With luck, this suggests some more letters of Bela's message, etc. This is not completely straightforward, but typically it gives enough information to decode the messages (as World War II codebreakers learned). One important point: Caligula can verify that his reconstruction is correct, since in this case both messages must turn out to be meaningful. 15.3 How to Save the Last Move in Chess 15.3.1. Alice can easily cheat: She can send just a random string x in the evening, figure out her move overnight, along with the string y that encodes it, and send the binary sum of x and y as the alleged key. 15.3.2. This certainly eliminates the cheating in the previous exercise, since if she changes her mind, the "key" she computes back from the mes- 286 16. Answers to Exercises sage the next morning will not be meaningful. But now Bob has the advantage: He can try out all "random but meaningful" keys, since there are not so many of them. 15.6 Public Key Cryptography 15.6.1. (a) Pick random numbers (public keys) e1 , e2 , . . . eM and apply the hypothesized algorithm to compute the the corresponding secret keys d1 , d2 , . . . , dM . The number k = (p − 1)(q − 1) is a common divisor of e1 d1 − 1, e2 d2 − 1, . . . , eM dM − 1, so it is a divisor of K = gcd(e1 d1 − 1, e2 d2 − 1, . . . , eM dM − 1), which we can compute. If K < m, then we know that in fact k = K, since k = (p − 1)(q − 1) > pq/2 = m/2. Otherwise we pick another public key eM +1 and repeat. One can show that after no more than about log m iterations, we find k with large probability. (b) If we know m = pq and k = (p−1)(q−1), then we know p+q = m−k+1, and so p and q can be determined as the solutions of the quadratic equation x2 − (m − k + 1)x + m = 0. Index adjacency matrix, 148 Adleman, L., 247 associative operation, 7 Axiom of Parallels, 213 Baranyai, Zsolt, 229 bell curve, 58 bijection, 14, 150 binary representation, 12 bits, 13 binomial coefficients, 20–21, 23, 24, 43–64, 70, 81 Binomial Theorem, 44 block design, 220–224, 229, 237 blocks, 221 Brooks's Theorem, 203, 207 cardinality of a set, 5 Carmichael numbers, 120 Cayley's Theorem, 147, 150, 158 ceiling, 15 chromatic number, 202 circuit, 131 clique, 130 code, 232 error-correcting, 236 error-detecting, 234 Fano, 236 parity check, 233 perfect 1-error-correcting, 236 planar, 162 Reed–M¨ ller, 236 u Reed–Solomon, 236 repetition, 233 RSA, 247 coloring graph, 199–204, 206–210 regions, 197–199, 204–206 Steiner system, 227 commutative operation, 7 complement graph, 130 set, 21 complexity theory, 203, 241, 246 composite number, 88 computer, 89, 110, 186, 206, 220, 242, 246 congruence, 105–107 reflexivity, 105 symmetry, 105 288 Index transitivity, 106 conjecture, 68 convex polygon, 179, 191 countries of a map, 189 cryptography, 110, 122, 242 cryptosystem, 242 cube, 194 Cube space, 215, 221, 224, 236 cut-edge, 142 cycle, 131, 141 Hamiltonian, 139, 161 length, 131 odd, 201 decrypt, 242 definition by induction, 66 degree of a node, 143, 150, 155, 195 difference of sets, 6 Digital Encryption Standard, 250 disjoint, 6 divisor, 87 dodecahedron, 194 graph, 139 double star, 155 edge, 126 parallel, 126 element of a set, 4 encoding, 11 encrypt, 242 Erd˝s, P´l, 184 o a Euclid's Fifth Postulate, 213 Euclidean Algorithm, 99–104, 112, 123, 249 Euler's Formula, 189–191, 194– 196, 208 Euler, L., 135 event, 77 exclusive, 78 experiment, 77 face of a map, 194 factorization, 90, 99, 122 Fano, G., 217 father code, 149 Fermat test, 117 general, 120 Fermat's "Little" Theorem, 97– 99, 117, 121, 248 Fermat, Pierre de, 97 Fibonacci numbers, 65–75, 83, 102, 123 Fibonacci, Leonardo, 65 Fisher's Inequality, 223 Five Color Theorem, 207 floor, 15 Four Color Theorem, 206 Frobenius, G., 169 Fundamental Theorem of Arithmetic, 90 Gauss curve, 57 Gauss, C.F., 105 general position, 182 Goldbach's conjecture, 96 golden ratio, 74 graph, 126, 189 k-colorable, 202 2-colorable, 200 bipartite, 165, 195, 200, 223 complement, 130 complete, 130, 192 connected, 131, 142 connected component, 133 dual, 206 edgeless, 130 planar, 192, 206–208 simple, 126 greatest common divisor, 99 Guthrie, F., 206 Hall, P., 169 Happy End Problem, 184 https, 250 icosahedron, 194 Inclusion–Exclusion Formula, 34, 114 independent events, 79 Index 289 indirect proof, 37, 90, 92, 93, 142, 159, 192 induction, 25–31, 41, 44, 53, 61, 66, 68, 69, 71, 90, 98, 114, 129, 144, 183, 198, 203, 208 simultaneous, 70 induction hypothesis, 27, 29, 53, 68, 98, 145, 198, 203, 208 integer part, 15 intersection of sets, 6 irrational number, 92 isomorphic, 146 Kempe, A.B., 206 key of cryptosystem, 242 private, 247 public, 248 Kirkman, T.P., 228 K¨nig, D., 166, 169 o K¨nigsberg bridges, 136 o Kruskal's Algorithm, 159 labeled tree, 146, 148 Lam, C.W.H., 220 Latin square, 229–232 orthogonal, 230 Law of Large Numbers, 77, 80 Law of Small Numbers, 83 Law of Very Large Numbers, 83 least common multiple, 99 line at infinity, 218 logarithm, 15, 31, 32, 37–40, 56, 59–62, 95, 102 loop, 126 Lucas numbers, 74 magic square, 230 Maple, 122, 246 Marriage Theorem, 169, 223 matching, 165–178 greedy, 172 perfect, 165 Mathematica, 122 Miller–Rabin test, 121 minimal criminal, 90 modular arithmetic, 109 modulus, 105 multigraph, 126, 207 multiple, 87 node, 126 adjacent, 126 degree, 127, 166, 171, 176, 203, 207, 210 father, 142 neighbors, 126 son, 143 noisy channel, 232 one-time pad, 242 one-to-one correspondence, 14, 150 P´lya, G., 155 o Pascal's Triangle, 49, 77 Pascal, Blaise, 49 password, 246 path, 130 augmenting, 173 endpoints, 131 length, 131 permutation, 17 Petersen graph, 139, 195 Pigeonhole Principle, 35, 37, 114, 202, 230, 240 plain text, 242 planar code, 153 planar graph, see graph, planar planar map, 189, 205, 206, 210 plane affine, 218 coordinates, 219 order, 218 Euclidean, 211, 219 Fano, 211, 221, 224, 236 projective, 217 order, 217 Tictactoe, 213, 221, 224 290 Index point at infinity, 218 point of a graph, 126 polyhedron, 194 Pr¨fer code, 150, 152 u extended, 150 prime factorization, 245, 250 prime field, 109, 219, 237 prime number, 83, 88, 219, 245 Prime Number Theorem, 94 Principle of Induction, 27, 29, 199, 203 prism pentagonal, 194 triangular, 194 probability space, 78 pseudoprime, 118 public key cryptography, 247 pyramid pentagonal, 194 Pythagoras, 92 Pythagorean triple, 100 Pythagoreans, 92 Ray-Chaudhuri, D.K., 228 recurrence, 66 relatively prime, 99, 249 remainder, 87, 248 Rivest, R., 247 sample space, 77 Schoolgirls' Walking Schedule, 228 Secure Socket Layer, 250 security, 249 set, 4 cardinality, 5 complement, 21 difference, 6 disjoint, 6 element, 4 empty, 5 intersection, 6 ordered, 17 subset, 5, 20 ordered, 19, 20 symmetric difference, 6 union, 6 Venn diagram, 6 SET, game, 237 Shamir, A., 247 Sieve Formula, 34 signature, 249 star, 130 Steiner system, 224–229, 237 coloring, 227 Steiner, J., 224 subgraph, 131 substitution code, 242 Swiercz, S., 220 symmetric difference of sets, 6 Szekeres, Gy¨rgy, 184 o Tarry, G., 220 tetrahedron, 194 Thiel, L., 220 Traveling Salesman Problem, 161 tree, 10, 11, 141–157, 191 branch, 146 edge, 10 greedy, 159 labeled, 158 leaf, 143 node, 10 root, 142 rooted, 142 spanning, 142 Tree-growing Procedure, 144 Tree Shortcut Algorithm, 162 triangle inequality, 162 Twin Paradox, 37 twin primes, 94 uniform probability space, 78 union of sets, 6 unlabeled tree, 147, 153 Venn diagram, 6 vertex, 126 walk, 132, 136 closed, 132 Eulerian, 136
Book summary This spectacularly clear introduction to abstract algebra is designed to make the study of all required topics and the reading and writing of proofs both accessible and enjoyable for readers encountering the subject for the first time.
Algebra Software - Algebra-net Windows software that enables students to solve actual problems from algebra textbooks and not just a limited set of computer generated examples. Features, testimonials, and purchasing information available on the site. ...more>> Cryptography - Corey Reed An introduction to cryptography, in particular affine enciphering applied to the alphabet, focusing on the use of linear algebra. Includes a primer on bases and modulus algebra and extensions for deciphering an affine enciphered message, using keys to ...more>> Digital Math - Santa Barbara County Education Office A site to assist Algebra I, Grade 7, and Grade 6 students, their parents, and educators with the California State Mathematics Content Standards. Log in for Quicktime that provides step-by-step instruction to solve problems aligned with the mathematics ...more>> e Teaching Assistance Program - eTAP, Inc. Lesson plans, examples and exercises, review checks, and other instructional materials, including audio downloads, on the language of mathematics; basic operations; order of operations and combining terms; fractions; multiplying and dividing fractions; ...more>> ExploreMath.com - Third Millennium Press Shockwave activities illustrating real-time correlations between equations and graphs to help students visualize and experiment with concepts from elementary algebra through pre-calculus: experiment with the graphs of functions, systems, and complex numbers. ...more>> Gary Haynes - Gary Haynes Course syllabi, lesson plans, homework, and objectives. Visit "Tangrams and Other Games" for an interactive tangram story and a Flash presentation on how to develop an understanding of functions through the use of the motion sensor. ...more>> Math with Ms. Evans - Jill Jacobs For her YouTube channel of videos, Jacobs plays -- and dresses -- the part of fictional high school personalities in a math class that she teaches in front of a whiteboard. Each episode lasts about twelve minutes. ...more>> Off The Hypotenuse - Glenn Kenyon Kenyon started this blog in pursuit of "a good discussion of resources, ideas, and innovative ideas for teachers of Algebra." Humorous videos, comic strips, and posts, which date back to March of 2007, have included "Math Lessons learned from Karate," ...more>> The SELECT Math Project - Boston Public Schools The SELECT (Supporting Engaged Learning by Enhancing Curriculum with Technology) Math Project is a Boston Public Schools resource that features over 200 links to web-based virtual manipulatives and resources that directly support the mathematics curriculum tutOR - Moshe Sniedovich and Angie Byrne An online Operations Research (OR) tutorial system developing tutorial modules for specific OR topics, generic web tools to facilitate the construction of the OR modules, and research of the WWW technologies pertaining to this project. Modules for investigating ...more>> Zoom Math - I.Q. Joe The makers of Zoom Algebra, an application with an intuitive visual interface and numerous typing shortcuts. Their apps for TI-83 Plus or TI-84 Plus graphing calculators let you "type problems in just the way they look in your textbook, and then they ...more>> Page: 1 Search for these keywords: Click only once for faster results: all keywords, in any order at least one, that exact phrase parts of words whole words
The CAPE Applied Mathematics syllabus makes provision for a diversity of specialised interests through three carefully articulated options that are available to students. Each option has central core of discrete mathematical concepts which establish the importance of reasoning, counting, modelling and algorithmic thinking. This central core establishes the finiteness of the space in which modelling occurs, the discreteness of the number system used in modelling and the appropriate nature of computation. The three options are as follows: Option A: addresses graphical and numerical concepts by way of Discrete Mathematics and Statistics;
math with FUNDAMENTALS OF MATHEMATICS! By offering a comprehensive review of all basic mathematics concepts, this mathematics text takes the intimidation out of arithmetic and makes learning accessible to everyone. Studying is made easy with tools found throughout the text such as objectives, vocabulary definitions, calculator examples, good advice for studying, concept reviews, and chapter tests. Through caution remarks that alert you to common pitfalls and how and why segments that explain and demonstrate concepts and skills in a step-by-step format, you will easily build confidence in your own skills. Table of Contents Each chapter begins with a Good Advice for Studying section and a chapter-specific application, then concludes with Key Concepts, Review Exercises, True-False Concept Review, Test, and a Group Project
Latest Newsletter Mathematics Overview Problem solving is an integral part of all topics covered in Mathematics at Townsville Grammar School. This key learning area allows the students many opportunities to read, write and speak mathematically, thereby developing an enjoyment of Mathematics and the ability to explore and use mathematics in a variety of contexts and applications. Years 7, 8 and 9 Middle School Mathematics will focus the students on acquiring mathematical knowledge through an active engagement with mathematical tasks. A positive attitude towards Mathematics learning and many opportunities to think, reason and work mathematically are the essential elements of the Middle School Mathematics course at Townsville Grammar School. Year 10 Three Mathematics courses will be offered to Year 10 students, they closely follow the Senior Mathematics curriculum. Mathematics A covers arithmetic, trigonometry, statistics, co-ordinate geometry and some basic algebra; it concentrates on mathematics in real life situations, practical problem solving and communicating mathematically. Students in Mathematics A have the opportunity to complete tasks towards the awarding of the Queensland Certificate of Education (Numeracy) result. Students completing this course will be go on to study Mathematics A or Prevocational Mathematics (if offered) in QSA. Mathematics A does not lead into Mathematics Studies (Standard Level) in the IB Diploma. Mathematics B is designed to prepare students for the study of Mathematics B in Years 11 and 12, as well as Mathematical Studies (Standard level) in the IB Diploma Programme. Mathematics B covers topics such as advanced algebra, trigonometry and co-ordinate geometry with an emphasis on mathematical applications. Mathematics C is designed to extend the top Mathematics students. The course covers advanced algebra, trigonometry, co-ordinate geometry and the study of functions as well as extension topics such as surds, matrices and vectors. The emphasis will also be on mathematical applications. Students in this course will go on to study Mathematics B (and Mathematics C) for QSA in senior years or Mathematics (Standard Level or Higher) in the IB Diploma. Years 11 and 12 Students in Years 11 & 12 can choose from the following Mathematics subjects: Mathematics A Mathematics B Mathematics C Prevocational Mathematics (if offered) IB Mathematical SL (For students studying the International Baccalaureate) IB Mathematical Studies SL (For students studying the International Baccalaureate) IB Mathematical HL (For students studying the International Baccalaureate) Tutorials Free after school tutorials in Mathematics are held weekly . Times are outlined in the Assessment Planner, which is provided to students at the start of each Semester. It is also available for download from this website. Enrichment For Year 7–12 students the Australian Mathematics Competition is held in August Year 7–10 students can enter the Mathematics Challenge in Term 2 Some students are involved in the Enrichment Stage of the Mathematics Challenge Townsville Grammar School enters a team in the Pacific Coal QAMT Year 8 Quiz Year 10 students have the opportunity to attend the QAMT Mathematics Camp in August
This is a free, online textbook offered by Bookboon.com. Topics include:1. Integration of trigonometric polynomials 2.... see more This is a free, online textbook offered by Bookboon.com. Topics include:1. Integration of trigonometric polynomials 2. Complex decomposition of a fraction between two polynomials 3. Integration of a fraction between two polynomials 4. The domain of a fraction 5. The chain rule 6. Calculation of the directional derivative 7. Approximating polynomials 8. Gradient fields; antiderivatives 9. An overview of integration in the plane and in the space 10. Reduction of a plane integral; rectangular version 11. Reduction of a plane integral; polar version 12. Reduction of a space integral; rectangular version 13. Reduction of a space integral; semi-polar version 14. Reduction of a space integral; spherical version 15. Line integrals 16. Surface integrals 17. Transformation theorems 18. Improper integrals; bounded domain 19. Improper integrals; unbounded domain 20. The setting up of a line, a plane, a surface or a space integral 21. Tangential line integrals; gradient field 22. Flux and divergence of a vector field; GauB's theorem 23. Rotation of a vector field; GauB's theorem 24. Green's theorems in the plane 25. Nabla calculus 26. Partial integration in higher dimension 27. Vector potential 28. Global maximum and minimum 29. Extrema; local investigation This is a free textbook offered by BookBoon.'This book requires knowledge of Linear Algebra and Calculus 1.'The table of... see more This is a free textbook offered by BookBoon.'This book requires knowledge of Linear Algebra and Calculus 1.'The table of contents includes:The range of a function in several variables The plane integralThe space integralThe line integralImproper integralsVector analysis This is a free, online textbook offered by Bookboon.com. Topics include: 1. Tangents to curves2. Tangent plane to a... see more This is a free, online textbook offered by Bookboon.com. Topics include: 1. Tangents to curves2. Tangent plane to a surface3. Simple integrals in several variables 4. Extremum (two variables)5. Extrema (three or more variables)
... More About This Book instructions provided. Particular attention is placed on topics that students traditionally struggle with the most. While this book could be used to supplement a standard calculus textbook, it could also be used by college students or adult learners to refresh long-forgotten concepts and skills. Trigonometry includes concepts that have both a geometric and an algebraic component. Homework Helpers: Trigonometry covers all of the topics in a typical Trigonometry class
Short Description IGCSE Mathematics is a new text book written specifically for the Cambridge International Examinations syllabus. Long description IGCSE Mathematics is a new text book written specifically for the Cambridge International Examinations syllabus. It has been written and trialled by experienced IGCSE teachers and endorsed by CIE, ensuring that it is up to date and comprehensive in its coverage of the syllabus. Product details Author: Karen Morrison Subtitle: Igcse Format: Paperback Publisher: Cambridge University Press ISBN: 9780521011136 Series Title: Cambridge International Examinations Pages: 308 Width (mm): 188 Length (mm): 245 Table of Contents: Introduction Module Working with numbers Module Algebra Module Graphs and functions Module Geometry Module Trigonometry Module Statistics Module Probability Module Transformations Answers
Featured Post Algebra Lab What it is: Algebra Lab may not be much to look at graphically speaking, but the resources here are pretty stupendous! Algebra Lab was created by Mainland High School teachers in partnership with Georgia Southern University and a host of student assistance. The site includes really well done lessons, activities, practice pages (online), study aids, glossary, and word problems. Algebra Lab is like a free, living textbook. It has enough substance to help students work their way through algebra, while understanding the connections to how that algebra is used in a practical sense. I didn't appreciate Algebra until I took physics and chemistry. When I saw what those equations I learned were actually used for, I could appreciate the learning requirements in algebra. Algebra Lab does a beautiful job of helping students learn algebra within a context so that they really get a grasp of what these numbers are doing. How to integrate Algebra Lab into your curriculum: I have enjoyed watching the debate over Algebra unfold in the last year or so. One side of the argument asks if it is really necessary that EVERY child be required to take algebra. The other side argues that algebra has great thinking skills that it develops, it gives students additional tools to understand the world through math. I'm not sure where I land on this debate. I don't know that I believe that algebra should be a requirement for every child, and yet I think that my exposure to algebra was valuable. Maybe the debate just needs to be reframed…HOW should algebra be taught? I'm all for things being taught within context. If you can teach any subject in a way that sheds light on other learning it is valuable. I love when students make the connections between something like ratios and a site like Miniature Earth. They not only get excited about the math (yes, really) they see a purpose for wanting to learn more about how it works. Sometimes I think our job of teachers is really to help students see the overlaps that occur in learning so that they can make connections and have a cause to want to dig deeper. I digress… Algebra Lab is a great resource for math (and non-math) teachers. Here you will find lessons, activities, word problems and practice opportunities for students. Students can directly access the site, or you (the teacher) can pull ideas out to use within any other teaching you are doing. The site is great for students to explore on their own (blended learning algebra style) or with guidance from a teacher. As a non-math teacher, I appreciate the way the site helps me think like a math teacher. It reminds me how all of these pieces connect to other learning. Tips: If you have a one-to-one setting, students can practice directly on the website for immediate feedback. Very helpful! ***Want to do your part as a CHANGE MAKER in personalized education? Check out, support and spread the word about the Learning Genome Project! Please leave a comment and share how you are using Algebra Lab in your classroom! 2 What it is: HIP2B² is an edutainment site that aims to show students that subjects that are generally labeled as "difficult" or "hard" can be fun and are important to our future success. HIP2B² is a website, digital magazine, and TV show that work to equip learners with vital life skills including analytical thinking, problem solving, and a curious mindset. The goal is to encourage curiosity in science and math in everyday life. The magazine is a high-quality quarterly publication that is free to view online, the magazine uses the Issuu platform for the digital viewing. You can see an example of the digital HIP2B² embedded above. The TV show can be viewed online, powered by YouTube. How to integrate HIP2B² into the classroom: The HIP2B² videos and digital magazine are a fantastic way to invigorate a sense of curiosity and discovery in your students. The digital magazines are really well done, students will eagerly read through them. Each of the digital magazines is focused on a science or math topic such as mysteries, senses, the environment, technology, origins, animals, safety, food, intelligence, and much more. Students can view the digital magazines all the way back to June 2007. Use the digital magazines as inspiration for science and math inquiry. Students can read through the digital magazines on a classroom computer set up as a reading center, as a class using an interactive whiteboard or projector connected computer, or individually in a lab setting. Do your students get silent reading time in class? Allow them to use the computers to read through the HIP2B² digital magazine. In the video section, students can learn about "tricks" of science like invisibility cloaks and floating paperclips or more serious science like nanotechnology and extreme weather. These videos can be used to introduce a topic or science/math concept or to illustrate a concept. Are your students working on science and math that encourages analytical thinking, problem solving, and curiosity? Why not have them create their own HIP2B² inspired digital magazine. Students can put together their own magazine using any word processing or publishing program and upload the finished product to Issuu to share with the world. Please leave a comment and share how you are using HIP2B² in your classroom!
Books Geometry & Topology A perennial bestseller by eminent mathematician G. Polya, How to Solve It will show anyone in any field how to think straight. In In P PEach page in Common Core Math Workouts for grade 8 contains two "workouts"--one for skills practice and one. With a little time each day, your students will become better problem solvers and will acquire the skills they need to meet the mathematical expectations for their grade level. Three-time New York Times bestselling author Danica McKellar now makes it a breeze to excel in… Geometry! Hollywood actress and math whiz Danica McKellar has completely shattered the "math nerd" stereotype. For years, she's been showing girls how to feel confident and ace their math classes – with style! With Girls Get Curves, she applies her winning techniques to geometry, giving readers the tools they need to feel great and totally "get" everything from congruent triangles to theorems, and more. Inside you'll find: Learning geometry doesn't have to hurt. With a little bit of friendly guidance, it can even be fun! Geometry For Dummies,2nd Edition, helps you make friends with lines, angles, theorems and postulates. It eases you into all the principles and formulas you need to analyze two- and three-dimensional shapes, and it gives you the skills and strategies you need to write geometry proofs. Before you know it, you'll be devouring proofs with relish. You'll find out how a proof's chain of logic works and discover some basic secrets for getting past rough spots. Soon, you'll be proving triangles congruent, calculating circumferences, using formulas, and serving up pi. The non-proof parts of the book contain helpful formulas and tips that you can use anytime you need to shape up your knowledge of shapes. You'll even get a feel for why geometry continues to draw people to careers in art, engineering, carpentry, robotics, physics, and computer animation, among others.You'll discover how to: Identify lines, angles, and planes Measure segments and angles Calculate the area of a triangle Use tips and strategies to make proofs easier Figure the volume and surface area of a pyramid Bisect angles and construct perpendicular lines Work with 3-D shapes Work with figures in the x-y coordinate system So quit scratching your head. Geometry For Dummies, 2nd Edition, gets you un-stumped in a hurry. Clouds are not spheres, mountains are not cones, and lightening does not travel in a straight line. The complexity of nature's shapes differs in kind, not merely degree, from that of the shapes of ordinary geometry, the geometry of fractal shapes. Now that the field has expanded greatly with many active researchers, Mandelbrot presents the definitive overview of the origins of his ideas and their new applications. The Fractal Geometry of Nature is based on his highly acclaimed earlier work, but has much broader and deeper coverage and more extensive illustrations. Imagine an equilateral triangle. Now, imagine smaller equilateral triangles perched in the center of each side of the original triangle--you have a Star of David. Now, place still smaller equilateral triangles in the center of each of the star's 12 sides. Repeat this process infinitely and you have a Koch snowflake, a mind-bending geometric figure with an infinitely large perimeter, yet with a finite area. This is an example of the kind of mathematical puzzles that this book addresses. The Fractal Geometry of Nature is a mathematics text. But buried in the deltas and lambdas and integrals, even a layperson can pick out and appreciate Mandelbrot's point: that somewhere in mathematics, there is an explanation for nature. It is not a coincidence that fractal math is so good at generating images of cliffs and shorelines and capillary beds. This edition includes the most recent Geometry Topics reviewed include the language of geometry; parallel lines and quadrilaterals and coordinates; similarity; right triangles and trigonometry; circles and angle measurement; transformation geometry; locus and coordinates; and an introduction to solid geometry. An introduction to the geometry which, as modern science now confirms, underlies the structure of the universe. The thinkers of ancient Egypt, Greece and India recognized that numbers governed much of what they saw in their world and hence provided an approach to its divine creator. Robert Lawlor sets out the system that determines the dimension and the form of both man-made and natural structures, from Gothic cathedrals to flowers, from music to the human body. By also involving the reader in practical experiments, he leads with ease from simple principles to a grasp of the logarithmic spiral, the Golden Proportion, the squaring of the circle and other ubiquitous ratios and proportions. Art and Imagination: These large-format, gloriously-illustrated paperbacks cover Eastern and Western religion and philosophy, including myth and magic, alchemy and astrology. The distinguished authors bring a wealth of knowledge, visionary thinking and accessible writing to each intriguing subject. 202 illustrations and diagrams, 56 in two colors A bestselling math book author takes what appears to be a typical geometry workbook, full of solved problems, and makes notes in the margins adding missing steps and simplifying concepts so that otherwise baffling solutions are made perfectly clear. By learning how to interpret and solve problems as they are presented in courses, students become fully prepared to solve any obscure problem. No more solving by trial and error! • Includes 1000 problems and solutions • Annotations throughout the text clarify each problem and fill in missing steps needed to reach the solution, making this book like no other geometry workbook on the market • The previous two books in the series on calculus and algebra sell very well Captain Invincible and his intrepid space-dog, Comet, are on a perilous journey back to Earth! Throughout their mission, the fearless captain and his canine sidekick encounter asteroids, poisonous gas, and alien beings. But will their knowledge of three-dimensional shapes, including cubes, cones, and pyramids, help our heroes navigate past these obstacles -- and make it safely home?
The notion of closure pervades mathematics, especially in the fields of topology and projective geometry. Demonstrating this pervasiveness in the field, this graduate-level book provides a complete introduction to closure systems. With an emphasis on finite spaces and algebraic closures, the text covers graph theory, ordered sets, lattices, projective... more...... more... Based on presentations given at the NordForsk Network Closing Conference ?Operator Algebra and Dynamics,? held in Gjáargarður, Faroe Islands, in May 2012, this book features high quality research contributions and review articles by researchers associated with the NordForsk network and leading experts that explore the fundamental role of operator algebras... more... Algebra: A Complete Introduction is the most comprehensive yet easy-to-use introduction to using Algebra. Written by a leading expert, this book will help you if you are studying for an important exam or essay, or if you simply want to improve your knowledge. The book covers all the key areas of algebra including elementary operations, linear equations,... more... This book provides a comprehensive and up-to-date introduction to Hodge theory?one of the central and most vibrant areas of contemporary mathematics?from leading specialists on the subject. The topics range from the basic topology of algebraic varieties to the study of variations of mixed Hodge structure and the Hodge theory of maps. Of particular... more... There's no such thing as too much practice. This reproducible program builds skills incrementally. By inviting students to "show what they know" in a variety of new formats, these stimulating lessons will enable struggling students to actually enjoy the learing process. As in all of the binder programs, the dual emphasis is on (1) mastery of the basics... more... From the author of the highly successful The Complete Idiot's Guide to Calculus comes the perfect book for high school and college students. Following a standard algebra curriculum, it will teach students the basics so that they can make sense of their textbooks and get through algebra class with flying colors. more...
Summary: Math Matters, first published in 2000, quickly became an invaluable resource for math educators nationwide, helping them clarify their own understanding of the math concepts they were required to teach. This important book contains activities and discussions on key elementary topics such as whole number computation, fractions, algebra, geometry, and measurement. The scope in this second edition has now been expanded to address key topics in the middle school math cur...show morericulum as well, including sections on integers, exponents, similarity, the Pythagorean Theorem, and more. Other new features include a new chapter on ratios and rates; a significantly expanded chapter on algebra; an appendix of relevant Web sites; and questions for reflection and discussion. Math matters is an essential and accessible book that serves all who teach or who are about to teach K-8 mathematics - experienced instructors as well as those just starting out648.7922.41
Do the Math: Secrets, Lies, and Algebra EPB Tess loves math because it's the one subject she can trust—there's always just one right answer, and it never changes. But then she starts algebra and is introduced to those pesky and mysterious variables, which seem to be everywhere in eighth grade. When even your friends and parents can be variables, how in the world do you find out the right answers to the really important questions, like what to do about a boy you like or whom to tell when someone's done something really bad? Will Tess's life ever stop changing long enough for her to figure it all out? Do the Math #2: The Writing on the Wall Eighth grade, like algebra, has become pretty complicated for Tess. For one thing, there are the patterns she's noticing everywhere—like how charming-on-the-outside Richard keeps playing scary pranks on her, and how annoying copycat Lynn always has to follow what everyone else is doing. Then... Do the Math: Secrets, Lies, and Algebra In the eighth grade, 1 math whiz 1 stolen test (x), 3 cheaters (y), and 2 best friends (z) who can't keep a secret. Oh, and she can't forget the winter dance (d)! Then there's the suspicious guy Tess's parents know, but that's a whole different problem. Can Tess find the solutions?
Buy Applications of Contact Geometry and Topology in Physics by KHOLODENKO ARKADY L and Read this Book on Kobo's Free Apps. Discover Kobo's Vast Collection of Ebooks Today - Over 3 Million Titles, Including 2 Million Free Ones! Buy APPLICATIONS OF CONTACT GEOMETRY AND TOPOLOGY IN PHYSICS by ARKADY L KHOLODENKO and Read this Book on Kobo's Free Apps. Discover Kobo's Vast Collection of Ebooks Today - Over 3 Million Titles, Including 2 Million Free Ones! Buy Real Life Applications of Soft Computing by Shukla, Anupam and Read this Book on Kobo's Free Apps. Discover Kobo's Vast Collection of Ebooks Today - Over 3 Million Titles, Including 2 Million Free Ones! You are bidding on one McDougal Littell Geometry Explorations and Applications ~ Brand New Note~ There is a small sticky mark on the back cover ~ Just thought I would mention it Publication year: 1997 Copyright year: 1998 ISBN: 0395722853 Winner to add calculated shipping costs and payment is due within three days.Posted with eBay Mobile Zome Geometry Book Zome Geometry has more than 60 easy-to-follow activities and over 150 explorations into the geometry of nature inherent in the Zome System. It provides students a better understanding of the possibilities of ZomeTool kits and complements their building experience with more rigorous academic subject matter. This is the kind of book a young Math lover is meant to grow with! Mfr Name: Zometool, Inc. Mfr Cat No: ML-LIT-ZGB Ages: 12+ Author: George W. Har, Henri Picciotto Paperbac A welcome addition to Saxon's curriculum line, Saxon Geometry is the perfect solution for students and parents who prefer a dedicated geometry course...yet want Saxon's proven methods! Presented in the familiar Saxon approach of incremental development and continual review, topics are continually kept fresh in students' minds. Covering triangle congruence, postulates and theorems, surface area and volume, two-column proofs, vector addition, and slopes and equations of lines, Saxon features all the topics covered in a standard high school geometry course. Two-tone illustrations help students really see the geometric concepts, while sidebars provide additional notes, hints, and topics to think about. Parents will be able to easily help their students with the solutions manual, which... Less Free Worldwide Delivery : The Geometry of Type : Hardback : Thames & Hudson Ltd : 9780500241424 : 0500241422 : 01 Jul 2013 : Explores 100 traditional and modern typefaces in loving detail, with a full spread devoted to each entry. In this title, characters from each typeface are enlarged and annotated to reveal key features, anatomical details, and the finer, often-overlooked elements of type design, which shows how these attributes affect mood and readability. Buy Geometry: Geometry on the Coordinate Plane by Saddleback Educational Publishing L2-Invariants: Theory and Applications to Geometry and K-Theory - Luck, Wolfgang|Burchard , Hans S.|Luck, W.THIS IS A BRAND NEW UNOPEN Free Worldwide Delivery : A Geometry of Music : Hardback : Oxford University Press Inc : 9780195336672 : 0195336674 : 27 May 2011 : In this groundbreaking book, Tymoczko uses contemporary geometry to provide a new framework for thinking about music, one that emphasizes the commonalities among styles from Medieval polyphony to contemporary jazz. Buy Geometry: Solids and Surface Area by Saddleback Educational Publishing and Read this Book on Kobo's Free Apps. Discover Kobo's Vast Collection of Ebooks Today - Over 3 Million Titles, Including 2 Million Free Ones! Perfect for students in a co-op setting, or additional siblings using the same curriculum, this extra workbook & answer key set is designed to be used along with the not-included Teaching Textbooks Geometry Version 2.0 CD-ROM Set; this book is not designed to be used without the CDs. Teaching Textbooks Geometry Version 2.0 includes 16 chapters and 110 lessons that teach students the fundamental basics of geometry up through more difficult topics such as coordinate geometry, theorems, properties, and postulates. Chapters cover lines and angles, parallel lines, triangles, quadrilaterals, circles, area, solid geometry, non-Euclidean geometries, and more. Problems modeled on questions found in the SAT/ACT are also included to help prepare students for standardized testing. This applauded
Precalculus - With 2 CDS - 4th edition Summary: Bob Blitzer's background in mathematics and behavioral sciences, along with his commitment to teaching, inspired him to develop a precalculus series that gets students engaged and keeps them engaged. Presenting the full scope of mathematics is just the first step. Blitzer draws students in with applications that use math to solve real-life problems. Bob Blitzer is a native of Manhattan and received a Bachelor of Arts degree with dual majors in mathematics and psychology (minor: English literature) from the City College of New York. His unusual combination of academic interests led him toward a Master of Arts in mathematics from the University of Miami and a doctorate in behavioral sciences from Nova University. Bob is most energized by teaching mathematics and has taught a variety of mathematics courses at Miami-Dade College for nearly 30 years. He has received numerous teaching awards, including Innovator of the Year from the League for Innovations in the Community College, and was among the first group of recipients at Miami-Dade College for an endowed chair based on excellence in the classroom. Bob has written Intermediate Algebra for College Students, Introductory Algebra for College Students, Essentials of Intermediate Algebra for College Students, Introductory and Intermediate Algebra for College Students, Essentials of Introductory and Intermediate Algebra for College Students, Algebra for College Students, Thinking Mathematically, College Algebra, Algebra and Trigonometry, and Precalculus, all published by Pearson Prentice Hall. All text is legible, may contain markings, cover wear, loose/torn pages or staining and much writing. SKU:9780321559845-5-0 $20.34 +$3.99 s/h Acceptable SellBackYourBook Aurora, IL 032155984353.90321559845-5-1 $173
CAD/CAM Van Buren Technology Center November, 2006 Michigan Mathematics High School Content Expectations The following is a list of Mathematics content identified by the CTE and Integrated Math instructors at the Van Buren Technology Center. ALGEBRA 1 HSCE Expectation Comment Code L2.1.2 Calculate fluently with numerical expressions involving exponents. Use the rules of exponents, and evaluate numerical expressions involving rational and negative exponents, and transition easily between roots and exponents. A2.4.1 Write the symbolic forms of linear functions (standard [i.e., Ax + By = C, where B ≠ 0], point-slope, and slope- intercept) given appropriate information and convert between forms. A2.4.2 Graph lines (including those of the form x = h and y = k) given appropriate information. A2.5.1 Write the symbolic form and sketch the graph of an exponential function given appropriate information (e.g., given an initial value of 4 and a rate of growth of 1.5, write f (x) = 4 (1.5) x). A2.8.1 Write the symbolic form and sketch the graph of simple polynomial functions. S2.1.1 Construct a scatterplot for a bivariate data set with appropriate labels and scales. GEOMETRY HSCE Expectation Comment Code L1.1.6 Explain the importance of the irrational numbers √2 and √3 in basic right triangle trigonometry, the importance of π because of its role in circle relationships, and the role of e in applications such as continuously compounded interest. L2.1.6 Recognize when exact answers aren't always possible or practical. Use appropriate algorithms to approximate solutions to equations (e.g., to approximate solutions to equations (e.g., to approximate square roots). L3.1.1 Convert units of measurement within and between systems; explain how arithmetic operations on measurements affect nits, and carry units through calculations correctly. G1.1.3 Perform and justify constructions, including midpoint of a line segment and bisector of an angle, using straightedge and compass1.1.4 Given a line and a point, construct a line through the point that is parallel to the original line using straightedge and compass. Given a line and a point, construct a line through the point that is perpendicular to the original line. Justify the steps of the constructions. G1.1.5 Given a line segment in terms of its endpoints in the coordinate plane, determine its length and midpoint. G1.2.2 Construct and justify arguments and solve multistep problems involving angle measure, side length, perimeter, and area of all types of triangles. G1.2.3 Know a proof of the Pythagorean Theorem and use the Pythagorean Theorem and its converse to solve multistep problems. G1.3.1 Define the sine, cosine, and tangent of acute angles in a right triangle as ratios of sides. Solve problems about angles, side lengths, or areas using trigonometric ratios in right triangles. G1.3.2 Know and use the Law of Sines and the Law of Cosines and use them to solve problems. Find the area of a triangle with sides a and b and included angle θ using the formula Area = (1/2) a b sin θ. G1.5.1 Know and use subdivision or circumscription methods to find areas of polygons (e.g., regular octagon, nonregular pentagon). G1.5.2 Know, justify, and use formulas for the perimeter and area of a regular n-gon and formulas to find interior and exterior angles of a regular n-gon and their sums. G1.6.1 Solve multistep problems involving circumference and area of circles. G1.6.2 Solve problems and justify arguments about cords (e.g., if a line through the center of a circle is perpendicular to a chord, it bisects the chord) and lines tangent to circles (e.g., a line tangent to a circle is perpendicular to the radius drawn to the point of tangency). G1.6.3 Solve problems and justify arguments about central angles, inscribed angles, and triangles in circles. G1.6.4 Know and use properties of arcs and sectors and find lengths of arcs and areas of sectors. G1.8.1 Solve multistep problems involving surface area and volume of pyramids, prisms, cones, cylinders, hemispheres, and spheres. G2.1.1 Know and demonstrate the relationships between the area formula of a triangle, the area formula of a parallelogram, and the area formula of a trapezoid. G2.1.3 Know and use the relationship between the volumes of pyramids and prisms (of equal base and height) and cones and cylinders (of equal base and height2.2.1 Identify or sketch a possible three-dimensional figure, given two-dimensional views (e.g., nets, multiple views). Create a two-dimensional representation of a three-dimensional figure. G2.2.2 Identify or sketch cross sections of three-dimensional figures. Identify or sketch solids formed by revolving two- dimensional figures around lines. G3.1.1 Define reflection, rotation, translation, and glide reflection and find the image of a figure under a given isometry. ALGEBRA II HSCE Expectation Comment Code L2.1.6 Recognize when exact answers aren't always possible or practical; use appropriate algorithms to approximate solutions to equations (e.., to approximate square roots).L1.2.5* Read and interpret representations from various technological sources, such as contour or isobar diagrams. (Recommended) A1.1.4 Add, subtract, multiply, and simplify polynomials and rational expressions (e.g., multiply (x – 1) (1 – x2 +3); simplify 9x-x3. x+ 3 A1.1.5 Divide a polynomial by a monomial. A1.2.5 Solve polynomial equations and equations involving rational expressions (e.g., solve -2x (x2 + 4x + 3) = 0; solve x- 1 = 3, and justify steps in the solution. x+6 A1.2.7 Solve exponential and logarithmic equations (e.g., 3 (2x) = 24), 2 ln (x + 1) = 4), and justify steps in the solution. L2.1.6 Recognize when exact answers aren't always possible or practical; use appropriate algorithms to approximate solutions to equations (e.g., to approximate square rootsAlgebra II (Continued)OTHER MATH Code Expectation Comment G.GS. 06.02 Understand that for polygons, congruence means CAD/CAM I & II corresponding sides and angles have equal measures. G.TR. 06.03 Understand the basic rigid motions in the plane (reflections, CAD/CAM I rotations, translations), relate these to congruence, and apply them to solve problems. G.TR. 06.04 Understand and use simple compositions of basic rigid CAD/CAM I transformations, e.g., a translation followed by a reflection. A.RP. 06.02 Plot ordering pairs of integers and use ordered pairs of CAD/CAM I & II integers to identify points in all four quadrants of the coordinate plane. A.FO. 06.06 Represent information given in words using algebraic CAD/CAM II expressions and equations. A.FO. 06.07 Simplify expressions of the first degree by combining like CAD/CAM II terms, and evaluate using specific values. A.FO. 06.12 Understand that adding or subtracting the same number to CAD/CAM II both sides of an equation creates a new equation that has the same solution. A.FO. 06.13 Understand that multiplying or dividing both sides or an CAD/CAM II equation by the same non-zero number creates a new equation that has the same solutions. A.FO. 06.14 Solve equations of the form ax + b = c, e.g., 3x + 8 = 15 by CAD/CAM II hand for positive integer coefficients less than 20, use calculators otherwise, and interpret the results. M.UN. 06.01 Convert between basic units of measurement within a single CAD/CAM I & II measurement system, e.g., square inches to square feet. M.PS. 06.02 Draw patterns (of faces) for a cube and rectangular prism CAD/CAM I & II that, when cut, will cover the solid exactly (nets). M.TE. 06.03 Compute the volume and surface area of cubes and CAD/CAM I rectangular prisms given the lengths of their sides, using formulas. N.MR. 06.01 Understand division of fractions as the inverse of CAD/CAM I & II multiplication, e.g., if 4/5 ÷ 2/3 = = 4/5 •3/2 = 12/10. N.FL. 06.04 Multiply and divide any two fractions, including mixed CAD/CAM I & II numbers, fluentlyN.MR. 06.08 Understand integer subtraction as the inverse of integer CAD/CAM II addition, Understand integer division as the inverse of integer multiplication.* N.FL. 06.09 Add and multiply integers between -10 and 10; subtract and CAD/CAM II divide integers using the related facts. Use the number line and chip models for addition and subtraction.* N.FL. 06.10 Add, subtract, multiply and divide positive rational numbers CAD/CAM II fluently. N.ME. 06.11 Find equivalent ratios by scaling up or scaling down. CAD/CAM I & II N.FL. 06.12 Calculate part of a number given the percentage and the CAD/CAM I number. N.MR. 06.13 Solve contextual problems involving percentages such as CAD/CAM I sales taxes and tips.* N.FL. 06.14 For applied situations, estimate the answers to calculations CAD/CAM I & II involving operations with rational numbers. N.FL. 06.15 Solve applied problems that use the four operations with CAD/CAM I & II appropriate decimal numbers. A.PA. 07.11 Understand and use basic properties of real numbes; CAD/CAM II additive and multiplicative identifies, additive and multiplicative inverses, commutatively, associatively, and the distributive property of multiplication over addition. A.FO. 07.12 Add, subtract, and multiply simple algebraic expressions of CAD/CAM II the first degree, e.g., (92x + 8y) -5x +y, or x (x+2) and justify using properties of real numbers. A.FO. 07.13 From applied situations, generate and solve linear equations CAD/CAM II of the form ax + b = c and ax + b = cx + d, and interpret solutions. N.MR. 07.02 Solve problems involving derived quantities such as CAD/CAM II density, velocity, and weighted averages* N.MR. 07.06 Understand the concept of square root and cube root, and CAD/CAM II estimate using calculators. N.FL. 07.07 Solve problems involving operations with integers. CAD/CAM II N.FL. 07.08 Add, subtract, multiply, and divide positive and negative CAD/CAM II rational numbers fluently.* N.FL. 07.09 Estimate results of computations with rational numbers. CAD/CAM II G.SR. 07.01 Use a ruler and other tools to draw squares, rectangles, CAD/CAM I triangles, and parallelograms with specified dimensions. G.SR. 07.02 Use compass and straightedge to perform basic geometric CAD/CAM I constructions: the perpendicular bisector of a segment, an equilateral triangle, and the bisector of an angle; understand informal justification. G.TR. 07.03 Understand that in similar polygons, corresponding angles CAD/CAM I are congruent and the ratios of corresponding sides are equal; understand the concepts of similar figures and scale factor. G.TR. 07.04 Solve problems about similar figures and scale drawings. CAD/CAM IG.TR. 07.05 Show that two triangles are similar using the criteria: CAD/CAM I corresponding angles are congruent (AAA similarity); the ratios of two pairs of corresponding sides are equal and this included angles are congruent (SAS similarity); ratios of all pairs of corresponding sides are equal (SSS similarity); use these criteria to solve problems and to justify arguments. G.TR. 07.06 Understand and use the fact that when two triangles are CAD/CAM I similar with scale factor of r; there areas are related by a factor of r2. N.ME. 08.01 Understand the meaning of a square root of a number and CAD/CAM II its connection to the square whose area is the number; understand the meaning of a cube root and its connection to the volume of a cube. N.ME. 08.02 Understand meanings of zero and negative integer CAD/CAM II exponents. N.ME. 08.03 Understand that in decimal form, rational numbers either CAD/CAM II terminate or eventually repeat, and the calculators truncate or round repeating decimals; locate rational numbers on the number line; know fraction forms of common repeating decimals, e.g., 0.1=1/9; 0.3=1/3. N.ME. 08.04 Understand that irrational numbers are those that cannot be CAD/CAM II expressed as the quotient of two integers, and cannot be represented by terminating or repeating decimals; approximate the position of familiar irrational numbers, e.g., √2, √3, π, on the number line. N.FL. 08.05 Estimate and solve problems with square roots and cube CAD/CAM II roots using calculators. N.FL. 08.06 Find square roots of perfect squares and approximate the CAD/CAM II square roots of non-perfect squares by locating between consecutive integers, e.g., √130 is between 11 and 12. N.MR. 08.07 Understand percent increase and percent decrease in both CAD/CAM I sum and product form, e.g., 3% increase of a quantity x is x + .03x = 1.03x. N.MR. 08.08 Solve problems involving percent increases and decreases. CAD/CAM I N.FL. 08.09 Solve problems involving compounded interest or multiple CAD/CAM I & II discounts A.FO. 08.07 Recognize and apply the common formulas. CAD/CAM II (a+b)2=a2+2ab+b2; (a-b)2=a2-2ab+b2;(a+b)(a-b)=a2-b2; represent geometrically. A.FO. 08.08 Factor simple quadratic expressions with integer CAD/CAM II coefficients, e.g., x2+6x+9, x2+2x-3, and x2-4; solve simple quadratic equations, e.g., x2=16 or x2=5 (by taking square roots); x2-x-6=0, x2-2x=15 (by factoring); verify solutions by evaluation. A.FO. 08.09 Solve applied proglems involving simple quadratic CAD/CAM II equations. A.FO. 08.12 Solve linear inequalities in one and two variables, and graph CAD/CAM II the solution setsA.FO. 08.13 Set up and solve applied problems involving simultaneous CAD/CAM II linear equations and linear inequalities. G.GS. 08.01 Understand at least one proof of the Pythagorean Theorem; CAD/CAM I & II use the Pythagorean Theorem and its converse to solve applied problems including perimeter; area, and volume problems. G.LO. 08.02 Find the distance between two points on the coordinate CAD/CAM I plane using the distance formula; recognize that the distance formula is an application of the Pythagorean Theorem. G.SR. 08.03 Understand the definition of a circle; know and use the CAD/CAM I formula for circumference and area of a circle to solve problems. G.SR. 08.04 Find area and perimeter of complex figures by sub-dividing CAD/CAM I them into basic shapes (quadrilaterals, triangles, circles). G.SR. 08.05 Solve applied problems involving areas of triangles, CAD/CAM I quadrilaterals, and circles. G.SR. 08.06 Know the volume formulas for generalized cylinders ((area CAD/CAM I & II of base) x height), generalized cones and pyramids (1/3 (area of base) x height), spheres (4/3 π (radius) 3) and apply them to solve problems. G.SR. 08.07 Understand the concept of surface area, and find the surface CAD/CAM I area of prisms, cones, spheres, pyramids, and cylinders. G.SR. 08.08 Sketch a variety of two-dimensional representations of CAD/CAM I & II three-dimensional solids including orthogonal view (top, front, and side), picture views (projective or isometric), and nets; use such two-dimensional representations to help solve problems. C:\Docstoc\Working\pdf\b7cd009b-a92a-4458-bb5f-bceb8220891
Reviews basic computation including whole numbers, fractions, decimals, and percent. Emphasis is placed on applications in the areas of consumerism, personal money management, and measurement. Also introduces probability, statistics, basic algebra, and the fundamentals of geometry.
books.google.com - How does your level of education affect your lifetime earnings profile? Will economic development lead to increased environmental degradation? How does the participation of women in the labor force differ across countries? How do college scholarship rules affect savings? Students come to economics wanting... Methods for Economics How does your level of education affect your lifetime earnings profile? Will economic development lead to increased environmental degradation? How does the participation of women in the labor force differ across countries? How do college scholarship rules affect savings? Students come to economics wanting answers to questions like these. While these questions span different disciplines within economics, the methods used to address them draw on a common set of mathematical tools and techniques. The second edition of Mathematical Methods for Economics continues the tradition of the first edition by successfully teaching these tools and techniques through presenting them in conjunction with interesting and engaging economic applications. In fact, each of the questions posed above is the subject of an application in Mathematical Methods for Economics. The applications in the text provide students with an understanding of the use of mathematics in economics, an understanding that is difficult for students to grasp without numerous explicit examples. The applications also motivate the study of the material, develop mathematical comprehension and hone economic intuition. Mathematical Methods for Economics presents you with an opportunity to offer each economics major a resource that will enhance his or her education by providing tools that will open doors to understanding. From inside the book 24 pages matching stationary value in this book Page 579 This book provides mostly definitions and virtually NO examples on how to execute economic and mathematical problems. Furthermore it assumes you remember everything from past courses in trigonometry, precalculus, and calculus; offering no review chapter at the begging of the book. It touches mathematical methods for economics on a very superficial level. I do not recommend this book, there are much better, more resourceful books out there with much clearer explanations and examples.
The Standard General Mathematics Teacher CD-ROM contains a wealth of time-saving assessment and classroom resources including: • modifiable chapter tests and answers containing multiple choice and short answer questions • chapter review assignments with extended problems that can be given out to students in class or can be completed at home • printable versions of the multiple choice questions from student CD-ROM • print-ready skill sheets to revise the prerequisite knowledge and skills required for the chapter • editable Exam Question Sets from which teachers can create their own exams
Hate how math/science is taught the traditional way? (or find it stultifying?) Feel like you could learn the same material in a fraction of the time you spent to learn it? (and wish you had more intuitive understanding of the material rather than superficial understanding of it?) Well, here are some more nontraditional books you might like. Feel free to email me more suggestions at simfish@gmail.com. Sometimes, the demystified guides can also be helpful (although many smart students disdain them), but you can easily find them on your own. There are other alternatives as well: sometimes, subjects are more rewarding when you study application first and theory second. Astrophysics books are really nice at motivating understanding of physics equations, for example. On the other hand, I've also included books that are notably more rigorous than the standard books (where I feel that the standard textbooks can be stultifying and the rigor rewarding). And sometimes, you do learn a lot faster through Wikipedia than the textbooks (Wikipedia's better at finding the stuff that's relevant and/or emotionally salient to a large fraction of the population. Sure, they're not epistemically more significant, but learning is a human process). Some more textbook suggestions at (although they're more traditional). Other good links: hyperphysics (obviously). Sometimes, Princeton Review prep books can motivate you a lot better (research shows that you learn better when you're constantly testing yourself, but problems often take too much time/energy to be consistently used as such a test). Also, Springer Undergraduate Math Series = the closest thing you can get to Princeton Review for undergrad math.