This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Handout #63 December 2, 2009 CS 103 Robert Plummer CS103 Midterm Solutions - Autumn 2009 Problem 1 - Logic 1 x (( C ( x ) T ( x )) P ( x )) 2 x ( O ( x ) C ( x )) 3 x ( O ( x ) P ( x )) 4 O ( c ) P ( c ) existential instantiation of object c line 3 5 O ( c ) C ( c ) universal instantiation for object c line 2 6 O ( c ) simplification line 4 7 C ( c ) modus ponens line 5,6 8 ( C ( c ) T ( c )) P ( c ) universal instantiation for object c line 1 9 P ( c ) ( C ( c ) T ( c )) Table 7 - 2 line 8 10 P ( c ) simplification line 4 11 ( C ( c ) T ( c )) modus ponens line 9, 10 12 C ( c ) T ( c ) demorgans law line 11 13 T ( c ) disjunctive syllogism line 12, 7 14 xT ( x ) existential generalization line 13 Problem 2 - Translations Problem 2a Div ( x,y ) z ( y = zx ) Problem 2b Acceptable solutions were generally of the following form. Prime ( x ) x 6 = 1 z ( Div ( z,x ) z 6 = x z 6 = 1) x 6 = 1 z ( Div ( z,x ) ( z 6 = x z 6 = 1)) x 6 = 1 z ( Div ( z,x ) ( z = x z = 1)) x 6 = 1 z ( Div ( z,x ) ( z = x z = 1)) Problem 2c Every number greater than 1 has at least on prime factor . x ( x > 1) y ( Prime ( y ) Div ( y,x )) Problem 2d There is only one even prime. You were not allowed to use the fact that the constant 2 is prime....
View Full Document
- Fall '09