Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 10 CSE 331 Sep 20, 2017.

Similar presentations


Presentation on theme: "Lecture 10 CSE 331 Sep 20, 2017."— Presentation transcript:

1 Lecture 10 CSE 331 Sep 20, 2017

2 Mini Project choice due Sep 25

3 A generic tool to abstract out problems
Up Next…. Problem Statement A generic tool to abstract out problems Problem Definition Algorithm “Implementation” Analysis

4 Relationship: Mention in other’s program
Graphs Representation of relationships between pairs of entities/elements Edge Entities: News hosts Relationship: Mention in other’s program Vertex/Node

5 Graphs are omnipresent
Airline Route maps

6 What does this graph represent?
Internet

7 And this one? Math articles on Wikipedia

8 And this one?

9 Rest of today’s agenda Basic Graph definitions

10 Paths , , Sequence of vertices connected by edges Connected
Path length 3 ,

11 Connectivity u and w are connected iff there is a path between them A graph is connected iff all pairs of vertices are connected

12 Connected Graphs Every pair of vertices has a path between them

13 Cycles Sequence of k vertices connected by edges, first k-1 are distinct ,

14

15 Formally define everything

16 Rest of Today’s agenda Prove n vertex tree has n-1 edges
Formal definitions of graphs, paths, cycles, connectivity and trees Prove n vertex tree has n-1 edges Algorithms for checking connectivity

17 Tree Connected undirected graph with no cycles

18 Rooted Tree

19 A rooted tree AC’s child=SG Pick any vertex as root SG’s parent=AC
Let the rest of the tree hang under “gravity”

20 Rest of Today’s agenda Prove n vertex tree has n-1 edges
Algorithms for checking connectivity

21 Checking by inspection

22 What about large graphs?
Are s and t connected?

23 Brute-force algorithm?
List all possible vertex sequences between s and t nn such sequences Check if any is a path between s and t

24 Algorithm motivation all


Download ppt "Lecture 10 CSE 331 Sep 20, 2017."

Similar presentations


Ads by Google