Question: Concept 1.5 (Predicates). Consider the predicates P (n) and Q(n) below with domain D = {0, 1, 2, 3, 4, 5, 6}. P(n):ndividesevenlyinto6 Q(n):12n 4
Concept 1.5 (Predicates). Consider the predicates P (n) and Q(n) below with domain D = {0, 1, 2, 3, 4, 5, 6}. P(n):ndividesevenlyinto6 Q(n):12n 4
List the truth set of each predicate (ad) and truth value of each quantification (eg). (a) P(n) (b) Q(n) (c) P(n)Q(n)
(d) P(n)Q(n) (e) nD, P(n) (f) nD, Q(n)P(n) (g) (nDP(n)Q(n)) Concept 1.6 (Program Routines).
What is the value of x after each of these statements is encountered in a computer program, if x = 1 before the statement is reached? Here a := b means assign (or replace) the value of a with b.
(a) if (x+2=3)or (2x+2=4)then x:=x+1. (b) if (2x+3=5)and (3x+4=7)then x:=x+1.
What value(s) are printed after the following routine is executed? Here range(n,m) means the set of numbers: n, n+1, n+2, ...., m, * means multiplication, ^ is exponentiation, and tabs indicate nested levels (such as used in Python).
for i in range(0,8): if i^2 > 10:
for j in range(i+1,9): print i+j
else: print 5*i
Concept 1.7 (Quantifications). For each quantified statement (a)(b) below do the following:
Determine its truth value.
Express it in symbolic logic form.
Express the negation in symbolic logic form. (Do not just put parentheses around the statement with a negation symbol in front.)
Express the negation as a simple English sentence. (Do not use phrasing such as it is not the case that when expressing negations.)
(a) For every integer m, either m 1 or m2 6. (b) Thereexistintegersaandbsuchthatbothab<0anda+b>0.
Concept 1.8 (Optional: Digital Logic Circuits). Solve problems 16, 17, and 28 from Epp Section 2.4. Then discuss why any digital logic circuit can be constructed using only NOR gates.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
