2048 and algebra (Part 3)

In this series of posts, I consider how algebra can be used to answer a question about the 2048 game: From looking at a screenshot of the final board, can I figure out how many moves were needed to reach the final board? Can I calculate how many new 2-tiles and 4-tiles were introduced to the board throughout the course of this game?

To study this question, here’s a graphic showing the first nine moves in a typical game of 2048. I’ve included black circles to highlight the new 2-tiles and 4-tiles that are placed with each successive move, and I’ve added dark red ovals to indicate when two tiles are about to be combined in the next move.

 

2048-3

In yesterday’s post, I raised one key insight about this game: we can calculate how many points were added for making each tile on the final board.

In today’s post, I raise a second insight. The final board has three 2-tiles, one 4-tile, and one 16-tile. So the sum of the tiles is 6 + 4 + 16, or 26. Also, during the course of the game, nine 2-tiles and two 4-tiles were introduced by the game. The sum of these tiles is 18 + 8, which is also 26. In other words, the sum of the tiles on the final board must equal the sum of the tiles that are introduced during the successive moves of the game.

With these two insights, we will (in tomorrow’s post) set up a system of two equations in two unknowns that will allow us to solve for the number of 2-tiles and 4-tiles that were introduced during the game using only the information on the final board.

 

2048 and algebra (Part 2)

In this series of posts, I consider how algebra can be used to answer a question about the 2048 game: From looking at a screenshot of the final board, can I figure out how many moves were needed to reach the final board? Can I calculate how many new 2-tiles and 4-tiles were introduced to the board throughout the course of this game?

To study this question, here’s a graphic showing the first nine moves in a typical game of 2048. I’ve included black circles to highlight the new 2-tiles and 4-tiles that are placed with each successive move, and I’ve added dark red ovals to indicate when two tiles are about to be combined in the next move.

2048-3Clearly, for these 9 moves, the computer introduced nine 2-tiles and two 4-tiles (including the two tiles that began the game in the initial position.) So here’s the question: is there a way, from looking only at the final board (with three 2-tiles, one 4-tile, and one 16-tile) and without looking at any of the prior history of the game, to calculate the number of 2-tiles and 4-tiles that were introduced?

In this post, I introduce the first of two insights that will allow us to answer these questions using algebra. (The second insight will be discussed in tomorrow’s post.) To study this question, let’s begin with the final board (with a score of 44 points) and look at how the tiles on the final board were formed.

2048-4Clearly, the three 2-tiles do not contribute anything to the final score. Net contribution: 0 points.

The one 4-tile on the final board (marked with a green circle) hypothetically could have either been a new tile that was introduced by the computer or else formed by combining two 2-tiles. In this case, we see that this particular 4-tile was indeed formed by adding two 2-tiles on Move 8. Net contribution: 4 points.

Handling the one 16-tile on the final board is a little more interesting. To begin, this 16-tile was formed from adding two 8-tiles on Move 8. Net contribution: 16 points.

Each of these 8-tiles were formed by adding two 4-tiles (one on Step 4, the other on Step 7). Net contribution: 2 \times 8, or another 16 points.

Two of the four tiles were formed by adding two 2-tiles (on steps 3 and 6). The other two four tiles were introduced by the computer (on steps 0 and 3) and were moved around the board prior to combining with another 4-tile. Net contribution: 2 \times 4, or 8 points.

So the total score is 4 points from making 4-tile on the final board and 16+16+8 = 40 points from making the 16-tile on the final board, for a total of 44 points.

This way of thinking about the game… how many points were added for making each tile on the final board… is one of two insights necessary to use algebra to solve for the prior history of the game. After discussing the second insight tomorrow, we’ll be ready to discuss the algebra of 2048.

 

2048 and algebra (Part 1)

In July and early August of this year, I finally defeated the wildly addicting 2048 game. That’s not to say that I reached the 2048-tile. No, I really defeated the game by reaching the event horizon that literally cannot be surpassed. (This is the usual way I overcome video-game addiction… play the game so much that I get sick of it.)

2048-0

Over the four weeks or so that it took me to reach the event horizon, I thought of some interesting questions: From looking at only the above screenshot, can I figure out how many moves were needed to reach the final board? Can I calculate how many new 2-tiles and 4-tiles were introduced to the board throughout the course of this game?

It turns out that these questions can be solved with simple algebra. Indeed, if posed in the correct fashion, these questions can be answered using only elementary-school arithmetic. I will discuss the answers to these questions in this series of posts.

It should be noted that the above game board was accomplished in practice mode, and I needed perhaps a couple thousand undos to offset the bad luck of a tile randomly appearing in an unneeded place. I estimate the odds of a skilled player reaching the event horizon in game mode to be about 10^{5000} to one. Later in this series, I’ll give my rationale for this estimate.

For what it’s worth, my personal best in game mode was reaching the 8192-tile. I’m convinced that, even with the random placements of the new 2-tiles and 4-tiles, the skilled player can reach the 2048-tile nearly every time and should reach the 4096-tile most of the time.  However, reaching the 8192-tile requires more luck than skill, and reaching the 16384-tile requires an extraordinary amount of luck.

Engaging students: Graphing an ellipse

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Samantha Smith. Her topic, from Precalculus: graphing an ellipse.

green line

How has this topic appeared in pop culture?

Football is America’s favorite sport. There is practically a holiday for it: Super Bowl Sunday. I do not think students realize how much math is actually involved in the game of football, from statistics, to yards, the stadium and even the football itself. The video link below explores the shape of the football and of what importance the shape is. As you can see in the picture below, a 2D look of the football shows us that it is in the shape of an ellipse.

 

The video further explains how the 3D shape (Prolate Spheroid) spins in the air and is aerodynamic. Also, since it is not spherical, it is very unpredictable when it hits the ground. The football can easily change directions at a moments notice. This video is a really cool introduction to graphing an ellipse; it shows what the shape does in the real world. Students could even figure out a graph to represent a football. Overall, this is just a way to engage students in something that they are interested in.

football

https://www.nbclearn.com/nfl/cuecard/50824 (Geometric Shapes –Spheres, Ellipses, & Prolate Speroids)

 

green line

D. History: What interesting things can you say about the people who contributed to the discovery and/or development of this topic?

Halley’s Comet has been observed since at least 240 B.C. It could be labeled as the most well-known comet. The comet is named after one of Isaac Newton’ friends, Edmond Halley. Halley worked closely with Newton and used Newton’s laws to calculate how gravitational fields effected comets. Up until this point in history, it was believed that comets traveled in a straight path, passing the Earth only once. Halley discovered that a comet observed in 1682 followed the same path as a comet observed in 1607 and 1531. He predicted the comet would return in 76 years, and it did. Halley’s Comet was last seen in 1986 so, according to Halley’s calculations, it will reappear in 2061.
Halley’s Comet has an elliptical orbit around the sun. It gets as close to the sun as the Earth and as far away from the sun as Pluto. This is an example of how ellipses appear in nature. We could also look at the elliptical orbits of the different planets around the sun. Students have grown up hearing about Newton’s Laws, but this is an actual event that supported and developed those laws in relation to ellipses.

What is Halley’s Comet?

halley

 

green line

How has this topic appeared in high culture?

whisperinggallery

Through my research on ellipses, the coolest application I found is Statuary Hall (the Whispering Gallery) in our nation’s capital. The Hall was constructed in the shape of an ellipse. It is said that if you stand at one focal point of the ellipse, you can hear someone whispering across the room at the other focal point because of the acoustical properties of the elliptical shape. The YouTube video below illustrates this phenomena. The gallery used to be a meeting place of the House of Representatives. According to legend, it was John Quincy Adams that discovered the room’s sound properties. He placed his desk at a focus so he could easily hear conversations across the room.

The first link below is a problem students can work out after transitioning from the story of the hall. Given the dimensions of the room, students find the equation of the ellipse that models the room, the foci of the ellipse, and the area of the ellipse. This one topic can cover multiple applications of the elliptical form of Statuary Hall.

Click to access PreAP-PreCal-Log-6.3.pdf

http://www.pleacher.com/mp/mlessons/calculus/appellip.html

Engaging students: Graphing a hyperbola

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Rebekah Bennett. Her topic, from Precalculus: graphing a hyperbola.

green line

Hyperbolas are one of the hardest things to find within the real world. Relating to students, the hyperbola is popularly known as the Hurley symbol; A widely known surf symbol that is now branded on clothes and surf boards. It is also used widely in designs to create patterns on large carpets or flooring. They can also be used when building houses to make sure that a curve on the exterior or interior of the house is mirrored exactly how the buyer wants. Hyperbolas can be found when building graphics for games such as the game roller coaster tycoon. This is a game where several different graphics must be formed so that any type of roller coaster can be created. Also, when playing the wii or xbox Kinect, hyperbolas are used within the design of the system. Since both game systems are based on movement and there are several different types of ways someone can move, the system must have these resources available so that it can read what the person in doing. Hyperbolas are commonly found everywhere with some type of design.

 

green line

To explore this topic, I would first show the students this video of the roller coaster “Fire and Ice” which is in Orlando, Florida at Universal Studios. This roller coaster was created so that when the two roller coasters go around a loop at the same time, they will never hit, making for a fun, adventurous time. This is what a hyperbola simply is; every point lies within the same ratio from focus to directrix. During the video point out the hyperbolic part of the roller coaster which is shown at the 49-51 second mark.

 

 

Now after watching the video, the students would be given about 8 minutes to explore by themselves or with a partner, how to create their own hyperbola. The student can use any resources he/she would like. Once the students have had enough time to explore, the teacher would then have the student watch an instructional video from Kahn Academy.

 

 

The video is very useful in teaching students how to graph a hyperbola because the instructor goes through step by step carefully explaining what each part means and why each part is placed where it is in the function. The video is engaging to the students since they don’t have to listen to their teacher say it a million times and then reinforce it. This is also helpful for the teacher because the student hears it from one source and then it is reinforced by the teacher, giving the teacher a second hand because it’s now coming from two sources not just one.

 

After the video, the students can now split up into groups of at least 3 and create their own “Fire and Ice” roller coaster from scratch. They will have the information from the video to help them know how to create the function and may also ask questions. The student may create their hyperbola roller coaster anyway they would like, using any directrix as well. But keep in mind that you would probably want to tell them it needs to be somewhat realistic or else you could get some crazy ideas. Once all the groups are finished, they will present their roller coaster to the class and be graded by their peers for one grade and then graded by the teacher for participation and correctness.

 

green lineFrom previous math courses, the student should already know the terms slope and vertex. The student should’ve already learned how to graph a parabola. Everything that a student uses to graph a parabola is used to graph a hyperbola but yet with more information. Starting from the bottom, a parabola is used because all a hyperbola technically is, is the graph show a parabola and its mirrored image at the same time. From here the student learns about the directrix, which is the axis of symmetry that the parabola follows. The student will now be able to learn about asymptotes which are basically what a directrix is in a hyperbola function. This opens the door to several graphs of limits that the student will learn throughout calculus and higher math classes.

 

Engaging students: Using right-triangle trigonometry

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Shama Surani. Her topic, from Precalculus: using right-triangle trigonometry.

green line

How could you as a teacher create an activity or project that involves your topic?

bridge

A project that Dorathy Scrudder, Sam Smith, and I did that involves right-triangle trigonometry in our PBI class last week, was to have the students to build bridges. Our driving question was “How can we redesign the bridge connecting I-35 and 635?” The students knew that the hypotenuse would be 34 feet, because there were two lanes, twelve feet each, and a shoulder of ten feet that we provided on a worksheet. As a group, they needed to decide on three to four angles between 10-45 degrees, and calculate the sine and cosine of the angle they chose. One particular group used the angle measures of 10°, 20°, 30°, and 40°. They all calculated the sine of their angles to find the height of the triangle, and used cosine to find the width of their triangle by using 34 as their hypotenuse. The picture above is by Sam Smith, and it illustrates the triangles that we wanted the students to calculate.

 

The students were instructed to make a scale model of a bridge so they were told that 1 feet = 0.5 centimeters. Hence, the students had to divide all their calculations by two. Then, the students had to check their measurements of their group members, and were provided materials such as cardstock, scissors, pipe cleaners, tape, rulers, and protractors in order to construct their bridges.  They had to use a ruler to measure out what they found for sine and cosine on the cardstock, and make sure when they connected the line to make the hypotenuse that the hypotenuse had a length of 17 centimeters. After they drew their triangles, they had to use a protractor to verify that the angle they chose is what one of the angles were in the triangle. When our students presented, they were able to communicate what sine and cosine represented, and grasped the concepts.

Below are pictures of the triangles and bridges that one of our groups of students constructed. Overall, the students enjoyed this project, and with some tweaks, I believe this will be an engaging project for right triangle trigonometry.

studentbridge3 studentbridge2 studentbridge1

green line

How does this topic extend what your students should have learned in previous courses?

 

In previous classes, such in geometry, students should have learned about similar and congruent triangles in addition to triangle congruence such as side-side-side and side-angle-side. They should also have learned if they have a right angle triangle, and they are given two sides, they can find the other side by using the Pythagorean Theorem. The students should also have been exposed to special right triangles such as the 45°-45°-90° triangles and 30°-60°-90° triangles and the relationships to the sides. Right triangle trigonometry extends the ideas of these previous classes. Students know that there must be a 45°-45°-90° triangle has side lengths of 1, 1, and \sqrt{2} which the lengths of 1 subtending the 45° angles. They also are aware that a 30°-60°-90° produces side lengths of 1, \sqrt{3} , and 2, with the side length of 1 subtending the 30°, the length of \sqrt{3} subtending the angle of 60°, and the length of 2 subtending the right angle. So, what happens when there is a right angle triangle, but the other two angles are not 45 degrees or 30 and 60 degrees? This is where right triangle trigonometry comes into play. Students will now be able to calculate the sine, cosine, and tangent and its reciprocal functions for those triangles that are right. Later, this topic will be extended to the unit circle and graphing the trigonometric functions as well as their reciprocal functions and inverse functions.

 

 

 

green line

What are the contributions of various cultures to this topic?

 

Below are brief descriptions of various cultures that personally interested me.

 

Early Trigonometry

 

The Babylonians and Egyptians studied the sides of triangles other than angle measure since the concept of angle measure was not yet discovered. The Babylonian astronomers had detailed records on the rising and setting of stars, the motion of planets, and the solar and lunar eclipses.   On the other hand, Egyptians used a primitive form of trigonometry in order to build the pyramids.

 

Greek Mathematics

 

Hipparchus of Nicaea, now known as the father of Trigonometry, compiled the first trigonometric table. He was the first one to formulate the corresponding values of arc and chord for a series of angles. Claudius Ptolemy wrote Almagest, which expanded on the ideas of Hipparchus’ ideas of chords in a circle. The Almagest is about astronomy, and astronomy relies heavily on trigonometry.

 

 

 

 

Indian Mathematics

 

Influential works called Siddhantas from the 4th-5th centry, first defined sine as the modern relationship between half an angle and half a chord. It also defined cosine, versine (which is 1 – cosine), and inverse sine. Aryabhata, an Indian astronomer and mathematician, expanded on the ideas of Siddhantas in another important work known as Aryabhatiya. Both of these works contain the earliest surviving tables of sine and versine values from 0 to 90 degrees, accurate to 4 decimal places. Interestingly enough, the words jya was for sine and kojya for cosine. It is now known as sine and cosine due to a mistranslation.

 

Islamic Mathematics

 

Muhammad ibn Mūsā al-Khwārizmī had produced accurate sine and cosine tables in the 9th century AD. Habash al-Hasib al-Marwazi was the first to produce the table of cotangents in 830 AD. Similarly, Muhammad ibn Jābir al-Harrānī al-Battānī had discovered the reciprocal functions of secant and cosecant. He also produced the first table of cosecants.

 

Muslim mathematicians were using all six trigonometric functions by the 10th century.  In fact, they developed the method of triangulation which helped out with geography and surveying.

 

Chinese Mathematics

 

In China, early forms of trigonometry were not as widely appreciated as it was with the Greeks, Indians, and Muslims. However, Chinese mathematicians needed spherical geometry for calendrical science and astronomical calculations. Guo Shoujing improved the calendar system and Chinese astronomy by using spherical trigonometry in his calculations.

 

European Mathematics

 

Regiomontanus treated trigonometry as a distinct mathematical discipline. A student of Copernicus, Georg Joachim Rheticus, was the first one to define all six trigonometric functions in terms of right triangles other than circles in Opus palatinum de triangulis. Valentin Otho finished his work in 1596.

 

http://en.wikipedia.org/wiki/History_of_trigonometry

 

Engaging students: Finding domain and range

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Michelle Nguyen. Her topic, from Precalculus: finding domain and range.

green line

What interesting word problems using this topic can your students do now?

Problem: Joe has an afterschool job at the local sporting goods store. He makes $6.50 an hour. He never works more than 20 hours in a week. The equation s(h)=6.5h can be used to model this situation, where h represents the number of hours Joe works in a week . What is the appropritate domain and range for this problem?

Students will be able to state the domain has to be from 0 to 20 because Joe never works over 20 hours and he can not work negative hours. With the range, the students would have to plug in 20 into the equation and get 130. The range will not exceed 130 because the maximum hours Joe will work is 20 hours. The students will know that Joe cannot be able to earn negative money either. Because of this, students will be able to identify that the range of this problem is from 0 to 130.

https://secure.lcisd.org/schools/HighSchools/FosterHighSchool/Faculty/Math/KarenKlobedans/Algebra2/images/Notes%209-2%20Domains%20and%20Ranges%20from%20Word%20Problems.pdf

 

green line

How could you as a teacher create an activity or project that involves your topic?

After learning about the definition of domain and range, I would use a matching activity to assess the students’ knowledge about the topic. For example, I would have different graphs on different cards and their domain and range on another card. The students would shuffle the cards and then find their matching pairs. By doing this, the students would have to discuss with their group or partner about why their domain and range card matches with their graph card. Students will be able to identify the range and domain that would make sense to them and be able to back up their conclusion with what they know about domain and range.

 

green line

How does this topic extend what your students should have learned in previous courses?

Finding the domain and range can be an extension of learning functions. Students have been exposed to functions and their graphs already before this topic is introduced. With the knowledge of functions, students are able to find the domain and range with a graph given. Since they are able to do that, students have prior knowledge to the meaning of x-axis and y-axis. Domain and range is just another word for x and y axis. The students have already been exposed to graphs of different functions and the students have learned how to make their own graph if only an equation is given. Students will most likely make a table with coordinates to graph their graph. With this knowledge, they are able to use it to find the domain and range of a function.

Engaging students: Mathematical induction

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Michael Dixon. His topic, from Precalculus: mathematical induction.

green line

How can this topic be used in your studentsfuture courses in mathematics or science?

 

The first time student are introduced to mathematical proofs is probably in high school geometry class, proving theorems using the axiomatic method. They work to prove things about Euclidean geometry with step by step deductive reasoning, as did Euclid himself in the Elements. They prove things about concrete objects that they can see and draw on paper, such as circles, angles, lines, and triangles. But then they move on to Algebra II where they are taught more abstract ways of dealing with numbers and expressions. Is there any way to prove things about numbers themselves? It’s not as easy to visualize, that’s for sure. What is a number? Is it something I can see and feel; is it the shape we write on the page? Or is it something beyond that? This aspect is one of the challenges that algebra students face as they are exposed to more and more mathematics. Mathematical Induction is one way to prove things about numbers using solid deductive reasoning that cannot be refuted. And not just about a few numbers; high school students would be more accepting of that. Mathematical induction is usually used to prove something about ALL of the natural numbers, starting from one and going on out past infinity. Induction can be used to prove what students might intuitively think about the natural numbers, such as that there are an infinite number of primes, or it can be used to prove less obvious things about numbers, such as 1 + 3 + 5 + 7 + …+ n = n2. We can prove these and more without having to compute billions and billions of cases. In just a few lines of mathematical logic, we can prove that something is true for every natural integer. This is more than just telling the students something and them accepting it, this technique PROVES that some statements are always true for any number we want to choose, no matter how large it is. That’s some powerful stuff.

 

green line

How was this topic adopted by the mathematical community.

 

Mathematical induction has been around for thousands of years. While not in the same form as we see it today, induction can be seen all the way back to Euclid’s proof that there are an infinite number of primes, or in the writings of Aristotle. They used this logic to prove a lot of things, but it was not in the formal way of proving something about n and n + 1. This formal notation did not show up until around 1575, when Maurolycus that 1 + 3 + 5 + 7 + …+ n = n2, though he did not prove using n and n + 1, yet. Several mathematicians began using this formal method soon after, such as Pascal and , though no one had a name for it. Bernoulli then was one of the first to begin using the method of arguing from n to n + 1. Since then, mathematicians have been heavily using this method to prove countless things about the natural numbers. And eventually, around the 20th century the name itself, mathematical induction, finally became the standard term for the method starting over two thousand years ago.

 

 

 

green lineHow can technology be used to effectively engage students with this topic?

 

These videos cover mathematical induction in a way I hadn’t seen before, and cleared up a misconception that I had. I had always thought (because of the name) that mathematical induction was not the same kind of reasoning that is used in other axiomatic proofs. However, mathematical induction happens to actually be deductive reasoning, rather than inductive reasoning. The only similarity is that both mathematical induction and inductive reasoning deal with occurring patterns. The first video is more the engage part, while the second one goes a lithe further into the content. For the engage, showing the video at the beginning of the class is probably better, while the second might be given to the students as homework to watch on their own.

 

Resources

http://www.onlinemathlearning.com/mathematical-induction.html

http://pballew.blogspot.com/2009/09/mathematical-induction-brief-history-of.html

http://youtu.be/R6U-HXV-17Q

http://youtu.be/JRRMjaarOx4