{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cs245-asn4-soln

cs245-asn4-soln - CS 245 Winter 2009 Assignment 4 Due Thu 5...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 245 Winter 2009 Assignment 4 Due: Thu 5 Mar 2009 10am in the CS245 Drop Boxes 40 marks SOLUTION SET There may be multiple correct answers to some of these questions. 1. (8 marks) Determine whether the following argument is valid or invalid. If it is valid, prove its validity using natural deduction. If it is invalid, provide a counterexample and demonstrate that the argument is invalid. Do not use any rules from transformational proof. x f ( x ) = g ( x,a ) , x P ( x ) Q ( f ( x )) | = ND x • ¬ P ( f ( x )) Q ( g ( f ( x ) ,x )) ( a is a constant) Soln: 1 x f ( x ) = g ( x,a ) premise 2 x P ( x ) Q ( f ( x )) premise 3 P ( f ( a )) ∨ ¬ P ( f ( a )) LEM 4 P ( f ( a )) assumption 5 P ( f ( a )) Q ( f ( f ( a ))) E 2 6 Q ( f ( f ( a ))) E 4 , 5 7 f ( f ( a )) = g ( f ( a ) ,a ) E 1 8 Q ( g ( f ( a ) ,a )) = E 6 , 7 9 ¬ P ( f ( a )) Q ( g ( f ( a ) ,a )) I 8 bracketleftbigg 10 ¬ P ( f ( a )) assumption 11 ¬ P ( f ( a )) Q ( g ( f ( a ) ,a )) I 10 12 ¬ P ( f ( a )) Q ( g ( f ( a ) ,a )) cases 3 , 4 9 , 10 11 13 x • ¬ P ( f ( x )) Q ( g ( f ( x ) ,x )) I 12 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2. (24 marks) Construct a theory about a tic-tac-toe-like game on a J × J grid, where J is a constant. The grid is marked with X ’s by one player and O ’s by the other player. Use the following functions and predicates as well as arithmetic predicates such as : wins ( x ) – means the player with mark x wins horiz row ( x ) – means the player with mark x has a horizontal line vert row ( x ) – means the player with mark x has a vertical line loc ( r,c ) – returns the mark at row r and column c in the grid A player wins if they have a horizontal or vertical line of their marks.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern