Maximum number of people one can invite

Revision en1, by hulk_baba, 2018-06-02 21:45:04

While solving a problem I thought of another problem which could have easily been asked in the earlier problem and is as follows: Consider an array of a group of people of size n. One wants to invite the maximum number of people given to m constraints that a group X and a group Y cannot be invited together.

Example:- Group No. 1 2 3 4 5 6 Size of group 3 4 7 2 8 10

Suppose m=3 and X=1, Y=6. X=2, Y=4. X=1, Y=5. I don't know the answer but it can be calculated for small cases like these but I thought a lot about formulating it as a dynamic programming problem but couldn't reach anywhere. Any help is appreciated.

Tags #dynamic-programming, problem solving

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English hulk_baba 2018-06-02 21:45:04 745 Initial revision (published)