Difference between revisions of "Help talk:Trolls on wheels!"

From Algorithm Wiki
Jump to: navigation, search
(Possible simpler example, depending on your views on unspecified tiebreakers)
Line 4: Line 4:
 
since it only contains 4 uncovered elements).
 
since it only contains 4 uncovered elements).
 
The union of s3 and s4 cover all elements (2 sets).
 
The union of s3 and s4 cover all elements (2 sets).
 +
 +
Is this more simply demonstrated with the following?
 +
 +
<math>S_1 = \{1, 2\}</math>
 +
<math>S_1 = \{1, 3, 5\}</math>
 +
<math>S_2 = \{1, 2\}</math>
 +
<math>S_3 = \{3, 4\}</math>
 +
<math>S_4 = \{5, 6\}</math>
 +
 +
Whatever you use as a tiebreaker is irrelevant in this counterexample,
 +
and if you're really concerned about it, isn't the lack of any specified tiebreaker
 +
in the problem a counterexample in and of itself?

Revision as of 04:15, 24 December 2014

The first counterexample shown is incorrect as greedy would get an optimal solution (2 sets). First, greedy would choose S3 since it contains 10 uncovered elements. However, then, greedy would choose S4 since it contains 6 uncovered elements (not s2 since it only contains 4 uncovered elements). The union of s3 and s4 cover all elements (2 sets).

Is this more simply demonstrated with the following?

$ S_1 = \{1, 2\} $ $ S_1 = \{1, 3, 5\} $ $ S_2 = \{1, 2\} $ $ S_3 = \{3, 4\} $ $ S_4 = \{5, 6\} $

Whatever you use as a tiebreaker is irrelevant in this counterexample, and if you're really concerned about it, isn't the lack of any specified tiebreaker in the problem a counterexample in and of itself?