Number of triangles in a square grid of unknown size

In summary, to determine the number of triangles in a square grid of unknown size, you can use the formula (n+1)^2/2, where n is the number of rows or columns in the grid. This formula works for any size square grid. However, it cannot be used for grids with different shapes such as rectangles. The size of the grid does affect the number of triangles, with larger grids having more triangles. Other methods, such as manual counting or using a computer program, can also be used to determine the number of triangles in a square grid.
  • #1
Mator
11
0
Hello.

I came up with this problem while I was waking up this morning, and some of the finer aspects have me pretty confused.

First off, I made the simplification of a square grid because I'm not yet ready to deal with non-square grids, but maybe we can get to that later. Here's where I got with the problem:The number of groups of 3 points in a grid of unknown size is:

[itex]{x \cdot y \choose 3}[/itex]

Where [itex]x[/itex] and [itex]y[/itex] are the dimensions of the grid.But we now need to subtract the number of 3 point groups that are lines and not triangles. We'll break these line groups into sections. The number of horizontal 3 point lines in a grid of unknown size (assuming x > 3) is:

[itex]{x \choose 3} \cdot y[/itex]The number of vertical 3 point lines in a grid of unknown size (assuming y > 3) is:

[itex]{y \choose 3} \cdot x[/itex]The number of diagonal lines increases following an infinite sum, as the number of types of such lines (each type corresponding to a certain slope) increases as the grid's size increases. Now I'm going to start going analytical because this is getting complicated. Below are grid sizes and the number of diagonal lines present in each grid.

Diagonal lines of slope 1 or -1:
3x3 grid: [itex]{3 \choose 3} \cdot 2[/itex]
4x4 grid: [itex]{3 \choose 3} \cdot 4 + {4 \choose 3} \cdot 2[/itex]
5x5 grid: [itex]{3 \choose 3} \cdot 4 + {4 \choose 3} \cdot 4 + {5 \choose 3} \cdot 2[/itex]
6x6 grid: [itex]{3 \choose 3} \cdot 4 + {4 \choose 3} \cdot 4 + {5 \choose 3} \cdot 4 + {6 \choose 3} \cdot 2 [/itex]
7x7 grid: [itex]{3 \choose 3} \cdot 4 + {4 \choose 3} \cdot 4 + {5 \choose 3} \cdot 4 + {6 \choose 3} \cdot 4 + {7 \choose 3} \cdot 2 [/itex]
8x8 grid: [itex]{3 \choose 3} \cdot 4 + {4 \choose 3} \cdot 4 + {5 \choose 3} \cdot 4 + {6 \choose 3} \cdot 4 + {7 \choose 3} \cdot 4 + {8 \choose 3} \cdot 2 [/itex]

Diagonal lines of slope 2, -2, 1/2 or -1/2
5x5 grid: [itex]{3 \choose 3} \cdot 4 \cdot 3[/itex]
6x6 grid: [itex]{3 \choose 3} \cdot 4 \cdot 4 \cdot 2[/itex]
7x7 grid: [itex]{3 \choose 3} \cdot 4 \cdot 2 + {3 \choose 3} \cdot 4 \cdot 5 + {4 \choose 3} \cdot 4 \cdot 4[/itex]
8x8 grid: [itex]{3 \choose 3} \cdot 4 \cdot 2 \cdot 2 + {4 \choose 3} \cdot 4 \cdot 5 \cdot 2[/itex]

Diagonal lines of slope 3, -3, 1/3, or -1/3
7x7 grid: [itex]{3 \choose 3} \cdot 4 \cdot 5[/itex]
8x8 grid: [itex]{3 \choose 3} \cdot 4 \cdot 6 \cdot 2[/itex]So these appear to be infinite series. I tried to write out the terms as logically as I could. And this as far as I've gotten... Anyone feel like helping out? :)-Mator
 
Last edited:
Physics news on Phys.org
  • #2
Hello Mator,

Thank you for sharing your problem with us. It seems like you have put a lot of thought into it and have made some good progress. I would approach this problem using mathematical principles and equations to help us find a solution.

First, let's define some variables:
- x and y: dimensions of the grid
- n: number of points in a group
- k: number of points in a line

To find the total number of groups of n points in a grid of size x by y, we can use the combination formula:

\binom{x\cdot y}{n} = \frac{(x\cdot y)!}{n!(x\cdot y-n)!}

This formula calculates the number of ways to choose n points from a grid of size x by y. However, this includes all possible combinations, including lines. To exclude lines, we can subtract the number of combinations of k points from the total.

So for your specific problem, we can modify the formula to be:

\binom{x\cdot y}{3} - \binom{x}{3}\cdot y - \binom{y}{3}\cdot x - \sum_{i=1}^{\infty} \binom{i}{3}\cdot 2

Where the summation represents the infinite series of diagonal lines with slope 1 or -1. We can also add summations for other diagonal lines with different slopes, as you have mentioned in your post.

I hope this helps and gives you some direction in finding a solution to your problem. Best of luck!
 

1. How can I determine the number of triangles in a square grid of unknown size?

To determine the number of triangles in a square grid of unknown size, you can use a simple formula: (n+1)^2/2, where n is the number of rows or columns in the grid. This formula works for any size square grid, as long as it has an equal number of rows and columns.

2. Is there a mathematical equation to calculate the number of triangles in a square grid?

Yes, there is a mathematical equation that can be used to calculate the number of triangles in a square grid. As mentioned before, the formula is (n+1)^2/2, where n is the number of rows or columns in the grid.

3. Can I use this formula for a grid with a different shape, such as a rectangle?

No, this formula is specifically for a square grid. If you have a different shape grid, such as a rectangle, you will need to use a different formula to calculate the number of triangles.

4. Does the size of the grid affect the number of triangles?

Yes, the size of the grid does affect the number of triangles. The larger the grid, the more triangles there will be. This is why the formula includes the number of rows or columns in the grid.

5. Are there any other methods besides the formula to determine the number of triangles in a square grid?

Yes, there are other methods that can be used to determine the number of triangles in a square grid. One method is to count the number of triangles manually, which may be more accurate for irregularly shaped grids. Another method is to use a computer program or algorithm to calculate the number of triangles.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
713
  • Set Theory, Logic, Probability, Statistics
Replies
12
Views
3K
  • Introductory Physics Homework Help
Replies
8
Views
671
  • Set Theory, Logic, Probability, Statistics
Replies
15
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
705
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
Back
Top