Download presentation
Presentation is loading. Please wait.
Published byWinifred Hawkins Modified over 8 years ago
1
+ GRAPH Algorithm 2 Dikompilasi dari banyak sumber
2
+ Walk … A walk in the graph G = (V, E) is a finite sequence of the form v i0,e j1,v i1,e j2,...,e jk,v ik, The walk starts at a vertex v i0 is the initial vertex and v ik is the terminal vertex. k is the length of the walk. A zero length walk is just a single vertex v i0 It is allowed to visit a vertex or go through an edge more than once. A walk is open if v i0 <> v ik. Otherwise it is closed.
3
+ Example of walk The walk v 2, e 7, v 5, e 8, v 1, e 8, v 5, e 6, v 4, e 5, v 4, e 5, v 4 is open. On the other hand, the walk v 4, e 5, v 4, e 3, v 3, e 2, v 2, e 7, v 5, e 6, v 4 Is closed.
4
Trail A walk is a trail if any edge is traversed at most once. Then, the number of times that the vertex pair u, v can appear as consecutive vertices in a trail is at most the number of parallel edges connecting u and v.
5
+ Example of trail The walk in the graph v 1, e 8, v 5, e 9, v 1, e 1, v 2, e 7, v 5, e 6, v 4, e 5, v 4, e 4, v 4 Is trail.
6
A trail is a path if any vertex is visited at most once except possibly the initial and terminal vertices when they are the same. A closed path is a circuit. Path and Circuit
7
Example of path and circuit The walk in the graph v 2, e 7, v 5, e 6, v 4, e 3, v 3 is a path. While the walk below v 2, e 7, v 5, e 6, v 4, e 3, v 3, e 2, v 2 is a circuit
8
+ Graph Operation The complement of the simple graph G = (V, E) is the simple graph G = (V, E), where the edges in E are exactly the edges not in G.
9
+ Binary operation between graphs If the graphs G=(V,E) and G’ =(V’,E’)are simple and V’ ⊆ V, then the difference graph is G − G ′ = (V, E’’), where E’’ contains those edges from G that are not in G’ (simple graph).
10
+ Binary operation between graphs (2) Here are some binary operations between two simple graphs G1 = (V1,E1) and G2 = (V2,E2): The union is G1 ∪ G2 =(V1 ∪ V2, E1 ∪ E2)(simple graph). The intersection is G1 ∩ G2 = (V1 ∩ V2, E1 ∩ E2) (simple graph). The ring sum G1 ⊕ G2 is the subgraph of G1 ∪ G2 induced by the edge set E1 ⊕ E2 (simple graph). Note! The set operation ⊕ is the symmetric difference, i.e. E1 ⊕ E2 =(E1 − E2) ∪ (E2 − E1). Since the ring sum is a subgraph induced by an edge set, there are no isolated vertices. All three operations are commutative and associative.
11
+ Example From G1 and G2, define G1 ∪ G2, G1 ∩ G2 and G1 ⊕ G2
12
+ Graph induced by removal vertex If v is a vertex of the graph G = (V, E), then G − v is the subgraph of G induced by the vertex set V − {v}. We call this operation the removal of a vertex.
13
+ Graph induced by removal edge Similarly, if e is an edge of the graph G = (V,E), then G − e is graph (V,E ′ ), where E’ is obtained by removing e from E. This operation is known as removal of an edge.
14
+ References Graph Theory handbook by Keijo Ruohonen. 2013 Slide of Graph mining seminar by Prof. Ehud Gudes. 2013
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.