Piecewise linear approximation of fuzzy numbers: algorithms, arithmetic operations and stability of characteristics
Abstract
The problem of the piecewise linear approximation of fuzzy numbers giving outputs nearest to the inputs with respect to the Euclidean metric is discussed. The results given in Coroianu et al. (Fuzzy Sets Syst 233:26–51, 2013) for the 1knot fuzzy numbers are generalized for arbitrary nknot (\(n\ge 2\)) piecewise linear fuzzy numbers. Some results on the existence and properties of the approximation operator are proved. Then, the stability of some fuzzy number characteristics under approximation as the number of knots tends to infinity is considered. Finally, a simulation study concerning the computer implementations of arithmetic operations on fuzzy numbers is provided. Suggested concepts are illustrated by examples and algorithms ready for the practical use. This way, we throw a bridge between theory and applications as the latter ones are so desired in realworld problems.
Keywords
Approximation of fuzzy numbers Calculations on fuzzy numbers Characteristics of fuzzy numbers Fuzzy number Piecewise linear approximation1 Introduction
A family of fuzzy numbers constitutes an important subclass of fuzzy sets having countless applications in all cases where imprecise real values are modeled by their fuzzy counterparts. To avoid problems in processing and calculations on fuzzy numbers described by complicated membership functions the suitable approximations are commonly applied. In particular, the interval (see Chanas 2001; Grzegorzewski 2002, 2012), triangular (see Abbasbandy et al. 2010; Ban 2011; Ban and Coroianu 2015a, 2016; Yeh 2017) or trapezoidal approximation (see Abbasbandy and Amirfakhrian 2006; Abbasbandy and Asady 2004; Abbasbandy and Hajjari 2009b; Ban 2008, 2009a, b; Ban et al. 2011a, b; Ban and Coroianu 2011, 2012, 2014; Coroianu 2011, 2012; Grzegorzewski 2008a, b, 2010; Grzegorzewski and Mrówka 2005, 2007; Grzegorzewski and PasternakWiniarska 2009, 2014; Yeh 2007, 2008a, b) is very popular, mainly because of simplicity of the output representation (by no more than four points). More recently (see Ban et al. 2016; Yeh and Chu 2011), the studies were extended by employing approximations by LR fuzzy numbers. Fuzzy number approximation via shadowed sets was discussed in Grzegorzewski (2013). For the review of the fuzzy numbers approximation methods and their applications, we refer the reader to the monograph Ban et al. (2015).
One of the reasons that the trapezoidal fuzzy numbers are so popular in applications is that each such fuzzy number is represented completely by four real numbers only. Of course, the representation simplicity is a strong advantage but one may consider whether the shape reduction going so far is not too impoverish and restrictive in some situations. Therefore, the problem of the piecewise linear approximation of fuzzy numbers by the socalled 1knot fuzzy numbers was considered in Coroianu et al. (2013). Each such 1knot fuzzy number is completely characterized by six points on the real line. This way we get fuzzy numbers which are still simple enough, but simultaneously, having more “degrees of freedom”, we may obtain approximations that are more flexible to preserve some important properties of the input fuzzy numbers.
In this paper, a generalization of the results presented in Coroianu et al. (2013) is given. Now, instead of six points on the real line and piecewise linear sides each consisting of two segments that characterize 1knot fuzzy numbers, we consider nknot fuzzy numbers (where \(n\ge 2\)) which enables to quantify the uncertainty at n intermediate levels between 0 and 1. Such fuzzy numbers were already introduced in paper BáezSánchez et al. (2012) and were called polygonal fuzzy numbers. In this way, we obtain a subfamily of fuzzy numbers with piecewise linear membership functions, where each side consists of \(n+1\) segments. Hence, the output of the approximation is still simple but more flexible for reconstructing a fuzzy input than obtained using other methods discussed above. Moreover, it turns out that basic characteristics of the approximations converge to corresponding characteristics of the input fuzzy numbers. When comparing nknot approximation with the 1knot, discussed in Coroianu et al. (2013), its natural disadvantage is the longer processing time caused by more knots but its obvious advantage is better accuracy.
It should be stressed that the nknot fuzzy number is the most natural and desired fuzzy structure for the computer representation which is by definition discrete, even if the original object it represents is a continuous one. Actually, a typical way a fuzzy object is stored in a database is a set of its \(\alpha \)cuts. Here a natural question arises about the adequate choice of those \(\alpha \)cuts, even for a fixed set of \( \alpha \)levels. The method of the nearest piecewise linear approximation of fuzzy numbers proposed in this paper enables to avoid unjustified subjectivity and to choose the required \(\alpha \)cuts in an objective way based on the nearness criteria crucial to any reasonable approximation.
The paper is organized as follows. In Sect. 2, we recall basic terminology connected with fuzzy numbers and define the \(\alpha \) piecewise linear nknot fuzzy numbers. In Sect. 3, we introduce some auxiliary results and present a convenient reparametrization of piecewise linear fuzzy numbers useful for solving the approximation problem. Then in Sect. 4, we discuss briefly the existence and properties of the nearest piecewise linear fuzzy number for the Euclidean distance and a fixed knot setting.
Next section, i.e., Sect. 5, contains a broad study on the convergence results concerning the approximation operator. In particular, we consider some special cases, like the socalled naïve approximator (i.e., an nknot piecewise linear fuzzy number that interpolates the sides of a fuzzy number at the knots) or the approximator with equidistant knots. We prove there some theorems on the rate of convergence but we also examine the stability of basic characteristics like the expected interval, expected value, value of fuzzy number and its ambiguity.
Section 6 is both theoretical and strongly useroriented as well. We give there not only practical approximation algorithms and illustrative examples but we also provide a simulation study on the approximation accuracy of the computer calculations on fuzzy numbers and stability of some fuzzy number characteristics (for the practical implementation of the presented algorithms we refer the reader to FuzzyNumbers package for R by Gagolewski 2015). Therefore, Sect. 6 appears in some sense as the core of the paper by linking theory with applications as the latter ones are so desired in realworld problems.
Finally, Sect. 7 concludes the paper. Some open problems and directions for the further research are also sketched there.
2 Piecewise linear fuzzy numbers
However, fuzzy numbers with simple membership functions are often preferred in practice. For example, triangular or trapezoidal fuzzy numbers are most often used to rank fuzzy numbers (see, e.g., Abbasbandy and Hajjari 2009a; Ban and Coroianu 2015b; Facchinetti and Ricci 2004). Then, the same classes or even more generally the wellknown class of LR fuzzy numbers are used in fuzzy arithmetic (see, e.g., Carlsson and Fullér 2011; Hanss 2005; Hong and Hwang 1997; Kolesárová 1995). We can also mention here the Bodjanova (2005) fuzzy numbers used in statistical problems or in multicriteria decision making (see Ban and Ban 2012). Finally, we mention the recently introduced socalled parametric fuzzy numbers also known as semitrapezoidal fuzzy numbers (see Nasibov and Peker 2008; Yeh 2009, 2011). Apart from the aforementioned applications, such fuzzy numbers are very suitable in approximation as we already discussed this in Introduction. Another subclass of \({\mathbb {F}}(\mathbb {R)}\), very useful and convenient especially in computer processing, may be defined by considering fuzzy numbers with piecewise linear sides. We consider a particular type of such fuzzy numbers introduced in BáezSánchez et al. (2012) and being referred there as polygonal fuzzy numbers. Consider the following definition.
Definition 1
Let \({\mathbb {F}}^{\pi _{n}({\varvec{\alpha }})}(\mathbb {R)}\) denote the set of all \({\varvec{\alpha }}\)piecewise linear nknot fuzzy numbers (for fixed n and \({\varvec{\alpha }}\)). It is worth noting that the class introduced in Definition 1 generalizes wellknown subfamilies of fuzzy numbers. Actually, for \(n=0\) and \(s_1=s_4\) we get “crisp” real numbers, for \(n=0\) and \(s_1=s_2, s_3=s_4\) we obtain “crisp” real intervals; if \(n=0\) and \(s_2=s_3\), we get triangular fuzzy numbers, assuming only \(n=0\) we obtain trapezoidal fuzzy numbers, while for \(n=1\) we receive 1knot piecewise linear fuzzy numbers, discussed in Coroianu et al. (2013).
Further on we assume that two fuzzy numbers A and B are equal (and denote it as \(A=B\)) if \(A_{L}(\beta )=B_{L}(\beta )\) and \(A_{U}(\beta )=B_{U}( \beta )\) almost everywhere, \(\beta \in [0,1]\).
3 Some auxiliary results

\(e_{1,1}(\beta ) = e_{1,2}(\beta )=1\),
 for \(i=2,\ldots ,n+2\):$$\begin{aligned} e_{i,1}(\beta )=&\left\{ \begin{array}{lll} 0 &{}\quad \text {for} &{} \beta <\alpha _{i2}, \\ \frac{\beta \alpha _{i2}}{\alpha _{i1}\alpha _{i2}} &{}\quad \text {for} &{} \beta \in [\alpha _{i2},\alpha _{i1}], \\ 1 &{}\quad \text {for} &{} \beta >\alpha _{i1}, \end{array} \right. \\ e_{i,2}(\beta )=&1, \end{aligned}$$

\(e_{n+3,1}(\beta ) = 0\), \(e_{n+3,2}(\beta )=1\),
 for \(i=n+4,\ldots ,2n+4\):$$\begin{aligned} e_{i,1}(\beta )=&0, \\ e_{i,2}(\beta )=&\left\{ \begin{array}{lll} 1 &{}\quad \text {for} &{} \beta <\alpha _{2ni+4}, \\ \frac{\alpha _{2ni+5}\beta }{\alpha _{2ni+5}\alpha _{2ni+4}} &{}\quad \text {for} &{} \beta \in [\alpha _{2ni+4},\\ &{} &{} \alpha _{2ni+5}], \\ 0 &{}\quad \text {for} &{} \beta >\alpha _{2ni+5}, \end{array} \right. \end{aligned}$$
Lemma 1
The set \(\{{\mathbf {e}}_{1},{\mathbf {e}}_{2},\dots ,{\mathbf {e}}_{2n+4}\}\) is linearly independent in \(L^{2}[0,1]\times L^{2}[0,1]\).
Proof
Now we are in position to present the main result of this section.
Lemma 2
For any \({\varvec{\alpha }}\in {\mathfrak {A}}_n\) the set \({\mathbb {F}}^{\pi _{n}({\varvec{\alpha }})}(\mathbb {R)}\) is a closed convex subset of the space \(L^{2}[0,1]\times L^{2}[0,1]\) endowed with the topology generated by metric \({\widetilde{d}}\).
Proof
If we denote \({\mathbb {V}}=\mathrm {span}\{{\mathbf {e}}_{1},{\mathbf {e}}_{2},\dots , {\mathbf {e}}_{2n+4}\}\) then let us consider the linear bijective transformation \(i:{\mathbb {R}}^{2n+4}\rightarrow {\mathbb {V}}\), \( i(x_{1},x_{2},\ldots ,x_{2n+4}\mathbf {)=}\sum \nolimits _{i=1}^{2n+4}x_{i}{\mathbf {e}} _{i}\). We consider on \({\mathbb {V}}\) the same metric d as on \( L^{2}[0,1]\times L^{2}[0,1]\) (hence by (6) \({\mathbb {V}}\) is an inner product space) and \({\mathbb {R}}^{2n+4}\) is endowed with the Euclidean topology. Since i and \(i^{1}\) are linear transformations between finitedimensional normed spaces, it is immediate that both are continuous and hence homeomorphisms. We observe that \({\mathbb {F}}^{\pi _{n}( {\varvec{\alpha }})}(\mathbb {R)=}i(\Omega )\) where \(\Omega =\{ (x_{1},\ldots ,x_{2n+4})\in {\mathbb {R}}^{2n+4}:x_{i}\ge 0,i=2,\ldots ,2n+4\}\). Obviously \(\Omega \) is closed in \({\mathbb {R}} ^{2n+4}\) (actually \(\Omega \) is a polyhedral subset of \({\mathbb {R}} ^{2n+4}\) and all such sets are closed in \({\mathbb {R}}^{2n+4}\)) and since \(\ i^{1}\) is continuous it results that \({\mathbb {F}}^{\pi _{n}(\varvec{ \alpha })}(\mathbb {R)=}i(\Omega )\) is a closed subset of \({\mathbb {V}}\). On the other hand, \({\mathbb {V}}\) is a finite linear subspace of \(L^{2}[0,1]\times L^{2}[0,1]\) and hence \({\mathbb {V}}\) is closed in \(L^{2}[0,1]\times L^{2}[0,1]\) . By elementary topology, it easily results now that \({\mathbb {F}}^{\pi _{n}( {\varvec{\alpha }})}(\mathbb {R)}\) is closed in \(L^{2}[0,1]\times L^{2}[0,1]\).
As the convexity of \({\mathbb {F}}^{\pi _{n}({\varvec{\alpha }})}(\mathbb {R)}\) is obvious, the proof is complete. \(\square \)
Remark 1
From the above proof, it follows that a sequence of \({\varvec{\alpha }}\)piecewise linear nknot fuzzy numbers, \(\left( \mathrm {S}_{d}({\varvec{\alpha }},\varvec{\delta }_{m})\right) _{m=1,2,\ldots }\) with \(\varvec{\delta }_{m}=(\delta _{m,i})_{i=1,\dots ,2n+4}\), converges to \(\mathrm {S}_{d}({\varvec{\alpha }},\varvec{\delta })\), where \(\varvec{\delta }=(\delta _{i})_{i=1,\dots ,2n+4}\) if and only if for any i we have \(\delta _{m,i}\rightarrow \delta _{i}\), which is equivalent with \(\left\ \varvec{\delta }_{m}\varvec{ \delta }\right\ \rightarrow 0\) (here \(\left\ \cdot \right\ \) denotes the Euclidean norm over the space \({\mathbb {R}}^{2n+4}\)).
Remark 2
Lemma 2 can be deduced from Corollary 12 in BáezSánchez et al. (2012). Although in BáezSánchez et al. (2012), a different metric is employed one can easily prove that this metric is equivalent with the Euclidean metric on the span of \({\mathbb {F}}^{\pi _{n}({\varvec{\alpha }})}(\mathbb {R) }\). However, we prefer the present proof because it is more suitable to our forthcoming results. Especially, we refer here to the set \(\{{\mathbf {e}}_{1}, {\mathbf {e}}_{2},\dots ,{\mathbf {e}}_{2n+4}\}\) of linearly independent vectors in \(L^{2}[0,1]\times L^{2}[0,1]\) which will be used to approach the main results of the paper.
4 The best approximation for fixed \(\varvec{\alpha }\)
In this section, we generalize the theoretical results from paper Coroianu et al. (2013) concerning the existence, uniqueness and characterization of the approximation as well as the properties of the derived approximation operator by extending them to the case of piecewise linear nknot fuzzy numbers.
If membership functions of fuzzy numbers under study are too complicated, we usually approximate them by some simpler forms that are more useful for processing and easier to interpret. In this section, we discuss how to approximate an arbitrary fuzzy number by a piecewise linear nknot fuzzy number described by fixed \(\alpha \)cuts.
Theorem 1
If A is an arbitrary fuzzy number, then there exists the unique fuzzy number \(\Pi _{{\varvec{\alpha }}}^{n}(A)\in {\mathbb {F}}^{\pi _{n}({\varvec{\alpha }})}(\mathbb {R)}\) satisfying (8).
Taking into account Lemma 2, we obtain the proof (we omit this proof since it is identical with the proof of Theorem 8 in Coroianu et al. 2013).
Now let us denote with \(\Phi =(\phi _{i,j})_{i,j=1,\dots ,2n+4}\), the Gram matrix associated with the set \(\{{\mathbf {e}}_{1},\dots ,{\mathbf {e}}_{2n+4}\}\), i.e., \(\phi _{i,j}=\left\langle {\mathbf {e}}_{i},{\mathbf {e}}_{j}\right\rangle \). Since these vectors are linearly independent, it follows that \(\Phi \) is invertible. Moreover, for fixed A let \({\mathbf {b}}=(b_1,\dots ,b_{2n+4})\) such that \(b_{i}=\left\langle A,{\mathbf {e}}_{i}\right\rangle \).
We have the following characterization of the best approximation (see, e.g., Yeh 2009, Fact 2.1). If \((X,\left\langle \cdot ,\cdot \right\rangle )\) is a Hilbert space, \(\Omega \) is a closed convex subset of X, and \(x\in X\), then \({x}^*\in \Omega \) is the unique best approximation of x relatively to the set \(\Omega \) if and only if \( \left\langle x{x}^*,y{x}^*\right\rangle \)\(\le 0\) for any \(y\in \Omega \). Note that the notation \({x}^*=P_{\Omega }(x)\) is often used to denote that \({x}^*\) is the projection of x onto \(\Omega \).
Theorem 2
 (i)
\(\Phi \,{{\varvec{\delta }}^*}^T  {{\mathbf {z}}^*}^T={\mathbf {b}}^T\),
 (ii)
\(z^*_{1}=0\) and \(z^*_{i}\ge 0\), \(\forall i>1\),
 (iii)
\(\delta _{i}^{*}=0\) or \(z_{i}^{*}=0\), \(\forall i>1\).
We omit the proof because it uses a similar reasoning as the proof of Theorem 9 in Coroianu et al. (2013). Basically the only difference is that now we have a Gram matrix of dimension \(2n+4\).
It turns out that our approximation operator has some very important properties from the wellknown list presented in Grzegorzewski and Mrówka (2005).
Theorem 3
 (i)
Identity, i.e., \(\Pi _{{\varvec{\alpha }}}^{n}(A)=A\), \(\forall A\in {\mathbb {F}}^{\pi _{n}({\varvec{\alpha }})}(\mathbb {R)}\);
 (ii)
Invariance to translation, i.e.,
\(\Pi _{{\varvec{\alpha }}}^{n}(A+z)=\Pi _{{\varvec{\alpha }}}^{n}(A)+z\), \(\forall A\in {\mathbb {F}}({\mathbb {R}})\), \(\forall z\in {\mathbb {R}}\);
 (iii)
Scale invariance, i.e.,
\(\Pi _{{\varvec{\alpha }}}^{n}(\lambda \,A) =\lambda \, \Pi _{{\varvec{\alpha }}}^{n}(A)\)f, \(\forall A\in {\mathbb {F}}(\mathbb {R)}\), \(\forall \lambda \in {\mathbb {R}}\);
 (iv)
Lipschitzcontinuity, i.e.,
\(d(\Pi _{{\varvec{\alpha }}}^{n}(A),\Pi _{{\varvec{\alpha }}}^{n}(B))\le d(A,B)\), \(\forall A,B\in {\mathbb {F}}(\mathbb {R)}\).
The proofs are identical with those from the particular case of piecewise linear 1knot approximation (see Theorem 10 in Coroianu et al. 2013).
5 Some remarks on convergence
For the piecewise linear approximation operator introduced in the previous section, we can prove useful approximation results. First of all we can find a rate of convergence for the sequence of piecewise linear approximations by letting \(n\rightarrow \infty \). Additionally, we can estimate the convergence rate in the approximation of important characteristics associated to fuzzy numbers such as the value, ambiguity and expected interval, respectively. The key element in the process of obtaining the convergence results is the use of the wellknown naïve approximator.
5.1 The naïve approximator
Theorem 4
Proof
Proposition 1
Proof
5.2 Equidistant knots
From the above theorem, we easily get some important propositions for the case of equidistant knots.
Proposition 2
Proof
The proof is immediate by Theorem 4 and noting that \( \alpha _{n,i}=\tfrac{i}{n+1}\) for every \(i\in \{0,1,\ldots n+1\}\). \(\square \)
Example 1
In Fig. 2, we show the distance between A and the naïve approximator, bestEuclidean approximator, and the theoretical upper bound given in Proposition 2, expressed as functions of n. We see that the bestEuclidean one has the fastest convergence rate. It is worth noting that the situation illustrated in Fig. 2 is not unique but it shows a typical behavior observed while studying many numerical examples. \(\boxdot \)
Corollary 1
Proof
The proof is immediate by applying Proposition 1 and noting that \(\left\ {\varvec{\alpha }}_{n}\right\ =1/(n+1)\) for any \(n\in {\mathbb {N}},n\ge 1\). \(\square \)
Thus, we may conclude that in case of the fuzzy number approximation using equidistant knots the convergence rate is at most linear.
5.3 Convergence w.r.t. some important characteristics
Another important consequence of Theorem 4 is the convergence with respect to some important characteristics of a fuzzy number such as its value, ambiguity, expected interval or expected value. Let us recall briefly their definitions.
Theorem 5
Proof
6 Computer implementation and applications
In this section, we propose an algorithm to compute the nearest piecewise linear nknot approximation. The reasonings are inspired by the particular case studied in Coroianu et al. (2013). Later on, we will show that bestEuclidean piecewise linear approximations are a better alternative than the classical naïve approximation in the implementation of fuzzy arithmetic on a computer.
6.1 Algorithm

\(w^{\prime }_0 = 0\),
 For \(i=1,\dots ,n+1\) do: \(w_{i} := \int \nolimits _{\alpha _{i1}}^{\alpha _{i}} A_L(\beta )\,d\beta \),$$\begin{aligned} w_{i}^{\prime }:= \frac{\int \nolimits _{\alpha _{i1}}^{\alpha _{i}} \beta A_L(\beta )\,d\beta  \alpha _{i1}\,w_{i}}{\alpha _{i}\alpha _{i1}}, \end{aligned}$$

\(w_{n+2}=w^{\prime }_{n+2}=0\),
 For \(i=n+3,\dots ,2n+3\) do: \(w_{i} := \int \nolimits _{\alpha _{2ni+3}}^{\alpha _{2ni+4}} A_U(\beta )\,d\beta \),$$\begin{aligned} w_{i}^{\prime }:= \frac{\alpha _{2ni+4}\,w_{i} \int \nolimits _{\alpha _{2ni+3}}^{\alpha _{2ni+4}} \beta A_U(\beta )\,d\beta }{\alpha _{2ni+4}\alpha _{2ni+3}}. \end{aligned}$$
Moreover, if \(A\ge 0\) (i.e., if \(\inf \mathrm {supp}\,A\ge 0\)), then \(w_i\ge w_i^{\prime }\) and it follows \(b_1\ge b_2\ge \dots \ge b_{2n+4}\ge 0\). Note that \({\mathbf {b}}\) contains the whole information about A needed to solve our approximation problem. Moreover, it may be seen that for \(n=1\) the above derivations for \(\Phi \) and \({\mathbf {b}}\) are equivalent to those presented in our previous paper (Coroianu et al. 2013), and for \(n=0\) with those obtained by Ban (2009a).
Please note that if the solution to the system of \(2n+4\) linear equations \( \Phi \,{\breve{{\varvec{\delta }}}}{}^T={\mathbf {b}}^T\) is such that \(\breve{ \delta }_2,\dots ,\breve{\delta }_{2n+4}\ge 0\), then the problem of determining the nearest piecewise linear approximation is immediate: we have \( {\varvec{\delta }}^*=\breve{{\varvec{\delta }}}\).
Example 2
However, if \(\breve{\delta }_{i}<0\) for some \(i>1\), then we have to find the index set \(K^{*}\subseteq \{2,\dots ,2n+4\}\) corresponding to the optimal solution. Intuitively, this set indicates between which knots (left or right) \(\alpha \)cut bounds are constant functions. Generally, there are \( 2^{2n+3}\) possible selections of the index sets and we know that at least one of them (as situation with \(\delta _{k}^{*}=z_{k}^{*}=0\) is possible) leads to the solution fulfilling conditions from Theorem 2). Thus, although theoretically correct, in practice we cannot look for each possible K and check whether it gives the desired result. Below we postulate an algorithm that finds the solution in up to \(2n+4\) steps.
First, please note that if \(\mathrm {S}_d({\varvec{\alpha }},\breve{ {\varvec{\delta }}})\not \in {\mathbb {F}}^{\pi _n({\varvec{\alpha }})}({\mathbb {R}})\) then, by definition, we have \(\langle A, {\mathbf {e}}_i\rangle = \langle \mathrm {S}_d({\varvec{\alpha }},\breve{{\varvec{\delta }}}), {\mathbf {e}}_i\rangle = b_i\) for all i. Thus, finding the best linear approximation of A is the same as approximating the object \(\mathrm {S}_d({\varvec{\alpha }} ,\breve{{\varvec{\delta }}})\) (corresponding to a pair of two square integrable piecewise linear functions).
Please note that it may be tempting to assume that as \(n\rightarrow \infty \), then for all \({\varvec{\alpha }}_i\in {\mathfrak {A}}_i\) such that \({\varvec{\alpha }}_i\subset {\varvec{\alpha }}_{i+1}\) we necessarily approach the solution with \(z^*_{j,n}=0\) for all j. This is, unfortunately, not true, as a counterexample may easily be constructed (see Example 3).
The algorithm that finds the solution to the approximation problem of our interest is of “greedy” type. It relies on adding in each step to a temporary K set such index \(i>1\) at which an intermediate solution \(x_i\) has the smallest negative value.
 1.
Calculate \(\Phi \) and \({\mathbf {b}}\) (according to \(A_L\), \(A_U\), n, and \({\varvec{\alpha }}\));
 2.
\(K^{(1)}:=\emptyset \);
 3.for\(i=1,2,\dots \):
 3.1.
Solve \(\Phi \,{\mathbf {x}}^T={\mathbf {b}}^T\) for \({\mathbf {x}}\);
 3.2.
\(m^{(i)} := \min \{ \arg \min _{i=2,3,\dots ,2n+4}\{ x_i \} \}\);
 3.3.if\((x_{m^{(i)}} \ge 0)\):
 3.3.1.
\({\varvec{\delta }}^* := (x_1, x_2\,{\mathbf {1}}_{2\not \in K^{(i)}}, \dots , x_{2n+4}\,{\mathbf {1}}_{2n+4\not \in K^{(i)}})\);
 3.3.2.
return\(\mathrm {S}_d({\varvec{\alpha }}, \varvec{ \delta }^*)\) as result and stop;
 3.3.1.
 3.4.
\(\phi _{i,m}:=0\) for \(i\ne m\);
 3.5.
\(\phi _{m,m}:=1\);
 3.6.
\(K^{(i+1)} := K^{(i)}\cup \{m^{(i)}\}\);
\(\boxdot \)
 3.1.
Example 3
Consider a fuzzy number A with support [1, 3], core \(\{2\}\), and \(\alpha \)cuts given by \({A}_\alpha = [1+{\alpha }^{0.2}, 3\alpha ^{0.2}]\).
Please, note that adding more knots between 0.75 and 0.9 does not change the resulting piecewise linear fuzzy number (in the sense of \(=\)). \(\boxdot \)
Remark 3
One can easily observe that the finding of the piecewise linear nknot approximation of a fuzzy number using Theorem 2 directly may be represented as an instance of the Boolean satisfiability problem (SAT) which in general is NPhard. The proposed heuristic algorithm drastically simplifies the process. Note that if it converges, the obtained solution is guaranteed to be optimal. Whether it always converges is still an open question. However, extensive simulation studies indicate that this is indeed the case.
Also note that from the computer processing perspective, calculating \({\mathbf {b}}\) is the most sensitive part of the procedure in terms of numeric error, due to the fact that \(w_i\) and \(w_i^{\prime }\) have to be obtained by some numerical quadratures, like the adaptive routine integrate() in the R language. This requires the alphacut bounds to be wellbehaving functions. Interestingly, the trapezoidal rule of integration (the NewtonCotes formula of degree 1, without subdivisions) will lead us to the naïve piecewise linear approximator (not optimal in general), in which we just probe the alphacut bounds at points in \({\varvec{\alpha }}\).
6.2 Computing on piecewise linear FNs
Suppose we have a set of fuzzy numbers \(\{A_1,\ldots ,A_k\}\) and we would like to compute a series of operations on them, obtaining \( B=f(A_1,\ldots ,A_k)\). Let each operation be defined using the extension principle and rely on a proper transformations of their \(\alpha \) cuts.
Most often such a task is performed numerically and not symbolically. Thus, the side functions of the fuzzy numbers must be discretized at a fixed, possibly large number of \(\alpha \)cuts (see, e.g., Hanss 2005). Such a process involves nothing else than taking a naïve approximation of \(A_i\) , \(i=1,\dots ,k\). Here, the values of membership functions at given \(\alpha \) cuts (e.g., equidistant ones) are exact (of course, up to numeric error involved in calculating the operations). Of course, the larger the number of knots, the lower the computation speed but higher the accuracy.
In practice, we are interested in finding a tradeoff between these two factors. An important question is whether, for fixed n and \({\varvec{\alpha }}\in {\mathfrak {A}}_n\), by considering the nearestEuclidean approximation we will obtain results of higher quality than in case of a naïve approximation.
a) Experiment setup:

Comparing d(B, N) and \(d(B, \Pi )\) where d denotes the Euclidean metric, i.e., determining whether it is better to use the nearestEuclidean or the naïve approximation,

Calculating \(d(B, \Pi \text {post})\) and \(d(\Pi , \Pi \text {post})\), to determine a possible “error” which might appear if we perform computations directly on approximated fuzzy numbers.

FNs with sides being power functions, i.e., \(\alpha \mapsto \alpha ^p\), where p is uniformly distributed on the interval (0, 10), i.e., \(p\sim U(0,10)\);

FNs with sides defined via quantile functions of a beta distribution, \( \alpha \mapsto \mathtt {qbeta}(\alpha , p, q)\), \(p,q\sim U(0.1,4)\).
b) Distance between exact results and the results computed on approximated fuzzy numbers:
Basic summary statistics of the error measure between the solution to \(f(A_1,\dots ,A_9)=(A_1+A_2)A_3A_4(A_5A_6)\log (A_7)+\exp (A_8)/2^{A_9}\) and one obtained by the two studied approximators for different n (0 – trapezoidal, 1, 3, and 10)
Min  Q1  Med  Mean  Q3  Max  

\(d(B, \Pi ^0)\)  96  207  308  439  618  1129 
\(d(B, \Pi ^1)\)  74  141  224  261  366  564 
\(d(B, \Pi ^3)\)  48  91  138  150  192  283 
\(d(B, \Pi ^{10})\)  27  38  73  80  109  179 
\(d(B, N^{0})\)  443  838  1184  1393  1755  2690 
\(d(B, N^{1})\)  297  529  883  862  1081  1606 
\(d(B, N^{3})\)  146  296  407  459  615  949 
\(d(B, N^{10})\)  60  88  167  181  246  409 
Basic characteristics of the empirical distribution of \(F_1=d_M(\mathrm {supp}\,B,\mathrm {supp}\,\Pi )\), \(F_2=d_M(\mathrm {supp}\,B,\mathrm {supp}\,\Pi \text {post})\), \(F_3=d_M(\mathrm {core}\,B,\mathrm {core}\,\Pi )\) and \(F_4=d_M(\mathrm {core} \,B,\mathrm {core}\,\Pi \text {post})\)
Min  Q1  Med  Mean  Q3  Max  

\(F_1\)  30  960  1674  2095  2865  10296 
\(F_2\)  28  959  1677  2094  2864  10202 
\(F_3\)  2  151  347  560  716  5098 
\(F_4\)  1  152  349  557  719  4995 
c) Preservation of fuzzy numbers’ characteristics:
We might be also interested whether the nearestEuclidean approximation preserves better some important characteristics of the concerned fuzzy numbers. Of course, the support and core of B and N are the same. To measure the error for \(\Pi \) and \(\Pi \text {post}\), we will use the Moore’s interval metric Moore (1962), given by \(d_M([a,b],[c,d])=\max \{ac,bd\}\).
7 Conclusions
The problem of fuzzy number approximation by the piecewise linear fuzzy numbers introduced in BáezSánchez et al. (2012) was considered. In this paper, the nearest piecewise linear approximation with respect to the Euclidean metric was concerned. The properties of the approximator, including the asymptotic ones, were investigated. The practical implementation of the approximation algorithm is available in the FuzzyNumbers package for R by Gagolewski (2015) .
The results on convergence indicate some advantages of the piecewise approximation. Let us recall that the general idea is not only to approximate an arbitrary fuzzy number by another fuzzy number with a simpler representation, but to find such an approximation which also possesses some interesting properties. For example, in the papers Ban (2008), Coroianu (2011), Grzegorzewski and Mrówka (2005, 2007), Yeh (2008a), the trapezoidal approximation preserving the expected interval is studied. Although this type of approximation is important in some applications, the expected interval invariance may imply that other important characteristics, such as the value or ambiguity, are not generally preserved there (see, e.g., Ban 2008). Additionally, in some cases as a result of the trapezoidal approximation we obtain a degenerated triangular fuzzy number such that the output support and core is relatively far from the input support and core, respectively. Similarly, the trapezoidal approximation preserving the ambiguity (see Ban and Coroianu 2012), trapezoidal approximation preserving the ambiguity and value (see Ban et al. 2011a) or the trapezoidal approximation preserving the core (see Abbasbandy and Hajjari 2009b), entails the loss of invariance of some other important characteristics of fuzzy numbers.

In the case of the bestEuclidean approximator, we have a guarantee that the solution is the closest possible in terms of the \(L_2\) metric, while there is no such a guarantee in the naïve case.

The bestEuclidean approximator has faster rate of convergence than the naïve one. Convergence rate is determined w.r.t. \(L_2\) metric, thus it is obvious that the suggested approximator will be better in this case.

One can easily observe that the finding of the piecewise linear nknot approximation of a fuzzy number using Theorem 2 directly may be represented as an instance of the Boolean satisfiability problem (SAT) which in general is NPhard. The proposed heuristic algorithm drastically simplifies the process. Note that if it converges, the obtained solution is guaranteed to be optimal. Whether it always converges is still an open question. However, extensive simulation studies indicate that this is indeed the case.

The algorithm proposed in Sect. 6 makes the computations as easy as in the naïve case (from the practitioner’s perspective). However, practical computation on the bestEuclidean approximations are more exact (see simulation study), especially if the series of arithmetic operations are involved, while the naïve approximators lead to a great error propagation.
Next important problem is a comparison between different methods that one can apply to approximate fuzzy numbers. In particular, it would be interesting to compare our general piecewise linear approximation and the approximation of fuzzy numbers by using the Ftransform (see Coroianu and Stefanini 2016; Stefanini and Sorini 2012) or with approximation by the Bernstein operators of maxproduct kind (see Coroianu et al. 2014b). Here we can discuss many issues as, for instance, which method is easier to implement on the computer. Then, of course, we could compare their convergence rates (with respect to different kind of metrics such as the Chebyshev or the Euclidean), and their errors in approximating the important characteristics.
Finally, as it was mentioned above, the convergence of the algorithm proposed in Sect. 6 is still an open question.
Notes
Acknowledgements
The contribution of Lucian Coroianu and Marek Gagolewski was cofounded by the European Union under the European Social Found. Project POKL “Information technologies: Research and their interdisciplinary applications”, Agreement UDAPOKL.04.01.0100051/1000. The contribution of Lucian Coroianu was also supported by a grant of Ministry of Research and Innovation, CNCSUEFISCDI, project number PNIIIP11.1PD20161416, within PNCDI III.
Compliance with ethical standards
Conflict of interest
The authors declare that there is no conflict of interests regarding the publication of this paper.
Ethical approval
This article does not contain any studies with human participants or animals performed by any of the authors.
References
 Abbasbandy S, Amirfakhrian M (2006) The nearest trapezoidal form of a generalized left right fuzzy number. J Approx Reason 43:166–178MathSciNetCrossRefzbMATHGoogle Scholar
 Abbasbandy S, Asady B (2004) The nearest trapezoidal fuzzy number to a fuzzy quantity. Appl Math Comput 156:381–386MathSciNetzbMATHGoogle Scholar
 Abbasbandy S, Hajjari T (2009a) A new approach for ranking of trapezoidal fuzzy numbers. Comput Math Appl 57:413–419MathSciNetCrossRefzbMATHGoogle Scholar
 Abbasbandy S, Hajjari T (2009b) Weighted trapezoidal approximationpreserving cores of a fuzzy number. Comput Math Appl 59:3066–3077MathSciNetCrossRefzbMATHGoogle Scholar
 Abbasbandy S, Ahmady E, Ahmady N (2010) Triangular approximations of fuzzy numbers using \(\alpha \)weighted valuations. Soft Comput 14:71–79CrossRefzbMATHGoogle Scholar
 BáezSánchez AD, Moretti AC, RojasMedar MA (2012) On polyghonal fuzzy sets and numbers. Fuzzy Sets Syst 209:54–65CrossRefzbMATHGoogle Scholar
 Ban AI (2008) Approximation of fuzzy numbers by trapezoidal fuzzy numbers preserving the expected interval. Fuzzy Sets Syst 159:1327–1344MathSciNetCrossRefzbMATHGoogle Scholar
 Ban AI (2009a) On the nearest parametric approximation of a fuzzy numberrevisited. Fuzzy Sets Syst 160:3027–3047MathSciNetCrossRefzbMATHGoogle Scholar
 Ban AI (2009b) Trapezoidal and triangular approximations of fuzzy numbersinadvertences and corrections. Fuzzy Sets Syst 160:3048–3058CrossRefzbMATHGoogle Scholar
 Ban AI (2011) Remarks and corrections to the triangular approximations of fuzzy numbers using \(\alpha \)weighted valuations. Soft Comput 15:351–361CrossRefzbMATHGoogle Scholar
 Ban AI, Ban O (2012) Optimization and extensions of a fuzzy multicriteria decision making method and applications to selection of touristic destinations. Expert Syst Appl 39:7216–7225CrossRefGoogle Scholar
 Ban AI, Coroianu L (2011) Discontinuity of the trapezoidal fuzzy numbervalued operators preserving core. Comput Math Appl 62:3103–3110MathSciNetCrossRefzbMATHGoogle Scholar
 Ban AI, Coroianu L (2012) Nearest interval, triangular and trapezoidal approximation of a fuzzy number preserving ambiguity. Int J Approx Reason 53:805–836MathSciNetCrossRefzbMATHGoogle Scholar
 Ban AI, Coroianu L (2014) Existence, uniqueness and continuity of trapezoidal approximations of fuzzy numbers under a general condition. Fuzzy Sets Syst 257:3–22MathSciNetCrossRefzbMATHGoogle Scholar
 Ban AI, Coroianu L (2015a) Existence, uniqueness, calculus and properties of triangular approximations of fuzzy numbers under a general condition. Int J Approx Reason 62:1–26MathSciNetCrossRefzbMATHGoogle Scholar
 Ban AI, Coroianu L (2015b) Simplifying the search for effective ranking of fuzzy numbers. IEEE Trans Fuzzy Syst 23:327–339CrossRefGoogle Scholar
 Ban AI, Coroianu L (2016) Symmetric triangular approximations of fuzzy numbers under a general condition and properties. Soft Comput 20:1249–1261CrossRefzbMATHGoogle Scholar
 Ban AI, Brândaş A, Coroianu L, Negruţiu C, Nica O (2011a) Approximations of fuzzy numbers by trapezoidal fuzzy numbers preserving the value and ambiguity. Comput Math Appl 61:1379–1401MathSciNetCrossRefzbMATHGoogle Scholar
 Ban AI, Coroianu L, Grzegorzewski P (2011b) Trapezoidal approximation and aggregation. Fuzzy Sets Syst 177:45–59MathSciNetCrossRefzbMATHGoogle Scholar
 Ban AI, Coroianu L, Grzegorzewski P (2015) Fuzzy numbers: approximations, ranking and applications. Institute of Computer Science, Polish Academy of Sciences, WarsawGoogle Scholar
 Ban AI, Coroianu L, Khastan A (2016) Trapezoidal approximation and aggregation. Fuzzy Sets Syst 283:56–82CrossRefGoogle Scholar
 Bodjanova S (2005) Median value and median interval of a fuzzy number. Inf Sci 172:73–89MathSciNetCrossRefzbMATHGoogle Scholar
 Carlsson C, Fullér R (2011) Possibility for decision. Springer, BerlinCrossRefzbMATHGoogle Scholar
 Chanas S (2001) On the interval approximation of a fuzzy number. Fuzzy Sets Syst 122:353–356MathSciNetCrossRefzbMATHGoogle Scholar
 Coroianu L (2011) Best lipschitz constant of the trapezoidal approximation operator preserving the expected interval. Fuzzy Sets Syst 165:81–97MathSciNetCrossRefzbMATHGoogle Scholar
 Coroianu L (2012) Lipschitz functions and fuzzy number approximations. Fuzzy Sets Syst 200:116–135MathSciNetCrossRefzbMATHGoogle Scholar
 Coroianu L, Stefanini L (2016) General approximation of fuzzy numbers by ftransform. Fuzzy Sets Syst 288:46–74MathSciNetCrossRefzbMATHGoogle Scholar
 Coroianu L, Gagolewski M, Grzegorzewski P (2013) Nearest piecewise linear approximation of fuzzy numbers. Fuzzy Sets Syst 233:26–51MathSciNetCrossRefzbMATHGoogle Scholar
 Coroianu L, Gagolewski M, Grzegorzewski P, Firozja MA, Houlari T (2014a) Piecewise linear approximation of fuzzy numbers preserving the support and core. In: Laurent A, et al (eds) Proceedings of the 15th international conference IPMU 2014. CCIS, Springer, vol 443, pp 244–253Google Scholar
 Coroianu L, Gal SG, Bede B (2014b) Approximation of fuzzy numbers by bernstein operators of maxproduct kind. Fuzzy Sets Syst 257:41–66CrossRefzbMATHGoogle Scholar
 Delgado M, Vila MA, Voxman W (1988) On a canonical representation of a fuzzy number. Fuzzy Sets Syst 93:125–135MathSciNetCrossRefzbMATHGoogle Scholar
 Diamond P, Kloeden P (1994) Metric spaces of fuzzy sets. Theory and applications. World Scientific, SingaporeCrossRefzbMATHGoogle Scholar
 Dubois D, Prade H (1987) The mean value of a fuzzy number. Fuzzy Sets Syst 24:279–300MathSciNetCrossRefzbMATHGoogle Scholar
 Facchinetti G, Ricci RG (2004) A characterization of a general class of ranking functions on triangular fuzzy numbers. Fuzzy Sets Syst 146:297–312MathSciNetCrossRefzbMATHGoogle Scholar
 Gagolewski M (2015) Fuzzynumbers package: tools to deal with fuzzy numbers in R. http://FuzzyNumbers.rexamine.com
 Grzegorzewski P (1998) Metrics and orders in space of fuzzy numbers. Fuzzy Sets Syst 97:83–94MathSciNetCrossRefzbMATHGoogle Scholar
 Grzegorzewski P (2002) Nearest interval approximation of a fuzzy number. Fuzzy Sets Syst 130:321–330MathSciNetCrossRefzbMATHGoogle Scholar
 Grzegorzewski P (2008a) New algorithms for trapezoidal approximations of fuzzy numbers preserving the expected interval. In: Magdalena L, et al. (eds) Proceedings of the 12th international conference IPMU 2008. CCIS, Springer, vol 299, pp 117–123Google Scholar
 Grzegorzewski P (2008b) Trapezoidal approximations of fuzzy numbers preserving the expected interval—algorithms and properties. Fuzzy Sets Syst 47:1354–1364MathSciNetCrossRefzbMATHGoogle Scholar
 Grzegorzewski P (2010) Algorithms for trapezoidal approximations of fuzzy numbers preserving the expected interval. In: BouchonMeunier B et al (eds) Foundations of reasoning under uncertainty. Springer, Berlin, pp 85–98CrossRefGoogle Scholar
 Grzegorzewski P (2012) On the interval approximation of fuzzy numbers. In: Greco S, et al (eds) Proceedings of the 14th international conference IPMU 2012. CCIS, Springer, vol 299, pp 58–68Google Scholar
 Grzegorzewski P (2013) Fuzzy number approximation via shadowed sets. Inf Sci 225:35–46MathSciNetCrossRefzbMATHGoogle Scholar
 Grzegorzewski P, Mrówka E (2005) Trapezoidal approximations of fuzzy numbers. Fuzzy Sets Syst 153:115–135MathSciNetCrossRefzbMATHGoogle Scholar
 Grzegorzewski P, Mrówka E (2007) Trapezoidal approximations of fuzzy numbersrevisited. Fuzzy Sets Syst 158:757–768CrossRefzbMATHGoogle Scholar
 Grzegorzewski P, PasternakWiniarska K (2009) Bisymmetrically weighted trapezoidal approximations of fuzzy numbers. In: Proceedings of ninth international conference on intelligent systems design and applications ISDA’09. IEEE, pp 318–323Google Scholar
 Grzegorzewski P, PasternakWiniarska K (2014) Natural trapezoidal approximations of fuzzy numbers. Fuzzy Sets Syst 250:90–109MathSciNetCrossRefzbMATHGoogle Scholar
 Hanss M (2005) Applied fuzzy arithmetic. Springer, BerlinzbMATHGoogle Scholar
 Hong DH, Hwang C (1997) A Tsum bound of LRfuzzy numbers. Fuzzy Sets Syst 91:239–252MathSciNetCrossRefzbMATHGoogle Scholar
 Kolesárová A (1995) Triangular normbased addition of linear fuzzy numbers. Tatra Mt Math Publ 6:75–82MathSciNetzbMATHGoogle Scholar
 Moore RE (1962) Interval arithmetic and automatic error analysis in digital computing. Tech Rep 25, Department of Mathematics Stanford UniversityGoogle Scholar
 Nasibov NE, Peker S (2008) On the nearest parametric approximation of a fuzzy number. Fuzzy Sets Syst 159:1365–1375MathSciNetCrossRefzbMATHGoogle Scholar
 Stefanini L, Sorini L (2012) Approximation of fuzzy numbers by ftransform. In: Greco S, et al (eds) Proceedings of the 14th international conference IPMU 2012. CCIS, Springer, vol 299, pp 69–78Google Scholar
 Yeh CT (2007) A note on trapezoidal approximations of fuzzy numbers. Fuzzy Sets Syst 158:747–754MathSciNetCrossRefzbMATHGoogle Scholar
 Yeh CT (2008a) On improving trapezoidal and triangular approximations of fuzzy numbers. J Approx Reason 48:297–313MathSciNetCrossRefzbMATHGoogle Scholar
 Yeh CT (2008b) Trapezoidal and triangular approximations preserving the expected interval. Fuzzy Sets Syst 159:1345–1353MathSciNetCrossRefzbMATHGoogle Scholar
 Yeh CT (2009) Weighted trapezoidal and triangular approximations of fuzzy numbers. Fuzzy Sets Syst 160:3059–3079MathSciNetCrossRefzbMATHGoogle Scholar
 Yeh CT (2011) Weighted semitrapezoidal approximations of fuzzy numbers. Fuzzy Sets Syst 165:61–80MathSciNetCrossRefzbMATHGoogle Scholar
 Yeh CT (2017) Note on symmetric triangular approximations of fuzzy numbers under a general condition and properties. Soft Comput 11:27–47Google Scholar
 Yeh CT, Chu HM (2011) Approximations by LRfuzzy numbers. Fuzzy Sets Syst 257:23–40MathSciNetCrossRefzbMATHGoogle Scholar
Copyright information
OpenAccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.