23

I was recently reviewing posts on triage, and I stumbled upon this one: https://stackoverflow.com/questions/77876897/knights-and-knaves-logical-equivalences-problem-for-discrete-structures

enter image description here

I immediately thought it had nothing to do with programming, and flagged it. However, when I checked the answers, a high-rep user answered it. It was also tagged with . But, the description of that tag says:

Only questions about software development related to discrete mathematics are on topic. Discrete mathematics is the branch of mathematics concerned with discrete phenomena – as opposed to continuous phenomena like geometry, real analysis, physics, etc. Typical discrete math topics are discrete probability, combinatorics, graph theory, algorithms and complexity, but also matrices, difference equations, recurrences.

I don't believe this fits the criteria, but there's a chance this problem could still relate to programming.

I found What is the purpose of [discrete-mathematics]?, but it has no answers.

Is this question fit for Stack Overflow?

6
  • 21
    Doesn't look like a programming problem to me. The answer also doesn't include any programming. It's a common logic puzzle, but not programming related at all.
    – BDL
    Commented Jan 28 at 16:06
  • 35
    "a high-rep user answered it" a user with high reputation posting an answer has nothing to do with a question being on-topic. Just ignore the reputation of the answerers and assess the question with your best judgement. Commented Jan 28 at 16:21
  • 4
    Having something to do with a tag reasonable for an on-topic question doesn't make it an on-topic question. See How to Ask, help center & the closing & privilege documentation. PS That use of logic is discrete math but the term isn't typically used to include logic.
    – philipxy
    Commented Jan 28 at 18:34
  • 1
    I guess the tag is relevant though. Stuff like Boolean algebra and De Morgan's Laws etc might be on-topic. Although most of the time such questions probably belong on cs.stackexchange.com instead.
    – Lundin
    Commented Jan 29 at 11:52
  • 1
    For some reason, this question has a "Not looking for input" closevote, and the clearly off-topic question has 2 undelete-votes... What's going on? This is hardly a controversial closure...
    – Cerbrus
    Commented Jan 30 at 12:57
  • @Cerbrus The undelete voters probably don't realize that the question will be automatically deleted again anyway should their undeletion succeed, due to being closed and negatively scored.
    – TylerH
    Commented Jan 31 at 16:13

2 Answers 2

42

Is this question fit for Stack Overflow?

No, because it is not a programming question.

The tag says:

Only questions about software development related to discrete mathematics are on topic.

The question does not involve any algorithms or anything related to software development.

8
  • 4
    Seems to me, this question is asking for an algorithm, or at least an approach to solving it. In fact, that is what is stated in the first line of the question. So instead of reading "how do I get started solving this", and by default excluding "by programming", suppose that since this is a programming Q & A you just assume "by programming". Now it is indeed a programming question. Commented Jan 29 at 21:42
  • 2
    @jmarkmurphy Even when interpreted as an algorithm question, it still lacks focus and is unclear.
    – InSync
    Commented Jan 29 at 22:42
  • @jmarkmurphy Sure, one could add that (and more like which programming language to use ...) and then either edit the question to make it ontopic or post your own question about the topic. As it is, the original creator didn't do that and so most people did not recognize the question as related to programming. I'm sure there are ways to make it related to programming but someone has to do it, otherwise it doesn't count. Commented Jan 30 at 11:23
  • 4
    @jmarkmurphy asking for an algorithm is off topic. We want questions that are practical, ie. give me the implementation of this algorithm. Algorithm questions are ok so far as there's something obviously related to programming, either because it's a question about the implementation, or it's a common problem that programmers face.
    – Braiam
    Commented Jan 30 at 12:29
  • @NoDataDumpNoContribution asking "which programming language to use" is highly subjective, and likely to turn into a holy war over which language is best, so that is definitely out, but algorithms are at the heart of programming unless you are just mindlessly writing code. granted they are an abstraction and must be implemented but the uncommon problems programmers face are the most interesting questions. Commented Jan 30 at 16:13
  • @Braiam I suppose there is a fine line between asking about an algorithm and asking for an algorithm. Would you also say that asking for a design pattern for a given situation is also off topic? Commented Jan 30 at 16:28
  • 1
    @jmarkmurphy Algorithm questions themselves are generally off-topic on Stack Overflow unless they're specifically about a code/programming implementation of said algorithm.
    – TylerH
    Commented Jan 30 at 18:09
  • @jmarkmurphy "is highly subjective" Sorry, I meant it the other (highly objective) way, where the asker specifies what programming language he/she is interested in. I remember vaguely a discussion about whether questions not asking for a specific language are ontopic, but not the details anymore. However, specifying a language typically makes questions ontopic. Only in this case I cannot read the mind of the original creator. If I could do that, I would simply edit that information in but I cannot take the question over (or want to). Commented Jan 30 at 22:22
-22

This type of questions requires strict logic reasoning, not getting confused, and sometimes creative order of evaluation of your logic. At this level, this is not related to programming. Such puzzles are supposed to be fun for humans, not computer tasks.

However, you could easily convert this puzzle into statements in symbolic boolean logic, and then any programming language could solve it (using symbolic simplification or brute-force search). Maybe not what OP expected, but an answer which used programming would be a very useful tool for anyone who tried to solve such puzzles.

I have just asked ChatGPT this puzzle, and it output a lot of authentic-looking reasoning, which proved to be utter nonsense from logical point of view. This shows another possible application of programming to such puzzles: How would you verify a solution which may contain errors? Convert everything to boolean logic statements and verify each of them! So an answer to OP would be useful for anyone who wanted to do that.

So, in my opinion, you could make an on-topic answer to OP, which kinda makes OP on-topic too.

21
  • 16
    You lost me at ChatGPT. What that AI thinks or outputs is beyond irrelevant. And no, being able to formulate an on-topic answer doesn't make an off-topic question on-topic. "What's the formula for air resistance" can be answered with code. That doesn't make it a programming question.
    – Cerbrus
    Commented Jan 30 at 12:55
  • 1
    I wonder if you genuinely disagree with my point on ChatGPT or didn't understand what I wanted to say. I have clarified and expanded my idea. Anyway, you disagree with all the rest of my reasoning, so no chance we can agree; just wondering on that specific part.
    – anatolyg
    Commented Jan 30 at 13:22
  • 3
    You're making a point there that you could apply programming to the puzzle. You're basically restating that it can be answered with programming. And again, that doesn't make the question on-topic.
    – Cerbrus
    Commented Jan 30 at 13:26
  • 2
    OK, I already know you disagree with me on this. Nothing new here.
    – anatolyg
    Commented Jan 30 at 13:32
  • 9
    You're the one that asked me to clarify ;-)
    – Cerbrus
    Commented Jan 30 at 13:47
  • 11
    Now that's thinking outside of the box in order to circumvent well-established rules. I can now answer cooking questions on Stack Overflow, if only I formulate the answer as code generating the recipe!
    – Gimby
    Commented Jan 30 at 16:03
  • 5
    @Gimby Just use Chef; recipes are natively supported!
    – InSync
    Commented Jan 30 at 16:42
  • 3
    "you could make an on-topic answer to OP, which kinda makes OP on-topic too." That is not correct. You can write code to do anything a user can do on a computer. That does not make the question "How do I open my web browser", for example, an on-topic question.
    – TylerH
    Commented Jan 30 at 18:08
  • A good answer can transform a bad question into a good question. I have seen it many times here. It doesn't always happen; maybe happens in 1% of cases. My claim is, this can even make an off-topic question on-topic. Let's say in 1% of cases. So your example represents the other 99%. I agree that they exist. The difference between us is you don't believe in the existence of that other 1%, while I do.
    – anatolyg
    Commented Jan 30 at 18:58
  • 1
    @anatolyg Instead of simply re-stating your opinion, and claiming "but it can happen", your argument would be a lot stronger if you could link to a few examples of it having happened... I'm having a hard time believing it.
    – Cerbrus
    Commented Jan 30 at 22:22
  • 2
    Whether a question is on-topic or not depends entirely on the question. Whatever answers may be posted are irrelevant.
    – Chris
    Commented Jan 31 at 0:59
  • 4
    If the question asked is not about programming, twisting an answer into a programming solution does not change the question itself. If the question is off-topic, it's off-topic. The purpose of the guidelines is to keep the noise and clutter down, and finding a convoluted way to keep off-topic questions around is counter-productive.
    – Ken White
    Commented Jan 31 at 2:10
  • 2
    If you consider an answer on-topic and good enough so that an off-topic question should stay, edit the off-topic question to make it on-topic. Just the presence of the answer won't make the question on-topic. Commented Jan 31 at 5:43
  • 1
    @KenWhite While I agree with you in a formal way, I see it in a kind of opposite way: If you have an opportunity to get a valuable answer on how to apply programming to a certain problem, dismissing it because of the way the problem is presented is counter-productive. People who don't know the answer usually can't formulate the question perfectly; sometimes even adequately. If the question is off-topic, edit it so it's on-topic. The purpose of the guidelines is to share valuable programming solutions in the community without clutter getting in the way.
    – anatolyg
    Commented Jan 31 at 9:08
  • 1
    Simply because you can answer a question with a block of code does not make that an appropriate answer to the question or mean the question is on-topic. An example: OP asks "how do I make the first sentence in my word document a heading?" just because you could provide code that does this doesn't make this question any better/on-topic, at best you are allowing people to skirt the bounds of "SO is not a coding service" and at worst you provided a useless answer to someone who doesn't even know the programming language you wrote your answer in.
    – Nifim
    Commented Jan 31 at 16:44

You must log in to answer this question.

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