KoreanBoy's blog

By KoreanBoy, 13 years ago, In English

*

  • Vote: I like it
  • +3
  • Vote: I do not like it

| Write comment?
13 years ago, # |
  Vote: I like it 0 Vote: I do not like it
M pairs of people?
What does it mean? Are they friends if they are in pair?

What is group of friends?
if A and B are friends, B and C are friends too, is group {A,B,C} group of friends or not?
  • 13 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Unless you answer these questions noone can make test set
13 years ago, # |
  Vote: I like it 0 Vote: I do not like it
As I understood you just need an undirected graph.
This code generates a random test (n = 25000, m = 100000)with at least 3 groups.
http://pastebin.com/hnzCEuhg
This code also generates a random one(n = 25000, m = 300000), but there will be only one group of friends with high probability.
http://pastebin.com/rt3qnV7W