{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_042JS10_lec07_sol

# MIT6_042JS10_lec07_sol - Massachusetts Institute of...

This preview shows pages 1–2. Sign up to view the full content.

Massachusetts Institute of Technology 6.042J/18.062J, Spring ’10 : Mathematics for Computer Science February 17 Prof. Albert R. Meyer revised February 11, 2010, 1187 minutes Solutions to In-Class Problems Week 3, Wed. Problem 1. For each of the logical formulas, indicate whether or not it is true when the domain of discourse is N (the nonnegative integers 0, 1, 2, . . . ), Z (the integers), Q (the rationals), R (the real numbers), and C (the complex numbers). x ( x 2 = 2) x y ( x 2 = y ) y x ( x 2 = y ) x = 0 y ( xy = 1) x y ( x + 2 y = 2) (2 x + 4 y = 5) Solution. Statement N Z Q R C x ( x 2 = 2) F F F T ( x = 2) T x y ( x 2 = y ) T T T T ( y = x 2 ) t y x ( x 2 = y ) F F F F ( take y < 0) t = 0 y ( xy = 1) F F T T ( y = 1 /x ) T x x y ( x + 2 y = 2) (2 x + 4 y = 5) F F F F F Problem 2. The goal of this problem is to translate some assertions about binary strings into logic notation. The domain of discourse is the set of all finite-length binary strings: λ , 0, 1, 00, 01, 10, 11, 000, 001, . . . . (Here λ denotes the empty string.) In your translations, you may use all the ordinary logic

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}