The formulization of the intrinsic metric on the added Sierpinski triangle by using the code representations

To formulate the intrinsic metrics by using the code representations of the points on the classical fractals is an important research area since these formulas help to prove many geometrical and structural properties of these fractals. In various studies, the intrinsic metrics on the code set of the Sierpinski gasket, the Sierpinski tetrahedron, and the Vicsek (box) fractal are explicitly formulated. However, in the literature, there are not many works on the intrinsic metric that is obtained by the code representations of the points on fractals. Moreover, as seen in the studies on this subject, the contraction coefficients of the associated iterated function systems (IFSs) are the same for each fractal. In this paper, we define the intrinsic metric formula on the added Sierpinski triangle, whose IFS has different contraction factors, by using the code representations of the points of it. Finally, we give several geometrical properties of this fractal by using the intrinsic metric formula.

by using these intrinsic metrics in [1] and [21], respectively. As seen in these studies, these intrinsic formulas help to show many properties of these fractals. The main aim of the paper is to give the intrinsic metric formula for a different fractal, which we call the added Sierpinski triangle. Note that the associated iterated function systems (IFSs) of fractals such as the Sierpinski gasket, mod-3 Sierpinski gasket SG (3), Sierpinski carpet, Sierpinski tetrahedron, and Box fractal have the same contraction factors, but the contraction factors of the IFS of the added Sierpinski triangle are not same. This paper will thus be the first work giving the intrinsic metric formula defined by the code representation of points on a fractal whose IFS consists of different contraction factors. Because of the different contraction coefficients, there are some difficulties in formulating the intrinsic metric on the code set of this fractal. For a better understanding, we first the give the code representations of the points on the added Sierpinski triangle in Proposition 2.1. Then we mention Cases 1, 2, 3, 4, 5, and 6, which include all states of the construction of the intrinsic metric on this set. We thus formulate the intrinsic metric in Theorem 3.3. In Lemma 3.5, we give a useful abbreviation for this formula. In Propositions 3.4, 3.6, and 3.8, we investigate some geometrical properties of this fractal. Examples 3.9 and 3.10 also show how this formula is used in different cases.
In the following section, we first explain the construction of the added Sierpinski triangle and then investigate the code representations of points on this set.

The code representations of the points and the construction of the added Sierpinski triangle
The construction of the added Sierpinski triangle is actually similar to the construction of the Sierpinski gasket. The only difference is that smaller triangles are added instead of removed triangles in each step, which is the reason why we call it the added Sierpinski triangle. For the construction of this fractal, we consider an equilateral triangle (with edge length 1) as the initial set. We mark the midpoints of each edge of the triangle and obtain four smaller triangles. Then we remove the middle triangle and mark the midpoints of the removed triangle. Combining these points, we obtain a smaller triangle. Obviously, the middle triangle has edge length two times smaller than the edge length of the remaining three triangles (see step 1 in Figure 2). We denote this structure by T 1 . In the second step, we repeat this process for each four new triangles and we get T 2 . Continuing this process infinitely, we get the added Sierpinski triangle (see the last step in Figure 2). We denote this fractal by S . Therefore, we have ∞ ∩ i=0 T i = S. This fractal can also be obtained as the attractor of an iterated function system (IFS). Let {R 2 ; f 0 , f 1 , f 2 , f 3 } be an iterated function system where with the contraction factors , and 1 2 , respectively. Since  Now we show the code representations of the points on the added Sierpinski triangle and we constitute the code sets thanks to these code representations. As seen in Figure 3, we denote the middle part of S by S 0 (with purple color), the left-bottom part of S byS 1 (with green color), the right-bottom part of S by S 2 (with blue color), and the upper part of S by S 3 (with yellow color). Hence, we get We similarly denote the middle part ofS a1 byS a10 , the left-bottom part ofS a1 byS a11 , the right-bottom part of S a1 by S a12 , and the upper part of S a1 by S a13 where a 1 ∈ {0, 1, 2, 3} . Therefore, we obtain Generally, we express the middle part of S σ by S σ0 , the left-bottom part of S σ by S σ1 , the right-bottom part of S σ by S σ2 , and the upper part of S σ by S σ3 . We thus have (see Figure 4).
Proof First, we show the points that have three code representations as follows: i) Let A be the intersection point of any two subtriangles in the same level of S σ such that where σ = a 1 a 2 . . . a k−1 and a k ∈ {1, 2, 3}.
• If we choose a k = 1 , then we have We now consider three different nested sequences of sets as follows: From the Cantor intersection theorem, the code representations of A are σ0111 . . . , σ13222 . . . , and σ12333 . . . , respectively (see A = V σ in Figure 5). • Let a k = 2 . Since  Figure 5).
• For a k = 3 , we have and three different nested sequences of sets as follows:  Figure 5).
Therefore, the vertices points T σ , V σ , and W σ of S σ0 have three different code representations.
ii) Let A be the intersection point of any two subtriangles in the same level of S σ such that where σ = a 1 a 2 . . . a k−1 and a k , b k ∈ {1, 2, 3} and a k ̸ = b k . Hence, we get the nested sequence of sets such that

The Cantor intersection theorem states that the code representations of
σb k a k a k . . . a k , respectively, and thus A has two different code representations. For example, the points M σ , L σ , and K σ in Figure 5 have two different code representations.
iii) If A is not the intersection point of any two subtriangles in the same level of S σ , then A has a unique code representation. That is, it is different from all code representations denoted by cases i and ii above.
To exemplify, the vertex points P , Q, and R ofS and many points such as 121212 . . . , 01230123 . . . , and nonrepeating forms have unique code representation.
Consequently, the code sets of the subtriangles S σ are expressed as

The construction of the intrinsic metric on the code set of the added Sierpinski triangle
The intrinsic metric on a set K is expressed as follows: d(x, y) = inf{δ | δ is the length of a rectifiable curve in K joining x and y} (3.1) for x, y ∈ K (for details see [4]). The intrinsic metric on the code set of the equilateral Sierpinski gasket is also defined in [22]: We now formulate the intrinsic metric by using the code representations of points on the added Sierpinski triangle. Note that in each step there are middle triangles in the added Sierpinski triangle different from the Sierpinski gasket. To formulate the intrinsic metric onS seems quite complicated due to the different contraction factors and the increase in shortest paths. Now we express our first observations for this construction. We first need some notations and expressions to define the intrinsic metric by using the code representation of points. Suppose that the code representations of the different points A and B onS are a 1 a 2 . . . a k−1 a k a k+1 . . .
Assume that the number of elements of the set such that m 1 < m 2 < m 3 < . . . and l 1 < l 2 < l 3 < . . . .
• Let a k ̸ = 0 and b k ̸ = 0. Then the shortest paths between the points A and B must pass through either the (see Case 1, Case 2, and Case 3, respectively). Thus, these three paths should be taken into account and the minimum of the lengths of them should be taken for the calculation of the length of the shortest paths (see Figure 6).

Case 1.
The length of the shortest paths between A and S σ a k ∩ S σ b k and the length of the shortest paths between B and S σ a k ∩ S σ b k are obtained by Thus, the length of the shortest paths between A and B passing through the point

then this length is computed by
The length of the shortest paths between point A and point S σa k ∩ S σc k and the length of the shortest paths between point B and point S σb k ∩ S σc k are Moreover, the length of the side Hence, the length of the shortest paths between the points A and B passing through the line segment If M = ∅ and L = ∅, then this length is obtained as Case 3. To compute the length of the shortest paths between points A and B passing through the line , which is an edge of S σ0 , we must take into account the following cases: and a µ ̸ = 0 , the length of the shortest paths between points A and point S σa k ∩ S σ0 is obtained by where ii) Suppose that a k+1 = 0 . For

this length is computed by
iii) There exist three different cases as follows: In this case, we obtain . . = a s−1 and a s = 0 (s > k + 1) . In this case, we get In cases a, b, and c the length of the shortest paths between points A and point S σa k ∩ S σ0 is computed by (3.9)

we compute that the length of the shortest paths between points A and B passing through the line segment
• Let a k ̸ = 0 and b k = 0 . In this case, the shortest paths between points A and B must pass through one of the vertices of the subadded Sierpinski triangle S σ0 . That is, the shortest paths must pass through either point S σ0 ∩ S σa k or ( S σ0 ∩ S σc k ) or ( S σ0 ∩ S σb ′ k ) (see Case 4, Case 5, and Case 6, respectively). These three paths should thus be taken into account and the minimum of the lengths of them should be taken for the calculation of the length of the shortest paths (see Figure 7).

Case 4.
For the computation of the length of the shortest paths between points A and B passing through point S σa k ∩ S σ0 , we add the length of the shortest paths between points A and S σa k ∩ S σ0 and the length of the shortest paths between points B and S σa k ∩ S σ0 . Note that we use the appropriate value A ′′ given in Case 3 to compute the length of the shortest paths between points A and S σa k ∩ S σ0 . Moreover, we obtain that the length of the shortest paths between points B and S σa k ∩ S σ0 is where Thus, the sum of A ′′ and 1 2 B gives us the length of the shortest paths between points A and B passing through the point S σa k ∩ S σ0 .

Case 5.
To compute the length of the shortest paths between points A and B passing through the line segment ( S σa k ∩ S σc k )( S σ0 ∩ S σc k ) , first we obtain the length of the shortest paths between points B and S σ0 ∩ S σc k : where and c k ̸ = a k for c k ∈ {1, 2, 3} . Also, to compute the length of the shortest paths between points A and S σa k ∩ S σc k , we use the appropriate formula given in Case 2. Thus, the sum gives us the length of the shortest paths between points A and B passing through the line segment

Case 6.
For the computation of the length of the shortest paths between points A and B passing through , note that the length of the shortest paths between points A and S σa k ∩ S σb ′ k equals the value A given in Case 1 (use b ′ k instead of b k ). Moreover, denotes the length of the shortest paths between points B and S σ0 ∩ S σb ′ k where Hence, the sum 1 2 t+k+1 + A + C gives us the length of the shortest paths between points A and B passing through the line segment a 1 a 2 . . . a k−1 a k a k+1 . . . and b 1

then the intrinsic metric between the code representations of points A and
B is formulated as
Proof We only prove some special cases since the proof of all the cases is extremely long and tedious. Note first that points A and B are in the same subadded Sierpinski triangles S a1a2...ai for i < k . Thus, if a i ̸ = 0 for i = 1, 2, . . . , k − 1, then the length of the shortest paths between these points is less than or equal to 1 2 k−1 . However, an edge length of the subtriangles S 1 , S 2 and S 3 is two times greater than an edge length of S 0 .
For example, an edge length of the sub-triangle S 123 is eight times greater than an edge length of S 000 . If the element number of the set {i | a i = b i = 0, i < k} is t , then the length of the shortest paths is less than or equal to 1 2 k+t−1 . We now begin the proof of Case 3, which involves more complicated situations than Case 1 and Case 2. The proofs of the other cases can also be done in a similar manner. i) Let a k+1 ̸ = a k and a k+1 ̸ = 0 . We first compute the length of the shortest paths between A and ( S σa k ∩ S σ0 ). Since a i ∈ {0, 1, 2, 3} for i ≥ k+2 , there exists a unique number a µ such that a µ ̸ = a k , a µ ̸ = a k+1 , and a µ ̸ = 0 . If a k+2 ̸ = a µ , then A is not contained by S σa k a k+1 aµ or A = S σa k a k+1 a k+2 ∩ S σa k a k+1 aµ . Thus, the shortest paths must pass through S σa k a k+1 a k+2 ∩ S σa k a k+1 aµ (that is, the length of the shortest paths is greater than 1 2 k+t+2 if A is not contained by S σa k a k+1 aµ ). If A = S σa k a k+1 a k+2 ∩ S σa k a k+1 aµ , then the length of the shortest paths between A and ( S σa k ∩ S σ0 ) equals 1 2 k+t+2 . If A is contained by S σa k a k+1 aµ (that is, a k+2 = a µ ) and A ̸ = S σa k a k+1 a k+2 ∩ S σa k a k+1 aµ , then this length is less than 1 2 k+t+2 . By applying a similar method in the other steps, it is easily seen that if M = ∅ , then the length of the shortest paths between A and However, if M ̸ = ∅ , then calculations become a little more complicated. Suppose now that a i = 0 for at least i ∈ {k + 2, k + 3, k + 4, . . .} and let such that m 1 < m 2 < m 3 < . . . . In this case, point A is the element of the subtriangle S σa k ...am 1 −1am 1 . Thus, the length of the shortest paths between the points ( S σa k a k+1 a k+2 ...am 1 −1 ∩ S σa k a k+1 a k+2 ...aµ ) and ( S σa k ∩ S σ0 ) is obtained as However, an edge length of the subtriangle S σa k ...am 1 −20 is two times less than an edge length of the subtriangles S σa k ...am 1 −21 , S σa k ...am 1 −22 and S σa k ...am 1 −23 . The length of the shortest paths between the points and if we continue like this, then the length of the shortest paths between A and ( S σa k ∩ S σ0 ) is computed as in Equation 3.7.
ii) Suppose that a k+1 = 0. In this case, the shortest paths between A and ( S σa k ∩ S σ0 ) are determined by the first term (if available), which is different from zero and a k since there are two different options. That is, if then one of the shortest paths must pass through the point ( S σa k 0 ∩ S σa k ar ) . Note that the length of the shortest path between ( S σa k 0 ∩ S σa k ar ) and ( S σa k ∩ S σ0 ) is 1 2 k+t+2 . Since a k+1 = 0 , we get m 1 = k + 2 and thus M is a nonempty set.
Suppose that A is not contained by S σa k 0ar . That means that a k+2 ̸ = a r . It follows that the shortest paths must pass through S σa k 0a k+2 ∩ S σa k 0ar and the length of the shortest paths between ( S σa k 0 ∩ S σa k ar ) and ( S σa k 0a k+2 ∩ S σa k 0ar ) is greater than 1 2 k+t+3 . If A = S σa k 0a k+2 ∩ S σa k 0ar , then the length of the shortest paths between A and ( S σa k 0 ∩ S σ0ar ) equals 1 2 k+t+3 . If A is contained by S σa k 0ar (that is, a k+2 = a r ), then this length is less than 1 2 k+t+3 . Following similar steps, the length of the shortest paths between A and then for the computation the length of the shortest paths between A and ( S σa k ∩ S σ0 ) we add in each step the edge lengths of the related subtriangles where the shortest paths pass through. In this case, we get φ i = 1 for i = k + 2, k + 3, k + 4, . . . . iii) In cases a, b, and c, we certainly know that a k = a k+1 . Thus, to compute the length of the shortest paths between A and ( S σa k ∩ S σ0 ), there are three different options. That is, the shortest paths must pass through one of the points ( S σa k a k ∩ S σa k a l ) where a l ̸ = a k and a l ∈ {0, 1, 2, 3} . Note that the length of the shortest paths between ( S σa k a k ∩ S σa k a l ) and ( S σa k ∩ S σ0 ) is 1 2 k+t+1 . If a k = a k+1 = a k+2 , then the shortest paths must pass through one of the points ( S σa k a k a k ∩ S σa k a k a l ) . Moreover, the length of the shortest paths between ( S σa k a k ∩ S σa k a l ) and ( S σa k a k a k ∩ S σa k a k a l ) is 1 2 k+t+2 . If a k+2 = a s ̸ = a k and a s ̸ = 0 , then there are still two different options and the shortest paths must pass through one of the points ( S σa k a k ∩ S σa k as ) or ( S σa k a k ∩ S σa k 0 ) . Notice that the index s only reduces the number of points that the shortest paths pass through and does not generate an additional length. Moreover, the first term a r , which is different from a k and 0 for i > s , determines the point where the shortest paths pass through. That means that the shortest paths pass through the point ( S σa k a k ∩ S σa k as ) if a r = a s or the point ( S σa k a k ∩ S σa k 0 ) if a r ̸ = a s . Similarly, the index r only determines the point where the shortest paths pass through and does not add an additional length. In the general case a k = a k+1 = . . . = a s−1 ̸ = a s ̸ = 0 (s > k + 1) , a similar way can be followed.
Taking into account that M is a nonempty set, we compute the length of the shortest paths between A and Let a k+2 = a s = 0 . First, the shortest paths between A and ( S σa k ∩ S σ0 ) must pass through the point . It is obvious that the length of the shortest paths between ( S σa k ∩ S σ0 ) and ( S σa k a k ∩ S σa k 0 ) is 1 2 k+t+1 . However, there are still two different options and the shortest paths must pass through one of the points ( S σa k a k 0 ∩ S σa k a k a l ) where a l ∈ {1, 2, 3} and a l ̸ = a k . Note that the length of the shortest paths between ( S σa k a k 0 ∩ S σa k a k a l ) and ( S σa k a k ∩ S σa k 0 ) is 1 2 k+t+3 . In this case, the first term a r , which is different from a k and 0 for i > s , determines the point where the shortest paths pass through. That means that the shortest path must pass through the points ( S σa k a k 0 ∩ S σa k a k ar ). In the case a k = a k+1 = a k+2 = . . . , we add in each step the edge lengths of the related subtriangles where the shortest paths pass. Thus, we obtain φ i = 1 for i = k + 2, k + 3, k + 4, . . . . 2 Now we give some geometrical properties of S by using the intrinsic metric formula given in Theorem 3.3. In the following propositions and lemma, we consider the code representations of A, B, C as σa k a k+1 a k+2 . . . , Suppose now that a k ̸ = 0 and b k = 0 (the other case is done similarly). For the computation of the maximum value of A ′′ + 1 2 B , we must take into account that a k ̸ = b k , M = L = ∅, and φ i = β i = 1 for i = k + 1, k + 2, k + 3, . . . . Hence, we must use the formula given in Case 3-iii-c (see formula (3.9)) for the maximum value of A ′′ . This shows that We also compute from (3.10). Thus, we obtain the maximum value as A ′′ + 1 2 Proof a) We first know that A + B ≤ 1 2 k+t−1 due to Proposition 3.4. We also get γ i = 1 since a i = a k for i = k + 1, k + 2, k + 3, . . .. In this case, we compute This shows that d(A, B).

Moreover, it is obvious that
We now compute B and B ′′ , respectively, and then we compare them. First suppose that b k+1 = a k . In this case, we get β k+1 = 0 . This shows that and thus It follows that A + B ≤ 1 2 k+t+1 + A ′′ + B ′′ . Similar cases are also valid for b k+1 = b k and b k+1 = 0.
This shows that This completes the proof. Therefore, the proof is completed. 2 Remark 3.7 Let the code representation of C be 000 . . . . We now consider the triangle T 0 given as the initial set in Figure 2. It is easily seen that the point C is the centroid of T 0 .

Proposition 3.8
The distance between the vertex points of S σ and the points whose code representations are We use the formula d(A, B) = A ′′ + 1 2 B to compute the shortest distance between these points from Lemma

We first get
due to the fact that a k = a k+1 = a k+2 = . . . . Also, we compute  and one of the shortest paths is the red path given in Figure 8.  from Formula 3.14. In Figure 9, the red path is one of the shortest paths between A and B . Figure 9. Some of the paths that pass through the intersection points between A and B for a2 = 3 and b2 = 0 .

Conclusion
The intrinsic metric formulas can be defined to examine the geometric properties of different fractals via the code representations of points on them. However, as seen in this model, it is even more difficult to define the intrinsic metric formula on the code set of fractals that have different contraction coefficients. This paper has a different importance from other works given in the literature since it provides the first intrinsic metric formula to be written using the code representations of points on a fractal set that has different contraction coefficients of the related IFS. The formula is also very useful for proving different geometric properties of S . Moreover, this paper will be a guide for different works such as classifications of geodesics.