CS684 Graph Algorithms

Similar documents
CS483 Design and Analysis of Algorithms

Elementary Discrete Probability

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 14

Monty Hall Puzzle. Draw a tree diagram of possible choices (a possibility tree ) One for each strategy switch or no-switch

CS155: Probability and Computing: Randomized Algorithms and Probabilistic Analysis

Great Theoretical Ideas in Computer Science

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

Discrete Mathematics & Mathematical Reasoning Course Overview

CSEP 521 Applied Algorithms. Richard Anderson Winter 2013 Lecture 1

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 10

Final Examination. Adrian Georgi Josh Karen Lee Min Nikos Tina. There are 12 problems totaling 150 points. Total time is 170 minutes.

1. When applied to an affected person, the test comes up positive in 90% of cases, and negative in 10% (these are called false negatives ).

Discrete Random Variables

Chapter 34: NP-Completeness

Randomized Algorithms

Probability theory for Networks (Part 1) CS 249B: Science of Networks Week 02: Monday, 02/04/08 Daniel Bilar Wellesley College Spring 2008

First Digit Tally Marks Final Count

Introduction Introduction. Discrete Mathematics Andrei Bulatov

Discrete Random Variables

Introduction Propositional Logic

Sequences and Summations

Lecture 3 Probability Basics

VIII. NP-completeness

P (A B) P ((B C) A) P (B A) = P (B A) + P (C A) P (A) = P (B A) + P (C A) = Q(A) + Q(B).

Foundations II: Data Structures and Algorithms

Proof methods and greedy algorithms

COS 341: Discrete Mathematics

Today s Menu. Administrativia Two Problems Cutting a Pizza Lighting Rooms

Probability Theory and Simulation Methods

Probability (Devore Chapter Two)

Given a sequence a 1, a 2,...of numbers, the finite sum a 1 + a 2 + +a n,wheren is an nonnegative integer, can be written

Chapter Learning Objectives. Random Experiments Dfiii Definition: Dfiii Definition:

Mathematical Preliminaries

Statistical Inference

ELEG 3143 Probability & Stochastic Process Ch. 1 Probability

Lecture 6 - Random Variables and Parameterized Sample Spaces

Probabilistic models

With Question/Answer Animations. Chapter 7

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

Math Bootcamp 2012 Miscellaneous

P [(E and F )] P [F ]

YEAR 12 A-LEVEL FURTHER MATHS CONTENT. Matrices: Add/subtract, multiply by scalar, matrix multiplication, zero and identity matrix (CP1 Ch 6)

CSC Discrete Math I, Spring Discrete Probability

Chapter 1 Principles of Probability

MATH2206 Prob Stat/20.Jan Weekly Review 1-2

MS-A0504 First course in probability and statistics

2.4 Conditional Probability

Theorem 1.7 [Bayes' Law]: Assume that,,, are mutually disjoint events in the sample space s.t.. Then Pr( )

Math 060/070 PAL: Elementary and Intermediate Algebra Spring 2016

SYLLABUS SEFS 540 / ESRM 490 B Optimization Techniques for Natural Resources Spring 2017

Algebra 2 Secondary Mathematics Instructional Guide

Course: ESO-209 Home Work: 1 Instructor: Debasis Kundu

Lecture 1: Basics of Probability

Discrete Mathematics

Introduction to Series and Sequences Math 121 Calculus II Spring 2015

CSE 21 Practice Exam for Midterm 2 Fall 2017

Discrete Mathematics. Spring 2017

9/6. Grades. Exam. Card Game. Homework/quizzes: 15% (two lowest scores dropped) Midterms: 25% each Final Exam: 35%

Conditional Probability 2 Solutions COR1-GB.1305 Statistics and Data Analysis

Probability and random variables

Algorithm Design Strategies V

Chapter 8 Sequences, Series, and Probability

Get started [Hawkes Learning] with this system. Common final exam, independently administered, group graded, grades reported.

ORF 245 Fundamentals of Statistics Chapter 1 Probability

Math , Fall 2014 TuTh 12:30pm - 1:45pm MTH 0303 Dr. M. Machedon. Office: Math Office Hour: Tuesdays and

Recitation 6. Randomization. 6.1 Announcements. RandomLab has been released, and is due Monday, October 2. It s worth 100 points.

Business Statistics. Lecture 3: Random Variables and the Normal Distribution

Stat 609: Mathematical Statistics I (Fall Semester, 2016) Introduction

Homework every week. Keep up to date or you risk falling behind. Quizzes and Final exam are based on homework questions.

Exam Practice Problems

Introduction to Probability

Discrete Optimization 2010 Lecture 1 Introduction / Algorithms & Spanning Trees

Chapter 2: Probability Part 1

Modular Arithmetic. Examples: 17 mod 5 = 2. 5 mod 17 = 5. 8 mod 3 = 1. Some interesting properties of modular arithmetic:

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms

CSI 4105 MIDTERM SOLUTION

CS 6375 Machine Learning

Math 102,104: Trigonome and Precalculus Spring

Math 163: Lecture notes

Discrete Mathematics and Probability Theory Summer 2014 James Cook Final Exam

NP-complete problems. CSE 101: Design and Analysis of Algorithms Lecture 20

1. Introduction Recap

Take-Home Exam 1: pick up on Thursday, June 8, return Monday,

CS483 Design and Analysis of Algorithms

Series. 1 Convergence and Divergence of Series. S. F. Ellermeyer. October 23, 2003

Algorithms and Theory of Computation. Lecture 1: Introduction, Basics of Algorithms

the time it takes until a radioactive substance undergoes a decay

Course Staff. Textbook

Some Basic Concepts of Probability and Information Theory: Pt. 1

Fundamentals of Probability CE 311S

Formalizing Probability. Choosing the Sample Space. Probability Measures

1 Primals and Duals: Zero Sum Games

CMSC Discrete Mathematics SOLUTIONS TO FIRST MIDTERM EXAM October 18, 2005 posted Nov 2, 2005

Regular Languages and Finite Automata

PHYSICS 206, Spring 2019

CSCE 222 Discrete Structures for Computing. Dr. Hyunyoung Lee

Lecture 3. January 7, () Lecture 3 January 7, / 35

Probability, Random Processes and Inference

ORF 245 Fundamentals of Statistics Chapter 5 Probability

CS626 Data Analysis and Simulation

Transcription:

CS684 Graph Algorithms Administration and Mathematical Background Instructor: Fei Li lifei@cs.gmu.edu with subject: CS684 Office hours: Engineering Building, Room 5326, Monday 5:00pm - 7:00pm or by appointments Course web-site: http://cs.gmu.edu/ lifei/teaching/cs684 spring10 1 / 23

About this Course About this Course This is an advanced course in the design and analysis of efficient algorithms. The emphasis is on algorithms for standard graph problems, such as minimum spanning trees, shortest paths, network flow, and maximum matching. We will also study advanced data structures, which are crucial for the more advanced topics. Randomized algorithms will also be discussed. Prerequisites 1 CS 583 (Design and Analysis of Algorithms) Weekly Schedule When: Monday 7:20pm - 10:00pm Where: Innovation Hall 206 2 / 23

Required Textbooks Algorithm Design Algorithm Design by Jon Kleinberg and Eva Tardos (Cornell) Introduction to Algorithms Introduction to Algorithms by Thomas H. Cormen (Dartmouth), Charles E. Leiserson and Ronald L. Rivest (MIT), Clifford Stein (Columbia), 3rd Edition 3 / 23

How to Reach Me 1 Instructor: Fei Li 2 Email: lifei@cs.gmu.edu 3 Office: Room 5326, Engineering Building 4 Office hours: Monday 5:00pm - 7:00pm or make an appointment 4 / 23

Topics To Be Covered 1 Stable Marriage Problem (*) 2 Mathematical Background 3 Basic Graph Algorithms: BFS and DFS; Applications of DFS 4 Minimum Spanning Trees and Kruskal s Algorithm; Prim s and Baruvka s Algorithms for MSTs (*) 5 Dijkstra s Algorithm for Shortest Paths 6 Bellman-Ford Shortest Paths 7 All-Pairs Shortest Paths and the Floyd-Warshall Algorithm 8 Minimum Weight Triangulation (*) 9 Network Flows; Applications and Extensions of Network Flow (*) 10 Min-Cost Flow; Min-Cost Flow Applications (*) 11 Languages and the Class NP; NP-Completeness Reductions (*) 12 Cook s Theorem, 3SAT, and Independent Set; Clique, Vertex Cover, and Dominating Set (*) 13 Hamiltonian Path; Vertex Cover and TSP; Set Cover and Bin Packing; The k-center Problem; Subset-Sum Approximation (*) 5 / 23

Making the Grade Grading Policy Your grade will be determined 30% by a midterm exam, 30% by a final exam, 30% by presentations/take-home assignments in class, and 10% by class attendance. No makeup exams will be given for missed tests. Tentative Grading System A ( 85), B ( [70, 85)), C ( [60, 70)), D ( [50, 60)), and F (< 50) Any Questions? 6 / 23

Mathematical Background 1 Summations 2 Sets, Etc 3 Counting and Probability 4 Matrices 7 / 23

Summation Formulas and Properties Notation a 1 + a 2 + + a n = a 1 + a 2 + = a k. a k = lim a k. n If the limit does not exist, the series diverges; otherwise it converges. Linearity For any real c and any finite sequences a 1, a 2,..., a n and b 1, b 2,..., b n, Arithmetic Series (ca k + b k ) = c a k + b k. k = 1 n(n + 1). 2 8 / 23

Sums of Squares and Cubes k 2 = n(n + 1)(2n + 1), 6 k 3 = n2 (n + 1) 2. 4 Geometric Series For real x 1, the summation x k = 1 + x + x 2 + + x n = xn+1 1 x 1. is a geometric or exponential series. When x < 1, we have xk = 1 1 x. Harmonic Series For positive integers n, the nth harmonic numbers is H n = 1 + 1 2 + 1 3 + + 1 n = 1 = ln n + O(1). k 9 / 23

Sums of Squares and Cubes k 2 = n(n + 1)(2n + 1), 6 k 3 = n2 (n + 1) 2. 4 Geometric Series For real x 1, the summation x k = 1 + x + x 2 + + x n = xn+1 1 x 1. is a geometric or exponential series. When x < 1, we have xk = 1 1 x. Harmonic Series For positive integers n, the nth harmonic numbers is H n = 1 + 1 2 + 1 3 + + 1 n = 1 k lg n i=0 2 i 1 j=0 1 2 i + j lg n i=0 2 i 1 j=0 1 = ln n + O(1). k lg n 1 2 i = 1 lg n + 1. i=0 10 / 23

Integrating and Differentiating Series Consider xk = 1 1 x where x < 1. kx k x = (1 x) 2. 11 / 23

Integrating and Differentiating Series Consider xk = 1 1 x where x < 1. kx k x = (1 x) 2. Proof. Differentiating both sides of the infinite geometric series and multiplying x. 12 / 23

Integrating and Differentiating Series Consider xk = 1 1 x where x < 1. kx k x = (1 x) 2. Proof. Differentiating both sides of the infinite geometric series and multiplying x. Telescoping Series n 1 1 k(k + 1) = ( 1 k 1 k + 1 ) = 1 1 n. Products n lg( a k ) = lg a k. 13 / 23

Exercises (x + y) n = k ( n k )xk y n k 14 / 23

Exercises (x + y) n = k ( n k )xk y n k ( r k ) = (r 1 k ) + ( r 1 k 1 ) 15 / 23

Exercises (x + y) n = k ( n k )xk y n k ( r k ) = (r 1 k ) + ( r 1 k 1 ) ( n k ) = (n n k ) 16 / 23

Exercises (x + y) n = k ( n k )xk y n k ( r k ) = (r 1 k ) + ( r 1 k 1 ) ( n k ) = (n n k ) ( r k ) = r k (r 1 k 1 ) 17 / 23

Exercises (x + y) n = k ( n k )xk y n k ( r k ) = (r 1 k ) + ( r 1 k 1 ) ( n k ) = (n n k ) ( r k ) = r k (r 1 k 1 ) ( r+k k ) = ( r+n+1 n ) 18 / 23

Exercises (x + y) n = k ( n k )xk y n k ( r k ) = (r 1 k ) + ( r 1 k 1 ) ( n k ) = (n n k ) ( r k ) = r k (r 1 k 1 ) ( r+k k ) = ( r+n+1 n ) ( r m)( m k ) = (r k )(r k m k ) 19 / 23

Exercises (x + y) n = k ( n k )xk y n k ( r k ) = (r 1 k ) + ( r 1 k 1 ) ( n k ) = (n n k ) ( r k ) = r k (r 1 k 1 ) ( r+k k ) = ( r+n+1 n ) ( r m)( m k ) = (r k )(r k m k ) ( r k )(s k ) = (r+s r ) k 20 / 23

Bounding Summations Mathematical Induction The simplest and most common form of mathematical induction proves that a statement involving a natural number n holds for all values of n. The proof consists of two steps: 1 The basis (base case): showing that the statement holds when n = 0 or n = 1. 2 The inductive step: showing that if the statement holds for some n, then the statement also holds when n + 1 is substituted for n. Bounding the Terms k 3 k = k+2 3 k+2 = k+1 3 k+1 k 3 k = k + 1 3 k+1. 1 k + 2 3 k + 1 2 3. k + 1 3 k+1 1 3 1 1 2/3 = 1. 21 / 23

Probability Definition 1 Sample space S: A set whose elements are elementary events. S = {HH, HT, TH, TT }. 2 Elementary event: A possible outcome of an experiment, HH, HT, TH, and TT. 3 Event: A subset of the sample space S. The event of obtaining one head and one tail is {HT, TH}. Definition Probability distribution. A probability distribution Pr{} on a sample space S is a mapping from events of S to real numbers satisfying the following probability axioms: 1 Pr{A} 0 for any event A. 2 Pr{S} = 1. 3 Pr{A B} = Pr{A} + Pr{B} for any two mutually exclusive events A and B. In general, Pr{ i A i } = i Pr{A i }. 22 / 23

Bayes s Theorem Exercise Pr{A B} = Pr{B} Pr{A B} Pr{A B} = Pr{A B} = = Pr{A} Pr{B A}. Pr{A} Pr{B A}. Pr{B} Pr{A} Pr{B A} Pr{A} Pr{B A} + Pr{Ā} Pr{B Ā}. Describe a procedure that takes as input two integers a and b such that 0 < a < b and, using fair coin flips, produces as output heads with probability a/b and tails with (b a)/b. Give a bound on the expected number of coin flips, which should be O(1). Exercise You are a contestant in a game show in which a prize is hidden behind one of three curtains. You will win the prize if you select the correct curtain. After you have picked one curtain but before the curtain is lifted, the emcee lifts one of the other curtain, knowing that it will reveal an empty stage, and asks if you would like to switch from your current selection to the remaining curtain. How would you chances change if you switch? (This question is the celebrated Monty Hall problem, named after a game-show host who often presented contestants with just this dilemma.) 23 / 23