chari407's blog

By chari407, history, 3 years ago, In English

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?

  • Vote: I like it
  • -1
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
Rev. 3   Vote: I like it +19 Vote: I do not like it

Well in generally it is NP-Hard problem link