Jay Miller3

Q: Pairing groups which will not repeat

Pairings groups which will not repeat

 

Numbers ver. 3.6.2

 

I teach and would like to pare students (21 students in total) into pairs of 2 students in each pairing. Each week the pairings will change so students are matched with another student. I do not want to repeat the same pairing for as long as I can delay that.

 

Does anyone know a "simple" or straightforward way to use Numbers to keep track of those 2-person pairings and visibly show (to me) what the next pairings will be?

 

Thank you.

MacBook Pro (15-inch Mid 2010), Mac OS X (10.7.5), 2.53 GHz Intel Core i5, 4 GB 1067 MHz DDR3

Posted on Aug 21, 2016 6:04 AM

Close

Q: Pairing groups which will not repeat

  • All replies
  • Helpful answers

  • by Yellowbox,

    Yellowbox Yellowbox Aug 21, 2016 7:59 AM in response to Jay Miller3
    Level 6 (10,550 points)
    Mac OS X
    Aug 21, 2016 7:59 AM in response to Jay Miller3

    Hi Jay,

    Here is one solution for 5 students

    Screen Shot 2016-08-22 at 12.43.27 AM.png

    Formula in C2 (and Fill Right and Fill Down)

    =IF($B2≠C$1,$B2&", "&C$1,"No match")

    For "not equal to" type <> and Numbers will change it to ≠

    The IF function is so that a student is not paired with themself, and inserts No match .

     

    Conditional Highlighting

    Screen Shot 2016-08-22 at 12.49.16 AM.png

    Regards,

    Ian.

  • by t quinn,

    t quinn t quinn Aug 21, 2016 9:44 AM in response to Jay Miller3
    Level 5 (5,063 points)
    Mac OS X
    Aug 21, 2016 9:44 AM in response to Jay Miller3

    Hi Jay,

     

    Ian's solution will show you all possible pairings. If you are wanting formulas that will give you 20 different groups of those pairs then Numbers is not, perhaps, the best tool. This is a great a great puzzle and I will be thinking about this. I don't think there will be a "simple" or straightforward solution but it will be fun to try.

     

    quinn

  • by VikingOSX,

    VikingOSX VikingOSX Aug 22, 2016 11:14 AM in response to t quinn
    Level 7 (21,562 points)
    Mac OS X
    Aug 22, 2016 11:14 AM in response to t quinn

    Cross-posted in Pages for Mac community with a non-spreadsheet (Python) combinations (nCr) approach.

  • by SGIII,

    SGIII SGIII Aug 22, 2016 2:06 PM in response to Jay Miller3
    Level 6 (10,796 points)
    Mac OS X
    Aug 22, 2016 2:06 PM in response to Jay Miller3

    I think this is just another form of the "round robin tournament" problem. Give each student a Number and here is one way to calculate pairings in a Numbers table:

     

    Screen Shot 2016-08-22 at 4.48.57 PM.png

     

    Enter the number of students in B1.  List the weeks down column A and pairs across row 2, every other cell without merging cells (turn of wrap text).

     

    The formulas are:

     

    D1: =IF(ISODD(B1),B1+1,"")

    E1: =IF(ISODD(B1),"is a Bye","")

    B3: =1

    C3: =MAX(3,CEILING($B$1,2))

    D3: =B3+1

    E3: =C3−1

    F3: =D3+1

    G3: =E3−1

    H3: =F3+1

    I3: =G3−1

    J3: =H3+1

    K3: =I3−1

    L3: =J3+1

    M3: =K3−1

    N3: =L3+1

    O3: =M3−1

    P3: =N3+1

    Q3: =O3−1

    R3: =P3+1

    S3: =Q3−1

    T3: =R3+1

    U3: =S3−1

    B4: =1

     

    C4: =MOD(C3−3,MAX(3,CEILING($B$1,2))−1)+2

    Fill formula in C4 right and down through the rest of the table.

     

    Set Conditional Highlighting to identify the "byes" where a student will be the "odd person out" for that week.

     

    Screen Shot 2016-08-22 at 5.01.45 PM.png

     

    Rows and columns can be added to accommodate larger numbers of students, or hidden to accommodate smaller numbers.

     

    To list the students by name set up a lookup table with number and student name on each row and use VLOOKUP in another table to replace the numbers with names.

     

    In my testing this works fine in a Pages table too.

     

    SG