Quantcast
Channel: Algorithm Soup
Browsing all 10 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

What Linearity of Expectation Has to Do with Needles and Pi

Take a needle of length and drop it in a random position on a hardwood floor whose boards have the same width :     There’s some probability that the needle crosses between two adjacent floorboards. It...

View Article


Image may be NSFW.
Clik here to view.

The World’s Simplest Interesting Algorithm

In this post, I want to tell you about what I think might be the world’s simplest interesting algorithm. The vertex cover problem. Given a graph , we want to find the smallest set of vertices such that...

View Article


Image may be NSFW.
Clik here to view.

The Many Quirks of Qsort

  In 1973, the author of the C programming language Dennis Ritchie was such a fan of the quicksort algorithm that he decided to name the language’s sort function after it. In this post, I’m going to...

View Article

Image may be NSFW.
Clik here to view.

My favorite example of: the pigeonhole principle

This is part of a new sequence of posts titled, My favorite example of: , for different values of . Today, is the pigeonhole principle. The Erdös-Szekeres Theorem: Consider any sequence of distinct...

View Article

Image may be NSFW.
Clik here to view.

My favorite example of: the probabilistic method

The “probabilistic method” is the art of applying probabilistic thinking to non-probabilistic problems. Applications of the probabilistic method often feel like magic. Here is my favorite example:...

View Article


Image may be NSFW.
Clik here to view.

What is the actual infection rate at universities?

Here’s a question: what fraction of students at MIT have COVID-19 right now? Since MIT tests students twice a week, this question should be pretty easy to answer. But it’s not. That’s because MIT,...

View Article

I’m Above Average and So Are You

Derek Severs’ short essay “I Assume I’m Below Average” recently went viral on Hacker News. The article begins: Ninety-six percent of cancer patients claim to be in better health than the average...

View Article

Image may be NSFW.
Clik here to view.

Train Tracks with Gaps: Applying the Probabilistic Method to Trains (Best...

Some Context:  This post is a shortened version of a paper that won the best-paper award at FUN 2020.  The paper is ostensibly about trains but the real-world applicability may be somewhat… limited....

View Article


Image may be NSFW.
Clik here to view.

A Hash Table that Uses Less Space Than the Items that it Stores

When people talk about “space-efficient hash tables”, they are usually talking about the following type of guarantee: If we are storing keys, each of which are bits, then the total space usage should...

View Article


Image may be NSFW.
Clik here to view.

Driving Faster Takes Longer

I often drive between Boston and New Haven. While on the road, I find myself pondering a simple question: If my only goal is to arrive as fast as possible, how fast should I drive? Ignoring things...

View Article
Browsing all 10 articles
Browse latest View live


Latest Images