HW2CS40

# HW2CS40 - a Boolean circuit, using only AND, OR and NOT...

This preview shows page 1. Sign up to view the full content.

Homework “Logic”, CS40, Summer 2008 15 points total due Tuesday, August 19, 11:00 am Question 1 (Truth tables, 3 points) . Write down in a systematic fashion the truth table of the following statement ϕ ( x , y , z ) = ( x y ) ( ¬ y ∧¬ z ) . Question 2 (“Laws of Logic”, 3 points) . Derive, using the 10 Laws of Logic (pp. 58– 59, Section 2.2 in the Reader), the following equivalence: ( p q ) ∧¬ ( q r ) ¬ q ∧¬ ( r ∨¬ p ) . Describe the steps that you use. Question 3 (Inference, 3 points) . Using the “Rules of Inference” (p. 76, Section 2.3 in the Reader), prove the implication (( p q ) t ) (( ¬ t r ) s ) (( p q ) ( r s )) . Describe the steps that you use. Question 4 (Designing circuits, 3 points) . Deﬁne the Boolean parity formula by P ARITY ( x 1 , ... , x 64 ) = ± 0 if x 1 + ··· + x 64 is even, 1 if x 1 + ··· + x 64 is odd. Describe
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a Boolean circuit, using only AND, OR and NOT gates, that implements the function P ARITY as efﬁcient as possible. (Efﬁcient here means: with as few a number of gates as possible.) You do not have to draw the full circuit; it is sufﬁcient to describe how you would draw it if you would have to. Question 5 (Formulas with quantiﬁers, 3 points) . Let f be a continuous function from the real numbers R to the real numbers R and consider the statement ∀ x ∃ y [ f ( x ) > y ] implies ∃ y ∀ x [ f ( x ) > y ] . Give an example of a function f that disproves this alleged implication. Explain brieﬂy your line of reasoning behind your construction....
View Full Document

## This note was uploaded on 12/27/2011 for the course CMPSC 40 taught by Professor Egiceoclu during the Fall '09 term at UCSB.

Ask a homework question - tutors are online