|
Page 1 of 1
|
[ 15 posts ] |
|
Share:
|
| Author |
Message |
drunner2007
Posts: 1118 Location: United States
|
Posted: Jun 26, 2007, 11:10 pm •
# 1
Suppose that you have a rectangular  x  grid of points. How many squares can be formed with vertices as grid points? There are no orientation restrictions on the squares.
I came up with a moderately ugly double summation that appears to work in the general case, but I need confirmation and I was wondering if there is a way to simplify it. Here is the number of "slanted" squares:
where  and  are positive integers. This can be rewritten as
And of couse the number of nonslanted squares is

_________________ It is never too late to be what you could have been...
The only way to predict the future is to make it.
Last edited by drunner2007 on Jun 27, 2007, 12:32 pm, edited 1 time in total.
|
|
|
digger
Posts: 248
|
Posted: Jun 27, 2007, 1:04 am •
# 2
Let (a,b) be left-lower vertex and (c,d) be opposite right-upper vertex.
Then we have to find the number of (a,b,c,d) with property  and
This is the problem?
If yes then its simple. Choose pair (a, c) and independently (b, d).
So the answer is
P.S. I think my guess was right because the problem became trivial in case we consider rectangles (a,b,c,d) and (a+h,b+h,c+h,d+h) be the same. Then we simply move  and so have  distinct rectangles.
_________________ It is very difficult to find black cat in a dark room if there are no cat there.
|
|
|
drunner2007
Posts: 1118 Location: United States
|
Posted: Jun 27, 2007, 11:19 am •
# 3
digger wrote: Let (a,b) be left-lower vertex and (c,d) be opposite right-upper vertex. Then we have to find the number of (a,b,c,d) with property  and  This is the problem? If yes then its simple. Choose pair (a, c) and independently (b, d). So the answer is  P.S. I think my guess was right because the problem became trivial in case we consider rectangles (a,b,c,d) and (a+h,b+h,c+h,d+h) be the same. Then we simply move  and so have  distinct rectangles.
We are looking for squares, not just rectangles. I'm not sure that the result works. For example, with m=4 and n=5 we have 10 slanted squares and 20 nonslanted squares. You're expression gives 60.
_________________ It is never too late to be what you could have been...
The only way to predict the future is to make it.
|
|
|
Altheman
Posts: 6202 Location: Illinois
Blog: View Blog
|
Posted: Jun 27, 2007, 5:49 pm •
# 4
Can a recursion be useful for the slanted squares? [ex. when m=n] You can have a_{n+1}=4a_n+b_n where b_n denotes the number of squares that where x (or y) component has a distance of n+1
_________________ -Alex
Altheman's Problem Column
|
|
|
JBL
Posts: 11724 Location: Brooklyn, NY or Cambridge, MA
|
Posted: Jun 27, 2007, 7:56 pm •
# 5
_________________ Joel
Hi Deeps! <3
|
|
|
Altheman
Posts: 6202 Location: Illinois
Blog: View Blog
|
Posted: Jun 27, 2007, 8:01 pm •
# 6
Say that the m=n is sequence 1, then the link says that it is equal to seq2+seq3
they give you seq2, but then they say that seq3=seq1-seq2
That is such bs. haha
_________________ -Alex
Altheman's Problem Column
|
|
|
4everwise
Posts: 2563 Location: San Diego, CA
Blog: View Blog
|
Posted: Jun 27, 2007, 11:09 pm •
# 7
Here's an idea for the horizontal ones:
WLOG, say  Then you can pick the size of the square (and location on the "m axis") in  ways.
Then, you need only select a starting point along the "n axis." This can be done in  ways, so for the total, just multiply the two together.
I think...
_________________ Take a closer look, the answer is right in front of you!
|
|
|
TZF
Posts: 3276 Location: Ithaca, New York
Blog: View Blog
|
Posted: Jun 28, 2007, 2:18 pm •
# 8
The KeyThe four vertexes of any square can be described as being points on a larger square which is parallel to the grid lines. Turning the KeyConsider square ABCD (labeled counterclockwise), with sides parallel to the gridlines, and k dots on each side, inclusive of vertexes. Suppose we start with vertex A, and, moving counterclockwise, mark every (k-1)th point, until we return to A. These points happen to be B, C, and D, and together form the whole square.
Instead if we move one point counterclockwise of A and repeat the procedure, we will find that these four vertexes form a different square. We can repeat this for the rest of the points on AB, and each will define a different square. Hence, there are k-1 squares formed by a k by k root square whose sides parallel to the gridlines (we're subtracting one because we don't want to count both vertexes as starting points). Opening the DoorNow, all that is left is to calculate the number of k by k point squares (|| to axes) there are in an m by n lattice. This is simply (m-k+1)(n-k+1). Each of these squares is actually the root square of (k-1) different squares. So, for each k, there are (m-k+1)(n-k+1)(k-1) different squares. Now, WLOG say  . Then,  , which can easily be broken down with the sum of squares and sum of cubes formula. It simplifies to  , where  Or, if you prefer, the somewhat cleaner: 
_________________
Last edited by TZF on Jun 28, 2007, 5:48 pm, edited 2 times in total.
|
|
|
cincodemayo5590
Posts: 1143 Location: Chicago
|
Posted: Jun 28, 2007, 4:54 pm •
# 10
Altheman wrote: err...how can that be correct if it is not symmetric in  and  ? The Zuton Force wrote: Now, WLOG say  .

_________________ Say this ten times quickly: The product of the sums of squares is greater than the square of the sum of products!
|
|
|
Altheman
Posts: 6202 Location: Illinois
Blog: View Blog
|
Posted: Jun 29, 2007, 1:34 pm •
# 12
Okay I think I will finally read the posts and offer a solution. Zuton Force had a great idea!
In essence, for each square, we can construct another square by drawing lines parallel to the coordinate axes through the verticies.
Suppose our squares are circumscribed by a  by  square, then we have:  border points on the square, and a forth of these determine a square, for a total of  squares.
Now lets consider a  by  square. [WLOG  ] The largest square that we can have is  by  . Suppose we have a  by  square. We have  by  squares that are parallel to our axes.
Hence, we want the sum:  .
Which I just plugged into my calculator [this is trivial...sum of cubes, squares, etc]
Then I factored on my calculator.
[which is obviously positive since  .]
[Did I do anything wrong? Does this work for small values? I feel like we should not be able to solve something that was not solved on the OEIS.]
_________________ -Alex
Altheman's Problem Column
|
|
|
TZF
Posts: 3276 Location: Ithaca, New York
Blog: View Blog
|
Posted: Jun 29, 2007, 2:21 pm •
# 13
Well your result seems to agree with mine (you interchanged  and  and replaced  with  , or something like that - most likely, you used side-lengths and I used lattice points - you might want to clarify this), and your approach was pretty much what I did.
So I'm assuming you got what I did, which works for every example I bothered to try.
I can't believe that OEIS wouldn't have it...
Anyway, I'm after a combinatorics oriented solution. I can see why there might be a  is coming from (in my version of the formula).
To choose the root squares setting the  coordinate of the lower-left corner to  means we need to pick 2 points of the  .
To choose a slanted square originating from such a root square, we need to choose 3 points from  : the  bounds of the root square and the seed point in between from which we will count off and get the other vertexes.
And then, adding them,  .
However, I can't figure out how to complete the proof with this approach - can anyone help? Or offer a different combinatorics solution?
_________________
|
|
|
JBL
Posts: 11724 Location: Brooklyn, NY or Cambridge, MA
|
Posted: Jun 29, 2007, 8:21 pm •
# 14
Altheman wrote: [Did I do anything wrong? Does this work for small values? I feel like we should not be able to solve something that was not solved on the OEIS.] The Zuton Force wrote: I can't believe that OEIS wouldn't have it...
I've tried all of the standard input forms that I would expect (as a triangle by rows, as a square array by diagonals) and wasn't able to find it, so it seems it's just not there. It's actually not that shocking -- there are lots and lots of integer sequences out there
I've submitted it now, including a link back to this thread -- my past experience is that it takes a few days to a week for a submission to show up online. I'll probably make another post on this thread when it does appear. (I submitted it in Altheman's form because the only difference is that TZF's has a lot of zeroes.)
_________________ Joel
Hi Deeps! <3
|
|
|
JBL
Posts: 11724 Location: Brooklyn, NY or Cambridge, MA
|
Posted: Jul 16, 2007, 10:59 am •
# 15
_________________ Joel
Hi Deeps! <3
|
|
|
Share:
Moderator: Pre-Olympiad Moderators
|
Page 1 of 1
|
[ 15 posts ] |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
|