-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not seem to find a sub-optimal solution to the DIMACS graphs #2
Comments
Can you please describe the issue further? What DIMACS instances are you referring to? Have you tried increasing the number of iterations? |
Most of them. It does not find the clique elements, although it finds the right size? And yes i used 1000 iterations as well for brock200_1,for example |
I just tried the code on a few instances and there is no difference between the clique size found and the number of vertices in the output. Can you post your output? I used the instances from this page |
That is so odd? Okay i will post a screenshot soon. May i ask how many generations you have used? |
Yes I ran it using my code. I used 100 generations. Can you try running the code on the instances on the page I just posted? |
I ran the code on brock200_1 and I find the following results (both the clique size and the number of vertices in the output are 21). Is this not what you are seeing? Generating Population... 94:21 95:21 96:21 97:21 98:21 99:21 Vertices in the Clique: 104 83 175 138 120 180 46 26 100 107 103 32 199 144 122 4 132 41 48 137 191 |
When i run the same graph as you I get : Vertices in the Clique: BUT the clique elements in this graph are: |
From above you will see that it finds the clique size but does not seem to find the correct clique elements. Another issue is when i run certain graphs like sanr400_0.5 it gives me the following error: |
This is a randomized algorithm, so it might find other cliques (if they exist). I'll look into the out of range error. |
I have been looking at hueristic algortithms that solve MCP and some of the algorithms either find the max clique or a sub-optimal of the max clique (meaning some elements are contained in the max clique). The same goes for evolutionary algorithms. So for the graph brock200_1, the biggest clique is 21, however, when run with a deterministic algorithm i only find one clique that has a size of 21? My apologies but I still dont see how any of the cliques reported by this evolutionary algorithm are a sub-optimal? Please help me understand |
I understand its a randomized algorithm, but i dont find any other cliques of size 21 with a deterministic algorithm such as Cliquer by Patrick Oestergard |
I wrote a small piece of code to check the clique in the brock200_1 graph. The clique that you have mentioned has edges missing. For instance there is no edge from 133 to 177 or from 177 to 133. The cliques that my code finds are all valid. Am I doing something wrong? |
Woah, I see that. Thats weird because i am using the instaces from here: http://archive.dimacs.rutgers.edu/pub/challenge/graph/benchmarks/clique/ |
okay I think I understand now. The following clique is what I find using your code: 4 32 104 138 107 120 48 144 103 175 122 180 46 83 199 100 132 26 41 137 191 . And youre saying that the max clique mentioned in the text file for brock200_1 is not the only clique of size 21? |
so essentially the clique: 4 32 104 138 107 120 48 144 103 175 122 180 46 83 199 100 132 26 41 137 191, is a clique in brock200_1? |
Yes that is a clique (unless I am making some mistake). |
Okay, lets hope you're not making some mistake haha. Thank you for your help! Please let me know when you fix the other error. |
The number of nodes removed during mutation was more than the number of nodes in the clique. I changed the number of nodes removed to 1 and now it seems to work fine. Thanks for looking into this! :) |
One more question, is there a psuedo code avaible for your algorithm? |
Here is a brief outline of the algorithm. Let me know if you have any questions. Generate random population such that all cliques are valid For specified number of generations: Save the global best clique Perform 2-opt local improvement on the global best individual Randomly choose two cliques and do intersection crossover on them such that the output is a valid clique Perform 2-opt local improvement on the offspring Perform mutation on the offspring (only if the offspring clique size is less than or equal to one of the parents) (In each of these steps, once the step has completed, make the clique valid and maximal using vertices in decreasing order of the degree) |
Thanks for this! I was looking for a more formal one, thought maybe your research paper would contain this? Can you please explain in a little more detail how the crossover is calculated? |
The code computes the intersection crossover (see method intersectionCrossover in the C++ code): First compute the intersection of the two cliques and compute another clique from this intersection such that it is a valid clique (if the intersection is empty, compute greedyCrossover which adds vertices in decreasing order of the degrees) After the intersection, try to add vertices to this clique in decreasing order of the degrees such that the clique is maximal I have included comments in the code which should help you understand the algorithm if you need to go into more detail. You can start with the main method that is the entry point of the code. Let me know if you have more questions! |
No description provided.
The text was updated successfully, but these errors were encountered: