Thursday, July 30, 2009

Find out tolal no of triangles...........


Find total no of triangle in the following diagram.....
It takes too much time to count. The counting will we too difficult on increasing the no of levels........

Here i am going to give a general procedure to solve such type of problems......






Lets start with level one........If there is only one triangle
then total no of triangle will be one.

T(1) = Tri(1)
= 1



Now for the level two....
The total no of triangle will be

T(2) = Tri(1) +Tri(2)
= 4 + 1
= 5

Here T(n) represent the total no of triangle and Tri(n) represents the triangles of size n.


For level 3 you can see there is 9 triangles of size 1, 3 triangles of size 2 and 1 of size 3......

T(3) = Tri(1) + Tri(2) + Tri(3)
= 9 + 3 + 1
= 13

For level 4 you can see there is 16 triangles of size 1, 7 triangles of size 2, 3 of size 3 and 1 of size 4.



T(4) = Tri(1) + Tri(2) + Tri(3) + Tri(4)
= 16 + 7 + 3 + 1
= 27


Now we have a sequence 1,5,13,27..........
put this sequence on "http://www.research.att.com/~njas/sequences/"
you will get the formula for the any sequence which exist.

I found the that the above sequence does not exist but it is approximate to
a sequence so the formula for the nth term is Floor[n*(n+2)*(2n+1)/8........


using formula for the size 5 (level 5)

T(5) = Floor(5*7*11/8)
= Floor(48.12500)
= 48

hence for the size 6 (level 6)

T(6) = Floor(6*8*13/8)
= Floor(78)
= 78

Search Ranjeet's Blog