Re: CLP(FD) Prolog: help needed with a simple problem
From: Markus Triska (triska_at_gmx.at)
Date: 03/21/05
- Previous message: Stephen Harris: "Re: Minsky still posting"
- In reply to: Chema: "CLP(FD) Prolog: help needed with a simple problem"
- Next in thread: Chema: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Reply: Chema: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 21 Mar 2005 02:51:37 +0000
Chema wrote:
> I've to solve a simple problem: given a Graph, find out its
> spanning tree. I can do it in Prolog, but I've no idea in CLP.
> Any suggestion is welcome (I don't want code, just an idea).
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.
All the best,
Markus.
- Previous message: Stephen Harris: "Re: Minsky still posting"
- In reply to: Chema: "CLP(FD) Prolog: help needed with a simple problem"
- Next in thread: Chema: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Reply: Chema: "Re: CLP(FD) Prolog: help needed with a simple problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|