Sie sind auf Seite 1von 4

# CSCE 235/235H

Assignment 1

Name

Fall 2016
NUID

Instructions Follow instructions carefully, failure to do so may result in points being deducted.
Use A4 size papers to prepare your solutions. Pages teared-out from notebooks are not acceptable.
Clearly label each problem and submit the answers in order.
Print out a copy of this cover sheet and staple it to the front of your assignment.
Be sure to show sufficient work to justify your answer(s).
If you are asked to prove something, you must give as formal, rigorous, and complete proof as possible.
You will receive 5 bonus points for typesetting your assignment using LATEX.
The CSE academic dishonesty policy is in effect (see http://cse.unl.edu/academic-integrity-policy).
Question

Points

10

10

11

12

13

14

15

16

17

18

19

20

21

Total:

100

Score

## 1. 4 points (Rosen 1.1.12) Let p, q, and r be the propositions

p: You have the flu.
q: You miss the final examination.
r: You pass the course.
Express each of these propositions as an English sentence.
(a) q r
(b) p q r
(c) (p r) (q r)
(d) (p q) (q r)
2. 4 points (Rosen 1.1.15) Let p, q, and r be the propositions
p : Grizzly bears have been seen in the area.
q : Hiking is safe on the trail.
r : Berries are ripe along the trail.
Write these propositions using p, q, and r and logical connectives (including negations).
(a) It is not safe to hike on the trail, but grizzly bears have not been seen in the area and the berries
along the trail are ripe.
(b) For hiking on the trail to be safe, it is necessary but not sufficient that berries not be ripe along
the trail and for grizzly bears not to have been seen in the area.
3. 4 points (Rosen 1.1.30) How many rows appear in a truth table for each of these compound propositions?
(a) (q p) (p q)
(b) (p t) (p s)
(c) (p r) (s t) (u v)
(d) (p r s) (q t) (r t)
4. 10 points (Rosen 1.1.37) Construct a truth table for each of the following compound propositions.
(a) p (q r)
(b) (p q) (p r)
(c) (p q) (p r)
(d) (p q) (q r)
(e) (p q) (q r)
5. 3 points (Rosen 1.1.46) Fuzzy logic is used in artificial intelligence. In fuzzy logic, a proposition has a
truth value that is a number between 0 and 1, inclusive. A proposition with a truth value of 0 is false
and one with a truth value of 1 is true. Truth values that are between 0 and 1 indicate varying degrees of
truth. For instance, the truth value 0.8 can be assigned to the statement Fred is happy, because Fred
is happy most of the time, and the truth value 0.4 can be assigned to the statement John is happy,
because John is happy slightly less than half the time. Use these truth values to solve the following
problem.
(a) The truth value of the conjunction of two propositions in fuzzy logic is the minimum of the truth
values of the two propositions. What are the truth values of the statements Fred and John are
happy and Neither Fred nor John is happy?

Page 2

6. 3 points (Rosen 1.1.48) Is the assertion This statement is false a proposition? Justify your answer.
7. 5 points (Rosen 1.2.10) Are these system specifications consistent? Whenever the system software is
being upgraded, users cannot access the file system. If users can access the file system, then they can
save new files. If users cannot save new files, then the system software is not being upgraded.
Show your work.
8. 3 points Prove or disprove (without using a truth table): (p q) (q p) is a tautology.
9. 3 points Prove that the contrapositive holds (without using a truth table), that is that the following
holds:
p q q p
10. 8 points (Rosen 1.3.10) Show that each of these conditional statements is a tautology by using truth
tables.
(a) [p (p q)] q
(b) [(p q) (q r)] (p r)
(c) [p (p q)] q
(d) [(p q) (p r) (q r)] r
11. 6 points (Rosen 1.3.18) Show that (p q) and p q are logically equivalent without using a truth
table.
12. 6 points (Rosen 1.3.26) Show that p (q r) and q (p r) are logically equivalent without using
a truth table.
13. 6 points (Rosen 1.3.30) Show that (p q) (p r) (q r) is a tautology without using a truth
table.
14. 4 points (Rosen 1.3.50) The following exercise involve the logical operators NAND and NOR. The
proposition p NAND q is true when either p or q, or both, are false; and it is false when both p and q
are true. The proposition p NOR q is true when both p and q are false, and it is false otherwise. The
propositions p NAND q and p NOR q are denoted by p | q and p q, respectively. (The operators | and
are called the Sheffer stroke and the Peirce arrow after H. M. Sheffer and C. S. Peirce, respectively.)
(a) Show that p p is logically equivalent to p.
(b) Show that (p q) (p q) is logically equivalent to p q.
15. 3 points (Rosen 1.3.62) Determine whether this compound propositions is satisfiable:
(p q r) (p q s) (p r s) (p q s) (p q s)
16. 6 points (Rosen 1.4.12) Let Q(x) be the statement x + 1 > 2x. If the domain consists of all integers,
what are these truth values?
(a) Q(0)
(b) Q(1)
(c) Q(1)
(d) xQ(x)
(e) xQ(x)
(f) xQ(x)

Page 3

(g) xQ(x)
17. 6 points (Rosen 1.4.36) Find a counterexample, if possible, to these universally quantified statements,
where the domain for all variables consists of all the real numbers.
(a) x(x2 6= x)
(b) x(x2 6= 2)
(c) x(|x| > 0)
18. 4 points (Rosen 1.5.18) Express each of these system specification using predicates, quantifiers, and
logical connectives, if necessary.
(a) The e-mail address of every user can be retrieved whenever the archive contains at least one message
sent by every user on the system.
(b) For every security breach there is at least one mechanism that can detect that breach if and only
if there is a process that has not been compromised.
19. 6 points (Rosen 1.4.50) Show that xP (x) xQ(x) and x(P (x) Q(x)) are not logically equivalent
by providing a counterexample.
20. 6 points (Rosen 1.5.30) Rewrite each of these statements so that negations appear only within predicates (that is, so that no negation is outside a quantifier or an expression involving logical connectives).
(a) y (Q(y) xR(x, y))
(b) y (xR(x, y) xS(x, y))
(c) y (xzT (x, y, z) xzU (x, y, z))
21. (Bonus: 5 points) Four friends have been identified as suspects for an unauthorized access into a computer
system. They have made statements to the investigating authorities. Alice said Carlos did it. John
said I did not do it. Carlos said Diana did it. Diana said Carlos lied when he said that I did it.
(a) If the authorities also know that exactly one of the four suspects is telling the truth, who did it?
Explain your reasoning.
(b) If the authorities also know that exactly one is lying, who did it? Explain your reasoning.

Page 4