The beauty of mathematics: Facemash algorithm analysis in social networks

Source: Internet
Author: User

At the beginning of the movie "Social Network", due to the fact that zackberg was dumped by his girlfriend, he needed to build a website (www.facemash.com) to select the most beautiful girl from Harvard. The logic of the website is very simple, that is, the system randomly selects two female photos from the photo library, and selects the two more "beautiful. That is, the number of clicks on such a website within two hours (to on the weekend) reached 20 thousand, leading to the paralysis of the Harvard network. (Note: Recently, Huazhong University of Science and Technology girls photos are also similar to the online evaluation, and the use of shanzhai domain name www.hust-facemash.com)

Attention of the information should be noted that the above function involves a ranking rule, which was provided by the classmate zackberg. He wrote the formula on the window, as shown below:

The above formula is mainly used to evaluate the scores of girls and determine which girls are the best. Unfortunately, the formula in the movie is incorrect. The actual formula should be as follows:

That is, the power of 1 + 10 is lower than the power of 10. The ranking formula for appeal is not original to zackberg and others, but from Arpad Elo, a Hungarian-American physicist.AlgorithmCalled: ELO rating, which was originally used in chess rankings and is now widely used in football, basketball, and other sports. The Chinese name is the rank.

Arpad ELO considers the algorithm as follows:

    1. Contestants showed a normal distribution in each competition. Later, it was generally believed that the logistic distribution was more reasonable.
    2. In a single game, the winning party is considered to have a good performance, and the losing party is considered to have a poor performance. In a draw, the two sides will have a similar performance.

The

EA/EB is the expected value of A/B, that is, the probability that a/B wins. When contestants a and B compete, the expected performance of the two players can be calculated based on the formula.

RA/Rb is the current rank of Contestant A/B.

If a contestant performs better than expected, the contestant's ranking should rise. On the contrary, if the performance is not as good as expected, the ranking will drop.

Sa is the score (1 or 0) of Contestant A. K is a constant. The larger the value, the faster the score changes. Generally, 16 is used in master chess games. This formula is used to calculate the rank of Contestant A after this competition.

In addition, the logistic distribution is as follows:

 

Original address and reference address

Http://www.biaodianfu.com/fackbook-facemash-algorithm.html

Http://www.douban.com/note/122191956/

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.