IS. 1 Let $P$ be the number of triangles whose side lengths are integers less than or equal to 9 . Find the value of $P$.
The sides must satisfy triangle inequality. i.e. $a+b>c$.
Possible order triples are $(1,1,1),(2,2,2), \ldots,(9,9,9)$,
$(2,2,1),(2,2,3),(3,3,1),(3,3,2),(3,3,4),(3,3,5)$,
$(4,4,1),(4,4,2),(4,4,3),(4,4,5),(4,4,6),(4,4,7)$,
$(5,5,1), \ldots,(5,5,4),(5,5,6),(5,5,7),(5,5,8),(5,5,9)$,
$(6,6,1), \ldots,(6,6,9)($ except $(6,6,6))$
$(7,7,1), \ldots,(7,7,9)(\operatorname{except}(7,7,7))$
$(8,8,1), \ldots,(8,8,9)($ except $(8,8,8))$
$(9,9,1), \ldots,(9,9,8)$
$(2,3,4),(2,4,5),(2,5,6),(2,6,7),(2,7,8),(2,8,9)$,
$(3,4,5),(3,4,6),(3,5,6),(3,5,7),(3,6,7),(3,6,8),(3,7,8),(3,7,9),(3,8,9)$,
$(4,5,6),(4,5,7),(4,5,8),(4,6,7),(4,6,8),(4,6,9),(4,7,8),(4,7,9),(4,8,9)$,
$(5,6,7),(5,6,8),(5,6,9),(5,7,8),(5,7,9),(5,8,9),(6,7,8),(6,7,9),(6,8,9),(7,8,9)$
Total number of triangles $=9+6+6+8 \times 5+6+9+9+6+4=95$
Method 2 First we find the number of order triples.
Case 1 All numbers are the same: $(1,1,1), \ldots,(9,9,9)$.
Case 2 Two of them are the same, the third is different: $(1,1,2), \ldots,(9,9,1)$
There are $C_{1}^{9} \times C_{1}^{8}=72$ possible triples.

Case 3 All numbers are different. There are $C_{3}^{9}=84$ possible triples.
$\therefore$ Total $9+72+84=\mathbf{1 6 5}$ possible triples.
Next we find the number of triples which cannot form a triangle, i.e. $a+b \leq c$.
Possible triples are $(1,1,2), \ldots(1,1,9)$ (8 triples)
$(1,2,3), \ldots,(1,2,9)(7$ triples $)$
$(1,3,4), \ldots,(1,3,9)(6$ triples $)$
$(1,4,5), \ldots,(1,4,9)(5$ triples $)$
$(1,5,6), \ldots,(1,5,9)(4$ triples $)$
$(1,6,7),(1,6,8),(1,6,9),(1,7,8),(1,7,9),(1,8,9)$,
$(2,2,4), \ldots,(2,2,9)(6$ triples $)$
$(2,3,5), \ldots,(2,3,9)(5$ triples $)$
$(2,4,6), \ldots,(2,4,9)(4$ triples $)$
$(2,5,7),(2,5,8),(2,5,9),(2,6,8),(2,6,9),(2,7,9)$,
$(3,3,6), \ldots,(3,3,9)(4$ triples $)$
$(3,4,7),(3,4,8),(3,4,9),(3,5,8),(3,5,9),(3,6,9),(4,4,8),(4,4,9),(4,5,9)$.
Total number of triples which cannot form a triangle
$$
=(8+7+\ldots+1)+(6+5+\ldots+1)+(4+3+2+1)+(2+1)=36+21+10+3=\mathbf{7 0}
$$
$\therefore$ Number of triangles $=\mathbf{1 6 5}-\mathbf{7 0}=\mathbf{9 5}$