Posts

Showing posts with the label Mathematics

Calculus and First Principles

Image
I am getting to the age when my son is studying calculus under the tutilege of  a tutor.  Although he is a few years ahead at math in school, I have to admit the very thought of him doing derivatives makes me feel old.  There is also nostalgia however, as I rekindled my interested in calculus by writing this piece -- and yes, I needed a memory jog from the Internet to complete the formulas.   Most people meet calculus as a set of rules.  Differentiate this.  Integrate that. Memorize formulas. Apply them until the answers come out correctly.  It feels almost mechanical, like a toolkit you learn to use without ever opening it to see how it was built.    But calculus is not really about formulas. At its core, it is about something much more fundamental: how change actually works when you zoom in close enough. The idea of first principles is simple. Instead of accepting shortcuts or memorized rules, you rebuild the concept from the most ba...

Everyday Queueing #3: Why Airplane Boarding Feels So Inefficient

Image
I used to pay little attention on boarding at the airport because of my elite status with various airlines. But retirement has kept me grounded and almost swiped my record clean in recent years. Recent trips, including one to Colombia with an infamous American airline, had me thinking more about the science behind plane boarding.   Anyone who has boarded an airplane enough times has likely experienced the strange choreography that unfolds before takeoff. Passengers stand up almost immediately when boarding begins, lines begin forming long before their assigned group is called, and eventually a slow procession starts moving toward the aircraft. For a few moments the line appears to flow smoothly. Then everything stops. Someone is lifting luggage into an overhead compartment. Another passenger realizes they are seated twenty rows further back. A family begins negotiating seating arrangements while the rest of the line quietly waits. Movement resumes briefly before another i...

Everyday Queueing #2: Why the Fastest Lane Often Becomes the Slowest on Highways

Image
There is a familiar ritual that unfolds on highways almost every day. You are driving in moderate traffic when a neighboring lane begins moving slightly faster than yours. At first, the difference is subtle. A few cars pull ahead, creating the impression that a better option exists just a few meters away. Almost instinctively, your attention shifts. You begin comparing speeds, scanning gaps, and calculating whether a lane change might save time. Eventually, convinced that an opportunity has appeared, you switch lanes with quiet confidence. For a brief moment, the decision appears justified. The new lane moves smoothly and the cars around you continue forward. Then something strange happens. The lane slows. Vehicles begin compressing together. Meanwhile, the lane you just abandoned suddenly starts moving. Cars you previously passed now drift ahead while you sit wondering whether traffic possesses a strange sense of humor. Experiences like this are common enough that many drivers jokin...

Everyday Queueing #1: Why the Shortest Checkout Line Is Sometimes the Wrong Choice

Image
There is a small ritual that almost everyone performs at supermarkets. We scan the checkout area, count the number of people in each line, glance at shopping carts, and make a quick calculation in our heads. The logic seems obvious: fewer people should imply less waiting. Yet many of us have experienced the strange frustration of watching a longer line move faster while ours becomes trapped behind a price check, a failed barcode scan, or a customer searching endlessly for a wallet. At first glance this feels like bad luck, but mathematics suggests something more interesting may be happening. Most people treat supermarket checkout as a simple optimization problem. You arrive, observe a few lines, and choose the one with the smallest number of people. The assumption is intuitive: fewer customers should imply shorter waiting time. However, this ignores the fact that queueing systems are not governed by headcount alone, but by stochastic service dynamics. In queueing theory, the system is...

Nash Equilibrium: Good and Bad Outcomes

Image
Towards the end of 2024, I left the 9 to 5 routine given my financial goals were achieved.  It felt great not needing to hug my phone to sleep and being able to wake up at whatever godly (or ungodly) hour desired.  Fast forward six months, the retirement routine became mundane.  I needed to find meaningful use of my newly found time.  Between street and league soccer, writing a book, exotic getaways, relocation back to my adopted home country, all the while taking on advisory gigs with interesting companies, life seemed like a handful.  Somehow, I managed to find time to study various topics of interest.  One topic that really caught on was game theory.   Learning game theory was a self-improvement initiative.  I wanted a life broader horizon and be better equipped when when dealing with others.  My definition of game theory is the study of interactive decision making of more than one party, where the outcome of each particpant or player...

Book Review: Beyond Infinity

Image
Geeking out is something I yearn to do from time to time. Having seen a documentary on infinity from Netflix last year, I decided to pick up a book on the topic.  Beyond Infinity , by  Eugenia Cheng , is an excellent guide delving into this mind-boggling notion. In this book, Cheng explores some key aspects of infinity that challenge our intuition and understanding of mathematics: Numbers Numbers Numbers, natural, rational, irrational and real:   Cheng explains that these number sets are infinite in nature but some are "more infinite" than others.  For instance, the set of natural numbers are smaller than its superset of rational numbers, which in turn are smaller than the set of real numbers.  So far so good?  But...  Infinity is but an abstract notion: It certainly is not a number   to which the rules of arithmetics apply: ∞ + 1 = ∞ (addition/subtraction does not apply) 2  ⋅  ∞ = ∞ (neither does multiplication/division) 1/∞ =...

A Very Real Life Application of the Stable Marriage Problem

I recently stumbled upon a mathematical problem known as the  Stable Marriage Problem (SMP).  Per Wikipedia, the problem is commonly stated as: Given N men and N women, where each person has ranked all members of the opposite sex with a unique number between 1 and n in order of preference, marry the men and women together such that there are no two people of opposite sex who would both rather have each other than their current partners. If there are no such people, all the marriages are "stable". The SMP has real-life applications to any problem requiring stable pairing of two sets of equal size. In fact, this problem is always solvable using the Gale-Shapley algorithm . There is a rather big catch however.  While the marriages are always stable, they may not be ideal from the vantage point of an individual.  To illustrate this, imagine three men A,B,C and three women X,Y,Z. Here are their ranked preferences for members of the other group:...

9 Equations a True Geek Should Know

Came across this  article  which is entertaining to read while keeping score!  I scored 2 of 9 - Uncertainty Principle and Maxwell's Equations. The good news is I do not qualify as a geek, but that also means there is so much more to learn when I retire. -PTS

Prime Numbers and Encryption

Want to make   $250 000 ?  Find a big prime number, a really big one. It turns out there are organizations  ready to dough out good cash for a really large prime number.  This is because primes are used in   RSA cryptography . RSA Algorithm Let's look at the algorithm: 1.       Multiply two large prime numbers  p  and  q  to get the product  N 2.       Find two numbers  e  and  d , such that  ed = 1mod((p-1)(q-1)) , where  e  and  N  are relatively prime meaning they do not share any prime factors. 3.       Let's call  M  the original message and  C  the ciphered message:  a.       To encrypt: C = M e mod(N) b.       To decipher: M = C d mod(N)  In essence, using the public key   ( N,e)  will...