Could such a machine ever be built (ref recycling)

I’m talking theory here, because I know that the present technology can’t do that…or at least can’t do it economicaly…anyhow, would this be possible:

A machine that takes any garbage (or whatever solid and/or liquid) and then separates it in all the elements that it contains…

For example you would put in a calculator in the machine and it gives you back pure iron, oxygen, hydrogen, carbon and whatever other elements are present in what makes the calculator…

Let’s say you had unlimited energy (electricity or whatever) would it be possible to do that or is there some fundamental physics or chemistry law that prevents this from hapening…

and if it would be possible could you then do it with living tissue like a rat or vegetables, wood and stuff like that??

finally, could that solve all polution problems on earth?

Yes, it could theoretically be built. If nothing else, you can heat the incoming atoms to plasma and send them one at a time through a mechanism similar to a gas chromatograph to seperate them by atomic weight.

However, it would work extremely slowly, and take a huge amount of energy to run. It wouldn’t be a solution to all our pollution problems on earth, because you’d generate more pollution making the energy to run the machine than it eliminated.

And having an unlimited pollution-free energy source by itself would get rid of most of our pollution problems, even without a magic atom-seperator maching.