discrete mathematics math 006 (tip reviewer)

12
Logic: study or science of correct reasoning All angels are saints All saints are sinners Hence, all angels are sinners. It's correct. Look not on the contents but on the relationships. It should be a declarative statement. 1. It should be answerable by True or False. 2. Proposition: Declarative statement that is of true value or false value but not both at the same time Examples: Real numbers are all numbers that can be found on the number line. a. Complex numbers are numbers in the form of a+bi, where a and b are real numbers b. Real numbers are just complex numbers where b = 0. c. All real numbers are complex numbers. Answer: Proposition / True 1. Because it is not a declarative statement. It is an exclamatory statement. a. Run! Answer: Not a proposition 2. One (1) is uncategorized prime or composite. a. One (1) is a prime number. Answer: Proposition / False 3. We just don't know if the event really happened or not. a. Jemma bought a ticket. Answer: Proposition / Undefined 4. It is an imperative statement. a. Peel me a grape. Answer: Not a proposition 5. Identify if they are propositions or not. - TRUE if both are true a. Conjunction = p and q / p ^ q 1. TRUE if one or both of them is true a. Disjunction / p or q / (p v q) 2. TRUE if one of them is true a. FALSE if both are true. b. Exclusion or / p exclusive or q / p q 3. Negation / p is not p / ṕ 4. Logical Connectives Truth Table p q p ^ q p v q p q ~P T T T T F F T F F T T F F T F T T T F F F F F T 2 n is the number of rows where n is the number of propositions P = Ric drove a car 1) Q = Jen got a car Examples: Logic Discrete Mathematics Page 1

Upload: james-lindo

Post on 30-Jan-2016

41 views

Category:

Documents


14 download

DESCRIPTION

Discrete Mathematics MATH 006 (TIP Reviewer) James Lindo

TRANSCRIPT

Page 1: Discrete Mathematics MATH 006 (TIP Reviewer)

Logic: study or science of correct reasoning

All angels are saintsAll saints are sinnersHence, all angels are sinners.It's correct. Look not on the contents but on the relationships.

It should be a declarative statement.1.It should be answerable by True or False.2.

Proposition: Declarative statement that is of true value or false value but not both at the same time

Examples:

Real numbers are all numbers that can be found on the number line.a.Complex numbers are numbers in the form of a+bi, where a and b are real numbersb.Real numbers are just complex numbers where b = 0.c.

All real numbers are complex numbers. Answer: Proposition / True1.

Because it is not a declarative statement. It is an exclamatory statement.a.Run! Answer: Not a proposition2.

One (1) is uncategorized prime or composite.a.One (1) is a prime number. Answer: Proposition / False3.

We just don't know if the event really happened or not.a.Jemma bought a ticket. Answer: Proposition / Undefined4.

It is an imperative statement.a.Peel me a grape. Answer: Not a proposition5.

Identify if they are propositions or not.

-

TRUE if both are truea.Conjunction = p and q / p ^ q1.

TRUE if one or both of them is truea.Disjunction / p or q / (p v q)2.

TRUE if one of them is truea.FALSE if both are true.b.

Exclusion or / p exclusive or q / p ⊕ q3.

Negation / p is not p / ṕ4.

Logical Connectives

Truth Table

p q p ^ q p v q p⊕ q ~P

T T T T F F

T F F T T F

F T F T T T

F F F F F T

2n is the number of rows where n is the number of propositions

P = Ric drove a car1)Q = Jen got a car

Examples:

Logic

Discrete Mathematics Page 1

Page 2: Discrete Mathematics MATH 006 (TIP Reviewer)

Q = Jen got a car

p ^ q = Ric drove a car and Jen got a car.p v q = Ric drove a car or Jen got a car.~P v ~Q = Ric did not drove a car or Jen did not get a car.

P: 3+4 = 61)Q: 2+8 ≤ 3-5R: 6-2 > 4+3

Answer:

~P ^ ~Q: 3+4 ≠6 and 2+8 > 3-5Q v ~R: 2+8 ≤ 3-5 or 6-2 ≤ 4+3

Answers:

The conclusion determines if it's true or false.a.If p is false and q is false, then the statement is true.b.

Conditional where p is the hypothesis and q is the conclusion / if p then q / p --> q4.

TRUE if both values are the samea.Biconditional where p is the hypothesis and q is the conclusion / p iff q / p <---> q5.

Truth Table

p q p ---> q p <---> q

T T T T

T F F F

F T T F

F F T T

Inverse of p --> q is ~p --> ~q (negation)6.Converse of p --> q is q --> p (baliktad)7.Contrapositive of p --> q is ~q to ~ (baliktad and negation)8.

When my ears hurt, Jen sings.1.Example:

Answers:* When, If, a necessary condition + premise, conclusion* "A sufficient condition" follows a conclusion before hypothesis

P = When my ears hurtQ = Jenny sings

P --> Q: If my ears hurt, then Jenny singsInverse: ~P --> ~Q / If my ears doesn't hurt, then Jenny doesn't sing.Converse: Q --> P / If Jenny sings, then my ears hurt. Contrapositive: ~Q --> ~P / If Jenny doesn't sing, then my ears don't hurt.

Rex can dance only if he can sing.2.

Answers:P --> Q: If Rex can sing, then he can dance.Inverse: ~P --> ~Q: If Rex cannot sing, then he cannot dance.Converse: Q --> P: If Rex can dance, then he can sing

Discrete Mathematics Page 2

Page 3: Discrete Mathematics MATH 006 (TIP Reviewer)

Converse: Q --> P: If Rex can dance, then he can singContrapositive: ~Q --> ~P: If Rex cannot dance, then he cannot sing.Q-->~P: If Rex can dance, then he cannot sing.

A necessary condition for the Spurs to win the game is that the Miami quits the game.3.

Answers:P --> Q: If the Spurs wins the game, then the Miami quits the game.Inverse: ~P ---> ~Q: If the Spurs didn't win the game, then the Miami didn't quit the game.Converse: Q --> P: If the Miami quits the game, then the Spurs wins the game.Contrapositive: ~Q --> ~P: If the Miami doesn’t quit the game, then the Spurs doesn't win the game

A sufficient condition for Erica to go to Manila is that she lives in Pureza4.

P --> Q: If Erica lives in Pureza, then she can go to ManilaInverse: ~P --> ~Q: If Erica doesn't live in Pureza, then she cannot go to Manila.Converse: Q --> P: If Erica can go to Manila, then she lives in PurezaContrapositive: ~Q --> ~P: If Erica cannot go to Manila, then she doesn't live in Pureza.

p^q --> ~q v r1.Create a Truth Table:

p q r p ^ q ~q ~q v r p^q --> ~q v r

T T T T F T T

T T F T F F F

T F T F T T T

T F F F T T T

F T T F F T T

F T F F F F T

F F T F T T T

F F F F T T T

~ (P-->~Q) ⊕ (q v ~r )2.

p q r ~q p --> ~q ~ ( p --> ~q) ~r q v ~r ~ (P-->Q) ⊕ (q v ~r )

T T T F F T F T F

T T F F F T T T F

T F T T T F F F F

T F F T T F T T T

F T T F T F F T T

F T F F T F T T T

F F T T T F F F F

F F F T T F T T T

~(P --> (~q ^ ~r) v (p⊕r))3.

Discrete Mathematics Page 3

Page 4: Discrete Mathematics MATH 006 (TIP Reviewer)

p q r ~q ~r (~q ^ ~r) p --> (~q v ~ r) p⊕r C ~C

T T T F F F F F F T

T T F F T F F T T F

T F T T F F F F F T

T F F T T T T T T F

F T T F F F T T T F

F T F F T F T F T F

F F T T F F T T T F

F F F T T T T F T F

Discrete Mathematics Page 4

Page 5: Discrete Mathematics MATH 006 (TIP Reviewer)

An argument is a sequence of propositions written in:

Or

Rules of Inference:

Discrete Mathematics Page 5

Page 6: Discrete Mathematics MATH 006 (TIP Reviewer)

(You can conjunct two different conditional proposition)

Discrete Mathematics Page 6

Page 7: Discrete Mathematics MATH 006 (TIP Reviewer)

Discrete Mathematics Page 7

Page 8: Discrete Mathematics MATH 006 (TIP Reviewer)

2.1 Sets

Well-designed (clear/specific)a.Collection (group of any objects or no objects)b.Distinct (unique / no repetitions)c.

Set is a well-designed collection of distinct objects.

*A set (upper case letter) is an unordered collection of objects, called elements or members (lower case letters) of the set.*a∈A to denote that a is an element of the set A. *a"∈A denotes that a is not an element of the set A.*Sets can have other sets as members. *The order in which the elements of a set are listed does not matter. {1, 3, 5} = {3, 5, 1}*It does not matter if an element is listed more than once. {1,1,1,3,3,3,5,5,5,} = {3, 5, 1}

3 Methods in Writing Sets

1. Rule Method: describes the elements of a given set

2. Roster Method: list all the elements of a given set*Seemingly unrelated elements are possible.*Describes a set without listing all of its members through ellipsis (…) when the general pattern of the elements is obvious.

The set V of all vowels in the English alphabet can be written as V={a, e, i, o, u}1.The set O of odd positive integers less than 10 can be expressed by O={1,3,5,7,9}.2.{a,2,Fred,New Jersey} is the set containing the four elements a, 2, Fred, and New Jersey.3.The set of positive integers less than 100 can be denoted by {1,2,3,...,99}4.

Examples:

3. Set Builder Notation: uses letters to represent numbers*stating the property or properties they must have to be members*If no numbers, nothing to represent

the set O of all odd positive integers less than 10 can be written as O = {x|x is an odd positive integer less than 10} or 1.O={x∈Z+|x is odd and x<10}

2.

Examples:

Rule Method Roster Method Set Builder Notation

A = {All integers from 6 and 10} A = {6,7,8,9,10} A = {x∈Z|6≤x≤10}

B = {All Integers from 12 to 14} B = {12, 13, 14} B = {x∈Z|12≤x<15}

C = {First three months of the Gregorian Calendar} C = {January, February, March} None

D = {Positive even integers from 2 to 10} D = {2, 4, 6, 8, 10} D = {n∈Z|1≤n≤10 and n is even}

E = {All prime numbers from 2 to 7} E = {2, 3, 5, 7} E = {x∈Z|1≤x≤10 and x is prime}

*Set A is equal to Set B (A = B): if they have the same elements. A = B = A⊆B and B⊆A

Sets and Subsets:*Universal Set (U) = contains all the objects under consideration

*Every nonempty set S is guaranteed to have at least two subsets, the empty set (∅⊆S) and the set S itself (S⊆S).*Subset (A⊆B) = A is a subset of B (all elements of A are in B). (Lahat ng elements ng A within B)

*For A⊂B to be true, it must be the case that A⊆B and there must exist an element x of B that is not an element of A.*Proper Subset (A⊂B) = A is a proper subset of B if A is not equal to B. (Lahat ng elements ng A within B at mas malaki si B dapat)

Set TheoryFriday, August 01, 2014 7:45 PM

Discrete Mathematics Page 8

Page 9: Discrete Mathematics MATH 006 (TIP Reviewer)

*For A⊂B to be true, it must be the case that A⊆B and there must exist an element x of B that is not an element of A.*A proper subset can be a subset too!

Kinds of Sets:*Cardinality of sets|n|= positive number of elements in a set.*Finite Set = a set with countable numbers with n cardinality *Infinite Set = a set with uncountable number of elements. Undefined cardinality. The set of positive integers is infinite*Null Set or Empty Set (∅) = set containing no elements. Zero cardinality.*Singleton Set {∅} = set containing one element. One cardinality

*Power set of a null set is itself. P(∅) = {∅}*If a set has n elements, its power set should contain 2n elements.

Finite Seta.Cardinality = 3b.

K = {10, 20,30}1.

Infinite Set (due to the ellipsis)a.Cardinality: Undefinedb.

L = {4,5,6,7…}2.

Finite Seta.Cardinality = 1b.

O = {0}3.

Null Seta.Cardinality = 0b.

P = { }4.

W = {6, 7, 8, 9, 10}5.X = {7, 8, 9}Y = ∅

W ⊆ X: False.a.X ⊆W: True.b.Y ⊆ Z: True.c.Z ⊆ Y. False.d.X ⊂W. True.e.Z ⊂ X. False.f.

Z = {8, 9, 7}

*Power Set (P(S)) = set containing all of its subsets.

List all the elements of the set {x|x is the square of an integer and x<100} = {0,1,4,9,16,25,36,49,64,81}1.A= {{1}} and B = {1,{1}} = Unequal Sets2.2 is not an element of {{2},{{2}}} / {{2},{2,{2}}} / {{{2}}}3.∅∈{0} --> False, because ∅ is a set, not an element.4.

P({a, b,{a, b}}) = 8a.P({∅,a,{a},{{a}}} = 16b.P(P(∅)) = 2c.

Find the number of elements of the power set of:5.

Questions:

Cardinality of two unioned sets (principle of inclusion-exclusion): |A∪B|=|A|+|B|−|A∩B|a.Union (A∪B) = Pagsamahin. 1.

No intersection? A and B are disjointsa.Intersection (A∩B) = Common Elements2.

Another denotation (A\B) a.Also called as the complement of B with respect to Ab.

Difference (A-B) = Tanggalin lahat ng elements ng B from A.3.

Complement of A (A') = U - A4.

2.2 Set Operations:

Discrete Mathematics Page 9

Page 10: Discrete Mathematics MATH 006 (TIP Reviewer)

Complement of A (A') = U - A4.Exclusive Union or Symmetric Difference: A⊕B=(A∪B)−(A∩B)5.

Discrete Mathematics Page 10

Page 11: Discrete Mathematics MATH 006 (TIP Reviewer)

Number theory - the part of mathematics devoted to the study of the set of integers and their properties.Modular arithmetic operates with the remainders of integers z they are divided by a fixed positive integer, called the modulus.*Given two positive numbers, a (the dividend) and n (the divisor), a modulo n (abbreviated as a mod n) is the remainder of the Euclidean division of a by n.

Division:a|b = a divides b* There is an integer c such that b=ac, or equivalently, if b/a is an integer.* When a divides b, we say that a is a factor or divisor of b, and that b is a multiple of a.* a |/ b = "a doesn't divide b"

Theorem 1:*Let a, b, and c be integers, where a=/0. Then:(i) if a|b and a|c, then a|(b+c);(ii) if a|b,then a|bc for all integers c;(iii) if a|b and b|c, then a|c.

* If a, b, and c are integers, where a/=0, such that a|b and a|c, then a|mb + nc wheneverM and n are integers.

The Division Algorithm:Let a be an integer and d a positive integer. Then there are unique integers q and r, with 0 ≤r<d, such that a=dq+r.

*In the equality given in the division algorithm, d is called the divisor, a is called the dividend, q is called the quotient, and r is called the remainder. This notation is used to express the quotient and remainder:q=a div d, r= a mod d.

*a div d = a/d*a mod d = a − d

Congruence Modulo*If a and b are integers and m is a positive integer, then a is congruent to b modulo m if m divides a−b. We use the notation a ≡ b(mod m) to indicate that a is congruent to b modulo m. We say that a≡b (mod m)is a congruence and that m is its modulus (plural moduli).

*Let a and b be integers, and let m be a positive integer. Then a≡ b (mod m) if and only if a mod m= b mod m.*Recall that a mod m and b mod m are the remainders when a and b are divided by m, respectively.

Letmbe a positive integer. The integersaandbare congruent modulomif and only if thereis an integerksuch thata=b+km.

Letmbe a positive integer. Ifa≡b(modm)andc≡d(modm), thena+c≡b+d(modm) and ac≡bd (modm).

Letmbe a positive integer and letaandbbe integers. Then(a+b)modm=((amodm)+(bmodm))modmandabmodm=((amodm)(bmodm))modm.

Number TheoryTuesday, August 12, 2014 9:24 PM

Discrete Mathematics Page 11

Page 12: Discrete Mathematics MATH 006 (TIP Reviewer)

Although we commonly use decimal (base 10), representations, binary (base 2),octal (base 8), and hexadecimal (base 16) representations are often used, especially in computerscience.

the termalgorithmoriginally referred to procedures for performing arithmetic operations using the decimal representations of integers

Representation of Integers:

Decimal Expansion: base 10 integersBinary Expansion: base 2 integersOctal Expansion: base 8 integersHexadecimal Expansion: base 16 integers

Discrete Mathematics Page 12