Skip to content

Commit 06e3b0b

Browse files
committed
MST->MSF
1 parent 1142822 commit 06e3b0b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

algorithms/mst.md renamed to algorithms/msf.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
---
2-
title: "Minimum Spanning Tree (MST)"
3-
description: "Minimum Spanning Tree (MST)"
2+
title: "Minimum Spanning Forest (MSF)"
3+
description: "Minimum Spanning Forest (MSF)"
44
parent: "Algorithms"
55
---
66

7-
# Minimum Spanning Tree (MST)
7+
# Minimum Spanning Forest (MSF)
88

99
## Overview
1010

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.
1212

13-
MST serves as a common algorithm in scenarios such as:
13+
MSF serves as a common algorithm in scenarios such as:
1414
- Designing a cost-effective road network connecting several cities.
1515
- Power Grid / Utility cost optimization.
1616
- Identifying redundancies in networks.
1717

1818
## Algorithm Details
1919

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.
2121

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.
2323

2424
## Syntax
2525

2626
```cypher
27-
CALL algo.mst([config])
27+
CALL algo.MSF([config])
2828
```
2929

3030
### Parameters
@@ -43,7 +43,7 @@ The procedure returns a stream of records with the following fields:
4343

4444
| Name | Type | Description |
4545
|----------|--------|-----------------------------------------------|
46-
| `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 |
4747
| `weight` | Double | The weight of the Edge |
4848

4949

@@ -77,15 +77,15 @@ RETURN *
7777

7878
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.
7979

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.
8181

8282
![City Graph](../images/city_plan.png)
8383

8484
```cypher
85-
CALL algo.mst({weightAttribute: 'cost'}) YIELD edge, weight
85+
CALL algo.MSF({weightAttribute: 'cost'}) YIELD edge, weight
8686
```
8787

8888
#### Expected Results
8989
The algorithm would yeild the following edge objects and their weights:
9090

91-
![City MST Graph](../images/city_mst.png)
91+
![City MSF Graph](../images/city_msf.png)
File renamed without changes.

0 commit comments

Comments
 (0)