Malfatti’s problem involves three circles (called Malfatti circles) that are tangent to each other and two sides of a triangle. In this study, our objective is to extend the problem to find 6, 10, … ∑1ni (n > 2) circles inside the triangle so that the three corner circles are tangent to two sides of the triangle, the boundary circles are tangent to one side of the triangle, and four other circles (at least two of them being boundary or corner circles) and the inner circles are tangent to six other circles. We call this problem the extended general Malfatti’s problem, or the Tri(Tn) problem, where Tri means that the boundary of these circles is a triangle, and Tn is the number of circles inside the triangle. In this paper, we propose an algorithm to solve the Tri(Tn) problem.