My question https://stackoverflow.com/questions/13499209/algorithm-for-linear-order-of-spatial-locations-so-that-close-sites-becomes-clos#comment18477864_13499209

became closed for no real reason whatsoever. It is a very real question, and some of the comments show that people knowledgeable didn't have any problems understanding it. At least I would like to have it reopened so that I can answer it myself, with what I have found so far.

Generally, people on this forum seem to be much less friendly than people on the mathematics and statistics StackExchange sites I use more often, and then more answering than posting questions!

  • 13
    Voting is different on Meta. It just means people disagree with the premise of your question. You'd know that if you read the FAQ here.
    – joran
    Commented Nov 22, 2012 at 20:47
  • 1
    I think you question means the shortest route through set points? Is that what it means. As in the the least distance traveled that goes linearly through all the points?
    – Wes
    Commented Nov 22, 2012 at 21:56
  • That comment is indeed helpful! You propose to reformulate the problem as a travelling salesman (or variant thereof) problem. Shall think about it . Thanks! Commented Nov 23, 2012 at 16:01

5 Answers 5


As said on the close note

This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form.

You should show what you have so far and ask a specific question were you got stuck. SO is not about "Give me the code" questions.

And you did not answer on questions you received in comments. The question is vage actually.

To get it reopened, edit your question, improve it and flag it for reopening. If a moderator agrees with your improved question it might get reopened.

  • 1
    Thanks, I will try to do that. But please note that I dod not ask "give me the code" i asked for ideas for algorithms. I gave backgroun for the quetion, and part of the background wat that I am programming in R. I don't think mentioning ones programming language amount to asking for code, it giver background. In this case, mentioning R is helpful, since that is a statistical programming language and so is informative about questioners background or interests. Again thanks, will do as you said. Commented Nov 22, 2012 at 20:32

The very first sentence of your question reads:

I need an algorithm for ordering linearly a set of spatial coordinates so that close sites become close in the linear order. \Ideas?

StackOverflow works best when the questions refer to actual code that you have written that you are having a problem with. This is certainly not the case here.

As a question about an algorithm, it is simply too vague and broad.

At best, you're asking people to help you develop an algorithm for a statistical analysis, which would be off topic here. (Possibly on topic at other StackExchange sites, but I'm doubtful about that.)

At worst, you're asking for recommendations, or the code itself, both of which are reasons to close the question.


I'd say is not impossible to understand your intentions but a couple of comments reflect that the closeness relation and the translation of closeness in highest dimensions to a linear order is also very vague.

There is even a comment saying this is not possible.

So, after understanding all that I could come to the conclusion that this is a question open to discussion and not a good match for SO.

  • 1
    Well, the comment saying this is not possible did not understand the question. Of course it is not possible if you want an exact representation of the distance. That is not asked for! The background given in this question should explain it: what is wanted is an ordering that makes the covariance matrix, with sites in that order, a banded matrix with as few (non-zero) bands as is possible. That is a quite welldefined algorithmic question. So I think I must ask: Is this forum really only for pure coding questions, such that algorithmic questions like this belongs on the SE Mathematics site? Commented Nov 22, 2012 at 20:43

There are a few factors that I imagine led to the closing, in increasing order of seriousness:

  • The question throws around some reasonably high-level mathematics that is beyond the usual scope of StackOverflow.

  • It's primarily an algorithms question, not a practical programming one.

  • You've thrown in a very broad question about R at the end which is probably not succinctly and fully answerable and is regardless distinct from the main, algorithm-based problem.

  • Even the end goal that you want your algorithm to achieve is vague and poorly defined. For many (not all) sets of points there is clearly no strictly closeness-preserving ordering. (Consider, for example, the set of all vertices of any regular polygon; no ordering of them can keep every point next to both its neighbours, which would be necessary for the ordering to be closeness-preserving). That means if you want an algorithm to achieve an optimally closeness-preserving ordering, you need to give some definition of how closeness-preserving a given ordering is, so that it's possible to identify the most closeness-preserving ordering of a given set of points. If we don't have a rigorous definition of what the optimal ordering is for cases where no perfect ordering exists, then how can we possibly write an algorithm to find it?

The first two issues on the list count slightly against the question, in my view, but certainly either one of them alone would not be enough to warrant closing the topic in my eyes. However, points 1 and 2 together make the question fairly off-topic for SO, and point 3 adds to the ugliness. Finally, point 4 renders the whole question totally invalid and was probably the main reason for closing.

Closing was the right decision here.


The culture[*] of the site is to discourages laziness and this is very good and healthy.

The site helps people that first have been show, and prove that they work a lot and just have been stack in a dead end point and they ask for help.

If they are answer on the I need an algorithm for ordering linearly, then we going to be come not a site of questions and answers, but a site of requests.

The culture of the site is not to give you food to eat for today, but to learn you to create the food and been able to live alone (where the food==code), and this is very cool, and even if you are now hungry for food, you discover that its better to make you learn how to create your food and be independent than the other way.

So in that culture they may not feet the lazy people that wait from other to feed them, maybe also not feet people that do not know programming and belive that can make a program by questions, people that they do not understand with the first that we actually help them, and not make them depended users.

[*] from the comments on the question.

  • The rhetoric questions to my self if this site is not make depended users, why am I addicted to ? (crazy...)
    – Aristos
    Commented Nov 23, 2012 at 7:25

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