Re: CLP(FD) Prolog: help needed with a simple problem
From: Chema (sipser_at_hotmail.it)
Date: 03/25/05
- Next message: Markus Triska: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Previous message: tmp123: "Re: List manipulation problem"
- In reply to: Markus Triska: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Next in thread: Markus Triska: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Reply: Markus Triska: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Reply: Bart Demoen: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Markus Triska: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Previous message: tmp123: "Re: List manipulation problem"
- In reply to: Markus Triska: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Next in thread: Markus Triska: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Reply: Markus Triska: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Reply: Bart Demoen: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|