Many Shortest Routes - A proposed new problem

Back to General discussions forum

CSFPython     2024-02-01 08:44:20

This problem is a different way of looking at a popular algorithm.

Because there is a lot of data in the problem, I have made use of the Linear Congruential Generator. Unfortunately, I have had to change one of the parameters used by the generator. I have changed the parameter M from 2097152 to 2097169 (which is the nearest prime to its original value). While developing the problem I was puzzled by some of the results that I was obtaining. Further investigation showed that the generated data was very far from being random. The change of the parameter M corrected the problem. As an example of what was going wrong, consider the following. We start with a random seed of 0 and then begin to use the generator to create a sequence of numbers, each in the range 1 to 4 (as required by the problem). The sequence created is 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, ... When changing the parameter M, as described above, the sequence looks much more random.

Rodion (admin)     2024-02-01 09:38:41
User avatar

Clive, thanks a lot for the problem!

I also noticed sometimes that the values in LCG problem which were consequently reused in some other problems are not the most lucky choice. So many thanks for this improvement either!

moxieman     2024-02-01 19:01:11
User avatar

This was a fun one! And the problem statement was very well-worded as well, one can quite clearly visualize the unusual toroidal road network with no visual aid necessary.

Also an interesting thought unrelated to the problem... if you were placed into such a toroidal road network without knowing which axis was "Y" (in-plane with toroid) and which was "X" (perpendicular to toroid plane), there's actually no way to determine which is which without zooming out and seeing the physical shape of the network. And so it seems like one network could be 'mapped' onto two different toroids, each with axes 'inverted' from the other. Although trying to visualize one toroid transforming into the other is making my head hurt a bit...

gardengnome     2024-02-01 19:33:56
User avatar

Imagine toroidal chess - you can fold the chessboard two ways.

Please login and solve 5 problems to be able to post at forum