Unformatted text preview:

CS 202 section 2 (Fall ’04): Midterm 1 1 Name: ______________________________________ E-mail ID: [email protected] Pledge: _______________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________ Signature: _____________________________________________________________________ There are 50 minutes for this exam and 100 points on the test; don’t spend too long on any one question! All work must be on these three exam pages.CS 202 section 2 (Fall ’04): Midterm 1 2 Short answer questions (5 points each): these questions only require a sentence or two for full credit. Question 1 (5 points) Define and explain the difference between a Boolean variable and a proposition. Question 2 (5 points) Define and explain the difference between a proposition and a propositional function. Question 3 (5 points) What is the power set of {1, 2, 3}?CS 202 section 2 (Fall ’04): Midterm 1 3 Question 4 (10 points) Encode the following statement using quantifiers and propositional functions (of one or two variables). Clearly label what your propositional functions and variables represent. a) “There is a building on campus of some college in the United States in which every room is painted white.”CS 202 section 2 (Fall ’04): Midterm 1 4 Question 5 (25 points) A pirate famous for his bizarre sense of humor and love of logic puzzles left the following clues as to the location of the treasure. The treasure can only be in one place. a) If the house is next to a lake, then the treasure is in the kitchen b) If the house is not next to a lake or the treasure is buried under the flagpole, then the tree in the front yard is an elm and the tree in the back yard is not an oak c) If the treasure is in the garage, then the tree in the back yard is not an oak d) If the treasure is not buried under the flagpole, then the tree in the front yard is not an elm e) The treasure is not in the kitchen Using rules of inference, determine where the treasure is hidden. Clearly state what your Boolean variables represent.CS 202 section 2 (Fall ’04): Midterm 1 5 Question 6 (25 points) For all sets A, B, and C, prove using set identities that )()()( CBAACBA −≡−− UU . Recall that BABA I≡− . Label each step with the name of the set identity that was used.CS 202 section 2 (Fall ’04): Midterm 1 6 Question 7 (25 points) Consider the statement: “The sum of any even integer and any odd integer is odd” a) Restate this (in English) as a conditional b) Prove it via an indirect proof XOR a proof by


View Full Document

UVA CS 202 - Midterm 1

Download Midterm 1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Midterm 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Midterm 1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?