11065 - A Gentlemen's Agreement
Moderator: Board moderators
11065 - A Gentlemen's Agreement
Hello,
this is maximum independent set problem, which is NP-complete. So how can it be solved in 15 seconds?
this is maximum independent set problem, which is NP-complete. So how can it be solved in 15 seconds?
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
well, before coding i want to be sure about the process...
pick a non-visited vertex,
1. color it, make its neighbours uncolored and proceed
2. uncolor it and proceed
by uncolor means it is visited but not colored.
and when the rest + colored < best i will cutoff... is there any other things?
pick a non-visited vertex,
1. color it, make its neighbours uncolored and proceed
2. uncolor it and proceed
by uncolor means it is visited but not colored.
and when the rest + colored < best i will cutoff... is there any other things?
Self judging is the best judging!