Category Archives: Math

Math and games

Origami, folding paper into fascinating shapes and recognizable objects, is a form of gaming.  Now, computation geometry is being used to help folders perfect their origami creations.

Mathematics has long been the secret ingredient to games.  Many players don’t even know they are dealing with math, but it is often there nevertheless.  Did you know “Candy Crush” is a hard mathematics problem?

Really, mathematics is necessary in all kinds of video games ranging from complex simulations involving logistics to casino games, often requiring difficult statistical verification before release — to insure that the game does not bankrupt the house.

Even my games “Microsurgeon” and “Truckin'” relied on a number of decisions and logistics — highly related to mathematics — in order to save a patient or make cargo deliveries on time.  Speaking of logistics, “Tetris” is probably the most famous video game related to selecting shapes into rows in order to score points.

But did you know that packing your bags or Amazon packing your order is a logistics problem too?  If you find this kind of thing fascinating, as I do, you might like my upcoming video game.  More on that soon.

In the meantime, if you haven’t tried it already, you might like my game “Family Tree Solitaire“.  Since one hand’s score in the tree is connected to another hand’s score in the tree, there is mathematics behind the scene.  But all you really need to do is just enjoy playing.  It’s free.

Is predicting the next president like BattleBots?

In my last blog entry I suggested that BattleBots, a show that features robots battling in a ring, can be humorous — largely because we don’t know which robot style is going to win, and because robots aren’t alive.

In the current U.S. presidential battle, the participants also have different styles.  Whether they are humorous or not is in the eyes of the beholder.  But, predicting the winner may be harder than predicting whether a spinning robot with a slicer and dicer is going to defeat — or be defeated by — another bot with a hammer and flipper.

That’s why today I blogged on NEWWorthy.com about some of the various prediction sites and even a related contest held by the American Statistical Association.  I included a BBC News video which describes how some prediction models that supposedly have had success in the past are not in agreement so far this year.

As a science fiction writer, I often wonder just how far scientists and experts will go with predictions, Big Data, and statistics.  If you wonder too, you might enjoy my short story entitled “Surfing the Wave” about a young man who takes statistical analysis to the extreme.  It’s in my e-book anthology, “Science Fiction: Future Youth“.

FutureYouthCover_ForAmazonKindle

Is square root day political?

Since tomorrow is square root day 4/4/16 (month and day numbers 4 are both the square root of the last 2 digits of the year 16), I decided to propose a (sort of) math problem today. Everyone learns that the square root of 2 is IRRATIONAL (can’t be expressed as a fraction). But the square root of 4 is 2 (or 2/1 as a fraction), not IRRATIONAL.

So what is the square root of a politician? Perhaps it depends on the politician.

I used an online app to quickly figure the dates of the next 15 square root days starting with 4/4/2016, which falls on a Monday.  Using a couple of  online day of the week calculators, I got the following days for the next 19 square root days: 3 Mondays, 1 Tuesday, 3 Wednesdays, 3 Thursdays, 3 Fridays, 4 Saturdays, and 2 Sundays.  Saturday has the most square root days over the next 200 years.

When you look at election days around the world, this would seem to favor Australia, New Zealand, and some other countries where general elections tend to be held on Saturdays.  Also, perhaps interestingly, the next Thursday square root day isn’t until January 1, 2201.  General elections are generally held on Thursday in the U.K.

So is square root day political?  Maybe not over the next million or billion years — I haven’t looked at the distribution of days of the week for that long yet, though it might be fun to do so.  But for the next 200 years, the square root days of the week do seem to favor general election days in some parts of the world.

By the way, the next cube root day is 3/3/27, next fourth root day is 3/3/81, next fifth root day is 2/2/32, and next sixth root day is 2/2/64. And we won’t see another seventh root day until 1/1/01 (which is the year 2101).

SquareRootOfAPolitician

Eye on Pi 2016

It’s Pi Day 2016.  Take the first 6 digits of Pi and round off, and you go from 3.14159 to 3.1416.  That’s today’s date: 3/14/16!

My fellow software engineers might enjoy this Code Project article on “Calculating the Number Pi through Infinite Sequences.”  Some algorithms are better than others at quickly obtaining the first several digits of Pi.

Or you might appreciate another algorithm that takes much longer to calculate Pi, but there is beauty in its simplicity.  You may have heard of Buffon’s Needle problem, which asks: “Suppose we have a floor made of parallel strips of wood, each the same width, and we drop a needle on the floor. What is the probability that the needle will lie across a line between two strips?  Turns out the answer is related to Pi.

But have you heard of Buffon’s Noodle problem?  Turns out that even if you bend each needle as if it were a noodle, the probability is still related to Pi.

Finally, many of us know that n! — read n factorial — is n x (n-1) x (n-2) x … 1.  So 4! = 4x3x2x1 = 24.  But what is the factorial of a fraction, in particular the factorial of 1/2?  You guessed it, it’s related to Pi.  It’s remarkable, and I was tempted to say “related to Pi!”, but I thought it might confuse you.

Largest known prime number

BBC News reports “Largest known prime number discovered in Missouri.”  22 million digits is a really, really, really long number.  But what is it doing in Missouri? (hee hee).  Sorry, I couldn’t resist.  Seriously, it’s an impressive calculation!

Speaking of primes — natural numbers that can only be divided by 1 and the number itself — Brilliant.org has some fun prime number problems.  Here’s one you might enjoy that I solved recently.

 

Mathlete update

Since the Old Miss Math Contest stopped providing new quizzes over a year ago, I have been working on the problems presented on Brilliant.org.  I solve a few algebra, trig, geometry, and number theory problems each week to keep math-fit.

I enjoy most of the stumpers (when less than a quarter of the participants are correct), even the ones I get wrong.  As I solve more problems in a particular subject, the problems presented are more difficult.  I am at level 3 in Geometry and Combinatorics (statistics), and level 4 in Algebra.

Here’s a number theory problem I got recently that you might enjoy pondering (A>3, B=A+2, C=A+4; Are A,B,C all prime? — half the participants, including me, got that one right).  Many of the problems I encounter are much tougher, such as “find the last two digits of 9 to the 9th to the 9th power” — only 30% got that one right.

I’m particularly fond of the geometry problems.  For one recently it came in handy to know how to deal with an inscribed square in a triangle.

InscribedSquare

UTM and Geographic Coordinates

Whether you are encountering UTM mapping coordinates because of genealogy or some other kind of research, it helps to know how to convert between UTM and geographic coordinates.  I recently ran into this issue when attempting to locate the exact spot where a meteor impact-related image was taken.  Although the photographer and researcher listed the UTM coordinates for the spot, I wanted to know the geographic coordinates so I could visit the location during vacation.

I’m sure there are many conversion tools on the internet, but here are a couple I encountered.  I used a site at the University of Wisconsin – Green Bay to convert from UTM coordinates to longitude and latitude.  I was then able to use the lat-long data to map it in Google maps.  To verify I got the right place, I used Google street maps and was able to see that the spot matched the photo location very nicely.

There are also tools for doing the conversion to Google Earth that you can find on the web with just a search on “UTM coordinates and Google Earth”.

Globe clip art

Ancestry reduncancy

Have you ever seen one of those charts that shows how you should have more ancestors in the year 1300 than were alive in the year 1300?  Take for example 714 years divided by 23 years per generation.  That’s over 30 generations or 2^30, which is about a billion people back in 1300.  But Wikipedia shows estimates of only a few hundred million people were alive in 1300.  How is that possible?

Wikipedia discusses the topic of “Pedigree collapse,” which explains why “everyone on Earth is [probably] at most 50th cousin to everyone else.”  You might also like this short explanation of pedigree collapse at the Straight Dope.

Professor Bruce Railsback at the University of Georgia (UGA) has an interesting essay on this subject called “Redundancy in Ancestry.”

Brilliant mathematician meets Colbert

It’s not everyday we get to see a brilliant mathematician on a television show, let alone a comedy television show.  UCLA mathematics professor and Fields medal winner Terrence Tao was on “The Colbert Report” recently.  I would love to have heard more about the subject of twin, cousin, and sexy primes.  You can find more on the internet about bounded gaps between primes or computer algorithms for generating twin, cousin, and sexy primes.

Lighthouse math

So I was reading “10Best: Scenic lighthouses around the USA“, and I had to stop for a moment when I came across “Further south, the Jupiter Inlet Lighthouse, built in 1860, stands 105 feet tall and provides stunning views up to 24 miles out to the Atlantic Ocean.”  Why?  Because I remembered the formula for calculating the distance to the horizon depending on the height you are viewing from.

The distance to the horizon is approximately 1.22 * squareroot(height_in_feet), so 1.22 * squareroot(105) in this case.  That’s about 12.5 miles — or a bit more if I include the height of a 6 foot person — nowhere near 24 miles.  So how do you get to see ‘stunning views’ up to 24 miles out?  You would need to see the top of an object that is over 100 feet tall — for example, an island mountain, a tall ship, a bird flying, or perhaps a tall building off in the distance.  Looking on a map, I suppose it’s possible that you could see the top of a tall building in Boca Raton or Port St Lucie, but I don’t see how that’s stunning.  I think the Bahamas are too far away, so what’s out in the Atlantic that is stunning, 24 miles out from Jupiter, and over 100 feet tall?  Maybe a cruise ship.

My numbers seem to coincide with the chart from Wikipedia below.  Is my calculation that far off?  What am I missing?

 

The slide rule

I, and my classmates, used a slide rule in my physics and math courses at UCLA.  I could have purchased a HP pocket calculator for around $400 in 1972, but my slide rule was far cheaper and still adequate for my needs.  Back in the early 70’s, I was probably in the top 10% of my class in how fast and accurately I could compute with a slide rule.

By the late 1970’s, everyone was using a calculator — including me — but I still had my trusty slide rule.  I don’t remember, but I might have even taken my slide rule out a few times to do some calculations when I was prototyping the algorithm for the path of the bowling ball in Mattel’s Handheld Bowling and later Mattel Intellivision’s “PBA Bowling”.

For nostalgia, I still keep a slide rule around in my office.  I enjoyed reading an article on npr.org recently regarding “The Slide Rule: A Computing Device That Put A Man On The Moon“.  I’ve tutored mathematics for many years, and I can usually tell pretty quickly whether a student uses a calculator as a tool or as a crutch.  The calculator is not a wand, and it won’t form equations for you out of thin air.  I wonder how many math teachers today even realize that a slide rule is an excellent example of the use of logarithms?

Mathematics inspiration – The Geometry of France

I’ve always enjoyed mathematics, and I still have fun reading about new research, tutoring for the SAT, and participating in online math contests.  On my recent travels in France, I found several fascinating geometric shapes — descriptions below.

The Eifel Tower can’t help but make one think of fractal mathematics, with the shape of the supporting structure being repeated as one looks towards the top.

EifelTower_FromTopOfArcDeTriomphe

The spiral staircase of the Arc de Triomphe is not only mesmerizing from above, but it captures ones imagination all the way up.

LongSpiralStaircaseToTop_ArcDeTriomphe

Though not strictly a geometric shape, this large stone on the Pink Granite Coast in Brittany, France is a beautiful and interesting rock.  One can’t help but think about the winds, rain, sea, and other forces that shaped it.

MonkeyFace_PinkGraniteCoastFrance

This clock looking out from the Musee de Orsay in Paris is an attractive circular lookout.

MuseeDOrsay_Clock

How about the winds and other forces that continue to shape the Dune du Pilat south of Bordeaux, France?  It’s the tallest sand dune in Europe.

DuneDuPilat_France

Moet & Chandon’s 18 miles of caves that house their champagne bottles are pretty amazing.  It’s also impressive that the bottles and stacks of rows of bottles are so perfectly shaped and maintained that there are literally thousands of bottles behind each of the stacks of bottles that you see here.

MoetChandonCave

A Beautiful Path

30 years ago I designed and developed “Truckin'”.  I wanted players to deal with travelling salesman or shortest path problems, without thinking of that as a math problem.  During testing, I saw a number of players come up with excellent paths over the roads to reduce time while delivering goods.  Even with the limited number of routes and roads in the games, many players enjoyed the challenge.  Now researchers have developed new algorithms to find not the shortest route, but rather the most beautiful route.  Think there’s a game idea there?  Maybe.  In any case, I’m looking forward to being able to do a map routing online for a vacation by searching for the most beautiful route between cities rather than the fastest route.

Math and Movies

My love of mathematics is what drove me to a variety of careers in education, game development, software engineering, and science fiction writing.  I often enjoy solving math problems and reading about recent research in mathematics.  If you share my interest in all things math, you might also enjoy this Harvard website I discovered that lists “Mathematics in Movies“.  I’m not sure why they don’t list “The Day the Earth Stood Still” or “Torn Curtain”, so I suggested these as possible additions.  In the trailer below of “Torn Curtain” you’ll see the math scene at about 1:40 into the video.

Fun with math

I usually do the Ole Miss Math “problem of the week” and “algebra” problems when they run the online contest, but lately the site seems to be having problems.  So I went looking for other math problems to work on each week in the meantime.  I enjoy the mental exercise, and it helps me when I tutor math to students preparing for the SAT, GRE, and other exams.  Note that the following websites offer math problems that can be difficult to solve, but if you enjoy math, then you’ll probably enjoy the challenge.  You never know what you might be inspired to work on next.  After reading about perfect numbers, I wrote a story about a math professor who met a multidimensional creature.  It was published, and I look forward to trying my hand at a few more math-related stories.

The Harvard-MIT Mathematics Tournament website has problems and solutions from former contests.

Brilliant.org aims to inspire brilliant science and math oriented students from all parts of the world.

The Art of Problem Solving website has problems and solutions to many former AMC 12 tests.  The American Mathematics Contest 12 (AMC 12) exists to help students on their path to the International Mathematics Olympiad (IMO).

Game of Thrones math

Having watched the latest episode last night, I was having a conversation today with my wife about Game of Thrones.  I said I would not want to live in King’s Landing, mostly because it’s so dangerous.  But if I were to live there, considering my background in math, I would want to be the King’s statistician. I would crunch Westeros’ crime rate big data, which might involve challenging math without a calculator and VERY LARGE NUMBERS.

It’s easy enough to find many local crime rate statistics online, such as at CityRating.com or NeighborhoodScout, but good luck finding the data for Westeros.