# Decidability of factoring algebraic equations

Given an arbitrary algebraic equation, say for example the likelihood of the bernoulli distribution:

$$\prod_{i}^{n}\theta^{x_i}(1-\theta)^{1-x_i}$$

And some arbitrary factorization constraints, say:

$$f(x)g(\theta)e^{\phi(\theta)^{T}u(x)}$$

Can I factor the equation into the form above where f, g, and phi are functions depending only on x, theta, or x respectively? This is something as humans we do all the time. The problem I gave above is an instance of "is this distribution in the exponential family", but of course there are simpler and less puffy versions of this:

Given the equation:

$$f(x,y,z) = x^2 + y^3 - e^{z}$$

Can I factor this into:

$$f(x)*g(y)*h(y,z)$$

This feels undecidable to me. The tree of legal "algebra moves" from the root is infinite. If a program cannot find a solution in n moves, there is no guarantee that the solution is not at n + 1 moves, so I can't think of a halting condition. There doesn't even seem to be a good greedy solution to this, other than human intuition.

Any mathematica wizards out there know how to write a one liner to this?

• How much have you searched about factorization of functions or the like? – Apass.Jack Dec 7 '18 at 8:53

Interesting question. Factorization of functions including factorization of polynomials is in fact a classical problem throughout history of mathematics.

For the sake of contradiction, assume that $$x^2 + y^3 - e^{z} = f(x)*g(y)*h(y,z)$$

For the sake of simplicity, assume that $$f, g, h$$ are continuously differentiable inside $$D$$, the place where we are interested.

Now treating $$y$$ and $$z$$ as constant, take partial derivative with respect to $$x$$. (Aha, you might say, why didn't I think of that?!)

$$x^2 = f'(x)*g(y)*h(y,z)$$

If $$f'(x)$$ is constant 0, then $$f(x)$$ is a constant. The above cannot hold since you can change $$x$$ without changing $$y$$ and $$z$$.

If $$f'(x)$$ is not 0, then we have $$x^2/f'(x) = g(y)*h(y,z)$$ That means, both $$x^2/f'(x)$$ and $$g(y)*h(y,z)$$ are constant functions. Now taking the partial derivative of the original equality with respect to $$z$$, we will have $$-e^z = 0$$ which cannot be true.

The above reasoning should give you a pretty good idea that particular factorization cannot hold nicely because of too many independences between the variables in the factorization. In fact, we can show that no such $$f,g,h$$ exist without assuming continuity of any of $$f, g, h$$, as long as it is required that equality holds for a small 3D space. Note that 2D space will not be enough since we can have, letting $$x=0$$, $$0 + y^3-e^z=1*1*(y^3-e^z)$$

It will require some work to formulate the more general questions of decidability of function factorizations clearly enough so that it might be able to have a clear answer. It looks like if you asks for too many independencies, then the set of problems is probably decidable. If you are interested enough, you could try formulating those problems and raising new questions.

For related result on polynomials, we can search for "decidability polynomial factorization".