Funatom
February 1st, 2011, 09:01 AM
Hello everyone,
i am new and hopefully right here. Excuse my english, because it is not the best ;)
So.. i have to solve the following problem and no idea where i should start. So i am searching
for an "Food for thought" :) . Now to the problem:
Imagine a triangle made of numbers (with edge lenght n) . For Example:
1
2 3
4 5 6
(Edge lenght: n=3)
The task is to develop an algorithm, that generates an triangle with an minimum of different numbers and (now the hard part) without any inner equilateral triangles, havin the same numbers as edges (one number of these edges must be different !). Those inner triangles can have different edge lenghtes, but have to be equilaterally.
In the attached Images "triangle.png"(n=3) and "triangle2.png"(n=4) are examples for invalid triangles. The inner triangles, which are not valid have red edges.
In "triangle3.png"(n=7) is an example for a valid triangle.
I found out that every number in the hole triangle is an edge for (n-1) inner triangles and that the total number of inner triangles (T) can be calculated as follows:
http://www.mathdraw.de/md.php?input=T%3D%281%2F6%29n^3+%2B+%281%2F2%29n^2+%2B+%281%2F3%29n
So maybe someone has an idea for such an algorithm, because im out of ideas...
The hard thing is, to generate an trinagle with a minimum of different numbers (it would be easy without this condition :) )
Thank you very much
PS: If you have more questions, please ask me.
i am new and hopefully right here. Excuse my english, because it is not the best ;)
So.. i have to solve the following problem and no idea where i should start. So i am searching
for an "Food for thought" :) . Now to the problem:
Imagine a triangle made of numbers (with edge lenght n) . For Example:
1
2 3
4 5 6
(Edge lenght: n=3)
The task is to develop an algorithm, that generates an triangle with an minimum of different numbers and (now the hard part) without any inner equilateral triangles, havin the same numbers as edges (one number of these edges must be different !). Those inner triangles can have different edge lenghtes, but have to be equilaterally.
In the attached Images "triangle.png"(n=3) and "triangle2.png"(n=4) are examples for invalid triangles. The inner triangles, which are not valid have red edges.
In "triangle3.png"(n=7) is an example for a valid triangle.
I found out that every number in the hole triangle is an edge for (n-1) inner triangles and that the total number of inner triangles (T) can be calculated as follows:
http://www.mathdraw.de/md.php?input=T%3D%281%2F6%29n^3+%2B+%281%2F2%29n^2+%2B+%281%2F3%29n
So maybe someone has an idea for such an algorithm, because im out of ideas...
The hard thing is, to generate an trinagle with a minimum of different numbers (it would be easy without this condition :) )
Thank you very much
PS: If you have more questions, please ask me.