Puzzle "Social Network"

The film has a clear sequence on the social network in which the character writes a perl script to capture images from compassion web servers on campus. Its goal is to get a picture for each member of each sorority with a minimum number of missed members. This is usually due to the fact that he grabs it from the general catalog or other small hoops, such as an empty search, which returns all the members, but it describes one really interesting set and never gives a solution for it.

One sorority site allows you to search and return photos to match members. However, if the search returns more than 20 matches, nothing is displayed.

Assuming there is no other way to access images without a list of female member names, is there an elegant way to get at least most member photos in this case? Or any way at all?

Edit: Here is a link to a scene from the movie, slightly cropped to show only parts of the encoding.

+4
source share
5 answers

I have not seen the film, but let me state some assumptions:

  • You have a search box that searches by name.
  • You do not know the names of community members.
  • There is no other way to access images (except for the search box).

In this case, I do not think there is an elegant answer. This may be one of those cinematic "I translated an ancient tablet in an unknown language." My guess is your best bet is a search for brute force.

  • If you search by common names (and last names), you can get most members.
  • If you have the time and will, the actual brute force (letter by letter, etc.) will ultimately fill in the gaps omitted in paragraph 1.

Edit: Also, theoretically, if the degree of femininity is great enough and everyone is called "Jane Smith," there will be no solution.

+3
source

Pick up the phone, ask for the campus directory and submit these names in a search poll to return participants one at a time.

It is, after all, a social network.

+11
source
findall(prefix): res = set() for char in alphabet: sresults = search(prefix + char) if len(sresults) == 0 and len(prefix) < ABORT_SIZE: res += findall(prefix + char) else: res += sresults return res findall("") 

Note that the solution will take a long time if the distribution of names is not approximately equal, because it will endlessly list all the suffixes for "ab", if 20 people match "abc" and 1 matches "abd". You can change ABORT_SIZE to balance time and completeness. It must be higher than log | alphabet | (n), where n is the (unknown) number of final results.

+2
source

I think you could use a kind of “dictionary attack” - did you know that you can download all the latest and / or names from the US Census Bureau? My other option was what @phihag suggested.

+1
source

I have the book "Random Billionaires" here, and it is quoted directly from his LiveJournal, and ... this did not happen. You know that the guy who wrote the script knows nothing about the code, right?

From what I'm reading, he used something LWP for the spider “Lowell” and “Adams”, then he got to “Dunster”, which had a problem of 20 results, and he wrote: “I'll come back later.” Therefore, as far as I can see, he may have simply given up.

He also writes that "he is making several attempts to compile the script."

0
source

Source: https://habr.com/ru/post/1346778/


All Articles