+ All Categories
Home > Documents > + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ GRAPH Algorithm Dikompilasi dari banyak sumber.

Date post: 17-Jan-2018
Category:
Upload: frederick-hudson
View: 230 times
Download: 0 times
Share this document with a friend
Description:
+ Sumber : big-graph-data
29
+ GRAPH Algorithm Dikompilasi dari banyak sumber
Transcript
Page 1: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+

GRAPH Algorithm

Dikompilasi dari banyak sumber

Page 2: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+GRAPH ???

Node / Vertex / Titik

Edge / busur / Sisi

Page 3: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+Su

mbe

r : w

ww.sl

ides

hare

.net

/slid

arko

/tita

n-th

e-ris

e-of

-big

-gra

ph-d

ata

Page 4: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+

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

Page 5: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+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.

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/

Page 6: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+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/

Page 7: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+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/

Page 8: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+

Sumber: http://blog.octo.com/en/graph-databases-an-overview/

Page 9: + GRAPH Algorithm Dikompilasi dari banyak sumber.

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

Page 10: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+Graphs, Graphs, Everywhere

Aspirin Yeast protein interaction network

from

H. J

eong

et a

l Nat

ure

411,

41

(200

1)

Page 11: + GRAPH Algorithm Dikompilasi dari banyak sumber.
Page 12: + GRAPH Algorithm Dikompilasi dari banyak sumber.

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

Page 13: + GRAPH Algorithm Dikompilasi dari banyak sumber.

Example of Graphs

Page 14: + GRAPH Algorithm Dikompilasi dari banyak sumber.

Example of Graphs

Page 15: + GRAPH Algorithm Dikompilasi dari banyak sumber.

• 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..)

Page 16: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ TerminologyG = (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.

Page 17: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ 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.

Page 18: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ TerminologyA 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.

Page 19: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ Subgraph The graph G1 = (V1, E1) is a subgraph of G2 =

(V2, E2) if 1. V1 ⊆V2 and2. Every edge of G1 is also an edge of G2.

Example. We have the graph G2:

Page 20: + GRAPH Algorithm Dikompilasi dari banyak sumber.

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

Page 21: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ 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

Page 22: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ 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

Page 23: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ 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 !

Page 24: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ 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 ?

Page 25: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ Isomorphisme Two graphs G1(V1, E1) and G2(V2, E2) are

isomorphic if they are topologically identical There is a mapping from V1 to V2 such that

each edge in E1 is mapped to a single edge in E2 and vice-versa

Page 26: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+ Example of Graph Isomorphisme

ƒ(a ) = 1

ƒ(b ) = 6

ƒ(c ) = 8

ƒ(d ) = 3

ƒ(g ) = 5

ƒ(h ) = 2

ƒ(i ) = 4

ƒ(j ) = 7

Page 27: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+Apakah 2 graf ini isomorfis ?

Page 28: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+Solusi : lihat 4-cycle

Kesimpulan : tidak isomorfis !

Page 29: + GRAPH Algorithm Dikompilasi dari banyak sumber.

+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).

Blog Octo (http://blog.octo.com/en/graph-databases-an-overview/)


Recommended