Draft:Karamardian's anomaly

In convex analysis, Karamardian's anomaly is an example of a pathological function that is strictly ray-quasiconvex but not quasiconvex. It is defined as follows for all $$x\in\mathbb{R}$$:

$$f(x)=\left \{\begin{array}{lll}1&\text{if}&x=0\\0&\text{if}&x\ne 0\end{array}\right.$$

To show that it is strictly ray-quasiconvex, the property $$f(\lambda x+(1-\lambda)y)<\max\{f(x),f(y)\}$$ must hold when $$f(x)\ne f(y)$$ and $$0<\lambda<1$$. Since $$f(x)\ne f(y)$$, at least one of $$x$$ and $$y$$ is necessarily $$0$$, and hence $$ \max\{f(x),f(y)\}=1$$.

To show that it is not quasiconvex, take $$x=-1$$, $$y=1$$ and $$\lambda=\frac{1}{2}$$. Then $$f(\lambda x+(1-\lambda) y)=f(0)=1>0=\max\{f(x),f(y)\}$$, contradicting that $$f(\lambda x+(1-\lambda)y) \le\max\{f(x),f(y)\}$$.