Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphs context: functions context: graphs and networks.

Similar presentations


Presentation on theme: "Graphs context: functions context: graphs and networks."— Presentation transcript:

1 Graphs context: functions context: graphs and networks

2 Varieties of graphs directed graphs multiple edges self-loops The graph of a relation is a directed graph with multiple edges and self-loops allowed

3 Simple graphs non-directed graphs ban multiple edges ban self-loops finite number of vertices (implies finite number of edges)

4 Abstract example A graph G has a set of vertices V(G) = {A, B, C} and a set of edges E(G) = {{A, B}, {A, C }} now draw a picture! NB language:one vertex, many vertices likeone matrix, many matrices

5 Abstract definition A graph G is a set of vertices and a set of edges

6 Varieties of graphs disconnectedconnected A graph is connected if, for any two vertices, there is a path in the graph from one to the other. A graph is disconnected if there are vertices v 1 and v 2 without a path from v 1 to v 2.

7 When are two graphs equal? Let G 1 be a graph with vertices {A, B, C} and edges {{A,B}, {A,C}}. Let G 2 be a graph with vertices {P, Q, R} and edges {{P,Q}, {P,R}}. Are these equal?

8 When are two graphs equal? Two graphs are equal iff they have equal vertex setsandequal edge sets so G 1 and G 2 are not equal: {A, B, C} is not equal to {P, Q, R}

9 When are two graphs “the same”? Are these graphs “the same”? what about these two:

10 Isomorphism Isomorphism is a well-defined concept which sums up the vague intuitive idea of “the same” All unequal, but isomorphic to each other

11 Isomorphism One graph is isomorphic to another if there is a continuous change from one to the other show this as a filmstrip/cartoon DGP?

12 Alphabet examples 2.3.4.1.6.7.8.5.9.10.11.12.

13 Definition of isomorphism G 1 is isomorphic to G 2 if there is a bijective function (bijection) which is “edge-preserving”: ie. (pronounce this?)

14 A proof of isomorphism Task: Show that these are isomorphic: problem: to define a vertex function we need to be able to refer to the vertices of the graphs

15 A proof of isomorphism Task: Show that these are isomorphic: A B C D E P Q R S T f (A) = f (B) = f (C) = f (D) = f (E) =

16 A proof of isomorphism Task: Show that these are isomorphic: There is more than one possibility for the edge-preserving vertex function f (how many?) A B C D E P Q R S T

17 A proof of isomorphism show the “edge-preserving property” using adjacency tables (or matrices) G1 G1 A B C D E A 0 1 0 0 0 B 1 0 1 1 0 C 0 1 0 0 1 D 0 1 0 0 1 E 0 0 1 1 0 G2 G2 R S P T Q R S P T Q f

18 The adjacency matrix game 1. Draw a graph (limit it to four vertices to start with) 2. Work out its adjacency matrix 3. Challenge someone else to draw your graph by showing them the adjacency matrix Your graphs are isomorphic.

19 Isomorphism Show informally by gradually changing a picture (“morphing”?) Show formally by setting up a bijection on the vertices and drawing up adjacency matrices which show edge-preservation (equal entries in the matrices).

20 Non-isomorphism Examples from alphabet there can’t be a bijection between the vertex sets because the vertex sets are different sizes. 3.1.

21 Vertex set size under IM If G 1 and G 2 are isomorphic then V(G 1 ) and V(G 2 ) have equal size If V(G 1 ) and V(G 2 ) are different sizes then G 1 and G 2 are not isomorphic

22 Vertex set size conjecture If V(G 1 ) and V(G 2 ) have equal size then G 1 and G 2 are isomorphic BEWARE - this is false!! counterexample?

23 Vertex set size conjecture If V(G 1 ) and V(G 2 ) have equal size then G 1 and G 2 are isomorphic BEWARE - this is false!! 2.1. same sized vertex sets but not isomorphic

24 Grouping by vertex set size Group the graphs by vertex-set size. Isomorphism is possible within groups but not between groups.

25 Grouping by vertex set size 2.3.4.1.6.7.8.5.9.10.11.12. Group the graphs by vertex-set size. Isomorphism is possible within groups but not between groups.

26 Non-isomorphism II There are bijections between the vertex sets of these graphs (the sets are the same size) There aren’t any edge-preserving node bijections because the edge-sets have different sizes (the incidence matrices have different numbers of 1’s in them - so the matrices can’t be the same) 1.11.

27 Edge set size under IM If G 1 and G 2 are isomorphic then E(G 1 ) and E(G 2 ) have equal size If E(G 1 ) and E(G 2 ) are different sizes then G 1 and G 2 are not isomorphic

28 Edge set size conjecture If E(G 1 ) and E(G 2 ) have equal size then G 1 and G 2 are isomorphic BEWARE - this is false!! counterexample?

29 Edge set size conjecture If E(G 1 ) and E(G 2 ) have equal size then G 1 and G 2 are isomorphic BEWARE - this is false!! 4.5. same sized edge sets but not isomorphic

30 Grouping by edge set size Group the graphs by edge-set size. Isomorphim is possible within groups but not between groups.

31 Grouping by edge set size 2.3.4.1.6.7.8.5.9.10.11.12. Group the graphs by edge-set size. Isomorphim is possible within groups but not between groups.

32 Grouping by node/edge set size Group the graphs by node-set and edge-set size. Isomorphim is possible within but not between groups.

33 Grouping by node/edge set size 2.3.4.1.6.7.8.5.9.10.11.12. Group the graphs by node-set and edge-set size. Isomorphim is possible within but not between groups.

34 Conjecture If two graphs have the same number of vertices and the same number of edges then the graphs are isomorphic BEWARE - this is false!! counterexample?

35 Conjecture If two graphs have the same number of vertices and the same number of edges then the graphs are isomorphic BEWARE - this is false!! same sized vertex sets and edge sets but not isomorphic

36 The degree of a vertex The degree of a vertex in a graph is the number of edges which meet that vertex You can work out the degree from an adjacency matrix - how?

37 The degree sequence of a graph The degree sequence of a graph is an ordered list of the degrees of its vertices You can work out the degree sequence from an adjacency matrix - how?

38 Grouping by degree sequence 2.3.4.1.6.7.8.5.9.10.11.12. {1, 1} {2, 2, 2} {1, 1,1,3} {1, 1, 2, 3, 3} {2, 2, 2, 2, 4} {1, 1, 1, 1, 3, 3} {1, 1, 1, 1, 4}

39 Degree sequence under IM If G 1 and G 2 are isomorphic then they have equal degree sequences If G 1 and G 2 have different degree sequences then they are not isomorphic

40 The degree sequence game 1. Draw a graph (limit it to six vertices to start with) 2. Work out its degree sequence. 3. Challenge someone else to draw your graph by telling them the degree sequence. Are your graphs isomorphic?

41 Degree sequence conjecture If G 1 and G 2 have equal degree sequences then G 1 and G 2 are isomorphic BEWARE - this is false!! counterexample?

42 Degree sequence conjecture If G 1 and G 2 have equal degree sequences then G 1 and G 2 are isomorphic BEWARE - this is false!! same sized vertex sets, edge sets and same degree sequence but not isomorphic

43 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

44 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

45 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

46 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

47 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

48 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

49 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

50 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

51 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

52 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

53 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

54 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

55 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

56 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

57 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

58 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

59 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

60 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

61 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

62 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

63 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

64 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

65 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

66 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

67 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

68 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

69 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

70 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

71 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

72 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

73 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

74 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

75 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

76 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

77 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

78 Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

79 Cycles and trees A cycle in graph G is a sequence of edges where the edges are distinct

80 Cycles and trees Connected graphs which have no cycles are called trees. disconnected graphs without cycles are called forests!

81 A surprisingly hard question: How many trees can you draw with n vertices? Write this as a function of n. N. B. whenever anyone says “how many?” referring to graphs, they mean “how many, treating isomorphic graphs as the same?” try it for n = 3? n = 4?

82 Electronic resource for graphs (and any dynamic geometry…) Download Euklidfree from http://www.zdnet.com/downloads/ (type Euklid in the search box to get started)


Download ppt "Graphs context: functions context: graphs and networks."

Similar presentations


Ads by Google