Maximum number of teams that can be created given the

Info icon This preview shows pages 2–4. Sign up to view the full content.

maximum number of teams that can be created given the project leader and adviser constraints. Suppose I propose the following algorithm: create a tripartite graph (similar to a bipartite graph, except with 3 parts instead of 2). The first part contains the advisers, the second contains the project leaders, and the third contains programmers. Add edges connecting advisers with project leaders, subject to the constraints. Set the capacities of these edges to be 2. Similarly, add appropriate edges connecting project leaders to programmers, with capacities of 1. Add a source node connected to the advisers, with each edge having capacity 2. Add a sink node connected to the programmers, with each edge having capacity 1. This is very similar to how we set up a bipartite matching problem. Now run a network flow algorithm, and observe how much flow can be sent to the sink. Divide this by 2 to calculate the maximum number of teams possible. Why will this algorithm not work? Hint: As long as the graph has integer edge capacities, the network flow al- gorithm is guaranteed to produce integer flows, meaning that the amount of flow sent along each edge will be an integer. The edges connecting advisers to project leaders have capacity 2: so the flow algorithm could send 0, 1, or 2 units of flow along each such edge. What happens if it sends 1 unit of flow along the edge? 5. You are trying to help a supermarket to distribute n types of coupons to a total of m customers. However each type of coupon is of interest to only a subset of m customers. No coupon should be sent to a customer who is not interested in it. On the other hand, each customer can receive at most k coupons. No customer can receive duplicate coupons. Design an efficient network-flow based algorithm that given the list of cus- tomers of interest for each of the n coupons, and the upper bound k , will 2
Image of page 2

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

determine what coupons should be sent to each customer so as to maximize the total number of coupons sent. Specifically, give the construction of your flow graph describing nodes, edges and weights of edges. Your algorithm should explain how to use the flow graph to solve the given problem. What is the running time of your algorithm (using the parameters above)? You can assume that m >> n . Hint: Construct a flow graph as follows. Let s and t be the source and sink nodes. For each coupon type introduce a node c i ( i = 1 ..n ) Likewise for each person introduce a node p j ( j = 1 ..m ). There is an edge from s to each of the coupons. There is an edge from c i to p j iff customer p j is interested in c
Image of page 3
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ 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