I have a friendship graph as follows
I want to find all the possible group of friends. What is the best algorithm to find these grouping. For example in this graph , possible friendship groups are as follows: 1,2,3,4,12,13,23,123,14,143,124,1234
If I use brute-force algorithm (starting from each vertex and do this 4 times), it generates lots of duplicates.