Mathematical and Physical Journal
for High Schools
Issued by the MATFUND Foundation
Already signed up?
New to KöMaL?

Problem I. 295. (May 2012)

I. 295. Polybius (born in 200 BC) was a Greek historian and politician living in Rome. (We know about 40 volumes of his history books.) He invented the Polybius square to encode texts: each letter of the original text is mapped to a pair of letters (see the table, by using row and column coordinates). He used a 5×5 square to encode the 24 Greek letters, however, when we use the scheme with the English alphabet containing 2 more letters, both V and W are mapped to the pair UE.

During the encryption process, letters of the original text are replaced by the above vowel pairs first, then we choose some words at random from a list that contain these pairs.

The file szodb.txt contains all words of a long Hungarian text in alphabetical order. (Diacritical vowels have been replaced by the corresponding vowels without diacritical marks, further, each letter is capitalized.) From this list you can choose words that will contain the encrypted vowel pairs as embedded letters but in their original order.

Your program i295 should encode a given text. The command line argument to your program is the name of the file containing the word list. The original text to be encrypted (having maximal length of 100 characters) should be read from the keyboard. Then the words containing the vowel pairs should be displayed on the screen, separated by a space. In the example (Példa) the encrypted result is Eredmény.

The source code (i295.pas, i295.cpp, ...) together with a short documentation (i295.txt, i295.pdf, ...) - also describing which developer environment to use for compiling, further a brief description of your solution - should be submitted in a compressed file

(10 pont)

Deadline expired on June 11, 2012.

Sorry, the solution is available only in Hungarian. Google translation


A beküldök többsége úgy készítette elő a rejtjelezést, hogy a megadott szó-adatbázisban ábécé sorrendet alakított ki. A meghatározott magánhangzó sorozata szerint minél hosszabb szavak kiválasztására törekedtek.

A tesztként megadott MELEG és LIMONADE szavak rejtjelezett eredményei

Mintamegoldás: Fényes Balázs 9. évfolyamos versenyző (Budapest, Szerb Antal Gimnázium) munkáját közöljük: i295.vb


12 students sent a solution.
10 points:Antal János Benjamin, Barkaszi Richárd Miklós, Fehér Balázs, Fényes Balázs, Jákli Aida Karolina, Kocsis 789 Mátyás, Kovács Balázs Marcell, Kucsma Levente István, Németh 017 András, Szabó Levente, Tegzes Tamás.
9 points:Varga 256 Erik.

Problems in Information Technology of KöMaL, May 2012