280 likes | 533 Views
TR1413: Discrete Math for Computer Science. Lecture 0: Introduction. Bahari Idrus Tel: 89216180. email: bahari@ftsm.ukm.my. TR1413.
E N D
TR1413: Discrete Math for Computer Science Lecture 0: Introduction
Bahari IdrusTel: 89216180 email: bahari@ftsm.ukm.my
TR1413 The 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.
Why do we need to study mathematics? • To know the real reason, we need to understand the most basic issue – WHAT IS MATHEMATICS?
What is mathematics? • Mathematics is a tool for modeling real world phenomena.
Why do we need to model a real world phenomenon? • To be able to describe a real world phenomenon • To be able to predict what will happen in the future.
Why do we need to predict 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.
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?
Various 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
Advantages of mathematical models • Precise • Simple • International • Reasoning
Four Stages of Mathematical Modeling Abstraction Validation Interpret Solution
Example: • How to find the time taken for you to travel from one place to another place?
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. So t = d/s
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. speed distance t
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
Lesson: • Higher level mathematics allows us to build better models, which can give better prediction.
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.
Types of mathematics • Continuous mathematics • Deals with continuous objects • Can be used to model continuous phenomenon • Examples: • Modeling the flow of water • Modeling the effect of heat
Types of mathematics • Discrete mathematics • Deals with discrete objects • Can be used to model discrete phenomenon • Examples: • To find the shortest path from one location to another • To find the number of different options to solve a problem.
Types 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
Topics that has been covered • 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
Topics that has been covered • 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.
How is this course being 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.
Topics to be covered • We will covering three topics: • Formal approach to logic • Formal specification • Topics in Graph Theory
Evaluation • Tutorial – 10% • Test – 20% • Assignment – 20% • Final exam – 50%
Attendance • Attendance is compulsory. • A student whose attendance is less than 70% can be barred from taking the final exam.
Plagiarism • 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.
References • 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.