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

Problem I. 323. (May 2013)

I. 323. We would like to develop an information display system for passengers travelling with Tram No. 1 in Debrecen, Hungary. The (tabulator separated and UTF-8 encoded text) file menetrend.txt containing its timetable during the school year can be downloaded from our homepage.

Open the file menetrend.txt in the spreadsheet application so that the first piece of data of that file appears in cell A1. Then save the data table with name i323 using the default file format of your spreadsheet application.

The tram service operates in a circular route beginning and ending with Nagyállomás station. In column A of the worksheet menetrend (= timetable), absolute starting times (= indulási idő) from each station are listed. Column C contains station names (= megállóhelyek), while column D the travel times between consecutive stations (= szakaszidő) in minutes (= perc).

In column E, you should determine for each station the relative travel time from Nagyállomás (= menetidő), by using a similar format as in the example. Due to the circular route, several station names occur twice.

The next worksheet tájékoztató (= information) should contain the following messages, according to the example. (The translation of the messages in the example is as follows. Cell A1: ``Where would you like to start from?''; cell A2: ``What time would you like to start?''; cell A3: ``What is your destination?''; cell D1: ``The given data are:''; cell D2: ``Get on the vehicle at:''; cell D3: ``Arrival time at the destination:''; cell D4: ``Number of stations:''; cell D5: ``Travel time:''.)

Information based on data in cells B1:B3 and given to the actual passenger should appear in column E (intentionally omitted in the example). Auxiliary computations can be performed, but they, with your corresponding comments, should be visible only to the right of column G.

Cell E1 should contain either the word helyes (= valid) or helytelen (= invalid), according to whether data in B1:B3 are consistent or not. A helytelen message should be displayed, if an invalid station name is entered, or the preferred travel time is after service hours, or if any other inconsistency is detected. You should document these on the sheet where auxiliary computations are done. If a helytelen message has been displayed, further information cells should remain empty.

Cell E2 should contain the earliest exact arrival time of the tram according to the timetable when the passenger can get on the vehicle to reach their destination. (It is hoped that this will be realized in Hungary sometime in the future.)

In cell E3, you should determine the arrival time of the tram to the passenger's destination.

Cells E4 and E5 should contain the number of stations and number of minutes the passenger should travel.

The spreadsheet (i323.xls, i323.ods, ...) together with a short documentation (i323.txt, i323.pdf, ...) also describing your solution, and the name and version number of the spreadsheet application should be submitted in a compressed file (i323.zip).

Downloadable file: menetrend.txt

(10 pont)

Deadline expired on June 10, 2013.


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

Mintamegoldás:

Fényes Balázs 10. évfolyamos tanuló (Budapest, Szerb Antal Gimnázium) megoldása: i323.xls

Gema Barnabás 10. évfolyamos tanuló (Budapest, Berzsenyi Dániel Gimnázium) megoldása: i323.xlsx

Tegzes Tamás 10. évfolyamos tanuló (Budapest, Berzsenyi Dániel Gimnázium) megoldása: i323.xlsx és leírása:

Az adatbevitel utáni hibakeresés a J1:K5 tartományban található. Az egyes kritériumok mellett IGAZ érték jelenik meg, ha helyes volt, HAMIS, ha hibás. Megkeresi az indulási és érkezési címet a megállót a megállók között. Ha nem szerepel, hibás értéket mutat. Megvizsgálja, hogy üzemidőn belül van-e az indulási időpont és itt felhasználja a résszámításokat. Ellenőrzi, hogy különbözik-e az indulási és célállomás.

A résszámítások az M1:M6 tartományban találhatók. Nem volt feltétlenül szükséges, csak úgy gondoltam, így valamivel átláthatóbb. Megkerestem hányszor áll meg a villamos az adott megállókban. Erre a pálya csepp alakja miatt volt szükség. Megállapítottam, hogy az első, vagy a második megállásnál kell-e felszállni, leszállni. (Ha csak egyszer áll meg az adott megállóban, IGAZ értéket vesz fel.) Ha a második megállásnál kell felszállni vagy leszállni, akkor később az állomást a lista második felében keresem, így a megfelelőt fogja megtalálni. Ez alapján megállapítottam a megállók listában elfoglalt helyét is.

A megadott adatok helyességét egy ÉS függvény segítségével állapítottam meg, amely összegzi az egyes kritériumok helyességét.

A felszállás idejénél INDEX és HOL.VAN függvények, valamint a kiszámított adatok segítségével megkeresem a legnagyobb, de a szükségesnél nem nagyobb értéket, majd hozzáadok egyet, hogy a legkisebb, de a szükségesnél nagyobb értéket kapjam. Mivel ennél a függvénynél az egyenlőség is megengedett, ha éppen az indulás idejekor érkezik oda villamos, a következő villamosra száll fel. Ennek elkerülése végett elágazást vezettem be. Ha egyenlőség esete forog fenn, éppen érkezik villamos, amikor odaértünk, nem ad hozzá a HOL.VAN értékéhez egyet.

Az érkezés idejéhez meghatároztam az adott megállókhoz tartozó menetidők különbségét, majd hozzáadtam a felszállás idejéhez.

A megállók számát a megállók listában elfoglalt helyének különbségeként értelmeztem.

A menetidőt az érkezés és felszállás idejének különbségével határoztam meg.


Statistics:

6 students sent a solution.
10 points:Fényes Balázs, Gema Barnabás, Tegzes Tamás.
8 points:2 students.
5 points:1 student.

Problems in Information Technology of KöMaL, May 2013