Based on Rosen, Discrete Mathematics & Its Applications, 5e (c)2001-2004 Michael P. Frank...

Preview:

Citation preview

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

1/18

Mod

ule

#0 -

Ove

rvie

w

Bogazici UniversityBogazici UniversityDepartment of Computer EngineeringDepartment of Computer Engineering

CCmpE 220 mpE 220 Discrete Discrete MathematicsMathematics

OverviewOverview

Fall 2005Fall 2005

Haluk BingölHaluk Bingöl

2/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

2/18

Mod

ule

#0 -

Ove

rvie

w

About CmpE 220About CmpE 220

3/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

3/18

Mod

ule

#0 -

Ove

rvie

w

CmpE 220 CmpE 220 Discrete Computational Structures (3+0+0) 3 Discrete Computational Structures (3+0+0) 3

Catalog DataCatalog DataPropositional Logic and Proofs. Set Theory. Propositional Logic and Proofs. Set Theory. Relations and Functions. Algebraic Relations and Functions. Algebraic Structures. Groups and Semi-Groups. Structures. Groups and Semi-Groups. Graphs, Lattices, and Boolean Algebra. Graphs, Lattices, and Boolean Algebra. Algorithms and Turing Machines. Algorithms and Turing Machines.

4/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

4/18

Mod

ule

#0 -

Ove

rvie

w

CmpE 220 CmpE 220 Discrete Computational Structures (3+0+0) 3 Discrete Computational Structures (3+0+0) 3

Course OutlineCourse OutlineA course in discrete mathematics should teach students A course in discrete mathematics should teach students how to work with discrete (meaning consisting of distinct or how to work with discrete (meaning consisting of distinct or unconnected elements as opposed to continuous) unconnected elements as opposed to continuous) structures used to represent discrete objects and structures used to represent discrete objects and relationships between these objects. These discrete relationships between these objects. These discrete structures include sets, relations, graphs, trees, and finite-structures include sets, relations, graphs, trees, and finite-state machines. state machines. TopicsTopics – Logic, Sets, and Functions Logic, Sets, and Functions – Methods of Proof Methods of Proof – Recurrence Relations Recurrence Relations – Binary Relations Binary Relations – Graphs Graphs – Trees Trees – Algebraic Structures Algebraic Structures – Introduction to Languages and Grammars Introduction to Languages and Grammars

5/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

5/18

Mod

ule

#0 -

Ove

rvie

w

CmpE 220 in This SemesterCmpE 220 in This Semester

6/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

6/18

Mod

ule

#0 -

Ove

rvie

w

CmpE 220 CmpE 220 Discrete Computational Structures (3+0+0) 3 Discrete Computational Structures (3+0+0) 3 Bingol - 2005 FallBingol - 2005 Fall

InstructorInstructorDr. Haluk BingölDr. Haluk Bingöl, bingol, bingol@@boun.edu.tr, x7121, ETA 308 boun.edu.tr, x7121, ETA 308

AssistantAssistant EvrimEvrim ItırItır KaraçKaraç, itir.karac, itir.karac@@boun.edu.tr, boun.edu.tr, x7183x7183, ETA , ETA 203203 Albert Ali SalahAlbert Ali Salah, salah@boun.edu.tr, x, salah@boun.edu.tr, x44904490, ETA , ETA 412412

WebWeb pagepagehttp://www.cmpe.boun.edu.tr/courses/cmpe220/fall2005http://www.cmpe.boun.edu.tr/courses/cmpe220/fall2005

Time/RoomTime/RoomWFFWFF 5 52323 ETA Z04 ETA Z04

Text BookText BookDiscrete Mathematics and Its Applications, 5e Discrete Mathematics and Its Applications, 5e Rosen Rosen McGrawHill, 2003, [QA39.3 R67] McGrawHill, 2003, [QA39.3 R67]

7/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

7/18

Mod

ule

#0 -

Ove

rvie

w

CmpE 220 CmpE 220 Discrete Computational Structures (3+0+0) 3 Discrete Computational Structures (3+0+0) 3 Bingol - 2005 FallBingol - 2005 Fall

GradingGrading20% Midterm #120% Midterm #120% Midterm #220% Midterm #210% Quizzes10% Quizzes10% Home works 10% Home works 40% Final 40% Final

8/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

8/18

Mod

ule

#0 -

Ove

rvie

w

About SlidesAbout Slides

9/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

9/18

Mod

ule

#0 -

Ove

rvie

w

Michael Frank’s slides Michael Frank’s slides adaptedadaptedWe’re not using all his lecturesWe’re not using all his lectures

Various changes in those that we use Various changes in those that we use

Possibly some new lecturesPossibly some new lectures

Your key resourcesYour key resources • Course’s web pageCourse’s web page• Ken Rosen’s bookKen Rosen’s book• http://www.mhhe.com/math/advmath/http://www.mhhe.com/math/advmath/

rosen/r5rosen/r5

10/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

10/18

Mod

ule

#0 -

Ove

rvie

w

Course OverviewCourse Overview

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

11/18

Mod

ule

#0 -

Ove

rvie

w

Module #0:Module #0:Course OverviewCourse Overview

12/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

12/18

Mod

ule

#0 -

Ove

rvie

w

What is Mathematics, What is Mathematics, really?really?It’s It’s notnot just about numbers! just about numbers!

Mathematics is Mathematics is muchmuch more than that: more than that:

But, these concepts can be But, these concepts can be aboutabout numbers, symbols, objects, images, numbers, symbols, objects, images, sounds, sounds, anythinganything!!

Mathematics is, most generally, the study of any and all certain truthsabout any and all well-defined concepts.

13/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

13/18

Mod

ule

#0 -

Ove

rvie

w

14/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

14/18

Mod

ule

#0 -

Ove

rvie

w

So, what’s So, what’s thisthis class about? class about?

What are “discrete structures” anyway?What are “discrete structures” anyway?

““DiscreteDiscrete” (” ( “discreet”!) “discreet”!) - Composed of - Composed of distinct, separable parts. (Opposite of distinct, separable parts. (Opposite of continuouscontinuous.).) discretediscrete::continuouscontinuous :: :: digitaldigital::analoganalog

““StructuresStructures” ” - Objects built up from simpler - Objects built up from simpler objects according to some definite pattern.objects according to some definite pattern.

““Discrete MathematicsDiscrete Mathematics” ” - The - The mathematical study of discrete objects and mathematical study of discrete objects and structures.structures.

15/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

15/18

Mod

ule

#0 -

Ove

rvie

w

Discrete MathematicsDiscrete Mathematics

WhenWhen using numbers, we’re much using numbers, we’re much more likely to use more likely to use ℕℕ (natural (natural numbers) and numbers) and ℤℤ (whole numbers) (whole numbers) than than ℚℚ (fractions) and (fractions) and ℝℝ (real (real numbers).numbers).

Reason: Reason: ℚℚ and and ℝℝ are are densely ordereddensely ordered

This notion can be defined preciselyThis notion can be defined precisely

16/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

16/18

Mod

ule

#0 -

Ove

rvie

w

DDensely ensely OOrderedrdered

ℚℚ,,< < is is densely ordereddensely ordered because because

xx ℚℚ yy ℚℚ (x (x≠≠y y z (xz (x<<z & z & zz<<y) )y) )

Opposite of densely ordered:Opposite of densely ordered:discretely ordered discretely ordered

17/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

17/18

Mod

ule

#0 -

Ove

rvie

w

Yet, Yet, ℚℚ and and ℝℝ can be defined in terms can be defined in terms of discrete concepts (as we have of discrete concepts (as we have seen)seen)

This means that Discrete Mathematics This means that Discrete Mathematics has no exact bordershas no exact borders

Different books and courses treat Different books and courses treat slightly different topicsslightly different topics

18/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

18/18

Mod

ule

#0 -

Ove

rvie

w

Discrete Structures We’ll Discrete Structures We’ll StudyStudy•PropositionsPropositions•PredicatesPredicates•ProofsProofs•SetsSets•FunctionsFunctions•(Orders of Growth)(Orders of Growth)•(Algorithms)(Algorithms)•IntegersIntegers•(Summations)(Summations)

•(Sequences)(Sequences)•StringsStrings•Permutations Permutations •CombinationsCombinations•RelationsRelations•GraphsGraphs•TreesTrees•(Logic Circuits)(Logic Circuits)•(Automata)(Automata)

19/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

19/18

Mod

ule

#0 -

Ove

rvie

w

Some Notations We’ll LearnSome Notations We’ll Learn

)(deg][)|(),,;(

][)(

) (mod modlcmgcd,/|max min,,,

)(:

||

)}(|{,,},,{)(

)(

1

][T0

1

1

1

1

vaRFEpnnnCr

naaa

mbabaO

aaxgfxfBAf

AABASTS

SxxPxaaxPx

xPxqpqpqpqpp

Rm

nijbk

n

ii

S

n

ii

n

ABAA

RNZ

Ο

20/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

20/18

Mod

ule

#0 -

Ove

rvie

w

Uses of Discrete MathUses of Discrete Math

Starting from simple structures of logic Starting from simple structures of logic and set theory, theories are constructed and set theory, theories are constructed that capture aspects of reality:that capture aspects of reality:– Physics (see diagram)Physics (see diagram)– Biology (DNA)Biology (DNA)– Common-sense reasoning (logic)Common-sense reasoning (logic)– Natural Language (trees, sets, functions, ..)Natural Language (trees, sets, functions, ..)– ……– Anything that we want to describe preciselyAnything that we want to describe precisely

21/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

21/18

Mod

ule

#0 -

Ove

rvie

w

Discrete Math for Discrete Math for ComputingComputing

The basis of all of computing is:The basis of all of computing is:Discrete manipulations of discrete Discrete manipulations of discrete structures represented in memory.structures represented in memory.

DDiscrete iscrete MMathath is the basic language is the basic language and conceptual foundation for all and conceptual foundation for all of computer science.of computer science.

22/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

22/18

Mod

ule

#0 -

Ove

rvie

w

Some Some ExamplesExamples

•Algorithms & data Algorithms & data structuresstructures•Compilers & Compilers & interpreters.interpreters.•Formal specification Formal specification & verification& verification•Computer Computer architecturearchitecture

•DatabasesDatabases•CryptographyCryptography•Error correction Error correction codescodes•Graphics & Graphics & animation algorithms, animation algorithms, game engines, game engines, etc.etc.……

•DM is relevant for all DM is relevant for all aspects of aspects of computing!computing!

23/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

23/18

Mod

ule

#0 -

Ove

rvie

w

Course Outline (as per Course Outline (as per Rosen)Rosen)1.1. Logic (Logic (§1.1-4§1.1-4))2.2. Proof methods (Proof methods (§1.5)§1.5)3.3. Set theory (Set theory (§1.6-7)§1.6-7)4.4. Functions (Functions (§1.8)§1.8)5.5. (Algorithms (§2.1))(Algorithms (§2.1))6.6. (Orders of Growth (§2.2))(Orders of Growth (§2.2))7.7. (Complexity (§2.3))(Complexity (§2.3))8.8. Number theory (§2.4-5)Number theory (§2.4-5)9.9. Number theory apps. Number theory apps.

(§2.6)(§2.6)10.10. (Matrices (§2.7))(Matrices (§2.7))11.11. Proof strategy (§3.1)Proof strategy (§3.1)12.12. (Sequences (§3.2))(Sequences (§3.2))

13.13. (Summations (§3.2))(Summations (§3.2))14.14. (Countability (§3.2))(Countability (§3.2))15.15. Inductive Proofs (§3.3)Inductive Proofs (§3.3)16.16. Recursion (§3.4-5)Recursion (§3.4-5)17.17. Program verification Program verification

(§3.6)(§3.6)18.18. Combinatorics (ch. 4)Combinatorics (ch. 4)19.19. Probability (ch. 5)Probability (ch. 5)20.20. (Recurrences (§6.1-3))(Recurrences (§6.1-3))21.21. Relations (ch. 7)Relations (ch. 7)22.22. Graph Theory (chs. 8+9)Graph Theory (chs. 8+9)23.23. Boolean Algebra (ch. 10)Boolean Algebra (ch. 10)24.24. (Computing Theory (Computing Theory

(ch.11))(ch.11))

24/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

24/18

Mod

ule

#0 -

Ove

rvie

w

Topics Not CoveredTopics Not Covered

Other topics we might not get to this term:Other topics we might not get to this term:• Boolean circuits (ch. 10)Boolean circuits (ch. 10)

- - You could learn this in more depth in a digital logic course.You could learn this in more depth in a digital logic course.

• Models of computing (ch. 11)Models of computing (ch. 11)- - Many of these are obsolete for engineering purposes now Many of these are obsolete for engineering purposes now anywayanyway

• Linear algebra (not in Rosen, see Math Linear algebra (not in Rosen, see Math dept.)dept.)- - Advanced matrix algebra, general linear algebraic systemsAdvanced matrix algebra, general linear algebraic systems

25/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

25/18

Mod

ule

#0 -

Ove

rvie

w

Course ObjectivesCourse Objectives

Upon completion of this course, the student Upon completion of this course, the student should be able to:should be able to:– Check validity of simple logical arguments Check validity of simple logical arguments

(proofs).(proofs).– Check the correctness of simple algorithms.Check the correctness of simple algorithms.– Creatively construct simple instances of valid Creatively construct simple instances of valid

logical arguments and correct algorithms.logical arguments and correct algorithms.– Describe the definitions and properties of a Describe the definitions and properties of a

variety of specific types of discrete structures.variety of specific types of discrete structures.– Correctly read, represent and analyze various Correctly read, represent and analyze various

types of discrete structures using standard types of discrete structures using standard notations.notations.

26/18

Base

d o

n R

ose

n, D

iscr

ete

Math

em

ati

cs &

Its

A

pp

licati

ons,

5e

(c)2

00

1-2

00

4 M

ichael P. Fra

nk

Mod

ified

by (

c) 2

00

4-2

00

5 H

alu

k B

ing

öl

26/18

Mod

ule

#0 -

Ove

rvie

w

Have Fun!Have Fun!

Many people find Discrete Mathematics more enjoyable than, for example, Analysis:

• Applicable to just about anything

• Some nice puzzles

• Highly varied

Recommended