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

Problem I. 106. (May 2005)

I. 106. Write a program to represent graphs using modifiable diagrams. Upon pressing the left mouse button, the program should display the current point under the cursor, while if one presses the right button, the point under the cursor should be displayed together with the line segment connecting the actual point and the previous one (so one can draw an edge, paths or cycles). A menu should appear on the right part of the screen consisting of squares of equal size (i.e. command buttons) with the following functions:

- an END button at the lower part of the screen

- 3 buttons at the top, in one group, each containing a disc, representing low, medium and high precision of mouse clicks: when adding vertices to the graph, two points will be considered the same if their distance is less than the radius of the currently selected disc (The default precision at the start of the program should be ``medium''.)

- 2 buttons in the middle, in one group, one for DRAWING MODE (being the default one, when the program works as described above), and the other for MODIFICATION (this time one can drag a vertex of the graph to a new location by holding down the left mouse button, and meanwhile the program continuously redraws the adjoining edges of this ``rubber-edged'' graph)

- an UNDO button.

Your executable program (i106.exe) and its (Pascal or C) source code (i106.pas, ...) are to be submitted.

(15 pont)

Deadline expired on June 15, 2005.


7 students sent a solution.
15 points:Kisfaludi-Bak Sándor, Stippinger Marcell.
14 points:Ozsvárt László, Ökrös Tamás, Ureczky Bálint.
13 points:1 student.
8 points:1 student.

Problems in Information Technology of KöMaL, May 2005