Erickde's blog

By Erickde, history, 5 years ago, In English

I was solving a problem to find all cliques in a Graph. I know a a clique would have a diameter of size 2. After checking this I was wondering if there is any algorithm to get all subgraphs with diameter 3. Or at least to find any subgraph with diameter 3.

Any help please.

  • Vote: I like it
  • -25
  • Vote: I do not like it

»
5 years ago, hide # |
 
Vote: I like it +13 Vote: I do not like it

You have received more than enough help in the responses to your previous blogs. There is no handholdy tutorial/"resource" for this, and it is unlikely that anyone is going to write you code for it. I told you to look at all subgraphs, and check which ones have diameter 3. CodingKnight told you how to find all subgraphs.

If you need more help, I think you should learn about recursion and brute force. There are many tutorials online; you don't need anyone here to refer you to one, it's much better to be able to find relevant information yourself.