----- Original Message -----
From: "Mauricio FernáÏdez" <batsman.geo / yahoo.com>
I see that
max(Ni) > sum(Ni)/2 => p(Vi) > 0.5 => would have to repeat
however I don't know why you have '+1' (unless you meant '<') :-?
----------------------------
I think he's solving a different problem; he's not using weights, but
numbers of occurances.
So, for example, if he has {'a' => 1, 'b' => 2}, he will give:
bab
but that's the end of it! So the `+1' is because it can be at both ends.
Interesting, but it is a different problem: we weren't looking for a
shuffle (at least, I didn't think we were; perhaps I'm wrong!), we wanted an
arbitrarily long sequence.
Chris