midterm_co370_f17_solutions.pdf - CO 370 Midterm Exam Fall...

Info icon This preview shows pages 1–3. Sign up to view the full content.

CO 370 Midterm Exam, Fall 2017 Page 1 Question 1 (20 points) p families go out to dinner together. Family i has a i members, for all i = 1 , . . . , p . There are q tables available, and table j has b j seating capacity, for each j = 1 , . . . , q . The families want to be seated so that no two members of the same family sit in the same table. (a) (10 points) How can the families use max-flow to solve the problem of finding a seating arrangement satisfying the above constraints (or show that it is not possible to have such a seating assignment)? Clearly define your max-flow problem, what each variable will represent and how the max-flow problem can be used to solve the above problem. Solution: Define one vertex f i for every family i = 1 , . . . , p . Define one vertex t j for every family j = 1 , . . . , q . Define arcs ( f i , t j ), for every i = 1 , . . . , p , j = 1 , . . . , q with capacity 1. Integer flows on these arcs will represent the number of people from family i assigned to table j . Also, add vertices s, t and arcs ( s, f i ) with capacity a i and ( t j , t ) with capacity b j , for every i = 1 , . . . , p , j = 1 , . . . , q respectively. Integer flows on arcs ( s, f i ) will represent the number of people from family i that get a seat at some table. Integer flows on arcs ( t j , t ) will represent the total number of people seated at table j . Since all data is integral, the solution to the max flow problem will also be integral, and in addition at most one member of each family will seat at each table, thus satisfying the requirement of no two members of the same family sitting at the same table. Note, in addition, that the upper bound on arcs ( t j , t ) enforce that at most b j people seat at table j . Now the max flow out of s can be at most p i =1 a i , since these are the upper bounds on all the arcs out of s . If the value of the max flow is exactly equal to p i =1 a i , then that means that all members of all families got seated satisfying the requirement. Otherwise, there is no possible way to seat all p i =1 a i people while satisfying the requirements. 3pts : Graph 2pts : Capacities 3pts : Explanation of what flows represent 2pts: How to use max flow
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

CO 370 Midterm Exam, Fall 2017 Page 2 (b) (10 points) How would you modify your answer to part (a) to take into account the extra condition that members of families 1 and 2 cannot sit together at the same table? Clearly explain how your new max-flow problem would satisfy the desired additional constraint. (this problem must still be modeled as a max-flow problem) Solution: Remove all arcs going out of vertices f 1 and f 2 . Add extra vertices u j for all j = 1 , . . . , q , with arcs ( u j , t j ), ( f 1 , u j ), ( f 2 , u j ) for all j = 1 , . . . , q . These arcs will all have capacities 1. Now flow on arcs ( f 1 , u j ) and ( f 2 , u j ) will still represent, respectively, the total amount of people from families 1 and 2 that will seat at table j .
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.
  • Winter '11
  • henry
  • Optimization, Flow network, optimization problem

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern