On Mon, Apr 18, 2011 at 4:44 AM, shay <address@hidden>
yes i do need replacement but thats not a problem thx James, yes I do need
more than 1 value from both a and b, i just need to make sure that if I
concatenate them it will always extract at least one value from each array.
No, it will just treat the whole array as one and randomly pick from that. Like Francesco said, you need to be careful with your problem statement. Just so I'm completely sure, the output of your code that you want is:
10 elements randomly picked with replacement from arrays a, b, and c, where at least 1 element is from array a, and at least 1 element is from array b.
If so, I'd just do the following:
pick 1 from a
pick 1 from b
pick 8 from the concatenation of a, b, and c