Question

In: Computer Science

Unify (if possible) the following pairs of predicates and give the resulting substitutions, assume b is...

Unify (if possible) the following pairs of predicates and give the resulting substitutions, assume b is a constant.

a.

P(x, f(x), z)

¬ P(g(y),f(g(b)),y)

b.

P(x, f(x))

¬ P(f(y), y)

c.

P(x, f(z))

¬ P(f(y), y)

Solutions

Expert Solution

a) Here,1 = P(x,f(x),z) and  2 = P(g(y),f(g(b)),y)

Step 1: Check if the predicates match. Atoms with different predicate symbols cannot be unified.[here both the predicates match].

Step 2:To unify each pair of terms.

  • The first pair is (x,g(y)).Since one of the elements is a variable, they can be unified by substituting the other term for the variable. The substitution for the above pair is g(y)/x.

This substitution must be applied to both the clauses which give,

P(g(y),f(g(y)),z)

P(g(y),f(g(b)),y)

  • The second pair is (f(g(y)),f(g(b)).Here, substitute b/y

The substitution must be applied for both the clauses which give,

P(g(b),f(g(b)),z)

P(g(b),f(g(b)),y)

  • The third pair is(z,y). Here, substitute z/y

The substitution must be applied bor both the clauses which give,

P(g(b),f(g(b)),y)

P(g(b),f(g(b)),y)

Unified successfully

The substitutions are g(y)/x, b/y and  z/y .

b) Here,1 = P(x,f(x)) and  2 = P(f(y),y)

  • The first pair is (x,f(y)).Since one of the elements is a variable, they can be unified by substituting the other term for the variable. The substitution for the above pair is f(y)/x.

The substitution must be applied bor both the clause which give,

P(f(y),f(f(y)))

P(f(y),y)

  • The second pair is (f(f(y)),y).

It is not possible to substitute f(f(y))/y.

Hence Unification failed.

c)Here,1 = P(x,f(z)) and  2 = P(f(y),y)

  • The first pair is (x,f(y)).Since one of the elements is a variable, they can be unified by substituting the other term for the variable. The substitution for the above pair is f(y)/x.

The substitution must be applied bor both the clause which give,

P(f(y),f(z))

P(f(y),y)

  • The second pair is (f(z),y). Since one of the elements is a variable, they can be unified by substituting the other term for the variable. The substitution for the above pair is f(z)/y.

The substitution must be applied bor both the clause which give,

P(f(y),f(z))

P(f(y),f(z))

Hence Unified successfully.

The substitutions are f(y)/x and f(z)/y.


Related Solutions

Calculate A+B, A-B, AxB, and A/B for each of the following pairs of binary numbers. (Assume...
Calculate A+B, A-B, AxB, and A/B for each of the following pairs of binary numbers. (Assume the first number in each pair = A and the second number =B). Append all numbers to 8 bits. Subtraction is not2’s complement. a.1010101, 011010 b.101101, 10101 c.11001, 1100 d.1010101, 1110
Consider the integers from 1 to 10. Give the set of pairs (a, b) that corresponds...
Consider the integers from 1 to 10. Give the set of pairs (a, b) that corresponds to relation a ≡ b mod 1.
What will the molarity be of the resulting solutions made by mixing the following? Assume that...
What will the molarity be of the resulting solutions made by mixing the following? Assume that volumes are additive. a)116 mL of 3.6 M H3PO4 with 776 mL of H2O (b) 219 mL of 0.39 M Na2SO4 with 737 mL of H2O (c) 75 mL of 0.50 M HNO3 with 75 mL of 1.5 M HNO3
Part B Matching Pairs Complete all of the following 20 matching pairs in the table below...
Part B Matching Pairs Complete all of the following 20 matching pairs in the table below by placing the letter of the correct description in the answer space beside the matching term. One mark for each correct answer. Twenty marks total.                                                                                                              Term Answer Description Wage curve A. Activity-related soft tissue injuries of the neck, shoulders, arms, wrist, hands, back and legs Broadbanding B. A written allegation of a contract violation, filed by an individual bargaining union member, the union,...
Define agency problems in general. And then give the following: One example of such problem resulting...
Define agency problems in general. And then give the following: One example of such problem resulting from a separation of ownership and management: one example of such problems resulting from the conflicts of interest between debtholders and shareholders during financial distress: two corporate governance mechanisms to mitigate agency problems, one internal and one external:
Proximity measures are defined in terms of pairs of objects. Assume that our pairs are actually...
Proximity measures are defined in terms of pairs of objects. Assume that our pairs are actually groups of objects which are not vectors. How might we define similarity in this case?
Identify the stronger acid in each of the following pairs, and give reasons for your choice:...
Identify the stronger acid in each of the following pairs, and give reasons for your choice: (a) HBrO4 or HIO4 (b) HF or HI (c) HIO2 or HIO3 (d) H3AsO4 or H2SeO4
The following table shows pairs of hexadecimal numbers A and B. What is the sum of...
The following table shows pairs of hexadecimal numbers A and B. What is the sum of A and B if they represent unsigned 16-bit hexadecimal numbers? The result should be written in hexadecimal. Show your work A 0D34 DD17 B BA1D 3617
1. All questions assume the alphabet Σ = { a , b }. a) Give a...
1. All questions assume the alphabet Σ = { a , b }. a) Give a regular expression representing the language of all strings containing abab as a substring. b) Give a regular expression representing the language of all strings with an even number of a's or an odd number of b's, such as abab or baabaab. c) Give a regular expression representing the language of all strings of the form ambn, where m is even and n is odd....
Consider the following predicates: HUMAN(x) – x is a human being AFRICANAMERICAN(x) – x is an...
Consider the following predicates: HUMAN(x) – x is a human being AFRICANAMERICAN(x) – x is an African-American STUDENT(x) – x is a UMW student LIKES(p,h) – person p likes hobby h COURSE(c) - c is a UMW course REQUIRED(c,s) – c is a required course for student s NFLTEAM(x) – x is an NFL team SUPERBOWL(a, n, y) – teams a and n played in the Superbowl in year y SUPERBOWLWIN(a, y) – team a won the Superbowl in year...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT