Monday, April 1, 2013

Livin' la Vida Dozenal!

A mathematician, a physicist, and an engineer find themselves in an anecdote. After some observations and rough calculations, the engineer realizes the situation and starts laughing. A few minutes later, the physicist understands as well, and chuckles happily to himself, as he now has enough experimental evidence to publish a paper. This leaves the mathematician somewhat perplexed, as he had noticed right away that he was the subject of an anecdote. He had deduced quite rapidly the presence of humor from similar anecdotes, but he considers this anecdote to be too trivial a corollary to be significant, let alone funny.

I don't know when I will run out of anecdotes, but I'll try to keep them coming.

I wanted to share something that has made my everyday life easier. I think it could be a huge benefit to anyone who wants to try. Basically, we are all using a system that makes our lives more difficult. That system is... Base 10. The decimal numbering system is sapping energy out of your life everyday. Here's why.

The number 10 is divisible by 2 and 5. That means if you divide 10 by 2 or 5, you get a nice answer, 5 or 2. If you divide by anything else, the answer is messy. Like the unfortunate repeating  decimal when you divide by three: 3.333333333333... on to infinity. Divide by four and you get 2.5. Not as nice as the 2 or 5. The problem is divisibility. The number 10 simply doesn't have very many divisors, although at least it isn't prime.

That makes 12 a much better candidate. It is divisible by 2,3,4, and 6. A system based on 12 would make more sense. It turns out there already is such a system, called duodecimal or dozenal. I like the name "dozenal" better because it emphasizes the everyday utility of the system: it is based on a dozen things instead of 10. The reason we have "dozens" in the first place is because it is so much more natural. And not just for eggs. Because 12 is divisible by 2,3,4, and 6, you can easily take half a dozen, a third of a dozen, a fourth of a dozen, and a sixth of a dozen without breaking eggs. That is convenient. 

You might wonder why we use decimal, then. We have 10 fingers. That is the only reason. Counting naturally comes in 10's because of our hands. How could a base 12 system be easy if we can't count on our hands? Well, we can easily count to 12 on the pads of the fingers on one hand. Three pads times four fingers is 12. (Counting like that, and then counting up the twelves on the other hand is why the Babylonians used a base 60 system.) So, counting is easy, but what about math? For math, we need symbols.  

The base of a numbering system is how many units it takes before you have to reset and use another digit. With base 10, there is not a single symbol for 10, we just combine the ten symbols we already have: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. So we need two more symbols to make dozenal work. There are several different suggestions for the new symbols. I like Χ and Ɛ, called dec and el. So the numbering goes ...8, 9, Χ, Ɛ, 10, 11,... and sounds like ...eight, nine, dec, el, do, do-one... 

That seems hard, but it is not bad when you get used to it. But now the fun begins. In decimal, the patterns of multiplication can be difficult. Think of the multiples of 3: 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33... So the pattern of last digits is 3, 6, 9, 2, 5, 8, 1, 4, 7, 0. In dozenal, the pattern is 3, 6, 9, 0 (do). Multiplying by 4 gives: 4, 8, 0. Those patterns are much easier to teach children than the decimal patterns. Division is nicer too: 10/2 = .6, 10/3 = .4, 10/4 = .3, 10/6 = .2. So many more divisions come out cleanly, and they are useful ones. In everyday life, we use halves, thirds, and fourths constantly. Having them come out so nicely would be really convenient for cooking, buying things, splitting treats between kids, or whatever else people do. 

And then there's dozenal time. It still uses the same hours we do, but the hours are split up into 12 units, each of five normal minutes. So reading a dozenal clock doesn't involve multiplying the number for the hour by 5 to get the minutes. If both hands point at the 3, we say 3:15, whereas dozenalists say 3:3.  

It doesn't stop at telling time. They have divided up the five minute chunks into smaller groups of a dozen, until they arrived at a base unit of time, the tim, that is about 1/6 of a second. Then they defined a length unit based on that time and the acceleration of gravity on earth. That unit is the grafut, and is near to our foot. One square grafut is a surf, one cubic foot is a volm, and it goes on. They have redefined all units to measure anything in terms of dozenal numbers and everyday utility. For you scientists and engineers, the mass unit, the maz, and the force unit, the mag, are equivalent under earth gravity, because they were defined that way. No need to use a conversion factor. Three cheers for dozenal!

That is why I'm glad I converted. Everyday math is easier to do, and dozenal time is more straightforward. The dozenal system of units is simpler for everyday use, and I probably use my dozenal ruler everyday. I am also glad I found it relatively early in my kids lives, so they can grow up using a more intuitive system. My wife is having a hard time converting, but I think that is because her heart isn't in it.

If you want to simplify your life, convert to dozenal. If you can get enough people around you to convert, you can live in an "island of dozenalism" where you only have limited interactions with the barbaric decimal world. And then life will be great.     

For more on dozenal:
Numberphile: http://www.youtube.com/watch?v=U6xJfP7-HCc&noredirect=1
Dozenal Society of America: http://www.dozenal.org/drupal/
Dozenal measurements: http://www.dozenal.org/drupal/sites/default/files/tgm.pdf
A great article: http://www.guardian.co.uk/science/alexs-adventures-in-numberland/2012/dec/12/dozenalists-world-unite-tyranny-ten

For more on numbering systems:
Numberphile on base 60: http://www.youtube.com/watch?v=R9m2jck1f90
Numberphile on hexadecimal: http://www.youtube.com/watch?v=9xbJ3enqLnA
Wikipedia:
http://en.wikipedia.org/wiki/Binary_number
http://en.wikipedia.org/wiki/Octal
http://en.wikipedia.org/wiki/Duodecimal
http://en.wikipedia.org/wiki/Hexadecimal
http://en.wikipedia.org/wiki/List_of_numeral_systems

Saturday, March 23, 2013

Random Expectations

A mathematician, a physicist, and an engineer were traveling through Scotland when they saw a black sheep through the window of the train. "Aha," says the engineer, "I see that Scottish sheep are black." "Hmm," says the physicist, "You mean that some Scottish sheep are black." "No," says the mathematician, "All we know is that there is at least one sheep in Scotland, and at least one side of that sheep is black."

It makes me a little sad that the engineer is usually the stupid guy in the joke.

Mathematicians often seem like they have a little trouble interfacing with the rest of the world, you know, because they're odd. I have been known to not get a joke because I over-analyzed it, or to just miss something because I am being too technical, and I'm not even a real mathematician. When I was living in Brazil, I had a tiny umbrella that I carried with me until the first storm completely destroyed it. One day, someone I knew saw it and started teasing me, calling my undersized umbrella "unisex." That probably connotes femininity in Brazilian culture, as opposed to masculinity, but I was confused. I thought that most umbrellas could be used by anyone, the exception being those with more feminine prints, like flowers. So, unisex must be better than the alternative, which would be girly. By the time I had deduced this incorrect interpretation of "unisex", the moment had passed and I had missed the opportunity to be ridiculed in good humor.

Some words have an everyday meaning and a scientific meaning, like work or power. Other words, though, are also misunderstood. We say random to mean unexpected. It is funny, then, that we have some definite expectations on what randomness looks like. If I asked someone to put random dots on paper, the result would probably look like the chart below.

Figure 1: "Random" Data

The thing is, that chart is not random. With a grid, you can see that the dots are spaced fairly evenly, one dot per area. 

Figure 2: "Not Actually Random" Data

Here is a plot of uniform random data I generated in Excel. It doesn't look very much like the "random" data at all. Like my old boss was fond of saying, "Randomness tends to be clumpy."

Figure 3: True Random Data (as random as the number generator in Excel is, anyway)

We have expectations about lists of numbers too. How often would you expect entries on a list of random data to begin with 1? About 10% of the time? In many cases, that is pretty far off.

If the random data spans a few orders of magnitude (powers of 10) or more, it generally follows Benford's Law. The number 1 shows up as a first digit about 30% of the time, and each higher number shows up less frequently, until 9 only appears less than 5% of the time, as seen in Figure 4. The greater the range of the data, the more closely the data follows the Law. One of the classic examples is the length of rivers. Interestingly, it doesn't matter what units are used in the measurements. You could measure rivers in miles, inches, centimeters, or furlongs. The same basic pattern shows up.

Figure 4: Probability of a data point starting with a number

The fact that the units don't matter is a clue to an explanation. Because we can convert the data from one unit to another, it means multiplying the whole data set by any number, say, 2 will result in a different data set that also follows Benford's Law. About 30% of the numbers will start with 1, even though it is not the same group of rivers whose lengths started with 1 before.

That seems kind of strange. We might expect that the 30% pattern would shift around as we multiply. But if we think about it, only some of the rivers that start with 1 will start with 2 after multiplying by 2. The ones that start with a one followed by a 5 or higher will now start with 3. Now think about the numbers in the new group that will start with 1. Everything that started with a 5, 6, 7, 8, or 9 before multiplying by 2 will start with 1 after multiplying by 2. If we add up the probabilities of starting by 5, 6, 7, 8, and 9 we get the same 30%.

The data set needs to cover a few orders of magnitude so that there is data to start with all the numbers. It wouldn't work with people's heights because they don't vary enough.  Most heights measured in inches would fall in the 60s and 70s, and there wouldn't be any that start with 1. But if the larger data points are 100, 1000, or better 10000 times larger than the smallest data points, there should be enough that start with each number to make the pattern work out.

It may strike you as funny that we have expectations on the "unexpected", and that those expectations are often wrong. Randomness is clumpier than we feel it should be, and random things are surprisingly predictable when considered in groups. That is actually what random means, technically: occurring with a certain probability. Predictable patterns emerge when random things are grouped. Kind of like people.

For more on randomness or Benford's Law, check out:
Scishow on randomness: http://www.youtube.com/watch?v=LElyagQ0n_g
Numberphile on Benford's Law: http://www.youtube.com/watch?annotation_id=annotation_143101&feature=iv&src_vid=VbtNy54ya9A&v=XXjlR2OK1kM
More Benford's Law: http://www.youtube.com/watch?v=vIsDjbhbADY

Thursday, March 14, 2013

Happy π Day!

A mathematician, a physicist, and an engineer are all given identical rubber balls and told to find the volume. The mathematician pulls out a measuring tape and records the circumference. He then divides by 2π to get the radius, cubes that, multiplies by π again, and multiplies by 4/3 to arrive at the volume. The physicist gets a bucket of water, places 1.00000 liters of water in it, drops in the ball, and measures the displacement to six significant figures. And the engineer? He writes down the serial number of the ball and looks it up.

I had to tell a joke that involves π because it is π Day! Every year on 3/14, nerds around the world get excited because the date resembles the first few digits of π. That is, unless they structure the date in a consistent way, day/month/year, in increasing time increments. Then π day doesn't work because it would be the 31st of April.

π is the ratio between the circumference and the diameter of a circle. That is, a circle that is 1 unit across is π units, or about 3.14 units, around. It may be surprising that π shows up all over the place in mathematics and science, not just in geometry. It might be my favorite number, and not just because I memorized 150 digits of it in middle school. It is kind of the rock star of numbers. Everyone is familiar with π, even if they don't really know how to use it.

So it seems odd that some mathematicians and scientists want to replace π. They propose that we should use τ. That little t is lowercase Greek tau, their letter t. (π is lowercase Greek pi, their letter p.) τ is equal to 2π, or about 6.28. Sometimes supporters of tau use inflationary language like "π is wrong" or things like that, but what they really claim is that since 2π shows up so much, we should just replace 2π with its own symbol and use π less often. Mathematicians don't really use the diameter of a circle much, but they use the radius constantly. τ works nicely in that sense, because it is the ratio between the circumference and the radius.

Another way in which π trumps π is measuring angles. Scientists and mathematicians don't really use degrees much; often they use radians. There are 2π radians in a full circle, so that comes out to exactly τ. So a full revolution is one τ, whereas half of a revolution is one π. A whole corresponding to a whole is better than a half corresponding to a whole. 

There are more reasons that are cited in support of τ, but I don't think the case is strong enough. π has plenty of uses without the 2, and one applies especially to me. You may have noticed that I haven't mentioned engineers in this discussion. That is because I think they generally fall into the π camp. The biggest reason probably is making physical measurements. If I need to know the size of a pipe, I measure across it with some calipers or measuring tape. In the real world, we use diameters much more often because they are natural. How do you measure the radius of a pipe? You would need some kind of specialized tool. 

There are debatable advantages to switching to τ, but the cost of re-education and converting would be much greater. It is claimed that τ is more natural to use, and in the theoretical world it may be. We live in a physical world, however, and we naturally started using π thousands of years ago because it is more natural in a physical world. And that is why I won't be celebrating on June 28th.

For more:
numberphile on π: http://www.youtube.com/watch?v=yJ-HwrOpIps
numberphile on τ vs. π: http://www.youtube.com/watch?v=83ofi_L6eAo
                                    http://www.youtube.com/watch?v=ZPv1UV0rD8U

Thursday, February 21, 2013

Introduction, Sort of


One day, a farmer called up a mathematician, a physicist, and an engineer and asked them to fence the largest possible area with the least amount of fence. The engineer made a circular fence and proclaimed he had the most efficient design. The physicist made a long, straight fence proclaimed, “We can assume the length is infinite…” and pointed out that fencing off half of the earth was certainly a more efficient way to do it. The mathematician laughed at them. He proceeded to build a tiny fence around himself and said, “I declare myself to be on the outside.”

Those crazy mathematicians. I like to think of myself as a mathematician, a scientist, and an engineer. I am a graduate student in mechanical engineering, which makes me an engineer, though not yet a professional one. As for mathematician and scientist, well, I just really like math and science. I know liking math sounds crazy, but there are really fun things it can do if you get past the nasty stuff.

Like prove that your friends are more popular than you.  That may not be an appealing thought, and it seems counter-intuitive but on average it is true. For example, a survey by the Pew Research Center found that the average number of friends a Facebook user has is 245, which makes me seem rather unpopular. They found that the average number of friends that a Facebook user’s friend has is 359. The average user has 245 friends and their friends have 359 friends on average. How can those numbers be different?

Well, this is a well-known phenomenon called the friendship paradox. It isn't really a paradox if we just examine the math. We are dealing with averages here, so it would help to review. When you take an average, you add up bunch of numbers and divide the sum by how many numbers you added together. The average of 8, 23, and 17 is (8+23+17)/3 = 48/3 = 16. Easy peasy. In the Pew survey, they added up how many friends each person in the survey had, and divided by the number of people in the survey. The number of friends of friends is a little different. We add each person’s number of friends into the total every time they are someone’s friend. So imagine there is someone on Facebook with 10,000 friends. That means he shows up on 10,000 people’s friend lists and puts his 10,000 friends into the average 10,000 times. Then think of the guy with two friends. He only brings down the average with his two friends twice. Popular people show up more in the average and pull the number up. Thinking about it this way, I’m surprised the real numbers aren't farther apart.      

Speaking of friends, doesn't everyone have at least one sarcastic friend? For example, when I am trying to lift something heavy through a small opening and it doesn't fit, there is a loud thump (and hopefully not a crash) and someone makes a comment about how I must not understand physics. I think square peg and a round hole is preschool material at the latest, and that is what we are really dealing with when something doesn't fit through an opening. Is that even physics?

It is, if we realize this problem boils down to why solid objects can’t pass through each other. What is it that makes objects solid? The answer is of course, science. Physics, specifically quantum mechanics. Basically, when the electrons on something come really close to the electrons in something else, they repel just like two negative magnets. Except that electrons are really tiny, so the range over which they repel each other is also tiny, and it looks to us like the objects touch. (Henry over at minutephysics has an interesting discussion on whether or not this is actually “touching.”) So it turns out that it is physics stopping me from getting the square peg in the round hole, even if my two-year-old knows it won’t work.

Math and science may be my hobbies, but engineering is my livelihood. I came across an interesting article (autoblog.com article from 1/18/13 on the McLaren P1) recently that proves that my graduate research is relevant (always a plus). My dissertation is on crashworthiness of composites, basically designing carbon fiber so that it performs well in a crash. McLaren, who made the mighty F1 supercar in the 90’s, is coming out with a successor to that car, the P1, seen below. It is going to be an extremely expensive and fast carbon-fiber wondercar. The interesting bit for me is that the crash structures are made of aluminum, because “carbon fiber is lighter, but it doesn't crush and absorb energy as well.” I don’t know if that statement came from a McLaren representative or not, but I beg to differ. Carbon fiber is lighter, yes, but it can also crush and absorb energy much better than any aluminum alloy when it is well designed. And that is just it: designing carbon fiber for crashworthiness is hard to do. It has to crush in a certain way in order to perform well. If it crushes in the wrong way it will be terrible. I am researching how to design carbon fiber so that it crushes well. My research matters!

It takes all three parts of me to be a good engineer. Science is really just math applied to the world around us, and engineering is just science applied to making things. I was inspired to write a blog by two of my cousins, Jonathon who writes an excellent grammar blog (way more interesting than it sounds) and Logan, who writes a sports blog using his background in statistics that has an amazing predictive track record. I could just write about engineering, but I love math and science so much that I couldn't leave them out. Which kind of makes me sound like a joke.