Algorithms and Networks

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Algorithm Design Methods Spring 2007 CSE, POSTECH.
C&O 355 Lecture 23 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
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
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
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
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.
EECS 203: It’s the end of the class and I feel fine. Graphs.
Fixed Parameter Complexity Algorithms and Networks.
Graph Theory Topics to be covered:
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Advanced Algorithm Design and Analysis (Lecture 13) SW5 fall 2004 Simonas Šaltenis E1-215b
1 Algorithms and networks Period 2, 2014/ Today Graphs and networks and algorithms: what and why? This course: organization Case introduction:
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 Algorithms and Networks Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij.
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.
Design and Analysis of Algorithms (09 Credits / 5 hours per week) Sixth Semester: Computer Science & Engineering M.B.Chandak
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:
Introduction to Graph Theory
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
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,
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Design and Analysis of Algorithms (09 Credits / 5 hours per week)
Introduction to Approximation Algorithms
Algorithms and Networks
Lap Chi Lau we will only use slides 4 to 19
EECS 203 Lecture 19 Graphs.
Joint work with Hans Bodlaender
Routing Through Networks - 1
Topics in Algorithms Lap Chi Lau.
Algorithm Design Methods
Summary of lectures Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture Slides Recurrence and Master Theorem (Chapter 4). Lecture Slides.
Graph theory Definitions Trees, cycles, directed graphs.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Design and Analysis of Algorithm
EECS 203 Lecture 20 More Graphs.
Algorithms and Networks
1.3 Modeling with exponentially many constr.
Parameterised Complexity
Lecture 15: Graph Theory II
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 29 Complexity Theory
Richard Anderson Lecture 27 NP Completeness
1.3 Modeling with exponentially many constr.
Richard Anderson Lecture 26 NP-Completeness
Algorithm Design Methods
Backtracking and Branch-and-Bound
Algorithm Design Methods
Unit –VII Coping with limitations of algorithm power.
Hamiltonicity below Dirac’s condition
Richard Anderson Lecture 25 NP Completeness
Approximation Algorithms
Algorithm Design Methods
Presentation transcript:

Algorithms and Networks Johan M. M. van Rooij Hans L. Bodlaender

Teacher 1: Johan van Rooij Teacher (only on Tuesday) Software Project. Algorithms and Networks. Master’s thesis projects. Senior Consultant / Data Scientist (rest of the week) CQM B.V. Eindhoven. Contact me: J.M.M.vanRooij@uu.nl BBG 5.07 (Tuesdays) Directly after the lecture. Johan van Rooij

Teacher 2: Hans Bodlander Professor in Utrecht Head of the algorithms group. Professor in Eindhoven In Eindhoven on Mondays. Contact me: H.L.Bodlaender@uu.nl 030-2534409 BBG 5.03 (Thursday 15-17) Or, see if I’ve time. Or, make an appointment by email. Hans Bodlaender

What are we going to do today? Part 1: Algorithms and Networks: what and why? Course organisation. Euler tour example. Part 2: Lecture: stable marriage problem.

Algorithms and Networks What and why?

Graph: Mathematical representation of a network. Research started in 1736 by Euler: bridges of Königsberg. Can we make a walk where we cross each bridge once (Euler-tour)? Voorbeeld is niet het originele paper, wel de originele illustraties. Deze graaf is niet de graaf van königsberg. A B C D E F

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 real world problems have additional information. Then, the network is graph with some extra information such as: Weights, lengths, distances, costs, time, … Labels, sizes, names, …

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.

Model and algorithm Solution to problem Real-world problem Model: mathematical representation of real-world problem. Algorithm: computational plan consisting of logical computational steps to compute of optimise that what is modelled. Practical algorithm development cycles through all four levels. For the theory of algorithms we need only the middle two. Real-world problem Model Algorithm Implementation Solution to problem This course focuses on the theory of algorithms. However, modelling an (almost) real-world problem as a special case of problems solved by algorithms in this class is part of what we want to teach (primarily in exercises).

Algorithms and complexity 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. Approximation complexity (e.g. APX-completeness) Fixed parameter tractability.

Topics of course (1) Important polynomial-time algorithms. Stable marriage. Shortest paths. Maximum flow. Minimum cost flow. Matching (bipartite and general graphs). Dealing with hard problems, …

Topics of course (2) Important polynomial-time algorithms, … Dealing with hard problems. Exact exponential-time algorithms. Approximation algorithms and complexity. Parameterized algorithms and complexity. Kernelisation. Treewidth. Graph Isomorphism. And, when time permits: Introduction to Algorithmic Game Theory.

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

Polynomial solution algorithms Solution quality Computation time Optimal Bound on quality Good solution, no quality guarantee Polynomial Polynomial solution algorithms Approximation algorithms Construction heuristics Super polynomial and/or no guarantee Exact algorithms: Tree search Dynamic programming Integer linear programming …… Hybrid algorithms Column generation without complete branch-and-price Meta heuristics: Local search Genetic algorithms I borrowed this slide from Marjan van den Akker (Algorithms for Decision Support)

Polynomial solution algorithms Solution quality Computation time Optimal Bound on quality Good solution, no quality guarantee Polynomial Polynomial solution algorithms Approximation algorithms Construction heuristics Super polynomial and/or no guarantee Exact algorithms: Tree search Dynamic programming Integer linear programming Hybrid algorithms Column generation without complete branch-and-price Meta heuristics: Local search Genetic algorithms P I hope you know what P and NP are, and what this means? NP-hard

Polynomial solution algorithms Solution quality Computation time Optimal Bound on quality Good solution, no quality guarantee Polynomial Polynomial solution algorithms Approximation algorithms Construction heuristics Super polynomial and/or no guarantee Exact algorithms: Tree search Dynamic programming Integer linear programming …… Hybrid algorithms Column generation without complete branch-and-price Meta heuristics: Local search Genetic algorithms Algorithms and networks Algorithms and networks Explore the fundamentals of what can algorithmically be done on hard problems. Focus on what can be done while still obtaining optimal solution quality.

Algorithms and Networks Course ORGANISATION

Algorithms and networks 2 lectures per week. Tuesday 11:00 – 12:45 by Johan van Rooij. Thursday 15:15 – 17:00 by Hans Bodlaender. Approximately 8 sets of exercises. Two weeks time for handing them in. 2 partial exams. See the course website (www.cs.uu.nl/docs/vakken/an) for Important updates on the course. Slides. Exercises. Schedules. Grades. Etc.

Final grade Final Grade = (Exercise set average) * 0.3 + (Exam 1) * 0.35 + (Exam 2) * 0.35 Assuming: Exercise sets at least 6.0. Average exams at least 5.0. Details on the re-examn or additional assignment, see webpage.

Purpose of course Knowing and being able to use and apply… Important algorithmic techniques and research fields. Important algorithms and their applications. Analysis of algorithms. The mathematics behind these concepts. A little bit of algorithmic modelling. In particular for combinatorial problems involving graphs and networks.

Studying this course Topics for the examn are what is in the lectures. Lecture slides give an overview of material to study, but are not always guaranteed to be complete. Materials are scattered through literature. We try to give pointers on the website for further reference (not required). The lectures are where it happens! Topics for the examn are also what is in the exercises. There are topics in exercises that are not in the lectures. Also, you learn the most from the exercises. As is the case with any highly mathematical course. Finish them before the corresponding exam, even when the deadline is later. The recommended books are not strictly necessary. What we teach can be found there if you need it.

Prerequisites We expect you to have: Basic mathematics skills. Some undergraduate experience with algorithm design and analysis. For example, experience using the big-O notation. Knowledge of the concept NP-Completeness. The course ‘Algorithm for Decision Support’ covers all these aspects. The bachelor course ‘Algoritmiek’ also. Otherwise review the appropriate chapters in Cormen et al. on the topics Mathematical Foundations, Elementary Data Structures, Dynamic Programming, Elementary Graph Algorithms, and NP-Completeness.

Graded exercise sets 8 sets (maybe 7 or 9) Hand in: Dutch or English You have two weeks for each set. Every week a new exercise set will be handed out. Hand in: By e-mail: H.L.Bodlaender@uu.nl, include [AN1], [AN2] etc in the header of your e-mail. Or, on paper during the lectures. 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

On the exercise sets Lots of work..., but you learn a lot... Working in pairs: OBLIGATORY, due to the high number of students. 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. Joker rule (write joker on your work or in your e-mail): 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.

Workload This course is 7.5 ETCS. Each week: This means 20 hour of work per week (officially). Each week: Two lectures on two different topics. Making exercises – lots of work, but not that much. Studying topics covered by the lectures yourself. We go through a lot of material, so we recommend to study the material during the course, not only for the exams.

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

Algorithms and Networks Euler tour example

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 B C D E F

Why? A B C D E F Can we make a walk where we cross each bridge once? Yes: D-E-A-D-C-A-F-E-B-A-C-F-B-F-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...

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: 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 v or vertices of degree at least 2. While there exists unvisited edges, select a vertex u on the tour with unvisited edges. 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.

Euler paths and tours A B C D E F Theorem: A connected graph has an Euler tour, if and only if, every vertex in the graph has even degree. Corollary: 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-F-E-B-A-C-F-B-F-A-E A B C D E F

Algorithms and Networks Time for a break...