Author Archives: possiblywrong

Generating Mini-Crosswords

Introduction The New York Times publishes “mini-crosswords,” which are crossword puzzles on a relatively small grid (usually 5×5), without any black squares, so that every row and column of the grid must spell a word. The figure below shows an … Continue reading

Posted in Uncategorized | Leave a comment

Disabling subnormals in MATLAB

Suppose that we want to compute the following expression, somewhat contrived in complexity for the purpose of example: The following MATLAB code implements this formula, and measures the time required to evaluate it: Now suppose that we execute this same … Continue reading

Posted in Uncategorized | Leave a comment

A lattice path puzzle

This past week’s Riddler puzzle on FiveThirtyEight asks for the number of different paths of minimum length from a starting intersection of city streets to a destination blocks east and blocks north. Put another way, moving on the 2D integer … Continue reading

Posted in Uncategorized | Leave a comment

Arbitrary-precision rational arithmetic in C++

Introduction This is a follow-up to a post from several years ago describing a C++ implementation of arbitrary-precision unsigned integer arithmetic. This weekend I extended this to also support arbitrary-precision signed integers and rational numbers. Although this started as an educational … Continue reading

Posted in Uncategorized | 3 Comments

Uncertainty in trading passengers for fuel

I had an interesting experience recently while preparing for a flight from Los Angeles to Baltimore. It was a completely full flight– initially, at least– with myself and 174 other passengers who had already boarded the Southwest 737-800, seemingly ready … Continue reading

Posted in Uncategorized | 4 Comments

An urn puzzle

It has been a while again since I last posted a puzzle, so… You have once again been captured by mathematically-inclined pirates and threatened with walking the plank, unless you can win the following game: some number of black balls … Continue reading

Posted in Uncategorized | 2 Comments

On average, we die a decade earlier than expected

“Doctors say he’s got a 50/50 chance of living… though there’s only a 10% chance of that.” I’ve lately had occasion to contemplate my own mortality. How long should I expect to live? The most recent life table published by the Centers … Continue reading

Posted in Uncategorized | 1 Comment