Download presentation
Presentation is loading. Please wait.
Published byClarence Richardson Modified over 8 years ago
1
1 CPSC 320: Intermediate Algorithm Design and Analysis July 11, 2014
2
2 Course Outline Introduction and basic concepts Asymptotic notation Greedy algorithms Graph theory Amortized analysis Recursion Divide-and-conquer algorithms Randomized algorithms Dynamic programming algorithms NP-completeness
3
3 Reviewing some proof concepts
4
4 Concepts related to proofs Hypothesis: what we assume is true Proposition: what we want to prove is true Definition: something that we name, that doesn’t need a proof Theorem: something that is not evident that we provide a proof Lemma: an intermediary step in a proof (a “mini-theorem”) Corollary: something that can be inferred from previous results very easily
5
5 Common types of proof Direct proof: from something known, extend until we reach the result Contradiction: negate the proposition, and extend until we reach something impossible Contraposition: negate the proposition, and extend until we reach a negation of the assumption Induction: prove for a base case, and prove that, if a smaller case is true, the next case is also true Example: to prove that something exists, just show one that works Exhaustion: prove for all possible cases
6
6 Maximum Flow Problem
7
7 Maximum Flow Assume a directed graph where each edge has a capacity Assume two nodes (source and sink) Problem: find a flow from source to sink that uses maximum possible value In any node (except source and sink) incoming flow equals outgoing flow Application: Flow of materials from a system to a client (e.g., water pipes) Flow of electrical current through a network Transportation of goods
8
8 Maximum Flow – Formal Definitions
9
9 Ford-Fulkerson Method
10
10 Residual Network
11
11 Flow augmentation
12
12 Augmenting path
13
13 Ford-Fulkerson Algorithm
14
14 Analysis Does this algorithm provide a valid flow? Does this algorithm provide the maximum flow? What is the time complexity of this algorithm? How many times does the main loop run? Does the algorithm always terminate?
15
15 Analysis
16
16 Minimum Cut Cut: partition of the nodes of a graph such that two nodes are in different subsets Capacity of the cut: sum of the capacities of all cut edges in one direction Minimum cut: cut with minimum capacity Applications: Network reliability evaluation
17
17 Minimum Cut – Formal Definitions
18
18 Relationship between flow and cut
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.