Counting squares of NxM lattice

Click For Summary
SUMMARY

The discussion focuses on deriving a formula to count the total number of squares in an NxM lattice. The formula is established as ∑_{k=0}^{N-1} (N-k)(M-k), which accounts for all possible squares from 1x1 up to NxN. For a 3x4 lattice, the breakdown shows there are 12 positions for 1x1 squares, 6 for 2x2 squares, and 2 for 3x3 squares, totaling 20 squares. The challenge lies in avoiding double counting when overlapping squares are considered.

PREREQUISITES
  • Understanding of combinatorial mathematics
  • Familiarity with lattice structures
  • Basic algebra for summation notation
  • Knowledge of square counting techniques in geometry
NEXT STEPS
  • Research combinatorial counting methods in geometry
  • Learn about lattice point problems in discrete mathematics
  • Explore closed-form solutions for summation series
  • Study applications of combinatorial formulas in real-world scenarios
USEFUL FOR

Mathematics educators, students learning combinatorial geometry, and anyone interested in mathematical problem-solving techniques related to lattice structures.

Medicol
Messages
226
Reaction score
54
This is not a quiz but I am thinking how to write down a simple math formula to count the total number of squares present in a lattice of NxM points for my 12 year old nephew ? He'll sure be happy if I could turn this into, say, a common sense for pupils like him. :biggrin:

For example,
In a 3x4 lattice there are 20 squares.
I first check 3x3 one (by omitting the last column 3x1) on the right and have
12+22+32 = 14 squares
then I check 3x3 one (after omitting the first column) on the right to obtain
12+22+32 = 14 squares

So there are 28 squares. But I have 2 columns overlapped between the two squares I have just checked. And I have no clue how to reason to leave out the overlapped part to acquire the correct result.
 
Mathematics news on Phys.org
Medicol said:
This is not a quiz but I am thinking how to write down a simple math formula to count the total number of squares present in a lattice of NxM points for my 12 year old nephew ? He'll sure be happy if I could turn this into, say, a common sense for pupils like him.
Without loss of generality, assume that M >= N.

Count how many 1x1 squares, how many 2x2 squares and so on up to how many NxN squares. Count those by counting the possible positions for their lower-left corner. For the 3x4 case...

There are 3x4 = 12 possible positions for the lower left corner of a 1x1 square
There are 2x3 = 6 possible positions for the lower left corner of a 2x2 square
There are 1x2 = 2 possible positions for the lower left corner of a 3x3 square.

##\sum_{k=0}^{N-1} (N-k)(M-k)##

But possibly you're way ahead of me and are trying to reduce that to closed form.
 
  • Like
Likes   Reactions: 1 person

Similar threads

  • · Replies 68 ·
3
Replies
68
Views
12K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 24 ·
Replies
24
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K