Graph Theory: Week 1
|
|
- Godfrey Banks
- 6 years ago
- Views:
Transcription
1 Graph Theory: Week Introduction to Graph Theory John Quinn August 30, 00
2 The Tokyo subway
3 Week overview What are graphs? Why study graph theory? Examples of graphs in the real world Different types of graphs Example problem: finding the shortest path
4 What is a graph? C B D F A E A graph G consists of a set of vertices and a set of edges. G = {V,E} in this example, V = {A,B,C,D,E,F}, E = {AB, BC, BD, CD, DF, DE,EF}. Any graph can be drawn on paper in many ways the important thing is which vertices are connected (adjacent) to each other.
5 Why study graph theory? Useful set of techniques for solving real-world problems particularly for different kinds of optimisation. Graph theory is useful for analysing things that are connected to other things, which applies almost everywhere. Some difficult problems become easy when represented using a graph. There are lots of unsolved questions in graph theory: solve one and become rich and famous. maybe
6 Graph example: Gnucleus peer connections Source: cybergeography.org
7 Graph example: Structure of the internet Source: Internet Mapping Project
8 Weighted graphs C B 4 D F A E Can extend graphs by associating a weight with each edge. Might represent e.g. the cost of travelling between two points.
9 Directed graphs (digraphs) C B 4 D F A E Can also make edges directional. This might now represent, for example, a network of one-way streets.
10 Bipartite graphs In this type of graph, the vertices are divided into two sets V = A B. There are no edges between vertices in the same set.
11 Shortest path problems How would you go about finding the shortest path from one place to another on a graph? A useful algorithm for doing this is Dijkstra s algorithm. Extra terminology: Walk An alternating, connected, sequence of vertices and edges. Path A walk in which all the vertices are unique. Cycle A path which starts and ends in the same place.
12 Dijkstra s algorithm to find shortest distance from vertex to all other vertices Start with a weighted graph G={V,E}, where a(i, j) is the distance from vertex i to vertex j. L(i) is the shortest distance from vertex to vertex i. L (i) is a temporary upper bound on L(i). P V is the set of permanently labelled vertices. T is the complement of P. Initially, P={}, L()=0 and L (j)=a(,j). Step : Find a vertex k in T with the smallest upper bound L (k). Add k to P, and set L(k) = L (k). Step : Set L (j) = min[l (j), L(k)+a(j, k)] Stop when P=V.
13 How could you prove that this algorithm always gives the shortest path? What is the complexity of this algorithm? If you tried it on a computer and it took one second to find a shortest path in a graph with a million vertices, how long would it take for a graph with two million vertices?
14 Another shortest path problem C B 4 D F A E What s the shortest path between A and F, using Dijkstra s algorithm?
15 Facility location problems Given a map of a town, where should town planners put a new school or police station? In the case of a school, it might be best to put it such that the average distance from all buildings or houses is minimised (minsum). In the case of a police station, it might be best to put it such that the maximum distance to any building is minised (minimax). We can calculate both of these from the shortest distance matrix (a matrix for which d(i, j) is the shortest distance from i to j).
16 New concepts this week Graphs as sets of edges and vertices Different types of graphs: directed, undirected, bipartite Dijkstra s algorithm to find shortest paths Facility location
17 Programming exercises We ll be using the Python language to work on applications of graph theory. Windows installation files for Python and other required libraries are on muele. Install Python, then the NetworkX and Matplotlib libraries. On Linux, installation is even easier as Python should already be installed. To set up the extra libraries on Ubuntu: sudo apt-get install python-networkx python-matplotlib
GRAPHS Lecture 19 CS2110 Spring 2013
GRAPHS Lecture 19 CS2110 Spring 2013 Announcements 2 Prelim 2: Two and a half weeks from now Tuesday, April16, 7:30-9pm, Statler Exam conflicts? We need to hear about them and can arrange a makeup It would
More informationModule 2: NETWORKS AND DECISION MATHEMATICS
Further Mathematics 2017 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,
More informationFurther Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks
Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,
More informationGRAPHS Lecture 17 CS2110 Spring 2014
GRAPHS Lecture 17 CS2110 Spring 2014 These are not Graphs 2...not the kind we mean, anyway These are Graphs 3 K 5 K 3,3 = Applications of Graphs 4 Communication networks The internet is a huge graph Routing
More informationTA: Jade Cheng ICS 241 Recitation Lecture Note #9 October 23, 2009
TA: Jade Cheng ICS 241 Recitation Lecture Note #9 October 23, 2009 Recitation #9 Question: For each of these problems about a subway system, describe a weighted graph model that can be used to solve the
More informationPBW 654 Applied Statistics - I Urban Operations Research. Unit 3. Network Modelling
PBW 54 Applied Statistics - I Urban Operations Research Unit 3 Network Modelling Background So far, we treated urban space as a continuum, where an entity could travel from any point to any other point
More informationIntroduction to Graph Theory
Introduction to Graph Theory Tandy Warnow January 20, 2017 Graphs Tandy Warnow Graphs A graph G = (V, E) is an object that contains a vertex set V and an edge set E. We also write V (G) to denote the vertex
More informationChapter 5: Euler Paths and Circuits The Mathematics of Getting Around
1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: *************************************************************************************
More informationGraph Theory. Part of Texas Counties.
Graph Theory Part of Texas Counties. We would like to visit each of the above counties, crossing each county only once, starting from Harris county. Is this possible? This problem can be modeled as a graph.
More informationChapter 5: Euler Paths and Circuits The Mathematics of Getting Around
1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: *************************************************************************************
More informationGraphs - I CS 2110, Spring 2016
Graphs - I CS 2110, Spring 2016 Announcements Reading: Chapter 28: Graphs Chapter 29: Graph Implementations These aren t the graphs we re interested in These aren t the graphs we re interested in This
More informationTopic 10 Part 2 [474 marks]
Topic Part 2 [474 marks] The complete graph H has the following cost adjacency matrix Consider the travelling salesman problem for H a By first finding a minimum spanning tree on the subgraph of H formed
More information14 Graph Theory. Exercise Set 14-1
14 Graph Theory Exercise Set 14-1 1. A graph in this chapter consists of vertices and edges. In previous chapters the term was used as a visual picture of a set of ordered pairs defined by a relation or
More informationCSE 21: Mathematics for Algorithms and Systems Analysis
CSE 21: Mathematics for Algorithms and Systems Analysis Week 10 Discussion David Lisuk June 4, 2014 David Lisuk CSE 21: Mathematics for Algorithms and Systems Analysis June 4, 2014 1 / 26 Agenda 1 Announcements
More informationVan Phuc Pham Abstract
Flight Scheduling using Dijstra s Algorithm and Empirical Modelling Van Phuc Pham 1054359 Abstract Graph theory is one of the most popular subjects in computer science. A mathematician Leonhard Euler first
More informationMEI Further Mathematics Support Programme
Further Mathematics Support Programme the Further Mathematics Support Programme www.furthermaths.org.uk Modelling and problem solving with Networks Sharon Tripconey Let Maths take you Further Nov 2009
More informationChapter 3: Paths and Cycles
Chapter 3: Paths and Cycles 5 Connectivity 1. Definitions: Walk: finite sequence of edges in which any two consecutive edges are adjacent or identical. (Initial vertex, Final vertex, length) Trail: walk
More information1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G))
10 Graphs 10.1 Graphs and Graph Models 1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G)) 2. an edge is present, say e = {u,
More informationWeek 12: Minimum Spanning trees and Shortest Paths
Agenda: Week 12: Minimum Spanning trees and Shortest Paths Kruskal s Algorithm Single-source shortest paths Dijkstra s algorithm for non-negatively weighted case Reading: Textbook : 61-7, 80-87, 9-601
More informationSections 5.2, 5.3. & 5.4
MATH 11008: Graph Theory Terminology Sections 5.2, 5.3. & 5.4 Routing problem: A routing problem is concerned with finding ways to route the delivery of good and/or services to an assortment of destinations.
More informationModule 11: Additional Topics Graph Theory and Applications
Module 11: Additional Topics Graph Theory and Applications Topics: Introduction to Graph Theory Representing (undirected) graphs Basic graph algorithms 1 Consider the following: Traveling Salesman Problem
More informationChapter 9 Graph Algorithms
Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 3 Definitions an undirected graph G = (V, E)
More informationGRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS
GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS DR. ANDREW SCHWARTZ, PH.D. 10.1 Graphs and Graph Models (1) A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes)
More informationChapter 1 Graph Theory
Chapter Graph Theory - Representations of Graphs Graph, G=(V,E): It consists of the set V of vertices and the set E of edges. If each edge has its direction, the graph is called the directed graph (digraph).
More informationGraphs. Reading Assignment. Mandatory: Chapter 3 Sections 3.1 & 3.2. Peeking into Computer Science. Jalal Kawash 2010
Graphs Mandatory: hapter 3 Sections 3.1 & 3.2 Reading ssignment 2 Graphs bstraction of ata 3 t the end of this section, you will be able to: 1.efine directed and undirected graphs 2.Use graphs to model
More information11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions
Introduction Chapter 9 Graph Algorithms graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 2 Definitions an undirected graph G = (V, E) is
More informationV :non-empty vertex ornode set E V V :edge set G (V, E) :directed graph on V, or digraph on V
-93-11. Graph Theory Example: V :non-empty vertex ornode set E V V :edge set G (V, E) :directed graph on V, or digraph on V b e f V={a, b, c, d, e, f, g} a c d f E={(a,b), (b,c), (c,a),... } Note: (a,
More informationSome Graph Theory for Network Analysis. CS 249B: Science of Networks Week 01: Thursday, 01/31/08 Daniel Bilar Wellesley College Spring 2008
Some Graph Theory for Network Analysis CS 9B: Science of Networks Week 0: Thursday, 0//08 Daniel Bilar Wellesley College Spring 008 Goals this lecture Introduce you to some jargon what we call things in
More informationIntroduction to Engineering Systems, ESD.00. Networks. Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow
Introduction to Engineering Systems, ESD.00 Lecture 7 Networks Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow The Bridges of Königsberg The town of Konigsberg in 18 th century
More informationUnderstand graph terminology Implement graphs using
raphs Understand graph terminology Implement graphs using djacency lists and djacency matrices Perform graph searches Depth first search Breadth first search Perform shortest-path algorithms Disjkstra
More informationProblem 1. Which of the following is true of functions =100 +log and = + log? Problem 2. Which of the following is true of functions = 2 and =3?
Multiple-choice Problems: Problem 1. Which of the following is true of functions =100+log and =+log? a) = b) =Ω c) =Θ d) All of the above e) None of the above Problem 2. Which of the following is true
More informationSCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory
SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics An Introduction to Graph Theory. Introduction. Definitions.. Vertices and Edges... The Handshaking Lemma.. Connected Graphs... Cut-Points and Bridges.
More informationGraphs. Introduction To Graphs: Exercises. Definitions:
Graphs Eng.Jehad Aldahdooh Introduction To Graphs: Definitions: A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes) and E, a set of edges. Each edge has either one or two vertices associated
More informationMath/Stat 2300 Modeling using Graph Theory (March 23/25) from text A First Course in Mathematical Modeling, Giordano, Fox, Horton, Weir, 2009.
Math/Stat 2300 Modeling using Graph Theory (March 23/25) from text A First Course in Mathematical Modeling, Giordano, Fox, Horton, Weir, 2009. Describing Graphs (8.2) A graph is a mathematical way of describing
More informationNotebook Assignments
Notebook Assignments These six assignments are a notebook using techniques from class in the single concrete context of graph theory. This is supplemental to your usual assignments, and is designed for
More information2. True or false: even though BFS and DFS have the same space complexity, they do not always have the same worst case asymptotic time complexity.
1. T F: Consider a directed graph G = (V, E) and a vertex s V. Suppose that for all v V, there exists a directed path in G from s to v. Suppose that a DFS is run on G, starting from s. Then, true or false:
More informationIntroduction III. Graphs. Motivations I. Introduction IV
Introduction I Graphs Computer Science & Engineering 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu Graph theory was introduced in the 18th century by Leonhard Euler via the Königsberg
More informationCS200: Graphs. Prichard Ch. 14 Rosen Ch. 10. CS200 - Graphs 1
CS200: Graphs Prichard Ch. 14 Rosen Ch. 10 CS200 - Graphs 1 Graphs A collection of nodes and edges What can this represent? n A computer network n Abstraction of a map n Social network CS200 - Graphs 2
More informationGraph and Digraph Glossary
1 of 15 31.1.2004 14:45 Graph and Digraph Glossary A B C D E F G H I-J K L M N O P-Q R S T U V W-Z Acyclic Graph A graph is acyclic if it contains no cycles. Adjacency Matrix A 0-1 square matrix whose
More informationGraphs And Algorithms
Graphs nd lgorithms Mandatory: hapter 3 Sections 3.1 & 3.2 Reading ssignment 2 1 Graphs bstraction of ata 3 t the end of this section, you will be able to: 1. efine directed and undirected graphs 2. Use
More information15-451/651: Design & Analysis of Algorithms October 11, 2018 Lecture #13: Linear Programming I last changed: October 9, 2018
15-451/651: Design & Analysis of Algorithms October 11, 2018 Lecture #13: Linear Programming I last changed: October 9, 2018 In this lecture, we describe a very general problem called linear programming
More informationCS61BL. Lecture 5: Graphs Sorting
CS61BL Lecture 5: Graphs Sorting Graphs Graphs Edge Vertex Graphs (Undirected) Graphs (Directed) Graphs (Multigraph) Graphs (Acyclic) Graphs (Cyclic) Graphs (Connected) Graphs (Disconnected) Graphs (Unweighted)
More informationDiscrete Mathematics, Spring 2004 Homework 8 Sample Solutions
Discrete Mathematics, Spring 4 Homework 8 Sample Solutions 6.4 #. Find the length of a shortest path and a shortest path between the vertices h and d in the following graph: b c d a 7 6 7 4 f 4 6 e g 4
More informationDepartment of Computer Applications. MCA 312: Design and Analysis of Algorithms. [Part I : Medium Answer Type Questions] UNIT I
MCA 312: Design and Analysis of Algorithms [Part I : Medium Answer Type Questions] UNIT I 1) What is an Algorithm? What is the need to study Algorithms? 2) Define: a) Time Efficiency b) Space Efficiency
More informationUNIT Name the different ways of representing a graph? a.adjacencymatrix b. Adjacency list
UNIT-4 Graph: Terminology, Representation, Traversals Applications - spanning trees, shortest path and Transitive closure, Topological sort. Sets: Representation - Operations on sets Applications. 1. Name
More information0.0.1 Network Analysis
Graph Theory 0.0.1 Network Analysis Prototype Example: In Algonquian Park the rangers have set up snowmobile trails with various stops along the way. The system of trails is our Network. The main entrance
More informationCMPSC 250 Analysis of Algorithms Spring 2018 Dr. Aravind Mohan Shortest Paths April 16, 2018
1 CMPSC 250 Analysis of Algorithms Spring 2018 Dr. Aravind Mohan Shortest Paths April 16, 2018 Shortest Paths The discussion in these notes captures the essence of Dijkstra s algorithm discussed in textbook
More informationVarying Applications (examples)
Graph Theory Varying Applications (examples) Computer networks Distinguish between two chemical compounds with the same molecular formula but different structures Solve shortest path problems between cities
More informationGraphs and Graph Algorithms. Slides by Larry Ruzzo
Graphs and Graph Algorithms Slides by Larry Ruzzo Goals Graphs: defns, examples, utility, terminology Representation: input, internal Traversal: Breadth- & Depth-first search Three Algorithms: Connected
More information22.1 Representations of graphs
22.1 Representations of graphs There are two standard ways to represent a (directed or undirected) graph G = (V,E), where V is the set of vertices (or nodes) and E is the set of edges (or links). Adjacency
More informationIntroduction to Graphs
Introduction to Graphs Slides by Lap Chi Lau The Chinese University of Hong Kong This Lecture In this part we will study some basic graph theory. Graph is a useful concept to model many problems in computer
More informationGraph Theory. ICT Theory Excerpt from various sources by Robert Pergl
Graph Theory ICT Theory Excerpt from various sources by Robert Pergl What can graphs model? Cost of wiring electronic components together. Shortest route between two cities. Finding the shortest distance
More informationElements of Graph Theory
Elements of Graph Theory Quick review of Chapters 9.1 9.5, 9.7 (studied in Mt1348/2008) = all basic concepts must be known New topics we will mostly skip shortest paths (Chapter 9.6), as that was covered
More informationHonors ICM- Graph Theory Unit 7 Homework Packet Homework Day 1
Honors ICM- Graph Theory Unit 7 Homework Packet Homework Day 1 Name Period: 6. Construct a graph with three critical paths. 7. Determine the minimum project time and the critical path for the following
More informationSource. Sink. Chapter 10: Iterative Programming Maximum Flow Problem. CmSc250 Intro to Algorithms
Chapter 10: Iterative Programming Maximum Flow Problem CmSc20 Intro to Algorithms A flow network is a model of a system where some material is produced at its source, travels through the system, and is
More informationAnnouncements. Quiz on Monday. Review Session at 5:00-6:30ish today in Padelford C-36. Project Proposals due one week from Monday Oct 22.
Announcements Quiz on Monday. Review Session at 5:00-6:30ish today in Padelford C-36. Project Proposals due one week from Monday Oct 22. Band Tour Problem You and the band want to tour the country this
More informationCSE373: Data Structures & Algorithms Lecture 17: Minimum Spanning Trees. Dan Grossman Fall 2013
CSE373: Data Structures & Algorithms Lecture 7: Minimum Spanning Trees Dan Grossman Fall 03 Spanning Trees A simple problem: Given a connected undirected graph G=(V,E), find a minimal subset of edges such
More informationr=1 The Binomial Theorem. 4 MA095/98G Revision
Revision Read through the whole course once Make summary sheets of important definitions and results, you can use the following pages as a start and fill in more yourself Do all assignments again Do the
More informationCourse Introduction / Review of Fundamentals of Graph Theory
Course Introduction / Review of Fundamentals of Graph Theory Hiroki Sayama sayama@binghamton.edu Rise of Network Science (From Barabasi 2010) 2 Network models Many discrete parts involved Classic mean-field
More informationGraph Theory Mini-course
Graph Theory Mini-course Anthony Varilly PROMYS, Boston University, Boston, MA 02215 Abstract Intuitively speaking, a graph is a collection of dots and lines joining some of these dots. Many problems in
More informationAdvanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras
Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Lecture 28 Chinese Postman Problem In this lecture we study the Chinese postman
More informationCS4800: Algorithms & Data Jonathan Ullman
CS4800: Algorithms & Data Jonathan Ullman Lecture 12: Graph Search: BFS Applications, DFS Feb 20, 2018 BFS Review BFS Algorithm: Input: source node! " # =! " % = all neighbors of " # " & = all neighbors
More informationOptimization II: Dynamic programming
Optimization II: Dynamic programming Ricardo Fukasawa rfukasawa@uwaterloo.ca Department of Combinatorics and Optimization Faculty of Mathematics University of Waterloo Nov 2, 2016 R. Fukasawa (C&O) Optimization
More informationThe University of Sydney MATH 2009
The University of Sydney MTH 009 GRPH THEORY Tutorial solutions 00. Show that the graph on the left is Hamiltonian, but that the other two are not. To show that the graph is Hamiltonian, simply find a
More informationGraphs. There is no restriction on the relation E. Directed graphs also known as digraphs
3: Graphs Graphs A directed graph is a pair (N,E) consisting of a set of nodes (or vertices) N, together with a relation E on N. Each element (n 1,n 2 ) of E is called an edge There is no restriction on
More informationMC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points
MC 0 GRAPH THEORY 0// Solutions to HW # 0 points + XC points ) [CH] p.,..7. This problem introduces an important class of graphs called the hypercubes or k-cubes, Q, Q, Q, etc. I suggest that before you
More informationComparison of the moore s method and dijkstra s algorithm in determing the shortest path between two points on a map
Comparison of the moore s method and dijkstra s algorithm in determing the shortest path between two points on a map BY GROUP 18 Cai Yuhao Fan Hsiao-Tien Liu Bowen Paglia John Naisby MOTIVATION - Global
More informationGraph Algorithms (part 3 of CSC 282),
Graph Algorithms (part of CSC 8), http://www.cs.rochester.edu/~stefanko/teaching/10cs8 1 Schedule Homework is due Thursday, Oct 1. The QUIZ will be on Tuesday, Oct. 6. List of algorithms covered in the
More informationSection 08: Solutions
Section 08: Solutions 1. Limitations and properties of shortest path algorithms (a) Draw an example of a directed graph where (a) there exists a path between two vertices s and t but (b) there is no shortest
More informationCSE 373 NOVEMBER 20 TH TOPOLOGICAL SORT
CSE 373 NOVEMBER 20 TH TOPOLOGICAL SORT PROJECT 3 500 Internal Error problems Hopefully all resolved (or close to) P3P1 grades are up (but muted) Leave canvas comment Emails tomorrow End of quarter GRAPHS
More informationNetwork Analysis. Links, nodes, trees, graphs, paths and cycles what does it all mean? Minimal spanning tree shortest route maximum flow
Network Analysis Minimal spanning tree shortest route maximum flow Links, nodes, trees, graphs, paths and cycles what does it all mean? Real OR in action! 1 Network Terminology Graph - set of points (nodes)
More informationChapter 9 Graph Algorithms
Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be if not careful with data structures 3 Definitions an undirected graph G = (V, E) is a
More informationGraph Algorithms Using Depth First Search
Graph Algorithms Using Depth First Search Analysis of Algorithms Week 8, Lecture 1 Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Graph Algorithms Using Depth
More informationClassic Graph Theory Problems
Classic Graph Theory Problems Hiroki Sayama sayama@binghamton.edu The Origin Königsberg bridge problem Pregel River (Solved negatively by Euler in 176) Representation in a graph Can all the seven edges
More informationDiscrete Structures CISC 2315 FALL Graphs & Trees
Discrete Structures CISC 2315 FALL 2010 Graphs & Trees Graphs A graph is a discrete structure, with discrete components Components of a Graph edge vertex (node) Vertices A graph G = (V, E), where V is
More informationGraph definitions. There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs. An undirected graph
Graphs Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs start Birmingham 60 Rugby fill pan with water add salt to water take egg from fridge
More informationCMPUT 396 Sliding Tile Puzzle
CMPUT 396 Sliding Tile Puzzle Sliding Tile Puzzle 2x2 Sliding Tile States Exactly half of the states are solvable, the other half are not. In the case of 2x2 puzzles, I can solve it if I start with a configuration
More informationOutline. Graphs. Divide and Conquer.
GRAPHS COMP 321 McGill University These slides are mainly compiled from the following resources. - Professor Jaehyun Park slides CS 97SI - Top-coder tutorials. - Programming Challenges books. Outline Graphs.
More informationLecture 1: Examples, connectedness, paths and cycles
Lecture 1: Examples, connectedness, paths and cycles Anders Johansson 2011-10-22 lör Outline The course plan Examples and applications of graphs Relations The definition of graphs as relations Connectedness,
More informationGraph Theory: Applications and Algorithms
Graph Theory: Applications and Algorithms CIS008-2 Logic and Foundations of Mathematics David Goodwin david.goodwin@perisic.com 11:00, Tuesday 21 st February 2012 Outline 1 n-cube 2 Gray Codes 3 Shortest-Path
More informationL Modelling and Simulating Social Systems with MATLAB
851-0585-04L Modelling and Simulating Social Systems with MATLAB Lesson 6 Graphs (Networks) Anders Johansson and Wenjian Yu (with S. Lozano and S. Wehrli) ETH Zürich 2010-03-29 Lesson 6 Contents History:
More informationGraphs (MTAT , 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402
Graphs (MTAT.05.080, 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402 homepage: http://courses.cs.ut.ee/2012/graafid (contains slides) For grade: Homework + three tests (during or after
More informationProblem Set 8 Solutions
Introduction to Algorithms November 22, 25 Massachusetts Institute of Technology 6.46J/8.4J Professors Erik D. Demaine and Charles E. Leiserson Handout 27 Problem Set 8 Solutions Problem 8-. No left turns
More informationCS200: Graphs. Rosen Ch , 9.6, Walls and Mirrors Ch. 14
CS200: Graphs Rosen Ch. 9.1-9.4, 9.6, 10.4-10.5 Walls and Mirrors Ch. 14 Trees as Graphs Tree: an undirected connected graph that has no cycles. A B C D E F G H I J K L M N O P Rooted Trees A rooted tree
More informationGraphs and Isomorphisms
Graphs and Isomorphisms Discrete Structures (CS 173) Backyards of Old Houses in Antwerp in the Snow Van Gogh Madhusudan Parthasarathy, University of Illinois Proof techniques: Direct Contrapositive Disproving
More informationDesign and Analysis of Algorithms
CS4335: Design and Analysis of Algorithms Who we are: Dr. Lusheng WANG Dept. of Computer Science office: B6422 phone: 2788 9820 e-mail: lwang@cs.cityu.edu.hk Course web site: http://www.cs.cityu.edu.hk/~lwang/ccs3335.html
More information6.2. Paths and Cycles
6.2. PATHS AND CYCLES 85 6.2. Paths and Cycles 6.2.1. Paths. A path from v 0 to v n of length n is a sequence of n+1 vertices (v k ) and n edges (e k ) of the form v 0, e 1, v 1, e 2, v 2,..., e n, v n,
More informationMon Tue Wed Thurs Fri
In lieu of recitations 320 Office Hours Mon Tue Wed Thurs Fri 8 Cole 9 Dr. Georg Dr. Georg 10 Dr. Georg/ Jim 11 Ali Jim 12 Cole Ali 1 Cole/ Shannon Ali 2 Shannon 3 Dr. Georg Dr. Georg Jim 4 Upcoming Check
More informationGraph Theory: Introduction
Graph Theory: Introduction Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT Kharagpur pallab@cse.iitkgp.ernet.in Resources Copies of slides available at: http://www.facweb.iitkgp.ernet.in/~pallab
More informationSolving NP-hard Problems on Special Instances
Solving NP-hard Problems on Special Instances Solve it in poly- time I can t You can assume the input is xxxxx No Problem, here is a poly-time algorithm 1 Solving NP-hard Problems on Special Instances
More informationTA: Jade Cheng ICS 241 Recitation Lecture Notes #12 November 13, 2009
TA: Jade Cheng ICS 241 Recitation Lecture Notes #12 November 13, 2009 Recitation #12 Question: Use Prim s algorithm to find a minimum spanning tree for the given weighted graph. Step 1. Start from the
More informationCS 206 Introduction to Computer Science II
CS 206 Introduction to Computer Science II 04 / 06 / 2018 Instructor: Michael Eckmann Today s Topics Questions? Comments? Graphs Definition Terminology two ways to represent edges in implementation traversals
More informationSection 0.3 The Order of Operations
Section 0.3 The Contents: Evaluating an Expression Grouping Symbols OPERATIONS The Distributive Property Answers Focus Exercises Let s be reminded of those operations seen thus far in the course: Operation
More informationGraph Algorithms (part 3 of CSC 282),
Graph Algorithms (part of CSC 8), http://www.cs.rochester.edu/~stefanko/teaching/11cs8 Homework problem sessions are in CSB 601, 6:1-7:1pm on Oct. (Wednesday), Oct. 1 (Wednesday), and on Oct. 19 (Wednesday);
More informationGRAPH THEORY - FUNDAMENTALS
GRAPH THEORY - FUNDAMENTALS http://www.tutorialspoint.com/graph_theory/graph_theory_fundamentals.htm Copyright tutorialspoint.com A graph is a diagram of points and lines connected to the points. It has
More informationWorksheet for the Final Exam - Part I. Graphs
Worksheet for the Final Exam - Part I. Graphs Date and Time: May 10 2012 Thursday 11:50AM~1:50PM Location: Eng 120 Start with the Self-Test Exercises (pp.816) in Prichard. 1. Give the adjacency matrix
More informationChapter 2 Graphs. 2.1 Definition of Graphs
Chapter 2 Graphs Abstract Graphs are discrete structures that consist of vertices and edges connecting some of these vertices. Graphs have many applications in Mathematics, Computer Science, Engineering,
More informationChapter 14. Graphs Pearson Addison-Wesley. All rights reserved 14 A-1
Chapter 14 Graphs 2011 Pearson Addison-Wesley. All rights reserved 14 A-1 Terminology G = {V, E} A graph G consists of two sets A set V of vertices, or nodes A set E of edges A subgraph Consists of a subset
More informationLecture 25 Notes Spanning Trees
Lecture 25 Notes Spanning Trees 15-122: Principles of Imperative Computation (Spring 2016) Frank Pfenning 1 Introduction The following is a simple example of a connected, undirected graph with 5 vertices
More informationData Structures and Algorithms Key to Homework Assignment 8
Data Structures and Algorithms Key to Homework Assignment 8. Apply the strong components algorithm to the digraph that has the following adjacency matrix: 0 4 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
More information