[Community Puzzle] Robot show

hum !!!
i ve just read…
=> assume Bob is free to arrange every bot to face it either Left or Right before starting the show…
i was just flagging the first ‘>’ the second ‘<’ the third ‘>’ … ect
thanks for your answer !

Insanely simple representation of what seems to be a difficult issue, glad i’ve seen this comment!
This learned me to try to find simple model of issue you want to resolve, thanks man

I don’t understand test case #6 (which I’m sure is called Singular for a reason). It shows the answer as 7 seconds. But there seem to be at least 2 scenarios where the longest time to exit is more than 7 seconds. For instance, if both bots go right, then the one starting at position 1 will need 13 seconds to get out. So, why is the longest time 7 seconds?

1 Like

Hi, did you notice there is just one bot on this test cast?

2 Likes

Thanks for setting me straight, cg123.

спасибо :yum:

Perhaps most people do not understand the question so that there was no reply.

Very good you got the same question to ask. So we can clarify the question:

The test case specified there is only one bot, at location 7.
How comes there is a second bot ?

1 Like

Try to draw every second of the example, you will find a special trick inside it.

I got it
after each collision each bot became the other

so you can resolve the problem by assuming they didn’t touch each other at all

2 Likes

This was honestly awesome and the moment I realized that my first solution was way too overengineered I got that warm, fuzzy feeling of “eureka!”.
Thank you for this puzzle, it was great.

1 Like

Hi.
I have problem with Validator 6. All IDE cases OK

Test case 6 is testing a marginal case with only one robot. Validator 6 is testing the same thing, one robot.
To debug, you can make up some such cases yourself, with varying length and starting points, to try with your program.

2 Likes

Excellent puzzle.
To anyone wandering why this one is labelled “easy”, you can try to work out a few simple cases using space-time diagrams, and you will see an elegant idea at work

3 Likes

I think it’s a cute puzzle and an excellent demonstration of how stepping back and thinking outside the box a little can lead to a remarkably simple solution to a seemingly complex problem.

However, I also feel somewhat disappointed/cheated that the resulting solution is soooo simple…

It was so funny! I think I won the longest code (more than 100 lines of code !!)… Since I didn’t find the trick I’ve simulated the show, watching my bots moving on the duct, turning around and keep moving ^^ and at the end my clock gives the solution :slight_smile: I’ve notice that almost all initial bots orientation give the same solution.

1 Like

Thank you very much! it helped me a lot :laughing:

I tried all the patterns in the forum and nothing everything fails 1 unit test.
The problem seems to require a specific solution yet one has to tinker around with the patterns to try and guess which one is correct.

Meanwhile an actual bruteforce algorithm would prove that there are more then millions of patterns to try.

This problem is actually abit irrational and rediculous if you ask me. With abit more tailoring this problem could be great though!

Okay, I just figured it out now. There is a little bit of a hint in this forum, but it’s also a bit vague.

Hello to All : for everyone trying bruteforce for hours, like it did :

  1. Remember what said @CyberLemonade :

=> I plus+One :+1: !

  1. And pay attention to @ThePurificator : that is the key :+1:
    [Community Puzzle] Robot show

Have a good fun :wink: !

1 Like

I can’t believe I didn’t see that facepalm

1 Like