Problem I. 279. (November 2011)
I. 279. The webpage www.facebook.com has multiple IP addresses changing from time to time. To see this, simply issue an nslookup www.facebook.com command from the command line several times, and you can get different results within a minute.
Create a statistics report to investigate this change of the IP address. You should use Linux operating system possibly on a machine that has continuous Internet connection. (To avoid installing Linux on a separate partition on your machine, you may want to use a Live system booting from a CD, see www.livecdlist.com, or a Linux version that can be installed within Windows, then simply removed, such as wubit or Ubuntu Linux.)
To begin collecting data, first create a shell script named facebook.sh. Your operating system should run this script every minute. By using Unix commands, your script should determine the actual IP address of www.facebook.com together with the date and time, then write these into the file facebook.out: each line of the file should contain the actual date and time, and the IP address, separated by tab characters, like 2011.10.16 10:23 184.108.40.206.
Then you should create the text file facebook.stat with your statistics, each line containing one IP address, the number of its occurrences, finally the average time (rounded to minutes) between two successive occurrences of the IP address. If a particular IP address has been used only once, this last value should be zero. Your file should be sorted according to increasing IP addresses, and values should be separated by tab characters. The file containing this statistics should be created by an fstat.sh script.
You are allowed to use only programs and scripts of the Linux operating system. If necessary, commands can create further files. You should collect and evaluate at least 4 hours of data.
You should submit the gzip compressed file i279.gz containing the requested scripts and text files, further, the file idozites.txt (``timing''), describing how you managed to run the appropriate script in every minute.
Deadline expired on December 12, 2011.
Sorry, the solution is available only in Hungarian. Google translation
A mintamegoldáshoz több versenyző munkájából választottunk.
Antal János Benjámin 12. osztályos nyíregyházi versenyző részletes ismertette az időzítés lehetőségeit (idozites.txt).
Az adatok gyűjtését végző script Kovács Balázs Marcell 9. osztályos budapesti tanuló munkája (facebook.sh).
Az adatok kiértékelését legpontosabban Gema Barnabás 11. osztályos veszprémi versenyzőnk végezte el (fstat.sh).
7 students sent a solution. 10 points: Kovács Balázs Marcell, Kucsma Levente István. 9 points: Antal János Benjamin, Gema Barnabás. 8 points: 1 student. 5 points: 2 students.