Re: CLP(FD) Prolog: help needed with a simple problem

From: Chema (sipser_at_hotmail.it)
Date: 03/25/05


Date: Fri, 25 Mar 2005 14:09:21 GMT


> One way would be to introduce a variable X_e in 0..1 for each edge e
> (denoting whether it is to be an element of the ST), state that the sum
> over all these variables must equal |V| - 1, and add additional
> constraints to prevent cycles.

Thank you for your replay and suggestion.
The problem is just to find this constraints.
Using this kind of integer programming, I only know if edge X is
in the spanning tree (1) or not (0), but I have not realized yet
a way for knowing from which node to wich node edge X goes.
Right now, I've used a kind of incidence matrix, then I've
imposed that for each node u, uv in edge, sum x_uv = 1 (exactly
one edge have to enter in a node, except root), but that doesn't
prevent cycles.

Chema



Relevant Pages

  • Re: circular relationships ok?
    ... So you DO allow constraints that are cyclical. ... Concept graph visualizes what the database will manage and nothing else. ... if A reference B then we draw an upward arrow from A to B. ... may have any structure including cycles. ...
    (comp.databases.theory)
  • Re: lb and ub constraints in lsqcurvefit
    ... to be able to use large scale solvers. ... My objective function is a sum of squares ... Those are linear constraints on the parameters; ... with each a mean and a variance, and I want those peaks to ...
    (comp.soft-sys.matlab)
  • Re: CLP(FD) Prolog: help needed with a simple problem
    ... Chema wrote: ... >> constraints to prevent cycles. ... > The problem is just to find this constraints. ... > Right now, I've used a kind of incidence matrix, then I've ...
    (comp.lang.prolog)
  • Re: circular relationships ok?
    ... So you DO allow constraints that are cyclical. ... Concept graph visualizes what the database will manage and nothing else. ... if A reference B then we draw an upward arrow from A to B. ... may have any structure including cycles. ...
    (comp.databases.theory)
  • Re: The Language I want
    ... GC (provided at the library level instead) ... only be instantiated to types that obey certain constraints. ... the function Sum finds the sum of the elements of a ... If E is a type implementing the Number type class and Cis a type ...
    (comp.lang.misc)