English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

if u r given 'n' rods of length{1,2,3,4.....n} respectively.
what is the maximum no. of triangles that can be formed using these rods at a time?
one rod can be used only once.........
for example if n=5 , the max. no. of triangles formed will be 1..........using the combination(3,4,5)

2007-12-22 18:53:50 · 6 answers · asked by azhariitk 1 in Science & Mathematics Mathematics

people are not understanding the question correctly.........................
only sum people like smci have made sincere efforts...majority of them are just counting their points......
so once again read it carefully....
you cant use one rod more than once
suppose n=5 ,then the answer is 1
using combination(3,4,5) or (2,3,4)
if u r using rod "3" in one combination
you cant use it in another combination..
in other words you have to show all your combinations keeping them on a table at a time....and you have to exploit maximum no. of rods possible
for simplicity try to device a method for n=100 and generalise it for n.....
hope you all understand the question better now.........

2007-12-25 16:08:09 · update #1

6 answers

The Triangle Inequality says that the sidelengths a,b,c of any triangle must simultaneously obey:
a <= b+c
b <= a+c
c <= a+b
(for a real triangle we would generally exclude the equality case since it's just a line segment, i.e. 1,3,4 has no interior area and thus isn't considered a proper triangle. This is what I do below, I drop the equality case)

Hence your question reduces to:
"How many ways can we pick a triple of distinct numbers (a,b,c) from the numbers {1,2,...,n} which satisfies the Triangle Inequality?"

Note also since the side order is unimportant, we can assume without loss of generality that a
Hence your question reduces to:
"How many ways T(n) can we pick a triple of distinct integers
1≤a Note that we can set bounds on b by 2≤b≤n-1
Now we want to systematically go through the three inequalities to make sure we cover every case:
=> a
a
Considering b ≤ a+c and knowing c≤n,
=> b ≤ n+1

Considering c <= a+b, we can eliminate at least one variable, let's pick c
1≤a
Noting also that for integers we must have: a+1≤b,
substituting that into the requirement
c => c+2≤(a+1)+b
=> c+2≤2b
=> b≥(c+2)/2 = c/2 +1
OR
=> c≤2b-2

Anyway you can get T(n) by induction, and there's also an explicit formula. I will return to this one later.

2007-12-22 19:51:25 · answer #1 · answered by smci 7 · 2 0

Given n rods of length {1,2,..,n} the maximum number of triangles that can be formed is n/3 (rounded down).

Eg:
n=3, 4 or 5 then 1 triangle can be formed
n=6, 7 or 8 then 2 triangles can be formed

This is because each group of three adjacent numbers: x-1,x,x+1 can always form a triangle.

For the trivial cases, you can combine 1,3,4 and 2,5,6 if you don't like having a triangle with zero area.

2007-12-22 19:05:11 · answer #2 · answered by Valithor 4 · 2 0

Answer:

Floor [ n * (n-2) * (2n-5) / 24]

valid for all n > 0.

How did I get it? Hints:
f[n+1] = f[n] + g[n], where g[n] is some function of n; in other words, all the triangles valid for the n rods are still valid for the n+1 rods.

There is a particular symmetry about (n/2). For example, let n = 9. Then the number of triangles with smallest side 5 and largest side 9 are 3 in number:
(5,6,9)
(5,7,9)
(5,8,9)

Same is true for smallest side 4, largest side 9:
(4,6,9)
(4,7,9)
(4,8,9)

You will need to do some summations, then solve a recurrence relation, but that is enough.

HTH,
Steve

2007-12-22 20:40:36 · answer #3 · answered by Anonymous · 0 0

n%3(n modulus 3)

2007-12-22 20:00:39 · answer #4 · answered by Anonymous · 0 0

i don kno what is d answer but one thing i kno is u can noy make triangle of side 1,3,4 as mentioned by valithor
i suppose his answer is wrong
if u get d answer send it to me also

2007-12-22 19:23:05 · answer #5 · answered by himrox214 2 · 0 3

It tease my brain, thanks.

2007-12-24 05:29:07 · answer #6 · answered by Toralba 2 · 0 0

fedest.com, questions and answers