In the Facebook movie *The Social Network*, Mark Zuckerberg builds a website to compare the attractiveness of girls. Behind the scenes, we’re made to believe, an algorithm originally developed to rank chess players is employed to rank these women by their attractiveness.

The equations driving the algorithm are shown briefly, written on young Zuck’s dorm room window. From my (possibly incorrect) memory the two equations look like this:

Ea = 1/(1 + 10 * (Ra-Rb) * 400)

Eb = 1/(1 + 10 * (Rb-Ra) * 400)

My interpretation of the left hand of each equation is that these are expectations. I would assume Ea is the expectation that Girl A will win the match. Eb would thus be the expectation that Girl B would win. This is where my puzzlement with these equations begins. Surely Ea and Eb cannot be independently calculated.

My guess as to Ra and Rb are that these are the rates at which Girl A and Girl B have been winning their other matches. For example, if Girl A had won half her matches, Ra would be 0.50. Similarly, if Girl B has won only one of five matches, Rb would be 0.20.

That made sense to me for the brief moment it was displayed in the movie, but actually playing with the equations yields non-useful results. For example, assume Girl A has won 5 of 10 matches, and Ra is 0.50. Assume Girl B has won 2 of 8 matches, and Rb is 0.25. You might expect the algorithm to return something along the lines of Ea = .67 and Eb = .33. In other words, it is twice as likely that Girl A will win as compared to Girl B winning.

Instead the results are nonsensical. Ea = 0.000999 and Eb = -0.001001. Obviously, these cannot be interpreted as expectations/probabilities.

My guess is that one of the following issues is occurring:

1) My memory of the equations is incorrect.

2) The equations are gibberish – meant to look math-y enough for the brief moment they are onscreen.

3) I’m misconstruing the E and/or R terms.

I’m interested, because I happen to be building a number of websites that use a “bake-off” method very similar to that of Facemash. Currently, I’m working on Lepidoptera – an online to-do list with bake-off priority contests.

I searched for awhile for formal algorithms to perform ordering based on head-to-head contest results and came up empty. So the algorithm I use is based on my own best reasoning. I’d like to understand the Facemash algorithm so I can compare results.

Anyone else interested in figuring this out? Leave me comments or blog back.