72

Yesterday while browsing the tag, I came across this question, which at the time had already received 2 downvotes and 2 close votes:

0/1 knapsack with dependent item weight?

It's a question about a variation on the 0/1 knapsack problem, with some additional constraints added. The question is clearly stated, and shows research effort. Some links are provided, along with a description of an attempt to solve the problem. Unfortunately, the asker had stepped on an SO landmine in his closing paragraph by asking if there was any research into solutions for this problem, instead of just asking for solutions to the problem, which qualifies as asking for an "off-site resource".

This seemed rather harsh to me, because the question was perfectly fine in my opinion except for that line, which could be easily have been addressed with a comment suggesting an edit, but it's technically true that it's off topic. Since no-one had bothered to explain, I left this comment:

It seems like your question got some downvotes. I don't really agree with the downvoters, but it was probably because you asked if there was any research into this problem, which could be interpreted as asking for an "off site resource" which is off topic.

and the asker immediately edited the question to fix this. Nevertheless, the downvotes were not reversed and by this morning it had received 3 more close votes and is now closed for the exact reason that I had commented on and the OP had fixed.

I feel like this kind of thing is just wasting a lot of people's time. What is the point of commenting and helping the OP to improve their question if it gets closed anyway?

Aggressive downvoting and voting to close on the tag is a common pattern, but unfortunately it's not very consistent. For example, here is a very similar (but not duplicate) question to the one above that received upvotes and a good answer:

Knapsack with mutually exclusive items

It's the same basic premise: how to solve a well-known algorithm with a few extra constraints added.

Off topic?

It could be argued that non-language specific algorithms questions belong on the Computer Science Stack Exchange site, but if that's the case why do we even have the and tags? Why are some of these purely algorithmic questions highly upvoted while others are closed? I'm also not sure that the people on the CS site would appreciate many SO algorithms questions being migrated there either: from browsing that site the level at which the questions are asked is a lot higher and they wouldn't want a zillion variations on how to find the permutations of a string or minor variations on well-known problems.

Too broad?

For some reason, a lot of algorithms questions get close votes for being "too broad". I don't know why that is, given that most of them are well specified and can be answered with a 5-10 line description of an algorithm and a paragraph of explanation. Perhaps the close voters are not aware that these seemingly complex problems can have simple and straightforward solutions?

Asking the impossible?

I suspect that there actually is no good answer to the original question as the algorithm the OP is asking for does not exist, but if so, that is the answer that should be provided. To downvote/close for that is circular reasoning: the OP shouldn't need to know the answer to their question (or if there is an answer) in order to judge whether it is an acceptable question, if they did know that then they wouldn't need to ask in the first place.

So, can I get a definitive answer about whether asking questions about algorithms on SO is on topic, and if so, can people stop downvoting and voting to close as if they aren't?

16
  • 31
    Ah, the old "the community can't make up its mind whether or not it accepts these questions" dilemma.
    – BoltClock Mod
    Commented Aug 11, 2016 at 2:28
  • 2
    @BoltClock I think they made their minds...
    – Braiam
    Commented Aug 11, 2016 at 2:45
  • 11
    I follow the [algorithm] tag, because it sometimes has very interesting questions, but it is a mixed bag. Users with a problem that they have no idea how to even begin thinking about solving will often use the tag, and it also gets a lot of very basic "write an algorithm that does X" homework questions. I'm guessing this causes the tag's followers to be a bit trigger-happy with the [close] button. (I also see a lot of voting based on how interesting a problem is, as opposed to how good the question is, which may confuse askers of downvoted questions.) Commented Aug 11, 2016 at 14:21
  • 1
    I'm tempted to answer with "No", as you can't get definitive answers on Meta, and you can't stop people from voting to close and/or downvoting ;) Commented Aug 11, 2016 at 14:25
  • 7
    Goes on computer science.se or theoretical computer science.se. Commented Aug 11, 2016 at 14:27
  • 1
    @uoɥʇʎPʎzɐɹC Could you address the part of the question under "off topic?" Commented Aug 11, 2016 at 14:31
  • 5
    @uoɥʇʎPʎzɐɹC Yeah, of course. Algorithms have no practical programming applications, after all.
    – Casey
    Commented Aug 11, 2016 at 14:33
  • 4
    @Casey then computer science.se would not exist. Just because physics has practical engineering applications doesn't mean physics.se should be merged with engineering.se. Commented Aug 11, 2016 at 14:40
  • 11
    CS.se probably didn't exist when the algorithms tag was created. One of the themes of SO/SE is that what was acceptable a few years ago may not be acceptable today.
    – alexw
    Commented Aug 11, 2016 at 14:56
  • 1
    related (though probably not a duplicate): How can we discourage over-downvoting on questions?
    – gnat
    Commented Aug 11, 2016 at 16:51
  • 1
    The arbitrary reasons some people apply for closing questions keep eluding me. I recently saw my question Using SVG and/or HTML to visualize a family tree where nodes can have multiple parent nodes and multiple interconnections getting closed for the same reason, although I didn't ask for external resources at all. When I clarified my question, I was told it was "too broad", even though I couldn't be more specific. I'm trying to get it re-opened, but no luck so far. Commented Aug 11, 2016 at 19:05
  • 1
    @JohnSlegers: I just had the honour of being your triggering vote to reopen. Thanks for the shout-out to yourself; I've attacked this problem, myself, and often cited it in systems design classes.
    – Prune
    Commented Aug 12, 2016 at 21:59
  • @Prune : Awesome! Please share your knowledge on the issue in an answer or (if not suitable for an answer) in the comments ;-) Commented Aug 12, 2016 at 22:09
  • 1
    I just looked at the latest 20 or 30 questions in this tag and my experience is that there is no unfair downvoting or closing going on. I downvoted some not really good questions and upvoted some other quite good ones and also upvoted some really great answers which definitely deserve more upvotes (fate of a minor less frequented tag). All in all the tag suffers a bit from low attention resulting in higher fluctuation of score and less upvotes compared to more popular tags for the same quality. But that's as expected. Commented Aug 16, 2016 at 21:29
  • I think the community must consider some rules for these type of behaviors, not just say it is opinion based. I asked a question (after many questions that I asked before without seeing such behavior, with this tag, it makes it noncompetitive) and get several downvotes in below 5 minutes, just in breaktime to have a coffee. I was trembling with fear when I saw :). The other users came and upvotes me, which I think they were just for supporting to defend me against them. One way could be forcing them to leave a comment in a window with secret identities to see their reasons to improve the post.
    – Ali_Sh
    Commented Jan 1, 2023 at 5:30

2 Answers 2

34

Hook! There are problems, and there are algorithms. The problem is that the tag contains more problems than algorithms.

TL;DR

In my opinion, problems that are NP-hard (are alike) are probably better suited on CS than SO, because there are no "easy" answers. Knapsack problems are the limits, and it is why they can be either well or badly received.


To me, it looks like there are different kinds of questions in the tag:

  1. Questions about (to be) implemented algorithms;
  2. Questions about existing algorithms;
  3. Questions about problems.

The first category is obviously on-topic on SO, the second one is often "ok" for SO people if the question is well written because these can be answered quite simply.

For me, the question Knapsack with mutually exclusive items and 0/1 knapsack with dependent item weight? are in the third category.

Why was one more rejected than the other? I think there are multiple facts:

  • The proportion of people on SO really familiar with such problems is low;
  • As one of these, I think the first question is much easier to answer than the second one.

You can answer the first questions by providing an (almost) complete algorithm (as this was done), you (probably) cannot answer the second question without having to refer to external sources. If I were able to answer that second question, I would either:

  • Have to assume that OP's is already in the OR field, in order not to have to explain basic topics of OR, but if this was the case, then OP would probably have already found his solution;
  • Have to assume that there are no existing algorithm, but there are whole books on the knapsack-problem, if such version has not been tackled yet, it is probably a good fit for a PhD-thesis, so how would I fit that in a SO answer?

While these two questions are interesting (to me), I don't think they fit on SO. I think there are different type of "problems", and some of them are fitted for SO and others not (and should probably be asked on CS).

As a rule of thumb (do not take this as a universal truth, I am just trying to illustrate my words), I would say that if your question can be asked in a programmer interview, it can fit on SO, but if you need to fund a PhD-these to solve your problem, it is probably more suited on CS.

Also, if you want practical answers (which is, I think, the purpose of SO), you should provide practical information, which these questions do not1 (e.g. the size of the instances, the constraints on the dependency, ...) - Without these, OP is asking for a study about this kind of problem, which is certainly not the purpose of SO. These information are part of the context of the problem, anywhere on SO, questions without context are closed as too broad, the tag is no exception to this.

1 The second got an answer, so you might say "But these are answerable out of context!", but... the only answer had to made a strong assumption on the instances in order to provide a reasonable algorithm.

4
  • 2
    In that case, I could understand the close votes, but why do downvotes apply? Downvotes should not be a surrogate for close votes for people who don't have the privilege.
    – SGR
    Commented Aug 12, 2016 at 9:07
  • 2
    @SGR I think that one can explain close votes because these are meant to be (at least partly) rational, but downvotes are personal. I think the question linked by OP is quite the exception (a good question that got downvoted) - Most questions that get downvoted on algorithm are often either poorly written or incomplete (I sometimes downvotes questions on this tag because even after some comments, OP is not able to give a proper description of the problem... ). But again, this is why I would downvote questions on algorithm, everyone has its own "rules" for downvoting.
    – Holt
    Commented Aug 12, 2016 at 11:23
  • @SGR On top of that, people who close vote/flag may also automatically downvote for whatever reason (punishment, misunderstanding advice given on meta, etc.). That is not always productive to do, but you can't really stop it.
    – Gimby
    Commented Aug 12, 2016 at 12:27
  • The argument that I have seen on many discussions that items that ask "How do I do X" are deprecated with the feeling that questions should be "what is the best among these alternatives" and "what am I doing wrong", If you ask what should I do to make something least likely to be down voted or closed as inappropriate, you could probably give guidelines. By the way, this is the type of problem where non-rigorous methods may actually be best since rigorous methods may not exist, even with a complete tree search. Commented Aug 12, 2016 at 21:23
6

Holt has great points in his answer, though I would say that if the OP's question really is meant for the CS Stack Exchange, then the community should flag the question to be moved/migrated to that stack exchange instead of closing it.

3
  • Errr... You can flag it.
    – Braiam
    Commented Aug 14, 2016 at 0:35
  • 2
    Not enough rep to flag it. Commented Aug 14, 2016 at 1:21
  • 1
    Sometimes it can be ontopic on multiple Stackexchanges but may have better chances of getting answered / getting upvoted somewhere else. However, it's not trivial to predict where that would be. That's why the decision, where to go is mostly left with the asker. As long as a question isn't closed, it is in principle okay to answer it (or upvote or downvote). The asker is also invited to try somewhere else, should the question be badly received here. We should reserve migration to the crystal clear cases. Maybe we could look at all the downvoted cases and discuss possible migrations. Commented Aug 16, 2016 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .