Question: A friendly Airline has n flights. In order to avoid re-accommodation, a passenger must satisfy several requirements. Each requirement is of the form you must
A friendly Airline has n flights. In order to avoid re-accommodation, a passenger must satisfy several requirements.
Each requirement is of the form you must take at least k_i flights from set F_i. The problem is to determine whether or not a given passenger will experience re-accommodation. The hard part is that any given flight cannot be used towards satisfying multiple requirements. For example, if one requirement states that you must take at least two flights from {A, B, C}, and a second requirement states that you must take at least two flights from {C, D, E}, then a passenger who had taken just {B, C, D} would not yet be able to avoid re-accommodation. Your job is to give a polynomial-time algorithm for the following problem. Given a list of requirements r_1, r_2, . . . , r_m (where each requirement r_i is of the form: you must take at least k_i flights from set F_i), and given a list L of flights taken by some passenger, determine if that passenger will experience re-accommodation. Specifically, you just need to show how this can be reduced to a network flow problem and assume there is a given polynomial-time blackbox algorithm solving the flow problem. Prove that your reduction is correct.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
