# Math Help - Number of possible triangles

1. ## Number of possible triangles

Let S(10)={1,2,3,4,5,6,7,8,9,10}
and T(10)={ number of triangles formed by using any three elements of S(10) }
in the same way
S(20) = {1,2,3,4...,18,19,20}
and T(20) ={number of triangles formed by using any three elements of S(20)}
then find the value of T(20) - T(10)

2. Originally Posted by jashansinghal
Let S(10)={1,2,3,4,5,6,7,8,9,10}
and T(10)={ number of triangles formed by using any three elements of S(10) }
in the same way
S(20) = {1,2,3,4...,18,19,20}
and T(20) ={number of triangles formed by using any three elements of S(20)}
then find the value of T(20) - T(10)
Well you don't define all terms, but I'm assuming that some valid triangles for S(10) are

Code:
3
Code:
1
2 3
4 5 6
Code:
6
1 2
Code:
6
2 1
Where the last two are considered distinct.

With notation C(n,k) for binomial coefficient (that is, n choose k) and P(n,k) the number of ordered k-subsets of {1,...,n}; thus P(n,k) = C(n,k)*k!

Then the number of triangles from S(n) is T(n)=P(n,1)+P(n,3)+P(n,6)+... not letting k exceed n in P(n,k), and where the sequence of k is the triangle numbers 1,3,6,10,15,...

3. IF no sides are the same, then the 1 cannot be used to form a triangle.

2,3,....,9 : 50 triangles
2,3,...,19 : 525 triangles

4. Oh sorry I misread the problem, the part about using three elements of the set to make a triangle. I would go with $T(20) - T(10) = P(20,3) - P(10,3)$.

5. Originally Posted by undefined
Oh sorry I misread the problem, the part about using three elements of the set to make a triangle. I would go with $T(20) - T(10) = P(20,3) - P(10,3)$.
No, you can't do that: triangles side lengths have rules: as example, you can't have 2,4,9 ... OK?

6. Originally Posted by Wilmer
No, you can't do that: triangles side lengths have rules: as example, you can't have 2,4,9 ... OK?
This is why the OP should have defined terms. If you look at my first post you will see that I did not interpret the elements as side lengths, but rather as arrangements in a triangular fashion, like is commonly done in recreational mathematics.

I know what the triangle inequality is.. don't patronise me.

7. Is the formula for $T(n) ~~ \frac{1}{4} \left( 2 \binom{n}{3} - \binom{n}{2} + [\frac{n}{2}] \right)$ ?

8. Originally Posted by undefined
..... but rather as arrangements in a triangular fashion, like is commonly done in recreational mathematics.
I see; didn't realise that...
Plus was not "patronizing"; just "typing quickly" !

9. Originally Posted by Wilmer
I see; didn't realise that...
Plus was not "patronizing"; just "typing quickly" !
Haha no problem!

10. Originally Posted by simplependulum
Is the formula for $T(n) ~~ \frac{1}{4} \left( 2 \binom{n}{3} - \binom{n}{2} + [\frac{n}{2}] \right)$ ?
Well, I don't know...

IF OP means geometric triangles, then there are 50 in (1,2,.....,10):
1: 2,3,4
2: 2,4,5
...
49: 7,9,10
50: 8,9,10
Of course, when written in ascending order, sum of 1st two sides must exceed 3rd.

11. Originally Posted by simplependulum
Is the formula for $T(n) ~~ \frac{1}{4} \left( 2 \binom{n}{3} - \binom{n}{2} + [\frac{n}{2}] \right)$ ?
The formula seems good; see A002623. I'm not sure whether I should ask where you got the formula, or try to find out on my own.

12. write the three sides in ascending order , ie x<y<z , then consider the value of z .

Then i plot a graph with lattices , 1 <= x <z , 1<= y <z , x < y , x+y > z , the number of lattices satisfying the constraints should be ( just like handling some problems related to linear programming ) :

$\frac{1}{2} \left[ (z-1)^2 - \frac{ z(z-1)}{2} - \left( z-1 - [ \frac{z}{2} ] \right) \right]$

$= \frac{1}{2} \left[ \frac{ (z-1)(z-2) }{2} - (z-1) + [\frac{z}{2}] \right]$

Then take sum from $z =1$ to $z = n$ ....

$\sum \frac{ (z-1)(z-2) }{2} = \binom{n}{3} ~,~ \sum (z-1) = \binom{n}{2}$

I also find that $\sum [\frac{z}{2}] = \frac{1}{2} \binom{n}{2} + \frac{1}{2} [\frac{n}{2}]$

so $T(n) = \frac{1}{4}\left( 2\binom{n}{3} - \binom{n}{2} + [\frac{n}{2}] \right)$

13. Originally Posted by simplependulum
write the three sides in ascending order , ie x<y<z , then consider the value of z .

Then i plot a graph with lattices , 1 <= x <z , 1<= y <z , x < y , x+y > z , the number of lattices satisfying the constraints should be ( just like handling some problems related to linear programming ) :

...

so $T(n) = \frac{1}{4}\left( 2\binom{n}{3} - \binom{n}{2} + [\frac{n}{2}] \right)$
Thanks, definitely wouldn't have come up with that on my own. (Forum doesn't let me give reputation though; the thanks system seemed better as far providing a way for shallow people like me to mindlessly accumulate stats... also a way to show thanks without cluttering the thread with more posts.)

14. Originally Posted by undefined
The formula seems good; see A002623.
Yes. However, A002623 includes triangles like 1-1-1 and 1-2-2...
which I guess is why if n=1, answer is 1: 1-1-1

A002623: 1, 3, 7, 13, 22, 34, 50, 70, 95, 125, 161, 203, 252, 308, 372, 444, 525, 615, 715, .........
can then be shown as:
0, 0, 0, 1, 3, 7, 13, 22, 34, 50**, 70, 95, 125, 161, 203, 252, 308, 372, 444, 525**, 615, 715, ........
which then would be correct if elements cannot be repeated.
50** and 525** then is for (1 to 10) and (1 to 20) or n=10 and n=20.

15. Originally Posted by simplependulum
$T(n) ~~ \frac{1}{4} \left( 2 \binom{n}{3} - \binom{n}{2} + [\frac{n}{2}] \right)$ ?
Guys,
I didnt get this formula and how to use it. Secondly , the series which you gave , I cannot make head or tail out of it. Can you tell me this thing in a simpler way because I need to solve this question urgently. Please help guys.

Page 1 of 2 12 Last