Another attempt to prove that the world is small

    Everyone has already heard about the theories of six handshakes and the like. After listening to these, I decided to write a small userjs for the opera, (raw, until I post it), which saves data from those pages of the site that I visited, namely friends lists. All information is neatly stacked in a mysql database in the format id — id of a friend — name of a friend. I sat in contact after that for about 10 hours, crawling on the pages of friends, and not only. It turned out that I knew Pavel Durov through 6 handshakes. (if anyone is interested, a clumsy, but dating graph was drawn ).
    I visited each of the pages personally. I did not write any grabbers, parsers, automatic machines!
    So, in order to continue the experiment, I suggest:
    Several volunteer volunteers can leave their vkontakte profile id in comments. Requirement - A friend list must be open. I try to draw a chain of acquaintances in a day before Pavel Durov and before me.
    Zivaka, id288968 (id brackets):
    Dmitry Zivaka Mamaev (288968) - Evgeny Glazyrin (474078) - Leonid Kalentiev (424064) - Alexey Alex Yumanov (9650028) [they lived in the same dormitory] - Damir ainu Fakhrutdinov (2416637 ) [I]
    Dmitry Zivaka Mamaev (288968) - Eugene Glazyrin (474078) - Leonid Kalentiev (424064) - Roman PhotoGraf Khasaev (4459542) —Amir [Herr Mad] Ivanov (2315639) [former colleague] - Damir ainu Fakhrutdinov ( 2416637) [I]
    The rest of the updates under the

    cat UPD2:
    bishop3000, id3624179:
    Oleg bishop Fedorov (3624179) - Alexey Xor Sukhoruchko (782864) - Anna Chernykh (202063) - Alexander Viktorovich Bespalov (17) - Pavel Durov (1)
    4 Handshakes before Durov, before me 8 respectively (Anna Chernykh (202063) and Mitenka Mironov (70) they have several common acquaintances, and the last one is shown on the graph)
    UPD3: It is rather difficult to find contacts from people who closed friends lists or who shower in Ukraine, Belarus, etc. Sorry. I found seven people. I consider the experiment a success. But not finished =)
    UPD4: Kolger, id210630
    Nikita Smirnov (210630) - Elena A. Popova (49838) - Nadya Petrova (3461) - Mitenka Mironov (70) —Alexander Viktorovich Bespalov (17) - Pavel Durov (1)
    UPD5: Taxup, id1516701
    Tahir ARES.KZ ™ Bikkinin (1516701) - Maxim Fridrikin (249136) - Andrey Lyubimov (61983) - Roman * RomaNTIC * Akamelkov (219) - Pavel Durov (1)
    UPD: VasilioRuzanni, id427647
    Vasilio 'El Nino' ​​Ruzanni (427647) - Tatyana Tanni Real Ma Yunkina (148457) - Tatyana Plutalova (34) - Pavel Durov (1)
    Thanks to Vasilio 'El Nino' ​​Ruzanni a bug was discovered in the script (quotation marks in a nickname + crooked SQL query = error)

    lifeforweb, id575175
    Igor Gusarov (575175 ) - Taras Kutorov (604746) —Veniamin Meltsev (128195) —Ilya (NashRok-Peter) Sakmarov (94759) —Svetlana Klimicheva (822) —Asya Shchegol (254) —Pavel Durov (1)
    UPD: For
    knowledgeable and able people - request ! Tell me with the solution to the problem:
    So, the task: We have a graph. It is set in the form of a table: Id, Id of a friend, name of a friend.
    It is necessary to find the shortest path between the vertices of the graph, spaced from each other by more than 5 edges.
    Limitations: the database in MySQL, the database is large, so you cannot merge it all into an array. But it is possible to get a person’s friend list. Getting a list of friends of the second round takes from one to 5 seconds. Accordingly, the number of requests and execution time is limited (for example, the script execution time is 20 seconds). Wednesday: php5.
    I found a solution with 4 edges, by downloading lists of friends of the second round, and sorting them out among themselves.
    The friends table has 4 columns: id, myid, frid, name. 1 key field, second person id, third friend id.
    A piece of the dump is here . The table should not be called friends_copy, as in the dump, but friends.
    Current Search Algorithm(only 4 handshakes):
    rozboris id738345
    Boris Rozboris Rosenstein (738345) - Ilya Petrovich Razenshtein (721470) —Andrey Lopatin (11191) - Pavel Durov (1)
    upd: The connection is not with Durov and with me (although she is also there), but between two habermen:
    tinkk id888570,
    Rchee id241410
    Sergey t1nkk ... Ponomarenko (888570) - Dasha * without_me * Shevlyakova (1221260) - Anya - Lady Fox - Khurkhulu (2379374) - Elizaveta Likogra Kondakova (5064604) - Danila Lenkov (896189) - Roman Kubasov (384539) - Maxim Zakharov (274521) - Art Loving myself Bandin (241410)
    upd: kiroru id48437:
    Kirill Kiro Pavlov (48437) - Evgeny Andrianov (2108557) —Nargiz Narciss Kulizade (967409) - Denis AIK Shchetnev (332306) - Elvira * Red_Velha * Khabibulina (779335) —Diana Kayumova (6753283) 24 Damir ]
    Kirill Kiro Pavlov (48437) - Evgeny Andrianov (2108557) —Nargiz Narciss Kulizade (967409) - Denis AIK Shchetnev (332306) - Elvira * Red_Velha * Khabibulina (779335) —Elexillander Ievna 33 (1379) - Ievlev (33) Furtikova (54) —Tatyana Plutalova (34) —Pavel Durov (1)
    upd: haberman Timon, id222737
    Pavel Durov (1) - Alexander Viktorovich Bespalov (17) - Anna Chernykh (202063) - Anton Prozorov (1188737) - Elizaveta Gavrilova (114645) —Natalya Ulyankova (119648) - Tatyana Yaikina (1072856) - Maria Chernysheva (14335577) - Timur Timurka Tazetdinov (222737)
    upd:zemlanin id6821354
    Anton zemlanin Verin (6821354) - Alexey Woody Hudochenkov (5,021,145) - Galina Cheshuinova (7,327,547) - Arthur Araslanov (1,562,516) - Polat Salikhov (1,178,113) - Aliya Islamov (4,218,480) - Damir ainu Fakhrutdinov (2416637) [I]
    AND :
    Anton zemlanin Verin (6821354) - Alexey Woody Hudochenkov (5,021,145) - Galina Cheshuinova (7,327,547) - Arthur Araslanov (1562516) - Anastasia Yurina (160 885) - Rail Zamaletdinov (676 776) - Damir ainu Fakhrutdinov (2416637) [I]
    I apologize if I missed someone! There were many requests, Some closed the lists of friends, some could not be found. So, Count: Habralyudi, me and Pavel Durov are highlighted.

    Also popular now: