# Extended General Malfatti's Problem
## 3 Definition and Theorem for the Tri(T\({}_{n}\)) Problem
### The Tri(T\({}_{n}\)) Problem, \(n>2\)
If SA(C) \(=2\pi\) (Figure 8c), we find the radius for \(C\) so that the circle rings are explicitly tangent to circle \(C\). If SA(C) \(<2\pi\), as shown in Figure 8a, we need to reduce the value \(r\) so that the circle ring is explicitly tangent to circle \(C\). On the other hand, if SA(C) \(>2\pi\), as shown in Figure 8b, we need to increase the value \(r\) so that the circle ring is explicitly tangent to circle \(C\). With this property, the radius of \(C\) can be easily found using a binary search algorithm. In fact, from the arc length computation for the circle \(C\), it (\(2r\)) \(\times\)\(\pi\) (current r) \(\times\) SA(C) can be derived, and thus we find that \(r=\) (current r) \(\times\) (SA(C)/2\(\pi\)). Figure 7: Angle computation for Theorem 4. In the solution of the Tri(T\({}_{n}\)), n > 3 problem, the inner circle is explicitly tangent to the circle ring, and the size of the circle ring is always six (See Figure 9c). Therefore, with an estimated radius r, it is easy to construct an O(1) algorithm to find the radius of C, which satisfies the constraint SA(C) = 2\(\pi\). This algorithm (See Algorithm 1) has the following steps:  
```
1: Input the radii for the circle ring r\({}_{1}\), r\({}_{2}\), \(\ldots\), r\({}_{n}\), and an initial radius (r = 1) of C.
2: Using this radius r, compute SA(C). 3: Output the result r \(\times\) (SA(C)/2\(\pi\)). ```  
**Algorithm 1** The radius for center circle tangents to a circle ring  
Consider the inner circle for the Tri(T\({}_{n}\)) problem, as shown in Figure 9c. The angles \(\alpha_{1}\), \(\alpha_{2}\), \(\alpha_{3}\), \(\alpha_{4}\), \(\alpha_{5}\), \(\alpha_{6}\) can be computed using Theorem 3, and the radius of the inner circle can be computed by Algorithm 1. Now consider the boundary circle (see Figure 9b); the angles \(\alpha_{2}\), \(\alpha_{3}\), \(\alpha_{4}\) can be computed using Theorem 3, and \(\alpha_{1}\) and \(\alpha_{5}\) can be computed using Theorem 4. When C is a boundary circle, we define SA(C) as the sum of these five angles. Note that we use the same term SA(C) regardless of whether C is an inner circle or boundary circle. Therefore, if C is a corner circle, SA(C) is equal to the sum of the four angles, as shown in Figure 9a. The angle \(\alpha_{1}\) is equal to \(\pi-\angle\)A; \(\alpha_{2}\) and \(\alpha_{4}\) can be computed using Theorem 4, and \(\alpha_{3}\) can be computed using Theorem 3. From the above description, we know that SA(C) can be computed regardless of whether C is a corner circle, a boundary circle, or an inner circle. We know that when the circle radii in the circle ring are fixed, we can find one (inner) circle explicitly tangent to the circle ring. With a similar approach, if the boundary circle with a variable radius is tangent to four circles and one line, we can also find the radius of the boundary circle. Consider the boundary circle in Figure 10; the SA(C) can be computed for the fixed radii of the four circles. When SA(C) \(<2\pi\) (Figure 10a), we need to reduce the radius of C, and when SA(C) \(>2\pi\) (Figure 10b), we need to enlarge the radius of C until SA(C) \(=2\pi\) (Figure 9b). This scenario also works when C is a corner circle (see Figure 11). We conclude the following: if SA(C) \(>2\pi\), enlarge the radius of C, and if SA(C) \(<2\pi\), reduce the radius of C. The circle C can be an inner circle, boundary circle, or corner circle. We describe the criterion used to modify all circles in the Tri(T\({}_{n}\)) problem and propose an algorithm in the next section. Figure 10: The criterion for enlarging/reducing the radius of the boundary circle. Figure 9: Angles for corner, inner, and boundary circles. (**a**) Corner circle. (**b**) Boundary circle. (**c**) Inner circle.