Author Archives: possiblywrong

The answer is always “None of the above (or below)”

Consider this multiple-choice problem: Which of the following answers is the correct answer to this question? None of the below All of the below All of the above One of the above None of the above None of the above … Continue reading

Posted in Uncategorized | Leave a comment

Identical packs of Skittles

Introduction “No two rainbows are the same. Neither are two packs of Skittles. Enjoy an odd mix.” – Skittles label Analyzing packs of Skittles (or sometimes M&Ms) seems to be a very common exercise in introductory statistics. How many candies … Continue reading

Posted in Uncategorized | Leave a comment

Random drug testing in the NFL

Introduction “This is supposed to be a random system. It doesn’t feel very random.” – Eric Reid, as quoted on Twitter Last week, Eric Reid was selected to take his fifth random drug test in eight weeks with the Carolina … Continue reading

Posted in Uncategorized | 3 Comments

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 | 4 Comments