Saturday, November 12, 2011

51 Star Flag

The United States Flag is beautiful.  Throughout our country's history, the flag has changed many times.  The general concept remained the same, but the number of stars has changed repeatedly as new states were added.  This gave the country an interesting mathematical challenge - how to arrange n stars in a rectangle in an aesthetically pleasing way.  America may once again be faced with this challenge if Puerto Rico becomes a state.  I think that many Americans dread this - not because they dislike Puerto Rico, but because it would mean fitting one more star on the flag, and ruining its symmetry.  Well, rest easy, America.  Its symmetry is not in jeopardy.  There is already a plan for a 51 star flag that is quite symmetrical.  But this begs the question: what are the techniques for fitting n points (stars) into a rectangle?


Let's start by analyzing the current 50 star flag.  It may surprise you to learn that the arrangement of stars on the 50 star flag has nothing to do with the fact that 50 is a multiple of 10.  The fact that 5 x 10 = 50 does not matter.  The more relevant fact is that (9 x 11 + 1) / 2 = 50, as you will understand in a few minutes.  The 50 star flag is what I call a 'checkerboard' flag.  Checkerboard flags are when you cover the blue region of the flag in a checkerboard pattern, and you put stars only on the white squares.  This is why the 50 star flag seems to be made up of diagonal lines; the diagonal lines are like the lines that a bishop moves along on the chess/checkerboard.


If our checkerboard was, say, 4 rows high and 6 columns wide, it would have 4 x 6 = 24 squares on it.  Since every other square is white, we can count all the white squares by dividing this number by 2.  So, a 4 x 6 checkerboard gives us 24 / 2 = 12 white squares.  This gives us the formula:

Number of stars = rows x columns / 2

Also note that we can swap the colors and have a flag that is a mirror image of the original.

It gets more complicated, though, if the number of squares is an odd number.  If it is an odd number, then you cannot just divide by 2 to get the number of stars - you would not get an integer.  What you do instead is divide it by 2 and then take the integers above and below your answer.  For example, if the number of squares is 99, you would divide by 2 to get 49.5.  Then you would take the integers immediately above and below this answer: 49 and 50.  This means that you can get a 49 star flag or a 50 star flag, depending on which squares you pick to be white.  If you pick the corners to be white, you get a 50 star flag, and if you pick the corners to be black, you get a 49 star flag.

That 9 x 11 pattern with the corners white is the standard pattern for the current United States flag.

This gives us two new equations:

Number of stars = ( rows x columns + 1 ) / 2   (corners white) 
Number of stars = ( rows x columns - 1 ) / 2   (corners black)

There is one more kind of flag we have not talked about.  This is a simple grid flag.  It is like the checkerboard flag except that you put stars in all of the squares, not just the white ones.  The formula for this kind of flag is simple and hardly worth elaborating on:

Number of stars = ( rows x columns )


Putting it All Together:

The goal, now, is to find a suitable pattern for a given number of stars.  So, given 51 stars, what patterns will work?  The mathematics make this easy.  Just solve all of the above equations for rows x columns, like this:

rows x columns = (Number of stars) x 2       even checkerboard flags
rows x columns = (Number of stars) x 2 - 1   odd checkerboard flags, white corners
rows x columns = (Number of stars) x 2 + 1   odd checkerboards flags, black corners
rows x columns = (Number of stars)           simple grid flags

We can use these formulas to find patterns for a 51 star flag.  By plugging 51 into the formulas above, we see that rows x columns can equal 102, 101, 103 or 51, respectively.

Now we need to factor these numbers to see if any are suitable.  101 and 103 are prime numbers, so they will not work.  51 is 17 x 3.  But a 17 x 3 grid flag would be ugly, so 51 will not work.  102 is 17 x 6.  A 17 x 6 checkerboard flag would be just fine!  So there is our answer: a 51 star flag should be a 17 x 6 checkerboard flag:

The 51 star flag, a 17 x 6 checkerboard flag.  You may notice that the checkerboard is squeezed.  It has to fit 17 columns, but only 6 rows.  This pushes the stars together horizontally.  Despite this, the flag still looks good.  Checkerboard flags can handle a lot of squeezing before they start to look funny.

This technique can be used to find suitable flags for all the numbers from 50 to 100 except 62, 79 and 89.  Many flags have several suitable arrangements.  Here are arrangements for flags 51 to 70:


Now you must be wondering what you can do with a 62, 79 or 89 star flag.  Actually, there are plenty of options.  But that is for another post.

You will notice that there are only five simple grid flags in the above display: 54, 60, 63, 66 and 70.  Good grid flags are quite a bit more scarce than good checkerboard flags.  And, frankly, I do not think that grid flags look very good.  All of the grid flags shown here could be replaced with checkerboard flags of the same number of stars.  I chose to use the grid flags in this display for the sake of diversity, but if it were up to me, they would all be checkerboard style.  The only grid flag that I like is the 48 star 6 x 8 grid flag, and that is only because it was used in World War II, and raised in the famous photo at Iwo Jima.

There are a couple more interesting styles of flag, but they will be left for a later post.  If just one reader sleeps more easily knowing that we do not have a 51-star flag crisis looming, my work here is done.

9 comments:

  1. That's right: this blog is not all about space. No science is off limits! However, space is really cool, so you CAN expect to see a lot of it.

    ReplyDelete
  2. Super interesting. I will in fact rest easier at night knowing that we can let Puerto Rico become a state. In my mind grapes I imagined a big argument in congress that we couldn't jeopardize the integrity of our current flag design with an awkward number like 51. Good to know mathematicians have found the answer!

    ReplyDelete
  3. This just got suddenly very relevant- I have to admit, I was a little disappointed to find out that there were no further post here- I *am* wondering what we can do with a 62, 79, or 89 star flag!

    ReplyDelete
  4. That's great you posted this 1 year ago, are you a psychic? I'm curious what the 79 and 89 end up looking like with this algorithm, and how they can be improved.

    ReplyDelete
    Replies
    1. Thanks, haha no not psychic. I have actually wondered about star flag star patterns for a long time. 62, 79 and 89 are answered in my post just now.

      Delete
  5. ---*--*--*--*--*--*--- 6
    --*--*--*--*--*--*--*-- 7
    -*--*--*--*--*--*--*--*- 8
    *--*--*--*--*--*--*--*--* 9
    -*--*--*--*--*--*--*--*- 8
    --*--*--*--*--*--*--*-- 7
    ---*--*--*--*--*--*--- 6

    ReplyDelete
  6. ---*-*-*-*-*-*--- 6
    --*-*-*-*-*-*-*-- 7
    -*-*-*-*-*-*-*-*- 8
    *-*-*-*-*-*-*-*-* 9
    -*-*-*-*-*-*-*-*- 8
    --*-*-*-*-*-*-*-- 7
    ---*-*-*-*-*-*--- 6

    try it on checkerboard !

    ReplyDelete
  7. _______________________________________________
    * * * * * * |_____________________________|
    * * * * * * * |_____________________________|
    * * * * * * * * |_____________________________|
    * * * * * * * * * |_____________________________|
    * * * * * * * * |_____________________________|
    * * * * * * * |_____________________________|
    * * * * * * |_____________________________|
    _________________ |_____________________________|
    _______________________________________________|
    _______________________________________________|
    _______________________________________________|
    _______________________________________________|
    _______________________________________________|

    ReplyDelete