{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw4sol

# hw4sol - CS123 Spring 2010 Solution to Homework 4 Problem...

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

CS123 Spring 2010 Solution to Homework 4 Problem 1 (25 points) Let ( B, + , , 0 , 0 , 1) be a Boolean algebra. Define the following operations and : x y = xy 0 + x 0 y , and x y = ( x + y ) 0 . a) Prove that x y = ( x + y )( x 0 + y 0 ) Solution : ( x + y )( x 0 + y 0 ) = xx 0 + xy 0 + yx 0 + yy 0 by distributive laws = 0 + xy 0 + x 0 y + 0 by zero property and commutative laws = xy 0 + x 0 y by identity laws = x y by definition of operation b) Evaluate x x , x 1, x 0, x 1, and x 0, all in terms of x, 0 , 1 and 0 . Solution : x x = xx 0 + x 0 x = xx 0 + xx 0 = 0 + 0 = 0 x 1 = x · 1 0 + x 0 · 1 = x · 0 + x 0 = 0 + x 0 = x 0 x 0 = x · 0 0 + x 0 · 0 = x · 1 + 0 = x + 0 = x x 1 = ( x + 1) 0 = 1 0 = 0 x 0 = ( x + 0) 0 = x 0 c) Express xy using the operation but without using + , , , or 0 . Solution : xy = ( x 0 ) 0 · ( y 0 ) 0 by law of the double complement = ( x 0 + y 0 ) 0 by De Morgan’s laws = x 0 y 0 by definition of the operation = ( x 0) ( y 0) by the property shown in b) Note: x x = ( x + x ) 0 = x 0 , so answer as ( x x ) ( y y ) is also correct. d) Express x + y using the operation but without using + , , , or 0 . Solution : x + y = (( x + y ) 0 ) 0 = ( x y ) 0 = ( x y ) 0 ,or ( x y ) ( x y ) Problem 2 (20 points) a) Suppose that there is a panel of 3 judges for some game, and that after each player completes his/her presentation, each judge enters his/her vote of yes or no (yes = 1, no= 0) into a machine. The machine tallies the votes and returns 1 (that is, “pass”) if at least two judges vote yes. Otherwise, the machine returns 0 (for “fail”). Express the working of the machine as a Boolean function of three variables (the 3 judges’ votes). Solution : Let f ( x, y, z ) be the Boolean function defining the working of the machine. The values of this function are displayed in the following table: 1

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

View Full Document
Judge 1’s vote Judge 2’s vote Judge 3’s vote result x y z f ( x, y, z ) 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 With this table, we find that f ( x, y, z ) = x 0 yz + xy 0 z + xyz 0 + xyz .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

hw4sol - CS123 Spring 2010 Solution to Homework 4 Problem...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online