(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 49457, 1926]*) (*NotebookOutlinePosition[ 80042, 3054]*) (* CellTagsIndexPosition[ 79998, 3050]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Discovering Number Theory", "Subtitle"], Cell["\<\ Jeffrey J. Holt University of Virginia John W. Jones Arizona State University\ \>", "Text", TextAlignment->Center, TextJustification->0], Cell["Copyright \[Copyright] 2001 by W. H. Freeman and Company", "Text", TextAlignment->Center, TextJustification->0, FontSize->10] }, Closed]], Cell["Divisibility and Factorization", "Title", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["Initializations", "Subsection", Evaluatable->False, TextAlignment->Left, AspectRatioFixed->True], Cell[BoxData[ \(Off[General::spell]; \nOff[General::spell1]; \)], "Input", InitializationCell->True, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell["Divisors and GCDs", "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "In the Prelab section of this chapter, you had the opportunity to compute \ the divisors of some integers by hand. Mathematica has a built\[Hyphen]in \ command called ", StyleBox["Divisors", "Input"], " that will automatically compute all of the positive divisors for a given \ integer. Here it is in action: " }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Divisors[12345]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "The output is the set of all the positive divisors of 12345, given in the \ form of a Mathematica ", StyleBox["list", FontSlant->"Italic"], ". Lists in Mathematica are contained in curly braces, ", StyleBox["{ }", "Input"], ". Mathematica only lists the positive divisors because it is easy to \ compute all of the divisors from these. We would just have to take these \ numbers and their negations to get all of the divisors of 12345." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell["\<\ In the Prelab section, an illustration was given that showed how to \ compute gcd(45, 60). The first step is to compute the positive divisors of \ both 45 and 60. Here's the Mathematica version:\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(Divisors[45]\), \(Divisors[60]\)}], "Input", AspectRatioFixed->True], Cell[TextData[{ "The next step is to pick out the largest divisor that occurs in both \ lists. A handy way to do this is by using the Mathematica ", StyleBox["Intersection", "Input"], " command. This command takes two (or more) lists as input, and produces a \ new sorted list of all elements common to all of the input lists. In our \ case, we will get a list of all positive divisors of both 45 and 60. Here it \ is:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Intersection[Divisors[45], Divisors[60]]\)], "Input", AspectRatioFixed->True], Cell["\<\ With no work at all it is now clear that gcd(45, 60) = 15. The \ above example is cool, but after all, you could do that one by hand. Let's \ try some larger choices to really see the power of Mathematica:\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(a = 223092870; \n\(b = 6227020800; \n Intersection[Divisors[a], Divisors[b]]\)\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Imagine trying to do this one by hand! By the way, what is gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], ")? Then use Mathematica to compute the positive divisors of gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], "). (You have to replace ", StyleBox["???", "Input", FontColor->RGBColor[1, 0, 0]], " with ", Cell[BoxData[ \(TraditionalForm\`gcd(a, b)\)]], " in the next cell before executing it.)" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ RowBox[{"Divisors", "[", RowBox[{ StyleBox["??", FontColor->RGBColor[1, 0, 0]], RowBox[{ StyleBox["?", FontColor->RGBColor[1, 0, 0]], "]"}]}]}]], "Input"], Cell[CellGroupData[{ Cell["Research Question 1", "Subsubsection", CellDingbat->"\[GraySquare]", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "In the preceding computations, we have found the set of common positive \ divisors of ", Cell[BoxData[ \(TraditionalForm\`a = 223092870\)]], " and ", Cell[BoxData[ \(TraditionalForm\`b\ = \ 6227020800\)]], ", and have found the set of positive divisors of ", Cell[BoxData[ \(TraditionalForm\`gcd(a, b)\)]], ". Compare these two sets. Change the values of ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], ", and repeat the experiment: compute the set of common positive divisors \ of ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], ", compute the set of positive divisors of ", Cell[BoxData[ \(TraditionalForm\`gcd(a, b)\)]], ", and compare the two sets. Once you think you see a pattern, state a \ conjecture and try to prove it!\n\n", StyleBox["Hints:", FontWeight->"Bold", FontColor->GrayLevel[0]], " Since your conjecture will involve sets, when working on the proof you \ should keep in mind the suggestions concerning proofs involving sets in the \ \"Tips for Writing Proofs\" section of the Course Guide. Also, you may find \ it helpful to use the results in the \"GCDs and Factorization\" section below \ when working on your proof." }], "SmallText"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Divisors and Factorization", "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "How do we find the set of positive divisors for an integer? If you happen \ to have Mathematica at your disposal, you could just type in the ", StyleBox["Divisors", "Input"], " command, as you did above. However, it is important to understand how \ this works, especially if you ever stray more than a few feet from your \ computer." }], "Text", Evaluatable->False], Cell[TextData[{ "The most basic method for computing divisors is exhaustive trial division. \ If we want to find the positive divisors for an integer ", StyleBox["n", FontSlant->"Italic"], ", we just take the integers 1, 2, 3, . . . , ", StyleBox["n", FontSlant->"Italic"], ", divide ", StyleBox["n", FontSlant->"Italic"], " by each, and those that divide evenly make up the set of positive \ divisors for ", StyleBox["n", FontSlant->"Italic"], ". Here is a function which does exactly that." }], "Text", Evaluatable->False], Cell[BoxData[ \(\(getdivs1[n_]\ := \ Module[{divlist}, \n\tdivlist = {\ }; \n\t Do[If[n/m\ == \ Floor[n/m], \n\t\tAppendTo[divlist, m]], {m, 1, n}]; \n\tReturn[divlist]]; \)\)], "Input", InitializationCell->True], Cell[TextData[{ "The test for whether ", StyleBox["m", "Input"], " is a divisor of ", StyleBox["n", "Input"], " in this function is ", StyleBox["n/m == Floor[n/m].", "Input"], " The ", StyleBox["==", "Input"], " tests whether two quantities are equal. On the basis of what you learned \ about the ", StyleBox["Floor", "Input"], " command in the \"Introduction to Using Mathematica\", can you see why \ this works? Let's try our new function:" }], "Text"], Cell[BoxData[ \(getdivs1[12345]\)], "Input"], Cell[TextData[{ "We can compare it with the built\[Hyphen]in ", StyleBox["Divisors", "Input"], " command:" }], "Text"], Cell[BoxData[ \(Divisors[12345]\)], "Input"], Cell["\<\ Our method seems to work and is rather simple, but it is also quite \ inefficient.\ \>", "Text", Evaluatable->False], Cell[TextData[{ "One way to improve upon the above procedure is by applying the following \ observation: if ", StyleBox["m", FontSlant->"Italic"], " is a divisor of ", StyleBox["n", FontSlant->"Italic"], ", then ", Cell[BoxData[ \(TraditionalForm\`k = n/m\)]], " is also a divisor of ", StyleBox["n", FontSlant->"Italic"], ", because ", Cell[BoxData[ FormBox[ RowBox[{ StyleBox["mk", FontSlant->"Italic"], "=", "n"}], TraditionalForm]]], ". Thus, the positive divisors can be organized into pairs of the form ", Cell[BoxData[ \(TraditionalForm\`\((m, n/m)\)\)]], ", where ", Cell[BoxData[ \(TraditionalForm\`m < n/m\)]], ". (The one exception to this is if ", StyleBox["n", FontSlant->"Italic"], " is a perfect square and ", Cell[BoxData[ \(TraditionalForm\`m = \@n\)]], ", in which case ", Cell[BoxData[ \(TraditionalForm\`m = \ n/m\)]], ".) For example, if ", Cell[BoxData[ \(TraditionalForm\`n = 100\)]], ", then the positive divisors of ", StyleBox["n", FontSlant->"Italic"], " are given by" }], "Text", Evaluatable->False], Cell[BoxData[ \(Divisors[100]\)], "Input"], Cell[TextData[{ "For this value of ", StyleBox["n", FontSlant->"Italic"], ", we have the pairs ", Cell[BoxData[ \(TraditionalForm\`\(\((1, 100)\), \)\)]], " ", Cell[BoxData[ \(TraditionalForm\`\((2, 50)\)\)]], ", ", Cell[BoxData[ \(TraditionalForm\`\((4, 25)\)\)]], ", and ", Cell[BoxData[ \(TraditionalForm\`\((5, 20)\)\)]], ", and (because 100 is a perfect square) the single divisor ", Cell[BoxData[ \(TraditionalForm\`\@100 = 10\)]], ". Note that for each pair of positive divisors, the smaller divisor is \ less than ", Cell[BoxData[ \(TraditionalForm\`\@n\)]], ". This is also the case in general: if ", Cell[BoxData[ \(TraditionalForm\`m | n\)]], " and ", Cell[BoxData[ \(TraditionalForm\`m < n/m\)]], ", then ", Cell[BoxData[ \(TraditionalForm\`m < \@n\)]], ". (The proof of this assertion is left as a homework exercise.) Thus, \ all positive divisors can be found by first using exhaustive trial division \ by all integers up to ", Cell[BoxData[ \(TraditionalForm\`\@n\)]], ", and then generating the pairs to identify the remaining positive \ divisors." }], "Text", Evaluatable->False], Cell[TextData[{ "For example, suppose that ", Cell[BoxData[ \(TraditionalForm\`n = 152\)]], ". Then we have" }], "Text", Evaluatable->False], Cell[BoxData[ \(N[Sqrt[152]]\)], "Input"], Cell["\<\ Dividing each of 1, 2, 3, . . . , 12 into 152 reveals the divisors \ 1, 2, 4, and 8. The remaining positive divisors of 152 are then given \ by\ \>", "Text", Evaluatable->False], Cell[TextData[Cell[BoxData[{ \(TraditionalForm\`152/1\ = \ 152\), \(TraditionalForm\`152/2\ = \ 76\), \(TraditionalForm\`152/4\ = \ 38\), \(TraditionalForm\`152/8\ = \ 19\)}]]], "Text", Evaluatable->False, TextAlignment->Center, TextJustification->0], Cell["Here's a check:", "Text", Evaluatable->False], Cell[BoxData[ \(Divisors[152]\)], "Input"], Cell[TextData[{ "Here is a function which uses this second method for finding all positive \ divisors of an integer ", StyleBox["n", FontSlant->"Italic"], ":" }], "Text", Evaluatable->False], Cell[BoxData[ \(\(getdivs2[n_]\ := \ Module[{divlist}, \n\tdivlist = {\ }; \n\t Do[If[n/m\ == \ Floor[n/m], \n\t\tAppendTo[divlist, {m, n/m}]], \n \t{m, 1, Sqrt[n]}]; \n\tReturn[Union[Flatten[divlist]]]]; \)\)], "Input", InitializationCell->True], Cell["Here it is in action.", "Text"], Cell[BoxData[ \(getdivs2[12345]\)], "Input"], Cell[TextData[{ "How much time do we save by using the second method instead of the first? \ We can measure how long it takes each method to compute the divisors of 10000 \ using the ", StyleBox["Timing", "Input"], " command, as shown: " }], "Text", Evaluatable->False], Cell[BoxData[ \(Timing[getdivs1[10000]]\)], "Input"], Cell[BoxData[ \(Timing[getdivs2[10000]]\)], "Input"], Cell[TextData[{ "The second method is much faster. The reason for the difference in speed \ is clear: ", StyleBox["getdivs1", "Input"], " has to test ", StyleBox["n", FontSlant->"Italic"], " possible integers, while ", StyleBox["getdivs2", "Input"], " checks only ", Cell[BoxData[ \(TraditionalForm\`\@n\)]], " integers. So the running time for ", StyleBox["getdivs1", "Input"], " should be roughly proportional to ", StyleBox["n", FontSlant->"Italic"], " whereas the running time for ", StyleBox["getdivs2", "Input"], " should be roughly proportional to ", Cell[BoxData[ \(TraditionalForm\`\@n\)]], ". (There are other things going on inside the computer, so one should not \ expect timing estimates like this to be exact. However, they can provide \ good ballpark estimates.)" }], "Text"], Cell[TextData[{ "Experiment a little with each function. What do you think will happen to \ the running times if we multiply ", StyleBox["n", FontSlant->"Italic"], " by 10 for each function? Then check the result by changing 10000 in the \ commands above." }], "Text"], Cell["Now try to answer the following question.", "Text"], Cell[CellGroupData[{ Cell["Exercise 1", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "On the basis of the timings above, extrapolate the amount of time (in \ years) required to find the positive divisors for ", Cell[BoxData[ \(TraditionalForm\`10\^18\)]], " using ", StyleBox["getdivs1", "Input"], " and ", StyleBox["getdivs2", "Input"], ". For simplicity, you may assume that all years have 365 days. " }], "Text", Evaluatable->False] }, Closed]], Cell["\<\ A problem related to finding the set of divisors for an integer is \ that of finding the prime\[Hyphen]power factorization of an integer. Indeed, \ we shall see later in the chapter how to use the factorization of an integer \ to easily compute all of the divisors for the integer.\ \>", "Text"], Cell["\<\ A number of different methods have been developed for finding the \ factorization of an integer. The method that we shall describe here is \ fairly simple, and borrows from the ideas used above to find divisors; that \ is, it uses trial division.\ \>", "Text"], Cell[TextData[{ "Recall that finding the prime factorization of an integer requires us to \ express an integer ", StyleBox["n", FontSlant->"Italic"], " as" }], "Text"], Cell[BoxData[ \(TraditionalForm \`n\ = \ \(p\_1\%n\_1\) \(p\_2\%n\_2\) \[CenterEllipsis]\ \(p\_k\%n\_k . \)\)], "Text", TextAlignment->Center, FontSize->14], Cell["\<\ The basic procedure for finding the factorization is as \ follows:\ \>", "Text"], Cell[TextData[{ "1. Start with the first prime, ", Cell[BoxData[ \(TraditionalForm\`p = 2\)]], ", and check to see if ", Cell[BoxData[ \(TraditionalForm\`2 | n\)]], ". If so, then replace ", StyleBox["n", FontSlant->"Italic"], " with ", Cell[BoxData[ \(TraditionalForm\`n/2\)]], ". Repeat until 2 will no longer divide in evenly, keeping track of the \ number of factors of 2." }], "Listing"], Cell[TextData[{ "2. Repeat the above step with the next prime, ", Cell[BoxData[ \(TraditionalForm\`p = 3\)]], ", and then with the next prime, ", Cell[BoxData[ \(TraditionalForm\`p = 5\)]], ", and so on. As above, keep track of the number of factors along the \ way." }], "Listing"], Cell["\<\ 3. Stop when you are left with 1 or with a number you know is \ prime.\ \>", "Listing"], Cell[TextData[{ "As an example, let us find the prime\[Hyphen]power factorization for ", Cell[BoxData[ \(TraditionalForm\`n = 571450\)]], ". We start by dividing ", StyleBox["n", FontSlant->"Italic"], " by 2:" }], "Text"], Cell[BoxData[ \(571450/2\)], "Input"], Cell["\<\ Although it is pretty obvious from the output, let's see if 2 will \ divide evenly into the above quotient:\ \>", "Text"], Cell[BoxData[ \(285725/2\)], "Input"], Cell[TextData[{ "Since we get a fraction for output, we know that 2 won't divide in again. \ Thus, we know that ", Cell[BoxData[ \(TraditionalForm\`2\^1\)]], " is the correct power of 2 in the factorization. Now let's move to the \ prime 3:" }], "Text"], Cell[BoxData[ \(285725/3\)], "Input"], Cell["\<\ This doesn't divide in evenly, so 3 is not included in the \ factorization. Let's try 5:\ \>", "Text"], Cell[BoxData[ \(285725/5\)], "Input"], Cell["\<\ Thus 5 divides in evenly, and as we can see from the output, 5 will \ divide in evenly again:\ \>", "Text"], Cell[BoxData[ \(57145/5\)], "Input"], Cell[TextData[{ "That's it for the 5s. Hence we know that ", Cell[BoxData[ \(TraditionalForm\`5\^2\)]], " is the correct power of 5 in the factorization. Here's the test for the \ prime 7:" }], "Text"], Cell[BoxData[ \(11429/7\)], "Input"], Cell["No luck. Here's the prime 11:", "Text"], Cell[BoxData[ \(11429/11\)], "Input"], Cell[TextData[{ "Continuing in this manner, we find that 1039 is not divisible by 11, 13, \ 17, 19, 23, 29, or 31. We already know that 1039 is not divisible by 2, 3, \ or 5 because we divided away all factors of 2, 3, and 5 already. If we are \ clever, we can stop now since ", Cell[BoxData[ \(TraditionalForm\`\@1039\)]], " is approximately . . ." }], "Text"], Cell[BoxData[ \(N[Sqrt[1039]]\)], "Input"], Cell[TextData[{ "Because 1039 has no prime divisors less than or equal ", Cell[BoxData[ \(TraditionalForm\`\@1039\)]], ", it must be prime. Thus we now have the entire factorization:" }], "Text"], Cell[TextData[{ Cell[BoxData[ \(TraditionalForm \`571450 = 2\^1\[CenterDot]5\^2\[CenterDot]11\^1\[CenterDot]1039\)]], "." }], "Text", TextAlignment->Center, TextJustification->0], Cell["\<\ The method described and illustrated above will work well for \ fairly small integers and can be used to factor numbers on a hand calculator. \ However, this technique is inefficient for larger integers, and \ more\[Hyphen]advanced methods must be used in these cases. But even the more\ \[Hyphen]sophisticated factoring techniques have their limits. The general \ problem of factoring large integers (upwards of 200 digits!) is a difficult \ one, and is currently an area of intense mathematical research. The problem \ is not only interesting in its own right, but also has some important \ applications. We'll see how factoring is related to cryptography in a later \ chapter.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["GCDs and Factorization", "Section", Evaluatable->False, AspectRatioFixed->True], Cell["Here's a computation we saw earlier:", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(a = 223092870; \n\(b = 6227020800; \n Intersection[Divisors[a], Divisors[b]]\)\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "On the basis of the output, we see that gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], ") = 30030." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Another way to compute gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], ") is to look at the factorizations of ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], ". The Mathematica command ", StyleBox["FactorInteger", "Input"], " computes factorizations of integers. To illustrate, let's take ", StyleBox["a", FontSlant->"Italic"], " = 7920 and ", StyleBox["b", FontSlant->"Italic"], " = 4536." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(a = 7920; \n\(b = 4536; \)\), \(FactorInteger[a]\), \(FactorInteger[b]\)}], "Input", AspectRatioFixed->True], Cell["The output tells us that ", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["a", FontSlant->"Italic"], " = 7920 = ", Cell[BoxData[ \(TraditionalForm\`2\^4\)]], Cell[BoxData[ \(TraditionalForm\`\(\ 3\^2\)\)]], Cell[BoxData[ \(TraditionalForm\`\(\ 5\^1\ \)\)]], Cell[BoxData[ \(TraditionalForm\`11\^1\)]] }], "Text", TextAlignment->Center, FontSize->14], Cell["and ", "Text"], Cell[TextData[{ StyleBox["b", FontSlant->"Italic"], " = 4536 = ", Cell[BoxData[ \(TraditionalForm\`2\^3\)]], Cell[BoxData[ \(TraditionalForm\`\(\ 3\^4\)\)]], Cell[BoxData[ \(TraditionalForm\`\(\ 7\^1\)\)]], "." }], "Text", TextAlignment->Center, FontSize->14], Cell[TextData[{ "Now if ", StyleBox["d", FontSlant->"Italic"], " divides both ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], ", then all of the prime divisors of ", StyleBox["d", FontSlant->"Italic"], " have to divide ", StyleBox["a", FontSlant->"Italic"], " and all of the prime divisors of ", StyleBox["d", FontSlant->"Italic"], " have to divide ", StyleBox["b", FontSlant->"Italic"], ". The only primes that divide both ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], " are 2 and 3, so any positive common divisor must have the form" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["d", FontSlant->"Italic"], " = ", Cell[BoxData[ FormBox[ SuperscriptBox["2", StyleBox["m", FontSize->10]], TraditionalForm]]], Cell[BoxData[ FormBox[ RowBox[{" ", SuperscriptBox["3", StyleBox["n", FontSize->10]]}], TraditionalForm]]], "." }], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True, FontSize->14], Cell[TextData[{ "What are the largest choices of ", StyleBox["m", FontSlant->"Italic"], " and ", StyleBox["n", FontSlant->"Italic"], " we can take? Well, on the basis of the factorizations," }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "if ", StyleBox["d ", FontSlant->"Italic"], "| ", StyleBox["a", FontSlant->"Italic"], " then ", StyleBox["m", FontSlant->"Italic"], " \[LessEqual] 4, and if ", StyleBox["d ", FontSlant->"Italic"], "| ", StyleBox["b", FontSlant->"Italic"], " then ", StyleBox["m", FontSlant->"Italic"], " \[LessEqual] 3." }], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True], Cell[TextData[{ "So, we've got to take ", StyleBox["m", FontSlant->"Italic"], " \[LessEqual] 3. Similarly, " }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "if ", StyleBox["d ", FontSlant->"Italic"], "| ", StyleBox["a", FontSlant->"Italic"], " then ", StyleBox["n", FontSlant->"Italic"], " \[LessEqual] 2, and if ", StyleBox["d ", FontSlant->"Italic"], "| ", StyleBox["b", FontSlant->"Italic"], " then ", StyleBox["n", FontSlant->"Italic"], " \[LessEqual] 4." }], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True], Cell[TextData[{ "This time, we've got to take ", StyleBox["n", FontSlant->"Italic"], " \[LessEqual] 2. Thus, taking the biggest possible values for ", StyleBox["n", FontSlant->"Italic"], " and ", StyleBox["m", FontSlant->"Italic"], ", we see that the greatest common divisor is" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ Cell[BoxData[ \(TraditionalForm\`2\^3\)]], Cell[BoxData[ \(TraditionalForm\`\(\ 3\^2\)\)]], " = 72." }], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True, FontSize->14], Cell["In general, suppose we have the prime\[Hyphen]power factorizations", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`a\ = \ \(p\_1\%m\_1\) \(p\_2\%m\_2\) \[CenterEllipsis]\ p\_k\%m\_k\)], "Text", TextAlignment->Center, FontSize->14], Cell["and ", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`b\ = \ \(p\_1\%n\_1\) \(p\_2\%n\_2\) \[CenterEllipsis]\ \(p\_k\%n\_k . \)\)], "Text", TextAlignment->Center, FontSize->14], Cell[TextData[{ StyleBox["Note:", FontWeight->"Bold"], " It is possible that some of the ", Cell[BoxData[ \(TraditionalForm\`m\_1\)]], ", . . . , ", Cell[BoxData[ \(TraditionalForm\`m\_k\)]], " and ", Cell[BoxData[ \(TraditionalForm\`n\_1\)]], ", . . . , ", Cell[BoxData[ \(TraditionalForm\`n\_k\)]], " are equal to 0. Writing two integers as products of prime powers over \ the same set of primes is a useful trick when writing proofs involving prime \ power factorizations. You can use it yourself, as long as you advise the \ reader of what you are doing. " }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "The greatest common divisor of ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], " is" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`gcd(a, \ b)\ = \ \(p\_1\%\(min(m\_1, \ n\_1)\)\) p\_2\%\(min(m\_2, \ n\_2)\)\ \[CenterEllipsis]\ \ \(p\_k\%\(min(m\_k, \ n\_k)\) . \)\)], "Text", TextAlignment->Center, FontSize->14], Cell[TextData[{ "To see how this works in practice, let's look at another example. Suppose \ that we have ", StyleBox["a", FontSlant->"Italic"], " = 165620000 and ", StyleBox["b", FontSlant->"Italic"], " = 65984625. Here are the factorizations:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(a = 165620000; \nb = 65984625; \nFactorInteger[a]\), \(FactorInteger[b]\)}], "Input", AspectRatioFixed->True], Cell[TextData[{ "To compute gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], "), we just start comparing prime factors. Since 2 is a factor of ", StyleBox["a", FontSlant->"Italic"], " but not ", StyleBox["b", FontSlant->"Italic"], ", 2 is not a factor of gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], "). Similarly, since 3 is a factor of ", StyleBox["b", FontSlant->"Italic"], " but not ", StyleBox["a", FontSlant->"Italic"], ", 3 is not a factor of gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], "). Now 5 is a factor of both ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], ", and the smallest exponent on 5 is 3, so that ", Cell[BoxData[ \(TraditionalForm\`5\^3\)]], " is a factor of gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], "). Also, 7 is a factor of both ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], ", where the smallest exponent is 2, so that ", Cell[BoxData[ \(TraditionalForm\`7\^2\)]], " is a factor of gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], "). The factors 13 and 19 are eliminated in the same manner as 2 and 3, \ and we arrive at" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "gcd(", StyleBox["a", FontSlant->"Italic"], ", ", StyleBox["b", FontSlant->"Italic"], ") = ", Cell[BoxData[ \(TraditionalForm\`5\^3\)]], Cell[BoxData[ \(TraditionalForm\`7\^2\)]], "= 6125." }], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True, FontSize->14], Cell[TextData[{ "Mathematica has a built\[Hyphen]in command to compute greatest common \ divisors. The name of this command is ", StyleBox["GCD", "Input"], ". We can use it to check our computation:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(GCD[165620000, \ 65984625]\)], "Input"], Cell["Looks good.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "If you play around with Mathematica's ", StyleBox["GCD", "Input"], " command, you will find that it computes gcds very quickly, even for huge \ numbers. In fact, we can use it on numbers which are too large for \ Mathematica to factor:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(GCD[10^300\ + \ 1, \ 10^500\ + \ 1]\)], "Input"], Cell["\<\ How does it find gcds without factoring the numbers? We will learn \ the secret in the next chapter.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell["Counting Divisors", "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "By using a combination of the ", StyleBox["Divisors", "Input"], " and ", StyleBox["Length", "Input"], " commands, it's easy to get Mathematica to compute the number of positive \ divisors of a given integer. Here's an example:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Length[Divisors[7920]]\)], "Input", AspectRatioFixed->True], Cell["\<\ All that this code does is compute the list of positive divisors, \ and then report the number of elements in the list. \ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell["\<\ In this section, we shall perform some experiments to learn how the \ number of positive divisors of a given integer can be determined from the \ factorization of the integer. We'll do this by starting with fairly simple \ cases and building up to more complicated situations. Along the way, a \ pattern should (hopefully!) emerge.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Let us begin with the simplest case: Suppose that ", StyleBox["n", FontSlant->"Italic"], " = ", StyleBox["p", FontSlant->"Italic"], ", where ", StyleBox["p", FontSlant->"Italic"], " is a prime number. For instance, let ", StyleBox["n", FontSlant->"Italic"], " = 13. Here's the positive divisors:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Divisors[13]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "And here's ", StyleBox["d", FontSlant->"Italic"], "(", StyleBox["n", FontSlant->"Italic"], "), the number of positive divisors of ", StyleBox["n", FontSlant->"Italic"], ":" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Length[Divisors[13]]\)], "Input", AspectRatioFixed->True], Cell[CellGroupData[{ Cell["Research Question 2", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Select different primes, and repeat the above experiment: Compute the \ divisor list, and then compute ", StyleBox["d", FontSlant->"Italic"], "(", StyleBox["n", FontSlant->"Italic"], "). When you have enough data, form a conjecture that states ", StyleBox["d", FontSlant->"Italic"], "(", StyleBox["n", FontSlant->"Italic"], ")", " for ", StyleBox["n", FontSlant->"Italic"], " = ", StyleBox["p", FontSlant->"Italic"], ", where ", StyleBox["p", FontSlant->"Italic"], " is prime. (It probably won't take much data for you to form a \ conjecture!) Then prove your conjecture." }], "SmallText", CellFrame->True, Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell["Research Question 3", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Repeat Research Question 2, but this time for ", StyleBox["n = ", FontSlant->"Italic"], Cell[BoxData[ \(TraditionalForm\`p\^a\)], "Text"], ", where ", StyleBox["p", FontSlant->"Italic"], " is a prime and ", StyleBox["a", FontSlant->"Italic"], " is a positive integer. \n\n", StyleBox["Hints", FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[":", FontWeight->"Bold"], " When doing computational experiments, select a small prime ", StyleBox["p", FontSlant->"Italic"], " and then increment the value of ", StyleBox["a", FontSlant->"Italic"], " by 1. Also, note that when ", StyleBox["a", FontSlant->"Italic"], " = 1, you revert to the case covered by Research Question 2. Thus, \ whatever your conjecture, it must be consistent with your results from the \ preceding Research Question." }], "SmallText", CellFrame->True, Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[TextData[{ "Now suppose that ", StyleBox["n", FontSlant->"Italic"], " = ", StyleBox["pq", FontSlant->"Italic"], ", where ", StyleBox["p", FontSlant->"Italic"], " and ", StyleBox["q", FontSlant->"Italic"], " are distinct primes. (If ", StyleBox["p", FontSlant->"Italic"], " = ", StyleBox["q", FontSlant->"Italic"], ", then we would be in the situation covered in Research Question 3.) What \ is ", StyleBox["d", FontSlant->"Italic"], "(", StyleBox["n", FontSlant->"Italic"], ") in this case? Let's try an experiment, taking ", StyleBox["n", FontSlant->"Italic"], " = 3 \[CenterDot] 7:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(n = 3*7; \nDivisors[n]\), \(Length[Divisors[n]]\)}], "Input", AspectRatioFixed->True], Cell[CellGroupData[{ Cell["Research Question 4", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Select different primes ", StyleBox["p", FontSlant->"Italic"], " and ", StyleBox["q", FontSlant->"Italic"], ", and repeat the above experiment: Compute the list of positive divisors \ for ", StyleBox["n", FontSlant->"Italic"], " = ", StyleBox["p", FontSlant->"Italic"], " ", StyleBox["q", FontSlant->"Italic"], ", and then compute ", StyleBox["d", FontSlant->"Italic"], "(", StyleBox["n", FontSlant->"Italic"], "). When you have enough data, form a conjecture that states ", StyleBox["d", FontSlant->"Italic"], "(", StyleBox["n", FontSlant->"Italic"], ") for ", Cell[BoxData[ \(TraditionalForm\`n = p\ q\)]], ", where ", StyleBox["p", FontSlant->"Italic"], " and ", StyleBox["q", FontSlant->"Italic"], " are distinct primes. \n\n", StyleBox["Note", FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[":", FontWeight->"Bold"], " We will no longer state that you should prove your conjecture, since you \ should always prove (or try to prove) all conjectures made in this course." }], "SmallText", CellFrame->True, Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell["Research Question 5", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Repeat Research Question 4, but this time take ", StyleBox["n", "Text", FontSlant->"Italic"], StyleBox[" = ", "Text"], Cell[BoxData[ \(TraditionalForm\`p\^a\)], "Text"], Cell[BoxData[ \(TraditionalForm\`q\^b\)], "Text"], ", where ", StyleBox["p", FontSlant->"Italic"], " and ", StyleBox["q", FontSlant->"Italic"], " are primes and ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], " are positive integers.\n\n", StyleBox["Hints", FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[":", FontWeight->"Bold"], " When doing your numerical experiments, it will make life easier if you \ are systematic. (In fact, systematic experimentation is the hallmark of good \ scientific work.) You might try starting with fixed values of ", StyleBox["p", FontSlant->"Italic"], " and ", StyleBox["q", FontSlant->"Italic"], ", and make simple variations in the exponents ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], ". Note also that the previous Research Questions are all special cases of \ this one. Therefore, your conjecture in this case must be consistent with \ your previous results." }], "SmallText", CellFrame->True, Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell["\<\ All of the earlier work has been leading up to the most general \ case of all. Suppose that\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(TraditionalForm \`\(n\ = \ \(p\_1\%a\_1\) \(p\_2\%a\_2\) \[CenterEllipsis]\ p\_k\%a\_k, \)\)], "Text", TextAlignment->Center, FontSize->14], Cell[TextData[{ "where ", Cell[BoxData[ \(TraditionalForm\`p\_1\)]], ", ", Cell[BoxData[ \(TraditionalForm\`p\_2\)]], ", . . . , ", Cell[BoxData[ \(TraditionalForm\`p\_k\)]], " are distinct primes and ", Cell[BoxData[ \(TraditionalForm\`a\_1\)]], ", ", Cell[BoxData[ \(TraditionalForm\`a\_2\)]], ", . . . , ", Cell[BoxData[ \(TraditionalForm\`a\_k\)]], " are positive integers. What is ", StyleBox["d", FontSlant->"Italic"], "(", StyleBox["n", FontSlant->"Italic"], ") in this case? On the basis of your earlier investigations, you may not \ need any additional experimentation to form a conjecture. On the other hand, \ there is no harm in further experimentation, so feel free to do more if you \ wish." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["Research Question 6", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Form a conjecture that states ", StyleBox["d", FontSlant->"Italic"], "(", StyleBox["n", FontSlant->"Italic"], ") for \n\n\t\t\t\t", Cell[BoxData[ FormBox[ RowBox[{"n", " ", "=", " ", RowBox[{\(p\_1\%a\_1\), StyleBox[\(p\_2\%a\_2\), "Text"], "\[CenterEllipsis]", " ", \(p\_k\%a\_k\)}]}], TraditionalForm]]], ",\n\t\t\nwhere ", Cell[BoxData[ \(TraditionalForm\`p\_1\)]], ", ", Cell[BoxData[ \(TraditionalForm\`p\_2\)]], ", . . . , ", Cell[BoxData[ \(TraditionalForm\`p\_k\)]], " are distinct primes and ", Cell[BoxData[ \(TraditionalForm\`a\_1\)]], ", ", Cell[BoxData[ \(TraditionalForm\`a\_2\)]], ", . . . , ", Cell[BoxData[ \(TraditionalForm\`a\_k\)]], " are positive integers." }], "SmallText"] }, Closed]], Cell[TextData[{ "It may seem that we led to this formula in an inefficient manner; why not \ go for the whole formula at once? As you may have discovered along the way, \ it can help a great deal to work up to the general case through various \ special cases. In number theory, starting with cases such as ", StyleBox["n", FontSlant->"Italic"], " prime, and then ", StyleBox["n", FontSlant->"Italic"], " a prime power, and so on, is a standard progression of study. Keep this \ in mind for later investigations in the course." }], "Text"], Cell[TextData[{ "An important part of proving your conjectures for Research Questions 2 \ through 6 is being able to list the positive divisors of an integer of the \ forms ", Cell[BoxData[ \(TraditionalForm\`n = p\)]], ", ", Cell[BoxData[ \(TraditionalForm\`n = p\ q\)]], ", ", Cell[BoxData[ \(TraditionalForm\`n = p\^a\)]], ", and so on. The basic idea of listing these divisors was implicit in the \ section above where we derived a formula for the greatest common divisor of \ two integers in terms of their factorizations. In the next exercise, you \ should formulate the statement precisely." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["Exercise 2", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Suppose ", Cell[BoxData[ \(TraditionalForm \`n\ = \ \(p\_1\%m\_1\) \(p\_2\%m\_2\) \[CenterEllipsis]\ p\_k\%m\_k\)]], ". What are the positive divisors of ", StyleBox["n", FontSlant->"Italic"], " in terms of their prime\[Hyphen]power factorizations?" }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["The Division Algorithm", "Section", Evaluatable->False, AspectRatioFixed->True], Cell["\<\ We begin this section with a statement of the Division Algorithm, \ which you saw at the end of the Prelab section of this chapter:\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Theorem 1.2 (Division Algorithm)", FontWeight->"Bold"], " Let ", StyleBox["a", FontSlant->"Italic"], " be an integer and ", StyleBox["b", FontSlant->"Italic"], " be a positive integer. Then there exist unique integers ", StyleBox["q", FontSlant->"Italic"], " and ", StyleBox["r", FontSlant->"Italic"], " such that" }], "Text", Evaluatable->False, AspectRatioFixed->True, FontColor->GrayLevel[0]], Cell[TextData[{ StyleBox["a", FontSlant->"Italic"], " = ", StyleBox["b", FontSlant->"Italic"], " ", StyleBox["q", FontSlant->"Italic"], " + ", StyleBox["r\t", FontSlant->"Italic"], "and\t0 \[LessEqual] ", StyleBox["r", FontSlant->"Italic"], " < ", StyleBox["b", FontSlant->"Italic"], "." }], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True, FontColor->GrayLevel[0]], Cell[TextData[{ "Remember learning long division in grade school? (If not, pretend that \ you do.) Long division is a procedure for dividing a number ", StyleBox["a", FontSlant->"Italic"], " by another number ", StyleBox["b", FontSlant->"Italic"], ", and coming up with a quotient ", StyleBox["q", FontSlant->"Italic"], " and a remainder ", StyleBox["r", FontSlant->"Italic"], ". The Division Algorithm is really nothing more than a guarantee that \ good old long division really works. Although this result doesn't seem too \ profound, it is nonetheless quite handy. For instance, it is used in proving \ the Fundamental Theorem of Arithmetic, and will also appear in the next \ chapter. A proof of the Division Algorithm is given at the end of the \"Tips \ for Writing Proofs\" section of the Course Guide." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Now, suppose that you have a pair of integers ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], ", and would like to find the corresponding ", StyleBox["q", FontSlant->"Italic"], " and ", StyleBox["r.", FontSlant->"Italic"], " If ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], " are small, then you could find ", StyleBox["q", FontSlant->"Italic"], " and ", StyleBox["r", FontSlant->"Italic"], " by trial and error. However, suppose that ", StyleBox["a = ", FontSlant->"Italic"], "124389001 and ", StyleBox["b = ", FontSlant->"Italic"], "593. In this case, trial and error would be extremely tedious. What \ happens if we try the division using Mathematica? Since ", StyleBox["q", FontSlant->"Italic"], " is the quotient, it should be close to ", Cell[BoxData[ \(TraditionalForm\`a/b\)]], "." }], "Text", Evaluatable->False, TextAlignment->Left, AspectRatioFixed->True], Cell[BoxData[ \(a = 124389001; \nb = 593; \na/b\)], "Input"], Cell["Maybe a decimal approximation would be more useful:", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(N[a/b, 10]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Now we're getting somewhere. Since we know that ", StyleBox["a", FontSlant->"Italic"], " = ", StyleBox["b", FontSlant->"Italic"], " ", StyleBox["q", FontSlant->"Italic"], " + ", StyleBox["r", FontSlant->"Italic"], ", it follows that" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ Cell[BoxData[ \(TraditionalForm\`a\/b = q + r\/b\)]], "." }], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True, FontSize->14], Cell[TextData[{ "Thus it follows that ", StyleBox["q", FontSlant->"Italic"], " \[LessEqual] ", Cell[BoxData[ \(TraditionalForm\`a/b\)]], ". (Remember that 0 \[LessEqual] ", StyleBox["r", FontSlant->"Italic"], " < ", StyleBox["b", FontSlant->"Italic"], ".) So, in our above example, it makes sense to take ", StyleBox["q", FontSlant->"Italic"], " = 209762, because this is the biggest integer that is less than (or equal \ to) ", Cell[BoxData[ \(TraditionalForm\`a/b\)]], ". (Recall that this is the idea used repeatedly when performing long \ division by hand.) With this choice of ", StyleBox["q", FontSlant->"Italic"], ", what is ", StyleBox["r", FontSlant->"Italic"], "? That's easy enough, because we must have" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ Cell[BoxData[ \(TraditionalForm\`a - \ b\ q = r\)]], "." }], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True], Cell["Here's the computation:", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(q = 209762; \nr = a - b\ q\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "Since ", StyleBox["r", FontSlant->"Italic"], " < ", StyleBox["b", FontSlant->"Italic"], ", we have fulfilled the requirements of the Division Algorithm, and we're \ done." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Let's return to the determination of ", StyleBox["q", FontSlant->"Italic"], ". The procedure used in the above example will work in general: Find the \ largest integer that is less than or equal to ", Cell[BoxData[ \(TraditionalForm\`a/b\)]], ". This process can be automated by using the Mathematica ", StyleBox["Floor", "Input"], " command, which does exactly what is required. So, we could have computed \ ", StyleBox["q", FontSlant->"Italic"], " this way:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(q = Floor[a/b]\)], "Input", AspectRatioFixed->True], Cell[TextData[{ "The whole process is automated in the command ", StyleBox["divalg", "Input"], " defined below:" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(divalg[a_, b_] := Module[{q, r}, \n\t\tq\ = \ Floor[a/b]; \n\t\tr\ = \ a\ - \ b\ q; \n \t\tReturn[{q, r}]]\)], "Input", InitializationCell->True, AspectRatioFixed->True], Cell[TextData[{ "Note that this function is made up of two operations, separated by \ semicolons. Here it is in action on our sample values of ", StyleBox["a", FontSlant->"Italic"], " and ", StyleBox["b", FontSlant->"Italic"], ":" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(divalg[124389001, 593]\)], "Input", AspectRatioFixed->True], Cell[CellGroupData[{ Cell["Exercise 3", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "Use ", StyleBox["divalg", "Input"], " to repeat Exercise 5 in the Prelab section of this chapter." }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]] }, Closed]] }, FrontEndVersion->"Microsoft Windows 3.0", ScreenRectangle->{{0, 800}, {0, 544}}, AutoGeneratedPackage->None, ScreenStyleEnvironment->"Working", WindowToolbars->"EditBar", CellGrouping->Manual, WindowSize->{491, 276}, WindowMargins->{{33, Automatic}, {Automatic, 30}}, PrintingCopies->1, PrintingPageRange->{1, 9999}, PageHeaders->{{Cell[ TextData[ { CounterBox[ "Page"]}], "PageNumber"], Inherited, Cell[ TextData[ { ValueBox[ "FileName"]}], "Header"]}, {Inherited, Inherited, Cell[ TextData[ { CounterBox[ "Page"]}], "PageNumber"]}}, PrintingOptions->{"PrintingMargins"->{{0, 79.1875}, {0, 0}}, "PaperSize"->{612, 792}, "PaperOrientation"->"Portrait", "PrintCellBrackets"->True, "PrintRegistrationMarks"->False, "PrintMultipleHorizontalPages"->False, "FacingPages"->False, "Magnification"->1}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, 128}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, CharacterEncoding->"XAutomaticEncoding", Magnification->1, StyleDefinitions -> Notebook[{ Cell[CellGroupData[{ Cell["Style Definitions", "Subtitle"], Cell["\<\ Modify the definitions below to change the default appearance of all cells in \ a given style. Make modifications to any definition using commands in the Format menu. \ \>", "Text"], Cell[CellGroupData[{ Cell["Style Environment Names", "Section"], Cell[StyleData[All, "Working"], PageWidth->WindowWidth, ScriptMinSize->9], Cell[StyleData[All, "Presentation"], PageWidth->WindowWidth, ScriptMinSize->12, FontSize->16], Cell[StyleData[All, "Condensed"], PageWidth->WindowWidth, CellBracketOptions->{"Margins"->{1, 1}, "Widths"->{0, 5}}, ScriptMinSize->8, FontSize->11], Cell[StyleData[All, "Printout"], PageWidth->PaperWidth, ScriptMinSize->5, FontSize->10, PrivateFontOptions->{"FontType"->"Outline"}] }, Closed]], Cell[CellGroupData[{ Cell["Notebook Options", "Section"], Cell["\<\ The options defined for the style below will be used at the Notebook level. \ \>", "Text"], Cell[StyleData["Notebook"], PageHeaders->{{Cell[ TextData[ { CounterBox[ "Page"]}], "PageNumber"], None, Cell[ TextData[ { ValueBox[ "FileName"]}], "Header"]}, {Cell[ TextData[ { ValueBox[ "FileName"]}], "Header"], None, Cell[ TextData[ { CounterBox[ "Page"]}], "PageNumber"]}}, StyleMenuListing->None] }, Closed]], Cell[CellGroupData[{ Cell["Styles for Headings", "Section"], Cell[CellGroupData[{ Cell[StyleData["Title"], CellMargins->{{12, Inherited}, {20, 40}}, CellGroupingRules->{"TitleGrouping", 0}, PageBreakBelow->False, TextAlignment->Center, CounterIncrements->"Title", CounterAssignments->{{"Section", 0}, {"Equation", 0}, {"Figure", 0}, { "Subtitle", 0}, {"Subsubtitle", 0}}, FontFamily->"Helvetica", FontSize->24, FontWeight->"Bold"], Cell[StyleData["Title", "Presentation"], CellMargins->{{24, 10}, {20, 40}}, TextAlignment->Center, LineSpacing->{1, 0}, FontSize->24], Cell[StyleData["Title", "Condensed"], CellMargins->{{8, 10}, {4, 8}}, TextAlignment->Center, FontSize->24], Cell[StyleData["Title", "Printout"], CellMargins->{{2, 10}, {15, 30}}, TextAlignment->Center, FontSize->24] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Subtitle"], CellDingbat->None, CellMargins->{{12, Inherited}, {10, 15}}, CellGroupingRules->"InputGrouping", PageBreakBelow->False, TextAlignment->Center, CounterIncrements->"Subtitle", FontFamily->"Helvetica", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], Cell[StyleData["Subtitle", "Presentation"], CellDingbat->None, CellMargins->{{24, 10}, {15, 20}}, TextAlignment->Center, LineSpacing->{1, 0}, FontSize->16, FontSlant->"Italic", FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Subtitle", "Condensed"], CellDingbat->None, CellMargins->{{8, 10}, {4, 4}}, TextAlignment->Center, FontSize->16, FontSlant->"Italic", FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Subtitle", "Printout"], CellDingbat->None, CellMargins->{{2, 10}, {10, 15}}, TextAlignment->Center, FontSize->16, FontSlant->"Italic", FontColor->RGBColor[0, 0, 1]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Subsubtitle"], CellDingbat->"\[LightBulb]", CellMargins->{{12, Inherited}, {10, 20}}, CellGroupingRules->"OutputGrouping", PageBreakBelow->False, TextJustification->1, FontFamily->"Times", FontSize->14, FontSlant->"Plain", FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Subsubtitle", "Presentation"], CellDingbat->"\[LightBulb]", CellMargins->{{24, 10}, {10, 20}}, LineSpacing->{1, 0}, FontSlant->"Plain", FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Subsubtitle", "Condensed"], CellDingbat->"\[LightBulb]", CellMargins->{{8, 10}, {8, 12}}, FontSlant->"Plain", FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Subsubtitle", "Printout"], CellDingbat->"\[LightBulb]", CellMargins->{{2, 10}, {8, 10}}, FontSlant->"Plain", FontColor->RGBColor[0, 0, 1]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Section"], CellDingbat->"\[FilledSquare]", CellMargins->{{25, Inherited}, {8, 24}}, CellGroupingRules->{"SectionGrouping", 30}, PageBreakBelow->False, CellFrameLabelMargins->6, CounterIncrements->"Section", CounterAssignments->{{"Subsection", 0}, {"Subsubsection", 0}}, FontFamily->"Helvetica", FontSize->18, FontWeight->"Bold"], Cell[StyleData["Section", "Presentation"], CellMargins->{{40, 10}, {11, 32}}, LineSpacing->{1, 0}, FontSize->18], Cell[StyleData["Section", "Condensed"], CellMargins->{{18, Inherited}, {6, 12}}, FontSize->18], Cell[StyleData["Section", "Printout"], CellMargins->{{13, 0}, {7, 22}}, FontSize->18] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Subsection"], CellDingbat->"\[FilledSmallSquare]", CellMargins->{{22, Inherited}, {8, 20}}, CellGroupingRules->{"SectionGrouping", 40}, PageBreakBelow->False, CellFrameLabelMargins->6, CounterIncrements->"Subsection", CounterAssignments->{{"Subsubsection", 0}}, FontFamily->"Times", FontSize->16, FontWeight->"Bold"], Cell[StyleData["Subsection", "Presentation"], CellMargins->{{36, 10}, {11, 32}}, LineSpacing->{1, 0}, FontSize->16], Cell[StyleData["Subsection", "Condensed"], CellMargins->{{16, Inherited}, {6, 12}}, FontSize->16], Cell[StyleData["Subsection", "Printout"], CellMargins->{{9, 0}, {7, 22}}, FontSize->16] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Subsubsection"], CellDingbat->"\[GraySquare]", CellMargins->{{22, Inherited}, {8, 18}}, CellGroupingRules->{"SectionGrouping", 50}, PageBreakBelow->False, CellFrameLabelMargins->6, CounterIncrements->"Subsubsection", FontFamily->"Times", FontSize->14, FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], Cell[StyleData["Subsubsection", "Presentation"], CellDingbat->"\[GraySquare]", CellMargins->{{34, 10}, {11, 26}}, LineSpacing->{1, 0}, FontSize->14, FontColor->RGBColor[1, 0, 0]], Cell[StyleData["Subsubsection", "Condensed"], CellDingbat->"\[GraySquare]", CellMargins->{{17, Inherited}, {6, 12}}, FontSize->14, FontColor->RGBColor[1, 0, 0]], Cell[StyleData["Subsubsection", "Printout"], CellDingbat->"\[GraySquare]", CellMargins->{{9, 0}, {7, 14}}, FontSize->14, FontColor->RGBColor[1, 0, 0]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Styles for Body Text", "Section"], Cell[CellGroupData[{ Cell[StyleData["Text"], CellMargins->{{12, 10}, {7, 7}}, TextJustification->1, LineSpacing->{1, 3}, CounterIncrements->"Text", FontFamily->"Times", FontSize->12], Cell[StyleData["Text", "Presentation"], CellMargins->{{24, 10}, {10, 10}}, TextJustification->1, LineSpacing->{1, 5}], Cell[StyleData["Text", "Condensed"], CellMargins->{{8, 10}, {6, 6}}, TextJustification->1, LineSpacing->{1, 1}], Cell[StyleData["Text", "Printout"], CellMargins->{{2, 2}, {6, 6}}, TextJustification->1] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["SmallText"], CellFrame->True, CellMargins->{{12, 10}, {7, 7}}, CellGroupingRules->"OutputGrouping", TextJustification->1, LineSpacing->{1, 3}, CounterIncrements->"SmallText", FontFamily->"Times", FontSize->12, FontSlant->"Plain"], Cell[StyleData["SmallText", "Presentation"], CellFrame->True, CellMargins->{{14, 24}, {8, 8}}, TextJustification->1, LineSpacing->{1, 5}, FontSize->12, FontSlant->"Plain"], Cell[StyleData["SmallText", "Condensed"], CellFrame->True, CellMargins->{{14, 24}, {5, 5}}, TextJustification->1, LineSpacing->{1, 2}, FontSize->12, Background->GrayLevel[1]], Cell[StyleData["SmallText", "Printout"], CellFrame->True, CellMargins->{{14, 24}, {5, 5}}, TextJustification->1, FontSize->12, Background->GrayLevel[1]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Styles for Input/Output", "Section"], Cell["\<\ The cells in this section define styles used for input and output to the kernel. Be careful when modifying, renaming, or removing these styles, because the front end associates special meanings with these style names. \ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["Input"], CellMargins->{{45, 10}, {5, 7}}, Evaluatable->True, CellGroupingRules->"InputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, CellLabelMargins->{{23, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultInputFormatType, AutoItalicWords->{}, FormatType->InputForm, ShowStringCharacters->True, NumberMarks->True, CounterIncrements->"Input", FontSize->12, FontWeight->"Bold"], Cell[StyleData["Input", "Presentation"], CellMargins->{{72, Inherited}, {8, 10}}, LineSpacing->{1, 0}], Cell[StyleData["Input", "Condensed"], CellMargins->{{40, 10}, {2, 3}}], Cell[StyleData["Input", "Printout"], CellMargins->{{39, 0}, {4, 6}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Output"], CellMargins->{{47, 10}, {7, 5}}, CellEditDuplicate->True, CellGroupingRules->"OutputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, CellLabelMargins->{{23, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, AutoItalicWords->{}, FormatType->InputForm, CounterIncrements->"Output", FontSize->12], Cell[StyleData["Output", "Presentation"], CellMargins->{{72, Inherited}, {10, 8}}, LineSpacing->{1, 0}], Cell[StyleData["Output", "Condensed"], CellMargins->{{41, Inherited}, {3, 2}}], Cell[StyleData["Output", "Printout"], CellMargins->{{39, 0}, {6, 4}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Message"], CellMargins->{{45, Inherited}, {Inherited, Inherited}}, CellGroupingRules->"OutputGrouping", PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, ShowCellLabel->False, CellLabelMargins->{{23, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, AutoItalicWords->{}, FormatType->InputForm, CounterIncrements->"Message", StyleMenuListing->None, FontSize->12, FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Message", "Presentation"], CellMargins->{{72, Inherited}, {Inherited, Inherited}}, LineSpacing->{1, 0}], Cell[StyleData["Message", "Condensed"], CellMargins->{{41, Inherited}, {Inherited, Inherited}}], Cell[StyleData["Message", "Printout"], CellMargins->{{39, Inherited}, {Inherited, Inherited}}, FontColor->GrayLevel[0]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Print"], CellMargins->{{45, Inherited}, {Inherited, Inherited}}, CellGroupingRules->"OutputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, ShowCellLabel->False, CellLabelMargins->{{23, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, AutoItalicWords->{}, FormatType->InputForm, CounterIncrements->"Print", StyleMenuListing->None, FontSize->12], Cell[StyleData["Print", "Presentation"], CellMargins->{{72, Inherited}, {Inherited, Inherited}}, LineSpacing->{1, 0}], Cell[StyleData["Print", "Condensed"], CellMargins->{{41, Inherited}, {Inherited, Inherited}}], Cell[StyleData["Print", "Printout"], CellMargins->{{39, Inherited}, {Inherited, Inherited}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Graphics"], CellMargins->{{4, Inherited}, {Inherited, Inherited}}, CellGroupingRules->"GraphicsGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, ShowCellLabel->False, DefaultFormatType->DefaultOutputFormatType, FormatType->InputForm, CounterIncrements->"Graphics", ImageMargins->{{43, Inherited}, {Inherited, 0}}, StyleMenuListing->None, FontSize->12], Cell[StyleData["Graphics", "Presentation"], ImageMargins->{{62, Inherited}, {Inherited, 0}}], Cell[StyleData["Graphics", "Condensed"], ImageSize->{175, 175}, ImageMargins->{{38, Inherited}, {Inherited, 0}}], Cell[StyleData["Graphics", "Printout"], ImageSize->{250, 250}, ImageMargins->{{30, Inherited}, {Inherited, 0}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["CellLabel"], StyleMenuListing->None, FontFamily->"Helvetica", FontSize->12, FontColor->RGBColor[0, 0, 1]], Cell[StyleData["CellLabel", "Presentation"], FontSize->12], Cell[StyleData["CellLabel", "Condensed"], FontSize->12], Cell[StyleData["CellLabel", "Printout"], FontFamily->"Courier", FontSize->12, FontSlant->"Italic", FontColor->GrayLevel[0]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Styles for Automatic Numbering", "Section"], Cell["\<\ The following styles are useful for numbered equations, figures, etc. They automatically give the cell a FrameLabel containing a reference to a particular counter, and also increment that counter. \ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["NumberedEquation"], CellFrameLabels->{{None, Cell[ TextData[ {"(", CounterBox[ "NumberedEquation"], ")"}]]}, {None, None}}, DefaultFormatType->DefaultInputFormatType, TextAlignment->Center, CounterIncrements->"NumberedEquation", FormatTypeAutoConvert->False, FontSize->12], Cell[StyleData["NumberedEquation", "Presentation"]], Cell[StyleData["NumberedEquation", "Condensed"]], Cell[StyleData["NumberedEquation", "Printout"]] }, Open ]], Cell[CellGroupData[{ Cell[StyleData["NumberedFigure"], CellMargins->{{4, Inherited}, {Inherited, Inherited}}, CellFrameLabels->{{None, None}, {Cell[ TextData[ {"Figure ", CounterBox[ "NumberedFigure"]}]], None}}, CounterIncrements->"NumberedFigure", ImageMargins->{{43, Inherited}, {Inherited, 0}}, FormatTypeAutoConvert->False], Cell[StyleData["NumberedFigure", "Presentation"]], Cell[StyleData["NumberedFigure", "Condensed"]], Cell[StyleData["NumberedFigure", "Printout"]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["NumberedTable"], CellMargins->{{44, Inherited}, {Inherited, Inherited}}, CellFrameLabels->{{None, None}, {Cell[ TextData[ {"Table ", CounterBox[ "NumberedTable"]}]], None}}, TextAlignment->Center, CounterIncrements->"NumberedTable", FormatTypeAutoConvert->False], Cell[StyleData["NumberedTable", "Presentation"]], Cell[StyleData["NumberedTable", "Condensed"]], Cell[StyleData["NumberedTable", "Printout"]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Formulas and Programming", "Section"], Cell[CellGroupData[{ Cell[StyleData["InlineFormula"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, ScriptLevel->1, SingleLetterItalics->True, StyleMenuListing->None, FontSize->12, GridBoxOptions->{ColumnWidths->Automatic}], Cell[StyleData["InlineFormula", "Presentation"], CellMargins->{{24, 10}, {10, 10}}, LineSpacing->{1, 5}], Cell[StyleData["InlineFormula", "Condensed"], CellMargins->{{8, 10}, {6, 6}}, LineSpacing->{1, 1}], Cell[StyleData["InlineFormula", "Printout"], CellMargins->{{0, 0}, {6, 6}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Research Question"], CellDingbat->"\[GraySquare]", CellMargins->{{22, Inherited}, {8, 20}}, CellGroupingRules->"InputGrouping", PageBreakBelow->False, CellFrameLabelMargins->6, LineSpacing->{1, 3}, CounterIncrements->"Text", FontFamily->"Times", FontSize->14, FontWeight->"Bold"], Cell[StyleData["Research Question", "Presentation"], CellDingbat->"\[GraySquare]", CellMargins->{{36, 10}, {11, 32}}, CellGroupingRules->"InputGrouping", LineSpacing->{1, 0}, FontSize->14], Cell[StyleData["Research Question", "Condensed"], CellDingbat->"\[GraySquare]", CellMargins->{{16, Inherited}, {6, 12}}, CellGroupingRules->"InputGrouping", FontSize->14], Cell[StyleData["Research Question", "Printout"], CellDingbat->"\[GraySquare]", CellMargins->{{9, 0}, {7, 22}}, CellGroupingRules->"InputGrouping", FontSize->14] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Listing"], CellMargins->{{63, 10}, {7, 7}}, TextJustification->1, LineSpacing->{1, 3}, CounterIncrements->"Text", FontFamily->"Times", FontSize->12], Cell[StyleData["Listing", "Presentation"], CellMargins->{{24, 10}, {10, 10}}, TextJustification->1, LineSpacing->{1, 5}], Cell[StyleData["Listing", "Condensed"], CellMargins->{{8, 10}, {6, 6}}, TextJustification->1, LineSpacing->{1, 1}], Cell[StyleData["Listing", "Printout"], CellMargins->{{2, 2}, {6, 6}}, TextJustification->1] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DisplayFormula"], ShowCellBracket->False, CellMargins->{{10, Inherited}, {Inherited, Inherited}}, CellHorizontalScrolling->True, TextAlignment->Center, ScriptLevel->0, SingleLetterItalics->True, StyleMenuListing->None, FontSize->18, UnderoverscriptBoxOptions->{LimitsPositioning->True}, GridBoxOptions->{ColumnWidths->Automatic}], Cell[StyleData["DisplayFormula", "Presentation"], TextAlignment->Center, LineSpacing->{1, 5}, FontSize->18], Cell[StyleData["DisplayFormula", "Condensed"], TextAlignment->Center, LineSpacing->{1, 1}, FontSize->18], Cell[StyleData["DisplayFormula", "Printout"], TextAlignment->Center, FontSize->18] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Program"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, StyleMenuListing->None, FontFamily->"Courier"], Cell[StyleData["Program", "Presentation"], CellMargins->{{24, 10}, {10, 10}}, LineSpacing->{1, 5}, FontSize->15], Cell[StyleData["Program", "Condensed"], CellMargins->{{8, 10}, {6, 6}}, LineSpacing->{1, 1}, FontSize->10.5], Cell[StyleData["Program", "Printout"], CellMargins->{{0, 0}, {6, 6}}, FontSize->9.5] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Styles for Headers and Footers", "Section"], Cell[StyleData["Header"], CellMargins->{{0, 0}, {4, 1}}, StyleMenuListing->None, FontSize->10, FontSlant->"Italic"], Cell[StyleData["Footer"], CellMargins->{{0, 0}, {0, 4}}, StyleMenuListing->None, FontSize->9, FontSlant->"Italic"], Cell[StyleData["PageNumber"], CellMargins->{{0, 0}, {4, 1}}, StyleMenuListing->None, FontFamily->"Times", FontSize->10, FontWeight->"Bold"] }, Open ]], Cell[CellGroupData[{ Cell["Palette Styles", "Section"], Cell["\<\ The cells below define styles that define standard ButtonFunctions, for use in palette buttons. \ \>", "Text"], Cell[StyleData["Paste"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, After]}]&)}], Cell[StyleData["Evaluate"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, All], SelectionEvaluate[ FrontEnd`InputNotebook[ ], All]}]&)}], Cell[StyleData["EvaluateCell"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, All], FrontEnd`SelectionMove[ FrontEnd`InputNotebook[ ], All, Cell, 1], FrontEnd`SelectionEvaluateCreateCell[ FrontEnd`InputNotebook[ ], All]}]&)}], Cell[StyleData["CopyEvaluate"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`SelectionCreateCell[ FrontEnd`InputNotebook[ ], All], FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, All], FrontEnd`SelectionEvaluate[ FrontEnd`InputNotebook[ ], All]}]&)}], Cell[StyleData["CopyEvaluateCell"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`SelectionCreateCell[ FrontEnd`InputNotebook[ ], All], FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, All], FrontEnd`SelectionEvaluateCreateCell[ FrontEnd`InputNotebook[ ], All]}]&)}] }, Closed]], Cell[CellGroupData[{ Cell["Hyperlink Styles", "Section"], Cell["\<\ The cells below define styles useful for making hypertext ButtonBoxes. The \"Hyperlink\" style is for links within the same Notebook, or between Notebooks. \ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["Hyperlink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`NotebookLocate[ #2]}]&), Active->True, ButtonNote->ButtonData}], Cell[StyleData["Hyperlink", "Presentation"]], Cell[StyleData["Hyperlink", "Condensed"]], Cell[StyleData["Hyperlink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell["\<\ The following styles are for linking automatically to the on-line help system. \ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["MainBookLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontWeight->"Plain", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "MainBook", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["MainBookLink", "Presentation"]], Cell[StyleData["MainBookLink", "Condensed"]], Cell[StyleData["MainBookLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["AddOnsLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontFamily->"Times", FontWeight->"Plain", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "AddOns", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["AddOnsLink", "Presentation"]], Cell[StyleData["AddOnsLink", "Condensed"]], Cell[StyleData["AddOnLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["RefGuideLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontFamily->"Courier", FontWeight->"Plain", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "RefGuideLink", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["RefGuideLink", "Presentation"]], Cell[StyleData["RefGuideLink", "Condensed"]], Cell[StyleData["RefGuideLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["GettingStartedLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontFamily->"Times", FontWeight->"Plain", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "GettingStarted", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["GettingStartedLink", "Presentation"]], Cell[StyleData["GettingStartedLink", "Condensed"]], Cell[StyleData["GettingStartedLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["OtherInformationLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontFamily->"Times", FontWeight->"Plain", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "OtherInformation", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["OtherInformationLink", "Presentation"]], Cell[StyleData["OtherInformationLink", "Condensed"]], Cell[StyleData["OtherInformationLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Placeholder Styles", "Section"], Cell["\<\ The cells below define styles useful for making placeholder objects in palette templates. \ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["Placeholder"], Editable->False, Selectable->False, StyleBoxAutoDelete->True, Placeholder->True, StyleMenuListing->None], Cell[StyleData["Placeholder", "Presentation"]], Cell[StyleData["Placeholder", "Condensed"]], Cell[StyleData["Placeholder", "Printout"]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["SelectionPlaceholder"], Editable->False, Selectable->False, StyleBoxAutoDelete->True, StyleMenuListing->None, DrawHighlighted->True], Cell[StyleData["SelectionPlaceholder", "Presentation"]], Cell[StyleData["SelectionPlaceholder", "Condensed"]], Cell[StyleData["SelectionPlaceholder", "Printout"]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["FormatType Styles", "Section"], Cell["\<\ The cells below define styles that are mixed in with the styles of most cells. If a cell's FormatType matches the name of one of the styles defined below, then that style is applied between the cell's style and its own options. \ \>", "Text"], Cell[StyleData["CellExpression"], PageWidth->Infinity, CellMargins->{{6, Inherited}, {Inherited, Inherited}}, ShowCellLabel->False, ShowSpecialCharacters->False, AllowInlineCells->False, StyleMenuListing->None, FontFamily->"Courier", FontSize->12, FontColor->GrayLevel[0]], Cell[StyleData["InputForm"], AllowInlineCells->False, StyleMenuListing->None, FontFamily->"Courier"], Cell[StyleData["OutputForm"], PageWidth->Infinity, TextAlignment->Left, LineSpacing->{1, -5}, StyleMenuListing->None, FontFamily->"Courier"], Cell[StyleData["StandardForm"], LineSpacing->{1.25, 0}, StyleMenuListing->None, FontFamily->"Courier"], Cell[StyleData["TraditionalForm"], LineSpacing->{1.25, 0}, SingleLetterItalics->True, TraditionalFunctionNotation->True, DelimiterMatching->None, StyleMenuListing->None], Cell["\<\ The style defined below is mixed in to any cell that is in an inline cell within another. \ \>", "Text"], Cell[StyleData["InlineCell"], TextAlignment->Left, ScriptLevel->1, StyleMenuListing->None], Cell[StyleData["InlineCellEditing"], StyleMenuListing->None, Background->RGBColor[1, 0.749996, 0.8]] }, Closed]] }, Open ]] }] ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 45, 0, 46, "Subtitle"], Cell[1779, 53, 151, 8, 70, "Text"], Cell[1933, 63, 137, 3, 70, "Text"] }, Closed]], Cell[2085, 69, 95, 2, 55, "Title", Evaluatable->False], Cell[CellGroupData[{ Cell[2205, 75, 108, 3, 49, "Subsection", Evaluatable->False], Cell[2316, 80, 132, 3, 70, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[2485, 88, 84, 2, 35, "Section", Evaluatable->False], Cell[2572, 92, 395, 9, 70, "Text", Evaluatable->False], Cell[2970, 103, 74, 2, 70, "Input"], Cell[3047, 107, 530, 12, 70, "Text", Evaluatable->False], Cell[3580, 121, 268, 6, 70, "Text", Evaluatable->False], Cell[3851, 129, 96, 3, 70, "Input"], Cell[3950, 134, 489, 10, 70, "Text", Evaluatable->False], Cell[4442, 146, 99, 2, 70, "Input"], Cell[4544, 150, 279, 6, 70, "Text", Evaluatable->False], Cell[4826, 158, 141, 3, 70, "Input"], Cell[4970, 163, 605, 22, 70, "Text", Evaluatable->False], Cell[5578, 187, 228, 7, 70, "Input"], Cell[CellGroupData[{ Cell[5831, 198, 124, 3, 70, "Subsubsection", Evaluatable->False], Cell[5958, 203, 1337, 37, 70, "SmallText"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[7344, 246, 93, 2, 35, "Section", Evaluatable->False], Cell[7440, 250, 392, 8, 70, "Text", Evaluatable->False], Cell[7835, 260, 562, 17, 70, "Text", Evaluatable->False], Cell[8400, 279, 244, 5, 70, "Input", InitializationCell->True], Cell[8647, 286, 480, 14, 70, "Text"], Cell[9130, 302, 48, 1, 70, "Input"], Cell[9181, 305, 124, 4, 70, "Text"], Cell[9308, 311, 48, 1, 70, "Input"], Cell[9359, 314, 128, 4, 70, "Text", Evaluatable->False], Cell[9490, 320, 1175, 43, 70, "Text", Evaluatable->False], Cell[10668, 365, 46, 1, 70, "Input"], Cell[10717, 368, 1212, 40, 70, "Text", Evaluatable->False], Cell[11932, 410, 155, 6, 70, "Text", Evaluatable->False], Cell[12090, 418, 45, 1, 70, "Input"], Cell[12138, 421, 190, 5, 70, "Text", Evaluatable->False], Cell[12331, 428, 279, 7, 70, "Text", Evaluatable->False], Cell[12613, 437, 53, 1, 70, "Text", Evaluatable->False], Cell[12669, 440, 46, 1, 70, "Input"], Cell[12718, 443, 202, 7, 70, "Text", Evaluatable->False], Cell[12923, 452, 282, 6, 70, "Input", InitializationCell->True], Cell[13208, 460, 37, 0, 70, "Text"], Cell[13248, 462, 48, 1, 70, "Input"], Cell[13299, 465, 278, 7, 70, "Text", Evaluatable->False], Cell[13580, 474, 56, 1, 70, "Input"], Cell[13639, 477, 56, 1, 70, "Input"], Cell[13698, 480, 848, 25, 70, "Text"], Cell[14549, 507, 280, 7, 70, "Text"], Cell[14832, 516, 57, 0, 70, "Text"], Cell[CellGroupData[{ Cell[14914, 520, 83, 2, 70, "Subsubsection", Evaluatable->False], Cell[15000, 524, 389, 11, 70, "Text", Evaluatable->False] }, Closed]], Cell[15404, 538, 306, 5, 70, "Text"], Cell[15713, 545, 271, 5, 70, "Text"], Cell[15987, 552, 177, 6, 70, "Text"], Cell[16167, 560, 178, 5, 70, "Text"], Cell[16348, 567, 90, 3, 70, "Text"], Cell[16441, 572, 435, 15, 70, "Listing"], Cell[16879, 589, 306, 9, 70, "Listing"], Cell[17188, 600, 99, 3, 70, "Listing"], Cell[17290, 605, 242, 8, 70, "Text"], Cell[17535, 615, 41, 1, 70, "Input"], Cell[17579, 618, 131, 3, 70, "Text"], Cell[17713, 623, 41, 1, 70, "Input"], Cell[17757, 626, 267, 7, 70, "Text"], Cell[18027, 635, 41, 1, 70, "Input"], Cell[18071, 638, 113, 3, 70, "Text"], Cell[18187, 643, 41, 1, 70, "Input"], Cell[18231, 646, 117, 3, 70, "Text"], Cell[18351, 651, 40, 1, 70, "Input"], Cell[18394, 654, 215, 6, 70, "Text"], Cell[18612, 662, 40, 1, 70, "Input"], Cell[18655, 665, 46, 0, 70, "Text"], Cell[18704, 667, 41, 1, 70, "Input"], Cell[18748, 670, 375, 8, 70, "Text"], Cell[19126, 680, 46, 1, 70, "Input"], Cell[19175, 683, 208, 5, 70, "Text"], Cell[19386, 690, 198, 7, 70, "Text"], Cell[19587, 699, 709, 11, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[20333, 715, 89, 2, 35, "Section", Evaluatable->False], Cell[20425, 719, 100, 2, 70, "Text", Evaluatable->False], Cell[20528, 723, 141, 3, 70, "Input"], Cell[20672, 728, 232, 10, 70, "Text", Evaluatable->False], Cell[20907, 740, 596, 24, 70, "Text", Evaluatable->False], Cell[21506, 766, 141, 4, 70, "Input"], Cell[21650, 772, 89, 2, 70, "Text", Evaluatable->False], Cell[21742, 776, 344, 14, 70, "Text"], Cell[22089, 792, 20, 0, 70, "Text"], Cell[22112, 794, 297, 13, 70, "Text"], Cell[22412, 809, 744, 31, 70, "Text", Evaluatable->False], Cell[23159, 842, 467, 20, 70, "Text", Evaluatable->False], Cell[23629, 864, 269, 10, 70, "Text", Evaluatable->False], Cell[23901, 876, 454, 23, 70, "Text", Evaluatable->False], Cell[24358, 901, 179, 7, 70, "Text", Evaluatable->False], Cell[24540, 910, 454, 23, 70, "Text", Evaluatable->False], Cell[24997, 935, 365, 13, 70, "Text", Evaluatable->False], Cell[25365, 950, 235, 10, 70, "Text", Evaluatable->False], Cell[25603, 962, 133, 3, 70, "Text", Evaluatable->False], Cell[25739, 967, 165, 5, 70, "Text"], Cell[25907, 974, 68, 2, 70, "Text", Evaluatable->False], Cell[25978, 978, 178, 5, 70, "Text"], Cell[26159, 985, 671, 21, 70, "Text", Evaluatable->False], Cell[26833, 1008, 215, 10, 70, "Text", Evaluatable->False], Cell[27051, 1020, 245, 6, 70, "Text"], Cell[27299, 1028, 325, 11, 70, "Text", Evaluatable->False], Cell[27627, 1041, 137, 3, 70, "Input"], Cell[27767, 1046, 1552, 65, 70, "Text", Evaluatable->False], Cell[29322, 1113, 342, 17, 70, "Text", Evaluatable->False], Cell[29667, 1132, 267, 7, 70, "Text", Evaluatable->False], Cell[29937, 1141, 59, 1, 70, "Input"], Cell[29999, 1144, 75, 2, 70, "Text", Evaluatable->False], Cell[30077, 1148, 320, 8, 70, "Text", Evaluatable->False], Cell[30400, 1158, 70, 1, 70, "Input"], Cell[30473, 1161, 173, 5, 70, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[30683, 1171, 84, 2, 35, "Section", Evaluatable->False], Cell[30770, 1175, 315, 9, 70, "Text", Evaluatable->False], Cell[31088, 1186, 81, 2, 70, "Input"], Cell[31172, 1190, 193, 5, 70, "Text", Evaluatable->False], Cell[31368, 1197, 405, 8, 70, "Text", Evaluatable->False], Cell[31776, 1207, 409, 16, 70, "Text", Evaluatable->False], Cell[32188, 1225, 71, 2, 70, "Input"], Cell[32262, 1229, 275, 13, 70, "Text", Evaluatable->False], Cell[32540, 1244, 79, 2, 70, "Input"], Cell[CellGroupData[{ Cell[32644, 1250, 92, 2, 70, "Subsubsection", Evaluatable->False], Cell[32739, 1254, 736, 29, 70, "SmallText", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[33512, 1288, 92, 2, 70, "Subsubsection", Evaluatable->False], Cell[33607, 1292, 972, 33, 70, "SmallText", Evaluatable->False] }, Closed]], Cell[34594, 1328, 726, 32, 70, "Text", Evaluatable->False], Cell[35323, 1362, 113, 3, 70, "Input"], Cell[CellGroupData[{ Cell[35461, 1369, 92, 2, 70, "Subsubsection", Evaluatable->False], Cell[35556, 1373, 1204, 49, 70, "SmallText", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[36797, 1427, 92, 2, 70, "Subsubsection", Evaluatable->False], Cell[36892, 1431, 1368, 47, 70, "SmallText", Evaluatable->False] }, Closed]], Cell[38275, 1481, 164, 5, 70, "Text", Evaluatable->False], Cell[38442, 1488, 173, 5, 70, "Text"], Cell[38618, 1495, 846, 31, 70, "Text", Evaluatable->False], Cell[CellGroupData[{ Cell[39489, 1530, 92, 2, 70, "Subsubsection", Evaluatable->False], Cell[39584, 1534, 855, 34, 70, "SmallText"] }, Closed]], Cell[40454, 1571, 559, 12, 70, "Text"], Cell[41016, 1585, 692, 18, 70, "Text", Evaluatable->False], Cell[CellGroupData[{ Cell[41733, 1607, 83, 2, 70, "Subsubsection", Evaluatable->False], Cell[41819, 1611, 365, 12, 70, "Text", Evaluatable->False] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[42233, 1629, 89, 2, 35, "Section", Evaluatable->False], Cell[42325, 1633, 203, 5, 70, "Text", Evaluatable->False], Cell[42531, 1640, 469, 19, 70, "Text", Evaluatable->False], Cell[43003, 1661, 447, 23, 70, "Text", Evaluatable->False], Cell[43453, 1686, 909, 22, 70, "Text", Evaluatable->False], Cell[44365, 1710, 1068, 42, 70, "Text", Evaluatable->False], Cell[45436, 1754, 64, 1, 70, "Input"], Cell[45503, 1757, 115, 2, 70, "Text", Evaluatable->False], Cell[45621, 1761, 69, 2, 70, "Input"], Cell[45693, 1765, 345, 16, 70, "Text", Evaluatable->False], Cell[46041, 1783, 184, 8, 70, "Text", Evaluatable->False], Cell[46228, 1793, 850, 30, 70, "Text", Evaluatable->False], Cell[47081, 1825, 167, 7, 70, "Text", Evaluatable->False], Cell[47251, 1834, 87, 2, 70, "Text", Evaluatable->False], Cell[47341, 1838, 85, 2, 70, "Input"], Cell[47429, 1842, 266, 11, 70, "Text", Evaluatable->False], Cell[47698, 1855, 572, 17, 70, "Text", Evaluatable->False], Cell[48273, 1874, 73, 2, 70, "Input"], Cell[48349, 1878, 178, 6, 70, "Text", Evaluatable->False], Cell[48530, 1886, 211, 5, 70, "Input", InitializationCell->True], Cell[48744, 1893, 309, 11, 70, "Text", Evaluatable->False], Cell[49056, 1906, 81, 2, 70, "Input"], Cell[CellGroupData[{ Cell[49162, 1912, 83, 2, 70, "Subsubsection", Evaluatable->False], Cell[49248, 1916, 181, 6, 70, "Text", Evaluatable->False] }, Closed]] }, Closed]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)