# Midconvexity for finite sets

- Jacek Tabor
^{1}, - Józef Tabor
^{2}and - Krzysztof Misztal
^{1}Email author

**2013**:42

https://doi.org/10.1186/1029-242X-2013-42

© Tabor et al.; licensee Springer 2013

**Received: **19 June 2012

**Accepted: **10 December 2012

**Published: **11 February 2013

## Abstract

Let *X* be a finite subset of a real vector space. We study Jensen-type convexity on subsets of *X*. In particular for subsets of *X*, we introduce the definition of *X*-midconvex sets. We show that such a notion corresponds well to the classical notion of a convex set. Moreover, we prove that a function *X*-midconvex set is a midconvex hull of all its extremal points. Other analogues of some classical results are also given. At the end we present an algorithmic approach to finding the midconvex hull of a given set.

**MSC:**26A51, 26B25.

### Keywords

midconvex set midconvex function midconvex hull## 1 Introduction

Thanks to the growing role of computers, one can recently notice an increasing interest in discrete (finite) sets in many parts of mathematics. In particular, one has to mention the recent development of convexity on subsets of ${\mathbb{Z}}^{N}$[1].

Therefore, there appears a natural need to introduce and develop (mid-)convexity on finite sets. Since we are going to study finite subsets of a real vector space, we may restrict ourselves to finite subsets of ${\mathbb{R}}^{N}$. Since the middle point of an interval is one of the most important geometrical notions, we start our investigations with the simplest and earliest version of convexity-midconvexity.

The main difference between our approach and that of [1–3] is that we restrict our considerations to *X*, that is, we treat *X* as a space. Hence, our notions have relative character since we study convexity on the subsets of *X*. One can say that we investigate midconvexity on a restricted domain.

Now, we briefly describe the contents of the paper. First of all, we propose a proper definition of a midconvex set for finite sets. By ‘proper’ we mean here that we are looking for the notion which has possibly many properties analogous to those of convex sets in ${\mathbb{R}}^{N}$. We consider two different definitions of midconvexity. The first one, which is intuitively very similar to the classical definition, occurs to have weak properties. The other one, which we call function midconvexity, at a first glance seems a little bit artificial, but it corresponds well to the classical definition. It is based on the observation that in ${\mathbb{R}}^{N}$ a closed set *V* is convex if and only if it is the preimage of the set $(-\mathrm{\infty},0]$ for some convex function $f:{\mathbb{R}}^{N}\to \mathbb{R}$.

Next, we study the properties of function midconvexity. In particular in Section 3, we prove an analogue of the theorem stating that a compact convex set in ${\mathbb{R}}^{N}$ is the convex hull of its extremal points. We introduce also the notion of a convex function on a finite domain. We prove that the maximum of such a convex function is achieved at an extreme point of its domain.

## 2 Midconvexity on finite sets

In the whole paper, we assume that *X* is a finite subset of ${\mathbb{R}}^{N}$. By ${\mathbb{N}}_{0}$ we denote the set of nonnegative integers and by ${\mathbb{R}}_{+}$ the set of nonnegative real numbers. We adapt the classical definitions of a midconvex set and a midconvex function to our setting [4].

**Definition 2.1**We say that $W\subset X$ is

*X*-

*midconvex*if

Evidently, *X* and a singleton are *X*-midconvex sets. It is also obvious that the intersection of *X*-midconvex sets is *X*-midconvex.

**Definition 2.2**We say that a function $f:W\to \mathbb{R}$, where $W\subset X$, is

*X-midconvex*(shortly

*midconvex*) if

*W*is

*X*-midconvex and

We will need some of their properties with respect to the following definition of a midconvex set.

**Proposition 2.3** *Let*$W\subset X$*be an* *X*-*midconvex set*, *let*$c>0$*and let*$f:W\to \mathbb{R}$, $g:W\to \mathbb{R}$*be* *X*-*midconvex functions*. *Then*$max(f,g)$*and* *cf* *are* *X*-*midconvex functions*.

*Proof*It is obvious that

*cf*is

*X*-midconvex. We show that $max(f,g)$ is

*X*-midconvex. Consider arbitrary $u,v\in W$ such that $\frac{u+v}{2}\in W$. Then we have

□

*X*-midconvexity, we need the notion of a discrete interval (for $m\in {\mathbb{N}}_{0}$):

One could expect that if *W* is *X*-midconvex and $a,b\in W$ are such that ${[a,b]}_{m}\subset X$, then ${[a,b]}_{m}\subset W$. It occurs that this is not the case.

**Example 2.4** Let $N=1$, $X=\{0,1,2,3\}$ and $W=\{0,3\}$. Then *W* is *X*-midconvex and $0,3\in W$, but ${[0,3]}_{3}=X\not\subset W$.

Therefore, we need another definition of a midconvex set.

Let us present the idea which, in our opinion, leads to the ‘right’ definition. The observation that a closed set $A\subset {\mathbb{R}}^{N}$ is convex if and only if there exists a convex function $f:{\mathbb{R}}^{N}\to \mathbb{R}$ such that $A=\{x\in {\mathbb{R}}^{N}:f(x)\le 0\}$ (the part ‘if’ of the statement is obvious; for the converse, take as *f* the distance from *A*) leads us to the following definition.

**Definition 2.5**We say that $W\subset X$ is

*function*

*X-midconvex*(shortly

*X*-fmidconvex) if there exists an

*X*-midconvex function $f:X\to \mathbb{R}$ such that

Clearly, $f:X\to \mathbb{R}$, $f\equiv 0$ is *X*-midconvex. Hence, *X* is *X*-fmidconvex.

**Observation 2.6** *Every* *X*-*fmidconvex set is* *X*-*midconvex*.

*Proof*Let

*W*be

*X*-fmidconvex. Then $W:=\{x\in X:f(x)\le 0\}$ for a certain

*X*-midconvex function $f:X\to \mathbb{R}$. Consider arbitrary ${x}_{1},{x}_{2}\in W$ such that $\frac{{x}_{1}+{x}_{2}}{2}\in X$. Then we have

Hence $\frac{{x}_{1}+{x}_{2}}{2}\in W$. □

As one could expect, the implication converse to Observation 2.6 does not hold. To notice this (see Example 2.8), we will need the following result, which shows that fmidconvexity resembles classical convexity.

**Theorem 2.7**

*Let*

*W*

*be*

*X*-

*fmidconvex*.

*Then*

*Proof* The proof follows a similar approach from [5].

*W*is

*X*-fmidconvex, there exists a midconvex function $f:X\to \mathbb{R}$ such that $W=\{x\in X:f(x)\le 0\}$. Suppose, for the proof by contradiction, that there exist $a,b\in W$, $m\in \mathbb{N}$, such that ${[a,b]}_{m}\subset X$ but ${[a,b]}_{m}\not\subset W$. It means that there exists a $k\in \{0,\dots ,m\}$ such that

*i.e.*, that $f({x}_{k})>0$. Then

- 1.$l\le \frac{m}{2}$. Then ${x}_{2l}\in {[a,b]}_{m}$, and we obtain that$\begin{array}{rcl}C& =& f({x}_{l})=f(\frac{l}{m}a+(1-\frac{l}{m})b)=f\left(\frac{\frac{2l}{m}a+(1-\frac{2l}{m})b+b}{2}\right)\\ \le & \frac{f(\frac{2l}{m}a+(1-\frac{2l}{m})b)+f(b)}{2}=\frac{f(\frac{2l}{m}a+(1-\frac{2l}{m})b)}{2}=\frac{f({x}_{2l})}{2}.\end{array}$

- 2.
$l>\frac{m}{2}$. Then ${x}_{2l-m}\in {[a,b]}_{m}$, and by reasoning analogous to case 1, we obtain a contradiction.

□

Now, we show that the implication converse to that from Observation 2.6 does not hold.

**Example 2.8** We continue considerations from Example 2.4. Let $N=1$, $m=3$, $X=\{0,1,2,3\}$, $W=\{0,3\}$. Then ${[0,3]}_{m}=X$, and hence ${[0,3]}_{3}\not\subset W$. *W* is an *X*-midconvex set which is not *X*-fmidconvex. It shows also that an analogue of Theorem 2.7 for *X*-midconvex set does not hold.

**Proposition 2.9** *Let*${W}_{2}\subset {W}_{1}\subset X$*and let*${W}_{1}$*be* *X*-*fmidconvex and*${W}_{2}$*be*${W}_{1}$-*fmidconvex*. *Then*${W}_{2}$*is* *X*-*fmidconvex*.

*Proof*There exist midconvex functions ${f}_{1}:X\to \mathbb{R}$, ${f}_{2}:{W}_{1}\to \mathbb{R}$ such that ${W}_{1}={f}_{1}^{-1}((-\mathrm{\infty},0])$ and ${W}_{2}={f}_{2}^{-1}((-\mathrm{\infty},0])$. Multiplying any of those functions by a positive real number, we do not destroy the above property. Therefore, we may assume that

Evidently, ${f}^{-1}((-\mathrm{\infty},0])={W}_{2}$. We have to prove yet that *f* is *X*-midconvex. Consider arbitrary ${x}_{1},{x}_{2}\in X$ such that $\frac{{x}_{1}+{x}_{2}}{2}\in X$. We distinguish five cases.

^{ o }. ${x}_{1},{x}_{2}\in X\setminus {W}_{1}$, $\frac{{x}_{1}+{x}_{2}}{2}\in X\setminus {W}_{1}$. Then we have

^{ o }. ${x}_{1},{x}_{2}\in X\setminus {W}_{1}$, $\frac{{x}_{1}+{x}_{2}}{2}\in {W}_{1}$. Making use of (1), we get

^{ o }. ${x}_{1},{x}_{2}\in {W}_{1}$. By Observation 2.6, ${W}_{1}$ is

*X*-midconvex and therefore $\frac{{x}_{1}+{x}_{2}}{2}\in {W}_{1}$. As a consequence, we have

^{ o }. ${x}_{1}\in X\setminus {W}_{1}$, ${x}_{2}\in {W}_{1}$, $\frac{{x}_{1}+{x}_{2}}{2}\in X\setminus {W}_{1}$. Then we have

^{ o }. ${x}_{1}\in X\setminus {W}_{1}$, ${x}_{2}\in {W}_{1}$, $\frac{{x}_{1}+{x}_{2}}{2}\in {W}_{1}$. Applying (1), we get

We have proved that *f* is *X*-midconvex. □

Now, we define an *X*-fmidconvex hull of a given set $A\subset X$. We begin with important remarks.

**Proposition 2.10** *Let*${W}_{1}$, ${W}_{2}$*be* *X*-*fmidconvex subsets of* *X*. *Then*${W}_{1}\cap {W}_{2}$*is* *X*-*fmidconvex*.

*Proof*There exist midconvex functions ${f}_{1}:X\to \mathbb{R}$, ${f}_{2}:X\to \mathbb{R}$ such that ${W}_{1}={f}_{1}^{-1}((-\mathrm{\infty},0])$ and ${W}_{2}={f}_{2}^{-1}((-\mathrm{\infty},0])$. We define the function $f:X\to {\mathbb{R}}_{+}$ as follows:

By Proposition 2.3 *f* is *X*-midconvex. Furthermore, ${f}^{-1}((-\mathrm{\infty},0])={W}_{1}\cap {W}_{2}$. This finishes the proof. □

**Proposition 2.11** *Let*${X}_{1}\subset {\mathbb{R}}^{{N}_{1}}$, ${X}_{2}\subset {\mathbb{R}}^{{N}_{2}}$*be finite sets and let*${W}_{1}\subset X$*be*${X}_{1}$-*fmidconvex and*${W}_{2}\subset {X}_{2}$*be*${X}_{2}$-*fmidconvex*. *Then*${W}_{1}\times {W}_{2}$*is*$({X}_{1}\times {X}_{2})$-*fmidconvex*.

*Proof*There exist an ${X}_{1}$-midconvex function ${f}_{1}:{X}_{1}\to \mathbb{R}$ and an ${X}_{2}$-midconvex function ${f}_{2}:{X}_{2}\to \mathbb{R}$ such that

*f*is $({X}_{1}\times {X}_{2})$-midconvex and that

*f*is $({X}_{1}\times {X}_{2})$-midconvex. Furthermore, we have

□

We are going to define now an *X*-midconvex hull and an *X*-fmidconvex hull of a given set $A\subset X$. We follow the classical definition of a midconvex hull [4].

**Definition 2.12** Let $A\subset X$.

The intersection of all *X*-midconvex sets containing *A* is called an *X-midconvex hull* of *A* and is denoted by ${mconv}_{X}(A)$.

The intersection of all *X*-fmidconvex sets containing *A* is called an *X-fmidconvex hull* of *A* and is denoted by ${fmconv}_{X}(A)$.

One can directly verify that ${mconv}_{X}(A)$ is *X*-midconvex. By Proposition 2.10, we obtain that the intersection of a finite family of *X*-fmidconvex sets is *X*-fmidconvex, and consequently, by the finiteness of *X*, we obtain that ${fmconv}_{X}(A)$ is *X*-fmidconvex. Consequently, the *X*-fmidconvex hull of *A* is the smallest *X*-fmidconvex set containing *A*.

The example below illustrates Definition 2.12 and shows that an *X*-midconvex hull and an *X*-fmidconvex hull of a given set are, in general, different.

**Example 2.13**Let $N=2$, $X=\{(-1,0),(0,0),(0,1),(0,2),(1,-1),(1,0),(1,1),(2,1)\}$ (see Figure 1). Clearly, $W:=\{(-1,0),(0,2),(1,-1),(2,1)\}$ is

*X*-midconvex. Hence, ${mconv}_{X}(W)=W$. One can show (it follows directly from the results of the next section) that ${fmconv}_{X}(W)=X$.

## 3 Extremal points

We begin with the definition of an extremal point.

**Definition 3.1**Let $W\subset {\mathbb{R}}^{N}$. A point $a\in W$ is called

*an extremal point*of

*W*if

We denote the set of all extremal points of *W* by ext*W*. As we know [6], by the Krein-Milman theorem, a compact convex set in ${\mathbb{R}}^{N}$ is the convex hull of its extremal points. However, its analogue does not hold for *X*-midconvexity-just consider $X=\{0,1,2,3\}$ which is not the *X*-midconvex hull of the set $W=\{0,3\}$ of its extremal points.

In this section, we prove a version of the classical Krein-Milman theorem for function midconvexity. We begin with the following observation.

**Observation 3.2** *If*$W\subset {\mathbb{R}}^{N}$*is nonempty and finite*, *then the*$extW\ne \mathrm{\varnothing}$.

*Proof* Take a convex hull of *W* in ${\mathbb{R}}^{N}$. It is nonempty, convex and compact (because *W* is finite). Therefore, [6] it has an extremal point. □

We will need the notion of index.

**Definition 3.3**Let $W\subset X$. We say that a sequence $({x}_{0},\dots ,{x}_{n})\subset W$ is a

*J*-chain of length

*n*in

*W*if either $n=0$ or $n\ge 1$ and

We call ${x}_{0}$ the beginning and ${x}_{n}$ the end of the *J*-chain.

Condition (2) means that ${x}_{k}$ is the middle of ${x}_{k-1}$ and a certain point in *W* (or, in another words, that the symmetric point to ${x}_{k-1}$ with respect to ${x}_{k}$ belongs to *W*).

**Proposition 3.4** *Let*$\mathrm{\varnothing}\ne W\subset X$. *Then for each*$x\in W$, *there exists a* *J*-*chain in* *W* *beginning in* ext*W* *and ending at* *x*.

*Proof* Fix arbitrarily $x\in W$ and denote by *Z* the set of points *z* of *W* such that there exists a *J*-chain in *W* beginning at *z* and ending at *x*. Obviously $x\in Z$, and hence $Z\ne \mathrm{\varnothing}$. By Observation 3.2, there exists $z\in extZ$. Let $({y}_{0},\dots ,{y}_{n})$, ${y}_{0}=z$, ${y}_{n}=x$, be the *J*-chain with beginning at *z* and end at *x*.

We show that $z\in extW$. Suppose, for an indirect proof, that $z\notin extW$. Since $z\in W$, there exist $v,w\in W$, $v\ne w$ such that $z=(v+w)/2$. Clearly, $(v,{y}_{0},\dots ,{y}_{n})$ and $(w,{y}_{0},\dots ,{y}_{n})$ are *J*-chains starting at *v* and *w*, respectively, and with end at *x*. This implies that $v,w\in Z$, which contradicts the assumption that $z\in extZ$. □

Let $W\subset X$ be nonempty. By Observation 3.2, $extW\ne \mathrm{\varnothing}$. For $x\in W$ by ${i}_{W}(x)$, we denote the length of the shortest *J*-chain in *W* beginning in ext*W* and ending at *x*. It follows from Proposition 3.4 that such a *J*-chain exists.

${i}_{W}(x)$ is called the index of *x* and ${i}_{W}$-the index of *W*.

**Remark 3.5** It follows from the proof of Proposition 3.4 that if ${i}_{W}(x)=n$, where $n\in \mathbb{N}$, then there exists an element $\overline{x}\in W$ such that ${i}_{W}(\overline{x})=n-1$. Therefore, if ${i}_{W}=n$, $n\in {\mathbb{N}}_{0}$, then for each $m\in \{0,\dots ,n\}$, we can find $x\in W$ such that ${i}_{W}(x)=m$. Hence, the set of indices of elements of *W* coincides with the set $\{0,\dots ,n\}$.

One can easily notice that ${i}_{W}(x)=0$ if and only if $x\in extW$.

We illustrate the above notations by a simple example.

**Example 3.6**Let $N=2$, $W=X=\{(-1,-1),(-1,0),(-1,1),(0,0),(1,-1),(1,0),(1,1)\}$. One can easily notice (see Figure 2) that

**Proposition 3.7**

*We assume that*$\mathrm{\varnothing}\ne W\subset X$.

*Then*

*Proof*

*W*is finite, there exists a $k\in {\mathbb{N}}_{0}$ such that ${W}_{k}={W}_{k+1}$. Let

*k*be the smallest integer with this property. Then

*p*be an extremal point of

*P*. We will prove that

*p*is an extremal point of

*W*. Suppose that it is not the case. Then there exist $q,r\in W$, $q\ne r$ such that

Since *p* is an extremal point of *P* either $q\notin P$ or $r\notin P$. Assume that $q\notin P$. Then $q\in {W}_{k}$ and since $p+(p-q)=r\in W$, we obtain that $p\in {W}_{k+1}$. Hence, ${W}_{k+1}\ne {W}_{k}$, a contradiction. Thus *p* is an extremal point of *W* and hence $p\in {W}_{0}\subset {W}_{k}$, a contradiction. We have proved that ${W}_{k}=W$. □

Now, we prove the main result of this section.

**Theorem 3.8**

*Let*$\mathrm{\varnothing}\ne W\subset X$

*be an*

*X*-

*fmidconvex set*.

*Then*

*Proof*

*J*-chain in

*W*starting in ext

*W*and ending at

*a*. Let $({a}_{0},\dots ,{a}_{n})$ be the shortest

*J*-chain with these properties. Then $n\ge 1$, $2a-{a}_{n-1}\in W$ and since ${i}_{W}({a}_{n-1})=n-1$, we have that $f({a}_{n-1})<C$. By midconvexity of

*f*, we obtain

a contradiction. □

**Theorem 3.9** *Let*$\mathrm{\varnothing}\ne W\subset X$. *If*$f:W\to \mathbb{R}$*is* *X*-*midconvex*, *then the maximum of* *f* *is achieved at an extreme point of* *W*.

*Proof*

*J*-chain $({a}_{0},\dots ,{a}_{n}=a)$ in

*W*starting in ext

*W*and ending at

*a*. Then $2a-{a}_{n-1}\in W$ and since ${i}_{W}({a}_{n-1})=n-1$, we have that $f({a}_{n-1})<C$. By midconvexity of

*f*, we obtain now

a contradiction. □

## 4 Construction of *X*-fmidconvex hull

There is a problem to find a convenient procedure to determinate an *X*-fmidconvex hull for a given set $W\subset X$. In this section, we present an algorithm for finding ${fmconv}_{X}(W)$, which can be easily implemented in high level programming languages.

We start with the following auxiliary result.

**Proposition 4.1**

*Let*$\mathrm{\varnothing}\ne W\subset X$

*and*$\overline{x}\in X$.

*The following conditions are equivalent*:

- 1.
$\overline{x}\notin {fmconv}_{X}(W)$,

- 2.
*there exists an**X*-*midconvex function*$f:X\to \mathbb{R}$*such that*$f{|}_{W}\equiv 0$*and*$f(\overline{x})=1$.

*Proof* Observe first that multiplying a midconvex function by a positive real number, we do not destroy midconvexity.

*X*-midconvex function such that $f{|}_{W}\equiv 0$ and $f(\overline{x})=1$. We put

Then $W\subset {W}_{1}$, $\overline{x}\notin {W}_{1}$ and ${W}_{1}$ is *X*-fmidconvex. By Proposition 2.10 we obtain that ${W}_{1}\cap {fmconv}_{X}(W)$ is *X*-fmidconvex. It follows from Definition 2.12 that ${fmconv}_{X}(W)\subset {W}_{1}$. Thus $\overline{x}\notin {fmconv}_{X}(W)$.

*X*-fmidconvex. Hence, there exists an

*X*-midconvex function $g:X\to \mathbb{R}$ such that

*f*is

*X*-midconvex. Furthermore, we have

and $f(\overline{x})=1$. □

*X*-fmidconvex hull are presented in Figure 3.

*X*consists of all dots,

*W*consists of big black dots, an

*X*-fmidconvex hull of

*W*is represented by big dots. Notice that $extW=W$.

Proposition 4.1 gives the way to determine ${fmconv}_{X}(A)$. Namely, by condition (2) we can eliminate from *X*, step by step, elements of the set $X\setminus {fmconv}_{X}(A)$.

Observe that $m:=cardK(X)$ is finite as $m\le {n}^{2}$.

Let us now fix $v\in X$. We want to check if there exists an *X*-midconvex function $f:X\to \mathbb{R}$ such that $f{|}_{W}\equiv 0$ and $f(v)=1$.

*f*has to fulfill the following condition:

**Proposition 4.2**

*Let*$f:X\to \mathbb{R}$,

*and let*$y:={[f({x}_{1}),\dots ,f({x}_{n})]}^{T}$.

*We put*

*where*

*and*$({y}^{i},{z}^{i})\in K(X)$, $i\in \{1,\dots ,m\}$.

*Then*

*f*

*is midconvex iff*

*where*${\mathbf{0}}_{m}$*denotes zero in*${\mathbb{R}}^{m}$ (*we will often omit the subscript* *m* *and write* **0**).

*Proof*Observe that the system of inequalities (5) is equivalent to the following one:

for all $({y}^{i},{z}^{i})\in K(X)$, $i\in \{1,\dots ,m\}$.

*i*th element of $K(X)$ (the

*i*th inequality of system (7))

where ${[{a}_{ij}]}_{j=1,\dots ,n}$ is the *i* th row of the matrix ${A}_{f}$. This finishes the proof. □

**Remark 4.3** To save time and memory in practical implementation, in Proposition 4.2 we take into account only one of the pairs $(y,z)$ and $(z,y)$, since the inequalities $f(\frac{y+z}{2})\le \frac{f(y)+f(z)}{2}$ and $f(\frac{z+y}{2})\le \frac{f(z)+f(y)}{2}$ are equivalent.

**Proposition 4.4**

*Let*$f:X\to \mathbb{R}$

*be such that*$f{|}_{W}\equiv 0$.

*Let*${A}_{f}$

*be a matrix defined in Proposition*4.2.

*We put*

*Then the following conditions are equivalent*:

- 1.
*f**is midconvex*, - 2.
${A}_{W}{y}_{W}\le \mathbf{0}$.

*Proof*Let ${A}_{f}={[{A}_{f}^{i}]}_{i=1,\dots ,n}$, where ${A}_{f}^{i}$ denotes the

*i*th column of the matrix ${A}_{f}$. Then the matrix ${A}_{f}$ can be represented as the following block matrix:

where $B:={[{A}_{f}^{i}]}_{i=n-cardW+1,\dots ,n}\in {M}_{m\times cardW}$.

*f*is midconvex iff ${A}_{f}y\le \mathbf{0}$, which is equivalent in our situation to the following inequality:

This completes the proof since $B{\mathbf{0}}_{cardW}={\mathbf{0}}_{m}$. □

We illustrate the above considerations by a simple example.

**Example 4.5**Let $N=1$, $X=\{0,1,2,3,4\}$, $W=\{0,3\}$. Then $K(X)=\{(0,2),(1,3),(2,0),(3,1)\}$. In this case, the system of linear inequalities (6) contains the following objects:

Further discussion of this example can be found in Example 4.6.

*X*-midconvex function $f:X\to \mathbb{R}$ such that $f{|}_{W}\equiv 0$ and $f(v)=1$? To answer this question we use

*linear programming*(shortly LP), which is an efficient technique for finding a solution of optimization problems: to minimize or maximize a linear objective function subject to linear equality/inequality constrains [7]. It can be expressed in a canonical form:

where *y* represents the vector of variables (to be determined). In our case $b=\mathbf{0}$. The system of inequalities $Ax\le b$ denotes the constraints which specify a convex polygon, over which the objective function is to be optimized.

We still need to ‘insert’ additional information that $f(v)=1$ (which is equivalent to $f(v)>0$, as we can divide *f* by $f(v)$). In other words, we ask if we can find a function satisfying the previously defined systems of inequalities and such that $f(v)>0$. To do this, we put $c:={[0,\dots ,\underset{i}{\underset{\u23df}{1}},\dots ,0]}^{T}$, where $i\in \{1,\dots ,n\}$ is such that $v={x}_{i}$, ${x}_{i}\in X$ (according to (4)), and find a solution to the system of inequalities defined above.

**Example 4.6**

Firstly, we check if 1 is in the *X*-fmidconvex hull of the set *W*. We put $c={[1,0,0]}^{T}$. It is easy to get the following solution: $f(1)=0$, $f(2)=0$ and $f(4)=a$, $a\in \mathbb{R}$, $a\ge 0$ (this means that $f(4)$ can be arbitrary, *e.g.*, $f(4)=0$) this solution is bounded, so $1\in {fmconv}_{X}(W)$. The same consideration shows that also $2\in {fmconv}_{X}(W)$. On the contrary, for 4 the value $f(4)$ is unbounded so $4\notin {fmconv}_{X}(W)$. Finally, we obtain that ${fmconv}_{X}(W)=\{0,1,2,3\}$.

There are many methods for solving LP (checking whether a solution exists is just as difficult as finding a solution): simplex algorithm of Dantzig [8], criss-cross algorithm [9], projective algorithm of Karmarkar [10], *etc.*

However, the method for finding an *X*-fmidconvex hull presented in this section is not sufficiently efficient in practice because for each point of investigated space *X*, we solve LP. Moreover, if we use a classical simplex method, we can perform really badly since the worst-case complexity of the simplex method has exponential time.

Sample implementation of the algorithm described in this section with nice graphical interface prepared in Java programming language is available at http://www.ii.uj.edu.pl/~misztalk.

## Declarations

### Acknowledgements

The first author was supported by National Centre of Science (Poland) Grant No. 2011/01/B/ST6/01887.

## Authors’ Affiliations

## References

- Murota K 10. In
*Discrete Convex Analysis*. SIAM, Philadelphia; 2003.View ArticleGoogle Scholar - Jarczyk W, Laczkovich M: Convexity on Abelian groups.
*J. Convex Anal.*2009, 16: 33–48.MATHMathSciNetGoogle Scholar - Van de Vel M 50. In
*Theory of Convex Structures*. North-Holland, Amsterdam; 1993.Google Scholar - Kuczma M, Gilányi A:
*An Introduction to the Theory of Functional Equations and Inequalities: Cauchy’s Equation and Jensen’s Inequality*. PWN, Warsaw; 2009.View ArticleGoogle Scholar - Tabor J, Tabor J: Generalized approximate midconvexity.
*Control Cybern.*2009, 38(3):655–669.MATHMathSciNetGoogle Scholar - Rockafellar R 28. In
*Convex Analysis*. Princeton University Press, Princeton; 1997.Google Scholar - Luenberger DG, Ye Y 36. In
*Linear and Nonlinear Programming*. Springer, Berlin; 2008.Google Scholar - Dantzig GB:
*Maximization of a Linear Function of Variables Subject to Linear Inequalities*. Wiley, New York; 1951:339–347.Google Scholar - Fukuda K, Terlaky T: Criss-cross methods: a fresh view on pivot algorithms.
*Math. Program.*1997, 79: 369–395.MATHMathSciNetGoogle Scholar - Adler I, Resende M, Veiga G, Karmarkar N: An implementation of Karmarkar’s algorithm for linear programming.
*Math. Program.*1989, 44: 297–335. 10.1007/BF01587095MATHMathSciNetView ArticleGoogle Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.