EMORY (US)—A bill in the U.S. Senate could open the door for Puerto Rico to become the 51st state. A mathematician at Emory University offers some suggestions for how to make room for an extra star on Old Glory.

If the Senate passes the Puerto Rico Democracy Act of 2010, Puerto Ricans would be allowed to vote to approve statehood. The resolution would then come back to the U.S. Congress for approval.

Slate columnist Chris Wilson posed the question of how to add another star to mathematics professor Skip Garibaldi, who then wrote a computer program for all possible combinations for flags with any number of stars.

Slate used the code to make an interactive flag calculator (below), which generates patterns up to 100 stars.

In Slate, Wilson describes Garibaldi’s process for figuring out all the configurations:

“To do this, he looked at all the flags we’ve flown throughout American history, found the most common patterns, and figured out which of those patterns worked for a given number of stars. Garibaldi kindly sent me his code, which I used to make this interactive flag calculator based on the six most common star configurations.”

According to the Smithsonian, “until the Executive Order of June 24, 1912, neither the order of the stars nor the proportions of the flag was prescribed.”

Want to know more about the American flag? The Smithsonian offers a detailed summary of the flag’s history, including a chronological list of the many rearrangements.