# Designing an experiment where participants see all levels of one factor, but not of the other

Let's say I have an experiment with two factors A and B, each with a number of different levels.

I want participants to

• see all levels of factor A exactly $n$ times,
• never see a level of B twice

How would I generate a test plan that assigns me $x$ users to the various combinations of A and B given the above constraints?

More specifically, suppose I have 5 pairs of speakers (factor A) and 10 audio samples (factor B). I would like each speaker to be tested by 12 people. I therefore need to recruit 60 ($5 \times 12$) people to listen to all pairs of speakers. Since the audio samples are so long they couldn't possibly listen to all of them. How do I assign them to the audio samples?

I tried starting with a smaller version.. 3 speakers, 6 audio sources, and 6 listeners (A through F), meaning I get two listeners per speaker. But how can I generalize this?

Perhaps I'm missing the terminology to look it up somewhere, but I only got as far as creating the full test matrix, which isn't really helpful here.

It might also be worth trying an optimal design algorithm where each person is a block and each block has a number of runs equal to the number of levels of $B$. When a highly regular combinatorial design doesn't exist (both of your examples have |A| prime and |B| an integer multiple of |A| which is nice) often we can get very good performance with optimal designs. The only problem is that sometimes it's very computationally difficult to do this optimization.