You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: algorithms/msf.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,30 @@
1
1
---
2
-
title: "Minimum Spanning Tree (MST)"
3
-
description: "Minimum Spanning Tree (MST)"
2
+
title: "Minimum Spanning Forest (MSF)"
3
+
description: "Minimum Spanning Forest (MSF)"
4
4
parent: "Algorithms"
5
5
---
6
6
7
-
# Minimum Spanning Tree (MST)
7
+
# Minimum Spanning Forest (MSF)
8
8
9
9
## Overview
10
10
11
-
The Minimum Spanning Tree (MST) finds the relationships with minimum weights such that any weakly connected component in the graph stays connected. It treats all edges as bi-directional and ensures that any pair of nodes that previously shared a path will still share a unique path in the MST subgraph.
11
+
The Minimum Spanning Forest (MSF) finds the relationships with minimum weights such that any weakly connected component in the graph stays connected. It treats all edges as bi-directional and ensures that any pair of nodes that previously shared a path will still share a unique path in the MSF subgraph.
12
12
13
-
MST serves as a common algorithm in scenarios such as:
13
+
MSF serves as a common algorithm in scenarios such as:
14
14
- Designing a cost-effective road network connecting several cities.
15
15
- Power Grid / Utility cost optimization.
16
16
- Identifying redundancies in networks.
17
17
18
18
## Algorithm Details
19
19
20
-
MST first assigns each node to its own component. It iteratively scans for the minimum edges linking nodes across different components and merges them, ignoring the direction of edges throughout the process. The algorithm terminates when no further merges occur, producing a collection of trees.
20
+
MSF first assigns each node to its own component. It iteratively scans for the minimum edges linking nodes across different components and merges them, ignoring the direction of edges throughout the process. The algorithm terminates when no further merges occur, producing a collection of trees.
21
21
22
-
The procedure finds a minimum or maximum weight spanning tree based on the specified `objective` and optimizes for the given `weightAttribute`. If no attribute is given, MST returns any collection of spanning trees. If any specified edges do not have the given weight attribute, or the value of the attribute is non-numeric, then they are treated as if they had infinite weight. Such an edge would only be included in the minimum spanning tree if no other edges with a valid weight attribute bridge the components it connects.
22
+
The procedure finds a minimum or maximum weight spanning forest based on the specified `objective` and optimizes for the given `weightAttribute`. If no attribute is given, MSF returns any collection of spanning trees. If any specified edges do not have the given weight attribute, or the value of the attribute is non-numeric, then they are treated as if they had infinite weight. Such an edge would only be included in the minimum spanning tree if no other edges with a valid weight attribute bridge the components it connects.
23
23
24
24
## Syntax
25
25
26
26
```cypher
27
-
CALL algo.mst([config])
27
+
CALL algo.MSF([config])
28
28
```
29
29
30
30
### Parameters
@@ -43,7 +43,7 @@ The procedure returns a stream of records with the following fields:
|`edge`| Edge | An edge entity which is part of the MST graph |
46
+
|`edge`| Edge | An edge entity which is part of the MSF graph |
47
47
|`weight`| Double | The weight of the Edge |
48
48
49
49
@@ -77,15 +77,15 @@ RETURN *
77
77
78
78
Suppose you are an urban planner tasked with designing a new transportation network for a town. There are several vital buildings that must be connected by this new network. A cost estimator has already provided you with the estimated cost for some of the potential routes between these buildings.
79
79
80
-
Your goal is to connect every major building with the lowest total cost, even if travel between some buildings requires multiple stops and different modes of transport. The Minimum Spanning Tree algorithm helps you achieve this by identifying the most cost-effective network.
80
+
Your goal is to connect every major building with the lowest total cost, even if travel between some buildings requires multiple stops and different modes of transport. The Minimum Spanning Forest algorithm helps you achieve this by identifying the most cost-effective network.
0 commit comments