All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
MultiSquares (Posted on 2008-08-28) Difficulty: 4 of 5
A plane surface is marked with points in a square gridded format.

How many squares,
using the points as their vertices,
can be drawn within a grid of:
1. 6 x 6 points,
2. 7 x 7 points
and
3. n x n points?

In this 3 x 3 array:
   .  .  .
   .  .  .
   .  .  .  
          there are 6.
The 5th envelopes them all and
the 6th uses the outer midpoints 
of the grid as its vertices.

  Submitted by brianjn    
Rating: 4.0000 (1 votes)
Solution: (Hide)
For 6 x 6
     25 16 9 4 1   Squares in traditional orientation
        16   4     Squares in the major/minor diagonal orientation
           9 4 1   Squares in the other oblique orientations
           9 4 1   Mirror of those directly above.
               1
               1
             105
For 7 x 7 36 25 16 9 4 1 Squares in traditional orientation 25 9 1 Squares in the major/minor diagonal orientation 16 9 4 1 Squares in the other oblique orientations 16 9 4 1 Mirror of those directly above. 4 1 4 1 196 For n x n Table for n x n dots: n n-1 n-2 .............. 5 4 3 2 1 n (n-1)2 (n-2)2 .............. 16 9 4 1 0 (n-1)2 (n-2)2 .............. 16 9 4 1 0 (n-2)2 .............. 16 9 4 1 0 ............. ............. 16 9 4 1 0 9 4 1 0 4 1 0 1 0 Sum of the sum of the above columns: n2 + 2.(n-1)2 +3.(n-2)2 ............. (n-2).32 + (n-1).22 +n.12
Reverse n.12 + (n-1).22 + (n-2).32 .............3.(n-2)2 + 2.(n-1)2 + n2
Add (n2+n) + [22.(n-1)+2.(n-1)2] + [32.(n-2)+3.(n-2)2] + ......
...... + [32.(n-2)+3.(n-2)2] + [22.(n-1)+2.(n-1)2] + (n2+n)

This is double what we want, so by division we have: {(n2+n) + [22.(n-1)+2.(n-1)2] + [32.(n-2)+3.(n-2)2] + ...}/2
Simplify: n(n+1) + 2(n-1)(2+n-1) + 3(n-2)(3+n-2) + ........ /2 => n(n+1) + 2(n-1)(n+1) + 3(n-2)(n+1) + ...... /2 => (n+1)[n + 2(n-1) + 3(n-2) + 4(n-3) + ......]/2 => (n+1)[n + 2n - 2 + 3n -6 + 4n - 12 + ......]/2
As the length of the latter expression depends upon the value of n consider: n= Expression 1 (n+1)( 1n - 0)/2 2 (n+1)( 3n - 2)/2 3 (n+1)( 6n - 8)/2 4 (n+1)(10n - 20)/2 . ........ . ........
Consider the second of the parentheses.
The coefficient of the variable is a triangular number while the constant is double the sum of triangular numbers. For any given "n", the coefficient is one term greater in the series than the constant. Thus the triangle value needs to be given by (n+1)(n+2)/2 rather than the usual n(n+1)/2.

The expression can now be written as:
[(n+1)/2].[n.(n+1).(n+2)/2 - n.(n+1).(n+2)/3]
=> [(n+1)/2].[n(n+1).(n+2).(1/2-1/3)]
=> n (n + 1)2 (n + 2)/12

By decrementing each multiple of the numerator by 1 we have:
(n - 1).(n)2.(n + 1)/12
=> n2 (n2 - 1)/12

Charlie notes this latter formula in his comments. The latter formula is specific to n x n dots whereas the formula which I have derived is more pertinent to n x n unit lengths (or cells).

Comments: ( You must be logged in to post comments.)
  Subject Author Date
SolutionsolutionCharlie2008-08-28 12:50:02
SolutionSolutions for 6x6 and 7x7 pointDej Mar2008-08-28 12:16:55
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (10)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information