Posts

Showing posts with the label mathematics

Great Big House in New Orleans and the Josephus problem

Image
Six years ago, when I was a freshman in college, I wrote a series of three posts on this blog about a game that I used to play in elementary school music class called "Great Big House in New Orleans". In those posts, I attempted to write a program in Java and Python that would calculate the winning position of the game given the number of players. "Great Big House in New Orleans" (published Monday, November 06, 2017) "Great Big House in New Orleans: Improved Code" (published Thursday, November 09, 2017) "Great Big House in New Orleans: The Special Case" (published Friday, February 02, 2018) At the time, I had less than a year of experience in computer programming and had only recently decided that I would study computer science. Because of my naivete, the posts have many problems, and they are a little embarrassing to look back on. The posts ramble excessively about basic programming principles and assume without proof that a pattern will hold...

Secret messages

eetmn emt ybc lueba illhx When I was in elementary school, my friends and I came up with a "secret language" which we used to send messages to each other without others (e.g. teachers, classmates) knowing what the message said. It was not really a new language more than it was a variation of Pig Latin. What we did was we would write the message in English, then take the first letter of each word, shift it to the end, and then add an arbitrary letter to the end of the resulting word. For example, to translate the word "hill" into our secret language, take the first letter 'h' and move it to the end so that the word becomes "illh". Then, add any letter you want to the end of that. The intent of the last letter was to throw people off, leading them on into thinking the last letter was meaningful, when it really was just arbitrary, and it also meant that the same English word can be represented in at least 26 ways. To translate back into English, you...

The Tale of the Green-Eyed Dragons

Here's a mind-blowing logic puzzle that my math professor shared last week. Problem A long time ago, there lived a tribe of 100 green-eyed dragons. These dragons had a rule: if any dragon in the tribe deduces what the color of his eyes was, then that dragon must commit ritual suicide by the end of that day. Aside from this, the dragons lived peacefully. Although each dragon could see the eye color of every other dragon, no dragon was cruel enough to discuss eye colors with other dragons. For all each dragon knew, he or she could be the one dragon that had blue eyes among 99 green-eyed dragons. One day, however, a visitor arrives to the tribe. On the day she arrives – we will call this day 1 – she remarks, "I see a dragon with green eyes." The visitor leaves later that day. At the end of day 1, no dragon in the tribe performs the ritual. At the end of the next day (day 2), no one performs the ritual. In fact, after the visitor leaves, the dragons continue to live in p...

Great Big House in New Orleans: Improved Code

Image
On Monday, I wrote a post about how I wrote a program in Java and later Python that could solve an old game I used to play in my elementary school music class called Great Big House in New Orleans. It was a lengthy post, and you can read the entire thing here . Basically, in the game, all students in the class sat in a circle and passed a stuffed pumpkin around while singing a song. The rules of the game were such that every eighth student gets out (i.e. exits the circle), and the last student to remain in the circle wins. The program that I initially wrote in Java used arrays to simulate an actual game of Great Big House in New Orleans. However, using data of winning positions based on class sizes up to 1000, I was able to identify a pattern in consecutive winning positions that I could use to simplify my program so that it could solve for the winning position without having to simulate a single game with arrays or lists. The code is structured as follows. You are given (by the ...

Great Big House in New Orleans

Image
Note: This post has many errors and omissions. See this 2024 post for an update. When I was a student at Scottish Corners Elementary School, we occasionally played a game in our weekly music class with Miss Bowman called Great Big House in New Orleans. In this game, all of the students in the class sat in a circle. One student – the student at position 1 – held a small stuffed pumpkin. While singing the following song, we passed the pumpkin around the circle. Great big house in New Orleans, Forty stories high, Every room that I've been in, Filled with pumpkin pie. The purpose of this exercise was to teach elementary school students about rhythm. As a rule, the pumpkin has to be passed to the next student on every beat of the song. A student can't ignore the rhythm of the song and pass the ball offbeat (i.e. too quickly or too slowly). The pumpkin has to be passed on the beat. Whoever has the pumpkin when the song reaches the word high  and the word pie  is out of the ...

Fermat's Last Theorem

We often wonder what it is about humans that sets us apart from every other species of life on Earth. We can communicate with each other in languages more complex than any other life form; we can invent tools and machines that make life for us longer and easier. We have the stunning ability to prove the truth with our minds—and we do this through reason. The 18th-century Age of Enlightenment sealed the deal for reason, establishing it as the highest source of authority for mankind. If there is any one trait that sets us apart from all other life on Earth, it has to be our impeccable ability to reason: the ability to conclude that if all humans are mortal, and Mr. Stroh is a human, then Mr. Stroh must be mortal. The foundations for reasoning are the rules of logic—and so too are the foundations for mathematics. Fermat’s Last Theorem states that equation x n + y n = z n will have no whole number solutions when n > 2. The theorem was proposed by French mathematician Pierre de ...