Minimum number of subsets needed to get the main set

Revision en1, by chari407, 2021-02-10 14:47:39

We are given n sets of numbers, {1,4}, {4,5}, {1,2,3}. We have to find the minimum number of sets to combine to get the complete set of numbers {1,2,3,4,5}. Also, we should know which sets were selected.

Example: If we choose {1,2,3} & {4,5}, we get the complete set in the minimum most number of steps = 2. If we choose {1,2,3}, {1,4}, {4,5}, we get the complete set of numbers, but we would require 3 steps. How do I solve this problem?

Tags # dp, #dynamic programing

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English chari407 2021-02-10 14:47:39 496 Initial revision (published)