Bits & Bytes
  • About
Ben Yu

Ben Yu

13 posts •
math

Birthday Attack

Alot of the crypotgraphic software we use relies on hashing and it's uniqueness guarantees to provide core functionality, such asauthentication, message integrity, message fingerprinting, data corruption detection, etc... Guaranteeing this uniqueness however is

Ben Yu Ben Yu
math

Space Race

Another FiveThirtyEight Riddler.The President has bestowed upon you 1 billion dollars with the mission of getting us to an alien artifact as fast as possible! Here's whats available to you: Big Russian

Ben Yu Ben Yu
riddle

Impossible Puzzle

Another weekly FiveThirtyEight riddler, and this one's a mind-bender. Three very skilled logicians are sitting around a table — Barack, Pete and Susan. Barack says: “I’m thinking of two natural numbers between 1

Ben Yu Ben Yu
math

Casino Game

The solution for this weeks FiveThirtyEight riddler is pretty nutty. The riddle is essentially: If you drew random numbers from a uniform distribution from [0,1], what is the expected number of draws

Ben Yu Ben Yu
nba

NBA Player Tracking

Since the 2013-14 season, the NBA has installed special cameras in every NBA stadium allowing teams to track every single player and ball movement, and digitize it into data that their data scientists

Ben Yu Ben Yu
quine

Tupper's self-referential formula

So here's something cool. This formula: $$\frac{1}{2} < \lfloor mod(\lfloor\frac{y}{17}\rfloor2^{-17\lfloor x \rfloor -mod(\lfloor y\rfloor,17)},2)\rfloor$$ will literally plot itself if

Ben Yu Ben Yu
markov

Tweeting with Markov Chains

I'm not sure why I find this so surprising, but it's a somewhat trivial task to write a program that can spew out somewhat coherent sentences, as long as you have a large

Ben Yu Ben Yu
math

1 + 2 + 3 + ...

Here's something mind-blowing: If you take the sum of the first couple of natural numbers you get the triangle numbers: $$T_{1} = 1$$ $$T_{2} = 1 + 2$$ $$T_{3} = 1 + 2 + 3$$ $$T_

Ben Yu Ben Yu
sushi

大和

What better place to get sushi in Tokyo, than by going to an actual fish market? By the time we arrived at Tsukiji Fish Market (around 6:00AM in the morning), the lines

Ben Yu Ben Yu
python

Towers of Hanoi

An age-old puzzle that's challenged kids and pancake chefs for ages: The goal of the puzzle is to move an entire stack of disks from one rod/plate to another with the following

Ben Yu Ben Yu
fractals javascript

Dragon Curve

The dragon curve or Heighway Dragon is a beautiful self-similar fractal first investigated by NASA physicists John Heighway, Bruce Banks, and William Harter. Jack [Heighway] came into my office (actually cubicle) and said

Ben Yu Ben Yu
python

Analyzing NYC Subway Data with Python

MTA provides a public dataset of turnstile data per station since May 2010. We can grab weather data from Weather Underground, who kindly provides historical weather data in CSV format. You can also

Ben Yu Ben Yu
quine

Quine

Inspired by this impressive piece of engineering, I tried to write my one quine in CoffeeScript. The trick I used was to encode the entire file into decimal ASCII and store it in

Ben Yu Ben Yu
Bits & Bytes © 2019
Latest Posts Ghost