Mathematics and Magic


On October 4, the LUMS Math Department hosted an extraordinary event that blended “Mathematics and magic,” featuring renowned mathematicians Dr. Krerley Oliveira (UFAL, Brazil) and Dr. Imran Anwar (LUMS, Pakistan). The event was a captivating demonstration of how mathematical principles like the pigeonhole principle, probability, and permutations can be used to perform magic tricks, leaving the audience both entertained and intellectually stimulated. 

Dr. Oliveira started the session by introducing the well-known pigeonhole principle, linking it to intriguing real-life problems, such as the birthday paradox. This seemingly simple yet profound principle immediately hooked the audience, setting the stage for the magic to follow. As he transitioned into his first card trick the energy in the room rose. With a shuffled deck in hand, Dr. Oliveira invited a student volunteer to select a card. Through a series of strategic card divisions into two groups, he was able to predict the chosen card with remarkable accuracy, leaving the audience in disbelief. The elegance of the trick was in its simplicity, yet the underlying mathematics hinted at something much deeper. 

The next act brought a new level of excitement. Dr. Oliveira called on five participants from the audience, each selecting a card at random. This time, with the help of his colleague, Dr. Imran Anwar, Dr. Oliveira was able to predict the fifth card by analyzing the sequence of the four cards handed to him, one by one. The seemingly impossible feat had the audience on the edge of their seats. The precision with which the cards were predicted led many to question how it could be done, leaving students and faculty members in awe of the mathematical reasoning behind the performance. 

The event's climax came with a trick that seemed to defy logic entirely. Using only 32 cards, shuffled thoroughly by the audience, Dr. Oliveira asked five students to pick a card each. After asking unrelated questions like their birthdays or favorite fruit, the only relevant detail he used was the color of the card suit. With this minimal information, he was able to predict the suit and number of each chosen card, astonishing the crowd. The "wow" moment came when he revealed the trick’s underlying structure—a De Bruijn sequence—but even then, the sheer complexity left many young minds spinning. 

The event was a perfect blend of entertainment and education. Dr. Oliveira wrapped up by breaking down the tricks and explaining the mathematical principles behind them, revealing how probability and permutations made the seemingly magical tricks possible. The audience walked away with a newfound appreciation for the wonders of mathematics, both practical and theoretical. 

Special thanks to Ms. Noreen Sohail, Mr. Qamar Hussain, and Mr. Javaid Qayyum (the author of this email) for their continued organizational support. 

For more pictures, visit our Facebook page. 

Here are some highlights from the event: