Don't be dense now

What is the density of the following simple undirected graph ?

Details and Assumptions:

  • The given link is the adjacency matrix representation of the graph.
  • The density of a simple undirected graph having v v vertices and e e edges is 2 e v ( v 1 ) \frac{2e}{v(v-1)} .


The answer is 0.2490.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Ivan Koswara
Dec 12, 2015

The density is defined as 2 e v ( v 1 ) \frac{2e}{v(v-1)} where v , e v,e are the number of vertices and edges respectively. By simply doing a text replacement, we can count that there are 1890 0 s and 610 1 s.

  • 610 1 s means there are 305 edges, so e = 305 e = 305 .
  • 1890 0 s and 610 1 s mean 2500 numbers in total. Since this is exactly the number of entries of a square matrix (the adjacency matrix is always square), the matrix is 50 × 50 50 \times 50 . Thus, there are 50 vertices in total, or v = 50 v = 50 .

Plugging the values in gives the answer immediately, 61 245 0.2489 \frac{61}{245} \approx 0.2489 .

This is not even a graph theory problem, just a string problem.

This is not even a graph theory problem, just a string problem.

True, but it helps some beginners.

Agnishom Chattopadhyay - 5 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...