For each of the following pairs of expressions, say which substitution, if any, is a most general unifier.
1. | p(x,x) and p(a,y) | |
| {x←a} | |
| {y←a} | |
| {x←a, y←a} | |
| Not unifiable | |
|
2. | p(x,x) and p(f(y),z) | |
| {x←f(a), y←a, z←f(a)} | |
| {x←f(y), z←f(y)} | |
| {x←f(y)} | |
| Not unifiable | |
|
3. | p(x,x) and p(f(y),y) | |
| {x←f(a), y←a} | |
| {x←f(y), y←f(y)} | |
| {x←f(y)} | |
| Not unifiable | |
|
4. | p(f(x,y),g(z,z)) and p(f(f(w,z),v),w) | |
| {x←w, y←z, w←g(z,z)} | |
| {x←f(f(w,z),v), y←v, w←g(z,z)} | |
| {x←f(g(z,z),z), y←v, w←g(z,z)} | |
| Not unifiable | |
|