3 ms·
I think one of the interesting aspects of the problem is that it illustrates just how much more complicated a mechanism needs to be if you aren't allowed to int
by hamburglar 13y ago
I think one of the interesting aspects of the problem is that it illustrates just how much more complicated a mechanism needs to be if you aren't allowed to introduce some basic functionality like clock synchronization.
We know the automata have clocks, so if they're actually allowed to count cycles to keep a concept of synchronized time, then the problem becomes very simple: a counter is started at 0 and sent from one end of the line to the other. When it reaches the other end of the line, the last node knows how long before the signal can get back to the beginning of the line and sends 2n back across as the time everyone will fire. Super simple solution in 2n time.
That's not to say it's a stupid problem -- it's both fun and useful to consider what exactly you'd need to do if you had to solve a problem with the given constraints, because it helps you understand the cost of those constraints and whether all the extra algorithm complexity is worth it. Not to mention that if you're just going to punk out and say you'll use synchronized clocks, then you've got a whole new set of issues. :)