Uncategorized

On the Safety of the Cryptex in the Da Vinci Code

Davinci code cryptex

Davinci code cryptex (Photo credit: micahaci)

_

 

Dan Brown’s most popular novel, The Da Vinci Code, is filled with secrecy and code breaking. One of the more creative elements that Brown wrote about was a cryptex. The term cryptex comes from the words cryptology (the study of code breaking) and codex (an ancient type of book). The main characters Robert Langdon and Sophie come into possession of a cryptex on their journey to find the Holy Grail. A cryptex is a cylindrical object that has a message locked inside. There are multiple dials along its body, which have a ring of letters on them. Once the letters are aligned in the proper order to spell a word then the cryptex opens, similar to a bicycle lock. A cryptex is cleverly designed so that any attempt to force it open results in a vial of vinegar to break which will dissolve the message. Therefore, the only way to open it is with the code word.

In the novel, there were two cryptexes, each with a five letter code. How secure is a cryptex with a five letter combination? Each dial on the cryptex has a full alphabet of 26 letters. This means that any one of these 26 letters could be the first letter of the code, any could be the second letter, or the third, and so on. Raising 26 to the 5th power shows that there are 11,881,376 combinations of letters, or unique codes possible. If a code breaker tried to crack this code by “brute force” or trying every combo at a rate of 1 attempt every 5 seconds, then it would take almost two years to open it. If an additional sixth ring of letters was added, then the number of combinations soars to 308,915,776. The chance of correctly guessing a five letter code on the first try is .00000842% Thus, the contents of the cryptex are amazingly secure.

On Galactus and the Size Requirements to Eat a Planet

Galactus

Galactus (Photo credit: Wikipedia)

The Marvel super villain Galactus is notorious for being the Devourer of Worlds. He travels the cosmos decimating planets, but his attempts to eat Earth have so far been unsuccessful. He sends his Silver Surfer to scout out planets and prepare them for supper. Unlike in the second Fantastic Four movie, he is not a cloud…he is a giant human figure in purple armor.

Surprisingly, the actual features of Galactus fall short of the hype surrounding him. Let’s start with his height. Although it changes based upon his hunger, it is generally only 28 feet tall. If he’s only that tall how does he eat planets? Well. he does not eat it with a fork and knife. Galactus uses an Elemental Converter machine with his armor to drain the resources of the planet. The planet still dies along with everyone on it, and I suppose it is a more practical approach than having him eat it one bite at a time.

Since he is only 28 feet tall, then how tall would he have to be to eat Earth? Let’s assume that Galactus would eat it in one bite, as if it was a meatball. A meatball is only about 2 inches in diameter, and this will be used to scale Earth. The Earth has a diameter of 7,918 miles. So with this scale then 1 inch is equivalent to 3,959 miles.

From this measurement we can figure out the giant’s height. The average height for a person is 5 feet 10 inches, which is 70 inches. After multiplying 70 inches for the average height by 3,959 miles the product is 277,130. This means that a person would have to be 277,130 miles tall to eat a planet the size of Earth as if it were a meatball. He would be able to cup the Earth in his two hands and block out the sun. That giant’s feet would be 47,508 miles each, meaning the planet could probably fit between his toes. Now that’s a real super villain.

On the Best Day of Your Life

Here’s an interesting thought. At some point during your life you will have the “best day ever”. A day where good luck and fortune explodes making your day the happiest one possible. Maybe it’s your wedding, birth of your children, winning the Air Guitar Championship, finding a $5 bill on the street, whatever. When can you expect this day to happen?

Let’s start with how long you can expect to live. Women in the US average about 81 years old, while men average 76 years. I’m going to stick with these averages, but this number varies quite a bit depending where the particular person lives (but women always seem to beat men). From here I made a table which shows the probability of having the best day of your life by certain ages. Since I’m 22, I can read this as there is about a 29% chance that I have already had the best day of my life. Conversely, the math for the worst day of your life would hold the same probabilities, but its more positive to think of it with your best day in mind. You can ignore the 100% for 80 year old men too, because that exceeded the average of 76 and affected the data. It is certainly possible for someone over 80 to have the best day of their life, but what a long time to wait for it. 

Age Women Men
1 1% 1%
5 6% 7%
15 19% 20%
18 22% 24%
21 26% 28%
30 37% 39%
40 49% 53%
50 62% 66%
60 74% 79%
70 86% 92%
80 99%

100%

 

On Being Faster than a Speeding Bullet

Kid Flash in "Lightspeed"

Kid Flash in “Lightspeed” (Photo credit: Wikipedia)

_

Who is faster: Superman or the Flash? This question has been asked for almost 50 years. On what hand, Superman has a reputation of being the absolute best hero. He’s the strongest, the fastest, the all around perfect good guy. But all Flash does is run. That’s his thing. If he’s not the fastest runner then he really does not bring anything new to the table at the Justice League meetings. He himself admits that if Superman’s faster then he would be out of a job. Flash has a lot more at stake when these two heroes race.

The first race they had was back in 1967, and was organized for charity. However, super villain gamblers were sabotaging both players to try to collect their winnings. Flash and Superman fought them off and ended it in a tie so that nobody won. Disappointed of the outcome, these evil gamblers made them race again to settle it once and for all. Again they intentionally tied, upsetting everyone who wasted their time reading it.

A few equally disapointing races later and Superman starts admitting that the Flash is faster, but its never a very concrete or definitive victory much to everyones dismay. Superman uses the excuse that he can fly faster than he can run so he does not waste time running.

Below are some of the stats for the more popular superhero speedsters. The Flash easily wins, but the others are still extremely impressive to think about.

SUPERMAN

Originally his speed was nearly 100mph, but since his creation he’s gotten considerably faster. In outer space he can fly faster than the speed of light, but we’re concerned with his running speed. One source in the comics has him clocked at 2,000 miles per second. Which is 120,000 miles per minute. Or Mach 9350. This is considerably faster than a speeding bullet. How fast a speeding bullet is depends on the type of bullet, but can be up to a few thousand feet per second.

QUICKSILVER It’s worth talking about Quicksilver as well, even though he’s a Marvel character and would not have a chance to race the Flash or Superman. He’s a speedster and often an evil one. One of the more gruesome ways that he has killed a foe was to grab them and run so fast that the enemy broke apart on a molecular level. Which is pretty fast, but still not competition for Flash.

FLASH Flash does not just move faster than the speed of light, he can also think faster than that. I recently posted a picture from the comic which put it in perspective of just how fast he is. He can easily best Superman in a race, because on foot Superman cannot get up to those speeds. The Flash has the Speed Force at his disposal, which allows him to move incredibly fast, as high as ten times the speed of light. He can use this ability to travel through time, absorb knowledge such as by reading entire books in seconds, vibrate through walls, run across water, etc. Since mass increases as you approach the speed of light, Flash can dish out an “Infinite Mass Punch” to cripple foes.

How fast is 10 times the speed of light?

It’s about 3 billion meters per second.

Which is nearly 2 million miles per second.

Which is 120 million miles per minute.

And 7.2 billion miles per hour.

1.73 trillion miles in a day.

He can go around the Earth 75 times in one single second.

On Flipping a Coin and Rosencrantz and Guildenstern

The play “Rosencrantz and Guildenstern are Dead” is a tragicomedy that follows two of the minor characters in “Hamlet” and reveals their perspective of these events. It begins with the two title characters caught in a most unusual coin game. They have been betting on the result of a coin flip and for the last 156 times Rosencrantz has won. Every single time the coin came up as heads. The two characters try as they might to figure out why this is happening.

 

Rosencrantz & Guildenstern Are Dead (film)

Rosencrantz & Guildenstern Are Dead (film) (Photo credit: Wikipedia)

Guildenstern remarks that, “It must be indicative of something besides the redistribution of wealth. A weaker man might be moved to re-examine his faith, if in nothing else at least in the law of probability. Consider: One, probability is a factor which operates *within* natural forces. Two, probability is *not* operating as a factor. Three, we are now held within un-, sub- or super-natural forces…a spectacular vindication of the principle. That each individual coin spun individually is…as likely to come down heads as tails and therefore should cause no surprise each individual time it does.”

 

As Guildenstern stumbles about for an explanation, he comes across a fundamental part of probability. Each individual coin toss is equally likely to be heads or tails. The first coin toss has no influence on the second one. If the first one is heads then it is still a 50% chance that the next one will be, and a 50% chance that the one after that would be. Even though it would appear that having 156 heads in a row is miraculous, it certainly can happen.

While each of Rosencrantz and Guildenstern’s coin tosses had a 50-50 shot at being heads or tails, the probability of them being all heads is still rare. Consider this model with only three coin tosses. What is the probability that all three are heads? Using a chart all of the possible outcomes can be mapped out.

TOSS 1 TOSS 2 TOSS 3
Heads Heads Heads
Heads Heads Tails
Heads Tails Tails
Heads Tails Heads
Tails Heads Heads
Tails Heads Tails
Tails Tails Heads
Tails Tails Tails

These are all of the possible configurations of a coin toss over three trials. There is only one instance where all three of the outcomes were heads out of the eight different combinations. This means there is a 1/8 chance of three heads happening in three trials, which is equal to 12.5%.

When talking about 156 trials an incredibly large number of rows would be needed to list out all of the possible outcomes. As it turns out, there is a shortcut to help calculate the probability without going through all of that work. The probability of heads for each trial is ½. By multiplying ½ by itself three times (for three trials) the product is 1/8. This is the same as raising ½ to the third power ((½)3 = (1/8)

For 156 heads in 156 trials then the probability would be equivalent to ((½)156. This is ½ multiplied by itself 156 times and the result is an astoundingly small number.

1.09 x 10-47

or

.00000000000000000000000000000000000000000000000109 %

Be careful with how you read this probability. Remember that each individual coin flip has a 50% chance of being heads. The coin does not care what the previous 155 trials were. That being said, it is still 99.99999….% certain that the outcome would be tails, but this is due to how it is being measured. The question is not what is the chance it will be heads, but actually what is the chance there are 156 heads in a row. Even though the percentage is incredibly high that the outcome is tails because having 156 trials of strictly heads is extremely unlikely it is not guaranteed or certain at all. It’s no wonder Rosencrantz and Guildenstern were so baffled.

On the Worst Imaginable Zombie Apocalypse and Populations

Zombies are a big deal in pop culture now. In the past week maybe it was watching Cabin in the Woods, or playing State of Decay, or talking about the Walking Dead that got me thinking about just how many zombies could the world have. The answer really depends on the type of zombie. If you’re talking about a plague that turns the living into cannibalistic, infected monsters then the number is limited by the population of the Earth. So the maximum amount is about 7 billion zombies, the world’s population. Of course, this number would be lower due to the number of people that would be completely eaten and decimated by the hordes, but its a good theoretical max.

English: Mr Zombie

English: Mr Zombie (Photo credit: Wikipedia)

But what about the more traditional zombie? Maybe from some kind of black magic or outer space radiation causes dead bodies to rise from their coffins and dig their way to the surface. How many zombies are we talking about now?

While researching I came across the incredibly terrible statistic that there are more people alive right now than have EVER lived before. This is completely untrue. Completely untrue. So untrue, that its embarrassing that people think its true. In just World War 1 and World War 2 alone the total casualties were about 1 billion dead, which is one seventh of the current population. The idea that more people are alive now than ever has been in the history of humanity is so annoyingly, ludicrously wrong. But, I digress.

So, if the total zombie army could be every single person that ever lived and died in Earth’s history, how do we even begin to calculate that number? Turns out the Population Reference Bureau already figured that out, albeit they did it for reasons that did not include a zombie apocalypse. After creating a comprehensive population growth model since the dawn of human existence and using what they refer to as “guesstimates”, the number settled upon was 108 billion people that have ever lived. They use the term guesstimates, because for 99% of human existence there is no concrete data available. Take a look at this article for a more in-depth look at what the PRB did (http://www.prb.org/Articles/2002/HowManyPeopleHaveEverLivedonEarth.aspx).

108 billion zombies. Wow. Except, there is one last thing to consider, decomposition. Even if there are 108 billion humans that have lived and died many have decomposed into dust. We do have a long fossil record of human remains, but these are the rare samples that were preserved in some way. How fast does decomposition happen? As it turns out, after a year all that is usually left from a body are the bones and teeth (but this time frame varies based upon what is done with the body). Bones take an extremely long time to dissolve, depending on where they are located (soil, coffin, etc). The process could take between 25 to 500 years.

To find a final estimate of a total zombie population the PBR data will be used, and a maximum and minimum will be found. The minimum will only consider those that have died in the previous year, because of decomposition rates. After some research I found the estimate that 56 million people die every year. Adding this to the Earth’s population we have an undead army that would hit around 7.5 Billion Zombies minimum.

The maximum will consider undead skeletons rising alongside their zombie counterparts. Since the data is broken into 50 year intervals on the PBR website, we’ll only consider the world’s population since 1950 for the max. This estimate seems to be the most appropriate when considering rates of decay, because after fifty years the bones would be much too brittle to work despite whatever magic is involved. The maximum number is about 25 Billion Zombies. Again, these numbers are just quick calculations, but those numbers are pretty crazy. Since I have zombies on the brain (pun intended) I might follow this up with an entry about how a zombie epidemic spreads, because there’s a lot of cool research available on that topic.

On 54 Weeks in a Year and Friday the 13th

Circling Friday the 13th date on calendar with...

Circling Friday the 13th date on calendar with marker (Photo credit: Wikipedia)

_

How many weeks are in a year? 52, right? I found myself thinking about this earlier today. Does there have to be precisely 52 weeks? It seems to me that there should be some variation.

Since there are 365 days in a year simple division by 7 tells us that there are 52.14 weeks in a year. This is almost always rounded to 52 for simplicity, but 52.14 means that there are 52 full weeks and one extra day. With a leap year there is 52 full weeks and 2 extra days.

Are these extra days enough to justify it being called 53 weeks? Commonly it is said that there are 52.14 full weeks in a year, but there must be at least 53 separate weeks. The first and last weeks for this separate week notion would have under 7 days in them to achieve this.

In an extremely rare case there can even be 54 (separate not full) weeks in a year. If is a leap year where January 1st occurs on a Saturday, then the last day will be on Sunday December 31st. Even though the first and last week only have a single day in them, 54 weeks is achieved. This case happens once every 28 years. The last time it did was in 2000 and the next time it will occur is in 2028.

– – – – – – –

Another interesting fact about the calendar that probability has revealed to us is that the 13th day of a month is more likely to occur on a Friday than any other day. With leap years and varying amounts of days in months there is a pattern that comes into play. When comparing a large selection of calendars the following was found.

The probability of the 13th day being on each week day is the following.

SUN 14.31%

MON 14.27%

TUE 14.27%

WED 14.31%

THUR 14.25%

FRI 14.33%

SAT 14.25%

The probability of Friday the 13th happening is slightly higher than the 13th landing on any other day. Further, it was found that every year must have at least one Friday the 13th, and the maximum number of times it can occur is 3. This “unlucky” day happens more often than you might expect it to.

On Superman and Pentagons

One of the most famous pentagons in existence is the one represented in Superman’s logo. This symbol is on Superman’s chest and cape, a pentagon with a yellow background and a red letter “S”. This pentagon in particular is unusual, it has two pairs of sides that are equal and one side that is not. This got me thinking about how to find the area of such an unusual shape, which I’m calling the Superman Pentagon.

Finding the area of a regular pentagon is not a formula that most people remember or learn about. A regular shape is any shape where the sides and angles are all equal, such as a square or equilateral triangle. When finding the area of any regular shape a triangle method is used. The shape is divided into a number of equal triangles, whose sides start at the corners of the shape and go to the center. The area of a triangle is used for one of these triangles and then multiplied by the number of triangles present. So, for a regular pentagon there are five of these triangles. The formula looks like this:

Area of a Triangle: 1/2 * (Base) * (Height)

Untitled

Area of a Regular Pentagon = 1/2 * (Base) * (Height) * 5

= 5/2 * (Base) * (Height)

However, the Superman pentagon is not a regular one. One method could be to divide the pentagon into triangles, but these triangles would not be the same size, and instead of a quick multiplication the sum of all of them would be needed.

This seems like too much work, so I wanted to investigate a new formula to determine the area for this particular polygon. The logo we will look at is one where the bottom half of the pentagon is an equilateral triangle, and a trapezoid sits above it. The formula for area would be the sum of the area of the triangle and the area of the trapezoid.

Area of a Triangle = 1/2 * B2*  H2

Area of a Trapezoid = 1/2 * (B1 +B2) * H1

 IMG_1875

Area of Superman’s Pentagon = 1/2*B2* H2 + 1/2 (B1+ B2) * H1

H = H1 + H2

Area of Superman’s Pentagon = 1/2(B2H+B1H1)

Note that the above is for a particular instance of the Superman logo. Over the course of the hero’s history there have been different variations and styles that may not follow this geometric pattern. It would be interesting to see if there were any ways to reduce or simplify the formula even further.

On the Size of Straws and Atmospheric Pressure

During the last math club meeting one of our members threw out a fun fact that a straw could not be longer than 10.3 meters. This fun fact was met with a hostile argument as to exactly how straws work and how realistic that was. The result was more interesting than expected.

 

Straws

Straws (Photo credit: jeff_golden)

 

To make this clearer, the fact is not that an 11 meter straw is impossible to make. The world record set by a high school group was a 20,000 foot long straw. The claim is that an 11 meter straw would be unable to suck up the liquid to the top. It makes sense that there would be a maximum, but exactly what it is and why there is a maximum were debated points.

The first, obvious argument was that it has to do with the human lungs and the ability to suck in air. Thinking about the energy exerted in the act, running out of breath, and the distance traveled in the straw this reasoning makes sense.

However, it is actually not the issue at all. What happens when you suck on a straw is a vacuum is created. In physics, this refers to space that is empty. The vacuum is subject to forces by atmospheric pressure. The air pressure is pushing the water down into the cup, while the water pressure is pushing against it upward. What happens is that when you suck on a straw you are actually decreasing the air pressure in the straw causing the water to rise.

If you try to pump water up a tube it can only go 32 feet (about 10 meters) before cohesion is lost. It is the highest water can be raised vertically in a vacuum.

The solution comes from the formula

p = ρgd

where

p = atmospheric pressure ( 101,325 Pa)

ρ = density (of water) ( 1000 kg/m^3 )

g = gravity (9.81 m/s^2)

d = depth

When solving for d, the depth of the straw, the answer comes out to 10.3 meters as a maximum water can travel vertically in a perfect vacuum.

There are some ways around the 10.3 meters though, to have even longer straws exist. The first is how deep the body of water is, because the straw could just keep going down in that direction, as long as the length above water is 10.3 or less.

Another solution would be to put the straw at an angle instead of having it vertically. Then a straw could theoretically not have a limit.

Knowing that the limitation here is atmospheric pressure, how do straws operate when at an elevation other than sea level. Higher elevation means less atmospheric pressure, means drinking through a straw is harder to do. Similarly, the pressure at depths underwater would make it harder, not that you could drink underwater anyways. Straws would be completely useless in outer space, because there is no atmospheric pressure at all. While astronauts can use straws aboard their vessels easier than if they were on Earth, they would not be able to do so

outside. (Granted this is hypothetical and a pretty big leap, because astronauts cannot survive outside without their suits, their helmet would prevent them from using a straw, and water cannot exist as a liquid on the moon). The pressure on a spaceship allows astronauts to use straws from a sealed container, but if the water was freely floating about then it would not function properly.