title: weight of node and edges in undirected graph
body: <p>How do we know the weight of a node or edge when we are doing clustering on density basis in a simple undirected  graph. And what's time complexity here!</p>
  
  <p>can you guide me from here:</p>
  
  <ol>
  <li><p>The weight of an edge (u,v) E ∈ is the number of the common neighbors of the nodes u and v. M^2 for u≠v represents the number of common neighbor of the nodes u and v. The timing complexity of matrix multiplication is of the order N^3. However, we need only those elements of M^2 for which M(u,v) =1 . So the complexity of finding weights of the edges can be reduced to O(N*E). </p></li>
  <li><p>The weight of a node is the sum of the weights of the edges connected to the node. The weight of every node is calculated and then the highest weight node is determined. The complexity of finding the weights of the nodes is N^2  . We start at the highest weight node as the cluster and then grow it larger. </p></li>
  </ol>
  
  <p>if you understand it guide me ...</p>