TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

28
TR1413: Discrete Math TR1413: Discrete Math for Computer Science for Computer Science Lecture 0: Lecture 0: Introduction Introduction
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    222
  • download

    5

Transcript of TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Page 1: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

TR1413: Discrete Math for TR1413: Discrete Math for Computer ScienceComputer Science

Lecture 0:Lecture 0:IntroductionIntroduction

Page 2: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Bahari IdrusBahari IdrusTel: 89216180Tel: 89216180

email: email: [email protected]@ftsm.ukm.my

Page 3: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

TR1413TR1413The aim of this course is to expose students with some application of mathematics in solving some problems in Computer Science. Two main mathematical concepts discussed in this course are Graph Theory and Formal Specification.

The discussion on graph theory will focus on the use of graph in building up mathematical model. Application of elements in Graph Theory such as Euler Algorithm, Hamilton Algorithm, the concept of Isomorfism, planar and spanning tree will be discussed.

The discussion on Formal specification will focus on the use of basic concept in discrete mathematics such as sets, relations, functions and logics in modelling computerised systems is explained. This course employs Z notation in modelling the systems. Apart from writing the specification, students will also be exposed with the concept of validation and formal proving. The students will also be introduced to the use of type checker and theorem prover in the process of preparing their model.

Page 4: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Why do we need to study Why do we need to study mathematics?mathematics?

• To know the real reason, we need to understand the most basic issue – WHAT IS MATHEMATICS?

Page 5: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

What is mathematics?What is mathematics?• Mathematics is a tool for modeling real

world phenomena.

Page 6: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Why do we need to model a Why do we need to model a real world phenomenon?real world phenomenon?

• To be able to describe a real world phenomenon

• To be able to predict what will happen in the future.

Page 7: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Why do we need to predict Why do we need to predict what will happen in the future?what will happen in the future?• So that we can make the right decision.• So that we can build the right building.• So that we can choose the right route.

Page 8: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Example:Example:• When are we suppose to invest in the

stock market?• Can the bridge withstand the load?• What is the best route from KL to Penang?• How to build the most efficient computer

network?

Page 9: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Various tools for modelingVarious tools for modeling• Textual description by using a natural

language• Diagrams – software engineers uses

various diagrams to model a software to be built.

• Solid model - Engineers normally build a solid model for a building to be built.

• Mathematical models

Page 10: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Advantages of mathematical Advantages of mathematical modelsmodels

• Precise• Simple• International• Reasoning

Page 11: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Four Stages of Mathematical Four Stages of Mathematical ModelingModeling

Abstraction Validation

SolutionInterpret

Page 12: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Example:Example:• How to find the time taken for you to

travel from one place to another place?

Page 13: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

First Attempt:First Attempt:• Suppose that the distance is d, the speed

is s. • We can model this problem by assuming

that the speed is always constant. Sot = d/s

Page 14: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Second Attempt:Second Attempt:• The first model is too simple.• The assumption that the speed is

constant is not always true.• A better model is shown in the following

diagram. The distance is the area under the graph.

t

speed

distance

Page 15: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Third Attempt:Third Attempt:• The second model is also too simple.• A better model is to assume that the

speed is a function of time, thus can be represented as s(t)The distance d = ∫ s(t) dt

Page 16: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Lesson:Lesson:• Higher level mathematics allows us to

build better models, which can give better prediction.

Page 17: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Fourth Attempt:Fourth Attempt:• Is it true that the speed is a function of

time?• Not really, because the speed changes

due to other reasons such as condition of the road, condition of the traffics etc.

• A better model is to represent speed as a function of two or three variables, ie: s(t,r,f)

• This lead to the concept of double and triple integration.

Page 18: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Types of mathematicsTypes of mathematics• Continuous mathematics

– Deals with continuous objects – Can be used to model continuous

phenomenon– Examples:

1. Modeling the flow of water2. Modeling the effect of heat

Page 19: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Types of mathematicsTypes of mathematics• Discrete mathematics

– Deals with discrete objects– Can be used to model discrete

phenomenon– Examples:

1. To find the shortest path from one location to another

2. To find the number of different options to solve a problem.

Page 20: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Types of mathematicsTypes of mathematics• Many problems in IT involves the use of

discrete objects– Data in computers is represented in

digital format.– Computer programs involves

transforming data from one state to another state.

• So, to model problems in IT requires knowledge of discrete mathematics

Page 21: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Topics that has been Topics that has been coveredcovered

• In the first course (TR1313), we have covered some topics in discrete mathematics, such as– Logic– Sets– Relations– Functions– Sequences– Integers and Counting– Graphs– Trees

Page 22: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Topics that has been Topics that has been coveredcovered

• The approach in TR1313 was informal and more applied in nature.

• In this course, we will continue with emphasis on application of discrete mathematics but with a more formal approach.

• This is important since computer and system scientist are not only expected to be able to develop software but they must also be able to reason about the behaviour of the software.

Page 23: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

How is this course being How is this course being organized?organized?

• There will be about 30 hours of lectures.• There will be about 6-8 hours of tutorials –

you will be divided into tutorial groups.• Tutorial will starts in week 3.• There will be 4 hours of lab.

Page 24: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

Topics to be coveredTopics to be covered• We will covering three topics:

– Formal approach to logic– Formal specification– Topics in Graph Theory

Page 25: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

EvaluationEvaluation• Tutorial – 10%• Test – 20%• Assignment – 20%• Final exam – 50%

Page 26: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

AttendanceAttendance• Attendance is compulsory.• A student whose attendance is less than

70% can be barred from taking the final exam.

Page 27: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

PlagiarismPlagiarism• The university encourages collaborative

learning.• Students are encouraged to work

together.• But do not copy other students’ work.• Those who copy and those who allow his

work to be copied will be heavily penalized.

Page 28: TR1413: Discrete Math for Computer Science Lecture 0: Introduction.

ReferencesReferences• Currie, E. 1999. The Essence of Z.

Europe:Prentice Hall.• Diller, A. 1994. Z: An Introduction to Formal

Methods. John Wiley.• Johnsonbaugh, R., 2001. Discrete

Mathematics, 5th Ed. Prentice Hall.• Potter, B., Sinclair, J. & Till, D. 1991. An

Introduction to Formal Specification and Z. Prentice Hall.• Burke,E. and Foxley, E., Logic and Its

Applications, Prentice Hall.