Enigmatic Code

Programming Enigma Puzzles

Tantalizer 450: Marriage problems

From New Scientist #1001, 20th May 1976 [link]

We opened the tennis season with a 7-round mixed doubles tourney. The players were 8 married couples and husbands partnered by their own wives throughout. The first round was a match short, as Tania arrived too late. Arthur and wife played Winnie and husband. Round 2 was complete. In it George and Sonia were on different sides of the same net and Bert broke Edward’s service every time.

Dennis and wife beat Sonia and husband in round 3 and Yvonne and husband in round 4. Arthur and wife beat Vera and husband in round 3 and Edward and wife in round 4. Winnie and Xanthippe were opponents in round 6.

Charlie and wife had to rush off just before round 3 and never came back. They would have played Fred and wife in 3, Ursula and husband in 4, Bert and wife in 5 and Arthur and wife in 7.

I see I have not mentioned Harry or Zona. That done, what were the exact (intended) pairings for round 7?

[tantalizer450]

One response to “Tantalizer 450: Marriage problems

  1. Jim Randell 20 June 2018 at 8:09 am

    There is enough information to determine the male/female pairings and the matches in each round.

    Here is a MiniZinc model for the puzzle. It executes in 103ms.

    %#! mzn-chuffed -a
    
    include "globals.mzn";
    
    % assign team numbers to each of the men
    int: A = 1;
    int: B = 2;
    int: C = 3;
    int: D = 4;
    int: E = 5;
    int: F = 6;
    int: G = 7;
    int: H = 8;
    
    % and each of the women partner one of the men
    var 1..8: S;
    var 1..8: T;
    var 1..8: U;
    var 1..8: V;
    var 1..8: W;
    var 1..8: X;
    var 1..8: Y;
    var 1..8: Z;
    
    constraint all_different([S, T, U, V, W, X, Y, Z]);
    
    % there are 7 rounds, each team has an opponent in each round
    array [1..7, 1..8] of var 1..8: round;
    
    % no team plays themselves, but their opponent plays them
    constraint forall (k in 1..7, i in 1..8) (round[k, i] != i /\ round[k, round[k, i]] = i);
    
    % no two teams are scheduled to play each other in two different rounds
    constraint forall (i in 1..8) (all_different([round[k, i] | k in 1..7]));
    
    % round 1:
    
    % A played W
    constraint round[1, A] = W;
    
    % T didn't play in round 1, so can't be on the same team as A
    constraint T != A;
    
    % round 2:
    
    % G played S
    constraint round[2, G] = S;
    
    % B played E
    constraint round[2, B] = E;
    
    % round 3:
    
    % D beat S
    constraint round[3, D] = S;
    
    % A beat V
    constraint round[3, A] = V;
    
    % so A and D cannot have been opponents
    constraint round[3, A] != D;
    
    % C didn't play in round 3, so can't be on the same team as S or V, but they would have played team F
    constraint C != S /\ C != V /\ round[3, C] = F;
    
    % round 4:
    
    % D beat Y
    constraint round[4, D] = Y;
    
    % A beat E
    constraint round[4, A] = E;
    
    % so A and D cannot have been opponents
    constraint round[4, A] != D;
    
    % C didn't play in round 4, so they can't be on the same team as Y, but they would have played team U
    constraint C != Y /\ round[4, C] = U;
    
    % round 5:
    
    % C didn't play in round 5, but they would have played team B
    constraint round[5, C] = B;
    
    % round 6:
    
    % W played X
    constraint round[6, W] = X;
    
    % round 7:
    
    % C didn't play in round 7, but they would have played team A
    constraint round[7, C] = A;
    
    solve satisfy;
    

    Soultion: The matches scheduled for Round 7 were: Arthur and Zona vs. Charlie and Tania (not played); Bert and Vera vs. Dennis and Winnie; Edward and Xanthippe vs. Harry and Sonia; Fred and Yvonne vs. George and Ursula.

    The couples are: Arthur and Zona (AZ), Bert and Vera (BV), Charlie and Tania (CT), Dennis and Winnie (DW), Edward and Xanthippe (EX), Fred and Yvonne (FY), George and Ursula (GU), Harry and Sonia (HS).

    The rounds are:

    Round 1: AZ v DW, BV v GU, (CT v EX), FY vs HS
    Round 2: AZ v FY, BV v EX, CT v DW, GU v HS
    Round 3: AZ v BV, (CT v FY), DW v HS, EX v GU
    Round 4: AZ v EX, BV v HS, (CT v GU), DW v FY
    Round 5: AZ v HS, (BV v CT), DW v GU, EX v FY
    Round 6: AZ v GU, BV v FY, (CT v HS), DW v EX
    Round 7: (AZ v CT), BV v DW, EX v HS, FY v GU

    So Tania missed the first round, and then she and Charlie left before round 3, so they only played in round 2 (against Dennis and Winnie).

    The only outcomes we know are AZ and DW both won their matches in Rounds 3 and 4.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: