Link to home
Start Free TrialLog in
Avatar of Justin Owens
Justin OwensFlag for United States of America

asked on

Excel Grid Matching Game

My wife is being asked to come up with a "Prayer Partner" list, containing 12 women, who pray over the course of 11 weeks, each one partnered with the other only once.  Person 1 is the "Leader" of the group.  I have matched Person 1 to each person in the group once.  Row 1 has the prayer partner.  Column 3 starts the matching at Row 2 (first week):

User generated image
I cannot figure out a way to complete the pattern.  Basically, if Person 1 is assigned to pray with person 2 in week 1, person 2 needs to be assigned to person 1 in week 1, and so forth.  In the above, I have person 1 assigned to each prayer partner in turn, and consequently, each person assigned to person 1 in the appropriate week.

Will someone please help me?

DrU
Avatar of Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Flag of New Zealand image

Hello,

You have 12 people and 11 weeks. If they pray in pairs you have 6 pairs for each week.  Start with setting up prayer partners for person 1.

person 1 prays with person 2 first, and in the next weeks proceeds to take turns with each other person. That looks like this:
User generated image
Notice how I filled in the first column as well. Underneath Person1 there is the Person number they are paired with in each week. In the first row you can see the numbers 2 and 1. Let's fill in the rest of the row with the other ten numbers.

shot2.png
3 pairs with 12 and 12 pairs with 3. Works out just fine.  

Let's fill in the same pattern for the remaining weeks, following the diagonal line of P1. Note that in some cases people would be paired with themselves, so we remove the value. These cells are highlighted in yellow.
User generated imageFill in the start of the rows to complete the patterns and remove the numbers in cells where people are paired with themselves.
User generated image
In week 2 we now see empty cells for P2 and P8, so we just pair these two. Similarly in week 4 we pair P3 with P9 and so on.
User generated image
And that's it. Every person paired with every other person only once.

cheers, teylyn
^ Beat me to it!  I was going to refer you to a 12-member round robin schedule (several generators on the Internet), but this explanation is really good.
Except, I just spotted the error of my ways. P2 is paired with 8 in week 2 and in week 8. In fact, all the highlighted cells have duplicate pairings.

back to the drawing board, but too tired for mega Sudoku now.
Avatar of Justin Owens

ASKER

teylyn,

I actually came up with that, until I realized that every one ended up duplicating and missing 1 person.  For example, in the above, person 2 never prays with person 12, 3 with 11, etc.  (person 4 and 10 in row 7 actually works).  With that pattern, though, I could never get it to quite work... I spend several hours trying to figure something out, so I appreciate that you got so close so quickly.

DrU
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ozo and teylyn,

Thank you both so much for the time and attention you put into this.  They have pushed back a week and will start next week.  One thing was asked.  It is actually two groups of 12 (24 total women), so as an interim solution i swapped 6 members of groups 1 and 2.  This caused 6 women to miss out on praying with 6 other women.

How difficult would it be to expand it to 24 x 24 instead of 12 x 12 and still not repeat?  If it is doable, I will ask a Related Question linked to this one.

DrU
for 24, just extend the pattern
 1  3  4  5  6  7  8  9 10 11 12 13
 2 24 23 22 21 20 19 18 17 16 15 14

 1  4  5  6  7  8  9 10 11 12 13 14
 3  2 24 23 22 21 20 19 18 17 16 15

 1  5  6  7  8  9 10 11 12 13 14 15
 4  3  2 24 23 22 21 20 19 18 17 16

 1  6  7  8  9 10 11 12 13 14 15 16
 5  4  3  2 24 23 22 21 20 19 18 17

 1  7  8  9 10 11 12 13 14 15 16 17
 6  5  4  3  2 24 23 22 21 20 19 18

 1  8  9 10 11 12 13 14 15 16 17 18
 7  6  5  4  3  2 24 23 22 21 20 19

 1  9 10 11 12 13 14 15 16 17 18 19
 8  7  6  5  4  3  2 24 23 22 21 20

 1 10 11 12 13 14 15 16 17 18 19 20
 9  8  7  6  5  4  3  2 24 23 22 21

 1 11 12 13 14 15 16 17 18 19 20 21
10  9  8  7  6  5  4  3  2 24 23 22

 1 12 13 14 15 16 17 18 19 20 21 22
11 10  9  8  7  6  5  4  3  2 24 23

 1 13 14 15 16 17 18 19 20 21 22 23
12 11 10  9  8  7  6  5  4  3  2 24

 1 14 15 16 17 18 19 20 21 22 23 24
13 12 11 10  9  8  7  6  5  4  3  2

 1 15 16 17 18 19 20 21 22 23 24  2
14 13 12 11 10  9  8  7  6  5  4  3

 1 16 17 18 19 20 21 22 23 24  2  3
15 14 13 12 11 10  9  8  7  6  5  4

 1 17 18 19 20 21 22 23 24  2  3  4
16 15 14 13 12 11 10  9  8  7  6  5

 1 18 19 20 21 22 23 24  2  3  4  5
17 16 15 14 13 12 11 10  9  8  7  6

 1 19 20 21 22 23 24  2  3  4  5  6
18 17 16 15 14 13 12 11 10  9  8  7

 1 20 21 22 23 24  2  3  4  5  6  7
19 18 17 16 15 14 13 12 11 10  9  8

 1 21 22 23 24  2  3  4  5  6  7  8
20 19 18 17 16 15 14 13 12 11 10  9

 1 22 23 24  2  3  4  5  6  7  8  9
21 20 19 18 17 16 15 14 13 12 11 10

 1 23 24  2  3  4  5  6  7  8  9 10
22 21 20 19 18 17 16 15 14 13 12 11

 1 24  2  3  4  5  6  7  8  9 10 11
23 22 21 20 19 18 17 16 15 14 13 12

 1  2  3  4  5  6  7  8  9 10 11 12
24 23 22 21 20 19 18 17 16 15 14 13

Open in new window

Maybe a little clearer written as:
 1 24 23 22 21 20 19 18 17 16 15 14
 2  3  4  5  6  7  8  9 10 11 12 13

 1  2 24 23 22 21 20 19 18 17 16 15
 3  4  5  6  7  8  9 10 11 12 13 14

 1  3  2 24 23 22 21 20 19 18 17 16
 4  5  6  7  8  9 10 11 12 13 14 15

 1  4  3  2 24 23 22 21 20 19 18 17
 5  6  7  8  9 10 11 12 13 14 15 16

 1  5  4  3  2 24 23 22 21 20 19 18
 6  7  8  9 10 11 12 13 14 15 16 17

 1  6  5  4  3  2 24 23 22 21 20 19
 7  8  9 10 11 12 13 14 15 16 17 18

 1  7  6  5  4  3  2 24 23 22 21 20
 8  9 10 11 12 13 14 15 16 17 18 19

 1  8  7  6  5  4  3  2 24 23 22 21
 9 10 11 12 13 14 15 16 17 18 19 20

 1  9  8  7  6  5  4  3  2 24 23 22
10 11 12 13 14 15 16 17 18 19 20 21

 1 10  9  8  7  6  5  4  3  2 24 23
11 12 13 14 15 16 17 18 19 20 21 22

 1 11 10  9  8  7  6  5  4  3  2 24
12 13 14 15 16 17 18 19 20 21 22 23

 1 12 11 10  9  8  7  6  5  4  3  2
13 14 15 16 17 18 19 20 21 22 23 24

 1 13 12 11 10  9  8  7  6  5  4  3
14 15 16 17 18 19 20 21 22 23 24  2

 1 14 13 12 11 10  9  8  7  6  5  4
15 16 17 18 19 20 21 22 23 24  2  3

 1 15 14 13 12 11 10  9  8  7  6  5
16 17 18 19 20 21 22 23 24  2  3  4

 1 16 15 14 13 12 11 10  9  8  7  6
17 18 19 20 21 22 23 24  2  3  4  5

 1 17 16 15 14 13 12 11 10  9  8  7
18 19 20 21 22 23 24  2  3  4  5  6

 1 18 17 16 15 14 13 12 11 10  9  8
19 20 21 22 23 24  2  3  4  5  6  7

 1 19 18 17 16 15 14 13 12 11 10  9
20 21 22 23 24  2  3  4  5  6  7  8

 1 20 19 18 17 16 15 14 13 12 11 10
21 22 23 24  2  3  4  5  6  7  8  9

 1 21 20 19 18 17 16 15 14 13 12 11
22 23 24  2  3  4  5  6  7  8  9 10

 1 22 21 20 19 18 17 16 15 14 13 12
23 24  2  3  4  5  6  7  8  9 10 11

 1 23 22 21 20 19 18 17 16 15 14 13
24  2  3  4  5  6  7  8  9 10 11 12

Open in new window