Artificial intelligent assistant

Maximum number of times a function crosses a horizontal line Given a function $f:\mathbb{R}\rightarrow \mathbb{R}$, define $g(x)= | \\{y |f(y)=x\\}|$. Syppose that $g(x)$ is finite for all $x$. Define $a= \sup_x g(x)$. In words, $a$ is the maximum number of times $f$ crosses a line parallel to the $x$ axis. In my application, it is convenient to define $a$ as a measure of complexity of $f$. I wanted to see if this is an object that appears in other contexts as well. If it has a name, or appears in any literature, I'd very much appreciate pointers.

Assuming that your use of the absolute value notation represents cardinality (and not Lebesgue measure), your function $g(x)$ is the Banach indicatrix of the function $f.$ So what you're interested in is the (global) maximum value of the Banach indicatrix. Off-hand, I don't know of any nontrivial results connected with this specific aspect of the Banach indicatrix, but the Banach indicatrix is certainly a well known tool in real analysis and harmonic analysis.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f578560c6f1eac12d1800ae1f57184f6