pcalg icon indicating copy to clipboard operation
pcalg copied to clipboard

Incorrect application of rules?

Open basilnsaeed opened this issue 6 years ago • 3 comments

Hi, I don't think the application of the rules on line 183+ is correct. I believe these rules are supposed to be applied until the graph is no longer changing. However, you're considering each edge only once and then never checking it again. Changing another edge later on might make it so that a rule is applicable to an earlier edge you checked, but in your case, the rule is not applied in such a case.

basilnsaeed avatar Oct 14 '18 05:10 basilnsaeed

You may be right. Do you have a patch to fix the code?

keiichishima avatar Oct 15 '18 01:10 keiichishima

I believe a naive way to do it is have an outer (infinite) loop with an inner loop over the edges, where you apply the rules to each edge, and only break from the outer loop when you can loop over all edges without anything changing. I haven't thought of heuristics to try to make this any faster.

basilnsaeed avatar Oct 18 '18 04:10 basilnsaeed

I tried to update the code to follow exactly same as the original paper says. Thank you for the report.

keiichishima avatar Jan 08 '19 08:01 keiichishima