Suppose I have a function f:A ->A. I can plot this function in a cartesian coordinate system in tikz/pgf. Can someone explain to me how to plot for a specific point a in A and a natural number m the m-time preimage of a (meaning the point in A, that evaluates to a, if f is m times applied) ?
Is it also possible to plot the preimage of an entire subset, that consists of more than a single point, of A ?

pgfplotsthen it might be possible through nested foreach loops. – percusse Apr 1 '12 at 13:49