1 Algorithms and Networks Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Introduction to Graphs
Great Theoretical Ideas in Computer Science for Some.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
Management Science 461 Lecture 2b – Shortest Paths September 16, 2008.
Combinatorial Algorithms
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 1 (Part 1) Introduction/Overview Tuesday, 9/4/01.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
IEOR266 © Classification of MCNF problems.
Approximation Algorithms for the Traveling Salesperson Problem.
EAs for Combinatorial Optimization Problems BLG 602E.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Circuits CSE 373 Data Structures Lecture 22. 3/12/03Circuits - Lecture 222 Readings Reading ›Sections and 9.7.
Euler and Hamilton Paths
GRAPH Learning Outcomes Students should be able to:
Programming & Data Structures
NP-Complete Problems CSC 331: Algorithm Analysis NP-Complete Problems.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Programming for Geographical Information Analysis: Advanced Skills Online mini-lecture: Introduction to Networks Dr Andy Evans.
The Traveling Salesperson Problem Algorithms and Networks.
EECS 203: It’s the end of the class and I feel fine. Graphs.
Graph Theory Topics to be covered:
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
1 Algorithms and networks Period 2, 2014/ Today Graphs and networks and algorithms: what and why? This course: organization Case introduction:
Euler and Hamilton Paths
Structures 7 Decision Maths: Graph Theory, Networks and Algorithms.
Can you connect the dots as shown without taking your pen off the page or drawing the same line twice.
Euler and Hamilton Paths. Euler Paths and Circuits The Seven bridges of Königsberg a b c d A B C D.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Approximation Algorithms
1 Steiner Tree Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Data Structures & Algorithms Graphs
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
1 Approximation Algorithm Updated on 2012/12/25. 2 Approximation Algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
Week 12 - Wednesday.  What did we talk about last time?  Matching  Stable marriage  Started Euler paths.
Introduction to Graphs. This Lecture In this part we will study some basic graph theory. Graph is a useful concept to model many problems in computer.
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
1.Quiz 5 due tomorrow afternoon in E309 from 1pm to 4pm. 2.Homework grades will be based on ten graded homework assignments (dropping the lowest one).
Chapter 6: Graphs 6.1 Euler Circuits
1 Algorithms and networks Period 3, 2011/ Today Graphs and networks and algorithms: what and why? This course: organization Case introduction:
&d1 Algorithms and networks Period 3, 2010/2011. &d2 Today Graphs and networks and algorithms: what and why? This course: organization Case introduction:
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Review Lecture Tuesday, 12/11/01.
Introduction to Graph Theory
CSE 421 Algorithms Richard Anderson Autumn 2015 Lecture 5.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
1 CSE 326: Data Structures: Graphs Lecture 23: Wednesday, March 5 th, 2003.
Algorithms and Networks
Routing Through Networks - 1
EECS 203 Lecture 20 More Graphs.
Great Theoretical Ideas in Computer Science
Algorithms and Networks
Parameterised Complexity
Richard Anderson Winter 2019 Lecture 6
Richard Anderson Lecture 5 Graph Theory
Richard Anderson Autumn 2015 Lecture 6
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

1 Algorithms and Networks Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij

2 Teacher 1: Johan van Rooij Room: BBG 507 Office hours: Tuesday 9:00-17:00 For any questions or whatsoever, please contact me directly after the lecture. Rest of the week, working at CQM.

3 Teacher 2: Hans Bodlander Room: BBG 503 Office hours: Thursday 15:00-17:00 - Or see if I’ve time - Or make appointment by

4 What are we going to do today?  Part 1:  Algorithms and Networks: What and Why?  Course organization.  Euler tour example.  Part 2:  Lecture: Stable marriage problem.

5 WHAT AND WHY? Algorithms and Networks

6 Graphs Started in 1736 with paper by Euler: bridges of Königsberg. Can we make a walk where we cross each bridge once (Euler- tour)? A A B B C C D D E E F F

7 Networks  Graphs are a (mathematical) model for many things in the real world:  Road networks, electrical networks, computer networks, organizational diagrams, social networks, structure of software, data base diagrams, …  Often the real world problem has additional information: the network is graph with some extra info  Weights, lengths, distances, costs, time, …  Labels, sizes, names, …

8 Graph/network problems  Often, we want to compute something on the network, motivated from the application (or theoretical curiosity).  Examples:  Shortest path from A to B.  Maximum flow from A to B.  Does the graph have an Euler tour (all edges exactly once).  Does the graph have a Hamiltonian cycle (all nodes exactly once).  How good and fast can we let the computer do this computation?  Theoretical questions of algorithm design.  If fast algorithms exists, of high practical value.

9 Model and algorithm 1. Real-world problem 2. Mathematical model of real-world problem 3. Algorithm for mathematical model 4. Solution produced by the algorithm 5. Translation of solution to solution for real-world problem 6. Check that the translated solution makes sense for the real- world problem.  If you do this for real problems for real customers, step 6 is often followed by designing a better model and returning to step 2.  This course is on steps 2 and 3: modelling and algorithms.

10 Algorithmic techniques  Combinatorial algorithms  Mathematical programming  (Integer) linear programming.  Quadratic programming.  Non-linear programming.  Pruning an exhaustive search tree  Branch and bound.  Constraint programming.  Heuristics.  Greedy heuristics  Local search (iterative improvement, simulated annealing, tabu search, evolutionary algorithms, …)  …

11 Algorithms and complexity  Algorithms  Exact, heuristic, approximation, special cases, …  Polynomial time, exponential time, …  Polynomial space, exponential space, …  Algorithms that parallelize well, or not, …  …  Complexity (asymptotic – O-notation)  Intrinsic difficulty of a problem.  NP-completeness, other complexity classes.  Fixed parameter tractability.  …

12 COURSE ORGANISATION Algorithms and Networks

13 Algorithms and networks  2 lectures per week  Tuesday 9:00 – 10:45 by Johan van Rooij  Thursday 13:15 – 15:00 by Hans Bodlaender  Approximately 8 sets of exercises  Two weeks time for handing them in  2 partial exams  See the course website ( forwww.cs.uu.nl/docs/vakken/an  Important updates on the course  Powerpoint files  Exercises  Schedules  Dates, etc

14 Purpose of course  Knowing and being able to use and apply…  Important algorithmic techniques.  Important algorithms and their applications.  Modelling.  Analysis of algorithms.  In particular for combinatorial problems involving graphs and networks.

15 Topics of course (1)  Paths, flows, matchings, …  Stable marriage  Shortest paths  Travelling salesman problem  Maximum flow  Minimum cost flow  Matching (bipartite, general graphs)  Hard problems, …

16 Topics of course (2)  Paths, flows, matchings, …  Hard problems, …  NP-completeness and complexity  Parameterized complexity  Exact expontial-time algorithms  Kernelization  Treewidth  Approximation algorithms  To be decided

17 Final grade Final Grade= (Exercise set average) * (Exam 1) * (Exam 2) * 0.35  Assuming:  Exercise sets at least 6  Average exams at least 5  Details see webpage.

18 Studying this course  Visit the lectures!  Materials are scattered through literature: often hard to study at home if you were not at the course.  Make notes!  If you are not at the course: borrow/copy notes of other students.  Next to the lectures, you learn the most from the exercises.  Finish them before the corresponding exam, even when the deadline is later.  Topics in exercises that are not in the lectures are exam content!  Some books are recommended, but not necessary.  Use the powerpoints and pdf’s on the website.

19 Graded exercise sets  8 sets (maybe 7 or 9)  You have two weeks for each set.  Every week a new exercise set will be handed out.  Hand in:  By include [AN1], [AN2] etc in the header of your .  Or, on paper during the lectures in the appropriate folder.  Or, on paper in Hans’ mailbox on the 5th floor of the BBG.  Deadline: Monday 23:59 hours.  After the deadline: grade = 0 (exception: joker rule)  Dutch or English  Write clear, legible, etc.  Unreadable, messy: grade = 0

20 On the exercise sets  Lots of work..., but you learn a lot...  Working in pairs:  Both should have worked on and have understood all parts of what is handed in.  Allowed to mark parts as been done by one student.  Not necessary to always have the same pair.  Working alone is also allowed.  Joker rule (write joker on your work or in your ):  Twice during the course you can extend your deadline with three days (Monday 23:59 becomes Thursday 23:59).  Miss a third deadline: grade = 0.  Unless there are very special circumstances for all missed deadlines.

21 Are there...  Any questions on the organisation of the course?

22 EULER TOUR EXAMPLE Algorithms and Networks

23 Let’s get back to our example  Can we make a walk where we cross each bridge once?  Yes!  Can we make a round tour where we cross each bridge once?  No!  Why? (next slide) A A B B C C D D E E F F

24 Why?  Can we make a walk where we cross each bridge once?  Yes: D-E-A-D-C-A-C-F-A-F-B-F-E-B-A-E.  Can we make a round tour where we cross each bridge once? (Eurler tour).  No. Why?  Theorem: A connected graph has an Euler tour, if and only if, every vertex in the graph has even degree.  If: round trip through an odd degree vertex not possible.  Only if... A A B B C C D D E E F F

25 If... proof continued  Lemma: If every vertex in a connected graph has even degree, then it has an Euler tour that can be found using the following algorithm: 1. From any starting vertex v build up any tour using unvisited edges until returning to v.  It is not possible to get stuck because all vertices have even degree before and after the tour visits the vertex. Hence the tour can only enter vertices of degree at least While there exists unvisited edges, select a vertex u on the tour with unvisited edges. 3. Start another trail from u, following unused edges until returning to u, merge the two tours and return to step 2.  Again we cannot get stuck because of the same reason.

26 Euler paths and tours  Theorem: A connected graph has an Euler tour, if and only if, every vertex in the graph has even degree.  Corrolary: A connected graph has an Euler path, if and only if, the graph has 0 or 2 vertices of odd degree.  So we can see directly that our example graph has an Euler path. Even without the given solution.  D-E-A-D-C-A-C-F-A-F-B-F-E-B-A-E A A B B C C D D E E F F

27 TIME FOR A BREAK... Algorithms and Networks