You are on page 1of 55

Toán rời rạc

McGraw.Hill.Discrete.Mathematics.and.Its.Applications.7th.Edition.2011:

www.mhhe.com/rosen for more example and interactive learning,…..

Tools:

Xem các bước làm chứng mình bằng các lệnh equivalent law:www.mhhe.com/rosen

Source:

Kimberly Brehm

Trevtutor: individually search

Neso Academy has excercises

Formal logic (menh de logic):

Propositional logic( logic menh de):

Def: propositional logic is an subject studies about how to modify and join small propositions to create more
complex propositions. It also studies about relations, properties of proposition

what is an propositional?

It is an statement already has its true false value

Most common logic equivalent laws:

Toán rời rạc 1


Rule of inference( qui tac suy dien):

what is argument?

TO PROVE THAT IF THE PREMISES IS TRUE THEN THE CONCLUSION MUST BE TRUE. for example below:
when you read this, this mean that prove whenever let m and n are perfect square then mn must also be perfect
square. In general form: prove p→q means prove that let p is true then it makes q must also be true

To deprive conclusion from statements we already have, we use rules of inference which are templates for
constructing valid arguments. Rules of inference are
our basic tools for establishing the truth of statements.

an argument is compose of premises and conclusion, the conclusion must be derived from the premises

Def:

Modus ponen

Explain: If the premises p→q is true and premises p is also true then by the rule of implication , q must be true

Toán rời rạc 2


Modus tollen:

Explain: if the premises p→q is true but the premises q is false then by the rule of implication, for p→q to be true
and q is false at the same time, p must be false

hypothetical syllogism ( qui tac tam doan):

Explain: this is long, do it yourself like the 2 above https://www.youtube.com/watch?


v=HcS4lqXxrV4&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=25 4:00

disjunctive syllogism( tam luan roi rac):

explain: https://www.youtube.com/watch?
v=HcS4lqXxrV4&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=25

Addition and simplication , conjunction rule:

Toán rời rạc 3


There is many rule of inferences. Therefore, aside using 8 common rules, we have to have an sharp mind in
order to find out new rules and prove them. For example, rule 8

How to use rule of inference to derive conclusion out of extreme complex proposition , PAGE 73: Using Rules of
Inference to Build Arguments || REREAD IT

Source:

https://www.youtube.com/watch?v=28lebQ60TCc&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=26

https://www.youtube.com/watch?v=CqOn_n1PoQ4&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=27

use the rule of inference directly on the premises( note that let all the premises be true, dont care about there
truth value while drawing out a conclusion out the them)

Toán rời rạc 4


Checking the validity of argument

https://www.youtube.com/watch?v=AJe3ATDFIjQ&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=28

https://www.youtube.com/watch?v=z205Y7D40Lk&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=29

An valid argument is an argument where it is impossible for all premises is true but the conclusion is false

Note:

the validity of argument are not related to the the truth value of the conclusion: argument is valid but doesn’t
imply the conclusion is true.

One of the way to check the validity of the argument is the conclusion is false and try to see if all the premises are
true. if not→valid, if can→ invalid

Toán rời rạc 5


Fallacies in rule of inference: PAGE 75

def:

Several common fallacies arise in incorrect arguments. These fallacies resemble rules of inference, but are
based on contingencies rather than tautologies. These are discussed here to show the distinction between
correct and incorrect reasoning

Rules of Inference for Quantified Statements: https://www.youtube.com/watch?v=akiBw21opuw

Universal instantiation:

Universal generalization

Toán rời rạc 6


Có nghĩa trong tất cả trường hợp khi bốc bất kỳ c từ tập hợp x vào hàm P̣ (x) mà P(x) vẫn đúng thì “với mọi x
P(x)” đúng

Existential instantiation:

Existential generalization:

Làm thêm nhiều bài để tìm ra phương pháp làm bài hiểu quả

Combining Rules of Inference for Propositions and Quantified Statements PAGE 77

Note:

False bias and false when using rule of inference:

The error occurs in step (5), because we cannot assume, as is being done here, that the c that makes P true is
the same as the c that makes Q true

Logical Equivalences Involving Conditional Statements:

Toán rời rạc 7


Logical Equivalences Involving Biconditional Statements

Propositional Satisfiability:

A compound proposition is satisfiable if there is an assignment of truth values to its variables that makes it true. When no
such assignments exists, that is, when the compound proposition is false for all assignments of truth values to its variables,
the compound proposition is unsatisfiable.

Applications of Satisfiability: read McGraw.Hill.Discrete.Mathematics.and.Its.Applications.7th.Edition.2011 chap 32

Predicate logic:

def: Predicate logic composes of two part variable and predicate(property that variable holds). For example: “x is
greater than 3", x is the variable and "is greater than 3" is the predicate

How to translate a statement into predicate logic form(propositional function)

We turn the predicate to a function of True and False

Toán rời rạc 8


Note:

The statement can involve multiple variables: Q(x,y) for x+1=y is sound

The predicate logic is different from propositional logic by “predicate doesn’t have truth value until the variable
is assign” and “propositional doesn’t have variable and its truth value is already known.

Quantifiers( định lượng): coi bên notion introduction to mathematical thinking để hiểu rõ hơn

Universal quantifier:

Def:

The universal quantification of P(x) for a particular domaiṇ( a set of value) is the proposition that asserts that P (x)
is true for all values of x in this domain

this means:

just predicate p(x)→ not propositional

quantifier + predicate→ propositional

Existential quantifier:

Def:

THE UNIQUENESS QUANTIFIER : page 44,


McGraw.Hill.Discrete.Mathematics.and.Its.Applications.7th.Edition.2011

Quantifiers with Restricted Domains:

Ex:

Note:

Why????

Toán rời rạc 9


Logical Equivalences Involving Quantifiers page 45

Statements involving predicates and quantifiers are logically equivalent if and only if they have the same truth
value no matter which predicates are substituted into these statements and which domain of discourse is used for
the variables in these propositional functions. We use the notation S ≡ T to indicate that two statements S and T
involving predicates and quantifiers are logically equivalent

Technique to proof A and B is equivalence (same truth value):

Why just proving by showing p:“if A then B and if B then A” instead of including q:“ if A is F then B F and If B F
then A F” to assure that there is no case f:“ A is false when B is true”. Because if we already prove p is true,
then it also implicitly prove that q is false. By the equivalence rule:

Negating Quantified Expressions:

rule: the rule could prove by technique

Toán rời rạc 10


Tautology, Contradiction, Contingency & Satisfiability:https://www.youtube.com/watch?v=yo7aULLUz_0

Tautology: Is an compound proposition which is always true under any possible value

Contradiction: Is an compound proposition which is always false under any possible value

Contingency: Is an compound proposition which is sometime true and sometime false under any possible value

Satisfiability : a compound proposition is satisfiable when there is at least one case where the proposition is true in the
true table

Proof page 83

A theorem: is a statement which has been proved true by a special kind of logical argument called a rigorous
proof. Ex: Pythagoras Theorem

Axiom: In mathematics or logic, an axiom is an unprovable rule or first principle accepted as true because it is
self-evident or particularly useful. Ex: Nothing can both be and not be at the same time and in the same respect

Direct Proofs(The following discussion will give the most common techniques for proving conditional statements.
Later we will discuss methods for proving other types of statements.):

Toán rời rạc 11


def:https://www.youtube.com/watch?v=01b3KjgPhfI

Ex:

Toán rời rạc 12


Proof by Contraposition:

Def:

understand why we could prove p→q by prove notq→notp

C1:just same as contradiction

C2: dung equivilance and truth table

Toán rời rạc 13


i dont figure out yet

C3: Rule of inference

Vacuous and trivial proof SECTION 5.1, 1.8

Proofs by Contradiction:

def:

Toán rời rạc 14


Watch example in book and youtube to understand: https://www.youtube.com/watch?v=sRDwsfNDXak

Set

set builder notation

Toán rời rạc 15


deeper understanding

Equal set:

Toán rời rạc 16


Universal set

Subsets:

page 119 McGraw.Hill.Discrete.Mathematics

rule for determining whether A is a subset of B

Theorem 1

Toán rời rạc 17


showing two set are equal chứng 2 set = nhau

C1

Phương pháp: Biến đổi tương đương X thuộc A thành X thuộc B( coi trong set operation)

ex:

C2: dùng set builder (coi phần set operation)

Toán rời rạc 18


C3: sử dụng các set idenity để chứng minh tương đương

Chứng mình A là con của B:

c1:chứng minh X thuộc A thì X cũng thuộc B

Ex:

Toán rời rạc 19


Set operation: dùng như các phép biến đổi tương đương trong việc chứng minh tập con, c1 chứng mình 2 set
bằng nhau
file:///C:/Users/Phung/Desktop/TaiLieudiscretemath/TaiLieuCTRR/McGraw.Hill.Discrete.Mathematics.and.Its.Application
127

Example:

union:

intersection:

Toán rời rạc 20


Diference

Complement

Not belong

Toán rời rạc 21


Set identities:
file:///C:/Users/Phung/Desktop/TaiLieudiscretemath/TaiLieuCTRR/McGraw.Hill.Discrete.Mathematics.and.Its.Application
129 chưa xem kĩ và hết

Chứng mình được hết thì đã hiểu tạm ổn: https://www.youtube.com/watch?v=8hPALF2QBPI,


https://www.youtube.com/watch?v=Ij3Pfzmi_VY,

Ánh xạ (FUNCTION):
file:///C:/Users/Phung/Desktop/TaiLieudiscretemath/TaiLieuCTRR/chapter2%20[Compatibility%20Mode].pdf

Toán rời rạc 22


Ánh xạ bằng nhau

Ảnh ngược và hàm ngược

Toán rời rạc 23


tính chất

Ex:

Toán rời rạc 24


Toàn ánh:

học thuộc khái niệm để chứng mình:

F(A)=B (F:a→b)

Đơn ánh (ONE TO ONE):

học thuộc khái niệm để chứng mình

Song ánh (onto function):

học thuộc khái niệm để chứng mình

Toán rời rạc 25


Ánh xạ hợp:

Def:

Toán rời rạc 26


Kiểm tra ánh xạ là toàn ánh, đơn ánh: coi bài làm vở sau

ánh xạ đồng nhất:

Tính chất:

Ảnh của hàm hợp nhỏ(f:A→B, B) bằng miền của hàm hợp lớn(g:B→C, C)

Toán rời rạc 27


Toán rời rạc 28
Cộng, nhân ánh xạ( function operation):

COUNTING
OVERCOUNTING
Làm bài đơn giản lại(số nhỏ lại) để đếm tay, rồi so sánh kết quả với công thức đã tìm ra

UNDERCOUNTING
Làm bài đơn giản lại(số nhỏ lại) để đếm tay, rồi so sánh kết quả với công thức đã tìm ra

đề:

Toán rời rạc 29


Làm thiếu

NOTE:
Use sigma sign

Example:

Toán rời rạc 30


Số tập con của tập A với A chứa n phần tử là: 2^n

Counting:file:///C:/Users/Phung/Desktop/TaiLieudiscretemath/TaiLieuCTRR/chapter3%20[Compatibility%20Mode].pd

Basic Counting Principles:

Product rule:

Procedure

step 1: break the task to small task

step 2:find the number of way to solve each task

step 3: multiply all of the way

Ex:

Toán rời rạc 31


Step 1: the smaller task: task 1 find the upper letter for position 0 for the plate→ task 3 find the
upper letter for position 2 for the plate, task 4: find the digit for position 3 of the plate→ task 6: find
the digit for position 5 of the plate.

Step 2: task 1→task 3 all have 26 ways(26 upper letter), task 4→6 all have 10 ways( 0,1,..,9)

step 3: 26x26x26x10x10x10

Read the example in McGraw.Hill.Discrete. for deeper understanding

THE SUM RULE:

The sum rule more like a method to find number of ways for task ith in product rule

Note: whenever use SUM RULE check if Subtraction rule could be used(there is an overlap between two
ways)

The Subtraction Rule (Inclusion–Exclusion for Two Sets): page 392

Toán rời rạc 32


ex:

The Division Rule ?????????????????????

The Generalized Pigeonhole Principle:

def

Note:

Toán rời rạc 33


The pigeon hole rule is always true whether or not objects are placed in box orderly or
randomly ⇒ all problem related to placed N object in K box can possibly use pigeon hole
Sign:

Keyword: “something overlap”; “there is n….” sign(dau hieu) of pigeon rule

Unequal two sets

max number, min number

How to use:

1. Identify the number N of objects to put in box

2. Identify the number of box

3. translate the question to pigeon hole def

4. Do as the question say(find max, min,….)

Ex

Toán rời rạc 34


Step 1: the object is cards⇒ number of object is 52
Step 2: the box is the kind⇒number of box is 4

step3: how many card must be placed into the box in order to exist at least one box such that box is
equal or greater than [N/K] cards

step4:

PRACTICE EXAMPLE IN PAGE 402

note:

when the number of object can be contain in each box matter

Khó quá bỏ qua, phức tạp quá bỏ qua

Toán rời rạc 35


Some Elegant Applications of the Pigeonhole Principle

Permutation( hoán vị)

def

finding the number of ways to arrange a specified number of distinct elements of a set of a particular size,
where the order of these elements matters

Chỉnh hợp:

def

Có tính sắp xếp, the number of ways to arrange a subset of size k from set of size n. Hay nói theo cách
khác chỉnh hợp bằng=tông của( số tập con * số hoán vị của tập còn đó)

Toán rời rạc 36


Note

Chỉnh hợp là hoán vị nhưng thiếu (n-k)(n-k-1)….1

Dấu hiệu và cách dùng:

Đề bài theo dạng “cho 2 tập hợp hợp A và B, độ dài A nhỏ hơn B, tập B đề bài đã cho biết rõ các
phần tử bên trong và A là tập chưa xác định. Hãy tính số cách tạo tập hợp A chập k từ tập hợp B
có độ dài n, tập A có thứ tự(ordered set) và các phần tử không lặp lại.

Ex:

Toán rời rạc 37


Tổ hợp(Combinations):

Def:

The number of ways to choose a subset of size k from set of size n unorderedly. Hay nói theo cách khác
là số tập con của một tập hợp

Hiểu sâu:

Toán rời rạc 38


tính chất tổ hợp

Dấu hiệu và cách nhận biết:

Cho 2 tập B và A, độ dài tập A nhỏ hơn tập B, tập A chưa xác định, các phần tử trong tập B đã
được xác định. Hãy tính số cách tạo ra tập A chập k từ tập B có độ dài n. Tập A không có thứ
tự(unordered set)

Ex:

Cách nhận biết Bài theo phương pháp đếm nào:

PP1:

1. Giảm độ phức tạp của bài

2. Đếm bằng tay

3. Kiểm tra xem kết quả đếm bằng tay giống kết quả của chỉnh hợp, tổ hợp,…..

Toán rời rạc 39


Ex

PP2: Convert the problem to set then apply counting technique

1. Identify set A and B from the problems

2. Check if the number of way to create A from B follow What type of counting technique

Ex:

Tập B là vị trí các bit của dãy n bits{1,2,3,…,n}. Tập A là tập không thứ tự có độ dài là r(Nếu phần
tử 1 của B thuộc A ⇒ vị trí 1 sẽ có bit 1)⇒ Bài toán có thể ép theo tổ hợp

Toán rời rạc 40


A combinatorial proof ?????????????????????????????????

Binomial Coefficients and Identities (nhị thức newton): McGraw.Hill.Discrete.Mathematics.an 415

Phù hợp để tìm biểu thức của a mũ n

Generalized Combination( tổ hợp lặp):

Def: number of way to create subset A with size of k from set B size of n. The subset A can be repeated and must be
unordered.

Formula:

Deeper understanding and explanation for the formula:

Read example 3 page 424

Toán rời rạc 41


Chuyển 7 hộp tiền về thành 6 kí hiệu | và các 5 phần tử tiền về 5 kí hiệu * ⇒tạo thành 1 nhóm gồm 11 phần tử.
Khi đó cách chọn 5 tờ tiền từ 7 loại tiền tương tự như cách chọn tập con 5 vị trí cho * từ tập hợp 11 vị trí⇒
tổ hợp chập 5 của 11

Toán rời rạc 42


cách chọn 5 tờ tiền từ 7 loại tiền tương tự như cách chọn tập con 6 vị trí cho kí hiêu | từ tập 11 phần tử

https://www.youtube.com/watch?v=Z1Lk7rTLzs0&t=272s

Dấu hiệu nhận biết và cách dùng

C1: cứ mỗi lần gặp thì nghĩ tới phần deeper understanding(qui về | và *) ⇒ giúp hiểu sâu hơn
C2: qui về X1+X2+X3=k. x1≥0,x2≥0,x3≥0,..xn≥0

Toán rời rạc 43


Generalized permutation

Toán rời rạc 44


Permutations with Indistinguishable Objects

Def:

Ex:

Formula

Deeper understanding and explaination for formula:

C1:

Toán rời rạc 45


C2:

Toán rời rạc 46


Số cách chèn tập A vào B tự do:

Toán rời rạc 47


Toán rời rạc 48
Toán rời rạc 49
Cách chèn tập A vào tập B sao cho CÁC PHẦN TỬ CỦA A KHÔNG ĐƯỢC KẾ BÊN NHAU(dạng nằm liền kề nhau
a1Ba2Ba3B):

Toán rời rạc 50


Toán rời rạc 51
Toán rời rạc 52
Toán rời rạc 53
Số cách chèn tập A vào tập B, tập A có các phần tử khác nhau, tập b hoán vị

Toán rời rạc 54


Tính phần bù thay cho kết quả trực tiếp(dấu hiệu “tồn tại”, “ít nhất”,….. TÍNH TRỰC TIẾP QUÁ KHÓ VÀ TRỰC TIẾP CÓ
TỒN TẠI PHẦN BÙ)

Ex: instead of using the product rule to directly count, count the number of cases have no @

Distributing Objects into Boxes

Generating Permutations and Combinations

Toán rời rạc 55

You might also like