Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Math 470 Spring ’05 HW #5 Solutions Section 2.2 1. a), c), e), g) 3. b) is an atomic formula c) the given formula and P(c) d) the given formula and P(x) (but x should be in parentheses) f) the given formula, (((y)P(z)) -> R(x,y)), ((y)P(z)), R(x,y), P(z) 5. a) no; y does not remain free b) yes. (Note that only the last occurrence of x is free.) c) yes , but nothing changes as x is not free d) yes 6. Base case: A variable or constant symbol has 0 left and 0 right parentheses, and no proper initial segments. Induction: Suppose that f is an n-ary function symbol and t1, …, tn are terms with equal numbers p1, …, pn of left and right parentheses, then f(t1, …, tn) has p1 + p2 + …+pn + 1 left and right parentheses. A proper initial segment of f(t1, …, tn) of length 2 or more has the left but not the right parenthesis associated with f. If it ends inside one of the ti, it also includes a proper initial segment of that ti. If this is of length at least 2, it has more left than right parentheses, so the whole segment has one additional left and no additional right parentheses, so at least 2 more left than right. Otherwise, it has exactly one more left than right parentheses. 8. Base case: Let = an atomic formula R(t1, …, tn) . By exercise 6, each ti has an equal number of left and right parentheses, say pi. Then has p1+ …+ pn + 1 left parentheses and the same number of right parentheses. Induction: Assume the claim is true for subformulas. If is (), it has one additional left and one additional right parenthesis. The same is true for the binary connectives. If is ((v) ) or ((v) ), it has 2 more left and 2 more right parentheses than . Section 2.3 1. a) c b) f (x, d) / \ x d c) g(f, x, d) / \ f(x, d) c / \ x d d) h(y, g(z, f(f(c, d), g(x, z)))) / \ y g(z, f(f(c, d), g(x, z))) / \ z f(f(c, d), g(x, z)) / \ f(c, d) g(x, z) / \ / \ c d x z 2. a) R(c, d) / \ c d b) R(f(x, y), d) / \ f(x, y) d / \ x y c) R(c, d) ^ R (f(x, y), d) / \ (a above) (b above) d) yz(R(x, f(c, d)) v P(h(y))) \ z(R(x, f(c, d)) v P(h(y))) \ R(x, f(c, d)) v P(h(y)) / \ R(x, f(c, d)) P(h(y)) / \ \ x f(c, d) P(h(y)) / \ \ c d h(y) \ y e) z(R(g(x, z, z)) -> P(y)) ^ P(z) / \ z(R(g(x, z, z)) -> P(y)) P(z) / \ (R(g(x, z, z)) -> P(y)) z / \ R(g(x, z, z)) P(y) \ \ g(x, z, z) y / | \ x z z 3. b) x and y c) x and y’ d) x e) x, y, final occurrence of z 4. The unique readability determines the tree. A variable or constant symbol has a tree with a single node. A term of the form f(t1, …, tn) has a tree with root f(t1, …, tn) and n children, one for each of the ti, which are unique by induction. 7. Again this is done by induction, using the unique readability of formulas. Section 2.4 1. First structure: Let A = N, c map to 0 , f to + and P to >= 0. Second structure: same but map P to = 0. 2. Let A = N; p map to x >=0, q to x is even, f to the function taking x to 2x. Then x(p(x) -> q(f(x)) is true; xp(x) is true and xq(x) is true, 3. x(p(x) ^ p(x)) 4. Let A = N, map < to the actual < relation on N, map + to subtraction. Then “x + 1” is mapped to x – 1, which is < x. “x + x” is mapped to x – x = 0. “x+ x < x “ is false for x = 0.