-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Computing a H-minor #8404
Comments
comment:2
This is awesome to have something like this in Sage. I noticed in the patch a misspelling: "exaclty" -> "exactly". Do you have a reference for the translation of the minor problem into a linear programming problem? Can you put that into the docstring? |
comment:3
No, that's mine. Or at least I did not read it anywhere, as I can not claim no one thought about it before. I recently talked with someone who should have known it if it existed, and who did not. Note that it can be very slow, though, even if there is no alternative that I know of. I will fix the typo in a minute :-) Nathann |
comment:4
Well, congratulations! I think it would be interesting to see a short writeup of it, maybe posted on arxiv.org? Are there any other linear program graph functions that aren't in the literature that you've already incorporated into Sage? It would make an interesting "Survey of using linear programming to solve graph problems". |
comment:5
Not really... The only way for me to use LP is through Sage, so most of what I write ends up as a patch. I recently sent a patch for two variations of graph coloring that interest me #8405. Actually, my recent patches of LP formulations :
All have the same thing in common : there is an easy way that I ignored until very recently to write "acyclicity" without using column generation. It may be a bit slower, but I do not have to write column generation to define them, at least :p Knowing how to say "acyclicity" enables one to say "connectedness". And once you know how to say "connectedness", you can say Minor, Steiner Tree, TSP, etc :-) What would you like to find in such a document ? A list of formulations, plus explanations ? Nathann |
comment:6
Replying to @nathanncohen:
Yes, I think that would be great. It's also a way for your Sage work to get more traditional credit in academics, especially if you are formulating things that aren't in a standard reference and might be less than straightforward. And thirdly, it's a way for people like me, who have a minimal understanding of linear programming, to check your code :). |
comment:7
Nathann: Please do write up the paper Jason suggests. I would also be very interested. |
comment:8
Here it is ! http://www-sop.inria.fr/members/Nathann.Cohen/LP_formulations.pdf Nathann |
comment:10
Replying to @wdjoyner:
Nathann, you seem to be systematically writing LP where it should be ILP, or MILP, right? As well, you need to include meaningful examples: e.g. showing how to use your code to show that some well-known graph (say, Petersen) is not planar by finding a Kuratowski minor. It's not obvious that your code can handle this in reasonable time (I have had my share of using ILP for seemingly small problems, with very limited success). I therefore change the status to "needs work"... (I wish we had anonymous reviewing, like in journals :-)) Dmitrii |
comment:11
Replying to @dimpase:
I'm interested in it. In some of my research in graph parameters (minimum rank of graphs), there are some nice bounds written in terms of the minors of a graph. Even if it only works for graphs up to 20 vertices, it would be interesting to me and others working in this area (minimum rank of graphs) so that we could quickly compute small examples. |
comment:12
Hello !!! Here is a new version of the patch with the examples you requested. I mever tried to make a mystery that this method is slow. It was one on my first comments about this patch. The thing is that there is no alternative that I know of. Minor theory is not what I should work on, but it is an interesting thing and I tried to find practical algorithms to solve it, and failed most of the time. I sent messages to people who claimed to have one and received no answer... And as for every LP algorithm written in Sage, I consider this one as a quick and lazy way to have some feature available, and the function as bound to be rewritten as soon as someone will want to spend time on it. I would like very much to send a patch soon to be able to compute the treewidth of a graph, and even heuristics for it.. I would have to ask this code from a researcher who may be kind enough to share it, but those would still remain very slow algorithms. I can not stand the very idea of a heuristic as a mathematician, but sometimes you just have no other alternative... As for anonymous reviewing, research has still to learn from Free Software that we are working together, not competing, and most of the time just doing the best we can. Nathann |
comment:13
Oh, and I set the test of K5 and K33 minors in Petersen Graph as both optional and long... It takes on my computer something like 4 seconds for K5 and 2 for K33 with Cbc.. With a bit of luck it will be faster soon enough : the next package for Cbc can handle multithreading and Cplex seems ti be giving free licenses to researchers and students. ( #8171 and #8172 are still waiting for review, btw :-) ) Nathann |
comment:14
By the way... I just retried to solve this problem using CPLEX instead of Coin.. Result :
So it seems it is not that bad after all :-) Nathann |
comment:15
Replying to @nathanncohen:
I wonder how does it scale when the number of vertices of G grows. Regarding CPLEX I would not be that optimistic - they did not say whether
|
comment:16
I expect it not to scale ;-) Nathann |
comment:17
Replying to @nathanncohen:
yeah - can you try some 20-25 vertex examples? (by the way, "no K_4-minor" is equivalent to "treewidth at most 2", so you can write |
comment:18
I would be glad to review your patch if you were to write one :-D (Sorry, but I really do not have much time available these days....) Nathann |
comment:19
Replying to @nathanncohen:
nobody has any time :) well, you still should change "Linear Programming" to "(Mixed) Integer Linear Programming", at least
|
comment:20
now with Mixed Integer linear program |
comment:21
Replying to @nathanncohen:
OK, but please also fix
it must be "Programming", not "Program" here. I also notice similar misuses of "Linear Program/Programming" (instead of (M)ILP) on and another tutorial-like thing you wrote Please fix these too some time soon, please... |
comment:22
This patch has been updated to programming. I you feel anything else in Sage needs to be fixed, please create the corresponding ticket and -- if possible -- write a patch for it. You have set this ticket to "positive review". Have you actually tested it, docstring and documentation ? Nathann |
comment:23
Replying to @nathanncohen:
well, I do not know how to patch that writeup on linear programming --- Minh
I applied the patch, to sage-4.3.3 on boxen (so this is a 64-bit intel linux) I do not know how to test documentation, never heard of --- is there a way? Oh, by the way, there is still a fix needed: you should add # optional on the line 1951 of the file, otherwise Please fix this, otherwise I'll have to revert to "needs work" :) PS. I do not seem to be able to find out which MILP solver I am actually using --- is there a way to find this out without uninstalling several optional packages? Dima |
comment:24
The difference being that I am not your student, nor do I have any intention of standing your rudeness and the way you give me orders for very long. I write these patches, even though they require a lot of time, because I think people may be interested in them. If you are not (you had the kindness to mention earlier that it should be thrown away as useless), I do not need you here. This is the last time I edit the patch, I can not afford to update it each time you change your mind about what needs to be done. Nathann |
comment:25
Attachment: trac_8404.patch.gz Replying to @nathanncohen:
Please point me out to a place where I was rude to you. By the way, I am considerably older than you, so please also forgive me slipping
I just want your, and others, patches to be useful to people, this is all. In fact, I am very patient with you. Many would have said "meshugene genz, meshugene grivn", and stopped dealing with you and your patches all together. And this is exactly the point when I wondered aloud whether it would be better
It's not that I change my mind, that is I see a way to improve it. It's normal process of work. I am only human after all. Dima
|
comment:26
Where the conversation moved : http://groups.google.com/group/sage-devel/browse_thread/thread/cd4e971043773fd3 Nathann |
comment:27
With the new (and free) cplex, it takes 120 seconds to prove there is no K5 in a 4x4 grid. Finding a K4 is instantaneous. Nathann |
comment:28
Merged "trac_8404.patch" into 4.4.alpha0. |
Reviewer: Dmitrii Pasechnik |
Author: Nathann Cohen |
Merged: sage-4.4.alpha0 |
This patch is a linear program to compute a H minor of a graph... I hope you will like it ! :-)
We say that a graph
G
has aH
-minor (or that it has a graph isomorphic toH
as a minor), if for allh\in H
, there exist disjoint setsS_h \subseteq V(G)
such that once the vertices of eachS_h
have been merged to create a new graphG'
, this new graph containsH
as a subgraph.For more information of minor theory, see http://en.wikipedia.org/wiki/Minor_(graph_theory)
Nathann
Component: graph theory
Author: Nathann Cohen
Reviewer: Dmitrii Pasechnik
Merged: sage-4.4.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/8404
The text was updated successfully, but these errors were encountered: