1 / 17

Network & Topology Modeling

Network & Topology Modeling. Example of Relevant Networks. Sensor Networks. The Internet. Social Networks. Graph Theory. Begun in 1735 Bridges of Konigsberg (today’s Kaliningrad ): walk all 7 bridges without crossing a bridge twice. A. 6. B 6. 2. 1. L A. 5. D. C. B 1. B 2.

tarad
Télécharger la présentation

Network & Topology Modeling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network & Topology Modeling

  2. Example of Relevant Networks Sensor Networks The Internet Social Networks

  3. Graph Theory • Begun in 1735 • Bridges of Konigsberg (today’s Kaliningrad): walk all 7 bridges without crossing a bridge twice A 6 B6 2 1 LA 5 D C B1 B2 LC 4 3 B3 LD B4 B5 7 B Solved by: parity of nodes B7 LB 3 Edges 5 Edges 3 Edges 3 Edges

  4. Network Modeling using Graph Theory • Networks can be represented by graphs • Router/Switch nodes modeled as vertices • Communication links modeled as edges Vertices Edges

  5. Basic Concepts/Definitions Graph – A Graph is defined as a set of: • V= Nodes (vertices) • E= Edges(links, arcs) between pairs of nodes • Denoted by G = (V, E). • Graph Size Parameters: • Order of G: number of vertices, n = |V|, • Size of G: number of edges, m = |E|. • The running time of algorithms are usually measured in terms of the order and size of a graph

  6. Directed Graph An edge e  E of a directed graph is represented as an ordered pair (u,v), where • u, v  V • uis the initial vertex • vis the terminal vertex. • u ≠ v 2 3 1 4 V = { 1, 2, 3, 4}, |V | = 4 E = {(1,2), (2,3), (2,4), (4,1), (4,2)}, |E | = 5

  7. Undirected Graph An edge e  E of an undirected graph is represented as an unordered pair (u,v) = (v,u),where u, v  V, u ≠ v 2 3 1 4 V = { 1, 2, 3, 4}, |V | = 4 E = {(1,2), (2,3), (2,4), (4,1)}, |E|=4

  8. Degree of a Vertex Degree of a vertex in an undirected graph is the number of edges incident on it. In a directed graph, the out degreeof a vertex is the number of edges leaving it and the in degreeis the number of edges entering it. 2 2 3 3 1 1 4 4 The indegreeof vertex 2 is 2 and the out degreeof vertex 3 is 0 The degree of vertex 2 is 3

  9. Adjacent/Neighbor Nodes If edgee={u,v} ∈ E, u and v areadjacentor neighbors 2 3 1 4 (1,2), (2,3), (2,4), (4,1) are all Adjacent/Neighbor Nodes

  10. Weighted Graph A weighted graphis a graph for which each edge has an associated weight 2 2 2 1 5 4 6 3 3 1 1 2 9 8 3 4 4

  11. Walks and Paths • A walk is an sequence of nodes (v1, v2,..., vL) such that {(v1, v2), (v2, v3),..., (vL-1, vL)} E, e.g. (V2, V3,V6, V5,V3) • A simplepath is a walk with no repeated nodes, e.g. (V1, V4,V5, V2,V3) • A cycle is a walk (v1, v2,..., vL) where v1=vL with no other nodes repeated and L>3, e.g. (V1, V2,V5, V4,V1) • A graph is called cyclic if it contains a cycle; otherwise it is called acyclic 3 V2 V3 1 2 3 V1 1 V6 4 4 V5 V4 1

  12. Complete Graphs A complete graph is an undirected/directed graph in which every pair of vertices is adjacent. A A B B C C D 4 nodes and (4 3)/2 edges V nodes andV(V-1)/2 edges 3 nodes and 3 2 edges V nodes and V(V-1) edges

  13. Connected Graphs • An undirected graph is connected if you can get from any node to any other by following a sequence of edges OR any two nodes are connected by a path • A directed graph is strongly connected if there is a directed path from any node to any other node • A graph is sparse if | E |  | V| • A graph is dense if | E |  | V |2 B C A E F D A B C D

  14. Bipartite Graph A bipartite graphis an undirected graphG = (V,E) in which V can be partitioned into 2 sets V1 and V2 such that (u,v) EimpliesuV1 and vV2or vice versa V1 V2 v11 v21 v12 v22 v13 v23 v14

  15. Graph Representation: Adjacency Matrix Adjacency Matrixnn matrix with Auv = 1 if (u, v) is an edge • Symmetric matrix for undirectedgraphs (not for directed graphs) • Space: proportional to n2. • Not efficient for sparse graphs • Algorithms might have longer running time if this representation used • Checking if (u, v) is an edge consumes O(1) time. • Identifying all edges consumes O(n2) time.

  16. Graph Representation: Adjacency List Adjacency List Node indexed array of lists • Two representations of each edge • Space proportional to m + n • Checking if (u, v) is an edge consumes O(deg(u)) time • Identifying all edges takes O(m+n) time • Requires O(m+n) space. Good for dealing with sparse graphs

  17. Graph Representation Adjacency Matrix Adjacency List

More Related