Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Chapter 1: The Foundations: Logic and Proofs

Q55E

Page 36

How many different truth tables of compound propositions are there that involve the propositional variables p and q.

Q56E

Page 36

Show that if p,q and r are compound propositions such that p and qare logically equivalent and q and rare logically equivalent, then pand r are logically equivalent.

Q56E

Page 56

Given the Prolog facts in Example 28, what would Prolog

return when given these queries?

a) ?enrolled(kevin,ee222)

b) ?enrolled(kiko,math273)

c) ?instructor(grossman,X)

d) ?instructor(X,cs301)

e) ?teaches(X,kevin)

Q57E

Page 56

Suppose that Prolog facts are used to define the predicates mother (M,Y) and father (F,X),which represent that Mis the mother of Yand Fis the father of X, respectively. Give a Prolog rule to define the predicate sibling (X,Y), which represents that Xand Yare siblings (that is, have the same mother and the same father).

Q57E

Page 36

The following sentence is taken from the specification of a telephone system: “If the directory database is opened, then the monitor is put in a closed state, if the system is not in its initial state.” This specification is hard to understand because it involves two conditional statements. Find an equivalent, easier-to-understand specification that involves disjunctions and negations but not conditional statements.

Q58E

Page 56

Suppose that Prolog facts are used to define the predicates mother(M,Y)and father(F,X)which represent that Mis the mother of Yand Fis the father of X, respectively. Give a Prolog rule to define the predicate grandfather (X,Y),which represents that Xis the grandfather of Y. [Hint: You can write a disjunction in Prolog either by using a semicolon to separate predicates or by putting these predicates on separate lines.]

Q58E

Page 36

How many of the disjunctions p¬q,¬pq,qr,q¬rand ¬q¬rcan be made simultaneously true by an assignment of truth values to p,q and r ?

Q59E

Page 56

Let P(x),Q(x),andR(x)be the statements “xis a professor,” “xis ignorant,” and “xis vain,” respectively. Express each of these statements using quantifiers; logical connectives; andP(x),Q(x),andR(x)where the domain consists of all people.

a) No professors are ignorant.

b) All ignorant people are vain.

c) No professors are vain.

d) Does (c) follow from (a) and (b)?

Q59E

Page 36

How many of the disjunctions p¬qs,¬p¬rs,¬pq¬s,qr¬s,¬pq¬s,prs,and pr¬s, can be made simultaneously true by an assignment of truth values to p,q,r and s?

Q5E

Page 34

Use a truth table to verify the distributive law.p(qr)(pq)(pr)

Access millions of textbook solutions in one place

  • Access over 3 million high quality textbook solutions
  • Access our popular flashcard, quiz, mock-exam and notes features
  • Access our smart AI features to upgrade your learning
Get Vaia Premium now
Access millions of textbook solutions in one place

Recommended explanations on Math Textbooks