From: Andrew Wagner Date: 2010-08-18T00:01:57+09:00 Subject: Re: can i do this in ruby? a simulation process --0016e6d9a3e860fc15048e063abe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ah, I see your point. Very interesting indeed. Is it reasonable to guess that it would take a very, very long time in this case? On Tue, Aug 17, 2010 at 10:41 AM, Jean-Julien Fleck < jeanjulien.fleck@gmail.com> wrote: > 2010/8/17 Andrew Wagner : > > Well, it may be interesting, but not in terms of the question originall= y > > asked. Actually, I'm not sure what you could ask to make it interesting > if > > buses are going in both directions, as I would expect the average resul= t > to > > be no change in the number of people currently in either city. > > Don't be fooled by the apparent simplicity of the question :o) > Random walks have many many interesting behaviors, one of which is > that they can go as far as you like from the origin in a time you can > estimate (from a probabilistic viewpoint). > > The most simple realisation is the 1D random walk: > - choose an origin > - flip a coin to decide if you should go right or left > - go there > - flip a coin... > - etc. > > For sure, as the problem is symetrical on right and left, the mean > value of the displacement is 0. But if you rather ask yourself the > question: "how far can I go from the origin" (either on the right or > on the left), then you can estimate how much time you need to achieve > this goal within a given probability. > > In the OP problem, it would read: how much time do you need to > transfer 500 people either from A to B or from B to A with the given > set of rules. > > Cheers, > > -- > JJ Fleck > PCSI1 Lyc=C3=A9e Kl=C3=A9ber > > --0016e6d9a3e860fc15048e063abe--