Building a convex function from a convex set

191 Views Asked by At

Let function $f:\mathbb{R}^n\rightarrow \mathbb{R}$ then we have a definition of epigraph

$$epif:= \{(x,\alpha)\in\mathbb{R}^n\times\mathbb{R}\;|\;f(x)\leq \alpha\}$$

With above definition we have a theorem $$f \text{ is convex function iff } epif \text{ is convex set}$$

This theorem helps us build a set from the function f such that the convexity of the set leads to the convexity of $f$, and vice versa. Is it possible to build a function $f$ from a given set to obtain the above property? I specify my question as follows

Problem: Let $C\subset \mathbb{R}^n$ is nonempty set. Find a function $f_C$ such that $C$ is convex iff $f_C$ is convex.

What's I try: I've tried with the distance function $f_C(x) = \inf_{c\in C}||x-c||$. It is proven that if $C$ is nonempty convex set then $f_C$ is convex. You can read the proof in Proposition 4.4 through this link: https://maunamn.wordpress.com/4-distance-function/. The real problem is that I can't prove the converse of the theorem. If $f_C$ defined above is convex function then with every $x,y\in C$ and $\lambda\in[0;1]$, we have $$f_C(\lambda x + (1-\lambda)y)\leq \lambda f(x) + (1-\lambda)f(y)$$

Because $f_C$ is a distance function to $C$, we conclude that $f_C(x) = f_C(y) = 0$. This leads to $f_C(\lambda x + (1-\lambda)y) = 0$ or $\lambda x + (1-\lambda)y \in \overline{C}$. However, to prove that $C$ is convex set, I need to indicate that $\lambda x + (1-\lambda)y\in C$. And this can only be completed if we have C is a closed set.

2

There are 2 best solutions below

2
On BEST ANSWER

On $\Bbb R^n,$ define $f_C:=(+∞)(1-{\bf 1}_C).$

(${\bf 1}_C$ is the characteristic function of $C.$ And here by convention $(+∞)0=0,$ i.e. $(+∞)(1-{\bf 1}_C(x))=0$ if $x∈C,$ and $+∞$ else.)

5
On

This answer is wrong.

$C \subset \mathbb R^n$.

Define $f: \mathbb R^{n-1} \to \mathbb R$, such that if

$(x_1,\cdots,x_n) \in C$ then $f(x_1,\cdots, x_{n-1})=x_n$,

otherwise $f(x_1,\cdots, x_{n-1})=x_n+1$.

This way, $C=\text{epi} (f)$ and by the theorem you mentioned $f$ is convex iff $C$ is convex.

Proof for $C=\text{epi} (f)$:

$\text{epi} (f) =\{(x_1,\cdots,x_n) \in \mathbb R^{n-1}\times\mathbb R $ | $ f(x_1,\cdots,x_{n-1})\le x_n\}$

If $(x_1,\cdots,x_n) \in C$, then $f((x_1,\cdots,x_{n-1}))=x_n \implies (x_1,\cdots,x_n) \in \text{epi} (f)$

$\implies C \subseteq \text{epi} (f)$.

Now if $(x_1,\cdots,x_n) \in \text{epi} (f)$ then $f((x_1,\cdots,x_{n-1})) \le x_n$.

But $f((x_1,\cdots,x_{n-1}))$ given $(x_1,\cdots,x_n)$ can only be $x_n$ or $x_n+1$, only the former being possible here. But that implies $(x_1,\cdots,x_n) \in C$ by definition of $f$.

$\implies \text{epi}(f) \subseteq C \implies C=\text{epi}(f)$.

The error lies in the assumption that $f$ is a function. For example, say $(0,0,\cdots,1) \in C$ but $(0,0,\cdots,2) \notin C$. Then is $f(0,0,\cdots,0)=1$ or $3$?