Skip to main content
Ben Burns's user avatar
Ben Burns's user avatar
Ben Burns's user avatar
Ben Burns
  • Member for 8 years, 6 months
  • Last seen more than 7 years ago
comment
How many distinct sets of n collinear points are there in an evenly-spaced two-dimensional grid of m x m points?
If you look over the edit history I don't believe later versions contradict earlier versions. If they do, I apologize. Regarding the link to my previous question, I'm not sure how this applies? It's similar, but quite distinct.
Loading…
comment
How many distinct sets of n collinear points are there in an evenly-spaced two-dimensional grid of m x m points?
You should count this, yes. I failed to consider this in my previous comment.
Loading…
Loading…
comment
How many distinct sets of n collinear points are there in an evenly-spaced two-dimensional grid of m x m points?
By "unique" I mean that ordering of the set doesn't matter. e.g. $\{ (0, 0), (0, 1) \}$ should be treated as equivalent to $\{ (0, 1), (0, 0) \}$ -- in retrospect, "distinct" would likely have been a better word choice.
Loading…
comment
How many distinct sets of n collinear points are there in an evenly-spaced two-dimensional grid of m x m points?
No. For example, for $f(3, 4)$, a line with zero slope which intersects $(0, 0)$ should count twice, as it would apply to the set $\{ (0, 0), (0, 1), (0, 2) \}$ as well as the set $\{ (0, 1), (0, 2), (0, 3) \}$ (assuming grid starts at $(0, 0)$ spanning into the positive quadrant, and each point is spaced 1 unit away from its neighbours).
Loading…
Loading…
Loading…
comment
How many lines of exactly n points can be placed in a discrete, square grid of size m x m?
Thanks, that's perfect. I managed to work backward from your expansion to figure it out well enough to code it up in Python. I was a bit thrown by the bounds of the indexes being defined below the sigma rather than above it.
awarded
awarded
revised
Loading…
comment
How many lines of exactly n points can be placed in a discrete, square grid of size m x m?
Apologies, but I haven't encountered that form of sigma expression. Can you please give a quick example as to how it should be expanded?
revised
Loading…
awarded