Presentation is loading. Please wait.

Presentation is loading. Please wait.

+ GRAPH Algorithm Dikompilasi dari banyak sumber.

Similar presentations


Presentation on theme: "+ GRAPH Algorithm Dikompilasi dari banyak sumber."— Presentation transcript:

1 + GRAPH Algorithm Dikompilasi dari banyak sumber

2 + GRAPH ??? Node / Vertex / Titik Edge / busur / Sisi

3 + Sumber : www.slideshare.net/slidarko/titan-the-rise-of- big-graph-data

4 +

5 + GRAPH DATABASE Is a database whose specific purpose is the storage of graph-oriented data structures. Thus it’s all about storing data as vertices and edges. By definition, a graph database is any storage solution where connected elements are linked together without using an index.definition In the database ecosystem, graph database could address: process highly connected data easily manage complex and flexible data models offer exceptional performances for local reads, by traversing the graph Sumber: http://blog.octo.com/en/graph-databases-an-overview/

6 + Graph vs relational databases A graph database is a good fit for exploring data that are structured like a graph (or derived such as a tree), in particular when the relationships between items are significant. The ideal use case for a query, is starting from one or several nodes and traversing the graph. Despite their names though, relational databases are less suited for exploring relationships. Such use cases need indices, in particular foreign keys. As stated before, with graph databases traversals are performed by following physical pointers, whereas foreign keys are logical pointers. Sumber: http://blog.octo.com/en/graph-databases-an-overview/

7 + Example Graph vs Relational To make it clearer, let’s take a naïve example where we try to store companies, people who work for them, and for how long they have been working there. For instance, we are trying to find all people working at Google. With a relational model, we could execute the following query, which would probably need 3 index lookups corresponding to the foreign keys in the model. In the case of a graph, the query will need 1 index lookup, then will traverse relationships by dereferencing physical pointers directly. Sumber: http://blog.octo.com/en/graph-databases-an-overview/

8 +

9 + Classification of graph processing tools (source: Marko Rodriguez)

10 + Graphs, Graphs, Everywhere Aspirin Yeast protein interaction network from H. Jeong et al Nature 411, 41 (2001)

11

12 Conceptually, a graph is formed by vertices and edges connecting the vertices. Formally, a graph is a pair of sets (V,E), where V is the set of vertices and E is the set of edges, formed by pairs of vertices. Definition of Graphs

13 Example of Graphs

14

15 The two vertices u and v are end vertices of the edge (u, v). Edges that have the same end vertices are parallel. An edge of the form(v,v)is a loop. A graph is simple if it has no parallel edges or loops. A graph with no edges (i.e. E is empty) is empty. A graph with no vertices (i.e. V and E are empty) is a null graph. A graph with only one vertex is trivial. Edges are adjacent if they share a common end vertex. Two vertices u and v are adjacent if they are connected by an edge, in other words, (u, v) is an edge. The degree of the vertex v, written as d(v),is the number of edges with v as an end vertex. By convention, we count a loop twice and parallel edges contribute separately. A pendant vertex is a vertex whose degree is 1. An edge that has a pendant vertex as an end vertex is a pendant edge. An isolated vertex is a vertex whose degree is 0. Definition of Graphs (cont..)

16 + Terminology G = (V, E) The minimum degree of the vertices in a graph G is denoted δ (G) (= 0 if there is an isolated vertex in G). Similarly, we write ∆(G) as the maximum degree of vertices in G. Example. (Continuing from the previous example) δ (G) = 0 and ∆(G) = 5.

17 + Theorema Since every edge has two end vertices, we get Theorem1.1.The graph G=(V,E), where V ={v1,...,vn} and E={e1,...,em}, satisfies Corollary. Every graph has an even number of vertices of odd degree.

18 + Terminology A simple graph that contains every possible edge between all the vertices is called a complete graph. A complete graph with n vertices is denoted as Kn. The first four complete graphs are given as examples: Coba perhatikan pola graf dari K1 s.d K5, apa kesimpulan yg bisa diambil ? pada graf komplit, degree setiap titik adalah n-1.

19 + Subgraph The graph G1 = (V1, E1) is a subgraph of G2 = (V2, E2) if 1. V1 ⊆ V2 and 2. Every edge of G1 is also an edge of G2. Example. We have the graph G2:

20 + Subgraph (cont..) From G2, we can have many subgraph such as:

21 + Subgraph by edge induction The subgraph of G = (V, E) induced by the edge set E1 ⊆ E is: G1 = (V1, E1) =def. E1, where V1 consists of every end vertex of the edges in E1. Example. (Continuing from above) From the original graph G, the edges e2, e3 and e5 induce the subgraph

22 + Subgraph by vertex induction The subgraph of G = (V, E) induced by the vertex set V1 ⊆ V is: G1 = (V1, E1) =def. V1, Where E1 consists of every edge between the vertices in V1. Example. (Continuing from above) From the original graph G, the vertices v1, v3 and v5 induce the subgraph

23 + Subgraph by vertex and edgeinduction From graph G2 below, make subgraph G1 which is : induced by v1, v2 and v4 ! Induced by e2, e4 and e6 ! Induced by v1,v3 and e4 !

24 + Clique of G A complete subgraph of G is called a clique of G. Example G: How many cliques with 4 vertices and 3 vertices from the graph G above ?

25 + Isomorphisme Two graphs G 1 (V 1, E 1 ) and G 2 (V 2, E 2 ) are isomorphic if they are topologically identical There is a mapping from V 1 to V 2 such that each edge in E 1 is mapped to a single edge in E 2 and vice-versa

26 + Example of Graph Isomorphisme

27 + Apakah 2 graf ini isomorfis ?

28 + Solusi : lihat 4-cycle Kesimpulan : tidak isomorfis !

29 + References Graph Theory handbook by Keijo Ruohonen. 2013 Slide Graph mining seminar by Prof. Ehud Gudes. 2013 Slide TITAN THE RISE OF BIG GRAPH DATA by Marko Rodriguez and Matthias Broecheler (www.slideshare.net/slidarko/titan-the-rise-of-big-graph- data).www.slideshare.net/slidarko/titan-the-rise-of-big-graph- data Blog Octo (http://blog.octo.com/en/graph-databases-an- overview/)


Download ppt "+ GRAPH Algorithm Dikompilasi dari banyak sumber."

Similar presentations


Ads by Google