Skip to main content

putting 12 matchsticks end to end, exactly 3 different triangles can be made, what is the formula needed to calculate the number of triangles can...

There are three distinct triangles using 12 matchsticks: 3-4-5,4-4-4, and 5-5-2.


Note that for a given number of matchsticks M, if the sides of the triangle are labeled a,b, and c (without loss of generality let c be the longest side) then a+b+c=M, a+b>c and c<M/2.


We can generate the number of triangles for a given M:


For 24 matchsticks the possible triangles are 11-11-2,11-10-3,11-9-4,11-8-5,11-7-6,10-10-4,10-9-5,10-8-6,10-7-7,9-9-6,9-8-7,8-8-8 or 12 possible triangles.


There are 19 possible triangles for M=30.


For M>=3 then (M,number of triangles) is (3,1),(4,0),(5,1),(6,1),(7,2),(8,1),(9,3),(10,2),(11,4),(12,3),(13,5),(14,4),(15,7),(16,5),(17,8),(18,7)...


There is a formula for this:


If M is even then the number of triangles is the integer closest to M^2/48.


If M is odd then the number of triangles is the integer closest to (M+3)^2/48


For example, if M=12 we have 12^2/48=3.


If M=14 we have 14^2/48=4.083333 so there are 4 triangles.


If M=9 we have (9+3)^2/48=3.


If M=11 we have (11+3)^2/48=4.083333 so there are 4 triangles.


Please see the reference link for a proof.

Comments

Popular posts from this blog

Is there a word/phrase for "unperformant"?

As a software engineer, I need to sometimes describe a piece of code as something that lacks performance or was not written with performance in mind. Example: This kind of coding style leads to unmaintainable and unperformant code. Based on my Google searches, this isn't a real word. What is the correct way to describe this? EDIT My usage of "performance" here is in regard to speed and efficiency. For example, the better the performance of code the faster the application runs. My question and example target the negative definition, which is in reference to preventing inefficient coding practices. Answer This kind of coding style leads to unmaintainable and unperformant code. In my opinion, reads more easily as: This coding style leads to unmaintainable and poorly performing code. The key to well-written documentation and reports lies in ease of understanding. Adding poorly understood words such as performant decreases that ease. In addressing the use of such a poorly ...

Is 'efficate' a word in English?

I routinely hear the word "efficate" being used. For example, "The most powerful way to efficate a change in the system is to participate." I do not find entries for this word in common English dictionaries, but I do not have an unabridged dictionary. I have checked the OED (I'm not sure if it is considered unabridged), and it has no entry for "efficate". It does have an entry for "efficiate", which is used in the same way. Wordnik has an entry for "efficate" with over 1800 hits, thus providing some evidence for the frequency of use. I personally like the word and find the meaning very clear and obvious when others use it. If it's not currently an "officially documented" word, perhaps its continued use will result in it being better documented.