Road network (Problems from MO category P, part 49)

Authors

  • Pavel Töpfer Faculty of Mathematics and Physics, Charles University, Prague

Abstract

This article deals with a problem from the Mathematical Olympiad Category P (Programming), focused on algorithmization and efficient algorithm design, which concerns a one-way road network between cities and the task is to determine the number of different paths from city 1 to city n. It presents several different approaches to the solution, including recursive functions and their optimization using memory arrays to store already computed values. It also shows how recursion can be replaced by an iterative approach using loops, leading to a more efficient solution with linear time complexity.

Published

2024-12-01

How to Cite

Töpfer, P. (2024). Road network (Problems from MO category P, part 49). MATHEMATICS–PHYSICS–INFORMATICS, 33(4), 305–310. Retrieved from https://mfi.upol.cz/index.php/mfi/article/view/865

Issue

Section

Informatics