{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_042JS10_lec04_sol

# MIT6_042JS10_lec04_sol - Massachusetts Institute of...

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

Massachusetts Institute of Technology 6.042J/18.062J, Spring ’10 : Mathematics for Computer Science February 10 Prof. Albert R. Meyer revised February 3, 2010, 3 minutes Solutions to In-Class Problems Week 2, Wed. Problem 1. Prove by truth table that OR distributes over AND : [ P OR ( Q AND R )] is equivalent to [( P OR Q ) AND ( P OR R )] (1) Solution. [ P OR ( Q AND R )] T T T T T T T T F F T T F F T T T F F F F T T T T F F T F F F F F F T F F F F F [( P OR Q ) AND ( P OR R )] T T T T T T T T T T T T T F T T F T T T T T T F T T T F F T T T F T T F T T F F F F F F F F F T T F F F F F F F The two columns for the principle operator (underlined) are the same, and therefore the corre- sponding propositional formulas are equivalent. Creative Commons 2010, Prof. Albert R. Meyer .

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

View Full Document
2 Solutions to In-Class Problems Week 2, Wed. Problem 2. This problem 1 examines whether the following specifications are satisfiable : 1. If the file system is not locked, then (a) new messages will be queued. (b) new messages will be sent to the messages buffer. (c) the system is functioning normally, and conversely, if the system is functioning nor- mally, then the file system is not locked. 2. If new messages are not queued, then they will be sent to the messages buffer. 3. New messages will not be sent to the message buffer. (a) Begin by translating the five specifications into propositional formulas using four proposi- tional variables: L Q B N ::= ::= ::= ::= file system locked , new messages are queued , new messages are sent to the message buff system functioning normally . er , Solution. The translations of the specifications are: NOT L IMPLIES Q (Spec. 1.(a)) NOT L IMPLIES B (Spec. 1.(b)) NOT L IFF N (Spec. 1.(c)) NOT Q IMPLIES B (Spec. 2.) NOT B (Spec. 3.) (b) Demonstrate that this set of specifications is satisfiable by describing a single truth assignment for the variables L, Q, B, N and verifying that under this assignment, all the specifications are true. Solution. An assignment that works is L = True N = False Q = True B = False . To find this assignment, we could have started constructing the sixteen line truth table —one line for each way of assigning truth values to the four variables L , N , Q , and B —and calculated the 1 From Rosen, 5th edition, Exercise 1.1.36
3 Solutions to In-Class Problems Week 2, Wed.

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 ]}

### Page1 / 7

MIT6_042JS10_lec04_sol - Massachusetts Institute of...

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

View Full Document
Ask a homework question - tutors are online