2 Trying to learn Unification process, and while reading in a website about it, i found this example. Find the MGU of {p (f (a), g (Y)) and p (X, X)} ... Unification is not possible for these expressions. I wanna know if this Unification failure isn't only due to the chosen Substitution ?
In first-order unification, which you seem to be discussing, that is possible assuming X and Z are variables and a is a constant. I'd suggest you check carefully assumptions about constants, functions, predicates and variables, and do some examples, e.g. on paper with Martelli and Montanari's algorithm or using a logic programming system. There are various unification algorithms. Unification ...
The Unification Algorithm is described at page 84. You have to recall the resolution calculus [page 29] : Resolution is a simple syntactic transformation applied to formulas. From two given formulas in a resolution step (provided resolution is applicable to the formulas), a third formula is generated.
I haven't though this through, but I think the answer is yes, but that the unification algorithm may not terminate, and that determining if it terminates for a particular case is as difficult as the general halting problem. Usually the thing we like about unification algorithms is that they always terminate, because they do structural recursion on the input term.
This book will take you from single variable calculus (should be familiar to you) up through multivariate and vector calculus, ending neatly with the unification of the Fundamental Theorem of Calculus, Green's Theorem, Stokes' Theorem, and the Divergence Theorem:
The most general is $\phi\ x \mapsto y$, since $\psi$ factors though $\phi$ with $\Phi\ y \mapsto c$ (or equivalently $\phi\ y \mapsto x$ and $\Phi\ x \mapsto c$). The usual simple unification algorithm will generate an mgu; basically just pick the simplest unification (unify variables to variables, not to some other constants/ground terms).