1
\$\begingroup\$
  • I wanted to find out my mistakes in the code that could shorten it all together.

  • I would love to figure out how to address bad variable names

  • Use enumerate instead of python's range

  • Use a better method to delete all permutations of a set excluding itself from a list. (eg. keep (123) but delete (132), (213)...)

Question

What would be the best way to ask a question that relates to the P vs NP problem without garnering too many downvotes?

https://pastebin.com/K4gfUbFS

| |
\$\endgroup\$
  • \$\begingroup\$ Can you clearly describe the purpose of the code? Did you test the code and does it produce the correct results? If so, I think we can make this work. However, I don't understand your fear of getting off-topic and the P NP remark. \$\endgroup\$ – Mast Jun 14 at 12:00
  • \$\begingroup\$ @Mast It was originally intended to solve the Exact Three Cover Problem. (Given a set S of elements and a list C of Three-Element Sets. Is there any of those sets when combined EXACTLY cover each element in S ONLY one-time (eg. S = 123456 C = [123],[456]. YES)) I have got correct results, I also fixed issues that given me false negatives by intensively shuffling the list C to counter-act any inputs that may fail. So the algorithm really lies on the probability on how C is shuffled. \$\endgroup\$ – Travis Wells Jun 14 at 12:31
  • \$\begingroup\$ Your question is unclear to me. Please edit it to address my concerns. Can you perhaps make this more focused on what the perceived problem is? Why do you think people will go off-topic with "P vs NP buzz"? What even is "P vs NP buzz"? Why would it be bad for there to be "P vs NP buzz"? \$\endgroup\$ – Peilonrayz Jun 14 at 12:57
  • \$\begingroup\$ @Peilonrayz Because many people in the past have made claims to a solution that I was in fear that someone would massively downvote a question just to kill the "buzz". A P vs NP buzz is mainly a hype that usually turns out wrong. The point of the question is to find out what's wrong with the code and how it could be reviewed to make it better. The algorithm serves a newer purpose. Which is "attempt" to find an Exact Three Cover in poly-time \$\endgroup\$ – Travis Wells Jun 14 at 13:04
  • \$\begingroup\$ Please can you ① Link to situations where this has happened. ② Point out exactly what the P vs NP buzz was. ③ Quote any of the buzz that was in your question. ④ Quote all buzz from other users. \$\endgroup\$ – Peilonrayz Jun 14 at 14:08
  • \$\begingroup\$ @Peilonrayz From this but it's on another stack. meta.stackoverflow.com/questions/396415/… \$\endgroup\$ – Travis Wells Jun 14 at 14:19
  • \$\begingroup\$ @Peilonrayz Perhaps it was deleted by the community. Overall, what I'm really trying to ask... In what way, do I phrase a question that wouldn't gather mass downvotes? \$\endgroup\$ – Travis Wells Jun 14 at 14:28
  • \$\begingroup\$ When in doubt, the FAQ on asking questions is always a good start. \$\endgroup\$ – Mast Jun 14 at 14:38
  • 1
    \$\begingroup\$ I don't see anything inherently wrong with what you propose, but a vague question can and will attract downvotes. So if your goal is to prevent that, please, make sure your question on the main site is a lot less vague than this question. Do note, if your code should've attempted to solve something that it doesn't yet, perhaps it's not ready for review. Something is bothering you and I still don't know whether that's going to be a problem or not. \$\endgroup\$ – Mast Jun 14 at 14:40
  • \$\begingroup\$ @Mast Its being able to explain 100+ lines of code in one Question. A very long piece of code that I believe could be shortened significantly. Some time on practicing on a question would help. I will experiment with catchy titles, do some research on whats the best tags, chunk down all the parts of my code and simplify it as much as possible, do my best to fix bad variable names, and provide example outputs. \$\endgroup\$ – Travis Wells Jun 14 at 14:43
  • \$\begingroup\$ If you want us to explain your code to you, that's something we explicitly don't do. At this time, perhaps the best bet is to improve your current meta question so we can fix your question before it hits the main site. \$\endgroup\$ – Mast Jun 14 at 14:49
  • \$\begingroup\$ "What would be the best way to ask a question that relates to the P vs NP problem" You post code, and you can get a review. P = NP is unsolved, so if your code solves that, I think you should be writing to a journal instead of posting a question. If you want your math reviewed, you're in the wrong place as well. What does P = NP have to do with your code anyway? If you already know the issues with your code, perhaps you can cut them up and post them as separate issues on Stack Overflow or Software Engineering, depending on the issuess you're left with. \$\endgroup\$ – Mast Jun 14 at 15:01
  • 1
    \$\begingroup\$ Consider not mentioning P=NP at all, since your code has nothing to do with it, and it's confusing to people that understand the actual problem - you say yourself, you're an amateur: these 20-some downvotes are saying "go back to the drawing board!" - nobody can mass-downvote any post: to get massive downvotes you need to convince a lot of people that your post is a waste of their time. That said yes, if your code works as intended as far as you know, CR can really help you improve it. \$\endgroup\$ – Mathieu Guindon Jun 14 at 15:20
  • \$\begingroup\$ @MathieuGuindon Yes, I went back to the drawing board. It wouldn't have to do anything with P = NP because it (the new algorithm) is probabilistic (which means there can and will be an error. Whether that error is bounded (which would be surprising) is something that would seem to be more attainable) \$\endgroup\$ – Travis Wells Jun 14 at 15:24
  • 2
    \$\begingroup\$ That said it's ...pretty easy to convince a lot of people to downvote something on Meta.SO ...don't worry about it, Meta.SO is... special. \$\endgroup\$ – Mathieu Guindon Jun 14 at 15:30

You must log in to answer this question.

Browse other questions tagged .