Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 3
    $\begingroup$ Since there is only a finite set of initial conditions, you can compute how many of the random steps are needed to solve each initial condition. Taking the maximum of all these numbers will tell you how long the list needs to be. But I am thinking this will be less efficient than xnor's accepted solution. $\endgroup$
    – kasperd
    Commented Jul 16, 2015 at 10:23
  • 1
    $\begingroup$ @kasperd For any initial condition any finite length of random steps will have a non-zero probability of not reaching the end. $\endgroup$
    – Taemyr
    Commented Jul 16, 2015 at 10:54
  • $\begingroup$ @Taemyr Only if you assume the random choices are made after the length of the sequence has been decided. But that is not the case with the method I sketched, because it computes the length of the sequence based on the random choices being made. $\endgroup$
    – kasperd
    Commented Jul 16, 2015 at 11:02
  • 2
    $\begingroup$ @kasperd I have no idea what you are talking about. ("to perform what calculation")? Ah, ok, I think I understand what your point is. Create a (long enough) random list of directions, then check it against each configuration. If it solves all of them good. If it doesn't solve some them, extend the list and check again (until you have a long enough list that solves all.) Right? $\endgroup$ Commented Jul 17, 2015 at 9:21
  • 1
    $\begingroup$ @ypercube Yes, that's the idea. $\endgroup$
    – kasperd
    Commented Jul 17, 2015 at 12:39