Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 First we determine if a graph is connected.

Similar presentations


Presentation on theme: "1 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 First we determine if a graph is connected."— Presentation transcript:

1 1 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 First we determine if a graph is connected using a breadth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 0 index 0123456 starting with node 1

2 2 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 First we determine if a graph is connected using a breadth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 10 12 index 0123456 starting with node 1− then to node 0 and 4 − adding node 5 from 0

3 3 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 First we determine if a graph is connected using a breadth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 10212 index 0123456 starting with node 1− then to node 0 and 4 − adding node 5 from 0 − adding 3 from 4

4 4 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 First we determine if a graph is connected using a breadth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 1032123 index 0123456 starting with node 1− then to node 0 and 4 − adding node 5 from 0 − adding 3 from 4 − adding 2 and 6 from 5 Now all nodes are connected

5 5 3/21/2016 MATH 224 – Discrete Mathematics First we determine if a graph is connected using a breadth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 1032123 index 0123456 starting with node 1− then to node 0 and 4 − adding node 5 from 0 − adding 3 from 4 − adding 2 and 6 from 5 Now all nodes are connected 0 1 5 4 6 2 3

6 6 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 Next we determine if a graph is connected using a depth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 01 index 0123456 starting with node 0 − then to node1

7 7 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 Next we determine if a graph is connected using a depth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 01 2 index 0123456 starting with node 0 − then to node1 − then to node 4

8 8 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 Next we determine if a graph is connected using a depth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 0132 index 0123456 starting with node 0 − then to node1 − then to node 4 − then to 3

9 9 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 Next we determine if a graph is connected using a depth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 014323 index 0123456 starting with node 0 − then to node1 − then to node 4 − then to 3 − no new nodes from 3 so backtrack to 4 − then to 5 − then to 2

10 10 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 Next we determine if a graph is connected using a depth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 0143234 index 0123456 starting with node 0 − then to node1 − then to node 4 − then to 3 − no new nodes from 3 so backtrack to 4 − then to 5 − then to 2 − no new nodes so backtrack to 5 − then to 6

11 11 3/21/2016 MATH 224 – Discrete Mathematics Next we determine if a graph is connected using a depth first algorithm. Start with a row and find all nodes connected by one edge. Then determine all nodes connected to those nodes and so on until we cover all edges or have exhausted all options. Determining if a Graphs is Connected 0143234 index 0123456 starting with node 0 − then to node1 − then to node 4 − then to 3 − no new nodes from 3 so backtrack to 4 − then to 5 − then to 2 − no new nodes so backtrack to 5 − then to 6 0 1 5 4 6 2 3


Download ppt "1 3/21/2016 MATH 224 – Discrete Mathematics 0123456 00100010 11000100 20000010 30000100 40101010 51010101 60000010 First we determine if a graph is connected."

Similar presentations


Ads by Google