Over in this thread we have had a little fun looking for the lowest number NOT found on Google. We haven’t found a new low now for a couple days, but that doesn’t mean we have reached the bottom. If anyone else wants to join the search, please do.
But this thread is about how best to go about identifying the absolutely truly lowest number that returns zero/no hits (do read the “rules” about what is allowed ). Are there algorithms? Strategies? Tricks for more effective searches? One of the sites in the other thread’s OP mentions using a “script” of some sort to speed things up; anyone know how to write one?
Here was my first attempt: bonequest (probably only works in IE, by the way)
This has the downside that cross-frame scripting cannot access the content in frames from other domains to see if they contain a particular string (e.g. “did not match any documents”), so you’re required to sit there and watch it. Also, it doesn’t know when the page has fully loaded, so you have to tune the amount of time between queries so you can be sure to see the results.
The other approach I used was to write a unix shell script. Here is the code:
#!/bin/sh
num=10000000
if [ "$1" != "" ]
then
num=$1
fi
echo starting at $num
while true
do
url='http://www.google.com/search?hl=en&ie=UTF-8&q='$num
lynx -source $url > /tmp/googlenumberstmp
grep 'did not match any documents' /tmp/googlenumberstmp > /dev/null
if [ "$?" == "0" ]
then
echo nothing found: $num
exit 1;
else
echo checked: $num
fi
num=$((num + 1))
done
You specify the number to start at and it increases the number until it finds one that returns no results. With my connection, it’s testing about two numbers per second, and I started it at 10,000,000. So I’ll let you know when it hits.
Counting down from a known number is only definitive if you count all the way down, in which case I don’t see how it could possibly be considered a better method in any way. You’re more likely to get “hits” sooner, I’d guess, but you can’t know whether these are the definitive hits until you get all the way through. Counting up, you know as soon as you hit the number.
Google’s advanced search page allows you to search for pages containing numbers within a given range. For example, you can ask it to return all pages which contain any number between 5 and 15. I think that you might be able to use this somehow to at least narrow down your search.
Well, at 2pm yesterday, there were no hits for 11046726 (I still have the results page saved), but now there are. It’s hard to “win” at a game with such fleeting results…
I started a second copy of my script at 11040000 to reach that, specifically because of Colophon’s comment.
And for what it’s worth, my script has been running for almost 48 hours now after starting at 10,000,000, and it still hasn’t gotten a hit. It’s up to 10326600 now, which makes my estimate of “two per second” pretty darn close for a guess (it’s about 1.89 per second).