# Extended General Malfatti's Problem
## 3 Definition and Theorem for the Tri(T\({}_{n}\)) Problem
### The Tri(T\({}_{n}\)) Problem, \(n>2\)  
In this paper, we propose an algorithm to solve the Tri(T\({}_{n}\)), \(n>2\) problems. Before illustrating the algorithm, we will provide terms and theorems to support it. There are some theorems we need to derive before we propose the algorithm. **Theorem 3**. : _Three circles \(C\), \(C_{0}\), \(C_{1}\) are tangent to each other with radii \(r\), \(r_{0}\), and \(r_{1}\). The angle \(\alpha\) between two vectors, from the center of \(C\) to center of \(C_{0}\), and from center of \(C\) to center of \(C_{1}\), as shown in Figure 6, is equal to \(cos^{-1}\frac{r^{2}+(r_{0}+r_{1})r-r_{0}r_{1}}{(r+r_{0})(r+r_{1})}\)._  
**Proof of Theorem 3. ** Consider the triangle whose sides are the line segments connecting the centers of three circles. We know the length of the triangle sides are \(r+r_{0}\), \(r+r_{1}\), and \(r_{1}+r_{2}\). From the cosine theorem, we have \((r_{0}+r_{1})=(r+r_{0})+(r+r_{1})-2(r+r_{0})(r+r_{1})\text{cos}(\alpha)\). Therefore, the angle \(\alpha\) is equal to \(\cos\frac{r^{2}+(r_{0}+r_{1})r-r_{0}r_{1}}{(r+r_{0})(r+r_{1})}\). \(\square\)  
**Theorem 4**. : _Two circles, \(C_{1}\) and \(C_{2}\), are tangent to each other with radii \(r_{1}\), \(r_{2}\). Furthermore, these two circles are tangent to a line, as shown in Figure 7. Then,_  
\[\alpha = \frac{\pi}{2}+sin^{-1}\frac{r_{2}-r_{1}}{r_{2}+r_{1}}.\]  
Figure 5: Malfatti circle for an isosceles triangle. (a) (\(l\),\(b\)) = (10,12) (b) (\(l\),\(b\)) = (10,8). Figure 6: The angle connecting the centers of three pairwise tangent circles. **Proof of Theorem 4. ** Assume \(r_{2}>r_{1}\), as shown in Figure 7; then, the angle \(\alpha\) is greater than \(\frac{\pi}{2}\) and \(\alpha-\frac{\pi}{2}=\sin^{-1}\frac{r_{2}-r_{1}}{r_{2}+r_{1}}\). \(\square\)  
Note that if \(r_{2}<r_{1}\), \(\alpha<\frac{\pi}{2}\), it is because the value of \(\sin^{-1}\frac{r_{2}-r_{1}}{r_{2}+r_{1}}\) is negative. In our algorithm for solving the Tri(T\({}_{n}\)) problem, we provide a criterion to modify the radius for each circle. Consider the tangency graph for the Tri(T\({}_{n}\)) problem. We define three different kinds of circles: corner circles, boundary circles, and inner circles. The corner circle is tangent to two other circles and two sides of the triangle. The boundary circle is tangent to four other circles and one side of the triangle. The inner circle is tangent to the other six circles (see Figures 2 and 3). Here, we illustrate the criterion for the inner circle, boundary circle, and corner circle, respectively. Assume that \(n\) circles \(C_{1}\), \(C_{2}\), \(\ldots\), \(C_{n}\) with radii \(r_{1}\), \(r_{2}\), \(\ldots\), \(r_{n}\), are tangent to one circle \(C\) and its neighbor circles, and \(C_{n}\) is tangent to \(C_{1}\), as shown in Figure 8c. In this situation, the circle ring from \(C_{1}\) to \(C_{n}\) (\(n=9\) in Figure 8c, is explicitly tangent to the center circle \(C\). Alternatively, circle \(C\) is explicitly tangent to circle rings \(C_{1}\) to \(C_{n}\). The size of the circle ring is \(n\). When \(\alpha_{i}\) is the angle between two vectors that connect the center of \(C_{i}\) and \(C\) and \(C\) and \(C_{i+1\bmod n}\), we define \(SA(C)=\Sigma_{1}^{\pi}\alpha_{i}\). Assume that the circle ring \(C_{1}\), \(C_{2}\), \(\ldots\), \(C_{n}\) is explicitly tangent to \(C\). If we know the radii for all circles in the circle ring, how do we find the radius \(r\) for \(C\)? Assume the current radius of \(C\) is \(r\), and the circle ring \(C_{1}\), \(C_{2}\), \(\ldots\), \(C_{n}\) is explicitly tangent to \(C\) without the constraint that \(C_{n}\) is tangent to \(C_{1}\). We would like to change the value \(r\) so that \(C_{n}\) is also tangent to \(C_{1}\). Assume that \(n=9\), with a current radius \(r\) of \(C\), we can compute \(SA(C)=\Sigma_{1}^{\pi}\alpha_{i}\) using Theorem 3 (see Figure 8). There are three different cases for a SA(C): SA(C) \(>2\pi\), SA(C) \(=2\pi\), and SA(C) \(<2\pi\).