UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

Size: px
Start display at page:

Download "UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis"

Transcription

1 UCSD CSE 1, Spring 01 [Section B00] Mathematics for Algorithm and System Analysis Lecture 17 Class URL:

2 Lecture 17 Notes Last time Recurrences revisited Types of graphs: Complete, Tree, Bipartite, Today and Next Tuesday Shortest path tree, minimum spanning tree, search trees Chromatic number Paths, Trails, Circuits, Cycles: Eulerian and Hamiltonian graphs ( complexity zoo NP, P, NP-hard, NP-complete, ) (most of the slides are in this slide deck already please read ahead!) Logistics Final exam review Sunday June 8, 6-8pm, PCYNH 106 Practice final exam questions early Week 10 Week 9 and Week 10 quizzes off-line Today s quiz: open on WeBWorK from 9:0am 10pm Can get up to 5 points out of Extra credit for PPT slide(s) (up to % of course grade) See next slide Things to Know end of Week 9, end of Week 10 SPIS slides on Trees, Trees, Trees, Please treat as assigned reading

3 Extra Credit Opportunity: PPT slide(s) on graph(s) 1% course grade for each slide, up to a max of See thread on Piazza Must use the given PPT template, and include: Image Source / attribution (URL) Brief description (what do vertices / edges represent, is the graph directed / undirected, etc.) Brief explanation of why the image and the graph are interesting Deadline = Thursday, June 5, 5pm Pacific time Turn-in: .pptx/.ppt attachment to natalie.lynn.larson@gmail.com Filename: LastName_FirstName_LastTwoDigitsofPID[_].pptx

4 Special kinds of graphs complete / clique Complete (simple) graphs: all possible edges

5 Special kinds of graphs bipartite Bipartite graphs Two kinds of vertices V 1 V = V, V 1 V = Each edge is between a vertex of one kind and a vertex of the other kind: any e E has form {u V 1, v V } People Projects

6 Trees Special kinds of graphs tree Connected V - 1 edges No cycles (any two of these properties implies the third!) Assignment: read the SPIS-01 Trees, Trees, Trees slides that are posted!

7 Trees vs. General Graphs Graph: G = (V,E) V = set of vertices E = set of edges graph with 7 vertices, 6 edges This graph is not connected, and it has a cycle. Connected: Between any pair of vertices, there is a path of edges. Cycle: A path of edges that begins and ends at the same vertex. 7

8 Tree = Special Kind of Graph A tree is a graph with n vertices that: (i) is connected (ii) has no cycles (iii) has n 1 edges tree with 7 vertices, 6 edges Fact: Any two of the above properties implies the third. E.g., If a graph with n vertices is connected and has no cycles, then it has n 1 edges. Can we prove this???

9 You want proof? I ll give you proof!

10 Claim: If a graph with n vertices connected and has no cycles, then it has n 1 edges. Proof Strategy:? Strong Induction (I.H.) Assume that the Claim is true for n = 1,, k 1. Consider a graph with n = k vertices that is connected and has no cycles. (k 1 1) + (k 1) + 1 = (k 1 + k ) 1 = k 1 k 1 k 1 vertices, connected, no cycles k 1 1 edges k k 1 vertices, connected, no cycles k 1 edges

11 Binary tree: Trees = Data Structures Has a root vertex Every vertex has at most children Binary Search Tree Application: Search a set of keys for a given key value if key = root.key then success else if key < root.key then search left subtree else search right subtree Search for Search for 17 Search for 8

12 How Many Search Steps Are Needed? How many levels can a binary tree with n nodes have? (convention: root is at level 0) At most:? At least:? n 1 levels log n levels

13 Trees = Data Structures = Algorithms A heap is a binary tree of depth d such that (1) all nodes not at depth d-1 or d are internal nodes each level is filled before the next level is started () at depth d-1 the internal nodes are to the left of the leaves and have degree, except perhaps for the rightmost, which has a left child each level is filled left to right A max heap (min heap) is a heap with node labels from an ordered set, such that the label at any internal node is ( ) the label of any of its children All root-leaf paths are monotone

14 Minheap Example Data Structure Parent-child arithmetic = how we d store in an array! Parent parent of A[i] has index = i div Left, Right (children) children of A[i] have indices i, i+1 Parent Child this is a minheap

15 Heap Operation: Insert Insert(S,x): O(height) O(log n) Keep swapping with parent until heap condition satisfied

16 Heap Operation: ExtractMin ExtractMin(S): return head, replace head key with the last key, float down O(log n) Float down : If heap condition violated, swap with smaller child

17 Insert + ExtractMin =? Priority queue abstract data type Always have the highest-priority item ready at hand Useful in algorithm implementation e.g., Dijkstra s algorithm later today Unordered list: Insert = O(1) but ExtractMin = O(n) Ordered list: ExtractMin = O(1) but Insert = O(n) Heap: Insert = O(log n), ExtractMin = O(log n)

18 O(n log n) Heapsort Build heap: n x O(log n) time for i = 1..n do insert (A[1..i],A[i]) Extract elements in sorted order: n x O(log n) time for i = n.. do [extract-min] Swap (A[1] A[i]) Heapsize = Heapsize-1 Float down A[1]

19 Trees = Solutions to Real Problems (A) Connecting cities with minimum road construction (when adding new junctions is allowed) (B) Calculating minimum-cost routes to destinations

20 The Minimum Spanning Tree Problem Given: graph of cities and distances B B A C A C E D E D Problem: Make all cities reachable from each other with minimum road construction.

21 The Shortest Paths Problem B B A C A C E D E D Problem: Compute the shortest routes from A to every other city.

22 The Shortest Paths Problem E A D B C Problem: Compute the shortest routes from B to every other city. E A D B C 5 0 What do these green numbers represent?

23 The Shortest Paths Problem E A D B C Exploration parties set out from B, always moving at constant speed. When a party is the first to reach some city, they call home, then split up and continue exploring. The times of the phone calls are the shortest-path distances from B. E A D B C 5 0 (You learn this as Dijkstra s Algorithm)

24 Minimum Spanning Tree, Again E A D B C E A D B C Start from an arbitrary vertex, and add the shortest incident edge to the growing tree that does not complete a cycle. (If the MST is unique, then the starting vertex doesn t matter ) (You learn this as Prim s Algorithm)

25 Nearly the Same Algorithm! Prim: Iteratively add the edge e(u,v) to T, where u is in T and v is not yet in T, to minimize d u,v (d u,v = (u,v) distance) Dijkstra: Iteratively add the edge e(u,v) to T, where u is in T and v is not yet in T, to minimize d u,v + l u (l u is u s shortest path cost) Both algorithms build trees, in similar greedy ways! Prim s Algorithm constructs a Minimum Spanning Tree Dijkstra s Algorithm constructs a Shortest Path Tree If Prim s Algorithm and Dijkstra s Algorithm had a baby Iteratively add the edge e(u,v) to T, where u is in T and v is not yet in T, to minimize d u,v + c l u // 0 c 1 (food for thought!)

26 Minimum Spanning Tree = A Greedy Problem Prim s algorithm. Start with T = a root node s, and greedily grow the tree T. At each step, add to T the cheapest edge e that has exactly one endpoint in T. Reverse-Delete algorithm. Start with T = E (all edges). Consider edges in descending order of cost. Delete edge e from T unless doing so disconnects T. Kruskal s algorithm. Start with T =. Consider edges in ascending order of cost. Insert edge e into T unless doing so creates a cycle. All three methods are greedy, and produce a minimum spanning tree.

27 Kruskal s Algorithm

28 From Spanning Trees to Steiner Trees The red dot is called a Steiner point (= an intermediate junction ) The maximum cost savings from adding Steiner points = min ratio of (min Steiner tree cost) / (min spanning tree cost) depends on the metric, or distance function Cf. Manhattan, Euclidean, Chebyshev, Adapted from Prof. G. Robins, UVA

29 Minimum Steiner Tree is a Hard Problem (Minimum Spanning Tree was Easy) You learn about hard vs. easy in CSE101, CSE105 How would you approach finding a low-cost Steiner tree? Adapted from Prof. G. Robins, UVA

30 Iterated 1-Steiner Algorithm (1990) Given a pointset S, what point p minimizes MST(S {p}) Algorithmic idea: Iterate! (greedily) In practice: solution cost is within 0.5% of OPT on average Adapted from Prof. G. Robins, UVA

31 Walks - Definition Let G = (V,E,φ) be a graph. A walk in G is a sequence: e 1, e,..., e n 1 of elements of E (edges of G) for which there is a sequence: a 1, a,..., a n of elements of V (vertices of G) such that φ(e i ) = {a i, a i+1 } for i = 1,,..., n 1.

32 Walks on Graphs d 1 b a c Which of the following are walks on the graph? A. a, b, c, d B. 1,,, C. d,b,a,c,d D. a,1,b E. None of the above / more than one of the above

33 Special Walks (Neither edges nor vertices need be distinct: walk) Edges must be distinct: trail Vertices must be distinct: path Sequence of vertices is the vertex sequence of the path Trail whose first vertex is same as last vertex: circuit Circuit with no repeated vertices (except start/end): cycle If the graph is directed: Obtain a directed walk, trail, path, circuit, cycle Replace {} with () in vertex set: φ(e i ) = (a i, a i+1 ) now Arrows: domain set on the left, codomain set on right

34 Example b 1 d e f c 6 a 5 Which of the following statements are true? A. There are no cycles in this graph. B. There are no circuits in this graph. C. There is a path that visits each vertex exactly once. D. There is a trail that uses each edge exactly once. E. None of the above/ more than one of the above.

35 More on graphs A graph is connected if there is a path between every pair of vertices. Edge case: graph with only one vertex, we say it is connected One vertex is reachable from another if there is a path between them. A connected component of a graph is a subset of vertices such that (i) every pair of vertices in the set is reachable from one another, and (ii) the subset is not part of a larger set with this property. Computing distance in a graph: breadth first search of all walks Small world phenomenon in social networks Analyze structure of the graph by looking at number of paths Hubs and spokes Link prediction in social networks

36 Visiting everywhere on a graph An Eulerian trail is a trail that includes every edge. An Eulerian circuit is a circuit that includes every edge.

37 Visiting everywhere on a graph An Eulerian trail is a trail that includes every edge. An Eulerian circuit is a circuit that includes every edge. In the previous example there is no Eulerian trail: b 1 d e f c 6 a 5 How do we prove this?

38 Visiting everywhere on a graph An Eulerian trail is a trail that includes every edge. An Eulerian circuit is a circuit that includes every edge. Observations: If a graph has an Eulerian circuit then it has an Eulerian trail. If a graph is not connected, then it does not have an Eulerian trail.

39 Characterization of Eulerian graphs Theorem. For a connected simple graph G, the following are equivalent: G contains an Eulerian circuit. Every vertex of G has even degree. The edges of G can be partitioned into edge-disjoint cycles. Corollary. A connected simple graph has an Eulerian trail if and only if the number of vertices with odd degree is either zero or two. UCSD connection: An Eulerian path approach to DNA fragment assembly Pavel A. Pevzner, Haixu Tang, and Michael S. Waterman (001).

40 Characterization of Eulerian graphs Theorem. For a connected simple graph G, the following are equivalent: G contains an Eulerian circuit. Every vertex of G has even degree. The edges of G can be partitioned into edge-disjoint cycles. Corollary. A connected simple graph has an Eulerian trail if and only if the number of vertices with odd degree is either zero or two. Application to previous example: 1 1 b a c d e f Four vertices with odd degree!

41 Characterization of Eulerian graphs Theorem. For a connected simple graph G, the following are equivalent: G contains an Eulerian circuit. Every vertex of G has even degree. The edges of G can be partitioned into edge-disjoint cycles. Corollary. A connected simple graph has an Eulerian trail if and only if the number of vertices with odd degree is either zero or two. Proof Idea: Eulerian circuits enter and leave vertices on distinct edges so there have to be an even number of edges incident with each vertex. If you can partition the graph into edge-disjoint cycles, you can string them together to get circuit.

42 Characterization of Eulerian graphs Theorem. For a connected simple graph G, the following are equivalent: G contains an Eulerian circuit. Every vertex of G has even degree. The edges of G can be partitioned into edge-disjoint cycles. Corollary. A connected simple graph has an Eulerian trail if and only if the number of vertices with odd degree is either zero or two. Tweaking the example: Two vertices with odd degree! 1 b a c e 6 f 5 1 1

43 Visiting everywhere on a graph, take A Hamiltonian cycle in a graph is a cycle that visits every vertex exactly once.

44 Visiting everywhere on a graph, take A Hamiltonian cycle in a graph is a cycle that visits every vertex exactly once. Example with an Eulerian trail does it have a Hamiltonian cycle? 1 b a c e 6 f 5 1 1

45 Visiting everywhere on a graph, take A Hamiltonian cycle in a graph is a cycle that visits every vertex exactly once. What about now does this graph have a Hamiltonian cycle? 1 b a c e f 6 g 5

46 Visiting everywhere on a graph, take A Hamiltonian cycle in a graph is a cycle that visits every vertex exactly once. A Hamiltonian graph is a graph that has a Hamiltonian cycle

47 Examples Which of the following is true: A. Both are Hamiltonian and Eulerian B. Neither is Hamiltonian and neither is Eulerian C. Both are Hamiltonian and not Eulerian D. One is Hamiltonian and not Eulerian; the other is Eulerian and not Hamiltonian E. None of the above.

48 Coloring a graph A proper coloring of a simple graph G = (V,E) is a function λ : V C, where C is a set of colors, such that {u,v} E λ(u) λ(v). There is a proper coloring of a complete graph on vertices using: A. 1 color B. colors (but there aren t any with 1 color) C. colors (but there aren t any with 1 or colors) D. colors (but there aren t any with 1 or or colors) E. None of the above.

49 Another Tree: -Coloring a Graph Three colors: R, G, B G B G Graph 5 R (from Lecture 11) G R B 1B,G By symmetry, can use any two colors for vertices 1 and R B Tree of Colorings G 1 B A graph is legally colored with k colors if each vertex has a color (label) between 1 and k (inclusive), and no adjacent vertices have the same color. 5R

50 Coloring a graph A proper coloring of a simple graph G = (V,E) is a function λ : V C, where C is a set of colors, such that {u,v} E λ(u) λ(v) There is a proper coloring of any bipartite graph using: A. 1 color B. colors (but there aren t any with 1 color) C. colors (but there aren t any with 1 or colors) D. colors (but there aren t any with 1 or or colors) E. None of the above.

51 Coloring problem and chromatic numbers The coloring problem: for any c >, devise an algorithm whose input can be any simple graph and whose output is the answer to the question can the graph be properly colored with c colors? Given G and c, deciding (yes/no) whether G can be properly colored with c colors is an NP-complete problem: no known fast algorithm to come up with solution; but easy to check if candidate solution works. The chromatic number of a graph G, (G), is the least number of colors needed to properly color G. In the previous example, we saw: (Complete graph, n vertices) = n, (Bipartite graph) = The Four Color Theorem says that every planar MAP can be properly colored with four colors. Does this mean that (any planar graph)? Planar Graph: can be drawn on a plane such that edges intersect only at endpoints

52 Hard graph problems we think Hamiltonian cycle problem: Given a simple graph G, decide whether G contains a Hamiltonian cycle. Coloring problem: Given graph G and c >, decide whether G can be properly colored with c colors. Traveling salesman problem: Given edge-weighted graph G and a number B, decide whether there is a Hamilton cycle through all vertices of G with total edge cost B. Clique problem: Given a simple graph G and a number s, decide whether there are s vertices in G with all C(s,) possible edges between them being present in G.

53 Problems 17 P17.1 Eleven people form five study groups. Prove that two students, A and B, can be found such that every study group that contains A also includes B. P17. In a game, Player 1 and Player take turns adding to the current number any natural number smaller than it. The game begins with the number. Whoever reaches the number 1000 wins. Which player has a winning strategy, and what is the winning strategy? P17. In a game, Player 1 and Player take turns subtracting from the current number any positive power of less than the current number. The game begins with the number Whoever reaches the number 0 wins. Which player has a winning strategy, and what is the winning strategy?

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

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

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

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics* IE 680 Special Topics in Production Systems: Networks, Routing and Logistics* Rakesh Nagi Department of Industrial Engineering University at Buffalo (SUNY) *Lecture notes from Network Flows by Ahuja, Magnanti

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

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

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, 2010. Chapter 7: Digraphs

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, 2010. Chapter 7: Digraphs MCS-236: Graph Theory Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, 2010 Chapter 7: Digraphs Strong Digraphs Definitions. A digraph is an ordered pair (V, E), where V is the set

More information

Mathematics for Algorithm and System Analysis

Mathematics for Algorithm and System Analysis Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved. Preface

More information

Analysis of Algorithms, I

Analysis of Algorithms, I Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 Applications

More information

Algorithms and Data Structures

Algorithms and Data Structures Algorithms and Data Structures CMPSC 465 LECTURES 20-21 Priority Queues and Binary Heaps Adam Smith S. Raskhodnikova and A. Smith. Based on slides by C. Leiserson and E. Demaine. 1 Trees Rooted Tree: collection

More information

Binary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * *

Binary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * * Binary Heaps A binary heap is another data structure. It implements a priority queue. Priority Queue has the following operations: isempty add (with priority) remove (highest priority) peek (at highest

More information

Exam study sheet for CS2711. List of topics

Exam study sheet for CS2711. List of topics Exam study sheet for CS2711 Here is the list of topics you need to know for the final exam. For each data structure listed below, make sure you can do the following: 1. Give an example of this data structure

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

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005 V. Adamchik 1 Graph Theory Victor Adamchik Fall of 2005 Plan 1. Basic Vocabulary 2. Regular graph 3. Connectivity 4. Representing Graphs Introduction A.Aho and J.Ulman acknowledge that Fundamentally, computer

More information

CS311H. Prof: Peter Stone. Department of Computer Science The University of Texas at Austin

CS311H. Prof: Peter Stone. Department of Computer Science The University of Texas at Austin CS311H Prof: Department of Computer Science The University of Texas at Austin Good Morning, Colleagues Good Morning, Colleagues Are there any questions? Logistics Class survey Logistics Class survey Homework

More information

Midterm Practice Problems

Midterm Practice Problems 6.042/8.062J Mathematics for Computer Science October 2, 200 Tom Leighton, Marten van Dijk, and Brooke Cowan Midterm Practice Problems Problem. [0 points] In problem set you showed that the nand operator

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

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R Binary Search Trees A Generic Tree Nodes in a binary search tree ( B-S-T) are of the form P parent Key A Satellite data L R B C D E F G H I J The B-S-T has a root node which is the only node whose parent

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

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints

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

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

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

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A

More information

Introduction to Graph Theory

Introduction to Graph Theory Introduction to Graph Theory Allen Dickson October 2006 1 The Königsberg Bridge Problem The city of Königsberg was located on the Pregel river in Prussia. The river divided the city into four separate

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

Binary Heaps. CSE 373 Data Structures

Binary Heaps. CSE 373 Data Structures Binary Heaps CSE Data Structures Readings Chapter Section. Binary Heaps BST implementation of a Priority Queue Worst case (degenerate tree) FindMin, DeleteMin and Insert (k) are all O(n) Best case (completely

More information

International Journal of Advanced Research in Computer Science and Software Engineering

International Journal of Advanced Research in Computer Science and Software Engineering Volume 3, Issue 7, July 23 ISSN: 2277 28X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Greedy Algorithm:

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

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

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

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

The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 72.

The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 72. ADVANCED SUBSIDIARY GCE UNIT 4736/01 MATHEMATICS Decision Mathematics 1 THURSDAY 14 JUNE 2007 Afternoon Additional Materials: Answer Booklet (8 pages) List of Formulae (MF1) Time: 1 hour 30 minutes INSTRUCTIONS

More information

Lecture 17 : Equivalence and Order Relations DRAFT

Lecture 17 : Equivalence and Order Relations DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/31/2011 Lecture 17 : Equivalence and Order Relations Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last lecture we introduced the notion

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

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

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

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

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

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

6 March 2007 1. Array Implementation of Binary Trees

6 March 2007 1. Array Implementation of Binary Trees Heaps CSE 0 Winter 00 March 00 1 Array Implementation of Binary Trees Each node v is stored at index i defined as follows: If v is the root, i = 1 The left child of v is in position i The right child of

More information

Network (Tree) Topology Inference Based on Prüfer Sequence

Network (Tree) Topology Inference Based on Prüfer Sequence Network (Tree) Topology Inference Based on Prüfer Sequence C. Vanniarajan and Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology Madras Chennai 600036 vanniarajanc@hcl.in,

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

! 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

CS711008Z Algorithm Design and Analysis

CS711008Z Algorithm Design and Analysis CS711008Z Algorithm Design and Analysis Lecture 7 Binary heap, binomial heap, and Fibonacci heap 1 Dongbo Bu Institute of Computing Technology Chinese Academy of Sciences, Beijing, China 1 The slides were

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

Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li. Advised by: Dave Mount. May 22, 2014

Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li. Advised by: Dave Mount. May 22, 2014 Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li Advised by: Dave Mount May 22, 2014 1 INTRODUCTION In this report we consider the implementation of an efficient

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

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

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

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

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

5.1 Bipartite Matching

5.1 Bipartite Matching CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

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

Sample Questions Csci 1112 A. Bellaachia

Sample Questions Csci 1112 A. Bellaachia Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k

More information

Network Flow I. Lecture 16. 16.1 Overview. 16.2 The Network Flow Problem

Network Flow I. Lecture 16. 16.1 Overview. 16.2 The Network Flow Problem Lecture 6 Network Flow I 6. Overview In these next two lectures we are going to talk about an important algorithmic problem called the Network Flow Problem. Network flow is important because it can be

More information

Binary Search Trees CMPSC 122

Binary Search Trees CMPSC 122 Binary Search Trees CMPSC 122 Note: This notes packet has significant overlap with the first set of trees notes I do in CMPSC 360, but goes into much greater depth on turning BSTs into pseudocode than

More information

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology First Name: Family Name: Student Number: Class/Tutorial: WOLLONGONG COLLEGE AUSTRALIA A College of the University of Wollongong Diploma in Information Technology Final Examination Spring Session 2008 WUCT121

More information

Lecture 16 : Relations and Functions DRAFT

Lecture 16 : Relations and Functions DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/29/2011 Lecture 16 : Relations and Functions Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT In Lecture 3, we described a correspondence

More information

International Journal of Software and Web Sciences (IJSWS) www.iasir.net

International Journal of Software and Web Sciences (IJSWS) www.iasir.net International Association of Scientific Innovation and Research (IASIR) (An Association Unifying the Sciences, Engineering, and Applied Research) ISSN (Print): 2279-0063 ISSN (Online): 2279-0071 International

More information

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite ALGEBRA Pupils should be taught to: Generate and describe sequences As outcomes, Year 7 pupils should, for example: Use, read and write, spelling correctly: sequence, term, nth term, consecutive, rule,

More information

Shortest Inspection-Path. Queries in Simple Polygons

Shortest Inspection-Path. Queries in Simple Polygons Shortest Inspection-Path Queries in Simple Polygons Christian Knauer, Günter Rote B 05-05 April 2005 Shortest Inspection-Path Queries in Simple Polygons Christian Knauer, Günter Rote Institut für Informatik,

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

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

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit Data Structures Page 1 of 24 A.1. Arrays (Vectors) n-element vector start address + ielementsize 0 +1 +2 +3 +4... +n-1 start address continuous memory block static, if size is known at compile time dynamic,

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

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

Cpt S 223. School of EECS, WSU

Cpt S 223. School of EECS, WSU Priority Queues (Heaps) 1 Motivation Queues are a standard mechanism for ordering tasks on a first-come, first-served basis However, some tasks may be more important or timely than others (higher priority)

More information

Any two nodes which are connected by an edge in a graph are called adjacent node.

Any two nodes which are connected by an edge in a graph are called adjacent node. . iscuss following. Graph graph G consist of a non empty set V called the set of nodes (points, vertices) of the graph, a set which is the set of edges and a mapping from the set of edges to a set of pairs

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

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

Exponential time algorithms for graph coloring

Exponential time algorithms for graph coloring Exponential time algorithms for graph coloring Uriel Feige Lecture notes, March 14, 2011 1 Introduction Let [n] denote the set {1,..., k}. A k-labeling of vertices of a graph G(V, E) is a function V [k].

More information

A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called heap-order property

A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called heap-order property CmSc 250 Intro to Algorithms Chapter 6. Transform and Conquer Binary Heaps 1. Definition A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called

More information

1 Introduction. Dr. T. Srinivas Department of Mathematics Kakatiya University Warangal 506009, AP, INDIA tsrinivasku@gmail.com

1 Introduction. Dr. T. Srinivas Department of Mathematics Kakatiya University Warangal 506009, AP, INDIA tsrinivasku@gmail.com A New Allgoriitthm for Miiniimum Costt Liinkiing M. Sreenivas Alluri Institute of Management Sciences Hanamkonda 506001, AP, INDIA allurimaster@gmail.com Dr. T. Srinivas Department of Mathematics Kakatiya

More information

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design Hongsik Choi and Hyeong-Ah Choi Department of Electrical Engineering and Computer Science George Washington University Washington,

More information

MATHEMATICS Unit Decision 1

MATHEMATICS Unit Decision 1 General Certificate of Education January 2007 Advanced Subsidiary Examination MATHEMATICS Unit Decision 1 MD01 Tuesday 16 January 2007 9.00 am to 10.30 am For this paper you must have: an 8-page answer

More information

Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1

Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1 GRAPH THEORY LECTURE STRUCTURE AND REPRESENTATION PART A Abstract. Chapter focuses on the question of when two graphs are to be regarded as the same, on symmetries, and on subgraphs.. discusses the concept

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

CSC2420 Spring 2015: Lecture 3

CSC2420 Spring 2015: Lecture 3 CSC2420 Spring 2015: Lecture 3 Allan Borodin January 22, 2015 1 / 1 Announcements and todays agenda Assignment 1 due next Thursday. I may add one or two additional questions today or tomorrow. Todays agenda

More information

Algorithms and Data Structures

Algorithms and Data Structures Algorithms and Data Structures Part 2: Data Structures PD Dr. rer. nat. habil. Ralf-Peter Mundani Computation in Engineering (CiE) Summer Term 2016 Overview general linked lists stacks queues trees 2 2

More information

Lecture 7: NP-Complete Problems

Lecture 7: NP-Complete Problems IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit

More information

CS 598CSC: Combinatorial Optimization Lecture date: 2/4/2010

CS 598CSC: Combinatorial Optimization Lecture date: 2/4/2010 CS 598CSC: Combinatorial Optimization Lecture date: /4/010 Instructor: Chandra Chekuri Scribe: David Morrison Gomory-Hu Trees (The work in this section closely follows [3]) Let G = (V, E) be an undirected

More information

Minimum Spanning Trees

Minimum Spanning Trees Minimum Spanning Trees weighted graph API cycles and cuts Kruskal s algorithm Prim s algorithm advanced topics References: Algorithms in Java, Chapter 20 http://www.cs.princeton.edu/introalgsds/54mst 1

More information

Topology-based network security

Topology-based network security Topology-based network security Tiit Pikma Supervised by Vitaly Skachek Research Seminar in Cryptography University of Tartu, Spring 2013 1 Introduction In both wired and wireless networks, there is the

More information

MATHEMATICS Unit Decision 1

MATHEMATICS Unit Decision 1 General Certificate of Education January 2008 Advanced Subsidiary Examination MATHEMATICS Unit Decision 1 MD01 Tuesday 15 January 2008 9.00 am to 10.30 am For this paper you must have: an 8-page answer

More information

Definition 11.1. Given a graph G on n vertices, we define the following quantities:

Definition 11.1. Given a graph G on n vertices, we define the following quantities: Lecture 11 The Lovász ϑ Function 11.1 Perfect graphs We begin with some background on perfect graphs. graphs. First, we define some quantities on Definition 11.1. Given a graph G on n vertices, we define

More information

Data Structures. Chapter 8

Data Structures. Chapter 8 Chapter 8 Data Structures Computer has to process lots and lots of data. To systematically process those data efficiently, those data are organized as a whole, appropriate for the application, called a

More information

Distributed Computing over Communication Networks: Maximal Independent Set

Distributed Computing over Communication Networks: Maximal Independent Set Distributed Computing over Communication Networks: Maximal Independent Set What is a MIS? MIS An independent set (IS) of an undirected graph is a subset U of nodes such that no two nodes in U are adjacent.

More information

A 2-factor in which each cycle has long length in claw-free graphs

A 2-factor in which each cycle has long length in claw-free graphs A -factor in which each cycle has long length in claw-free graphs Roman Čada Shuya Chiba Kiyoshi Yoshimoto 3 Department of Mathematics University of West Bohemia and Institute of Theoretical Computer Science

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

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

Graphical degree sequences and realizations

Graphical degree sequences and realizations swap Graphical and realizations Péter L. Erdös Alfréd Rényi Institute of Mathematics Hungarian Academy of Sciences MAPCON 12 MPIPKS - Dresden, May 15, 2012 swap Graphical and realizations Péter L. Erdös

More information

Examination paper for MA0301 Elementær diskret matematikk

Examination paper for MA0301 Elementær diskret matematikk Department of Mathematical Sciences Examination paper for MA0301 Elementær diskret matematikk Academic contact during examination: Iris Marjan Smit a, Sverre Olaf Smalø b Phone: a 9285 0781, b 7359 1750

More information

A Fast Algorithm For Finding Hamilton Cycles

A Fast Algorithm For Finding Hamilton Cycles A Fast Algorithm For Finding Hamilton Cycles by Andrew Chalaturnyk A thesis presented to the University of Manitoba in partial fulfillment of the requirements for the degree of Masters of Science in Computer

More information

Heaps & Priority Queues in the C++ STL 2-3 Trees

Heaps & Priority Queues in the C++ STL 2-3 Trees Heaps & Priority Queues in the C++ STL 2-3 Trees CS 3 Data Structures and Algorithms Lecture Slides Friday, April 7, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks

More information

NP-Completeness I. Lecture 19. 19.1 Overview. 19.2 Introduction: Reduction and Expressiveness

NP-Completeness I. Lecture 19. 19.1 Overview. 19.2 Introduction: Reduction and Expressiveness Lecture 19 NP-Completeness I 19.1 Overview In the past few lectures we have looked at increasingly more expressive problems that we were able to solve using efficient algorithms. In this lecture we introduce

More information

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard goddard@cse.unl.edu CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes

More information

CSC2420 Fall 2012: Algorithm Design, Analysis and Theory

CSC2420 Fall 2012: Algorithm Design, Analysis and Theory CSC2420 Fall 2012: Algorithm Design, Analysis and Theory Allan Borodin November 15, 2012; Lecture 10 1 / 27 Randomized online bipartite matching and the adwords problem. We briefly return to online algorithms

More information

Data Structures and Algorithm Analysis (CSC317) Intro/Review of Data Structures Focus on dynamic sets

Data Structures and Algorithm Analysis (CSC317) Intro/Review of Data Structures Focus on dynamic sets Data Structures and Algorithm Analysis (CSC317) Intro/Review of Data Structures Focus on dynamic sets We ve been talking a lot about efficiency in computing and run time. But thus far mostly ignoring data

More information