Tree isomorphism. Alexander Smal. Joint Advanced Student School St.Petersburg State University of Information Technologies, Mechanics and Optics

Size: px
Start display at page:

Download "Tree isomorphism. Alexander Smal. Joint Advanced Student School St.Petersburg State University of Information Technologies, Mechanics and Optics"

Transcription

1 Tree isomorphism Alexander Smal St.Petersburg State University of Information Technologies, Mechanics and Optics Joint Advanced Student School / 22

2 Motivation In some applications the chemical structures are often trees with millions of vertices: gene splicing, protein analysis, molecular biology. Difference between O(n), O(n log n), and O(n 2 ) isomorphism algorithms is not just theoretical importance. 2 / 22

3 Graph isomorphism Definition Isomorphism of graphs G 1 (V 1, E 1 ) and G 2 (V 2, E 2 ) is a bijection between the vertex sets φ : V 1 V 2 such that u, v V 1 (u, v) E 1 (φ(u), φ(v)) E 2. 3 / 22

4 Graph isomorphism Definition Isomorphism of graphs G 1 (V 1, E 1 ) and G 2 (V 2, E 2 ) is a bijection between the vertex sets φ : V 1 V 2 such that u, v V 1 (u, v) E 1 (φ(u), φ(v)) E 2. Facts No algorithm, other than brute force, is known for testing whether two arbitrary graphs are isomorphic. 3 / 22

5 Graph isomorphism Definition Isomorphism of graphs G 1 (V 1, E 1 ) and G 2 (V 2, E 2 ) is a bijection between the vertex sets φ : V 1 V 2 such that u, v V 1 (u, v) E 1 (φ(u), φ(v)) E 2. Facts No algorithm, other than brute force, is known for testing whether two arbitrary graphs are isomorphic. It is still an open question (!) whether graph isomorphism is NP complete. 3 / 22

6 Graph isomorphism Definition Isomorphism of graphs G 1 (V 1, E 1 ) and G 2 (V 2, E 2 ) is a bijection between the vertex sets φ : V 1 V 2 such that u, v V 1 (u, v) E 1 (φ(u), φ(v)) E 2. Facts No algorithm, other than brute force, is known for testing whether two arbitrary graphs are isomorphic. It is still an open question (!) whether graph isomorphism is NP complete. Polynomial time isomorphism algorithms for various graph subclasses such as trees are known. 3 / 22

7 Rooted trees Definition Rooted tree (V, E, r) is a tree (V, E) with selected root r V. 4 / 22

8 Rooted trees Definition Rooted tree (V, E, r) is a tree (V, E) with selected root r V. Definition Isomorphism of rooted trees T 1 (V 1, E 1, r 1 ) and T 2 (V 2, E 2, r 2 ) is a bijection between the vertex sets φ : V 1 V 2 such that and φ(r 1 ) = r 2. u, v V 1 (u, v) E 1 (φ(u), φ(v)) E 2 4 / 22

9 Rooted trees Definition Rooted tree (V, E, r) is a tree (V, E) with selected root r V. Definition Isomorphism of rooted trees T 1 (V 1, E 1, r 1 ) and T 2 (V 2, E 2, r 2 ) is a bijection between the vertex sets φ : V 1 V 2 such that and φ(r 1 ) = r 2. u, v V 1 (u, v) E 1 (φ(u), φ(v)) E 2 4 / 22

10 Rooted trees Definition Rooted tree (V, E, r) is a tree (V, E) with selected root r V. Definition Isomorphism of rooted trees T 1 (V 1, E 1, r 1 ) and T 2 (V 2, E 2, r 2 ) is a bijection between the vertex sets φ : V 1 V 2 such that and φ(r 1 ) = r 2. u, v V 1 (u, v) E 1 (φ(u), φ(v)) E 2 Example T 1 and T 2 are isomorphic as graphs... a B T 1 b c A C T 2 4 / 22

11 Rooted trees Definition Rooted tree (V, E, r) is a tree (V, E) with selected root r V. Definition Isomorphism of rooted trees T 1 (V 1, E 1, r 1 ) and T 2 (V 2, E 2, r 2 ) is a bijection between the vertex sets φ : V 1 V 2 such that and φ(r 1 ) = r 2. u, v V 1 (u, v) E 1 (φ(u), φ(v)) E 2 Example T 1 and T 2 are isomorphic as graphs but not as rooted trees! a B T 1 b c A C T 2 4 / 22

12 Rooted trees (part 2) Lemma If there is O(n) algorithm for rooted trees isomorphism, then there is O(n) algorithm for ordinary trees isomorphism. 5 / 22

13 Rooted trees (part 2) Lemma If there is O(n) algorithm for rooted trees isomorphism, then there is O(n) algorithm for ordinary trees isomorphism. Proof. 1 Let A to be O(n) algorithm for rooted trees. 5 / 22

14 Rooted trees (part 2) Lemma If there is O(n) algorithm for rooted trees isomorphism, then there is O(n) algorithm for ordinary trees isomorphism. Proof. 1 Let A to be O(n) algorithm for rooted trees. 2 Let T 1 and T 2 to be ordinary trees. 5 / 22

15 Rooted trees (part 2) Lemma If there is O(n) algorithm for rooted trees isomorphism, then there is O(n) algorithm for ordinary trees isomorphism. Proof. 1 Let A to be O(n) algorithm for rooted trees. 2 Let T 1 and T 2 to be ordinary trees. 3 Lets find centers of this trees. There are three cases: 5 / 22

16 Rooted trees (part 2) Lemma If there is O(n) algorithm for rooted trees isomorphism, then there is O(n) algorithm for ordinary trees isomorphism. Proof. 1 Let A to be O(n) algorithm for rooted trees. 2 Let T 1 and T 2 to be ordinary trees. 3 Lets find centers of this trees. There are three cases: 1 each tree has only one center (c 1 and c 2 respectively) return A(T 1, c 1, T 2, c 2 ) 5 / 22

17 Rooted trees (part 2) Lemma If there is O(n) algorithm for rooted trees isomorphism, then there is O(n) algorithm for ordinary trees isomorphism. Proof. 1 Let A to be O(n) algorithm for rooted trees. 2 Let T 1 and T 2 to be ordinary trees. 3 Lets find centers of this trees. There are three cases: 1 each tree has only one center (c 1 and c 2 respectively) return A(T 1, c 1, T 2, c 2 ) 2 each tree has exactly two centers (c 1, c 1 and c 2, c 2 respectively) return A(T 1, c 1, T 2, c 2 ) or A(T 1, c 1, T 2, c 2 ) 5 / 22

18 Rooted trees (part 2) Lemma If there is O(n) algorithm for rooted trees isomorphism, then there is O(n) algorithm for ordinary trees isomorphism. Proof. 1 Let A to be O(n) algorithm for rooted trees. 2 Let T 1 and T 2 to be ordinary trees. 3 Lets find centers of this trees. There are three cases: 1 each tree has only one center (c 1 and c 2 respectively) return A(T 1, c 1, T 2, c 2 ) 2 each tree has exactly two centers (c 1, c 1 and c 2, c 2 respectively) return A(T 1, c 1, T 2, c 2 ) or A(T 1, c 1, T 2, c 2 ) 3 trees has different number of centers return False 5 / 22

19 Diameter and center Definition The diameter of tree is the length of the longest path. 6 / 22

20 Diameter and center Definition The diameter of tree is the length of the longest path. Definition A center is a vertex v such that the longest path from v to a leaf is minimal over all vertices in the tree. 6 / 22

21 Diameter and center Definition The diameter of tree is the length of the longest path. Definition A center is a vertex v such that the longest path from v to a leaf is minimal over all vertices in the tree. Algorithm 1: Choose a random root r. 2: Find a vertex v 1 the farthest form r. 3: Find a vertex v 2 the farthest form v 1. 4: Diameter is a length of path from v 1 to v 2. 5: Centers are median elements of path from v 1 to v 2. 6 / 22

22 Diameter and center Definition The diameter of tree is the length of the longest path. Definition A center is a vertex v such that the longest path from v to a leaf is minimal over all vertices in the tree. Algorithm 1: Choose a random root r. 2: Find a vertex v 1 the farthest form r. 3: Find a vertex v 2 the farthest form v 1. 4: Diameter is a length of path from v 1 to v 2. 5: Centers are median elements of path from v 1 to v 2. It is O(n) algorithm. 6 / 22

23 The idea Let s try to find complete invariant of rooted trees isomorphism. 7 / 22

24 The idea Let s try to find complete invariant of rooted trees isomorphism. Definition Isomorphism invariant is a function f (T ) such that f (T 1 ) = f (T 2 ) for all pairs of isomorphic trees T 1 and T 2. 7 / 22

25 The idea Let s try to find complete invariant of rooted trees isomorphism. Definition Isomorphism invariant is a function f (T ) such that f (T 1 ) = f (T 2 ) for all pairs of isomorphic trees T 1 and T 2. Definition Complete isomorphism invariant is a function f (T ) such that two trees T 1 and T 2 are isomorphic if and only if f (T 1 ) = f (T 2 ). 7 / 22

26 The idea Let s try to find complete invariant of rooted trees isomorphism. Definition Isomorphism invariant is a function f (T ) such that f (T 1 ) = f (T 2 ) for all pairs of isomorphic trees T 1 and T 2. Definition Complete isomorphism invariant is a function f (T ) such that two trees T 1 and T 2 are isomorphic if and only if f (T 1 ) = f (T 2 ). So if we find complete isomorphism invariant we can obtain algorithm from it. 7 / 22

27 The idea Let s try to find complete invariant of rooted trees isomorphism. Definition Isomorphism invariant is a function f (T ) such that f (T 1 ) = f (T 2 ) for all pairs of isomorphic trees T 1 and T 2. Definition Complete isomorphism invariant is a function f (T ) such that two trees T 1 and T 2 are isomorphic if and only if f (T 1 ) = f (T 2 ). So if we find complete isomorphism invariant we can obtain algorithm from it. Note Starting from the next slide tree always means rooted tree! 7 / 22

28 Candidate 1 Observation The level number of a vertex is a tree isomorphism invariant. 8 / 22

29 Candidate 1 Observation The level number of a vertex is a tree isomorphism invariant. Conjecture Two trees are isomorphic if and only if they have the same number of levels and the same number of vertices on each level. 8 / 22

30 Candidate 1 Observation The level number of a vertex is a tree isomorphism invariant. Conjecture Two trees are isomorphic if and only if they have the same number of levels and the same number of vertices on each level. Observation The number of the leaves is a tree isomorphism invariant. 8 / 22

31 Candidate 1 Observation The level number of a vertex is a tree isomorphism invariant. Conjecture Two trees are isomorphic if and only if they have the same number of levels and the same number of vertices on each level. Observation The number of the leaves is a tree isomorphism invariant. Contrary instance a T n 1 2 n T 2 d e D E A 8 / 22

32 Candidate 2 What s wrong with candidate 1? We didn t take into account the degree spectrum of a tree. 9 / 22

33 Candidate 2 What s wrong with candidate 1? We didn t take into account the degree spectrum of a tree. Definition Degree spectrum of tree is the sequence of non-negative integers {d j }, where d j is the number of vertices that have j children. 9 / 22

34 Candidate 2 What s wrong with candidate 1? We didn t take into account the degree spectrum of a tree. Definition Degree spectrum of tree is the sequence of non-negative integers {d j }, where d j is the number of vertices that have j children. Conjecture Two trees are isomorphic if and only if they have the same degree spectrum. 9 / 22

35 Candidate 2 (part 2) Observation Since a tree isomorphism preserves longest paths from the root, the number of levels in a tree is a tree isomorphism invariant. 10 / 22

36 Candidate 2 (part 2) Observation Since a tree isomorphism preserves longest paths from the root, the number of levels in a tree is a tree isomorphism invariant. Contrary instance a A b c B C d e 1 D E T 1 1. T 2. n n 10 / 22

37 Candidate 3 Conjecture Two trees are isomorphic if and only if they have the same degree spectrum at each level. 11 / 22

38 Candidate 3 Conjecture Two trees are isomorphic if and only if they have the same degree spectrum at each level. If two trees have the same degree spectrum at each level, then they must automatically have the same number of levels, the same number of vertices at each level, and the same global degree spectrum! 11 / 22

39 Candidate 3 Conjecture Two trees are isomorphic if and only if they have the same degree spectrum at each level. If two trees have the same degree spectrum at each level, then they must automatically have the same number of levels, the same number of vertices at each level, and the same global degree spectrum! Observation The number of leaf descendants of a vertex and the level number of a vertex are both tree isomorphism invariants. 11 / 22

40 Candidate 3 (part 2) Contrary instance a A level degree spectrum (0, 0, 1, 0,...) b c B C d e f D E F T 1 g 1 G 1 T 2 (0, 1, 1, 0,...) (2, 0, 1, 0,...) (1, 1, 0, 0,...). n. n. (1, 0, 0, 0,...) 12 / 22

41 Algorithm by Aho, Hopcroft and Ullman Determine tree isomorphism in time O( V ). AHU algorithm Uses complete history of degree spectrum of the vertex descendants as a complete invariant. 13 / 22

42 Algorithm by Aho, Hopcroft and Ullman Determine tree isomorphism in time O( V ). AHU algorithm Uses complete history of degree spectrum of the vertex descendants as a complete invariant. The idea of AHU algorithm The AHU algorithm associates with each vertex a tuple that describes the complete history of its descendants. 13 / 22

43 Algorithm by Aho, Hopcroft and Ullman Determine tree isomorphism in time O( V ). AHU algorithm Uses complete history of degree spectrum of the vertex descendants as a complete invariant. The idea of AHU algorithm The AHU algorithm associates with each vertex a tuple that describes the complete history of its descendants. Hard question Why our previous invariants are not complete? 13 / 22

44 Algorithm by Aho, Hopcroft and Ullman Determine tree isomorphism in time O( V ). AHU algorithm Uses complete history of degree spectrum of the vertex descendants as a complete invariant. The idea of AHU algorithm The AHU algorithm associates with each vertex a tuple that describes the complete history of its descendants. Hard question Why our previous invariants are not complete? Let s discuss AHU algorithm. We start from O( V 2 ) version and then I tell how to make it faster (O( V )). 13 / 22

45 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. 14 / 22

46 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A B C D E F G 14 / 22

47 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A B C D (0) E (0) F (0) G (0) 14 / 22

48 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A B ((0)) C D (0) E (0) F (0) G (0) 14 / 22

49 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A B ((0)) C ( (0) (0) ) D (0) E (0) F (0) G (0) 14 / 22

50 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A B ((0)) C ( (0) (0) ) D (0) E (0) F (0) G (0) 14 / 22

51 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A B ((0)) C ( (0) (0) ) D (0) E (0) F (0) G (0) 14 / 22

52 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A ( ((0)) ((0)(0)) (0) ) B ((0)) C ( (0) (0) ) D (0) E (0) F (0) G (0) 14 / 22

53 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A ( ((0)) ((0)(0)) (0) ) B ((0)) C ( (0) (0) ) D (0) E (0) F (0) G (0) 14 / 22

54 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A ( ((0)) ((0)(0)) (0) ) B ((0)) C ( (0) (0) ) D (0) E (0) F (0) G (0) 14 / 22

55 Understanding AHU algorithm Knuth tuples Let s assign parenthetical tuples to all tree vertices. Knuth tuples example A ( ((0)) ((0)(0)) (0) ) B ((0)) C ( (0) (0) ) D (0) E (0) F (0) G (0) 14 / 22

56 Understanding AHU algorithm (part 2) There is algorithm Assign-Knuth-Tuples that visits every vertex once or twice. Assign-Knuth-Tuples(v) 1: if v is a leaf then 2: Give v the tuple name (0) 3: else 4: for all child w of v do 5: Assign-Knuth-Tuples(w) 6: end for 7: end if 8: Concatenate the names of all children of v to temp 9: Give v the tuple name temp 15 / 22

57 Understanding AHU algorithm (part 3) Observation There is no order on parenthetical tuples. 16 / 22

58 Understanding AHU algorithm (part 3) Observation There is no order on parenthetical tuples. Example A ( (0) ((0)) ) a ( ((0)) (0) ) B (0) C ((0)) b ((0)) c (0) D (0) d (0) 16 / 22

59 Understanding AHU algorithm (part 3) Observation There is no order on parenthetical tuples. Example A ( (0) ((0)) ) a ( ((0)) (0) ) B (0) C ((0)) b ((0)) c (0) D (0) d (0) Let s convert parenthetical tuples to canonical names. We should drop all 0 -s and replace ( and ) with 1 and 0 respectively. 16 / 22

60 Understanding AHU algorithm (part 3) Observation There is no order on parenthetical tuples. Example A a B 10 C 1100 b 1100 c 10 D 10 d 10 Let s convert parenthetical tuples to canonical names. We should drop all 0 -s and replace ( and ) with 1 and 0 respectively. 16 / 22

61 Understanding AHU algorithm (part 3) Observation There is no order on parenthetical tuples. Example A a B 10 C 1100 b 1100 c 10 D 10 d 10 Let s convert parenthetical tuples to canonical names. We should drop all 0 -s and replace ( and ) with 1 and 0 respectively. 16 / 22

62 Understanding AHU algorithm (part 4) Assign-Canonical-Names(v) 1: if v is a leaf then 2: Give v the tuple name 10 3: else 4: for all child w of v do 5: Assign-Canonical-Names(v) 6: end for 7: end if 8: Sort the names of the children of v 9: Concatenate the names of all children of v to temp 10: Give v the name 1temp0 17 / 22

63 Understanding AHU algorithm (part 5) We should discuss some important questions. 18 / 22

64 Understanding AHU algorithm (part 5) We should discuss some important questions. Invariant? Is canonical name of a root a tree isomorphism invariant? 18 / 22

65 Understanding AHU algorithm (part 5) We should discuss some important questions. Invariant? Is canonical name of a root a tree isomorphism invariant? Complete invariant? Is canonical name of a root a complete tree isomorphism invariant? 18 / 22

66 Understanding AHU algorithm (part 5) We should discuss some important questions. Invariant? Is canonical name of a root a tree isomorphism invariant? Complete invariant? Is canonical name of a root a complete tree isomorphism invariant? AHU-Tree-Isomorphism(T 1, T 2 ) 1: r 1 root(t 1 ) 2: r 2 root(t 2 ) 3: Assign-Canonical-Names(r 1 ) 4: Assign-Canonical-Names(r 2 ) 5: if name(r 1 ) = name(r 2 ) then 6: return True 7: else 8: return False 9: end if 18 / 22

67 AHU algorithm improvement Observation To compute the root name of a tree of n vertices in one long strand, takes time proportional to n, which is Ω(n 2 ). 19 / 22

68 AHU algorithm improvement Observation To compute the root name of a tree of n vertices in one long strand, takes time proportional to n, which is Ω(n 2 ). Observation For all levels i, the canonical name of level i is a tree isomorphism invariant. 19 / 22

69 AHU algorithm improvement Observation To compute the root name of a tree of n vertices in one long strand, takes time proportional to n, which is Ω(n 2 ). Observation For all levels i, the canonical name of level i is a tree isomorphism invariant. Observation Two trees T 1 and T 2 are isomorphic if and only if for all levels i canonical level names of T 1 and T 2 are identical. 19 / 22

70 AHU algorithm improvement Observation To compute the root name of a tree of n vertices in one long strand, takes time proportional to n, which is Ω(n 2 ). Observation For all levels i, the canonical name of level i is a tree isomorphism invariant. Observation Two trees T 1 and T 2 are isomorphic if and only if for all levels i canonical level names of T 1 and T 2 are identical. The idea 1 Assign canonical names for level, sort by level, and check by level that the canonical level names agree. 19 / 22

71 AHU algorithm improvement Observation To compute the root name of a tree of n vertices in one long strand, takes time proportional to n, which is Ω(n 2 ). Observation For all levels i, the canonical name of level i is a tree isomorphism invariant. Observation Two trees T 1 and T 2 are isomorphic if and only if for all levels i canonical level names of T 1 and T 2 are identical. The idea 1 Assign canonical names for level, sort by level, and check by level that the canonical level names agree. The idea 2 Assign canonical names for level and if canonical level names agree than replace canonical names with integers. 19 / 22

72 AHU algorithm example Example A a B C b c 0 D E d e 1 20 / 22

73 AHU algorithm example Example A a B C b c 0 D 0 E 0 d 0 e / 22

74 AHU algorithm example Example A a B C b c 0 D 1 E 1 d 1 e 1 1,1 1 1,1 20 / 22

75 AHU algorithm example Example A a B C b c 0 D 1 E 1 d 1 e 1 1,1 1 1,1 20 / 22

76 AHU algorithm example Example A a B 0 C 1 1 b 1 1 c 0 D 1 E 1 d 1 e / 22

77 AHU algorithm example Example A a B 1 C 2 b 2 c 1 D 1 E 1 d 1 e 1 1,2 1 1,2 20 / 22

78 AHU algorithm example Example A a B 1 C 2 b 2 c 1 D 1 E 1 d 1 e 1 1,2 1 1,2 20 / 22

79 AHU algorithm example Example A 1 2 a 1 2 B 1 C 2 b 2 c 1 D 1 E 1 d 1 e / 22

80 AHU algorithm example Example A 1 a 1 B 1 C 2 b 2 c 1 D 1 E 1 d 1 e / 22

81 AHU algorithm example Example A 1 a 1 B 1 C 2 b 2 c 1 D 1 E 1 d 1 e / 22

82 AHU algorithm example Example A 1 a 1 B 1 C 2 b 2 c 1 D 1 E 1 d 1 e 1 OK 1 20 / 22

83 Resume Resume We have made three unsuccessful attempts to construct complete tree isomorphism invariant. We discussed O( V 2 ) version of AHU algorithm. We discussed ways of AHU algorithm improvement to make it work in O( V ) time. 21 / 22

84 Thank you for your attention! Any questions? 22 / 22

GRAPH THEORY LECTURE 4: TREES

GRAPH THEORY LECTURE 4: TREES GRAPH THEORY LECTURE 4: TREES Abstract. 3.1 presents some standard characterizations and properties of trees. 3.2 presents several different types of trees. 3.7 develops a counting method based on a bijection

More information

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Why? A central concept in Computer Science. Algorithms are ubiquitous. Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

More information

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

1 Definitions. Supplementary Material for: Digraphs. Concept graphs Supplementary Material for: van Rooij, I., Evans, P., Müller, M., Gedge, J. & Wareham, T. (2008). Identifying Sources of Intractability in Cognitive Models: An Illustration using Analogical Structure Mapping.

More information

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order

More information

CMPSCI611: Approximating MAX-CUT Lecture 20

CMPSCI611: Approximating MAX-CUT Lecture 20 CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to

More information

Guessing Game: NP-Complete?

Guessing Game: NP-Complete? Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple

More information

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

More information

Full and Complete Binary Trees

Full and Complete Binary Trees Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full

More information

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm. Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

More information

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

More information

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm. Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

More information

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92. Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure

More information

6.3 Conditional Probability and Independence

6.3 Conditional Probability and Independence 222 CHAPTER 6. PROBABILITY 6.3 Conditional Probability and Independence Conditional Probability Two cubical dice each have a triangle painted on one side, a circle painted on two sides and a square painted

More information

An algorithmic classification of open surfaces

An algorithmic classification of open surfaces An algorithmic classification of open surfaces Sylvain Maillot January 8, 2013 Abstract We propose a formulation for the homeomorphism problem for open n-dimensional manifolds and use the Kerekjarto classification

More information

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The

More information

ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN. Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015

ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN. Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015 ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015 ONLINE STEINER FOREST PROBLEM An initially given graph G. s 1 s 2 A sequence of demands (s i, t i ) arriving

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)

More information

Cycles and clique-minors in expanders

Cycles and clique-minors in expanders Cycles and clique-minors in expanders Benny Sudakov UCLA and Princeton University Expanders Definition: The vertex boundary of a subset X of a graph G: X = { all vertices in G\X with at least one neighbor

More information

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover Friedrich-Schiller-Universität Jena Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie Studienarbeit An Iterative Compression Algorithm for Vertex Cover von Thomas Peiselt

More information

The Open University s repository of research publications and other research outputs

The Open University s repository of research publications and other research outputs Open Research Online The Open University s repository of research publications and other research outputs The degree-diameter problem for circulant graphs of degree 8 and 9 Journal Article How to cite:

More information

Problem Set 7 Solutions

Problem Set 7 Solutions 8 8 Introduction to Algorithms May 7, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Handout 25 Problem Set 7 Solutions This problem set is due in

More information

Simple Graphs Degrees, Isomorphism, Paths

Simple Graphs Degrees, Isomorphism, Paths Mathematics for Computer Science MIT 6.042J/18.062J Simple Graphs Degrees, Isomorphism, Types of Graphs Simple Graph this week Multi-Graph Directed Graph next week Albert R Meyer, March 10, 2010 lec 6W.1

More information

Mathematical Induction. Lecture 10-11

Mathematical Induction. Lecture 10-11 Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach

More information

Converting a Number from Decimal to Binary

Converting a Number from Decimal to Binary Converting a Number from Decimal to Binary Convert nonnegative integer in decimal format (base 10) into equivalent binary number (base 2) Rightmost bit of x Remainder of x after division by two Recursive

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 27 Approximation Algorithms Load Balancing Weighted Vertex Cover Reminder: Fill out SRTEs online Don t forget to click submit Sofya Raskhodnikova 12/6/2011 S. Raskhodnikova;

More information

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8] Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)

More information

Scheduling Shop Scheduling. Tim Nieberg

Scheduling Shop Scheduling. Tim Nieberg Scheduling Shop Scheduling Tim Nieberg Shop models: General Introduction Remark: Consider non preemptive problems with regular objectives Notation Shop Problems: m machines, n jobs 1,..., n operations

More information

Discrete Mathematics Problems

Discrete Mathematics Problems Discrete Mathematics Problems William F. Klostermeyer School of Computing University of North Florida Jacksonville, FL 32224 E-mail: wkloster@unf.edu Contents 0 Preface 3 1 Logic 5 1.1 Basics...............................

More information

Lecture 1: Course overview, circuits, and formulas

Lecture 1: Course overview, circuits, and formulas Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik

More information

Data Structures Fibonacci Heaps, Amortized Analysis

Data Structures Fibonacci Heaps, Amortized Analysis Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:

More information

8.1 Min Degree Spanning Tree

8.1 Min Degree Spanning Tree CS880: Approximations Algorithms Scribe: Siddharth Barman Lecturer: Shuchi Chawla Topic: Min Degree Spanning Tree Date: 02/15/07 In this lecture we give a local search based algorithm for the Min Degree

More information

Data Structures and Algorithms Written Examination

Data Structures and Algorithms Written Examination Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where

More information

Network File Storage with Graceful Performance Degradation

Network File Storage with Graceful Performance Degradation Network File Storage with Graceful Performance Degradation ANXIAO (ANDREW) JIANG California Institute of Technology and JEHOSHUA BRUCK California Institute of Technology A file storage scheme is proposed

More information

Introduction to Algorithms. Part 3: P, NP Hard Problems

Introduction to Algorithms. Part 3: P, NP Hard Problems Introduction to Algorithms Part 3: P, NP Hard Problems 1) Polynomial Time: P and NP 2) NP-Completeness 3) Dealing with Hard Problems 4) Lower Bounds 5) Books c Wayne Goddard, Clemson University, 2004 Chapter

More information

Factorizations: Searching for Factor Strings

Factorizations: Searching for Factor Strings " 1 Factorizations: Searching for Factor Strings Some numbers can be written as the product of several different pairs of factors. For example, can be written as 1, 0,, 0, and. It is also possible to write

More information

Chapter 6: Graph Theory

Chapter 6: Graph Theory Chapter 6: Graph Theory Graph theory deals with routing and network problems and if it is possible to find a best route, whether that means the least expensive, least amount of time or the least distance.

More information

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors. The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

More information

Computer Science Department. Technion - IIT, Haifa, Israel. Itai and Rodeh [IR] have proved that for any 2-connected graph G and any vertex s G there

Computer Science Department. Technion - IIT, Haifa, Israel. Itai and Rodeh [IR] have proved that for any 2-connected graph G and any vertex s G there - 1 - THREE TREE-PATHS Avram Zehavi Alon Itai Computer Science Department Technion - IIT, Haifa, Israel Abstract Itai and Rodeh [IR] have proved that for any 2-connected graph G and any vertex s G there

More information

Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

More information

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs Kousha Etessami U. of Edinburgh, UK Kousha Etessami (U. of Edinburgh, UK) Discrete Mathematics (Chapter 6) 1 / 13 Overview Graphs and Graph

More information

Graph Theory Problems and Solutions

Graph Theory Problems and Solutions raph Theory Problems and Solutions Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles November, 005 Problems. Prove that the sum of the degrees of the vertices of any finite graph is

More information

Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction

Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction Lecture 11 Dynamic Programming 11.1 Overview Dynamic Programming is a powerful technique that allows one to solve many different types of problems in time O(n 2 ) or O(n 3 ) for which a naive approach

More information

Lecture 10 Union-Find The union-nd data structure is motivated by Kruskal's minimum spanning tree algorithm (Algorithm 2.6), in which we needed two operations on disjoint sets of vertices: determine whether

More information

From Last Time: Remove (Delete) Operation

From Last Time: Remove (Delete) Operation CSE 32 Lecture : More on Search Trees Today s Topics: Lazy Operations Run Time Analysis of Binary Search Tree Operations Balanced Search Trees AVL Trees and Rotations Covered in Chapter of the text From

More information

Connectivity and cuts

Connectivity and cuts Math 104, Graph Theory February 19, 2013 Measure of connectivity How connected are each of these graphs? > increasing connectivity > I G 1 is a tree, so it is a connected graph w/minimum # of edges. Every

More information

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

More information

Symbol Tables. Introduction

Symbol Tables. Introduction Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The

More information

Protein Protein Interaction Networks

Protein Protein Interaction Networks Functional Pattern Mining from Genome Scale Protein Protein Interaction Networks Young-Rae Cho, Ph.D. Assistant Professor Department of Computer Science Baylor University it My Definition of Bioinformatics

More information

Social Media Mining. Graph Essentials

Social Media Mining. Graph Essentials Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

Part 2: Community Detection

Part 2: Community Detection Chapter 8: Graph Data Part 2: Community Detection Based on Leskovec, Rajaraman, Ullman 2014: Mining of Massive Datasets Big Data Management and Analytics Outline Community Detection - Social networks -

More information

Universality in the theory of algorithms and computer science

Universality in the theory of algorithms and computer science Universality in the theory of algorithms and computer science Alexander Shen Computational models The notion of computable function was introduced in 1930ies. Simplifying (a rather interesting and puzzling)

More information

Solutions to Homework 6

Solutions to Homework 6 Solutions to Homework 6 Debasish Das EECS Department, Northwestern University ddas@northwestern.edu 1 Problem 5.24 We want to find light spanning trees with certain special properties. Given is one example

More information

Lesson 4 What Is a Plant s Life Cycle? The Seasons of a Tree

Lesson 4 What Is a Plant s Life Cycle? The Seasons of a Tree Lesson 4 What Is a Plant s Life Cycle? The Seasons of a Tree STUDENT SKILLS: predicting, communicating prior observations and knowledge, listening, cooperating, observing, sequencing, communicating, reasoning,

More information

SAT Math Facts & Formulas Review Quiz

SAT Math Facts & Formulas Review Quiz Test your knowledge of SAT math facts, formulas, and vocabulary with the following quiz. Some questions are more challenging, just like a few of the questions that you ll encounter on the SAT; these questions

More information

WHERE DOES THE 10% CONDITION COME FROM?

WHERE DOES THE 10% CONDITION COME FROM? 1 WHERE DOES THE 10% CONDITION COME FROM? The text has mentioned The 10% Condition (at least) twice so far: p. 407 Bernoulli trials must be independent. If that assumption is violated, it is still okay

More information

Binary Heap Algorithms

Binary Heap Algorithms CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn G. Chappell

More information

The positive minimum degree game on sparse graphs

The positive minimum degree game on sparse graphs The positive minimum degree game on sparse graphs József Balogh Department of Mathematical Sciences University of Illinois, USA jobal@math.uiuc.edu András Pluhár Department of Computer Science University

More information

Approximation Algorithms

Approximation Algorithms Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

More information

How To Solve A K Path In Time (K)

How To Solve A K Path In Time (K) What s next? Reductions other than kernelization Dániel Marx Humboldt-Universität zu Berlin (with help from Fedor Fomin, Daniel Lokshtanov and Saket Saurabh) WorKer 2010: Workshop on Kernelization Nov

More information

Lecture 5 - CPA security, Pseudorandom functions

Lecture 5 - CPA security, Pseudorandom functions Lecture 5 - CPA security, Pseudorandom functions Boaz Barak October 2, 2007 Reading Pages 82 93 and 221 225 of KL (sections 3.5, 3.6.1, 3.6.2 and 6.5). See also Goldreich (Vol I) for proof of PRF construction.

More information

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Introduction to Programming (in C++) Loops Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Example Assume the following specification: Input: read a number N > 0 Output:

More information

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification:

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification: Example Introduction to Programming (in C++) Loops Assume the following specification: Input: read a number N > 0 Output: write the sequence 1 2 3 N (one number per line) Jordi Cortadella, Ricard Gavaldà,

More information

arxiv:1203.1525v1 [math.co] 7 Mar 2012

arxiv:1203.1525v1 [math.co] 7 Mar 2012 Constructing subset partition graphs with strong adjacency and end-point count properties Nicolai Hähnle haehnle@math.tu-berlin.de arxiv:1203.1525v1 [math.co] 7 Mar 2012 March 8, 2012 Abstract Kim defined

More information

Every tree contains a large induced subgraph with all degrees odd

Every tree contains a large induced subgraph with all degrees odd Every tree contains a large induced subgraph with all degrees odd A.J. Radcliffe Carnegie Mellon University, Pittsburgh, PA A.D. Scott Department of Pure Mathematics and Mathematical Statistics University

More information

3.1 Solving Systems Using Tables and Graphs

3.1 Solving Systems Using Tables and Graphs Algebra 2 Chapter 3 3.1 Solve Systems Using Tables & Graphs 3.1 Solving Systems Using Tables and Graphs A solution to a system of linear equations is an that makes all of the equations. To solve a system

More information

Helvetic Coding Contest 2016

Helvetic Coding Contest 2016 Helvetic Coding Contest 6 Solution Sketches July, 6 A Collective Mindsets Author: Christian Kauth A Strategy: In a bottom-up approach, we can determine how many brains a zombie of a given rank N needs

More information

Class One: Degree Sequences

Class One: Degree Sequences Class One: Degree Sequences For our purposes a graph is a just a bunch of points, called vertices, together with lines or curves, called edges, joining certain pairs of vertices. Three small examples of

More information

Session 6 Number Theory

Session 6 Number Theory Key Terms in This Session Session 6 Number Theory Previously Introduced counting numbers factor factor tree prime number New in This Session composite number greatest common factor least common multiple

More information

Cycles in a Graph Whose Lengths Differ by One or Two

Cycles in a Graph Whose Lengths Differ by One or Two Cycles in a Graph Whose Lengths Differ by One or Two J. A. Bondy 1 and A. Vince 2 1 LABORATOIRE DE MATHÉMATIQUES DISCRÉTES UNIVERSITÉ CLAUDE-BERNARD LYON 1 69622 VILLEURBANNE, FRANCE 2 DEPARTMENT OF MATHEMATICS

More information

Introduction to computer science

Introduction to computer science Introduction to computer science Michael A. Nielsen University of Queensland Goals: 1. Introduce the notion of the computational complexity of a problem, and define the major computational complexity classes.

More information

Binary Search Trees. Data in each node. Larger than the data in its left child Smaller than the data in its right child

Binary Search Trees. Data in each node. Larger than the data in its left child Smaller than the data in its right child Binary Search Trees Data in each node Larger than the data in its left child Smaller than the data in its right child FIGURE 11-6 Arbitrary binary tree FIGURE 11-7 Binary search tree Data Structures Using

More information

A simpler and better derandomization of an approximation algorithm for Single Source Rent-or-Buy

A simpler and better derandomization of an approximation algorithm for Single Source Rent-or-Buy A simpler and better derandomization of an approximation algorithm for Single Source Rent-or-Buy David P. Williamson Anke van Zuylen School of Operations Research and Industrial Engineering, Cornell University,

More information

Ordered Lists and Binary Trees

Ordered Lists and Binary Trees Data Structures and Algorithms Ordered Lists and Binary Trees Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/62 6-0:

More information

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES 136 TER 4. INDUCTION, GRHS ND TREES 4.3 Graphs In this chapter we introduce a fundamental structural idea of discrete mathematics, that of a graph. Many situations in the applications of discrete mathematics

More information

Omega Automata: Minimization and Learning 1

Omega Automata: Minimization and Learning 1 Omega Automata: Minimization and Learning 1 Oded Maler CNRS - VERIMAG Grenoble, France 2007 1 Joint work with A. Pnueli, late 80s Summary Machine learning in general and of formal languages in particular

More information

arxiv:1409.4299v1 [cs.cg] 15 Sep 2014

arxiv:1409.4299v1 [cs.cg] 15 Sep 2014 Planar Embeddings with Small and Uniform Faces Giordano Da Lozzo, Vít Jelínek, Jan Kratochvíl 3, and Ignaz Rutter 3,4 arxiv:409.499v [cs.cg] 5 Sep 04 Department of Engineering, Roma Tre University, Italy

More information

Graphs without proper subgraphs of minimum degree 3 and short cycles

Graphs without proper subgraphs of minimum degree 3 and short cycles Graphs without proper subgraphs of minimum degree 3 and short cycles Lothar Narins, Alexey Pokrovskiy, Tibor Szabó Department of Mathematics, Freie Universität, Berlin, Germany. August 22, 2014 Abstract

More information

3 Some Integer Functions

3 Some Integer Functions 3 Some Integer Functions A Pair of Fundamental Integer Functions The integer function that is the heart of this section is the modulo function. However, before getting to it, let us look at some very simple

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

P versus NP, and More

P versus NP, and More 1 P versus NP, and More Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 If you have tried to solve a crossword puzzle, you know that it is much harder to solve it than to verify

More information

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Kim S. Larsen Odense University Abstract For many years, regular expressions with back referencing have been used in a variety

More information

Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser Quiz 1.

Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser Quiz 1. Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Quiz 1 Quiz 1 Do not open this quiz booklet until you are directed

More information

Smooth functions statistics

Smooth functions statistics Smooth functions statistics V. I. rnold To describe the topological structure of a real smooth function one associates to it the graph, formed by the topological variety, whose points are the connected

More information

The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

More information

Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( ) 1. (Chapter 1 supplementary, problem 7): There are 12 men at a dance. (a) In how many ways can eight of them be selected to form a cleanup crew? (b) How many ways are there to pair off eight women at the

More information

Properties of Real Numbers

Properties of Real Numbers 16 Chapter P Prerequisites P.2 Properties of Real Numbers What you should learn: Identify and use the basic properties of real numbers Develop and use additional properties of real numbers Why you should

More information

Zeros of a Polynomial Function

Zeros of a Polynomial Function Zeros of a Polynomial Function An important consequence of the Factor Theorem is that finding the zeros of a polynomial is really the same thing as factoring it into linear factors. In this section we

More information

Single machine parallel batch scheduling with unbounded capacity

Single machine parallel batch scheduling with unbounded capacity Workshop on Combinatorics and Graph Theory 21th, April, 2006 Nankai University Single machine parallel batch scheduling with unbounded capacity Yuan Jinjiang Department of mathematics, Zhengzhou University

More information

Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb

Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb Binary Search Trees Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 27 1 Properties of Binary Search Trees 2 Basic BST operations The worst-case time complexity of BST operations

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

The LSD Broadcast Encryption Scheme

The LSD Broadcast Encryption Scheme The LSD Broadcast Encryption Scheme Dani Halevy and Adi Shamir Applied Math. Dept. The Weizmann Institute of Science Rehovot 76100, Israel {danih,shamir}@wisdom.weizmann.ac.il Abstract. Broadcast Encryption

More information

Algorithms are the threads that tie together most of the subfields of computer science.

Algorithms are the threads that tie together most of the subfields of computer science. Algorithms Algorithms 1 Algorithms are the threads that tie together most of the subfields of computer science. Something magically beautiful happens when a sequence of commands and decisions is able to

More information

Near Optimal Solutions

Near Optimal Solutions Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

More information

Answer Key for California State Standards: Algebra I

Answer Key for California State Standards: Algebra I Algebra I: Symbolic reasoning and calculations with symbols are central in algebra. Through the study of algebra, a student develops an understanding of the symbolic language of mathematics and the sciences.

More information

Cpt S 223. School of EECS, WSU

Cpt S 223. School of EECS, WSU The Shortest Path Problem 1 Shortest-Path Algorithms Find the shortest path from point A to point B Shortest in time, distance, cost, Numerous applications Map navigation Flight itineraries Circuit wiring

More information

CAD Algorithms. P and NP

CAD Algorithms. P and NP CAD Algorithms The Classes P and NP Mohammad Tehranipoor ECE Department 6 September 2010 1 P and NP P and NP are two families of problems. P is a class which contains all of the problems we solve using

More information

26 Integers: Multiplication, Division, and Order

26 Integers: Multiplication, Division, and Order 26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue

More information

A Note on Maximum Independent Sets in Rectangle Intersection Graphs

A Note on Maximum Independent Sets in Rectangle Intersection Graphs A Note on Maximum Independent Sets in Rectangle Intersection Graphs Timothy M. Chan School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1, Canada tmchan@uwaterloo.ca September 12,

More information

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH ZACHARY ABEL 1. Introduction In this survey we discuss properties of the Higman-Sims graph, which has 100 vertices, 1100 edges, and is 22 regular. In fact

More information