Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Martha wants to find the pairing that gives the highest value of S and this is the one that she will use to pair up
Martha wants to find the pairing that gives the highest value of S and this is the one that she will use to pair up her friends. Needless to say, Martha doesn't want to run through all 5! = 120 permutations of the numbers 1 through 5 and compute the value of S for each one to find the one with the highest S.
Problem: Martha is a matchmaker. She likes pairing up men and women hoping they will find romance together. At the moment Martha has five unmatched male friends A1 Bob Carl Don Egbert and five unmatched female friends Alice Barb Carol Doreen Ellen She is going to pair up these five men and five women so that they will hopefully find happiness with their partners. In order to increase the chances of success she does the following. First she asks each of the men how much they desire each of the five women. She records their responses as a number from 1 to 10 with 1 low and 10 high. The results are as follows. Ellen I 6 8 119 20 She stores these numbers in a matrix B as follows. B- (8 245 10 4 1 2 5 8 79 4 2 5 2 1 4 8 3 68 19 2) A possible pairing of the five men and five women corresponds to a permutation p of the numbers 1 through 5 so that man t is paired with woman pi. For example, if Al is paired with Carol, Bob with Doreen, Carl with Ellen, Don with Alice and Egbert with Barb, then the corresponding permutation p would be p- (3, 4, 5, 1, 2). Given a possible pairing of the five men and women, she computes the total amount the men and women desire each other. This is S = A + Area + ) + dros + As os + B + Baza + Bea + Bas- Don + Bass |Alice Barb Carol Doreen Ellen Al13 6710 Bob Bob 1 2 4 8 3 10 | Carl 107319 Carl 10 Don 53197 Egbert 4 || She stores these numbers in a matrix A as follows A- (1 3 6 7 10 2 4 8 3 10 10 75 19 5 3 1 9 7 ( 467 3 8) Note that she is implicitly assigning each of the men a number from 1 to 3 so that Al is 1, Bob is 2, etc. Similarly she is assigning each of the women a number from 1 to 5 so that Alice is 1, Barb is 2, etc. She also asks each of the women how much they desire each of the five men. Again she records their responses as a number from 1 to 10. The results are | Al | Bob Carl Don Egbert | Alice Barb Carol Doreen For example, if p- (3, 4, 5, 1, 2) then S = A\, + A2,4 + A1,5 + A1,1 + A2 + B + B2 + B3,1 + B1,4 + B2,5 = 6 + 3 + 9 + 5 + 6 + 7 + 1 + 1 + 5 + 8 = 51 Martha wants to find the pairing that gives the highest value of S and this is the one that she will use to pair up her friends. Needlens toe. SAX. Martha doesn't want to run through ali 5! = 120 permutations of the numbers 1 *** through 5 and compute the value of S for each one to find the one with the highest S. Luckily you are on hand to write a computer program that will do this for her. Your program should go through the 120 permutations of the numbers 1 through 5 and compute the value of S for each one and find the permutation with the highest value of S. If you write it in Mathematica, you can make some modifications to the one in section 4.4 of the online Notes. Turn is a program listing and the program output. Make sure it is something I can read. If I can't figure out what you are doing, you will not get a good scoreStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started