{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw2sol - CS 173 Discrete Structures Spring 2010 Homework 2...

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

View Full Document Right Arrow Icon
CS 173: Discrete Structures, Spring 2010 Homework 2 Solutions This homework contains 6 problems worth a total of 50 points. 1. [9 points] Logic notation Translate the following sentences into propositional or predicate logic. Use the short- hand symbols (e.g. _ ) and de ne the meaning of each of your predicates and proposi- tional variables. (See pages 11 and 42-43 of Rosen for examples.) Be sure to include a domain (aka replacement set) for each quanti ed variable. You may need to rewrite the sentences slightly so as to make a variable more explicit. (a) Every cookie that contains lots of butter is tasty but is also fattening. [Solution] 8 x 2 C; B ( X ) ! ( T ( x ) ^ F ( x )) where C is set of cookies, and B ( x ) means x contains lots of butter, T ( x ) means x is tasty, and F ( x ) means x is fattening. (b) Either the tablecloth is pink, or the tablecloth is white and the red light is shining on it. [Solution] p _ ( w ^ r ) where p; w; r represent ‘The tablecloth is pink’, ‘The tablecloth is white’, and ‘The red light is shining on the tablecloth’ respectively. Note: A solution using instead of _ is also correct. (c) Exactly one integer is equal to its own negation. [Solution] 9 x 2 Z ; 8 y 2 Z ; ( x = x ) ^ [( x 6 = y ) ! ( y 6 = y )] where Z denotes the set of integers. This solution states that there exists at least one integer, x , equal to its own negation and for all integers y 6 = x , y is not equal to its own negation, therefore x is unique. A solution using 9 ! is also acceptable, e.g. 9 ! x 2 Z ( x = x ) For example, the sentence \Every car that is driven in Berkeley is a hybrid or runs on biodiesel." might be rendered as 8 x 2 C; D ( x ) ! ( H ( x ) _ B ( x )) 1
Background image of page 1

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

View Full Document Right Arrow Icon
where C
Background 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 ]}