1. Trang chủ
  2. » Công Nghệ Thông Tin

Discrete mathematics huynh tuong nguyen

414 514 13

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 414
Dung lượng 3,26 MB

Nội dung

Tran Vinh TanContents Propositional Logic Chapter 1 Logics Discrete Mathematics I on 13 March 2012 Tran Vinh TanFaculty of Computer Science and Engineering University of Technology - VNU

Trang 1

Some applications

Discrete mathematics I Introduction

Huynh Tuong Nguyen

Faculty of Computer Science and Engineering

Ho Chi Minh City University of Technology htnguyen@cse.hcmut.edu.vn

February 22, 2012

Trang 3

Some applications Document

Trang 4

Some applications Document

Subjects in general discrete mathematics course

Trang 5

Some applications Document

Topics relational to discrete mathematics

1 Theoretical computer science

13 Operations research: scheduling

15 Discretization

16 Discrete analogues of continuous mathematics

17 .

Trang 6

Some applications Document

directed, undirected, isomorphism

Weighted graphs, algorithm for finding shortest paths

Trees: features, binary trees, minimum spanning trees in connected and weighted graphs

Probabilistics Modelling

introductory random variables.

Trang 7

Some applications Document

Document

Book

Discrete mathematics and applications - Kenneth H Rosen (Vietnamesetranslation - NXB KHKT 1997)

Discrete mathematics - Richard Johnsonbaugh, Willey, 1997

Discrete mathematics with algorithms - Micheal O Albertson & Joan P.Hutchinson, Willey, 1998

Trang 8

today there is a remarkable variety of applications of mathematics in industry and government, such as materials processing, design, medical diagnosis, development of financial products, network management, weather prediction, etc.

Trang 9

today there is a remarkable variety of applications of mathematics in industry and government, such as materials processing, design, medical diagnosis, development of financial products, network management, weather prediction, etc.

Engineers use technology, mathematics

and scientific knowledge to solve

practical problems (wikipedia.org)

Science

Technology

Engineering

Trang 10

Some applications

Computing of algorithm complexity

Know results

Trang 13

Some applications

Mathematical model

Exercise

A bookseller A buys books from two publishers B, and C.

Publisher B offers a package of 5 mysteries and 5 romance novels for $50, and publisher C offers a package of 5 mysteries and 10 romance novels for $150 The bookseller A wants to buy at least 2,500 mysteries and 3,500 romance novels, and he has promised C (who has influence on the Senate Textbook Committee) that at least 25% of the total number of books he purchases will come from publisher C.

Question How many packages should A order from each publisher

in order to minimize his cost and satisfy C ? What will the novels cost him?

Trang 15

Some applications

Graph

Shortest path problem

Min cut and maximum flow

Vehicle Routing Problem

Trang 16

Some applications

Graph

Shortest path problem

Min cut and maximum flow

Vehicle Routing Problem

Trang 17

Some applications

Scheduling

Trang 18

LetCi be completion time of jobJi and letTi = max(0,Ci− di)its tardiness.

Question How to minimizeTmax= maxiTi ? What is the minimum value of

Tmax ?

Trang 19

an edge between Pi and Jj.

Trang 20

an edge between Pi and Jj.

Trang 21

Some applications

Game and simulation

Sally Salon Game

Trang 23

Tran Vinh Tan

Contents Propositional Logic

Chapter 1

Logics

Discrete Mathematics I on 13 March 2012

Tran Vinh TanFaculty of Computer Science and Engineering

University of Technology - VNUHCM

Trang 24

Tran Vinh Tan

Contents Propositional Logic

Contents

1 Propositional Logic

Trang 25

Logics Tran Vinh Tan

Contents Propositional Logic

Logic

Definition (Averroes)

The tool for distinguishing between the trueand thefalse

Definition (Penguin Encyclopedia)

The formal systematic study of theprinciplesofvalid inference

andcorrect reasoning

Definition (Discrete Mathematics - Rosen)

Rules of logic are used to distinguish between valid and invalidmathematical arguments

Trang 26

Logics Tran Vinh Tan

Contents Propositional Logic

Logic

Definition (Averroes)

The tool for distinguishing between the trueand thefalse

Definition (Penguin Encyclopedia)

The formal systematic study of theprinciplesofvalid inference

andcorrect reasoning

Definition (Discrete Mathematics - Rosen)

Rules of logic are used to distinguish between valid and invalidmathematical arguments

Trang 27

Tran Vinh Tan

Contents Propositional Logic

Logic

Definition (Averroes)

The tool for distinguishing between the trueand thefalse

Definition (Penguin Encyclopedia)

The formal systematic study of theprinciplesofvalid inference

andcorrect reasoning

Definition (Discrete Mathematics - Rosen)

Rules of logic are used to distinguish between valid and invalid

mathematical arguments

Trang 28

Logics Tran Vinh Tan

Contents Propositional Logic

Applications in Computer Science

• Design of computer circuits

• Construction of computer programs

• Verification of the correctness of programs

• Constructing proofs automatically

• Artificial intelligence

• Many more

Trang 29

Logics Tran Vinh Tan

Contents Propositional Logic

Applications in Computer Science

• Design of computer circuits

• Construction of computer programs

• Verification of the correctness of programs

• Constructing proofs automatically

• Artificial intelligence

• Many more

Trang 30

Logics Tran Vinh Tan

Contents Propositional Logic

Applications in Computer Science

• Design of computer circuits

• Construction of computer programs

• Verification of the correctness of programs

• Constructing proofs automatically

• Artificial intelligence

• Many more

Trang 31

Logics Tran Vinh Tan

Contents Propositional Logic

Applications in Computer Science

• Design of computer circuits

• Construction of computer programs

• Verification of the correctness of programs

• Constructing proofs automatically

• Artificial intelligence

• Many more

Trang 32

Logics Tran Vinh Tan

Contents Propositional Logic

Applications in Computer Science

• Design of computer circuits

• Construction of computer programs

• Verification of the correctness of programs

• Constructing proofs automatically

• Artificial intelligence

• Many more

Trang 33

Tran Vinh Tan

Contents Propositional Logic

Applications in Computer Science

• Design of computer circuits

• Construction of computer programs

• Verification of the correctness of programs

• Constructing proofs automatically

• Artificial intelligence

• Many more

Trang 34

Tran Vinh Tan

Contents Propositional Logic

Propositional Logic

Definition

Apropositionis a declarative sentence that is either true or false,

but not both

Examples

• Hanoi is the capital of Viet Nam

• New York City is the capital of USA

• 1 + 1 = 2

• 2 + 2 = 3

Trang 35

Logics Tran Vinh Tan

Contents Propositional Logic

Examples

Examples (Which of these are propositions?)

• How easy is logic!

• Read this carefully

• H1 building is in Ho Chi Minh City

Trang 36

Logics Tran Vinh Tan

Contents Propositional Logic

Examples

Examples (Which of these are propositions?)

• How easy is logic!

• Read this carefully

• H1 building is in Ho Chi Minh City

Trang 37

Logics Tran Vinh Tan

Contents Propositional Logic

Examples

Examples (Which of these are propositions?)

• How easy is logic!

• Read this carefully

• H1 building is in Ho Chi Minh City

Trang 38

Logics Tran Vinh Tan

Contents Propositional Logic

Examples

Examples (Which of these are propositions?)

• How easy is logic!

• Read this carefully

• H1 building is in Ho Chi Minh City

Trang 39

Logics Tran Vinh Tan

Contents Propositional Logic

Examples

Examples (Which of these are propositions?)

• How easy is logic!

• Read this carefully

• H1 building is in Ho Chi Minh City

Trang 40

Logics Tran Vinh Tan

Contents Propositional Logic

Examples

Examples (Which of these are propositions?)

• How easy is logic!

• Read this carefully

• H1 building is in Ho Chi Minh City

Trang 41

Logics Tran Vinh Tan

Contents Propositional Logic

Examples

Examples (Which of these are propositions?)

• How easy is logic!

• Read this carefully

• H1 building is in Ho Chi Minh City

Trang 42

Tran Vinh Tan

Contents Propositional Logic

Examples

Examples (Which of these are propositions?)

• How easy is logic!

• Read this carefully

• H1 building is in Ho Chi Minh City

Trang 43

Logics Tran Vinh Tan

Contents Propositional Logic

Notations

• Propositions are denoted byp, q,

• Thetruth value(”chân trị”) istrue(T) orfalse(F)

Trang 44

Tran Vinh Tan

Contents Propositional Logic

Notations

• Propositions are denoted byp, q,

• Thetruth value(”chân trị”) istrue(T) orfalse(F)

Trang 45

Tran Vinh Tan

Contents Propositional Logic

Trang 46

Logics Tran Vinh Tan

Contents Propositional Logic

Trang 47

Tran Vinh Tan

Contents Propositional Logic

Trang 48

Logics Tran Vinh Tan

Contents Propositional Logic

Operators

Exclusive OR- Tuyển loại : p ⊕ q

“p or q (but not both)”

Trang 49

Tran Vinh Tan

Contents Propositional Logic

Operators

Exclusive OR- Tuyển loại : p ⊕ q

“p or q (but not both)”

Trang 50

Logics Tran Vinh Tan

Contents Propositional Logic

More Expressions for Implication p → q

• If you get 100% on the final, you will get 10 grade

• If you feel asleep this afternoon, then 2 + 3 = 5

Trang 51

Logics Tran Vinh Tan

Contents Propositional Logic

More Expressions for Implication p → q

• If you get 100% on the final, you will get 10 grade

• If you feel asleep this afternoon, then 2 + 3 = 5

Trang 52

Logics Tran Vinh Tan

Contents Propositional Logic

More Expressions for Implication p → q

• If you get 100% on the final, you will get 10 grade

• If you feel asleep this afternoon, then 2 + 3 = 5

Trang 53

Logics Tran Vinh Tan

Contents Propositional Logic

More Expressions for Implication p → q

• If you get 100% on the final, you will get 10 grade

• If you feel asleep this afternoon, then 2 + 3 = 5

Trang 54

Logics Tran Vinh Tan

Contents Propositional Logic

More Expressions for Implication p → q

• If you get 100% on the final, you will get 10 grade

• If you feel asleep this afternoon, then 2 + 3 = 5

Trang 55

Tran Vinh Tan

Contents Propositional Logic

More Expressions for Implication p → q

• If you get 100% on the final, you will get 10 grade

• If you feel asleep this afternoon, then 2 + 3 = 5

Trang 56

Logics Tran Vinh Tan

Contents Propositional Logic

Conditional Statements From p → q

• q → p (converse- đảo)

• ¬q → ¬p (contrapositive- phản đảo)

• Prove that only contrapositive have the same truth table with

p → q

Trang 57

Logics Tran Vinh Tan

Contents Propositional Logic

Conditional Statements From p → q

• q → p (converse- đảo)

• ¬q → ¬p (contrapositive- phản đảo)

• Prove that only contrapositive have the same truth table with

p → q

Trang 58

Tran Vinh Tan

Contents Propositional Logic

Conditional Statements From p → q

• q → p (converse- đảo)

• ¬q → ¬p (contrapositive- phản đảo)

• Prove that only contrapositive have the same truth table with

p → q

Trang 59

Logics Tran Vinh Tan

Contents Propositional Logic

Exercise

What are theconverseandcontrapositiveof the following

conditional statement

“If he plays online games too much, his girlfriend leaves him.”

• Converse:If his girlfriend leaves him, then he plays online

games too much

• Contrapositive:If his girlfriend does not leave him, then hedoes not play online games too much

Trang 60

Tran Vinh Tan

Contents Propositional Logic

Exercise

What are theconverseandcontrapositiveof the following

conditional statement

“If he plays online games too much, his girlfriend leaves him.”

• Converse:If his girlfriend leaves him, then he plays online

games too much

• Contrapositive:If his girlfriend does not leave him, then he

does not play online games too much

Trang 61

Logics Tran Vinh Tan

Contents Propositional Logic

• “p isnecessary and sufficientfor q”

• “if p then q, andconversely”

• “piffq”

Trang 62

Logics Tran Vinh Tan

Contents Propositional Logic

• “p isnecessary and sufficientfor q”

• “if p then q, andconversely”

• “piffq”

Trang 63

Logics Tran Vinh Tan

Contents Propositional Logic

• “p isnecessary and sufficientfor q”

• “if p then q, andconversely”

• “piffq”

Trang 64

Logics Tran Vinh Tan

Contents Propositional Logic

• “p isnecessary and sufficientfor q”

• “if p then q, andconversely”

• “piffq”

Trang 65

Logics Tran Vinh Tan

Contents Propositional Logic

• “p isnecessary and sufficientfor q”

• “if p then q, andconversely”

• “piffq”

Trang 66

Tran Vinh Tan

Contents Propositional Logic

• “p isnecessary and sufficientfor q”

• “if p then q, andconversely”

• “piffq”

Trang 67

Logics Tran Vinh Tan

Contents Propositional Logic

Translating Natural Sentences

Exercise

I will buy a new phone only ifI have enough money to buy iPhone

4 ormy phone is not working

• p: I will buy a new phone

• q: I have enough money to buy iPhone 4

• r: My phone is working

• p → (q ∨ ¬r)

Trang 68

Logics Tran Vinh Tan

Contents Propositional Logic

Translating Natural Sentences

Exercise

I will buy a new phone only ifI have enough money to buy iPhone

4 ormy phone is not working

• p: I will buy a new phone

• q: I have enough money to buy iPhone 4

• r: My phone is working

• p → (q ∨ ¬r)

Trang 69

Logics Tran Vinh Tan

Contents Propositional Logic

Translating Natural Sentences

Exercise

I will buy a new phone only ifI have enough money to buy iPhone

4 ormy phone is not working

• p: I will buy a new phone

• q: I have enough money to buy iPhone 4

• r: My phone is working

• p → (q ∨ ¬r)

Trang 70

Logics Tran Vinh Tan

Contents Propositional Logic

Translating Natural Sentences

Exercise

I will buy a new phone only ifI have enough money to buy iPhone

4 ormy phone is not working

• p: I will buy a new phone

• q: I have enough money to buy iPhone 4

• r: My phone is working

• p → (q ∨ ¬r)

Trang 71

Tran Vinh Tan

Contents Propositional Logic

Translating Natural Sentences

Exercise

I will buy a new phone only ifI have enough money to buy iPhone

4 ormy phone is not working

• p: I will buy a new phone

• q: I have enough money to buy iPhone 4

• r: My phone is working

• p → (q ∨ ¬r)

Trang 72

Tran Vinh Tan

Contents Propositional Logic

Translating Natural Sentences

Exercise

He will not run the red light if he sees the police unless he is too

risky

Trang 73

Logics Tran Vinh Tan

Contents Propositional Logic

Construct Truth Table

Trang 74

Tran Vinh Tan

Contents Propositional Logic

Construct Truth Table

Trang 75

Logics Tran Vinh Tan

Contents Propositional Logic

• type “dai hoc bach khoa” in Google

• means “daiANDhocANDbachANDkhoa”

Trang 76

Logics Tran Vinh Tan

Contents Propositional Logic

• type “dai hoc bach khoa” in Google

• means “daiANDhocANDbachANDkhoa”

Trang 77

Logics Tran Vinh Tan

Contents Propositional Logic

• type “dai hoc bach khoa” in Google

• means “daiANDhocANDbachANDkhoa”

Trang 78

Tran Vinh Tan

Contents Propositional Logic

• type “dai hoc bach khoa” in Google

• means “daiANDhocANDbachANDkhoa”

Trang 79

Tran Vinh Tan

Contents Propositional Logic

• type “dai hoc bach khoa” in Google

• means “daiANDhocANDbachANDkhoa”

Trang 80

Logics Tran Vinh Tan

Contents Propositional Logic

Applications (cont.)

• Logic puzzles

• There are two kinds of inhabitants on an island,knights, who

always tell the truth, and their opposites,knaves, who always

lie You encounter two people A and B What are A and B if

A says“ B is a knight” and B says”The two of us are

opposite types”?

• Bit operations

• 101010011is a bit string of length nine

Trang 81

Tran Vinh Tan

Contents Propositional Logic

Applications (cont.)

• Logic puzzles

• There are two kinds of inhabitants on an island,knights, who

always tell the truth, and their opposites,knaves, who always

lie You encounter two people A and B What are A and B if

A says“ B is a knight” and B says”The two of us are

opposite types”?

• Bit operations

• 101010011is a bit string of length nine

Trang 82

Logics Tran Vinh Tan

Contents Propositional Logic

Tautology and Contradiction

Trang 83

Logics Tran Vinh Tan

Contents Propositional Logic

Tautology and Contradiction

Trang 84

Logics Tran Vinh Tan

Contents Propositional Logic

Tautology and Contradiction

Trang 85

Tran Vinh Tan

Contents Propositional Logic

Tautology and Contradiction

Trang 86

Logics Tran Vinh Tan

Contents Propositional Logic

Trang 87

Tran Vinh Tan

Contents Propositional Logic

Trang 88

Logics Tran Vinh Tan

Contents Propositional Logic

Ngày đăng: 26/06/2014, 17:40

TỪ KHÓA LIÊN QUAN

w