David W. answered 11/04/18
Experienced Prof
How many scalene triangles have perimeter less than 17 and sides of integral length?
Let the length of the three sides be A, B, and C.
We are told that:
A, B, C, are integers
A+B+C < 17 [perimeter less than 17]
Since A, B, C must each be at least 1, then A, B, and C must each be 1 to 14.
To be a triangle, the sum of the lengths of any two sides must be greater than length of the third side:
A + B > C
B + C > A
A + C > B
One method is to iterate through the possibilities. Exhaustive enumeration is very, very fast using a computer:
FOR A = 1 TO 14
FOR B = 1 to 14
FOR C = 1 TO 14
IF ( (A+B+C) < 17 ) THEN
IF ( (A<>B) AND (A<>C) AND (B<>C) ) THEN [note: scalene; all different]
IF ( ((A+B)> C) AND ((B+C)> A) AND ((A+C)>B) THEN
Count = Count + 1
OUTPUT (Count, A, B, C)
END IF
END IF
END IF
END FOR
END FOR
END FOR
1: 2 3 4
2: 2 4 3
3: 2 4 5
4: 2 5 4
5: 2 5 6
6: 2 6 5
7: 2 6 7
8: 2 7 6
9: 3 2 4
10: 3 4 2
11: 3 4 5
12: 3 4 6
13: 3 5 4
14: 3 5 6
15: 3 5 7
16: 3 6 4
17: 3 6 5
18: 3 6 7
19: 3 7 5
20: 3 7 6
21: 4 2 3
22: 4 2 5
23: 4 3 2
24: 4 3 5
25: 4 3 6
26: 4 5 2
27: 4 5 3
28: 4 5 6
29: 4 5 7
30: 4 6 3
31: 4 6 5
32: 4 7 5
33: 5 2 4
34: 5 2 6
35: 5 3 4
36: 5 3 6
37: 5 3 7
38: 5 4 2
39: 5 4 3
40: 5 4 6
41: 5 4 7
42: 5 6 2
43: 5 6 3
44: 5 6 4
45: 5 7 3
46: 5 7 4
47: 6 2 5
48: 6 2 7
49: 6 3 4
50: 6 3 5
51: 6 3 7
52: 6 4 3
53: 6 4 5
54: 6 5 2
55: 6 5 3
56: 6 5 4
57: 6 7 2
58: 6 7 3
59: 7 2 6
60: 7 3 5
61: 7 3 6
62: 7 4 5
63: 7 5 3
64: 7 5 4
65: 7 6 2
66: 7 6 3
There are 66 such triangles [note: We considered 7 3 6 and 7 6 3 to be different triangles.]