13

What are the functions $f:\mathbb R\to\mathbb R$ such that every point is a local maximum?

Certainly, $f(x)=c$ works for every constant. So does $\lfloor x\rfloor$, as does $I_{\{0\}}(x)=\begin{cases}1&x=0\\0&x\ne0\end{cases}$. Another example is the oddly beautiful $e^{-\lfloor1/\lvert x\rvert\rfloor^{-2}}$. Question is, are step functions such as these the only ones? Are there any examples where every point is a strict local maximum?

(Thomae's function is a near-miss, since the condition doesn't hold on irrational points. Although, most points are irrational, so I guess the term "near-miss" doesn't quite fit.)

EDIT: My definition of step-function is the sum of countably many indicator functions of intervals, $\sum_{n=0}^\infty a_nI_{A_n}(x)$. If it were uncountable, any function would be step, as $\{\alpha\}$ is an interval ($[\alpha,\alpha]$).

This arose when I was thinking about the topological space with basis $\{(-\infty,a]:a\in\mathbb R\}$. If you call that space $X$, then the continuous functions $f:\mathbb R\to X$ are precisely these. I don't have a formal proof but I'm pretty sure (and this would belong in a different question anyway).

Contrast with: Is $f$ constant if every point is local maximum or local minimum of $f$?

  • This shows that strict maxima at each point are impossible. – Stefan Mesken Aug 18 '15 at 22:48
  • @Stefan Thank you! That doesn't quite give a complete characterization, but it does answer a lot of the questions. (I just realized that the indicator function of the Cantor set technically isn't a step function, but it works. This feels like a technicality, though.) – Akiva Weinberger Aug 18 '15 at 23:10
  • If you have a specific definition of "step function" in mind, could you include it in your question? There are some interesting, Devil's Staircase-like functions that have every point as a local max, which you may or may not have already thought of. – MartianInvader Aug 18 '15 at 23:15
  • @MartianInvader Done – Akiva Weinberger Aug 18 '15 at 23:33
  • I don't have a complete characterization, but I don't think that step functions are the only functions that work. Unless I am thinking incorrectly, the indicator function of any closed set $S$ will work. If $x \in S^c$, then $f(x)$ is a local maximum since $f = 0$ in a neighborhood including $x$. Otherwise, $f(x)$ is a local maximum since $f(x) = 1$ and $f$ never exceeds this value. –  Aug 19 '15 at 00:26
  • @Bungo What if I defined a near-step function to be $\sum_{n=0}^\infty a_nI_{A_n}(x)$, where $A_n$ is closed (unless $a_n$ is negative in which case it's open)? In fact, come to think of it, I think (without proof) that everything of that form works. And all of the previous examples are of that form. – Akiva Weinberger Aug 19 '15 at 00:35
  • Generalization: let $U$ be any open set and let $(A_n)$ be an enumeration of its component (open) intervals. Define $f$ to be constant on each of these intervals, say $f(x) = y_n$ on $A_n$, with the constraint that the set ${y_n}$ is bounded above, say by $M$. Then define $f$ to be any value $\geq M$ on the complement of $\cup A_n$. I think that should also work? –  Aug 19 '15 at 00:36

1 Answers1

6

Although, I cannot provide a more general answer, I will derive one property of your set of functions: Their image is at most countable.

To see this, let $f$ be such a function. We will construct an injective map $\text{Im}(f) \to \mathbb Q \times \mathbb Q$ (for which we need the Axiom of Choice). This map goes as follows: Let $y \in \text{Im}(f)$. Map this to one $x$ such that $f(x)=y$. Now there's an open interval $I$ around $x$ such that $f(\tilde{x}) \leq f(x)$ for all $\tilde{x}$ in $I$. In particular, there also exists a closed interval $J\subset I$ with rational endpoints with this property. We now map $x$ to $J$ and thus to $\mathbb Q \times \mathbb Q$ (i.e. to the left and right end points of $J$ respectively).

It remains to show that this mapping is injective. Let $y$,$\tilde{y}$ which both get mapped to the same interval $J$. Also let $x$,$\tilde{x}$ such that $f(x)=y$, $f(\tilde{x})=\tilde{y}$. Now in this interval by construction it holds both that $f(x) \leq f(\tilde{x})$ and $f(\tilde{x}) \leq f(x)$. Thus $f(x)=f(\tilde{x})$ and finally $y=\tilde{y}$ which shows that the mapping is injective.

air
  • 2,812
  • Thank you! But I think Stefan's link already settled this — if you click another link in the linked page, you get to a proof that there are at most countably many strict local maxima; I think a variation of that argument proves that the image of general local maxima is countable. – Akiva Weinberger Aug 19 '15 at 01:04
  • ah missed it, guess I should delete then :) – air Aug 19 '15 at 01:11
  • Please don't, it's a nice argument. – Akiva Weinberger Aug 19 '15 at 01:13
  • Hahah ok, then I will leave it. Nice question though :). – air Aug 19 '15 at 01:14
  • 1
    We actually don't need axiom of choice here: we can enumerate all rational intervals and for each point take the first interval that works. – mihaild Jun 26 '22 at 20:45