Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.

Slides:



Advertisements
Similar presentations
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
Advertisements

Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Carrano and Henry, © 2013.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Frank Carrano, © 2012.
The Travelling Salesman Algorithm A Salesman has to visit lots of different stores and return to the starting base On a graph this means visiting every.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
C o n f i d e n t i a l HOME NEXT Subject Name: Data Structure Using C Unit Title: Graphs.
GRAPH Learning Outcomes Students should be able to:
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Slide 14-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
More Graphs, Subgraphs and Trees Planarity and Coloring.
Graph Theory Topics to be covered:
Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University.
Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
1 Section 1.4 Graphs and Trees A graph is set of objects called vertices or nodes where some pairs of objects may be connected by edges. (A directed graph.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
CSCI 115 Chapter 7 Trees. CSCI 115 §7.1 Trees §7.1 – Trees TREE –Let T be a relation on a set A. T is a tree if there exists a vertex v 0 in A s.t. there.
CS 200 Algorithms and Data Structures
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Graph.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Graph Theory and Applications
Graph Theory Hamilton Paths Hamilton Circuits and.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
I can describe the differences between Hamilton and Euler circuits and find efficient Hamilton circuits in graphs. Hamilton Circuits I can compare and.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
AS Decision Maths Tips for each Topic. Kruskal and Prim What examiner’s are looking for A table of values in the order that they are added and the total.
© 2006 Pearson Addison-Wesley. All rights reserved14 B-1 Chapter 14 (continued) Graphs.
MAT 110 Workshop Created by Michael Brown, Haden McDonald & Myra Bentley for use by the Center for Academic Support.
Excursions in Modern Mathematics Sixth Edition
Homework 8 Graph G is given by the figure below.
Weighted Graphs and traveling Salesperson problem
The Beauty of Computer Science
Graphs Chapter 20.
Graph theory Definitions Trees, cycles, directed graphs.
Agenda Lecture Content: Introduction to Graph Path and Cycle
12. Graphs and Trees 2 Summary
HAMILTONIAN CIRCUIT ALGORITHMS
EECS 203 Lecture 20 More Graphs.
Great Theoretical Ideas in Computer Science
Solving Linear Inequalities
Chapter 2: Business Efficiency Lesson Plan
CS120 Graphs.
Chapter 2: Business Efficiency Lesson Plan
Spanning Trees Discrete Mathematics.
Graph Algorithm.
Discrete Mathematics for Computer Science
Graph Theory.
Quiz Review.
Graphs Chapter 13.
Graphs Chapter 11 Objectives Upon completion you will be able to:
Chapter 2: Business Efficiency Business Efficiency
Chapter 9: Graphs Basic Concepts
Advanced Analysis of Algorithms
Discrete Math II Howon Kim
A path that uses every vertex of the graph exactly once.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Hamiltonian Cycles.
Hamilton Paths and Hamilton Circuits
Euler circuit Theorem 1 If a graph G has an Eulerian path, then it must have exactly two odd vertices. Theorem 2 If a graph G has an Eulerian circuit,
Graphs CS 2606.
Chapter 9: Graphs Basic Concepts
7 The Mathematics of Networks
Presentation transcript:

Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H

Planar Graphs Planar graph – any graph that can be redrawn so that none of the edges intersect except at the vertices. Any edge or vertex may be moved to create this new graph. No edges or vertices may be deleted or added to the graph. Every planar graph has a chromatic number that is less than or equal to four.

Bipartite Graph Bipartite – a graph whose vertices can be divided into two distinct sets so that each edge of the graph has one vertex in each set A D B E C

Complete Bipartite Graphs Complete bipartite – a bipartite graph is complete if it can be separated into two distinct sets, every edges has one vertex in each set and all possible edges from one set to the other are drawn. W Q A B X Z C Y M This is a K graph This is a K graph 2,1 3,3

Drawing a graph as a bipartite graph Draw these graphs as a bipartite graphs, if possible. B W X E C A F Y D V I Z G H

Complement Complement – the complement to a graph has all the same vertices as the original graph but is made up of all the edges NOT in the original. If the original graph is G, then the complement is denoted by G then this is the graph G If this is graph G The combination of a graph and its complement form what kind of graph?

Traveling Salesperson Problem (TSP) These problems are a way to show, with a graph, the different Hamiltonian circuit that could be used on a map. The map may take into consideration distance, time, or cost when finding the “best” Hamiltonian circuit available. For each problem, you make a weighted tree to show each of the circuits and their weights.

Copy the following graph. B C D 154 234 312 872 298 179 Now, make a weighted tree graph to represent all the circuits possible in this graph, starting at point B.

B A C D 154 312 234

Nearest-neighbor Method As we add more and more vertices this method of making a weighted tree becomes more difficult because of the number of different circuits available. “Even with the help of a computer that can do computations at a rate of 1 billions per second, it would take more than 19 million years for the computer to find the weights of every circuit for a graph with 25 vertices.” Obviously, we do not have the time to work such problems and need a shorter way to find a comparable answer.

We will start at point B just as we did for the last problem. C D 154 234 312 872 298 179 We will start at point B just as we did for the last problem. From B travel to the point that is nearest to point B. In this case it is point A.

Make the tree showing all the possible circuits and find the shortest circuit using the nearest-neighbors method. 18 A B C D 23 22 17 12 11

Finding the Shortest Route When finding the shortest route it is not necessary to touch all of the point in the graph. It is like going on vacation to the beach, you just want to get there as fast as you can, you do not have to visit every city in-between here and your destination. F B Find the shortest route from A to G 3 8 4 7 G 7 A D 6 5 5 6 C E

Directional graphs Use the following table to create a directional graph and find the shortest route from A to G. To A B C D E F G A - 7 - - 5 - - B - - - - - - 6 C 2 - - - - 3 - From D - - 1 - - - - E - - 2 - - - 8 F - - - - 3 - 2 G 11 6 - - - 1 -

Trees Trees are used throughout the book to graph problems. We will use them in Chapter 6 with Probability and Chapter 7 with Game Theory as well as the remaining 3 sections of this chapter. Many computers use them in search and sorting algorithms. A tree is defined as a connected graph with no cycles. Remember: a connected graph mean there is at least one path between each pair of vertices A cycle in a graph is any path that begins and ends at the same vertex. A leaf is vertex with degree 1 A root is the term from the vertex at the beginning of a directed tree, where all edges are going away from that vertex

Not a tree, WHY? TREE Not a tree, WHY?

P. 240 example #14 Q J A 2 10 K 3 9 4 8 5 7 6 The numbers on the outside give you the vertices for your tree. The number on the inside give you where to draw the edges (which vertices are adjacent to each other).

Minimum Spanning Trees B C D E F G H J K L M N Use a Breath-First search to create a minimum spanning tree. Begin the tree a point D.

A B (1) C D (0) E F G H J K L M N Begin by putting a zero over the point to begin at (point D) Shade in each edge that is connected to point D and place a one above each of the point adjacent to point D

Make a spanning tree starting at point C J C B D E H G F

Minimum Spanning Tree 4 5 8 6 9 7 11 List all of the edges smallest to largest. 7 6

9 5 4 7 11 8 6 6 4 9 9 7 List all of the edges smallest to largest. 4

Find the minimum spanning tree and its weight. B D 9 A 16 C 15 11 15 8 7 J E F 15 8 H 15 17 G

Evaluating an Expression Tree Each vertex will either have a number or an operation on it. The edges will connect the numbers and the operation to be performed on those numbers. The numbers will always be to the right and left sides and the operation will be in the middle. Start at the bottom left side of the expression tree and perform the operation on the numbers. Work your way up the left side until you get the top and then do the same for the right side. There should always be two numbers on the outside and an operation in the middle, until you have only one number left

Reverse Polish Notation This is a way to solve mathematical expressions quickly without having to worry about orders of operations. All numbers are single digits and positive UNLESS they are in parentheses. 1.) Look through the list and find the first mathematical symbol. 2.) Underline that symbol and the two numbers immediately before it. 3.) Perform the operation on the underlined numbers in the order they appear in the expression. 4.) The answer from step #3 and all other numbers and symbols are written in the same order. 5.) Repeat steps until only one number is left.