Η παρουσίαση φορτώνεται. Παρακαλείστε να περιμένετε

Η παρουσίαση φορτώνεται. Παρακαλείστε να περιμένετε

Εισαγωγή στους Γράφους

Παρόμοιες παρουσιάσεις


Παρουσίαση με θέμα: "Εισαγωγή στους Γράφους"— Μεταγράφημα παρουσίασης:

1 Εισαγωγή στους Γράφους
Graph Theory

2 Ιστορικά Οι γέφυρες του Koenigsberg Μία σχηματική αναπαράσταση
Μπορούμε να διασχίσουμε όλες τις γέφυρες ακριβώς μία φορά? (Euler)

3 Αναπαράσταση σε γράφο. Μπορούμε να διασχίσουμε όλες τις γραμμές ακριβώς μία φορά? (eulerian path: 0 or 2 odd degree vertices) (eulerial circuit: 0 odd degree vertices)

4 Ορισμοί G=(N, L), γράφος που αποτελείται από τα σύνολα
N={n1, n2, ...ng}, το σύνολο των g κορυφών ή κόμβων L={l1, l2, ...lL}, το σύνολο των L ακμών ή συνδέσμων lk=(ni, nj), (ni, nj)=(nj, ni), δεν υπάρχουν (ni, ni) (loops) Αν (ni, nj)<>(nj, ni) τότε ο γράφος είναι κατευθυνόμενος (directed) Εάν υπάρχει lk=(ni, nj) τότε τα ni και nj είναι γειτονικά (adjacent) Εάν υπάρχει lk=(ni, nj) η lk είναι προσπίπτουσα (incident) με τα ni και nj Εάν g=1 τότε ο γράφος είναι τετριμμένος (trivial) Εάν L=0 τότε ο γράφος είναι άδειος (empty) Ένας γράφος μπορεί να σχεδιαστεί με πολλούς τρόπους, η θέση είναι άσχετη (isomorphic graphs)

5 2ο Παράδειγμα Κατευθυνόμενος Γράφος Πίνακας Περισσότερη πληροφορία???
Bob Carol Ted Alice --- 1 Κατευθυνόμενος Γράφος Πίνακας Περισσότερη πληροφορία???

6 Ισόμορφοι γράφοι ƒ(a) = 1 ƒ(b) = 6 ƒ(c) = 8 ƒ(d) = 3 ƒ(g) = 5 ƒ(h) = 2
ƒ(i) = 4 ƒ(j) = 7

7 Δυάδες, τριάδες (μη κατευθυνόμενα)
Δυάδα: Ανάμεσα σε δύο κόμβους, είτε θα υπάρχει σύνδεσμος είτε όχι. Πιθανές τριάδες (η 3η είναι «απαγορευμένη» σε πραγματικά δεδομένα (Granovetter) Πιθανές τριάδες (η 3η είναι «απαγορευμένη» σε πραγματικά δεδομένα (Granovetter)

8 Επιπλέον Ορισμοί Παράδειγμα: Γάμοι στη Φλωρεντία (15ος αιώνας)
Βαθμός κορυφής (degree), d(ni), Το πλήθος των γραμμών που προσπίπτουν στον ni Όμοια, το πλήθος των γειτονικών κορυφών της ni (σε απλούς γράφους) Παράδειγμα: Γάμοι στη Φλωρεντία (15ος αιώνας) Μέσος βαθμός: Variance:

9 Πυκνότητα (density)

10 Τοπική Πυκνότητα (ego density)

11 Υπογραφήματα (subgraphs)

12 Κλίκες (clique)

13 Κλίκες υπογραφήματα

14 Walks, trails, paths, cycles
Reachability – connected graphs - components

15 Geodesics, distance, eccentricity, diameter
Eccentricity: maxjd(i, j) Πχ. Η εκκεντρότητα του n2 είναι 2

16 cut points, bridges

17 Node connectivity (=2 στο παράδειγμα)

18 Κύκλοι, δένδρα, δάση

19 Affiliation network (bipartite graph)
Actors = {n1, n2}, Affiliations = {n3, n4, n5} Παράγωγα γραφήματα (δύο για κάθε διμερές γράφημα) !

20 Shortest paths Αλγόριθμος Dijkstra
Let the node at which we are starting be called the initial node. Let the distance of node Y be the distance from th e initial node to Y. Dijkstra's algorithm will assign some initial distance values and will try to improve them step-by-step. Assign to every node a distance value. Set it to zero for our initial node and to infinity for all other nodes. Mark all nodes as unvisited. Set initial node as current. For current node, consider all its unvisited neighbors and calculate their distance (from the initial node). For example, if current node (A) has distance of 6, and an edge connecting it with another node (B) is 2, the distance to B through A will be 6+2=8. If this distance is less than the previously recorded distance (infinity in the beginning, zero for the initial node), overwrite the distance. When we are done considering all neighbors of the current node, mark it as visited. A visited node will not be checked ever again; its distance recorded now is final and minimal. If all nodes have been visited, finish. Otherwise, set the unvisited node with the smallest distance (from the initial node) as the next "current node" and continue from step 3

21 Spanning tree of a graph

22 Παράδειγμα Στο link. The algorithm continuously increases the size of a tree, one edge at a time, starting with a tree consisting of a single vertex, until it spans all vertices. Input: A non-empty connected weighted graph with vertices V and edges E in which the weights are non-negative. Initialize: Vnew = {x}, where x is an arbitrary node (starting point) from V, Enew = {} Repeat until Vnew = V: Choose an edge (u, v) with minimal weight such that u is in Vnew and v is not (if there are multiple edges with the same weight, any of them may be picked) Add v to Vnew, and (u, v) to Enew Output: Vnew and Enew describe a minimal spanning tree

23 Centrality Τοπική (local): Ο βαθμός κάθε κορυφής
Το άθροισμα των γραμμών του πίνακα γειτονικότητας Τοπική με απόσταση Δ: (Το πλήθος των κορυφών που βρίσκονται σε απόσταση Δ από μια κορυφή). Σχετικοποιημένη τοπική: Ο βαθμός κάθε κορυφής προς το μέγιστο πιθανό βαθμό di/(n-1)

24 Παράδειγμα:

25 Ολική (global centrality)
Για κάθε κορυφή v: Το άθροισμα των αποστάσεων από την v προς όλες τις υπόλοιπες κορυφές Απαραίτητος υπολογισμός: ο πίνακας απόστασης όλων των κορυφών Όσο μικρότερη τόσο καλύτερη

26 Betweenness centrality
Κατά πόσο μία κορυφή είναι «ανάμεσα» στις υπόλοιπες κορυφές, δηλαδή βρίσκεται πάνω στα περισσότερα συντομότερα μονοπάτια. (gatekeeper) Structural holes: Υπάρχουν όταν λείπουν γραμμές εκεί όπου θα μπορούσαν να υπάρχουν.

27 Six degrees of separation
Small worlds Small average shortest path Large clustering coefficients Power law the diameter of the network is growing with the logarithm of the number of nodes Bacon number Real Life !! (random graphs <> watts)

28 Οπτικά – 6 degrees of separation

29 Bacon number ! Kevin Bacon Number # of People 1 2333 2 236985 3 747329
1 2333 2 236985 3 747329 4 184725 5 12551 6 1123 7 158 8 19 Total number of linkable actors: Average Kevin Bacon number: 2.977

30 Μοντέλο watts-strogatz

31 Num. Nodes Num. Edges Clustering Coefficient Avg. Length of Shortest Paths Diameter Query Network 989 4846 0.3495 2.52 7 Erdos-Renyi Network 4837 0.0106 2.34 6

32 World trade network

33

34 Enron s

35 Customers who bought this item also bought...

36 Sexual network (high school)

37 biblical names in the same chapter of the New Testament


Κατέβασμα ppt "Εισαγωγή στους Γράφους"

Παρόμοιες παρουσιάσεις


Διαφημίσεις Google