barcodefontsoft.com

Propositional logic in Software Generator barcode 39 in Software Propositional logic

1 Propositional logic using barcode generation for software control to generate, create barcode code39 image in software applications. VS 2010 Figure 1.21. A tree that re Software barcode 39 presents an ill-formed formula.

* 5. For the parse tree in Figure 1.22 nd the logical formula it represents.

6. For the trees below, nd their linear representations and check whether they correspond to well-formed formulas: (a) the tree in Figure 1.10 on page 44 (b) the tree in Figure 1.

23. * 7. Draw a parse tree that represents an ill-formed formula such that (a) one can extend it by adding one or several subtrees to obtain a tree that represents a well-formed formula; (b) it is inherently ill-formed; i.

e. any extension of it could not correspond to a well-formed formula. 8.

Determine, by trying to draw parse trees, which of the following formulas are well-formed: (a) p (p q) (r s) (b) p (p q s) (r s) (c) p (p s) (r s). Among the ill-formed formulas above which ones, and in how many ways, could you x by the insertion of brackets only . Exercises 1.4 * 1. Construct the truth ta bar code 39 for None ble for p q and verify that it coincides with the one for p q. (By coincide we mean that the respective columns of T and F values are the same.

) 2. Compute the complete truth table of the formula * (a) ((p q) p) p (b) represented by the parse tree in Figure 1.3 on page 34.

1.7 Exercises Figure 1.22. A parse tree of a negated implication. 1 Propositional logic Figure 1.23. Another parse Software 39 barcode tree of a negated implication.

* (c) p ( (q (r q))) (d) (p q) (p q) (e) ((p q) p) q (f) (p q) (p q) (g) ((p q) p) p (h) ((p q) r) ((p r) (q r)) (i) (p q) ( p q). 3. Given a valuation and a parsetree of a formula, compute the truth value of the formula for that valuation (as done in a bottom-up fashion in Figure 1.

7 on page 40) with the parse tree in * (a) Figure 1.10 on page 44 and the valuation in which q and r evaluate to T and p to F; (b) Figure 1.4 on page 36 and the valuation in which q evaluates to T and p and r evaluate to F; (c) Figure 1.

23 where we let p be T, q be F and r be T; and (d) Figure 1.23 where we let p be F, q be T and r be F. 4.

Compute the truth value on the formula s parse tree, or specify the corresponding line of a truth table where * (a) p evaluates to F, q to T and the formula is p ( q (q p)) * (b) the formula is (( q (p r)) (r q)), p evaluates to F, q to T and r evaluates to T.. 1.7 Exercises * 5. A formula is valid i 3 of 9 for None it computes T for all its valuations; it is satis able i it computes T for at least one of its valuations. Is the formula of the parse tree in Figure 1.

10 on page 44 valid Is it satis able 6. Let be a new logical connective such that p q does not hold i p and q are either both false or both true. (a) Write down the truth table for p q.

(b) Write down the truth table for (p p) (q q). (c) Does the table in (b) coincide with a table in Figure 1.6 (page 38) If so, which one (d) Do you know already as a logic gate in circuit design If so, what is it called 7.

These exercises let you practice proofs using mathematical induction. Make sure that you state your base case and inductive step clearly. You should also indicate where you apply the induction hypothesis.

(a) Prove that (2 1 1) + (2 2 1) + (2 3 1) + + (2 n 1) = n2 by mathematical induction on n 1. (b) Let k and l be natural numbers. We say that k is divisible by l if there exists a natural number p such that k = p l.

For example, 15 is divisible by 3 because 15 = 5 3. Use mathematical induction to show that 11n 4n is divisible by 7 for all natural numbers n 1. * (c) Use mathematical induction to show that 12 + 22 + 32 + + n2 = n (n + 1) (2n + 1) 6.

for all natural numbers n 1. * (d) Prove that 2n n + 12 for all natural numbers n 4. Here the base case is n = 4.

Is the statement true for any n < 4 (e) Suppose a post o ce sells only 2c and 3c stamps. Show that any postage of . 2c , or over, can be paid for using only these stamps. Hint: use mathematical induction on n, where nc is the postage. In the inductive step consider two possibilities: rst, nc can be paid for using only 2c stamps. Second, paying nc requires the use of at least one 3c stamp. (f) Prove that for every p Software Code 39 Full ASCII re x of a well-formed propositional logic formula the number of left brackets is greater or equal to the number of right brackets. * 8. The Fibonacci numbers are most useful in modelling the growth of populations.

def def def We de ne them by F1 = 1, F2 = 1 and Fn+1 = Fn + Fn 1 for all n 2. So def F3 = F1 + F2 = 1 + 1 = 2 etc. Show the assertion F3n is even.

by mathematical induction on n 1. Note that this assertion is saying that the sequence F3 , F6 , F9 , . .

. consists of even numbers only..

Copyright © barcodefontsoft.com . All rights reserved.