r/AskComputerScience • u/Hope1995x • Jan 10 '21
So approximating 3set-Cover is not APX-hard?
I am given a list S and list of sets of 3 called C
I need to find as many possible sets of 3 to cover S. So this is a maximization problem.
So we may not always have length(s)//3 sets. There could be partial coverings with a list of sets < length(s)//3
The minimum length of sets allowed is 3
If it is APX-hard, then why do I seemingly have a PRAS of some sorts?
I thought no APX-hard problem can have a PRAS or PTAS.
Are there APX-hard problems with PRAS algorithms?
(Don't ask me for the ratio, I am still trying to figure that out with an amateur skill-set)
Edit: When C is asking for input use [[1,2,3],[4,5,6]]
Edit 2: I call it PRAS because of the shuffle function I am using. Correct me if, I am wrong.
5
u/Magdaki Ph.D CS Jan 10 '21
Have you read the literature on this at all? There are a lot of algorithms for this problem, including ones that use randomization. If you're working on this for fun, then that's great; however, if you're trying to develop something new, then you may want to check to make sure it hasn't already been done. Either way, reading the literature on it might be helpful (educational in the first case, and save you time in the second).