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

# KöMaL Problems in Informatics, May 2011

Show/hide problems of signs:

## Problems with sign 'I'

Deadline expired on June 10, 2011.

I. 268. This exercise models air conditioning: besides the constant temperature the air conditioner also maintains the appropriate humidity. With the help of a spreadsheet application, you should model the temperature of an office from 9AM to 4PM.

Our older, ON/OFF-type air conditioner is only capable of cooling: if it is active it works at full capacity, and if it is switched off, it does not draw heat away at all. Its working period is 3 minutes: it measures the room temperature in every 3 minutes. If the actual temperature is below the desired, it switches off, otherwise on. These 3 minutes is the time unit.

The following parameters should be considered.

At 9AM, the air conditioner is switched off.

The number of clients in the office can change at most by 3 in a time unit. This is determined by a generated random number. The number of people in the room can not exceed 30 and of course can not be negative. Whether the number of clients increases or decreases, depends on the actual number of people inside: if there are 10 people inside, the probability of increase is twice as the probability of decrease, while if there are 15 people inside, the two probabilities are equal.

The data denoted by bold can be modified during the development of your model.

Your spreadsheet (i268.xls, i268.ods, ...) with your model, a graph about the inner temperature during the day, further a description (i268.txt, i268.pdf, ...) about the main steps of your solution and possible refinements and conclusions should be submitted in a compressed file i268.zip.

(10 pont)

solution (in Hungarian), statistics

I. 269. Hungarian Forint coins were changed many times during the history. This was the topic of the database management task of the Hungarian matriculation exam in informatics in October 2010. The files erme.txt, tkod.txt, tervezo.txt, akod.txt and anyag.txt (downloadable from our homepage) contain data about the Forint coins since its introduction in 1946.

1. Create a new database named i269. Import the data tables into the database with names erme, tkod, tervezo, akod and anyag. The .txt files are UTF-8 encoded tabulator separated files and the field names are contained in the first lines.

2. After importing, the appropriate data formats and keys should be set.

Table:

You should solve the following tasks. When a query is answered, no other data only the requested results should appear. Queries should be saved as indicated in the parentheses.

3. List by a query the denominations and date of issue of the coins designed by István Bartos. (3Bartos)

4. List by a query in alphabetical order the names of metals contained in current coins. Each name should appear only once. (4femek)

5. List by a query the number of carriages would be needed to store the total metal amount to produce all the coins so far. One carriage can store up to 70 tons of metal. (5osszes)

6. List by a query how many kilograms of metal were used to produce the coin issued in the greatest number. The result should contain the denomination, the date of issue and a total mass in kilograms. (6tomeg)

7. List by a query the name(s) of the designer(s) involved in the production of the highest number of coins together with this number. (7muvesz)

8. Write a query to determine the types of withdrawn coins having designers with currently circulating coins. The list is ordered alphabetically according to the name of the designer and within that, increasing in denomination. (8regi)

9. Write a query to determine the date of withdrawal of the last coin containing aluminum. (9aluminium)

10. Since many people have nickel allergy, create a report or a query, if needed, to list those denominations together with the date of issue that are free of nickel. (10nikkel)

Your database (i269.odb, i269.mdb, ...) together with a short documentation (i269.txt, i269.pdf) - also describing the name and version number of the database application - should be submitted.

(10 pont)

solution (in Hungarian), statistics

I. 270. The http://www.wheresgeorge.com/ site was established more than a decade ago in the USA. Its aim is to track the geographic circulation of American paper money: the user can register the serial number of the bank note and the location they found it. (There are other sites that track objects, such as used books.) Your task is to devise an information system to track bank notes. At least the following should be accomplished:

- the framework of the database suitable to store the above data and

- a description and sample how to visualize graphically the route of a bank note after 100 sightings.

The database should not contain any personal data.

The concept of the information system together with the graphical representation should be submitted in a compressed file i270.zip.

(10 pont)

solution (in Hungarian), statistics

## Problems with sign 'S'

Deadline expired on June 10, 2011.

S. 63. A greatly simplified description of a macromolecule (such as proteins) can consist of a sequence of attracting parts (here denoted by V's) and neutral parts (denoted by K's), such as KVVKVVVKVVKV.

The attracting parts getting close to one another can be responsible for forming the three-dimensional structure of the molecule. For the sake of simplicity, molecules in the present exercise are supposed to be only two-dimensional, but they can be rolled up. Molecules are described by using strings of K's or V's: the V-parts are likely to be found in the inner part of the molecule, while the K-parts are outside.

The example (Példa két lehetséges szerkezetre'') shows two possible configurations: the rolling up is seen together with the connections between the V-V parts. A molecule has better stability properties if it has more V-V connections. The first example has only 6 of these, but the second example contains 9.

Prepare your program s63 to determine the most stable configuration of a given macromolecule.

The structure of the macromolecule is read from a file. The only command line argument to your program is the name of this input file. The only line of the input file consists of letters V and K (at most 20). The output should be displayed on the screen: the planar shape of the molecule consisting of the maximal number of V-V connections, the number of such connections and the (repeated) input structure of the molecule. It is sufficient to display one solution if there is more than one.

The sample input (Példa a bemenetre'') and sample output (Kimenet) is displayed below. Szomszédszám'' means the number of V-V connections, and A molekula'' is the original data.

The source code (s63.pas, s63.cpp, ...) together with a short documentation (s63.txt, s63.pdf, ...) - also describing which developer environment to use for compiling, further a brief description of your solution - should be submitted in a compressed file s63.zip without the .exe or any other auxiliary files generated by the compiler.

(10 pont)

solution (in Hungarian), statistics

\$Var(Body)