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
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:
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
Give the possible ABO groups for the children of the following matings. Give all possibilities. Father...
Give the possible ABO groups for the children of the following matings. Give all possibilities. Father group O, mother group O ______________________________________________ Father group A, mother group O ______________________________________________ Father group B, mother group O ______________________________________________ Father group AB, mother group O _____________________________________________ Father group AB, mother group AB ____________________________________________ Father group A, mother group A ______________________________________________ Father group AB, mother group AB ____________________________________________ Father group A, mother group A
Is the relation R consisting of all ordered pairs (a, b) such that a and b...
Is the relation R consisting of all ordered pairs (a, b) such that a and b are people and have one common parent: reflexive, irreflexive, symmetric, antisymmetric, asymmetric, and/or transitive? If a property doesn’t hold give a counter-example and state the logical definitions of the properties as you consider them.
Which one of the following pairs is not correctly matched? (a) syphilis – Trichnris trichiura (b)...
Which one of the following pairs is not correctly matched? (a) syphilis – Trichnris trichiura (b) sleeping sickness – Trypanosoma gambiense (c) dengue fever – arbovirus (d) plague – Yersinia pestis.
1 a. give examples of possible costs associated with a high level of gearing. b. discuss...
1 a. give examples of possible costs associated with a high level of gearing. b. discuss how such cost might influence capital structure of;    i. medium sized electronics company at the startup stage, and ii. an established hotels company
Compare the monthly payments and total loan costs for the following pairs of loan options. Assume...
Compare the monthly payments and total loan costs for the following pairs of loan options. Assume that both loans are fixed rate and have the same closing costs. You need a ​$90,000 loan. Calculate Option​ 1: a​ 30-year loan at an APR of 6.65​%. Option​ 2: a​ 15-year loan at an APR of 6.25%.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT