WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

Similar documents
At least one of us is a knave. What are A and B?

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Packet #1: Logic & Proofs. Applied Discrete Mathematics

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Logic Overview, I. and T T T T F F F T F F F F

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Wollongong College Australia

DISCRETE MATH: FINAL REVIEW

Math 3336: Discrete Mathematics Practice Problems for Exam I

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

MATH 2001 MIDTERM EXAM 1 SOLUTION

CSE 20 DISCRETE MATH WINTER

HANDOUT AND SET THEORY. Ariyadi Wijaya

CSE 20 DISCRETE MATH SPRING

PSU MATH RELAYS LOGIC & SET THEORY 2017

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

CSC 125 :: Final Exam May 3 & 5, 2010

Chapter 1 Elementary Logic

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

CSE 20 DISCRETE MATH. Winter

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Recall that the expression x > 3 is not a proposition. Why?

A Guide to Proof-Writing

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Chapter 2: The Logic of Quantified Statements. January 22, 2010

STRATEGIES OF PROBLEM SOLVING

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

Proofs. Chapter 2 P P Q Q

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

MTH 299 In Class and Recitation Problems SUMMER 2016

CSE 20 DISCRETE MATH. Fall

Homework 3: Solutions

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

1.1 Statements and Compound Statements

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Intro to Logic and Proofs

Logic. Propositional Logic: Syntax

Chapter 2: The Logic of Quantified Statements

PROPOSITIONAL CALCULUS

The Process of Mathematical Proof

Discrete Mathematics Exam File Spring Exam #1

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

MATH CSE20 Homework 5 Due Monday November 4

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

RED. Name: Instructor: Pace Nielsen Math 290 Section 1: Winter 2014 Final Exam

DISCRETE MATHEMATICS BA202

Exercise Set 1 Solutions Math 2020 Due: January 30, Find the truth tables of each of the following compound statements.

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.

Topics in Logic and Proofs

Chapter 3. The Logic of Quantified Statements

Full file at

CSE 1400 Applied Discrete Mathematics Proofs

Logic and Proof. Aiichiro Nakano

Math 13, Spring 2013, Lecture B: Midterm

Discrete Mathematical Structures: Theory and Applications

COT 2104 Homework Assignment 1 (Answers)

ECOM Discrete Mathematics

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Properties of the Integers

1.1 Language and Logic

Lecture : Set Theory and Logic

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Foundation of proofs. Jim Hefferon.

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Mat 243 Exam 1 Review

Logic, Sets, and Proofs

Carmen s Core Concepts (Math 135)

Introduction to Sets and Logic (MATH 1190)

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

Introduction to Decision Sciences Lecture 2

Logic. Propositional Logic: Syntax. Wffs

Mathematics Review for Business PhD Students

Basic Logic and Proof Techniques

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Propositional Logic, Predicates, and Equivalence

1.1 Language and Logic

Logic, Proof, Axiom Systems

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Predicate Logic & Quantification

Do not start until you are given the green signal

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

Proofs. Chapter 2 P P Q Q

Logic and Proofs. (A brief summary)

Review 1. Andreas Klappenecker

Announcements. Exam 1 Review

Algebra 1. Standard 1: Operations With Real Numbers Students simplify and compare expressions. They use rational exponents and simplify square roots.

Logic, Set Theory and Computability [M. Coppenbarger]

Introduction to Set Operations

Geometry: Notes

Transcription:

WUCT11 Discrete Mathematics Logic Tutorial Exercises 1 Logic Predicate Logic 3 Proofs 4 Set Theory 5 Relations and Functions WUCT11 Logic Tutorial Exercises 1

Section 1: Logic Question1 For each of the following collections of words: (a) Determine if it is a statement (b) If it is a statement, determine if it is true or false (c) Where possible, translate the statement into symbols, using the connectives presented in lectures (i) If x = 3, then x < (ii) If x = 0 or x = 1, then x = x (iii) There exists a natural number x for which x = x (iv) If x and x > 0, then if x > 1 then x > 1 (v) xy = 5 x = 1 and y = 5 or x = 5 and y = 1 (vi) xy = 0 x = 0 or y = 0 (vii) If x and y are real numbers, xy = yx (viii) There is a unique even prime number Question Translate into symbols the following compound statements and give the form of the compound statement In each case, list the statements p, q, r (a) If x is odd and y is odd then x + y is even (b) It is not both raining and hot (c) It is neither raining nor hot (d) It is raining but it is hot (e) x Question3 Let P be the statement Mathematics is easy and Q be the statement I do not need to study Write down in words the following statements, and simplify if possible: (a) P Q (d) ~ P (a) P Q (e) ~ P Q (b) ~ Q (f) P Q (c) ~ ~ Q Question4 Let p and q be statements (a) Write down the truth tables for ( ~ p q) q and ( p q) q ~ What do you notice about the truth tables? Based on this result, a creative student concludes that you can always interchange and without changing the truth table Is the student right? (b) Write down the truth tables for ( ~ p q) p and ( p q) p ~ What do you think of the rule formulated by the student in 4(a)? WUCT11 Logic Tutorial Exercises

Question5 (a) Construct truth tables for the compound statements p ~ p and p ~ p (b) What do you notice about each of the statements in part (a)? (c) Determine the truth-value of the compound statements p ~ p and ( p ~ p) q What do you notice? ( ) q Question6 (a) Construct truth tables for the compound statements ( p p) ( q r) q r What do you notice? ~ and (b) Construct truth tables for the compound statements ( p p) ( q r) q r What do you notice? ~ and Question7 Determine which of the following statements are tautologies using the quick method where possible (a) ( p q) ( p ~ q) (b) ~ ( p q) ( q p) (c) ( p q) ( ~ r ( p q) ) Question8 Using Logical Equivalences and Substitution of Equivalence, write the following expressions using only, and ~ Further, write the expression in the simplest form (a) ( p q) r (b) p ( p q) Question9 Let p, q and r be statements Using Logical Equivalences, Substitution and Substitution of Equivalence, prove the following (g) ~ ( p q) ( p ~ q) (h) (( p ~ q) r) ( p ( q r) ) Question10 In each case, decide whether the proposition is True or False Give some reasons (a) If x is a positive integer and x 3 then x = 1 ~ x > 1 ~ y 0 ~ x 1 y > 0 (b) ( ( ) ( )) (( ) ( )) Question11 Using Logical Equivalences and Substitution of Equivalence, write the following logical expressions using and only (even without ~) (a) ~ ( x > 1) ~ ( y 0) (b) ( y 0 ) ( x > 1) Question1 Simplify the expression ~ ( ~ ( p q) ~ q), using Logical Equivalences WUCT11 Logic Tutorial Exercises 3

Section :Predicate Logic Question1 Write each of the following statements in words Write down whether you think the statement is true or false (a) x, ( x 0 ( x > 0 x < 0) ) (b) x x (c) students s in WUCT11, an assigned problem p, s can correctly solve p Question Write each of the following statements using logical quantifiers and variables Write down whether you think the statement is true or false (a) If the product of two numbers is 0, then both of the numbers are 0 (b) Each real number is less than or equal to some integer (c) There is a student in WUCT11 who has never laughed at any lecturer s jokes Question3 Translate each of the following statements into the notation of predicate logic and simplify the negation of each statement Which statements do you think are true? (a) P: Someone loves everybody (b) P: Everybody loves everybody (c) P: Somebody loves somebody (d) P: Everybody loves somebody (e) P: All rational numbers are integers (f) P: Not all natural numbers are even (g) P: There exists a natural number that is not prime (h) P: Every triangle is a right triangle Question4 Are the following statements true or false? Give brief reasons why (a) x, ( x > 1 x > 0) (b) x, ( x > 1 x > ) (c) x, ( x > 1 x > x) (d) x, x > 1 x 1 < x + 1 3 (e) x, y x + y = 9 (f) x, y x < y + 1 (g) x, y x + y 0 (h) x, y ( x < y x < y ) Question5 For each of the following statements, (a) Write down the negation of the statement, (b) Write down whether the statement or its negation is false, and (c) THINK about how you would disprove it WUCT11 Logic Tutorial Exercises 4

(i) (ii) (iii) ξ > 0, x 0, x < ξ y, x y < x x + y y, x x < y x < < y Question6 Write down the negations of the following statements (a) P : x, x = (b) Q : x, x + 1 x Question7 Write the following statements using quantifiers Find their negations and determine in each case whether the statement or its negation is true, giving a brief reason (a) P: For each real number, there is a smaller real number (b) Q: Every real number is either positive or negative Question8 Write down the negations of the following statements In each case decide whether the statement or its negation is true (a) x, x 0 (b) z,( z isodd) ( z iseven) (c) n,( n iseven n is prime) (d) y + 1 y, y 0 < 1 y (e) x, y, xy = 1 (f) n, p, n = p (g) ε, x, y,( ε > 0 x y < ε ) Question9 Write down the negations of the following statements In each case decide whether the statement or its negation is false, giving a brief reason > (a) y,( y > 1 y 1) (b) x, x + 1 = 0 (c) x, y, z, x ( y z) ( x z (d) x, y, x + y = 0 Question10 Write the following statements using quantifiers Find their negations and determine in each case whether the statement or its negation is false, giving brief reason where possible (a) P: For each natural number there is a smaller natural number (b) P: The square of any real number is non-negative (c) P: Some dogs are vegetarians (d) P: There is a real number that is rational (e) P: Every student likes at least one Mathematics subject WUCT11 Logic Tutorial Exercises 5

Section 3: Proofs Question1 Each of the following demonstrates the Rule of Modus Ponens, Modus Tollens or the Law of Syllogism In each case, answer the question or complete the sentence and indicate which of the logical rules is being demonstrated (a) If Peter is unsure of an address, then he will phone Peter is unsure of John s address What does Peter do? (b) If x 3x + = 0, then ( x )( x ) = 0 If ( x )( x ) = 0, then x = 0 or x = 0 If x = 0 or x = 0, then x = or x = 1 Therefore, if x 3x + = 0, then (c) We know that if x is a real number, then its square is positive or zero If y =, what do we know about y? Question Prove or disprove the following statements (a) For all n, the expression n + n + 9 is prime (b) x, y xy 1 (c) a, b, ( a + b) = a + b (d) The average of any two odd integers is odd Question3 Find the mistakes in the following proofs (a) Result: k, k > 0 k + k + 1 is not prime Proof: For k =, k + k + 1 = 9, which is not prime Therefore the result is true (b) Result: The difference between any odd integer and any even integer is odd Proof: Let n be any odd integer and m be any even integer By definition of odd n = k + 1, k, and by definition of even m = k, k Then n m = ( k + 1) k = 1 But 1 is odd Therefore the result holds Question4 Prove each of the following results using a direct proof: (a) For x, x + 1 x (b) For n if n is odd, n is odd (c) The sum of any two odd integers is even (d) If the sum of two angles of a triangle is equal to the third angle, then the triangle is a right angled triangle Question5 Prove that if x is a negative real number, then ( x ) 4 > n Question6 Prove that there is an integer n > 5, such that is prime Question7 Prove that for each integer n such that 1 n 10, n n + 41 is a prime number WUCT11 Logic Tutorial Exercises 6

Question8 Prove that if n is an odd integer, then ( ) = n Question9 Prove, by contraposition, that if n is even, then n is even Question10 Prove by cases, if m is an integer, then m + m + 1 is always odd 1 1 1 Question11 Disprove the statement: a, b, a 0, b 0, = + Are there a + b a b any values for a, b that make the statement true? Explain Question1 Prove or disprove this statement: For all integers, a, b if a < b, then a < b Question13 Question14 Prove if n is odd, then n is odd Prove there is no smallest positive real number Question15 Prove each of the following using proof by cases (a) If x = 4, 5, or 6, then x 3x + 1 x (b) x, x 0 + 3 4 Question16 x Prove there is a perfect square that can be written as the sum of two other perfect squares (Note an integer n is a perfect square if and only if k, n = k ) Question17 Prove that the product of two odd integers is also an odd integer Question18 Prove or disprove the following statements: (a) The difference between any two odd integers is also an odd integer (b) For any integer n, 3 n (6n + 3) (c) The cube of any odd integer is an odd integer (d) For any integers a, b, c, if a c, then ab c (e) There is no largest even integer (f) For all integers a, b, c, if a / bc, then a / b (g) For all integers n, (h) For any integers a, b, if 4( n n + 1) 3n b a b + is a perfect square a then (i) For all integers n, n n + 41 is prime (j) For all integers, n and m, if n m is even, then 3 3 n m is even Question19 Prove that the product of any four consecutive numbers, increased by one, is a perfect square? WUCT11 Logic Tutorial Exercises 7

Section 4: Set Theory Question1 Let U = Let A = { 1}, B = (0,1) = { x : 0 < x < 1} and C = [ 0,1] = { x : 0 x 1} Write down the following sets: (a) A B (f) A (b) A B (g) C (c) B C (h) C A (d) A C (i) C B (e) A C (j) A C Are any of the pairs of sets A, B and C disjoint? Question Let U = Let A = { x : x is odd}, B = { x : x is even} and P = { x : x is prime} Write down the following sets: (a) A B (f) A (b) A B (g) P (c) B P (h) P A (d) A P (i) B P (e) A P (j) A B Are A and B disjoint? Is P A? Question3 Let X = {1,,3, 4,5} (a) Write down the set P ( X ) by listing its elements (b) How many elements in P ( X )? (c) Is P( X )? (d) Is { } P( X )? Question4 Write down the set P ( ) by listing its elements How many elements in P ( )? Question5 Let X = { 1,,3, K, n}, that is, X is a finite set with n elements How many elements does P ( X ) have? Question6 Let X = {1,,3 } For each of the following statements, write down whether it is True or False Give reasons (a) B P ( X ), C P( X ), ( B C C B) (b) B P ( X ), C P( X ), B C (c) B P ( X ), C P( X ), C B (d) The number of proper subsets of X is 3 1 WUCT11 Logic Tutorial Exercises 8

Question7 Let X = {1, } Write down the set P ( P( X )) by listing its elements If Y = {1,,3 }, how many elements would be in the set P ( P( Y ))? Write down two elements of P ( P( Y )) Question8 Can you write down two elements of P ( )? Can you list the elements of P ( )? What can you say about the set P ( )? Is [, 1] = { x x x 1} P( ) Question9 Let = {1,,3 } Question10 Let } X Draw the Hasse Diagram for P ( X ) X = {1,,3, 4 Try to draw the Hasse Diagram for ( X ) P Question11 Using the Principle of Mathematical Induction, prove that if X = { 1,,3, K, n}, that is, X is a finite set with n elements, then the number of n elements in P ( X ) is (A procedure for determining the number of sets is sufficient for the inductive step) Question1 Give examples to demonstrate the following results (a) P ( X ) P( Y ) P( X Y ) but P ( X ) P( Y ) P( X Y ) (b) P ( X ) P( Y ) = P( X Y ) Question13 Let U be the universal set and let A, B and C be subsets of U Use a typical element argument to prove the following set theoretic results (a) A B A C B C (b) ( A B) B = B Question14 Let U be the universal set and let A, B and C be subsets of U Using properties of union, intersection and complement and known set laws, simplify the following: (a) ( A B ) A (b) ( C B) C Question15 Prove or disprove: { } 1+ 0, 1 = n : k n = ( ) k (c) ( A ) U (d) ( A U ) A Question16 Let U = Let A = { n : k n = k } and let B = { m : p m = 3p + } Write down 4 elements from each set Show that t A B w,( w is odd t = 3w + ) Question17 Let U be the universal set and let A, B and C be subsets of U Use a typical element argument to prove the following set theoretic results (a) ( A B) = A B (b) A ( B C) = ( A B) C WUCT11 Logic Tutorial Exercises 9

Question18 Let U be the universal set and let A, B and C be subsets of U Using properties of union, intersection and complement and known set laws, simplify the following: (a) ( C U ) C (b) ( A U ) A (c) ( C ) C (d) ( A B) A Question19 Let O = { n : n is odd} and let T = { n : n is odd} Prove or disprove: (a) T O (b) O T (c) T = O Question0 Let T = { n : x, y z = x + y } and let E = { z : z is even} Prove or disprove T E Question1 Let U be the universal set and let A, B and C be subsets of U Prove or disprove the following: (a) ( A B) = A A B (b) ( A B) = ( A C) B = C Question Determine if the following statements are true or false: (a) A B = A B (b) ( A B A B ) B = (c) A and B A are disjoint WUCT11 Logic Tutorial Exercises 10

Section 5: Relations and Functions Question1 Let A = {1, }, B = {0,,3} and C = { a, b} (a) List the elements and sketch the graphs in of : (i) A B (ii) A A (iii) B A (b) Is A B B B (c) List the elements of ( A B) C and ( A C) ( B C) What do you notice? (d) List the elements of ( A B) C and C ( A A) Question Let A = {1, } and D = { a, b} Write down D A Will this be the same as A D? Question3 Let A = { x : 0 < x < 1}, B = { x : < x < 3} and C = { x : 0 x 1} (a) Sketch the graph of (b) Sketch the graph of A B in C C in Note: (c) Sketch the graph of C in Question4 Let A = a, a, Ka } and B = b, b, Kb } { 1 n (a) How many elements in A B? (b) Write out the elements of A B Question5 Let A, B and C be elements of P ( U ) ( A B) C = ( A C) ( B C) Question6 C C is called the until square in { 1 m Prove that Sketch the graphs of the following relations in (a) R = {( x, : x = y x = } 1 y = {( x, : x y = 0 3 = {( x, : y = x 4 = {( x, : ( x ( x = (b) R } (c) R + } (d) R 0} Question7 Sketch the graphs of the following relations in (a) R = {( x, : x = } 1 y = {( x, : ( x (4x + 9y 36) = (b) R 0} Question8 Let A = {,3,4} and B = {6,8,10} and define the relation R from A to B as follows: R = {( x, : x is a factor of y} (a) List the elements of R (b) Graph A B and circle the elements of R (c) True or false? (i) 4R6 (iv) (,10) R (ii) 4R8 (v) ( 4,1) R (iii)( 3,8) R Question9 Define the relations R and S on as follows: R = {( x, : y = x } S = {( x, x) : x = 0} Find simple expressions for the relations: (a) R S on (b) R S on WUCT11 Logic Tutorial Exercises 11

Question10 Write down the domain and range of the relation R on the given set A A = { h : h is a human being}, R = {( h1, h ) : h1 is the sister of h} Question11 Let A = {3, 4,5} and B = {4,5,6} and define the relation R from A to B as follows: R = {( x, : x < y} Write down R and R by listing their elements x y Question1 For the relation T on given by T = {( x, : + = 1}, find and 4 9 expression for the inverse relation T Sketch both T and T Question13 Determine whether or not the given relation is reflexive, symmetric or transitive Give a counterexample in each case in which the relation does not satisfy the property (a) R 1 on the set A = { h : h is a human being} given by R 1 = {( h1, h ) : h1 is the sister of h} (b) R on the set A = { a, b, c, d} given by R = {( a, a),( a, b),( b, a),( b, b),( b, c),( c, b),( c, c),( d, d )} Question14 Determine whether or not the following relation is an equivalence relation R on A = {0,1,,3} given by R = A A Question15 Show that the relation R on the set A = {0,1,,3, 4} given by R = {(0,0),(0, 4),(1,1),(1,3),(, ),(3,1),(3,3),(4,0),(4, 4)} is an equivalence relation Find all the classes of R Question16 Is the following relation a function? Give brief reason, = x : x, where R on [ ] { } R = {( x, : y = 1 ( x ) y = 1 1 ( x + 1) } Question17 Determine whether or not the following functions are: (a) one-to-one, give brief reasons (b) onto Give brief reasons (i) Let A = {1,5,9 } and B = {3, 4,7} F 1 A B and F 1 = {(1,7),(5,3),(9, 4)} (ii) F on and F = {( x, : y = x} Question18 Let A = {4,5,6} and B = {5,6,7} and define the relations S and T from A to B as follows: S = {( x, : x y is even} and T = {(4, 6),(6, 5),(6,7)} (a) Find expressions for S and T (b) Which of S, T, S and T are functions? Question19 Simplify the following: (a) ( 1 3 4)(3 4) (b) (1 3 4) (c) ( 5 4 1) (d) ( 3 )(3 4)(3 1)(4 ) WUCT11 Logic Tutorial Exercises 1