DOC PREVIEW
UW-Madison CS 240 - Lecture 1 Introduction

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS/Math 240: Introduction to Discrete Mathematics 1/18/2010Lecture 1 : IntroductionInstructor: Dieter van Melkebeek Scribe: Dieter van MelkebeekDRAFTWelcome to CS 240, an introduction to discrete mathematics. This lecture provides an overviewof the course and of the specifics for this particular offering, which is geared towards prospectiveComputer Science and Electrical and Computer Engineering majors. For the administrative ar-rangements, you are referred to a separate handout.1.1 Course OverviewDiscrete mathematics is the mathematical study of discrete structures. The word discrete heremeans o pposite of continuous. In the continuous setting, we consider objects like real numbers thathave the property of varying smoothly. In contrast, the objects studied in discrete mathematics donot vary smoothly in this way, but have distinct, separated values. Examples include the integersbut also all finite sets. In fact, discrete structures can be characterized as those structures whoseelements can be enumerated by integers, that is, we can say what the first el ement is, the second,and so on.In this course we fo c us on discrete structures that are ubiquitous in computer science: integers,bits, strings, and graphs. The goal of the course is two-fold:• making you familiar with those structures and related notions that are relevant to computerscience, and• developing your skills to reason rigorously about those structures and notions, especially inan algorithmic context.1.1.1 Part I: Logic and ProofsRigorous means that all statements need to b e precise. The language of mathematics is perfect forthis purpose because every concept in mathematics is clearly and unambiguously defined by meansof definitions, and nontrivial statements are given as propositions. In the first part of the course,we will cover the basics of propositional and predicate logic and of set theory, which will allow usto formulate precise statements in the rest of the course.The other aspect of rigor is the use of sound reasoning to justify the truth of propositions. Sucha justification is called a proof. The goal of a proof is to convince yourself or someone else withoutany doubt that a particular statement is true. Computer scientists are particularly interested inproofs that their programs work correctly on all cases (rather than just on a few test cases). Inthe first part of the course we will cover various common proof paradigms. You will have ampleopportunity to practice writing proofs throughout the semester.1Lecture 1: Introduction 1.1. Course Overview1.1.2 Part II: Induction and RecursionIn the second part of the course we will focus on the proof paradigm known as induction – arguablythe single most important topic in this course. Mathematical induction is a general technique toshow that some property holds for all objects of a discrete structure, and consists of two steps: thebase case and the induction step.1. In the base case we show that the property holds for the first element.2. In the induction step we prove that, for every positive integer k, if the property holds for thekth element, then it also holds for the (k + 1)st element.At first, it may seem a bit convoluted a strategy, but it works and shows up naturally in manydiscrete settings. Of particular importance to us is its use in program correctness. The correctnessof iterative programs is typically established via loop invariants, which are statements that holdeach time the computer starts executing a loop iteration. In this setting, the base case establishesthat the property holds the first time the start of the loop is reached, and the induction step showsthat the loop maintains the property, i.e., if the property holds at the beginning of an iterationthen it also holds at the end.Induction is closely related to the notion of recursion, a term that can re fer to both definitionsand programs. A recursive definition of a concept consists of two parts:1. A foundation rule which says what are the simplest instances of the concept being defined.2. A constructor rule which says how to combine simpler instances of the concept being definedinto a more complex instance.Establishing properties of recursively defined concepts naturally goes by induction. The base caseshows that the foundation rule produces instances that have the property, and the induction stepshows that the constructor rule maintains the property. Such an application of induction is referredto as structural induction.A recursive program breaks up a given instance of a problem into (possibly multiple) simplerinstances of the same problem, and stipulates how to compose the solution to the given instanceout of the solution to the simpler instances. To solve the simpler instances, the program callsitself, continuing the process of breaking up instances down into even simpler instances, up tothe point where it reaches very simple instances, for which the program explicitly describes thesolution. Proving the co rrectness of recursive programs naturally flows by induction on the numberof levels of recursion. The base case corresp onds to the very simple instances for which the solutionis explicitly described in the program. The induction step shows that the composition procedureproduces correct results assuming the recursive calls do. Combined with a termination argumentthat the recursion always bottoms out to the very simple instances, this completes the correctnessproof of the recursive program.We will cover induction and various algorithmic uses in depth. Apart from program correctness,we will also discuss program analysis , i.e., determining how many steps a given program takes. Inthe case of recursive programs, such analysis leads to recurrence relations. In order to keep theanalysis manageable, we often focus on the asymptotic behavior for large inputs. We will introducethe customary notation for doing so, which some of you may already know from an introductorycourse on data structures (such as CS 367).2Lecture 1: Introduction 1.2. Relevance1.1.3 Part III: Graphs and RelationsThe third part of the course deals with graphs and relations. Graphs are discrete structures con-sisting of nodes and edges, where each edge consists of a pair of nodes. We use graphs to representrelations among objects, for example, friendships among people. The nodes represent the objects(people), and the edges the pairs of objects that are related (pairs of people that are friends).Graphs and relations are


View Full Document

UW-Madison CS 240 - Lecture 1 Introduction

Download Lecture 1 Introduction
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 1 Introduction and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 1 Introduction 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?