Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Lab 2 - Triangle Triples Math 185 September 7, 2012 The preliminary report for this lab is due MONDAY SEPTEMBER 17 by 9 am. In this lab, we explore a topic that should be very familiar to you. The Pythagorean Theorem is probably the most widely recognized theorem (what is a theorem?) Recall that the Pythagorean Theorem tells us that the legs (a and b) and hypotenuse (c) of a right triangle are related by the equation a2 + b 2 = c 2 . This equation always has a solution when we work with real numbers, since every positive real number has a square root that is a real number. The story is di↵erent if the side lengths are required to be whole numbers; that is, positive integers. You are probably aware of the famous triples: (3, 4, 5) and (5, 12, 13) since 3 2 + 4 2 = 52 and 52 + 122 = 132 . An obvious question is if there are more such triples? Are there infinitely many? (We can cheat a little on this last question. What happens if we scale the three sides of (3, 4, 5) triangle by a whole number? Do you get another valid triple?) These and many questions can be asked and explored. In this lab, we provide several such questions, but I look forward to you asking some questions to explore yourself. Working on Labs • On this, and on future labs, you will be completing experiments using the computer. You should record your work in your Course Log/Notebook. Keep track of what you try, noting what works and what doesn’t work. • The Lab will consist of questions and exercises. You will write up your answers to these questions and exercises, IN FULL SENTENCES, filling in any details that you need to. So, the write up should consist of paragraphs with mathematical supporting evidence, such as tables of your output and your explanation of your understanding of the patterns arising from the output. Your lab should tell a mathematical story, much like this lab sheet is doing, not a list of answers. Look at the example of a good write-up that we put on the website. 1 • Remember, all of your conclusions need to be supported by evidence, including reasoning and/or data. • Your Lab write-ups are to be written in LATEX. Make sure that each person writes his/her own lab report; no group reports. Also, make sure that your name appears somewhere on the lab write-up. Using Mathematica Since we are interested in collecting data about which whole numbers give us triples (a, b, c) that satisfy a2 + b2 = c2 , we would like a way to do this that reduces the amount of hand-cranking. So, how do we get technology to help us? Well, if we choose values for a and b, then we need to check that a2 + b2 yields another perfect square. How do we check if a number is a perfect square? We could factor it and check the factorization. Alternatively, we could compute the square root of a2 + b2 and see if it is an integer. Certainly, Mathematica can compute square roots, but more importantly, Mathematica can also check if a number is an integer or not. Enter the following into Mathematica, press ENTER, and see what happens. a = 3; b = 4; If[Element[Sqrt[a^2 + b^2], Integers], Print[a, " ", b, " ", Sqrt[a^2 + b^2]]] Now, change the a to 2 and change b to 6 and re-run the code. What happens this time? Why? In your lab write-up, explain what this code is doing for you. If you want to generate large lists of triples, the following program does so. You could write a di↵erent program, and I encourage you to think about how you might do so. But, for now, play around with this code that you should enter into Mathematica. Do[If[Element[Sqrt[a^2 + b^2], Integers], Print[a, " ", b, " ", Sqrt[a^2 + b^2]]], {a, 1, 100}, {b, 1, 100}] In your lab write-up, explain what this code is doing. Be sure to understand what each command is doing and how they fit together to produce what we are interested in studying. To further play, figure out what the following code does. Do[c = Sqrt[a^2 + b^2]; If[c \[Element] Integers && GCD[a, b, c] == 1 && Ordering[{a, b, c}] == {1, 2, 3} && OddQ[a], Print[a, " ", b, " ", c]], {a, 1, 100}, {b, 1, 100}] Brief Aside - Making and Understanding Conjectures Now, it is time to play with data and make conjectures (well-educated guesses based upon your experimenting.) By understanding and proving conjectures to be true, they become theorems. An example (not necessarily related to this lab) of a conjecture would be 2 Conjecture 1 The sum of two even numbers is also even. We can explain this conjecture, which we are sure is correct from thousands of examples done in our life, by some simple logic. An even number is any that is divisible by 2. Suppose that x and y are both even numbers. Then, by the definition of even numbers, x = 2 ⇥ (an integer) and y = 2 ⇥ (another integer). Then, x+y = 2⇥(an integer)+2⇥(another integer) = 2⇥((an integer)+(another integer)). Since the sum (an integer) + (another integer) is also another integer, we have shown that the sum of two even numbers is also even. Now, we can call Conjecture 1 a theorem. Developing a sense of how conjectures arise is what this course is all about. So, now let’s dive in and play with triangles and see what wonderful conjectures we can think up. Exploring Triangles Numerically • Produce a long (hundreds, perhaps?) list of triangle triples using the code above. What is the biggest c value that you can find for a triple? • Take your time and examine your output. Are there any patterns? Anything that will let you organize the data in a better fashion than the raw output you get? • Notice that (3, 4, 5) and (6, 8, 10) are two triples that are, in some sense, very closely related. How? Can you find another triple that is related to (3, 4, 5) and to (6, 8, 10)? Can you use this to show that there are infinitely many right triangle triples? Write this down as a conjecture and see if you can convince the reader that it is true logically. • So, you can produce many triples from the basic triple (3, 4, 5). We can call such a triple like (3, 4, 5) a basic triple, one in which a, b, and c share no common factors. Write down as many basic triples as you can. Do you notice that each of your basic triples has 2 odds and 1 even in the triple? Does this make sense? In other words, if you have one odd number in the triple, would you expect one other odd and an even? Explain. • If you write down a basic triple in increasing order, such as (3, 4, 5) or (8, 15, 17), then the lowest number can be odd or even. Write down all of the basic triples (in increasing order) for which an odd number is the lowest number. Do you notice a pattern that will allow you to write a formula for all such triples? Explore and see what find. Think about relationships between a, b, and c. Anything that you discover is a valid avenue to explore. • Write down all basic triples that have multiples of 4 in the triple, such as (4, 3, 5), (8, 15, 17) and (12, 35, 37). If you continue this list, can you find a way to express all such basic triples? 3 • Notice that the basic triples (33, 56, 65) and (16, 63, 65) share the same hypotenuse length. Investigate which pairs of triples have this property of sharing the same hypotenuse length. Can you find a three triples that share the same hypotenuse length? Is this possible? Can you go further? • Several of the basic triples have the property that two of the numbers di↵er by 2. For example, (3, 4, 5) and (15, 8, 17) have this property. Can you find others that have this property? Are there lots (infinitely many?) of these basic triples with two numbers di↵ering by two? Try to explain (find a formula?) for all such basic triples. • Look for and explain some other properties you can find. Be creative and diligent. You have the freedom to explore; use it! NOTE: Though the items above are bulleted, your write-up of your investigations should not be bulleted (unless you need to make a list for some reason.) Think of each bullet above as an investigation point for which you will write paragraphs that explain what YOU find. There are no pre-determined results that I am looking for; I just want you to explore, find something interesting and write about it. Share ideas with me and lab mates. Remember to submit your Lab report on Sakai by 9 am on Monday September 17. 4