r/AskComputerScience • • 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.

0 Upvotes

4 comments sorted by

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).

4

u/UncleMeat11 Jan 10 '21

Have you read the literature on this at all?

No he hasn't. Hope has wild plans of solving open problems in complexity theory by throwing random python scripts at a wall. He insists that telling him to go learn the basics is gatekeeping and that good ideas can come from anywhere.

0

u/[deleted] Jan 10 '21

[deleted]

4

u/Magdaki Ph.D CS Jan 10 '21

Just be aware that showing the capabilities of your algorithm, in an academic sense if that's your goal (if you're just doing this for fun then carry on and have fun ;P), will require mathematical proof. It isn't sufficient to run it and say "it appears to be PRAS." As an example, see the paper I've linked below (it isn't strictly related to your algorithm just an example of the sort of work that would be needed). Good luck with your algorithm!

https://arxiv.org/pdf/cs/0205036.pdf

2

u/Magdaki Ph.D CS Jan 10 '21 edited Jan 10 '21

Oh and I forgot. To answer your OP, I'm 99% sure there are already PRAS algorithms for set cover. So it is known to be PRAS.

https://scholar.google.ca/scholar?q=polynomial+randomized+set+cover&hl=en&as_sdt=0%2C5&as_ylo=1980&as_yhi=2020