Posted by: Dave Richeson | February 9, 2010

Three applets illustrating parametric curves

In my multivariable calculus we’re talking about parametric curves.

I’m using this applet for displaying parametric curves. You can use predefined curves or enter your own. Although the applet is on my web page, it was created by Marc Renault, a friend who teaches down the road at Shippensburg University. I only tweaked it slightly when I posted it on my page.

For fun, I created this applet. It has four parametric curves which, when drawn together, produce a famous logo. Our college is in Pennsylvania, so it went over well.

Marc also created this nice applet illustrating the creation of the cycloid.

Speaking of the cycloid, after the deriving the parametric equations for the cycloid I spent 10 minutes telling my class about the tautochrone and brachistochrone problems.

They loved the story about the history of the brachistochrone problem—the way that Johann Bernoulli taunted Newton, Newton’s 12-hour after-work solution, Newton’s annoyance (“I do not love to be dunned [pestered] and teased by foreigners about mathematical things…”), his anonymous solution, and Bernoulli’s reply (“I recognize the lion by his paw.”).

This afternoon, after teaching the class, I discovered that the tautochrone problem is mentioned in Moby Dick: “[The try-pot] is also a place for profound mathematical meditation. It was in the left-hand try-pot of the Pequod, with the soapstone diligently circling round me, that I was first indirectly struck by the remarkable fact, that in geometry all bodies gliding along a cycloid, my soapstone, for example, will descend from any point in precisely the same time.” Cool!

Posted by: Dave Richeson | February 4, 2010

Why do mirrors reverse right and left but not up and down?

[I apologize to those of you who have been reading my blog for more than a year. I'm reposting something I wrote last year at this time. I was then, and am now, teaching Calculus III, and we just finished discussing the cross product. I ended the conversation by telling my classes how the cross product helps us answer the question: why do mirrors reverse right and left but not up and down?]

Stand in front of a mirror and hold up your right hand. The person standing in the mirror holds up her left hand. Why is that? Why does a mirror reverse left and right? After all, it does not reverse up and down.

mirror1

Before we answer that question, we have to ask a more basic one: what is “the right”?

Looking for an answer, I turned to the venerable Oxford English Dictionary (subscription required). I was disappointed to discover that the OED does not give a definition of the term “right”! Instead it gives the circular path shown below.

Right
17. a. = RIGHT HAND 2.

Right hand
2. a. The right side. b. The direction towards the right. = RIGHT n.1 17a.

“Right” and “left” are a slippery concepts that are hard to define. In fact, you need to know other things about an object before you can determine its right and left. For example, if I handed you a blob-like sea creature and asked you which side is its right side, you may not be able to answer me. If I told you where the top and front sides of the critter were, then you could quickly identify the right side.

Here’s a mathematical explanation of what you would be doing mentally. Take the coordinate axes shown below, point the z-axis out of the top of the creature and the y-axis out its front, then the x-axis will point to its right.

coordsysIf you are familiar with vector operations in \mathbb{R}^3, consider this procedure. Take a vector pointing out its top \mathbf{v}_{\text{top}} and a vector pointing out its front \mathbf{v}_{\text{front}}. Then the cross product of \mathbf{v}_{\text{front}} and \mathbf{v}_{\text{top}} is a vector pointing to its right, \mathbf{v}_{\text{right}}. That is:

\mathbf{v}_{\text{right}}=\mathbf{v}_{\text{front}}\times\mathbf{v}_{\text{top}}.
Right equals front cross top

The three directions, top, front, and right are mutually perpendicular and that if you know two of them, you know the third. For a person, a car, an animal, etc, the top and the front are unambiguous and intuitive. Then we use them to determine which side is the right side.

Now let us go back to the mirror. What does it really reverse? If you raise your arm, your reflection raises her arm. If you stick your right arm out to the side, the reflection sticks an arm out in that same direction. However, if you point at the mirror, then the reflection points in the opposite direction—she points back at you. In other words, the mirror reverses front and back!

Here’s where things start going wrong. Your brain does not have to do any work to recognize the top and front sides of your reflected image. Then it uses them to calculate your reflection’s right side. More specifically, your reflection’s z-axis points in the same direction as yours, but her y-axis points in the opposite direction (yours points into the mirror and hers points out). Consequently, if we use the xyz-coordinate system above, her x-axis points in the opposite direction as yours. Thus your right arm corresponds to her left arm, and we perceive the mirror reversing left and right.

Here another way to describe what is happening. The xyz-coordinate system shown above is often called a right-handed coordinate system because if you take your right hand, point your fingers in the x-direction and curl them in the y-direction, then your thumb will be pointing in the z-direction. What a mirror truly does is changes a right-handed coordinate system into a left-handed one—that is to say, the reflection of a right-handed system is a left-handed system. When we look into a mirror, our brain, which is accustomed to using a right-handed coordinate system to tell right from left, errs because the mirror world actually has a left-handed coordinate system.

When we see words in a mirror, they look like they are written from right to left, but that is because we are imposing our right-handed coordinate system on a left-handed mirror world.

I’ll end this post with some assorted thoughts about the left and the right.

  • One thing that occurred to me while writing this post is that we treat different objects differently. Suppose I was holding a piece of paper out in front of me with my two hands and you were facing me. If I told you to point to the right hand side of the paper, then to point to my right hand, you would point to two opposite sides of the paper! There are certain objects (people, animals, cars, boats, etc.) in which right and left refer to the right and left sides from the objects’ perspective. However, there are other objects (pieces of paper, buildings, etc.) in which you use your right and left side to reference it. I assume this has to do with whether we can mentally substitute ourselves in place of the object—we can do that with other living things or with vehicles in which we can ride, but not inanimate objects like a piece of paper.
  • Perspective is important. As a child, I was always confused about where right field was on a baseball diamond. Is it on the batter’s right or on the fielders’ right?
  • It is no wonder that so many people confuse their right and their left. They have to compute a cross product in their head each time.
  • It is a good thing that right and left are relative quantities, otherwise cars driving in opposite directions on a two-way road, both driving on the right-hand side would be in the same lane!
  • I just came across these two articles about Andrew Hicks’ work with mirrors.
Posted by: Dave Richeson | February 3, 2010

Three applets for linear algebra or multivariable calculus

This semester I’m teaching two sections of Calculus III (multivariable calculus) and I happen to be teaching the first four weeks of Linear Algebra. The first couple weeks of both courses cover properties of vectors in Rn. (Of course, just to confuse the instructor and the students who happen to be in both classes, the order, emphasis, and notation is different in both textbooks!)

I created three vector-related GeoGebra applets to use in the classes. I thought others might want to see them too.

The first applet showcases all the basic vector operations: addition, scalar multiplication, subtraction, linear combinations, the dot product, vector projections, and the cross product. I’ve used this applet in class to show the students how the operations work. I’ve also given them the link so they can play with it on their own (they can even play with it in class, since we are in a computer-equipped classroom).

The other two applets are intended for the student use. The intent is for the students to discover properties of the dot product and the cross product on their own. All I told them was that the dot and cross products were two attempts to define vector-vector multiplication. Then I sent the to the computers to play with the applets. I didn’t define anything ahead of time. There are questions below the applets that guide them through the discovery process. Then we came back together to discuss their findings. I was very pleased with how it worked. For example, one group of students figured out that \mathbf{u}\cdot\mathbf{v}=|\mathbf{u}||\mathbf{v}|\cos\theta.

(Since some students were in both my Calculus III and Linear Algebra classes and since we didn’t cover the cross product in Linear Algebra, I only used these applets in Calculus III.)

Dot product applet:

Cross product applet:

This morning I was pleased to discover that my blog appears on OnlineUniversities.com’s blog in their list of the 50 Best Blogs for Education Leaders; it was one of the five blogs listed in the Subject Specific category.

What a nice surprise. I’m very honored for the recognition!

This is the first I’d read their blog, and I find it to be both interesting an informative. Plus they have have lots of lists. I love lists! Check it out.

Yesterday the mathematician Steven Stragatz wrote the first article in a mulit-part series for the NY Times. In this first article, called From Fish to Infinity, he describes his intent.

Crazy as it sounds, over the next several weeks… I’ll be writing about the elements of mathematics, from pre-school to grad school, for anyone out there who’d like to have a second chance at the subject — but this time from an adult perspective. It’s not intended to be remedial. The goal is to give you a better feeling for what math is all about and why it’s so enthralling to those who get it.

So, let’s begin with pre-school.

I’m very interested in to see what Steve has to write on this topic. I’ll try to re-post the links here as they come out.

List of his essays [updated each time a new one appears]:

  1. From Fish to Infinity (1/31/10)
  2. Rock Groups (2/7/10)
  3. ~
  4. ~
  5. ~
  6. ~
  7. ~
  8. ~
  9. ~
  10. ~
  11. ~
  12. ~
  13. ~
  14. ~
  15. ~

[Update: thanks to one of the comments below, I could rename this post "How to email all the students in your class with only one click of your mouse."]

This post has no math in it. But it may be helpful to teachers (and others who regularly email a group of people).

I often have to send an email message to all the students a class that I’m teaching. To get the addresses in my desktop email program I “simply” have to click the little envelope icon in our college’s online administrative system next to the class. The annoying problem is that to do so I have to click the mouse a total of six times, enter a login name and a password, and close the two browser windows at the end of the procedure. Or I can search in my mail program for the last time I emailed the entire class, hit reply-all, delete the previous subject and message text.

(I could create an alias for the class in my address book, but honestly, I don’t want to put all the students in my address book.)

Today I had an idea for how to make this process much shorter. I made a very simple web page. The body of the page contained only “mailto” links—one for each group that I wanted to mail. I discovered that a single mailto link could have multiple email addresses. For example, the entire text of the web page could be:

<html><body>
<p><a href=”mailto:emailaddress1@gmail.com, emailaddress2@gmail.com, emailaddress3@gmail.com, emailaddress4@gmail.com”>Calculus III</a></p>
</body></html>

That produces a link like this:

Calculus III

If you have a desktop email client, try clicking on it. Hopefully it will work (and I hope the email addresses I gave were not real addresses!).

Then I saved this HTML file on my computer (NOT on the internet since this is for my own personal use only), put it in the bookmark bar of my browser, and that’s it.

Now I click the bookmark, then click on the link, and the whole class appears in my mail program. Ta-da!

Just now I found this web page which shows that you can add other things to mailto links—namely, text for the to, cc, bcc, subject, and body fields of the email message. For example, if you want your email address to be in the “to” field and the students’ email addresses to be in the “bcc” field, type your link as follows.

<a href=”mailto:myemailaddress@gmail.com?bcc=emailaddress1@gmail.com, emailaddress2@gmail.com, emailaddress3@gmail.com, emailaddress4@gmail.com”>Calculus III</a>

Try it:

Calculus III

I still have to close the browser window after doing this. So I guess it requires three clicks, not the advertised two. If there are any javascript wizards reading this who know how to make the window close automatically after the link is clicked, leave the details in the comments!

[Update: thanks to my former student and current tech wizard Ben, I got the Javascript to work.] Clicking the following link will make the window close automatically:

<a href=”mailto:emailaddress1@gmail.com, emailaddress2@gmail.com, emailaddress3@gmail.com, emailaddress4@gmail.com” onClick=”javascript:window.close();”>Calculus III</a>

[Second update: thanks to the commenter David Wees.] If you drag the mailto link to the bookmark bar of your browser, then it creates a bookmarklet. Click on the link once it sends the email addresses to the email client. One click!

Posted by: Dave Richeson | January 8, 2010

The relative sizes of the stars and planets

My colleague sent me this link which shows the relative sizes of the planets in our solar system and some of the brightest stars in the sky. Not only does it make the Earth look small, it makes our sun look small. Pretty amazing!

Just for fun I decided to create an interactive GeoGebra applet illustrating the relative sizes of these objects. I also threw in the orbits of the planets in the solar system (assuming they were circular).

I got all of my values from Wikipedia. Interestingly, it shows Betelgeuse (radius 936 times the radius of our sun) to be larger than Antares (800x). But my friend’s link has them switched. I have no idea if this is within the margin of error.

According to Wikipedia, the largest known star is VY Canis Majoris, the radius of which is believe to be somewhere around 2000 times the radius of the sun!

Posted by: Dave Richeson | January 6, 2010

Playing the probabilities in Settlers of Catan

One of my favorite board games is Settlers of Catan. I encourage all of you to check it out. It is a great game because it is a combination of luck and strategy and it is different each time you play. I’ve been on a big Settlers kick lately, because I’ve downloaded a version for my iPod Touch.

This post will probably be interesting only to those people who know the rules to the game (sorry), but I will give a brief explanation of the relavant rules so that anyone can follow the discussion.

A couple of years ago I asked myself the following two questions about Settlers of Catan.

  1. What are the most valuable intersections? This information is most important to know at the beginning of the game when placing the first two settlements.
  2. Where should I place the robber to do the most damage?

I just found my notes that I wrote, so I thought I’d share them here. The mathematical analysis is extremely simple, but is kind of fun and maybe a little useful to know.

The most valuable corners

At the start of the game the hexagonal game pieces are put in place randomly (as shown in the picture above, which you can click on to enlarge) and the round chips are distributed according the the rules. Each chip has a number 2 through 12 (except 7) on it. The players take turns placing settlements on the corners where three hexagons meet. Once each player has two settlements, play begins.

During each person’s turn a pair of dice are rolled and anyone with a settlement adjacent to a hex with that number on it gets a resource card of that type. If the player has upgraded a settlement to a city and it is adjacent to the hex, he or she gets 2 resource cards. For now I’ll ignore what happens when a 7 is rolled.

Thus it is good to put your settlement next to a 6 or an 8, 5 and 9 are good too, however the hexes with 2’s and 12’s are not worth much. You may put your settlement along the coastline or the desert, but the downside is that it would be adjacent to only 1 or 2 resource hexes.

The round chips not only have numbers, they also have dots on them. The dots give you an easy way to determine which are the valuable hexes. They are assigned as follows:

•: 2, 12
••: 3, 11
•••: 4, 10
••••: 5, 9
•••••: 6, 8

My question is: how do we look at a board and determine the most valuable intersections? By valuable I mean greatest likelihood of yielding a resource card when the dice is rolled. I’m ignoring the other strategies: settling on ports, spreading out your settlements, getting a broad range of resources, etc.

I was surprised to discover that the simple answer is the correct answer: add up the dots on the adjacent hexes. The intersection with the largest dot-sum is the most valuable.

The reason this is true is that if a chip has n dots, then the chance of rolling the number on that chip is precisely n/36. For example, there are 3 ways to roll a 10 (4 & 6, 5 & 5, or 6 & 4) and there are 36 possible rolls, thus the chance of rolling a 10 is 3/ 36. Indeed, the 10 chip has 3 dots on it.

Now suppose your settlement is on a 6/4/11 intersection (which corresponds to dots •••••/•••/••, or as I will write from here onward, 5-3-2). Then the chance that this settlement will pay off is \frac{5}{36}+\frac{3}{36}+\frac{2}{36}=\frac{10}{36}.

Before answering the question I must point out that some combinations are impossible. You can’t have two adjacent hexes with the same (dice roll) number on them. You can’t have two adjacent •••••’s (or two adjacent •’s). You cannot have three adjacent hexes with the same number of dots. Thus, here are the most valuable intersections (of course, depending on how the board is set up, not all of these configurations may exist).

Probability 13/36: 5-4-4
Probability 12/36 5-4-3
Probability 11/36: 5-4-2, 5-3-3, 4-4-3
Probability 10/36: 5-4-1, 5-3-2, 4-4-2, 4-3-3
Probability 9/36: 5-3-1, 4-4-1, 4-3-2, 5-4 (on the coast or desert)

One consequence of this analysis is that you should not feel obliged to place every settlement adjacent to a 6 or an 8. There may more valuable corners elsewhere. For example, looking at the intersections in foreground of the picture above, the 8/5/10 and 8/5/4 (5-4-3) corners are the best, the 5/9/10 (4-4-3) is next best, and the 8/4/3 (5-3-2) comes after that.

The best use of the robber

The little black guy in the picture above is the robber (or bandit). He temporarily kills any tile upon which he sits (rolling a 7 allows you to move the robber). Obviously, you want to place it on a hex that has none of your settlements or cities and does as much damage to your opponents as possible.

It is important to note that properties (settlements and cities) cannot be placed on adjacent intersections, so you can have at most 3 on each hex.

My question is: where should you put the robber to do maximum damage to the other players? Again, I’m simplifying the analysis. Often you want to harm one player more than another because he or she is about to win—I’ll ignore that.

By the expected damage I mean the expected number of resource cards “lost” when the dice are rolled. For example if there are two settlements and one city on an 8-hex and an 8 is rolled, the other players will not get the 4 resource cards (1+1+2) they would have gotten had the robber not been present. Since the probability of rolling an 8 is 5/36, the expected number of lost resource cards by placing the bandit on the 8 is 4(5/36)=20/36.

It is easy to create a table of expected damages. The values at the top of each column of the table are the number of settlements plus twice the number of cities on the hex (the number of resource cards that would be distributed if that number was rolled). Each entry in the table is the expected damage (in 36ths)—so the larger the number, the greater the damage.

1 2 3 4 5 6
1 2 3 4 5 6
•• 2 4 6 8 10 12
••• 3 6 9 12 15 18
•••• 4 8 12 16 20 24
••••• 5 10 15 20 25 30

In short: to compute the expected damage, add the number of settlements to twice the number of cities, then multiply this by the number of dots on the hex.

For example, a 6-hex (•••••) with three settlements has a lower expected damage (15/36) than a 9-hex (••••) with 2 settlements and a city (16/36).

[Image by xingty (CC BY-NC-SA 2.0)]

I’ll be heading to the 2010 Joint Mathematics Meeting in San Francisco next week. In case any of you are interested in meeting up, here are a few of the items on my (busy) schedule. Please introduce yourself; it would be nice to put faces with names.

  • I’m giving a talk on some work with my collaborator, Jim Wiseman, entitled “Symbolic Dynamics for Nonhyperbolic Systems.” It is in the AMS special session on Dynamical Systems, Friday, January 15 at 5:15. I have no idea how I’ll be able to say anything in my 10 minute time slot, but I’ll do my best.
  • I’m on the MAA Committee for Minicourses and will be monitoring two minicourses (one of the perks of being on the committee!):
    • Using GeoGebra to create activities and applets for visualization and exploration, by Michael K. May
    • The hitchhiker’s guide to mathematics, by Dan Kalman and Bruce F. Torrence
  • I’m having a book signing for my book Euler’s Gem at the Princeton University Press booth in the exhibit hall, Friday, January 15 at 10:30. Please come by!

If you are going to JMM 2010 and are giving a talk, post it in the comments below. Also, if you’re on Twitter, the hashtag for the meeting is #jointmath. I don’t have a smart phone, so I’m not sure how much I’ll be able to tweet. But I’ll try to contribute some.

Speaking of Euler’s Gem,… in case you are interested…

Posted by: Dave Richeson | January 1, 2010

New applets page

Over the last few years I’ve made quite a few web applets. But they have been scattered all over the place. As a good end-of-semester project I decided to consolidate all of them and create an applets page. Enjoy.

Older Posts »

Categories