[RESOLVED] [2005] Generating List of Items with Given Constraints
I'm wondering if anyone has advice on the best way to do the following. I have 6 stimuli (S1 to S6; 20 of each - therefore 120 items in total). The first 3 belong to group 1, group 2 contains 4 - 6.
Group 1:
S1 = A
S2 = B
S3 = C
Group 2:
S4 = X
S5 = Y
S6 = Z
I have to generate a list of the 120 items with the following 2 constraints:
No more than 2 stimuli presented in order and no more than 4 of each group can occur in sequence. (So you could have S1, S1, S3, S5, S4, S4, S2 etc...) but not (S1, S1, S1) or (S1, S2, S3, S2, S1).
This is the kind of thing that kills my head and can feel the headache starting already. My thoughts were to fill 6 arrays with the 20 items and place the items into a master list which checks are performed in and remove the item once passed as ok from the array it belonged to.
Just wondering if anyone has a simple idea for a solution?