I'm trying to solve the following problem:

What is the number of different triangles we can form from numbers $4,5,6,7,8,9$ (lengths of sides), where every side has a different length (for an example $4,5,6$ or $4,5,7$)..

My solution is the following:

The number of all possible permutations is $\frac{6!}{(6-3)!}$. We subtract the numbers which don't make a triangle (which is $6*2$) and then divide by $2$, because $(4,5,6)$ makes the same triangle is $6,5,4$. My answer is $54$.

However, the correct answer should be $53$. Can anyone tell me where I did a mistake?


  • 2
    $\begingroup$ $6 \choose 3$ is only $20$ and there is one choice $(4,5,9)$ that doesn't make a triangle, so I get $19$ Your expression (ignoring the factorial in the number to choose) gives $8$. $\endgroup$ Oct 20, 2019 at 16:42
  • $\begingroup$ I think you'll have to show more details for someone to point out your mistake. What do you mean by $\binom{6}{(6-3)!} $? It look to me like ${6\choose6}=1$. Did you mean to say ${6\choose3}?$ Also, why do you say there are $12$ where the triangle inequality doesn't hold. How did you get that? $\endgroup$
    – saulspatz
    Oct 20, 2019 at 16:43
  • $\begingroup$ Sorry, I made a mistake when writing my answer here. Please wait a minute and I will fix it $\endgroup$
    – Peter F.
    Oct 20, 2019 at 16:44
  • 1
    $\begingroup$ If you write out all the triples $(4,5,6), (4,5,7), \ldots, (7,8,9)$, you'll see that there are only $20$ in the list, one of which is degenerate. How can there be $53$ or $54$ triangles? We could consider "right-handed" and "left-handed" triangles to be different, effectively doubling the number of triangles, but even then, we would have at most $40$, still falling short of the given answer. Have you written out the problem exactly as it was given to you? $\endgroup$
    – Théophile
    Oct 20, 2019 at 16:56
  • 1
    $\begingroup$ You should have gotten six crossed off, as you describe. 2 for 4, 2 for 5 and 2 for 9 (not 6) makes six. Why do you double that? Then you should divide by $6$ because 456 comes six ways-456,465,546,564,654,645 not two $\endgroup$ Oct 20, 2019 at 17:04

1 Answer 1


There are $\frac {6!}{3!}$ ordered choices of three numbers, which is $120$. Six of those do not make a triangle, all the permutations of $(4,5,9)$, which leaves $114$. Each unordered triangle gives $3!$ permutations, so we divide by $6$ and get $19$. I don't know where a number in the $50$s comes from.

I think it is easier to just choose unordered combinations to start with, which is ${6 \choose 3}=20$ and subtract the one that doesn't make a triangle. That also gets $19$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.