2

This is the extension of my previous inquiry:

Is it possible to describe the Collatz function in one formula?


Can each of all functions be expressed in one formula? That is, can any function expressed with conditions(e.g. modular or interval conditions) be expressed without conditions or sub-functions?

For example, conditional function f(x) which $$f\left(n\right) = \begin{cases} 0 &\text{if } x<-1\\ 1 & \text{if } -1≤x<0 \\ 2 & \text{if } 0≤x<1 \\ 3 & \text{if } 1≤x \end{cases}$$ Can be described by

$$f\left(x\right)=\left[\arctan \left(x\tan \left(1\right)\right)\right]+2$$

AsukaMinato
  • 1,007
new
  • 681
  • 1
    What is a "formula" to you? This: $$\begin{cases} 0 &\text{if } x<-1\ 1 & \text{if } -1≤x<0 \ 2 & \text{if } 0≤x<1 \ 3 & \text{if } 1≤x \end{cases}$$ looks like a perfectly good formula to me. – hmakholm left over Monica Oct 23 '15 at 09:39
  • Formula without any conditions – new Oct 23 '15 at 09:48
  • x @Bingkongmaster: Then I define the symbol $\mathrm{KhwR}$ to mean the precise function you speak about here, and then $$f(x)=\mathrm{KhwR}(x)$$ is a formula that does not contain any conditions. – hmakholm left over Monica Oct 23 '15 at 09:51
  • @HenningMakholm But conditions are implied in KhwR(x) whereas [arctan(xtan(1))]+2 is not – new Oct 23 '15 at 09:54
  • x @Bing: Then I am still waiting for your definition of what qualifies as a "formula" to you. So far what you have said is not operational; the only way to know whether you consider something to be a "formula" is to ask you. That is not a definition that anyone else than you can reasonably use for anything. – hmakholm left over Monica Oct 23 '15 at 10:00
  • x @Bing: In particular, you have not described why you think $\mathrm{KhwR}$ is a less acceptable symbol to use in a "formula" than $[\cdot]$ is. Both of them are merely names for certain piecewise constant functions, and $\mathrm{KhwR}$ is even simpler because it has a finite number of pieces rather than infinitely many for $[\cdot]$. Then what makes one but not the other acceptable for use in a "formula"? It is impossible to know what your conditions for acceptable functions are as long as you don't reveal your criteria. – hmakholm left over Monica Oct 23 '15 at 10:02
  • Thank you for your answer, despite my inability to adequately explain. What I mean by a formula without conditions is a formula that can be described exclusively by calculations, which does not include the if statement. – new Oct 23 '15 at 10:15
  • The point is, whether calculations can express if conditions. For example, modular if conditions can be expressed by trigonometric calculations. – new Oct 23 '15 at 10:18
  • You keep focusing on what you don't allow, but in order to properly define a class of formulas you're interested in, you have to define precisely what you do allow. You seem to be extremely unwilling to do that, but until you do so, your question is not an answerable one. (And you did not reply to my question about which property the $[\cdot]$ function has that makes you accept it when you don't accept $\mathrm{KhwR}$.) – hmakholm left over Monica Oct 23 '15 at 10:31
  • And now you also need to provide a definition of what "calculation" means to you. – hmakholm left over Monica Oct 23 '15 at 10:31

2 Answers2

2

If you allow the floor function (as you do in your example), one can easily express indicator fucntions of intervals: $${\bf 1}_{[0,\infty)}(x) =\begin{cases}1&\text{if $x\ge0$}\\0&\text{if $x<0$}\end{cases}=1+\left\lfloor\frac{x}{2+x^2}\right\rfloor$$ and then $$\begin{align} {\bf 1}_{[a,\infty)}(x)&={\bf 1}_{[0,\infty)}(x-a)\\ {\bf 1}_{(-\infty,a)}(x)&=1-{\bf 1}_{[a,\infty)}(x)\\ {\bf 1}_{(a,\infty)}(x)&={\bf 1}_{(-\infty,-a)}(-x)\\ {\bf 1}_{(-\infty,a]}(x)&={\bf 1}_{[-a,\infty)}(-x)\\ {\bf 1}_{[a,b]}(x)&={\bf 1}_{[a,\infty)}(x)\cdot{\bf 1}_{(-\infty,b]}(x)\\ {\bf 1}_{(a,b]}(x)&={\bf 1}_{(a,\infty)}(x)\cdot{\bf 1}_{(-\infty,b]}(x)\\ {\bf 1}_{[a,b)}(x)&={\bf 1}_{[a,\infty)}(x)\cdot{\bf 1}_{(-\infty,b)}(x)\\ {\bf 1}_{(a,b)}(x)&={\bf 1}_{(a,\infty)}(x)\cdot{\bf 1}_{(-\infty,b)}(x)\\ \end{align}$$ so that we can express indicator functions of arbitrary intervals. Then in principle you can build your function by multiplying with such indicator functions. However, you may need to be careful with psrts that areundefined in points outside the interval they are used in.

  • Thank you for your answer. Then, using the same technique, can function of any conditions also be expressed in one formula without conditions or sub-intervals? For example, can floor function be used to also express the Collatz function? (which uses modular condition) – new Oct 23 '15 at 10:28
  • @Bingkongmaster Actually, why do you accept $\lfloor\cdot\rfloor$ and not $\cdot\bmod \cdot$? -- Also, my hints were aimed at functions defined on $\Bbb R$, not $\Bbb Z$ (and not $\Bbb C$). Periodic indicator functions can be found using sines and cosines, good enough for functions on $\Bbb Z$ but a horrendously stupid thing to do IMHO, – Hagen von Eitzen Oct 23 '15 at 10:48
1

You can probably find a clever formula to express the step function $H(x)=[x\ge0]$. $H(x)=\dfrac{x+|x|}{2x}$ almost does it. See also Iverson bracket.

Given that, then:

  • $H(x-a)$ is the characteristic function of $[a,\infty)$
  • $H(a-x)$ is the characteristic function of $(-\infty,a]$
  • $H(x-a)(b-x)$ is the characteristic function of $[a,b]$

and so any function that is defined piecewise can be written using a linear combination of suitable $H$: if your function is equal to $h(x)$ in an interval $[a,b]$, just add $H(x-a)(b-x)h(x)$.

For instance, your function is $$ H(-1-x)\cdot 0+ H(x+1)H(0-x)\cdot 1+ H(x-0)H(1-x)\cdot 2+ H(x-1)\cdot 3 $$

But it does not seem worth the trouble when the piecewise definition is so much clearer.

lhf
  • 221,500