Substitution To Find Most General Unifier Could someone give me some advice on how to do this problem? 
For the the following pair of expressions, find the substitution that is
the most general unifier (mgu) or explain why the two expressions cannot be unified. b and c are constants, f and g are functions, and w, x, y, z are variables.

Thanks.
 A: A unifier of two terms $t$ and $t$' is a substitution function $\phi$ that maps variables to terms such that $\phi t = \phi t'$, i.e., applying $\phi$ to the variables in each term yields the same term. For example, given $t = f(x)$ and $t' = f(a)$ where $a$ is a constant and $f$ is a function name (not a variable) then $\phi\ x \mapsto a$ is a unifier since $\phi t = f(a) = \phi t'$. 
The unifier $\phi$ for $t$ and $t'$ is the most general unifier if for any other unifier $\psi$ (s.t. $\psi t = \psi t'$) then their exists some other unifier $\Phi$ such that $\psi = \Phi \circ \phi$, i.e., $\psi$ factors through $\phi$.  For example, given $t = f(x, a)$ and $t' = f(y, a)$ then $\psi\ x \mapsto c, \psi\ y \mapsto c$ is a unifier, but it is not the most general. 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).   
A: Parameter 1: 
w and y : matching, variable w has to be replaced by y.
Parameter 2: 
c and z : matching, variable z has to be replaced by constant c.
Parameter 3:
f(w,b,w) and y: after variable replacement w to y
f(y,b,y) and y: y cannot be replaced by f(y,b,y), it is a recursive call. It cannot be unified.
