- #1
Vorde
- 788
- 0
This is a problem that I just thought of the other day and am intrigued by, let me set it up.
You have an n x n grid of dots, so that each dot is 1 away from the four dots closest in each direction. My question is; for a grid of n2 dots, what is the total number of possible combinations of four dots that form a square.
Now this is not just how many 1 by 1 squares there are, they can be any size and any orientation (meaning that the sides of the square do not have to be parallel to the sides of the grid).
Now I had attempted to figure this out myself, but I've come to a problem I couldn't solve (I apologize for not using mathematical notation, I don't really know it well enough to risk misrepresenting my idea).
Here's what I came up with:
The total amount of squares can be represented by the sum of all 4 number combinations (represented by (a,b,c,d) where a, b, c, d all stand for the coordinates of a single dot) that pass two tests:
The first test is to determine whether or not those form a square. My original idea of a test if a-b=a-c=a-d=b-a and so on failed when I realized it would not pick out the difference between squares and parallelograms. My next idea is (given a square ABCD) if AC and BD are exactly [itex]\sqrt{2}[/itex] times AB,BC,CD,DA then that should imply a square, but that's where I stopped because I am not sure of that.
The second test is to test whether or not a square is not just a rotation of another square, but I have no idea how to accomplish that.
I appreciate any advice or help anyone can give.
You have an n x n grid of dots, so that each dot is 1 away from the four dots closest in each direction. My question is; for a grid of n2 dots, what is the total number of possible combinations of four dots that form a square.
Now this is not just how many 1 by 1 squares there are, they can be any size and any orientation (meaning that the sides of the square do not have to be parallel to the sides of the grid).
Now I had attempted to figure this out myself, but I've come to a problem I couldn't solve (I apologize for not using mathematical notation, I don't really know it well enough to risk misrepresenting my idea).
Here's what I came up with:
The total amount of squares can be represented by the sum of all 4 number combinations (represented by (a,b,c,d) where a, b, c, d all stand for the coordinates of a single dot) that pass two tests:
The first test is to determine whether or not those form a square. My original idea of a test if a-b=a-c=a-d=b-a and so on failed when I realized it would not pick out the difference between squares and parallelograms. My next idea is (given a square ABCD) if AC and BD are exactly [itex]\sqrt{2}[/itex] times AB,BC,CD,DA then that should imply a square, but that's where I stopped because I am not sure of that.
The second test is to test whether or not a square is not just a rotation of another square, but I have no idea how to accomplish that.
I appreciate any advice or help anyone can give.