4.2.5.2. Other declarations

In this section: chuffed_minimal_spanning_tree.

chuffed_minimal_spanning_tree

predicate chuffed_minimal_spanning_tree(int: N,
                                        int: E,
                                        array [int] of int: from,
                                        array [int] of int: to,
                                        array [int] of int: w,
                                        array [int] of var bool: vs,
                                        array [int] of var bool: es,
                                        var int: K)

Constrains the subgraph vs and es of a given directed graph to be a minimal spanning tree with weight K.

Parameters:

  • N: the number of nodes in the given graph
  • E: the number of edges in the given graph
  • from: the leaving node 1..N for each edge
  • to: the entering node 1..N for each edge
  • w: the weight of each edge
  • vs: a Boolean for each node whether it is in the subgraph
  • es: a Boolean for each edge whether it is in the subgraph
  • K: the cost of the edges in the minimal spanning tree