Objective-C equal distribution from 5 different NSMutablearrays : i have the following problem/situation:
###Example: 
In Sqlite Database i have a table with the following rows: a1,a2,a3,a4,a5,b1,b2,b3,c1,c2,c3,c4,c5,d1,d2,e1

I have create 5 groups (NSMutablearrays) with objects:

- NSMutablearray1: 5 objects with values "a1","a2","a3","a4","a5"
- NSMutablearray2: 3 objects with values "b1","b2","b3"
- NSMutablearray3: 5 objects with values "c1","c2","c3","c4","c5"
- NSMutablearray4: 2 objects with values "d1","d2"
- NSMutablearray5: 1 objects with value "e1"

x = count of groups(arrays) for equal distribution

in this example is x = 3 (3 groups)

###Round 1 (x1 starts):
- x1= random object out of NSMutablearray1
- x2= random object out of NSMutablearray1
- x3= random object out of NSMutablearray1

###Round 2 (x3 starts):
- x3= random object out of NSMutablearray1
- x2= random object out of NSMutablearray1
- x1= random object out of NSMutablearray2

###Round 3 (x1 starts):
- x1= random object out of NSMutablearray2
- x2= random object out of NSMutablearray2
- x3= random object out of NSMutablearray3

###Round 4 (x3 starts):
- x3= random object out of NSMutablearray3
- x2= random object out of NSMutablearray3
- x1= random object out of NSMutablearray3

###Round 5 (x1 starts):
- x1= random object out of NSMutablearray3
- x2= random object out of NSMutablearray3
- x3= random object out of NSMutablearray4

###Round 6 (x3 starts):
- x3= random object out of NSMutablearray4
- x2= random object out of NSMutablearray5

###This is my expected result:

- x1=a3,b3,b1,c3,c2,
- x2=a2,a1,b2,c1,c4,e1
- x3=a5,a4,b3,c5,d2,d1

How can i implement this in objective-c ?
I have the arrays and the groups but i dont now how can i fill the groups randomly with equal distrubution?

Thanks