Post Reply 
[VA] SRC #012a - Then and Now: Probability
10-09-2022, 10:56 PM
Post: #11
RE: [VA] SRC #012a - Then and Now: Probability
.
Hi, PeterP, long time no see !

(10-09-2022 04:45 PM)PeterP Wrote:  Valentin, while it feels out of my reach, [...]

Not at all, you're being far too humble, I've seen you solve challenges ten times as difficult. This one's pretty easy, and the algorithm is the same for the huge 30-row grid as for a much smaller one.

Quote:we are looking for the probability that we are in the last row after S steps, correct? Not the probability that we can reach the last row in at most S steps? For S = R - 1 as in the example that is identical, but for S > R one can reach the last row and then step away from it again.

Correct. You perform S random steps from the initial position, then check whether you're in the last row or not and that's it; the man can step away, step towards, or dance a cha-cha-cha for that matter.

Thanks for your interest, looking forward to your code and results, and best regards.
V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [VA] SRC #012a - Then and Now: Probability - Valentin Albillo - 10-09-2022 10:56 PM



User(s) browsing this thread: 15 Guest(s)