Chapter 1 Questions

advertisement
Week 1 Problem Set
Due at start of class Monday 12-Jan-2009
(Many thanks to Prof. Song, as questions 1-6 are modified from his class
problem sets.)
Question 1
Write a Boolean logic statement representing the following sentence: 'He will come on
the 8:15 or the 9:15 train; if the former, he will have time to visit us', where
p means 'He will come on the 8:15'
q means 'He will come on the 9:15'
r means 'He will have time to visit us'
Question 2
Which of the following propositional formulas is a tautology?
Recall that a tautology is a formula that evaluates to T for all possible assignments of
truth values.
1. ( p | r) (p | r)
2. (p (p & q))
3. r (p & r)
4. p &T
5. (p q) | (p
q)
Recall that p
Question 3
q is an abbreviation for (p
q)& (q
p).
In this question, assume the following predicate and constant symbols:
W(x,y) : x wrote y
L(x,y) : x is longer than y
N(x) : x is a novel
h : Hardy
a : Austen
j : Jude the Obscure
p : Pride and Predjudice
Given these specifications, which of the predicate logic formulas below represent the
sentence, 'Hardy wrote a novel which is longer than any of Austen's' in predicate logic?
1.
2.
3.
4.
5.
x (W(h,x) L(x,a)))
x y (L(x,y) W(h,y) &W(a,x))
x y (W(h,x) &W(a,y) L(x,y)))
x (N(x) & W(h,x) & y (N(y) &W(a,y)
x y (W(h,x) W(a,y) &L(x,y))
L(x,y)))
Question 4
Which of the following sets of sentences is satisfiable?
1.
2.
3.
4.
5.
{
{
{
{
{
x Q(x), x (Q(x) R(x)), x R(x)}.
y x P(x,y), x P(x,x)}.
x y (P(x,y) P(y,y)), x P(x,x), x y (P(x,y)}.
x y P(x,y), x P(x,x)}.
x Q(x), x Q(x)}.
Question 5
Which of the specifications in plain English below convey the mathematical meaning of
the LTL formula G (p X[q U r]) ?
1. After any reachable state in which p is true, r is eventually true, and until then q is
true.
2. If p is true in every reachable state, then afterwards q is continuously true, until r
becomes true.
3. If p is true in every reachable state, and q is continuously true, r will eventually
become true.
4. For any reachable state in which p is true, afterwards q is continuously true until r
becomes true.
5. If p is true in every reachable state, then there is always a later state at which r is
true, and q is true continuously until then.
Question 6
Which of the following is a reduced, ordered BDD representing the formula (x & y) |z ?
(Note that these BDD diagrams use the convention where a dotted line is the 0 transition,
and a solid line is the 1 transition.)
1.
2.
3.
4.
5. None of the above.
Question 7-9
Assume we have a design with an output modeled by the following Boolean
expression:
Out = (a | ~b | c) & (b | c )
Show that the property P=(~a & ~c) cannot be true in this system, by each of
the following methods:
 Boolean algebra equations (using distributive laws to express in sum-ofproduct terms)
 BDDs (Use Apply algorithm to AND the BDDs of P and Out)
 A DPLL SAT algorithm (show that the system of the P and Out
expressions cannot be satisfied)
Question 10
Make sure you have the computing infrastructure in place for the first half of
the class, since starting next week we will be using real CAD tools instead of
pen-&-paper calculations!
- Send a ‘hello’ email to me: erik@erikseligman.com, and wait for a
reply (should receive within 1 day.) If you don’t get a reply, my spam
filter may have decided you are trying to sell Personal Enhancement
Formulas… so call me at 503-312-1665 (or twitter me @erikseligman)
to tell me to fix this.
- Run the Cadence Conformal LEC tool. To do this, login to an ECE
machine such as andy.ece.pdx.edu. (NOTE: this tool is only on ECE,
not CECS, machines.) Then start the ‘zsh’ shell. Copy
~eseligma/startup.cadence to your home directory and source it. Then
you should be able to type ‘/pkgs/cadence6/CONFRML71/bin/LEC’,
and see a GUI come up. If this doesn’t work for you, contact me ASAP
for further assistance.
Download