Skip to content

How to Determine the Structure of the Input Network

Hasan Heydari edited this page Jun 4, 2018 · 1 revision

Determination of the Input Network's Structure

Consider that the input network is modeled by simple undirected graph G= (V, E), where V and E denote the set of nodes and edges respectively. Let |V|:=n (the number of vertices is n) and |E|:=m (the number of edges is m). The vertices of the graph are labeled by {0, 1, ..., n-1} uniquely. For each vertex v with label i, file i.txt is created. In each line of file i.txt, the label of one neighbor of v is written.

An Example

Let the following graph, G= (V, E), be the input graph, where V= {v1, v2, v3, v4} and E= {(v1, v2), (v1, v4), (v2, v3)}. First of all, the vertices are labeled; for example, the label of v1, v2, v3, v4 are 0, 1, 2, and 3 respectively.

exampleinputgraph

Second, a folder with name Input is created. Next, four files with names 0.txt, 1.txt, 2.txt, 3.txt is created in Input.

foldersandfiles

Finally, each file is filled with neighbors labels. In what follows, the contents of the files are shown.

files