Open Access
This article is

- freely available
- re-usable

*Symmetry*
**2018**,
*10*(6),
204;
https://doi.org/10.3390/sym10060204

Article

Intrinsic Metrics on Sierpinski-Like Triangles and Their Geometric Properties

Department of Mathematics, Anadolu University, Eskişehir 26470, Turkey

Received: 8 May 2018 / Accepted: 5 June 2018 / Published: 7 June 2018

## Abstract

**:**

The classical Sierpinski Gasket defined on the equilateral triangle is a typical example of fractals. Sierpinski-like triangles can also be constructed on isosceles or scalene triangles. An explicit formula for the intrinsic metric on the classical Sierpinski Gasket via code representation of its points is given. The aim of this paper is to generalize this formula to the Sierpinski-like triangles. We also investigate geometrical properties of these triangles with respect to the intrinsic metric. Moreover, we describe certain properties of the classical Sierpinski gasket which are not shared by all of its analogues.

Keywords:

Sierpinski Gasket; fractals; code representation; intrinsic metricMSC:

28A80; 51F99## 1. Introduction

Fractals are popular research subjects not only in mathematics but also in physics, chemistry, biology, social science, computer science, engineering and economics. There have been many studies on fractals in the last decade (for details see [1,2,3,4]). Most classic fractals have two basic features: the first one is self-similarity, and the second one is that their Hausdorff dimensions are larger than their topological dimensions. The Sierpinski Gasket, which is named after Waclaw Sierpinski, is one of the leading examples of fractals. The basic characteristics of the Sierpinski Gasket, S, are given as follows:

This fractal is the attractor of an iterated function system (IFS). An IFS on a metric space X is a finite family $\{{f}_{0},{f}_{1},\dots ,{f}_{n}\}$ of contracting maps ${f}_{i}:X\to X$ whose contracting factors are ${r}_{i}$ for $i=0,1,2,\dots ,n$. It is well-known that if $\{{f}_{0},{f}_{1},\dots ,{f}_{n}\}$ is an IFS on a complete metric space X, then there is unique non-empty compact subset K of X such that

$$K=\bigcup _{i=0}^{n}{f}_{i}\left(K\right).$$

The set K is called the attractor associated with the IFS (for the construction of S as the attractor of an IFS see Equation (1)).

The area of the Sierpinski Gasket is zero and its fractal dimension is non-integer. The topological dimension of this fractal is one. It satisfies the open set condition and thus its fractal dimension, the unique real solution of the Moran equation
is $\frac{ln3}{ln2}$.

$$\sum _{i=0}^{2}{r}_{i}^{s}=\frac{1}{{2}^{s}}+\frac{1}{{2}^{s}}+\frac{1}{{2}^{s}}=\frac{3}{{2}^{s}}=1,$$

That is, Hausdorff dimension of the Sierpinski Gasket is larger than its topological dimension. Therefore, this set exhibits all of the classical properties of fractals.

However, none of the above listed features depend on whether the Sierpinski Gasket is constructed on the equilateral, isosceles, scalene triangles or not. The only difference that will occur is the coefficients of the functions with respect to IFS. In other words, S, which is constructed with the vertices $P=({p}_{0},{p}_{1}),Q=({q}_{0},{q}_{1})$ and $R=({r}_{0},{r}_{1})$, is the attractor of the iterated function system $\{{\mathbb{R}}^{2};{f}_{0},{f}_{1},{f}_{2}\}$ such that

$$\begin{array}{ccc}{f}_{0}(x,y)& =& {\displaystyle \left(\frac{x}{2}+\frac{{p}_{0}}{2},\frac{y}{2}+\frac{{p}_{1}}{2}\right),\phantom{\rule{5.69046pt}{0ex}}}\\ {f}_{1}(x,y)& =& {\displaystyle \left(\frac{x}{2}+\frac{{q}_{0}}{2},\frac{y}{2}+\frac{{q}_{1}}{2}\right),\phantom{\rule{5.69046pt}{0ex}}}\\ {f}_{2}(x,y)& =& {\displaystyle \left(\frac{x}{2}+\frac{{r}_{0}}{2},\frac{y}{2}+\frac{{r}_{1}}{2}\right).}\end{array}$$

It is obvious that if we choose ${p}_{0}={p}_{1}={q}_{1}=0,{q}_{0}=1,{r}_{0}=\frac{1}{2}$ and ${r}_{1}=\frac{\sqrt{3}}{2}$, then we get the classical Sierpinski Gasket as the attractor of the IFS. If these coefficients are taken as ${p}_{0}={p}_{1}={q}_{1}={r}_{0}=0,{q}_{0}=1$ and ${r}_{1}=1$, then the right angled Sierpinski Gasket becomes the attractor of the IFS (see Figure 1).

Besides these characteristics, different geometric properties can be examined by defining the intrinsic metrics on the equilateral, isosceles and scalene Sierpinski triangles. It is well-known that there are different ways to define the Sierpinski Gasket apart from the notion of IFS. By using these alternative definitions, various different properties of this fractal can be obtained. As one of them, the construction of the intrinsic metric on S can be given in several ways (for details see [5,6,7,8,9,10]).

The general definition of the intrinsic metric on S is expressed as follows:
for $x,y\in S$ (for details see [11]). Throughout this paper, we will only deal with the intrinsic metric obtained from the code representations of points on S. In [12], the intrinsic metric on the equilateral Sierpinski Gasket is explicitly formulated as follows:

$$d(x,y)=min\left\{\delta \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}\delta \phantom{\rule{4pt}{0ex}}\mathrm{is}\phantom{\rule{4pt}{0ex}}\mathrm{the}\phantom{\rule{4pt}{0ex}}\mathrm{length}\phantom{\rule{4pt}{0ex}}\mathrm{of}\phantom{\rule{4pt}{0ex}}\mathrm{a}\phantom{\rule{4pt}{0ex}}\mathrm{rectifiable}\phantom{\rule{4pt}{0ex}}\mathrm{curve}\phantom{\rule{4pt}{0ex}}\mathrm{in}\phantom{\rule{4pt}{0ex}}\mathrm{S}\phantom{\rule{4pt}{0ex}}\mathrm{joining}\phantom{\rule{4pt}{0ex}}x\phantom{\rule{4pt}{0ex}}\mathrm{and}\phantom{\rule{4pt}{0ex}}y\},$$

**Definition**

**1.**

Let ${a}_{1}{a}_{2}\dots {a}_{k-1}{a}_{k}{a}_{k+1}\dots $ and ${b}_{1}{b}_{2}\dots {b}_{k-1}{b}_{k}{b}_{k+1}\dots $ be two representations respectively of the points A and B on the equilateral Sierpinski Gasket such that ${a}_{i}={b}_{i}$ for $i=1,2,\dots ,k-1$ and ${a}_{k}\ne {b}_{k}.$ The distance $d(A,B)$ between A and B is determined by the following formula:
where

$$d(A,B)=min\left\{\sum _{i=k+1}^{\infty}\frac{{\alpha}_{i}+{\beta}_{i}}{{2}^{i}}\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{0.166667em}{0ex}}\frac{1}{{2}^{k}}+\sum _{i=k+1}^{\infty}\frac{{\gamma}_{i}+{\delta}_{i}}{{2}^{i}}\right\},$$

$$\begin{array}{ccc}{\alpha}_{i}=\left\{\begin{array}{cc}0,& {a}_{i}={b}_{k}\\ 1,& {a}_{i}\ne {b}_{k}\end{array}\right.,& \phantom{\rule{5.69046pt}{0ex}}& {\beta}_{i}=\left\{\begin{array}{cc}0,& {b}_{i}={a}_{k}\\ 1,& {b}_{i}\ne {a}_{k}\end{array}\right.,\end{array}$$

$$\begin{array}{ccc}{\gamma}_{i}=\left\{\begin{array}{cc}0,& {a}_{i}\ne {a}_{k}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{4pt}{0ex}}and\phantom{\rule{4pt}{0ex}}{a}_{i}\ne {b}_{k}\hfill \\ 1,& otherwise\hfill \end{array}\right.,& \phantom{\rule{5.69046pt}{0ex}}& {\delta}_{i}=\left\{\begin{array}{cc}0,& {b}_{i}\ne {b}_{k}\phantom{\rule{4pt}{0ex}}and\phantom{\rule{4pt}{0ex}}{b}_{i}\ne {a}_{k}\hfill \\ 1,& otherwise\hfill \end{array}\right..\end{array}$$

Note that, since there exists at least one shortest path between any two points, the metric d defined in Equation (3) is a strictly intrinsic metric on the code set of S ([12]). Moreover, in [13], we classify geodesics of the Sierpinski Gasket by using this metric.

In this paper, we give a general formula for the case of different edge lengths of the triangle. That is, we obtain a formula for the intrinsic metric on the code set of the scalene Sierpinski Gasket in Theorem 1. Afterwards, we show the relationship between the coefficients of formulas computed for the equilateral, isosceles and scalene Sierpinski Gasket. Finally, in Propositions 3 and 4, we get some important geometrical properties by using these formulas.

In the following section, we express some basic concepts that are needed to describe the metric given in Equation (4).

## 2. Preliminaries

Let us fix ${w}_{1},{w}_{2},\dots ,{w}_{n}$ where ${w}_{i}\in \{0,1,2\}$ for $i=1,2,\dots ,n$. The bottom-left part, the bottom-right part and the upper part of ${S}_{{w}_{1}{w}_{2}\dots {w}_{n}}$ are denoted by ${S}_{{w}_{1}{w}_{2}\dots {w}_{n}0}$, ${S}_{{w}_{1}{w}_{2}\dots {w}_{n}1}$ and ${S}_{{w}_{1}{w}_{2}\dots {w}_{n}2}$ respectively. Thus, we have the sub-triangle

$${S}_{{w}_{1}\dots {w}_{n}0}=\left\{{w}_{1}\dots {w}_{n}0{a}_{n+2}{a}_{n+3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{i}\in \{0,1,2\}\phantom{\rule{4pt}{0ex}}\mathrm{and}\phantom{\rule{4pt}{0ex}}i=n+2,n+3,\dots \},$$

$${S}_{{w}_{1}\dots {w}_{n}1}=\left\{{w}_{1}\dots {w}_{n}1{a}_{n+2}{a}_{n+3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{i}\in \{0,1,2\}\phantom{\rule{4pt}{0ex}}\mathrm{and}\phantom{\rule{4pt}{0ex}}i=n+2,n+3,\dots \},$$

$${S}_{{w}_{1}\dots {w}_{n}2}=\left\{{w}_{1}\dots {w}_{n}2{a}_{n+2}{a}_{n+3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{i}\in \{0,1,2\}\phantom{\rule{4pt}{0ex}}\mathrm{and}\phantom{\rule{4pt}{0ex}}i=n+2,n+3,\dots \}.$$

Hence, the code set of S is the union of the code sets ${S}_{0},{S}_{1}$ and ${S}_{2}$ (see Figure 2).

From now on, we will define the code representation of a point on S by using these code sets. The construction above shows that
is a nested sequence of sets such that

$${S}_{{a}_{1}},{S}_{{a}_{1}{a}_{2}},{S}_{{a}_{1}{a}_{2}{a}_{3}},\dots ,{S}_{{a}_{1}{a}_{2}\dots {a}_{n}},\dots $$

$${S}_{{a}_{1}}\supset {S}_{{a}_{1}{a}_{2}}\supset {S}_{{a}_{1}{a}_{2}{a}_{3}}\supset \dots \supset {S}_{{a}_{1}{a}_{2}\dots {a}_{n}}\supset \dots .$$

The Cantor intersection theorem states that the infinite intersection
is a point on S, which we denote by A. A code representation of A is the infinite word ${a}_{1}{a}_{2}\dots {a}_{n}\dots $ where ${a}_{n}\in \{0,1,2\},n\in \mathbb{N}$. Note that, if $A\in S$ is the intersection point of any two sub-triangles of ${S}_{{a}_{1}{a}_{2}\dots {a}_{k}}$, then A is called a junction point of S. In such a case, A has two different code representations of forms ${a}_{1}{a}_{2}\dots {a}_{k}\beta \alpha \alpha \alpha \dots $ and ${a}_{1}{a}_{2}\dots {a}_{k}\alpha \beta \beta \beta \dots $ where $\alpha ,\beta \in \{0,1,2\}$ and $\alpha \ne \beta $. (If a point is not in this form, then it has a unique code representation. For example, the vertices $P,Q$ and R have the code representations $000\dots $$111\dots $ and $222\dots $ respectively). Let ${S}_{0}\cap {S}_{1}=\left\{K\right\}$, ${S}_{1}\cap {S}_{2}=\left\{L\right\}$ and ${S}_{0}\cap {S}_{2}=\left\{M\right\}$. $0111\dots $ and $1000\dots $ are different code representations of K, $1222\dots $ and $2111\dots $ are different code representations of L, $0222\dots $ and $2000\dots $ are different code representations of M. Moreover, the code set of all points on the line segment connecting the vertices P and Q is
the code set of all points on the line segment connecting the vertices P and R is
and the code set of all points on the line segment connecting the vertices Q and R is

$$\bigcap _{n=1}^{\infty}{S}_{{a}_{1}{a}_{2}\dots {a}_{n}}$$

$$PQ=\left\{{a}_{1}{a}_{2}{a}_{3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{i}\in \{0,1\}\},$$

$$PR=\left\{{a}_{1}{a}_{2}{a}_{3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{i}\in \{0,2\}\},$$

$$QR=\left\{{a}_{1}{a}_{2}{a}_{3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{i}\in \{1,2\}\}.$$

For the general case, let us fix $\sigma ={a}_{1}{a}_{2}{a}_{3}\dots {a}_{k-1}$ where ${a}_{i}\in \{0,1,2\}$ for $i=1,2,\dots ,k-1$. We now consider the sub-triangles ${S}_{\sigma 0},{S}_{\sigma 1}$ and ${S}_{\sigma 2}$. Let ${S}_{\sigma 0}\cap {S}_{\sigma 1}=\left\{{K}_{\sigma}\right\}$, ${S}_{\sigma 1}\cap {S}_{\sigma 2}=\left\{{L}_{\sigma}\right\}$ and ${S}_{\sigma 0}\cap {S}_{\sigma 2}=\left\{{M}_{\sigma}\right\}$. Similarly, $\sigma 0111\dots $ and $\sigma 1000\dots $ are different code representations of ${K}_{\sigma}$, $\sigma 1222\dots $ and $\sigma 2111\dots $ are different code representations of ${L}_{\sigma}$, $\sigma 0222\dots $ and $\sigma 2000\dots $ are different code representations of ${M}_{\sigma}$. Furthermore, the code set of all points on the line segment connecting the vertices ${K}_{\sigma}$ and ${L}_{\sigma}$ is
the code set of all points on the line segment connecting the vertices ${K}_{\sigma}$ and ${M}_{\sigma}$ is
and the code set of all points on the line segment connecting the vertices ${L}_{\sigma}$ and ${M}_{\sigma}$ is
Moreover, it can be easily seen that
owing to the fact that $PR\parallel {K}_{\sigma}{L}_{\sigma}$, $QR\parallel {K}_{\sigma}{M}_{\sigma}$, $PQ\parallel {L}_{\sigma}{M}_{\sigma}$ and $\mid \sigma \mid =k-1$.

$${K}_{\sigma}{L}_{\sigma}=\left\{\sigma 1{a}_{k+1}{a}_{k+2}{a}_{k+3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{i}\in \{0,2\}\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=k+1,k+2,\dots \phantom{\rule{4pt}{0ex}}\},$$

$${K}_{\sigma}{M}_{\sigma}=\left\{\sigma 0{a}_{k+1}{a}_{k+2}{a}_{k+3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{i}\in \{1,2\}\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=k+1,k+2,\dots \phantom{\rule{4pt}{0ex}}\},$$

$${L}_{\sigma}{M}_{\sigma}=\left\{\sigma 2{a}_{k+1}{a}_{k+2}{a}_{k+3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{i}\in \{0,1\}\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=k+1,k+2,\dots \phantom{\rule{4pt}{0ex}}\}.$$

$$|{K}_{\sigma}{L}_{\sigma}|=\frac{\left|PR\right|}{{2}^{k}}=\frac{{d}_{eucl}(P,R)}{{2}^{k}},$$

$$|{K}_{\sigma}{M}_{\sigma}|=\frac{\left|QR\right|}{{2}^{k}}=\frac{{d}_{eucl}(Q,R)}{{2}^{k}},$$

$$|{L}_{\sigma}{M}_{\sigma}|=\frac{\left|PQ\right|}{{2}^{k}}=\frac{{d}_{eucl}(P,Q)}{{2}^{k}},$$

## 3. The Intrinsic Metric on the Scalene Sierpinski Gasket

Consider a scalene Sierpinski Gasket with vertices $P=({p}_{0},{p}_{1}),Q=({q}_{0},{q}_{1})$ and $R=({r}_{0},{r}_{1})$. In the following proposition, we formulate the distance between two different points on a scalene Sierpinski Gasket by using the code representations of these points. Then a special case of this formula will be given on the isosceles Sierpinski Gasket and it will be associated with the formula given in Definition 1 on the equilateral Sierpinski Gasket.

**Theorem**

**1.**

Suppose that the points A and B on the scalene Sierpinski Gasket have two representations ${a}_{1}{a}_{2}\dots {a}_{k-1}{a}_{k}{a}_{k+1}\dots $ and ${b}_{1}{b}_{2}\dots {b}_{k-1}{b}_{k}{b}_{k+1}\dots $ respectively such that ${a}_{i}={b}_{i}$ for $i=1,2,\dots ,k-1$ and ${a}_{k}\ne {b}_{k}.$ Then the distance $d(A,B)$ between A and B is determined by the following formula;
such that
where
and ${a}_{k}\ne {c}_{k}\ne {b}_{k}$ and ${c}_{k}\in \{0,1,2\}$.

$$\begin{array}{c}{\displaystyle d(A,B)=min\left\{\sum _{i=k+1}^{\infty}\frac{{\alpha}_{i}+{\beta}_{i}}{{2}^{i}}\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{0.166667em}{0ex}}\frac{\kappa}{{2}^{k}}+\sum _{i=k+1}^{\infty}\frac{{\gamma}_{i}+{\delta}_{i}}{{2}^{i}}\right\}}\end{array}$$

$${\alpha}_{i}=\left\{\begin{array}{cc}0,& {a}_{i}={b}_{k}\hfill \\ \left|PQ\right|,& ({a}_{i}=0,{b}_{k}=1)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{i}=1,{b}_{k}=0)\hfill \\ \left|PR\right|,& ({a}_{i}=0,{b}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{i}=2,{b}_{k}=0)\hfill \\ \left|QR\right|,& ({a}_{i}=1,{b}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{i}=2,{b}_{k}=1)\hfill \end{array}\right.,$$

$${\beta}_{i}=\left\{\begin{array}{cc}0,& {b}_{i}={a}_{k}\hfill \\ \left|PQ\right|,& ({b}_{i}=0,{a}_{k}=1)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({b}_{i}=1,{a}_{k}=0)\hfill \\ \left|PR\right|,& ({b}_{i}=0,{a}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({b}_{i}=2,{a}_{k}=0)\hfill \\ \left|QR\right|,& ({b}_{i}=1,{a}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({b}_{i}=2,{a}_{k}=1)\hfill \end{array}\right.,$$

$${\gamma}_{i}=\left\{\begin{array}{cc}0,& {a}_{i}={c}_{k}\hfill \\ \left|PQ\right|,& ({a}_{i}=0,{c}_{k}=1)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{i}=1,{c}_{k}=0)\hfill \\ \left|PR\right|,& ({a}_{i}=0,{c}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{i}=2,{c}_{k}=0)\hfill \\ \left|QR\right|,& ({a}_{i}=1,{c}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{i}=2,{c}_{k}=1)\hfill \end{array}\right.,$$

$${\delta}_{i}=\left\{\begin{array}{cc}0,& {b}_{i}={c}_{k}\hfill \\ \left|PQ\right|,& ({b}_{i}=0,{c}_{k}=1)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({b}_{i}=1,{c}_{k}=0)\hfill \\ \left|PR\right|,& ({b}_{i}=0,{c}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({b}_{i}=2,{c}_{k}=0)\hfill \\ \left|QR\right|,& ({b}_{i}=1,{c}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({b}_{i}=2,{c}_{k}=1)\hfill \end{array}\right.,$$

$$\begin{array}{c}\kappa =\left\{\begin{array}{cc}\left|PQ\right|,& ({a}_{k}=0,{b}_{k}=1)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{k}=1,{b}_{k}=0)\hfill \\ \left|PR\right|,& ({a}_{k}=0,{b}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{k}=2,{b}_{k}=0)\hfill \\ \left|QR\right|,& ({a}_{k}=1,{b}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{k}=2,{b}_{k}=1)\hfill \end{array}\right.,\end{array}$$

Note that we only give a sketch proof since it is long and tedious to show all the cases. However, different cases can be shown in a similar way.

**Proof.**

Suppose that A and B, which are two different points of the scalene Sierpinski, have the code representations ${a}_{1}{a}_{2}\dots {a}_{n}\dots $ and ${b}_{1}{b}_{2}\dots {b}_{n}\dots $ respectively. It is obvious that there exists at least one natural number s such that ${a}_{s}\ne {b}_{s}$. Thus, we have $A\in {S}_{\sigma {a}_{k}}$ and $B\in {S}_{\sigma {b}_{k}}$ where $k=min\left\{s\phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{a}_{s}\ne {b}_{s},\phantom{\rule{4pt}{0ex}}s=1,2,3,\dots \}.$ Let ${a}_{k}=0$ and ${b}_{k}=1$ (or ${a}_{k}=1$ and ${b}_{k}=0$). In this case, the shortest paths between A and B must pass through either the point ${K}_{\sigma}$ or the line ${L}_{\sigma}{M}_{\sigma}$. If ${a}_{k}=0$ and ${b}_{k}=2$ (or ${a}_{k}=2$ and ${b}_{k}=0$), then the shortest paths between a and b must pass through either the point ${M}_{\sigma}$ or the line ${K}_{\sigma}{L}_{\sigma}$. If ${a}_{k}=1$ and ${b}_{k}=2$ (or ${a}_{k}=2$ and ${b}_{k}=1$), then the shortest paths between a and b must pass through either the point ${L}_{\sigma}$ or the line ${K}_{\sigma}{M}_{\sigma}$.

**Case**

**1.**

Firstly, we will deal with the shortest paths that pass through the point ${K}_{\sigma}$. We thus have ${a}_{k}=0$ and ${b}_{k}=1$ or ${a}_{k}=1$ and ${b}_{k}=0$. Let us only investigate ${a}_{k}=0$ and ${b}_{k}=1$ because the proof is the same for ${a}_{k}=1$ and ${b}_{k}=0$. The union of a path between A and ${K}_{\sigma}$ and a path between ${K}_{\sigma}$ and B gives a path between A and B. If we compute the length of the shortest paths between A and ${K}_{\sigma}$, then the paths between ${K}_{\sigma}$ and B can be obtained using a similar argument.

Given $A\in {S}_{\sigma 00}$ and let ${S}_{{\sigma}^{\prime}0}\cap {S}_{{\sigma}^{\prime}1}=\left\{{K}_{{\sigma}^{\prime}}\right\}$ where ${\sigma}^{\prime}=\sigma 0$. Then we must compute the length of the line segment ${K}_{\sigma}{K}_{{\sigma}^{\prime}}$. Thus, the length of the shortest paths between A and ${K}_{\sigma}$ is $\mu =\frac{\left|PQ\right|}{{2}^{k+1}}+\epsilon$ for some $\epsilon \ge 0$. (For the case ${a}_{k+1}=0$ and ${b}_{k}=1$, we actually get ${\alpha}_{k+1}=\left|PQ\right|$).

If $A\in {S}_{\sigma 02}$, then we must compute the length of the line ${K}_{\sigma}{L}_{{\sigma}^{\prime}}$ where ${S}_{{\sigma}^{\prime}1}\cap {S}_{{\sigma}^{\prime}2}=\left\{{L}_{{\sigma}^{\prime}}\right\}$ to obtain the length of the shortest path between A and ${K}_{\sigma}$. Hence, this length equals to $\mu =\frac{\left|QR\right|}{{2}^{k+1}}+\epsilon$ for some $\epsilon \ge 0$ (that is, if ${a}_{k+1}=2$ and ${b}_{k}=1$, then ${\alpha}_{k+1}=\left|QR\right|$).

If $A={M}_{{\sigma}^{\prime}}$ where ${M}_{{\sigma}^{\prime}}$ is the intersection point of the sub-triangles ${S}_{{\sigma}^{\prime}0}$ and ${S}_{{\sigma}^{\prime}2}$, then there are two shortest paths between A and ${K}_{\sigma}$. These paths are the union of the line segments ${M}_{{\sigma}^{\prime}}{K}_{{\sigma}^{\prime}}$ and ${K}_{{\sigma}^{\prime}}{K}_{\sigma}$ or the union of the line segments ${L}_{{\sigma}^{\prime}}{M}_{{\sigma}^{\prime}}$ and ${L}_{{\sigma}^{\prime}}{K}_{\sigma}$. So, the length of these paths are exactly obtained as
(In this case, a has the code representations $\sigma 00222\dots $ or $\sigma 02000\dots $. For $i=2,3,4,\dots $, if ${a}_{k+1}=0$ and ${a}_{k+i}=2$, then we obtain ${\alpha}_{k+1}=\left|PQ\right|$ and ${\alpha}_{k+i}=\left|QR\right|$ or similarly if ${a}_{k+1}=2$ and ${a}_{k+i}=0$, then we get ${\alpha}_{k+1}=\left|QR\right|$ and ${\alpha}_{k+i}=\left|PQ\right|$).

$$\mu =\frac{\left|QR\right|}{{2}^{k+1}}+\frac{\left|PQ\right|}{{2}^{k+1}}.$$

Let us now consider $A\in {S}_{\sigma 01}$. Notice that, the multiplier $\frac{1}{{2}^{k+1}}$ is not included in the computation of the length of the shortest paths between A and ${K}_{\sigma}$ since ${K}_{\sigma}\in {S}_{\sigma 01}$. If $A\in {S}_{\sigma 010}$ or $A\in {S}_{\sigma 012}$, then we must compute the length of the line segment ${K}_{{\sigma}^{\u2033}}{K}_{\sigma}$ or the length of the line segment ${L}_{{\sigma}^{\u2033}}{K}_{\sigma}$ to get the shortest distance such that ${K}_{{\sigma}^{\u2033}}={S}_{{\sigma}^{\u2033}0}\cap {S}_{{\sigma}^{\u2033}1}$, ${L}_{{\sigma}^{\u2033}}={S}_{{\sigma}^{\u2033}1}\cap {S}_{{\sigma}^{\u2033}2}$ where ${\sigma}^{\u2033}=\sigma 01$. In this case, we get
or
respectively for some $\epsilon \ge 0$.

$$\mu =\frac{\left|PQ\right|}{{2}^{k+2}}+\epsilon $$

$$\mu =\frac{\left|QR\right|}{{2}^{k+2}}+\epsilon $$

For the case $A={M}_{{\sigma}^{\u2033}}$, where ${M}_{{\sigma}^{\prime \prime}}$ is the intersection point of the sub-triangles ${S}_{{\sigma}^{\u2033}0}$ and ${S}_{{\sigma}^{\u2033}2}$, there are two paths to obtain the shortest distance between A and ${K}_{\sigma}$ as before. These paths are the union of the line segments ${M}_{{\sigma}^{\u2033}}{K}_{{\sigma}^{\u2033}}$ and ${K}_{{\sigma}^{\u2033}}{K}_{\sigma}$ or the union of the line segments ${M}_{{\sigma}^{\u2033}}{L}_{{\sigma}^{\u2033}}$ and ${L}_{{\sigma}^{\u2033}}{K}_{\sigma}$. The length of these two paths is

$$\mu =\frac{\left|PQ\right|}{{2}^{k+2}}+\frac{\left|QR\right|}{{2}^{k+2}}.$$

This procedure also continues for smaller triangles. By splicing these shortest paths between “A and ${K}_{\sigma}$” and “${K}_{\sigma}$ and B”, we can determine the length of the shortest paths between A and B passing through the point ${K}_{\sigma}$.

**Case**

**2.**

Now, we will investigate the length of the shortest paths passing through the line segment ${L}_{\sigma}{M}_{\sigma}$. In this case, we must figure out the shortest paths between “A and ${M}_{\sigma}$” and between “B and ${L}_{\sigma}$”. Note that we can compute the lengths of these shortest paths in the same way as the Case 1. As we add $\frac{\left|PQ\right|}{{2}^{k}}$ (the length of the path ${L}_{\sigma}{M}_{\sigma}$) to these lengths, we obtain the length of the shortest path passing through ${L}_{\sigma}{M}_{\sigma}$.

We now consider the shortest paths passing through the line segment ${K}_{\sigma}{L}_{\sigma}$. The shortest paths (thus the corresponding length) between “A and ${K}_{\sigma}$” and between “B and ${L}_{\sigma}$” can be obtained similarly. We get the length of the shortest path passing through ${K}_{\sigma}{L}_{\sigma}$ by adding the length of the path ${K}_{\sigma}{L}_{\sigma}$, which equals to $\frac{\left|PR\right|}{{2}^{k}}$, to these lengths.

Also, we can compute the length of the shortest paths passing through the line segment ${K}_{\sigma}{M}_{\sigma}$. In this sense, this length is obtained by adding $\frac{\left|QR\right|}{{2}^{k}}$ to the length of the shortest paths between “A and ${K}_{\sigma}$” and between “B and ${M}_{\sigma}$”.

As a result, the minimum of the lengths obtained from Case 1 and 2 gives us the length of the shortest paths between A and B. □

**Remark**

**1.**

The length of the shortest paths passing through one of the points ${K}_{\sigma}$, ${L}_{\sigma}$ and ${M}_{\sigma}$ is the first sum in Equation (4), $\mu ={\displaystyle \sum _{i=k+1}^{\infty}}\frac{{\alpha}_{i}+{\beta}_{i}}{{2}^{i}}$. And the second value in Equation (4), $\nu =\frac{\kappa}{{2}^{k}}+{\displaystyle \sum _{i=k+1}^{\infty}}\frac{{\gamma}_{i}+{\delta}_{i}}{{2}^{i}}$, gives us the length of the shortest paths passing through one of the line segment ${K}_{\sigma}{L}_{\sigma}$, ${L}_{\sigma}{M}_{\sigma}$ and ${K}_{\sigma}{M}_{\sigma}$ where $\frac{\kappa}{{2}^{k}}$ is the length of the line segment ${K}_{\sigma}{M}_{\sigma}$, ${L}_{\sigma}{M}_{\sigma}$ and ${K}_{\sigma}{M}_{\sigma}$ respectively.

The metric given in Theorem 1 is equivalent to the metric given in Equation (2) due to the fact that the metric d is defined as the minimum of the lengths of the admissible paths connecting the points A and B of the scalene Sierpinski Gasket.

The proof of the following proposition is similar to the proof in [12]. Thus the proof here will be omitted.

**Proposition**

**1.**

The metric d defined in Theorem 1 does not depend on the choice of the code representations of the points.

Suppose that the points A and B on the isosceles Sierpinski Gasket have the code representations ${a}_{1}{a}_{2}\dots {a}_{k-1}{a}_{k}{a}_{k+1}\dots $ and ${b}_{1}{b}_{2}\dots {b}_{k-1}{b}_{k}{b}_{k+1}\dots $ respectively where ${a}_{i}={b}_{i}$ for $i=1,2,\dots ,k-1$ and ${a}_{k}\ne {b}_{k}.$ In Theorem 1, if we choose ${P}_{0}=(0,0),{P}_{1}=(1,0)$ and ${P}_{2}=(0,1)$, then the distance formula on isosceles Sierpinski Gasket will be as follows:

**Corollary**

**1.**

The distance between A and B is defined by the following formula:
$$\begin{array}{c}{\displaystyle d(A,B)=min\left\{\sum _{i=k+1}^{\infty}\frac{{\alpha}_{i}+{\beta}_{i}}{{2}^{i}}\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{0.166667em}{0ex}}\frac{\kappa}{{2}^{k}}+\sum _{i=k+1}^{\infty}\frac{{\gamma}_{i}+{\delta}_{i}}{{2}^{i}}\right\}}\end{array}$$
such that
where
and ${a}_{k}\ne {c}_{k}\ne {b}_{k}$ and ${c}_{k}\in \{0,1,2\}$.

$${\alpha}_{i}=\left\{\begin{array}{cc}0,& {a}_{i}={b}_{k}\hfill \\ \sqrt{2},& ({a}_{i}=1,{b}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{i}=2,{b}_{k}=1)\hfill \\ 1,& \mathit{otherwise}\hfill \end{array}\right.,$$

$${\beta}_{i}=\left\{\begin{array}{cc}0,& {b}_{i}={a}_{k}\hfill \\ \sqrt{2},& ({b}_{i}=1,{a}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({b}_{i}=2,{a}_{k}=1)\hfill \\ 1,& \mathit{otherwise}\hfill \end{array}\right.,$$

$${\gamma}_{i}=\left\{\begin{array}{cc}0,& {a}_{i}={c}_{k}\hfill \\ \sqrt{2},& ({a}_{i}=1,{c}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{i}=2,{c}_{k}=1)\hfill \\ 1,& \mathit{otherwise}\hfill \end{array}\right.,$$

$${\delta}_{i}=\left\{\begin{array}{cc}0,& {b}_{i}={c}_{k}\hfill \\ \sqrt{2},& ({b}_{i}=1,{c}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({b}_{i}=2,{c}_{k}=1)\hfill \\ 1,& \mathit{otherwise}\hfill \end{array}\right.,$$

$$\begin{array}{c}\kappa =\left\{\begin{array}{cc}\sqrt{2},& ({a}_{k}=1,{b}_{k}=2)\phantom{\rule{4pt}{0ex}}\mathrm{or}\phantom{\rule{4pt}{0ex}}({a}_{k}=2,{b}_{k}=1)\hfill \\ 1,& \mathit{otherwise}\hfill \end{array}\right.,\end{array}$$

Note that if we take ${P}_{0}=(0,0),{P}_{1}=(1,0)$ and ${P}_{2}=(\frac{1}{2},\frac{\sqrt{3}}{2})$, then the distance formula on equilateral Sierpinski Gasket is obtained as Definition 1. Hence, Theorem 1 is very useful since it gives us the general case.

We now give an illustrative example which shows the computation of the distance between any two points on an isosceles Sierpinski triangle.

**Example**

**1.**

Consider an isosceles triangle with vertices $P=(0,0),Q=(1,0)$ and $R=(0,1)$. Let A and B be the points of S whose code representations are $0020\overline{1}=0020111\cdots $ and $2101\overline{2}=2101222\cdots $ respectively.

We get $k=1$ since the first terms of the code representations of A and B are different. By using Corollary 1, we compute
and
It follows that
and
which shows $d(A,B)=\frac{11+\sqrt{2}}{{2}^{4}}$ (see Figure 3).

$${\alpha}_{2}=1,{\alpha}_{3}=0,{\alpha}_{4}=1,{\alpha}_{i}=\sqrt{2}\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=5,6,7,\dots ,$$

$${\beta}_{2}=1,{\beta}_{3}=0,{\beta}_{i}=1\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=4,5,6,\dots ,$$

$${\gamma}_{2}=1,{\gamma}_{3}=\sqrt{2},{\gamma}_{4}=1,{\gamma}_{i}=0\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=5,6,7\dots ,$$

$${\delta}_{2}=0,{\delta}_{3}=1,{\delta}_{4}=0,{\delta}_{i}=\sqrt{2}\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=5,6,7\dots .$$

$$\begin{array}{ccc}{\displaystyle \mu =\sum _{i=2}^{\infty}\frac{{\alpha}_{i}+{\beta}_{i}}{{2}^{i}}}\hfill & =\hfill & \frac{1+1}{{2}^{2}}+\frac{0+0}{{2}^{3}}+\frac{1+1}{{2}^{4}}+\sum _{k=5}^{\infty}\frac{\sqrt{2}+1}{{2}^{k}}\hfill \\ & =\hfill & \frac{1}{2}+\frac{1}{{2}^{3}}+\frac{\sqrt{2}+1}{{2}^{4}}\phantom{\rule{5.69046pt}{0ex}}\hfill \\ & =\hfill & \frac{11+\sqrt{2}}{{2}^{4}},\hfill \end{array}$$

$$\begin{array}{ccc}{\displaystyle \nu =\frac{1}{2}+\sum _{i=2}^{\infty}\frac{{\gamma}_{i}+{\delta}_{i}}{{2}^{i}}}\hfill & =\hfill & \frac{1+0}{{2}^{2}}+\frac{\sqrt{2}+1}{{2}^{3}}+\frac{1+0}{{2}^{4}}+\sum _{k=5}^{\infty}\frac{0+\sqrt{2}}{{2}^{k}}\hfill \\ & =\hfill & \frac{1}{2}+\frac{1}{{2}^{2}}+\frac{\sqrt{2}+1}{{2}^{3}}+\frac{1}{{2}^{4}}+\frac{\sqrt{2}}{{2}^{4}}\phantom{\rule{5.69046pt}{0ex}}\hfill \\ & =\hfill & \frac{15+2\sqrt{2}}{{2}^{4}},\hfill \end{array}$$

## 4. Some Interesting Properties of the Equilateral, Isosceles and Scalene Sierpinski Gaskets

In this section, we give some important geometrical properties with the intrinsic metric on the equilateral, scalene and isosceles Sierpinski Gaskets via the code representations of their points. We first begin with a proposition related to the equilateral Sierpinski Gasket whose proof is given in [12] as follows:

**Proposition**

**2**

**([12]).**

Let ${S}_{\sigma}$ be a sub-triangle of the equilateral Sierpinski Gasket with edge length 1 and let ${P}_{\sigma}$, ${Q}_{\sigma}$ and ${R}_{\sigma}$ be vertices of ${S}_{\sigma}$. If ${A}_{\sigma}$ is an arbitrary point of ${S}_{\sigma}$ then
where $\sigma ={a}_{1}{a}_{2}{a}_{3}\dots {a}_{k-1}$.

$$d({A}_{\sigma},{P}_{\sigma 0})+d({A}_{\sigma},{P}_{\sigma 1})+d({A}_{\sigma},{P}_{\sigma 2})=\frac{1}{{2}^{k-2}},$$

Proposition 2 does not hold for scalene and isosceles Sierpinski Gaskets. That is, there are points A and B such that
as shown the following example:

$$d(A,P)+d(A,Q)+d(A,R)\ne d(B,P)+d(B,Q)+d(B,R),$$

**Example**

**2.**

Let us consider the scalene Sierpinski Gasket with vertices $P=(0,0),Q=(6,0)$ and $R=(0,8)$. Let A and B be the points of S such that their code representations are $0\overline{1}=0111\dots $ and $1\overline{2}=1222\dots $ respectively. It is clear that $P,Q$ and R have the code representations $000\dots $, $111\dots $, $222\dots $ respectively. For the computation of the shortest distance between A and P, we obtain $k=2$, ${\alpha}_{i}=6$, ${\beta}_{i}=6$, ${\gamma}_{i}=10$ and ${\delta}_{i}=8$ for $i=3,4,5\dots $ and thus $d(A,P)=min\{3,\frac{19}{4}\}=3$. Since $k=1$, ${\alpha}_{i}=0$, ${\beta}_{i}=6$, ${\gamma}_{i}=10$ and ${\delta}_{i}=10$ for $i=2,3,4\dots $, we compute $d(A,Q)=min\{3,13\}=3$. Due to the fact that $k=1$, ${\alpha}_{i}=0$, ${\beta}_{i}=10$, ${\gamma}_{i}=0$ and ${\delta}_{i}=10$ for $i=2,3,4\dots $, we get $\mu =\nu =9$ and thus $d(A,R)=9$. By using the formula given in Theorem 1, we have

$$d(A,P)+d(A,Q)+d(A,R)=15.$$

Moreover, $d(B,P)=7$ since we have $k=1$, ${\alpha}_{i}=8$, ${\beta}_{i}=6$, ${\gamma}_{i}=0$ and ${\delta}_{i}=8$ for $i=2,3,4\dots $. Owing to the fact that $k=2$, ${\alpha}_{i}=10$, ${\beta}_{i}=10$, ${\gamma}_{i}=10$ and ${\delta}_{i}=10$ for $i=3,4,5\dots $, we compute $d(B,Q)=min\{5,6\}=5$. Given $k=1$, ${\alpha}_{i}=0$, ${\beta}_{i}=10$, ${\gamma}_{i}=8$ and ${\delta}_{i}=8$ for $i=2,3,4,\dots $, we get $d(B,R)=min\{5,13\}=5$. This shows that

$$d(B,P)+d(B,Q)+d(B,R)=17.$$

By the code representations of points, we will demonstrate another property that is obtained on the equilateral Sierpinski Gasket but not on the isosceles and scalene Sierpinski Gaskets. We first recall the definition of the distance of a point to a set:

**Definition**

**2.**

Let $(\mathbb{X},\tilde{d})$ is a metric space and let B be a point of $\mathbb{X}$ and $\mathbb{A}\subseteq \mathbb{X}$. Then the distance of B to $\mathbb{A}$ is determined by

$$\tilde{d}(B,\mathbb{A})=inf\left\{\tilde{d}(B,A)\phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}A\in \mathbb{A}\}.$$

Obviously, if $B\in \mathbb{A}$, then we get $\tilde{d}(B,\mathbb{A})=0$.

**Remark**

**2.**

It is well-known that the sum of the shortest distances of an arbitrary point on one edge of an equilateral triangle to the other two edges is fixed, and this number is equal to the height of the triangle. In the following proposition, we apply this property to the equilateral Sierpinski Gasket with the intrinsic metric and obtain a remarkable result.

**Proposition**

**3.**

Let ${S}_{\sigma}$ be a sub-triangle of the equilateral Sierpinski Gasket with edge length 1 and let ${P}_{\sigma}$, ${Q}_{\sigma}$ and ${R}_{\sigma}$ be vertices of ${S}_{\sigma}$. If ${A}_{\sigma}$ with code representation $\sigma {a}_{k}{a}_{k+1}{a}_{k+2}\dots $ is an arbitrary point on the edge ${P}_{\sigma}{Q}_{\sigma}$ of ${S}_{\sigma}$, then

$$d({A}_{\sigma},{P}_{\sigma}{R}_{\sigma})+d({A}_{\sigma},{Q}_{\sigma}{R}_{\sigma})=\frac{1}{{2}^{k-1}}=\left|{P}_{\sigma}{Q}_{\sigma}\right|.$$

**Proof.**

Firstly, assume that ${A}_{\sigma}={P}_{\sigma}$. In such a case, the code representation of ${A}_{\sigma}$ is $\sigma 000\dots $. Thus, $d({A}_{\sigma},{P}_{\sigma}{R}_{\sigma})=0$ since ${A}_{\sigma}\in {P}_{\sigma}{Q}_{\sigma}$. We will compute $d({A}_{\sigma},{Q}_{\sigma}{R}_{\sigma})$. Let X be any point on ${Q}_{\sigma}{R}_{\sigma}$ which is the closest points to ${A}_{\sigma}$. It is clear that X has the code representation $\sigma {x}_{k}{x}_{k+1}{x}_{k+2}\dots $ where ${x}_{i}\in \{1,2\}$. Because ${a}_{k}\ne {x}_{k}$, ${x}_{i}\ne {a}_{k}$ and ${a}_{i}\ne {x}_{k}$ for $i=k+1,k+2,k+3,\dots $, we have

$$\mu =\sum _{i=k+1}^{\infty}\frac{{\alpha}_{i}+{\beta}_{i}}{{2}^{i}}=\sum _{i=k+1}^{\infty}\frac{1+1}{{2}^{i}}=\frac{1}{{2}^{k-1}}.$$

We now show $\nu =\frac{1}{{2}^{k-1}}.$ Let us consider cases ${x}_{k}=1$ and ${x}_{k}=2$ separately. If ${x}_{k}=1$, then we obtain ${c}_{k}=2$. Due to the fact that ${a}_{i}=0$, we have ${\gamma}_{i}=1$ for $i=k+1,k+2,k+3,\dots $. In order to get the closest distance, ${x}_{i}$ must be 2 and thus ${\delta}_{i}=0$ for $i=k+1,k+2,k+3,\dots $. Therefore, we get

$$\nu =\frac{1}{{2}^{k}}+\sum _{i=k+1}^{\infty}\frac{{\gamma}_{i}+{\gamma}_{i}}{{2}^{i}}=\frac{1}{{2}^{k}}+\sum _{i=k+1}^{\infty}\frac{0+1}{{2}^{i}}=\frac{1}{{2}^{k-1}}.$$

Similarly, $\nu $ equals to $\frac{1}{{2}^{k-1}}$ for the case ${x}_{k}=2$. Following the similar way, the same result is acquired if ${A}_{\sigma}={Q}_{\sigma}$. Hence, the proof is completed for the special cases ${A}_{\sigma}={P}_{\sigma}$ and ${A}_{\sigma}={Q}_{\sigma}$.

We now consider ${A}_{\sigma}\ne {P}_{\sigma}$ and ${A}_{\sigma}\ne {Q}_{\sigma}$. There exist $m\in \mathbb{N}$ and $n\in \mathbb{N}$ such that ${a}_{m}=0$ and ${a}_{n}=1$. We choose m and n as the first index such that $m\ge k$ and $n\ge k$. Let $n>m$ (the other case is done analogously). As ${A}_{\sigma}$ is on the edge ${P}_{\sigma}{Q}_{\sigma}$ of ${S}_{\sigma}$, we get ${a}_{k}=0$. Hence, we have ${a}_{i}=0$ for $i=k+1,k+2,\dots ,n-1$ and ${a}_{n}=1$. Consider any point X with code representation $\sigma {x}_{k}{x}_{k+1}{x}_{k+2}\dots $ on ${P}_{\sigma}{R}_{\sigma}$ and any point Y with code representation $\sigma {y}_{k}{y}_{k+1}{y}_{k+2}\dots $ on ${Q}_{\sigma}{R}_{\sigma}$ which are the closest points to ${A}_{\sigma}$. In that case, ${x}_{i}$ must be 0 for $i=k,k+1,\dots ,n-1$. There are only two options for ${x}_{n}$ which are 0 or 2. In the case of ${x}_{n}=2$, it is obtained ${\alpha}_{i}=1$ for $i=n+1,n+2,\dots $. So, ${x}_{n}$ must be equal to 0 for the computation of the closest distance. In addition, we attain ${\beta}_{i}=1$ since ${x}_{i}\ne 1$ for $i=n+1,n+2,\dots $. Moreover, we get ${y}_{i}\ne {a}_{k}$ for $i=k,k+1,k+2\dots $ because Y is on the edge ${Q}_{\sigma}{R}_{\sigma}$ (that is, ${y}_{i}\in \{1,2\}$ for $i=k,k+1,k+2\dots $). We thus have ${\beta}_{i}^{\prime}=1$ for $i=k+1,k+2,k+3\dots $. Furthermore, for $i=k+1,k+2,\dots ,n-1$, we obtain ${\alpha}_{i}^{\prime}=1$ and ${\alpha}_{n}^{\prime}=0$ since ${a}_{i}=0$ and ${a}_{n}=1$. (Note that, ${y}_{k}$ must be equal to 1). For any $i=n+1,n+2,n+3\dots $, if ${a}_{i}=0$, then ${\alpha}_{i}=0$ and ${\alpha}_{i}^{\prime}=1$ and if ${a}_{i}=1$, then ${\alpha}_{i}=1$, ${\alpha}_{i}^{\prime}=0$. It follows that
A similar computation shows $\nu +{\nu}^{\prime}\ge \frac{1}{{2}^{k-1}}.$ This concludes the proof. □

$$\begin{array}{ccc}{\displaystyle \mu +{\mu}^{\prime}}& =& {\displaystyle \sum _{i=k+1}^{\infty}\frac{{\alpha}_{i}+{\beta}_{i}}{{2}^{i}}+\sum _{i=k+1}^{\infty}\frac{{\alpha}_{i}^{\prime}+{\beta}_{i}^{\prime}}{{2}^{i}}}\hfill \\ & =& {\displaystyle \sum _{i=n+1}^{\infty}\frac{{\alpha}_{i}+{\beta}_{i}}{{2}^{i}}+\sum _{i=k+1}^{\infty}\frac{{\alpha}_{i}^{\prime}+{\beta}_{i}^{\prime}}{{2}^{i}}}\hfill \\ & =& {\displaystyle \sum _{i=n+1}^{\infty}\frac{{\alpha}_{i}+1}{{2}^{i}}+\sum _{i=k+1}^{\infty}\frac{{\alpha}_{i}^{\prime}+1}{{2}^{i}}}\hfill \\ & =& {\displaystyle \frac{1}{{2}^{n}}+\frac{1}{{2}^{k}}+\sum _{i=k+1}^{n-1}\frac{{\alpha}_{i}^{\prime}}{{2}^{i}}+\sum _{i=n+1}^{\infty}\frac{{\alpha}_{i}+{\alpha}_{i}^{\prime}}{{2}^{i}}}\hfill \\ & =& {\displaystyle \frac{1}{{2}^{n}}+\frac{1}{{2}^{k}}+\sum _{i=k+1}^{n-1}\frac{1}{{2}^{i}}+\sum _{i=n+1}^{\infty}\frac{1}{{2}^{i}}}\hfill \\ & =& {\displaystyle \frac{1}{{2}^{n}}+\frac{1}{{2}^{k}}+\sum _{i=k+1}^{n-1}\frac{1}{{2}^{i}}+\sum _{i=n+1}^{\infty}\frac{1}{{2}^{i}}}\hfill \\ & =& {\displaystyle \frac{1}{{2}^{k-1}}.}\hfill \end{array}$$

**Remark**

**3.**

If ${B}_{\sigma}$ and ${C}_{\sigma}$ are on the sides ${Q}_{\sigma}{R}_{\sigma}$ and ${P}_{\sigma}{R}_{\sigma}$ of the equilateral Sierpinski Gasket with edge length 1 respectively, then we have
and
However, Proposition 3 does not hold for every edges of scalene and isosceles Sierpinski Gaskets.

$$d({B}_{\sigma},{P}_{\sigma}{Q}_{\sigma})+d({B}_{\sigma},{P}_{\sigma}{R}_{\sigma})=\frac{1}{{2}^{k-1}}=\left|{Q}_{\sigma}{R}_{\sigma}\right|,$$

$$d({C}_{\sigma},{P}_{\sigma}{Q}_{\sigma})+d({C}_{\sigma},{Q}_{\sigma}{R}_{\sigma})=\frac{1}{{2}^{k-1}}=\left|{P}_{\sigma}{R}_{\sigma}\right|.$$

**Example**

**3.**

Consider the scalene Sierpinski Gasket with vertices $P=(0,0),Q=(0,8)$ and $R=(6,0)$. Let A with code representation $1\overline{0}=1000\dots $ be a point on the edge $PQ$ of the scalene Sierpinski Gasket. By using the formula given in Theorem 1, we first compute the distance $d(100\dots ,PR)$. The code representation of any point on $PR$ must be in the form ${x}_{1}{x}_{2}{x}_{3}\dots $ where ${x}_{i}\in \{0,2\}.$ In order to obtain ${\alpha}_{i}$ as 0, ${x}_{1}$ must be 0 since the term ${a}_{i}$ of A equals to zero for $i=2,3,4\dots $. Moreover, we have to take ${x}_{i}$ as 0 for $i=2,3,4\dots $ owing to the fact that ${a}_{1}=1$, $\left|PQ\right|=8$ and $\left|QR\right|=10$. We thus obtain

$$d(100\dots ,PR)=d(100\dots ,000\dots )=\frac{\left|PQ\right|}{{2}^{2}+{2}^{3}+{2}^{4}+\cdots}=4.$$

We now compute the distance $d(100\dots ,RQ)$. The code representation of any point on $RQ$ must be in the form ${y}_{1}{y}_{2}{y}_{3}\dots $ where ${y}_{i}\in \{1,2\}.$ To get the shortest distance, we must choose ${y}_{1}$ as ${a}_{1}$ (if we take ${y}_{1}$=2, then we obtain ${y}_{1}{y}_{2}{y}_{3}\dots =2111\dots $ for computation of shortest distance). Furthermore, ${y}_{i}$ must be 2 for $i=2,3,4\dots $ because ${a}_{2}=0$, $\left|PQ\right|=8$ and $\left|PR\right|=6$. Thus we have ${y}_{1}{y}_{2}{y}_{3}\dots =1222\dots $. So, we have
which shows

$$d(100\dots ,RQ)=d(100\dots ,1222\dots )=\frac{\left|PR\right|+\left|PR\right|}{{2}^{3}+{2}^{4}+{2}^{5}+\cdots}=3,$$

$$d(100\dots ,PR)+d(100\dots ,PR)=7\ne 8=\left|PQ\right|.$$

By similar calculations, the following result can be given.

**Corollary**

**2.**

Let S be a scalene or an isosceles Sierpinski Gasket. If A is a point on the shortest edge of S, then the sum of the distances of point A to the other two edges is fixed and this distance equals to the length of the shortest edge.

**Proposition**

**4.**

Let S be an equilateral Sierpinski Gasket with vertices P, Q and R. Suppose that A is a point on the edge $PQ$ with the code representation ${a}_{1}{a}_{2}{a}_{3}\dots $ where $A\ne P$. Then there are many points on $PR$ that determine the shortest distance of the point A to the line $PR$. Additionally, if n is the first index such that ${a}_{i}\ne 0$, then the set of points on $PR$ which determines this shortest distance is

$$\left\{{a}_{1}{a}_{2}{a}_{3}\dots {a}_{n-1}{x}_{n}{x}_{n+1}{x}_{n+2}{x}_{n+3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{x}_{i}\in \{0,2\}\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=n,n+1,n+2,\dots \}.$$

**Proof.**

Let A be a point on the edge $PQ$ with the code representation ${a}_{1}{a}_{2}{a}_{3}\dots $ where $A\ne P$ and let n be the first index such that ${a}_{i}\ne 0$. Consider any point X on $PR$ with the code representation ${x}_{1}{x}_{2}{x}_{3}\dots $ where ${x}_{i}\in \{0,2\}.$

Firstly, suppose that ${a}_{i}=1$ for $i=n+1,n+2,n+3,\dots $. In this case, ${x}_{i}$ must be 0 for $i=1,2,\dots ,n-1$ to obtain the shortest distance between X and A. We can choose ${x}_{n}$ as 0 or 2 since ${a}_{i}=1$ for $i=n+1,n+2,n+3,\dots $, and thus ${\alpha}_{i}=1$ for $i=n+1,n+2,n+3,\dots $. Additionally, ${x}_{i}$ can be taken 0 or 2 for $i=n+1,n+2,n+3,\dots $ because ${a}_{i}=1$, and so ${\beta}_{i}=1$ for $i=n+1,n+2,n+3,\dots $. This shows that the set of points X is

$$\left\{{a}_{1}{a}_{2}{a}_{3}\dots {a}_{n-1}{x}_{n}{x}_{n+1}{x}_{n+2}{x}_{n+3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{x}_{i}\in \{0,2\}\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=n+1,n+2,n+3,\dots \}.$$

We now assume that there exists at least one ${a}_{s}=0$ for $s\in \{n+1,n+2,n+3,\dots \}$. Obviously, ${x}_{i}$ must be 0 for $i=1,2,\dots ,n-1$. Note that there are two options for ${x}_{n}$ such as 0 and 2. However, in order to obtain the shortest distance between X and A, ${x}_{n}$ has to be 0 since at least one ${a}_{s}$ is 0 for $s\in \{n+1,n+2,n+3,\dots \}$. Hence, at least one ${\alpha}_{s}$ must be 0. Moreover, ${x}_{i}$ can be taken 0 or 2 for $i=n+1,n+2,n+3,\dots $ as ${a}_{i}=1$, and thus ${\beta}_{i}=1$ for $i=n+1,n+2,n+3,\dots $. Consequently, the set of points X are
□

$$\left\{{a}_{1}{a}_{2}{a}_{3}\dots {a}_{n-1}0{x}_{n+1}{x}_{n+2}{x}_{n+3}\dots \phantom{\rule{4pt}{0ex}}\right|\phantom{\rule{4pt}{0ex}}{x}_{i}\in \{0,2\}\phantom{\rule{4pt}{0ex}}\mathrm{for}\phantom{\rule{4pt}{0ex}}i=n+1,n+2,n+3,\dots \}.$$

## 5. Conclusions

In this paper, we define code metrics on the code sets of Sierpinski-like triangles and then we give some interesting geometrical properties by using these metric formulas. These metric formulas can be also used in different computational works associated with the Sierpinski triangle.

## Funding

This work was supported by the Anadolu University Research Fund under contract 1605F406.

## Conflicts of Interest

The author declares no conflict of interest.

## References

- Barnsley, M. Fractals Everywhere; Academic Press: San Diego, CA, USA, 1988. [Google Scholar]
- Edgar, G. Measure, Topology, and Fractal Geometry; Springer Undergraduate Texts in Mathematics; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
- Falconer, K. Fractal Geometry: Mathematical Foundations and Applications; John Wiley and Sons: Hoboken, NJ, USA, 2004. [Google Scholar]
- Peitgen, H.O.; Jürgens, H.; Saupe, D. Chaos and Fractals: New Frontiers of Science; Springer: Berlin/Heidelberg, Germany, 2004. [Google Scholar]
- Cristea, L.L.; Steinsky, B. Distances in Sierpinski graphs and on the Sierpinski gasket. Aequ. Math.
**2013**, 85, 201–219. [Google Scholar] [CrossRef] - Denker, M.; Sato, H. Sierpinski gasket as a Martin boundary II (the intrinsic metric). Publ. RIMS Kyoto Univ.
**1999**, 35, 769–794. [Google Scholar] [CrossRef] - Grabner, P.; Tichy, R.F. Equidistribution and Brownian motion on the Sierpinski gasket. Monatsh. Math.
**1998**, 125, 147–164. [Google Scholar] [CrossRef] - Hinz, A.M.; Schief, A. The average distance on the Sierpinski gasket. Probab. Theory Relat. Fields
**1990**, 87, 129–138. [Google Scholar] [CrossRef] - Romik, D. Shortest paths in the Tower of Hanoi graph and finite automata. SIAM J. Discret. Math.
**2006**, 20, 610–622. [Google Scholar] [CrossRef] - Strichartz, R.S. Isoperimetric estimates on Sierpinski gasket type fractals. Trans. Am. Math. Soc.
**1999**, 351, 1705–1752. [Google Scholar] [CrossRef] - Burago, D.; Burago, Y.; Ivanov, S. A Course in Metric Geometry; AMS: Providence, RI, USA, 2001. [Google Scholar]
- Saltan, M.; Özdemir, Y.; Demir, B. An Explicit Formula of the Intrinsic Metric on the Sierpinski Gasket via Code Representation. Turk. J. Math.
**2018**, 42, 716–725. [Google Scholar] [CrossRef] - Saltan, M.; Özdemir, Y.; Demir, B. Geodesics of the Sierpinski Gasket. Fractals
**2018**. [Google Scholar] [CrossRef]

**Figure 1.**The Sierpinski Gaskets constructed on the equilateral, isosceles and scalene triangles respectively.

**Figure 2.**The equilateral Sierpinski Gasket and the sub-triangle ${S}_{\sigma}$ where $\sigma ={w}_{1}{w}_{2}\dots {w}_{n}$.

© 2018 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).