[PDF] Propositional Logic Discrete Mathematics





Previous PDF Next PDF



Discrete Mathematics for Computer Science

4.10.4 Using Discrete Mathematics in Computer Science 280. CHAPTER 5. Analysis of Algorithms. 283. 5.1 Comparing Growth Rates of Functions 284.



North Carolina Standard Course of Study Discrete Mathematics for

Note on Numbering: Discrete Math for Computer Science (DCS) Number and Quantity (N) Functions (F) Statistics and. Probability (SP) Graph Theory (GT) Logic 



Discrete Mathematics for Computer Science

CS 441 Discrete Mathematics for CS. Milos Hauskrecht milos@cs.pitt.edu. 5329 Sennott Square. Discrete Mathematics for. Computer Science. M. Hauskrecht.



Propositional Logic Discrete Mathematics

Computer Sci & Eng Dept. SUNY Buffalo c Xin He (University at Buffalo). CSE 191 Discrete Structures. 1 / 37. Discrete Mathematics.



Discrete Mathematics

(2) Discrete Mathematics provides the tools used in most areas of computer science. Exposure to the mathematical concepts and discrete structures.



DIGITAL NOTES ON Discrete Mathematics B.TECH II YEAR - I SEM

Logic and Discrete Mathematics Grass Man & Trembley



Discrete Mathematics

Jul 1 2017 is still of interest



A Course in Discrete Structures

Why study discrete mathematics in computer science? It does not directly help us write programs. At the same time it is the mathematics underlying.



Notes on Discrete Mathematics

Jun 8 2022 These are the notes for the Fall 2017 semester version of the Yale course. CPSC 202a



Discrete Mathematics

Rationale. : This course introduces the basic concepts of discrete mathematics in the field of computer science. It covers sets logic

Propositional Logic

CSE 191, Class Note 01

Propositional Logic

Computer Sci & Eng Dept

SUNY Buffalo

c?Xin He (University at Buffalo)CSE 191 Discrete Structures1 / 37Discrete Mathematics What isDiscrete Mathematics?In Math 141-142, you learncontin uousmath . It deals with

continuous functions, differential and integral calculus.In contrast,discrete math deals with mathematical topics in a

sense that it analyzes data whose values are separ ated (such as integers: integer number line has gaps).Here is av eryrough compar isonbetw eencontin uousmath and discrete math: consider an analog cloc k (one with hands that continuously rotate, which shows time in continuous fashion) vs. a digital clock (which sho wstime in discrete f ashion). c?Xin He (University at Buffalo)CSE 191 Discrete Structures3 / 37

Course Topics

This course provides some of the mathematical foundations and skills that you will need in your further study of computer science and engineering. These topics include:Logic (propositional and predicate logic)

Logical inferences and mathematical proof

Counting methods

Sets and set operations

Functions and sequences

Introduction to number theory and Cryptosystem

Mathematical induction

Relations

Introduction to graph theory

By definition, computers operate on discrete data (binary strings). So, in some sense, the topics in this class are more relavent to CSE major than calculus. c?Xin He (University at Buffalo)CSE 191 Discrete Structures4 / 37The Foundations: Logic and Proof The rules of logic specify the precise meanings of mathematical statements.It is the basis of the correct mathematical arguments, that is, the proofs .It also has important applications in computer science: to verify that computer programs produce the correct output for all possible input values.To show algorithms always produce the correct results.

To establish the security of systems.

c?Xin He (University at Buffalo)CSE 191 Discrete Structures6 / 37

Propositional Logic

Definition

A proposition is a declar ativestatement.

It must be either TRUE or FALSE.

It cannot be both TRUE and FALSE.

We use T to denote TRUE and F to denote FALSE.

Example of propositions:

Example of propositions:

John loves CSE 191.

2+3=5.

2+3=8.

Sun rises from West.Example of non-propositions:Does John love CSE 191? 2+3.

Solve the equation2+x=3.

2+x>8.c?Xin He (University at Buffalo)CSE 191 Discrete Structures7 / 37Negation operator

Definition:

Supposepis a proposition.Thenegation of pis¬p.Meaning of¬p:pis false.Example:

John does not love CSE191.

Note that¬pis a new proposition generated fromp.We have generated one proposition from another proposition.

So we call¬(the symbol we used to generate the new proposition) the negation oper ator c?Xin He (University at Buffalo)CSE 191 Discrete Structures8 / 37

Logic operators

In general, we can define

logic oper ators that tr ansformone or more propositions to a new proposition.Negationis a unitar yoper atorsince it tr ansformsone proposition to another.We will see a fewbinar yoper atorsshor tly.The ytr ansformtw o propositions to a ne wproposition. c?Xin He (University at Buffalo)CSE 191 Discrete Structures9 / 37Truth table

How can we formally specify an operator (e.g., the negation operator)?One possibility is to use atr uthtab le.

The truth table lists all possible combinations of the values of the operands, and gives the corresponding values of the new proposition.Example: Truth table for negation: p¬pTF FT c?Xin He (University at Buffalo)CSE 191 Discrete Structures10 / 37

Conjunction

Now we introduce a binary operator:

conjunction ?, which corresponds to and :p?qis trueif and only if pandqare both true.Example:

Alice is tall AND slim.

Truth table for conjunction:

pqp?qTTT TFF FTF FFF c?Xin He (University at Buffalo)CSE 191 Discrete Structures11 / 37Disjunction

Another binary operator is

disjunction ?, which corresponds toor , (but

is slightly different from common use.)p?qis trueif and only if porq(or both of them) are true.Example:

Alice is smart OR honest.

Truth table for disjunction:

pqp?qTTT TFT FTT FFF c?Xin He (University at Buffalo)CSE 191 Discrete Structures12 / 37

Implication

Yet another binary operator

implication →:p→qcorresponds top impliesq.Example: If this car costs less than $10000, then John will buy it.

Truth table for implication:

pqp→qTTT TFF FTT FFT

Note that

when pis F,p→qis always T.c?Xin He (University at Buffalo)CSE 191 Discrete Structures13 / 37Bidirectional implication

Another binary operator

bidirectional implication ↔:p↔q corresponds topis T if and only ifqis T.Example:

A student gets A in CSE 191 if and only if his weighted total is≥95%.Truth table for bidirectional implication:

pqp↔qTTT TFF FTF FFT c?Xin He (University at Buffalo)CSE 191 Discrete Structures14 / 37

Terminology for implication.

Because implication statements play such an essential role in

mathematics, a variety of terminology is used to expressp→q:"ifp, thenq"."q, ifp"."p, only ifq"."pimpliesq"."pis sufficient forq"."qis necessary forp"."qfollows fromp".c?Xin He (University at Buffalo)CSE 191 Discrete Structures15 / 37Terminology for implication.

Example

Propositionp: Alice is smart.

Propositionq: Alice is honest.p→q.That Alice is smart is sufficient for Alice to be honest. "Alice is honest" if "Alice is smart". q→p:That Alice is smart is necessary for Alice to be honest. "Alice is honest" only if "Alice is smart". c?Xin He (University at Buffalo)CSE 191 Discrete Structures16 / 37

Exclusive Or operator

Truth table for Exclusive Or?pqp?qTTF

TFT FTT FFF Actually, this operator can be expressed by using other operators:

p?qis the same as¬(p↔q).?is used often in CSE. So we have a symbol for it.c?Xin He (University at Buffalo)CSE 191 Discrete Structures17 / 37Number of binary logic operators

We have introduced 5 binary logic operators. Are there more?Fact: There are totally 16 binary logic operators.

To see this:

For any binary operator, there are 4 rows in its truth table. The operator is completely defined by the T/F values in the 3rd column of its truth table.Each entry in the 3rd column of the truth table has 2 possible values (T/F).So the total number of different 3rd column (hence the number of

different binary operators) is2×2×2×2=16.Most of other 11 binary operators are not used often, so we do not

have symbols for them. c?Xin He (University at Buffalo)CSE 191 Discrete Structures18 / 37

Precedence of Operators

OperatorPrecedence

¬1 ?2 ?3 →4 ↔5

Example:

¬p?qmeans(¬p)?q

p?q→rmeans(p?q)→rWhen in doubt, use parenthesis.

c?Xin He (University at Buffalo)CSE 191 Discrete Structures19 / 37Translating logical formulas to English sentences

Using the above logic operators, we can construct more complicated logical formulas. (They are called compound propositions .)Example

Propositionp: Alice is smart.

Propositionq: Alice is honest.¬p?q: Alice is not smart but honest. p?(¬p?q): Either Alice is smart, or she is not smart but honest.

p→ ¬q: If Alice is smart, then she is not honest.c?Xin He (University at Buffalo)CSE 191 Discrete Structures20 / 37

Translating logical formulas from English sentences We can also go in the other direction, translating English sentences to logical formulas:Alice is either smart or honest, but Alice is not honest if she is smart: (p?q)?(p→ ¬q).That Alice is smart is necessary and sufficient for Alice to be honest: (p→q)?(q→p).

(This is often written asp↔q).c?Xin He (University at Buffalo)CSE 191 Discrete Structures21 / 37Tautology and Logical equivalence

Definitions:

A compound proposition that is always True is called a tautology Two propositionspandqarelogically equiv alentif their tr uth

tables are the same.Namely,pandqarelogically equiv alentif p↔qis a tautology.Ifpandqare logically equivalent, we writep≡q.c?Xin He (University at Buffalo)CSE 191 Discrete Structures22 / 37

Examples of Logical equivalence

Example:

Look at the following two compound propositions:p→qandq? ¬p.pqp→qTTT TFF FTT

FFTpq¬pq? ¬pTTFT

TFFFquotesdbs_dbs3.pdfusesText_6
[PDF] discrete mathematics for computer science answers

[PDF] discrete mathematics for computer science book

[PDF] discrete mathematics for computer science course

[PDF] discrete mathematics for computer science david liben nowell

[PDF] discrete mathematics for computer science david liben nowell pdf

[PDF] discrete mathematics for computer science gary haggard pdf

[PDF] discrete mathematics for computer science online course

[PDF] discrete mathematics pdf

[PDF] discrete mathematics questions and answers pdf

[PDF] discrete mathematics springer pdf

[PDF] discrete time fourier series coefficients calculator

[PDF] discrete time fourier transform matlab code

[PDF] discriminant negatif racine complexe

[PDF] discriminant négatif solution complexe

[PDF] discuss physical evidence of service servicescape and ambiance