Certifying algorithms Algorithms and Networks. Certifying algorithms What is it? Examples: –Euler tour –Bipartite graphs –Flow –Planarity Certifying algorithms2.

Slides:



Advertisements
Similar presentations
Analysis of Algorithms Rate of Growth of functions Prof. Muhammad Saeed.
Advertisements

Trees-I Prof. Muhammad Saeed Analysis of Algorithms.
GRAPHS Prof. Muhammad Saeed Analysis of Algorithms Analysis Of Algorithms1.
The Primal-Dual Method: Steiner Forest TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A AA A A A AA A A.
Lectures on Graph Algorithms: searching, testing and sorting
Analysis of Algorithms
Lectures on NP-hard problems and Approximation algorithms
Planar graphs Algorithms and Networks. Planar graphs2 Can be drawn on the plane without crossings Plane graph: planar graph, given together with an embedding.
Planar Graphs: Coloring and Drawing
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Great Theoretical Ideas in Computer Science.
Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
What is the next line of the proof? a). Let G be a graph with k vertices. b). Assume the theorem holds for all graphs with k+1 vertices. c). Let G be a.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
Drawing of G. Planar Embedding of G Chord A chord of a cycle C is an edge not in C whose endpoints lie in C.
Drawing of G. Planar Embedding of G Proposition Proof. 1. Consider a drawing of K 5 or K 3,3 in the plane. Let C be a spanning cycle. 2. If the.
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 10, Monday, September 22.
Problem: Induced Planar Graphs Tim Hayes Mentor: Dr. Fiorini.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
 2004 SDU Lecture 7- Minimum Spanning Tree-- Extension 1.Properties of Minimum Spanning Tree 2.Secondary Minimum Spanning Tree 3.Bottleneck.
Mathematics of Networks (Cont)
V Spanning Trees Spanning Trees v Minimum Spanning Trees Minimum Spanning Trees v Kruskal’s Algorithm v Example Example v Planar Graphs Planar Graphs v.
Data Structures & Algorithms Graphs
Planar Graphs Graph Coloring
Introduction to Planarity Test W. L. Hsu. 2/21 Plane Graph A plane graph is a graph drawn in the plane in such a way that no two edges intersect –Except.
VLSI Layout Algorithms CSE 6404 A 46 B 65 C 11 D 56 E 23 F 8 H 37 G 19 I 12J 14 K 27 X=(AB*CD)+ (A+D)+(A(B+C)) Y = (A(B+C)+AC+ D+A(BC+D)) Dr. Md. Saidur.
Stefan Felsner planar graph G planar embedding of G A graph G is planar if it can be drawn on the plane with no crossing edges.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Graph.
1.5 Graph Theory. Graph Theory The Branch of mathematics in which graphs and networks are used to solve problems.
Chap. 11 Graph Theory and Applications 1. Directed Graph 2.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
CSC 252: Algorithms October 28, 2000 Homework #5: Graphs Victoria Manfredi (252a-ad) notes: -Definitions for each of the graph concepts are those presented.
Chapter 7 Planar Graphs 大葉大學 資訊工程系 黃鈴玲  7.2 Planar Embeddings  7.3 Euler’s Formula and Consequences  7.4 Characterization of Planar Graphs.
CSE 421 Algorithms Richard Anderson Autumn 2015 Lecture 5.
Certifying Algorithms [MNS11]R.M. McConnell, K. Mehlhorn, S. Näher, P. Schweitzer. Certifying algorithms. Computer Science Review, 5(2), , 2011.
Trees.
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
Algorithms and Networks
Outline 1 Properties of Planar Graphs 5/4/2018.
Discrete Mathematics Graph: Planar Graph Yuan Luo
Characteristics of Planar Graphs
Proof technique (pigeonhole principle)
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
Graph theory Definitions Trees, cycles, directed graphs.
Great Theoretical Ideas in Computer Science
Greedy Algorithms / Minimum Spanning Tree Yin Tat Lee
Algorithms and Complexity
Planarity Testing.
Discrete Mathematics for Computer Science
Graph.
Problem Solving 4.
Richard Anderson Autumn 2016 Lecture 5
Richard Anderson Winter 2009 Lecture 6
MAT 2720 Discrete Mathematics
N(S) ={vV|uS,{u,v}E(G)}
Gaph Theory Planar Graphs
GRAPH THEORY Properties of Planar Graphs Ch9-1.
Richard Anderson Lecture 5 Graph Theory
Richard Anderson Winter 2019 Lecture 5
Drawing a graph
Drawing a graph
GRAPH THEORY Properties of Planar Graphs Ch9-1.
Drawing a graph
Presentation transcript:

Certifying algorithms Algorithms and Networks

Certifying algorithms What is it? Examples: –Euler tour –Bipartite graphs –Flow –Planarity Certifying algorithms2

Type of algorithm design, introduced by Mehlhorn and others No formal definition here Certifying algorithms3

Correctness of programs Program: –Input –(Working of program): Hidden to user –Output But... how do we know there is no bug? Why is the program correct? Certifying algorithms4

Example Euler tour algorithm Input: Graph G=(V,E) Output: –An Euler tour if it exists –“NO”, if there is no Euler tour Certifying algorithms5

Example Euler tour algorithm Input: Graph G=(V,E) Output: –An Euler tour if it exists This, we can check! –“NO”, if there is no Euler tour But how do we know if this answer is correct? Certifying algorithms6

Certifying algorithm Program –Input –(Working of program): still hidden to user –Output + proof (certificate) that output is correct! Plus: easy way to check these proofs Certifying algorithms7

Euler tour Certificate for Euler tour program YES: the Euler tour itseld NO: … Certifying algorithms8

Euler theorem A graph G=(V,E) has an Euler tour, if and only if the following two conditions hold: –Every vertex has even degree –G is connected Certifying algorithms9

No-Certificate for Euler tour A vertex of odd degree Or A set of vertices W that forms a connected component –Verify: W has less than n vertices, and all neighbors of all vertices in W belong to W Certifying algorithms10

Bipartite graphs A graph G=(V,E) is bipartite if we can partition V into sets X and Y such that each edge in E has one endpoint in X and one endpoint in Y So … what would be a certificate for Bipartiteness? Certifying algorithms11

Bipartite certificate Yes: bipartition No: odd cycle in G Certifying algorithms12

Algorithm Make a depth first search spanning forest of G Color the vertices on odd levels red and on even levels blue Is there an edge between two vertices of the same color? Then: take the path between these in the tree, and add the edge: odd cycle Certifying algorithms13

Flow Input: flow network (G, s, t, c) Output: maximum flow f So, what is a certificate? Certifying algorithms14

Certificate for flow Pair: –The flow function f –And, the corresponding maximum cut See (the proof of) the max flow min cut theorem Certifying algorithms15

Bipartite Matching Input: Bipartite graph G=(V U W,E) Output: A maximum matching in G What is a certificate for the matching? Certifying algorithms16

Certificate for bipartite matching Look at the flow model from bipartite matching, and a minimum cut. You get: A vertex cover C with the property that |C|=|M| –I.e., each edge has one endpoint in C Details on the board Certifying algorithms17

Planarity Planar graphs: can be drawn on the plane without crossing edges Many applications! Complicated linear time algorithms for checking planarity –Tarjan, 1976: linear time for checking planarity –Chiba et al, 1985: linear time algorithm that finds a planar embedding Certifying algorithms18

Kuratowski Theorem (Kuratowski) A graph is planar, if and only if it does not contain a subgraph that is a subdivision of K 5 or K 3,3 Certifying algorithms19

Subdivision Add vertices on edges Certifying algorithms20

Wagner Theorem (Wagner) A graph is planar, if and only if it does not contain K 5 or K 3,3 as a minor Certifying algorithms21

Certificate for nonplanarity Hundack et al. 1987: linear time algorithm that finds a a subgraph that is a subdivision of K 5 or K 3,3 of a nonplanar graph Certifying algorithms22

Certificate for planarity Schnyder 1990: –Finds in O(n) time an embedding of a graph in the plane, such that Each vertex has integer coordinates between 1 and n – 2 Each edge is a straight line One can easily verify that such an embedding is indeed correct. Certifying algorithms23

Certifying algorithm for planarity Either output Schnyder embedding OR Output minor Certifying algorithms24

Conclusions Certifying algorithms Useful for reliability of software Some examples … Implemented in some packages nowadays, e.g., LEDA Certifying algorithms25