Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2014-01-07 22:05:53

GrahamHills
Guest

Counting the Number of Triangles in a Polygon

Is there a formula to calculate the below problem

When a square has diagonals drawn across it the resultant triangles you can see equals 8. The four small ones down each side, plus the four larger triangles formed by the diagonals.

When a Pentagon has the diagonals drawn inside it the number of triangles you can see now is 35.

I am looking for a formula that will give me the number of triangles you will see in a hexagon based on the number of sides in relation to the number of triangles you will have.

#2 2014-01-07 22:55:16

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Counting the Number of Triangles in a Polygon

Are you using regular polygons only?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#3 2014-01-07 23:45:08

Bob
Administrator
Registered: 2010-06-20
Posts: 10,164

Re: Counting the Number of Triangles in a Polygon

hi Stefy,

Does regular matter, then?  Concave/convex will though.

Come to think of it, when you make a regular hexagon the diagonals meet at a point.  If you offset one point on the edge a new triangle appears at that point.  Hmmm.  This may not be so easy.  smile

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#4 2014-01-08 00:02:18

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Counting the Number of Triangles in a Polygon

That's why I'm asking.

http://oeis.org/A006600


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#5 2014-01-08 00:46:00

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Counting the Number of Triangles in a Polygon

Hi;

There is a formula on one of the links.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#6 2014-01-08 02:27:56

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,822

Re: Counting the Number of Triangles in a Polygon

Hi;

Edit: The following only works for regular polygons, and finds the "total number of triangles visible in regular n-gon with all diagonals drawn."

On stefy's link there appears the following Mathematica formula by T. D. Noe that produces a table comprising the number of triangles in the first 998 polygons (ie, from 3-sided to 1000-sided):

del[m_, n_] := If[Mod[n, m] == 0, 1, 0]; 
Tri[n_] := 
 n (n - 1) (n - 2) (n^3 + 18 n^2 - 43 n + 60)/720 - 
  del[2, n] (n - 2) (n - 7) n/8 - del[4, n] (3 n/4) - 
  del[6, n] (18 n - 106) n/3 + del[12, n]*33 n + del[18, n]*36 n + 
  del[24, n]*24 n - del[30, n]*96 n - del[42, n]*72 n - 
  del[60, n]*264 n - del[84, n]*96 n - del[90, n]*48 n - 
  del[120, n]*96 n - del[210, n]*48 n; 
Table[Tri[n], {n, 3, 1000}]

Changing the last line to the following will open a 'prompt' window asking for input of the number of sides of a single polygon, and the output will be the result for just that polygon, being the last entry in a table (not printed) comprising the number of triangles in all polygons up to and including the input one:

Last[Table[Tri[n], {n, 3, Input["Enter number of sides of a single polygon"]}]]

I have no idea how that program works - only that it does - nor its upper limit (or if there is one).

Last edited by phrontister (2014-01-08 09:17:32)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#7 2014-01-08 03:45:27

Bob
Administrator
Registered: 2010-06-20
Posts: 10,164

Re: Counting the Number of Triangles in a Polygon

hi GrahamHills

Welcome to the forum.

That link is for regular polygons only.

See diagrams below.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#8 2014-01-08 09:09:25

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,822

Re: Counting the Number of Triangles in a Polygon

Hi Bob,

Ah, yes...I'd seen that important point discussed somewhere, with a piccy too like yours that clearly demonstrates the different result between regular and irregular, but overlooked mentioning that in my post.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#9 2014-01-08 11:46:25

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Counting the Number of Triangles in a Polygon

Of course, if we look at irregular ones as well, there is obviously no formula. We might only be able to provide the range of possible numbers.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#10 2014-01-08 20:57:04

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Counting the Number of Triangles in a Polygon

Prof Scott wrote:

When I have 12 unanswered questions I stop asking anymore.

Forget about non-regular polygons. It will be hard enough to try to find an algebraic formula for the regular ones. There is one that is known but it is not elementary.

If this were another forum I would put a bounty on the problem of 100 points to the first person who could relate directly the number of sides ( of a regular polygon ) to the number of triangles using only elementary functions.

Wikipedia wrote:

In mathematics, an elementary function is a function of one variable built from a finite number of exponentials, logarithms, constants, and roots of polynomial equations through composition and combinations using the four elementary operations (+ - × ÷). By allowing these functions (and constants) to be complex numbers, trigonometric functions and their inverses become included in the elementary functions (see trigonometric functions and complex exponentials).


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#11 2014-01-08 21:30:17

Bob
Administrator
Registered: 2010-06-20
Posts: 10,164

Re: Counting the Number of Triangles in a Polygon

Hhmmm.  100 points eh?  Interesting.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#12 2014-01-09 01:29:11

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Counting the Number of Triangles in a Polygon

Can't we use Wilf's roots of unity idea here?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#13 2014-01-09 02:03:09

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Counting the Number of Triangles in a Polygon

I thought that was only for say every other coefficient or every third and so forth?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#14 2014-01-09 02:06:19

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Counting the Number of Triangles in a Polygon

That's exactly what this is. Look at the del function a bit better. m and n have switched places!


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#15 2014-01-09 02:20:29

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Counting the Number of Triangles in a Polygon

You would need to replace del with the general term. I do not see how to do that using the roots of unity. They would sum the gf not get the general term. I have already succeeded for the first few del's.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB