KöMaL Problems in Informatics, December 2008
Please read the rules of the competition.
Show/hide problems of signs:
Problems with sign 'I'Deadline expired on January 15, 2009. |
I. 199. The CD containing archives of the Mathematical and Physical Journal for Secondary Schools in the period 1994-2003 is an extraordinary collection of problems and articles, aimed at educating talented students.
By using a vector graphics editor (for example, Inkscape, which is freely downloadable from the Internet) reproduce the face of the original CD, see the figure. (We have only removed some advertisements.) The coloured and detailed image (komalcd.jpg) can be downloaded.
The image in the default format of the graphics editor (i199.???) together with a short documentation (i199.txt, i199.pdf, ...) should be submitted, also containing a brief description of your solution and the name and version number of the software used.
(10 pont)
solution (in Hungarian), statistics
I. 200. With the ``combination play ticket'' in the Hungarian national lottery (5 numbers out of 90) one can play several number combinations simultaneously. One has to specify two groups of numbers: the first group (``fixed numbers'') contains at most 4 numbers, while the second group (``complementary numbers'') consists of at least 2 numbers. Then all possible combinations of 5 numbers are formed: each ticket contains all the fixed numbers and some of the complementary numbers (so that there are altogether 5 numbers on each ticket).
Example: if the fixed numbers are 23, 35 and 87, while the complementary numbers are 56, 13 and 90, then three tickets are created with 23, 35, 87, 56, 13, and 23, 35, 87, 56, 90, finally 23, 35, 87, 13, 90.
The first 3 lines of the input file of your program contain the fixed numbers, then the complementary numbers of the player, finally the winning numbers for the current week, respectively. The 5 lines of the output file should contain the number of tickets that can be generated by the given combination play ticket, then the number of tickets that contain 5, 4, 3 or 2 matches, respectively.
The source code of your program (i200.pas, i200.cpp, ...) together with a short documentation (i200.txt, i200.pdf, ...) should be submitted, also containing a brief description of your solution and the name of the developer environment to use for compiling.
(10 pont)
solution (in Hungarian), statistics
I. 201. The Cardan grille is a simple grid to write and read hidden messages. The hidden text in the square pattern can be revealed only if the grid is positioned above the text, then letters are read through the holes in the usual order from left to right and top to bottom. By rotating the appropriate grid by 90^{o} (in this example, counterclockwise), one can repeat the procedure, and after 4 passes each letter of the square is read exactly once. The example text refers to a literary work in which Cardan grille also plays role.
Make a presentation to illustrate the use of the Cardan grille. Given a 6×6 grille, create an animation that shows how to make the square of letters, then how to use the grille to read the hidden message.
The presentation (i201.ppt, i201.odp, ...) together with a short documentation (i201.txt, i201.pdf, ...) should be submitted, also containing the name and version number of the software applied.
(10 pont)
Problems with sign 'S'Deadline expired on January 15, 2009. |
S. 40. In problem I. 194, we have examined the structure of the EAN-13 barcodes used in commerce. In order to solve this task, study problem I. 194 carefully.
You should write a program that produces an EAN-13 number from a bit string read by the scanner. The input bit string (``Példa bemenet'' in the example) will always consist of the appropriate number of 0s and 1s, and properly encodes the digits if the string is read either forwards or backwards.
The three lines of the output (``Példa kimenet'' in the example) should contain
- whether the bit string is to be reversed (``fordítás kell'') or not (``nem kell fordítani'')
- whether the check digit is valid (``helyes'') or invalid
- the 13 digits encoded by the bit string.
The command line argument of your program is the name of the file containing the bit string.
The source code of your program (s40.pas, s40.cpp, ...) together with a short documentation (s40.txt, s40.pdf, ...) should be submitted, also containing a brief description of your solution and the name of the developer environment to use for compiling.
(10 pont)
$Var(Body)
Upload your solutions above