Sentences about the Template algorithm

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Algorithm
Click For Summary

Discussion Overview

The discussion revolves around the Template algorithm for constructing a minimum spanning tree from a connected graph. Participants explore the properties of the algorithm, the nature of secure edges, and the characteristics of the resulting graph structure, including concepts of forests and trees. The conversation includes technical explanations and clarifications regarding the algorithm's implementation and the definitions of certain terms.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants explain that a minimum spanning tree is not unique, especially when edges have equal weights.
  • There is a discussion about the implementation of the Template algorithm, with some suggesting it runs at most |V|-1 times due to the connected nature of the graph.
  • Participants question whether the number of edges in a tree is limited to |V|-1 and discuss the implications for adding secure edges without creating cycles.
  • Clarifications are sought regarding the term "(S, V \setminus S)" and its relation to the edges that respect a set A.
  • Some participants assert that any secure edge connects different components of A and that A represents a minimum spanning forest of trees at all times.
  • There is a query about why G_A is considered a forest and not a connected tree, despite the algorithm's condition.

Areas of Agreement / Disagreement

Participants express varying interpretations of the algorithm's properties and the definitions involved, indicating that multiple competing views remain. The discussion does not reach a consensus on several points, particularly regarding the nature of secure edges and the characteristics of the graph structures involved.

Contextual Notes

Participants highlight the importance of avoiding cycles in the implementation of the algorithm and the implications of edge weights on the uniqueness of the minimum spanning tree. There are unresolved questions about the definitions and properties of intersections and forests in relation to the algorithm.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Wave)

Could you explain me some sentences,that are related to the following algorithm?

Code:
Template algorithm(G)
   A<-∅
   while A isn't a connected tree
           we define an edge (u,v),that is secure for A
           A<-A U {(u,v)} 
   return A

  • Let $G=(V,E)$ be an undirected connected graph with weight function $w:E \to \mathbb{R}$.Let $A \subseteq E$,that is contained in a minimum spanning tree for the graph $G$ and let $(S, V \setminus S)$ any intersection of $G$,that respects $A$.Let,also, $(u,v)$ a light edge,crossing the intersection $(S, V \setminus S)$.Then,the edge $(u,v)$ is secure for $A$.
    $$$$
  • A minimum spanning tree isn't unique.
    $$$$
  • The Template Algorithm is implemented at most $|V|-1$ times.
    $$$$
    Does this sentence maybe stand,because of the fact that $G$ is connected,so $|E|=|V|-1$,and if during the implementation,cycles aren't created,the "while" loop is implemented so many times as the number of edges,so $|V|-1$ times? (Thinking)
    $$$$
  • Let $G_A=(V,A)$.Then, $G_A$ is a forest and each of its connected components , is a tree.

    Why is $G_A$ a forest and not a connected tree,although the condition of the algorithm is:

    Code:
    while A isn't a connected tree

    ? (Thinking)
    $$$$
  • Any secure edge $(u,v)$ for $A$ connects different components of $A$.
 
Last edited:
Technology news on Phys.org
Heya! (Blush)

evinda said:
  • Let $G=(V,E)$ be an undirected connected graph with weight function $w:E \to \mathbb{R}$.Let $A \subseteq E$,that is contained in a minimum spanning tree for the graph $G$ and let $(S, V \setminus S)$ any intersection of $G$,that respects $A$.Let,also, $(u,v)$ a light edge,crossing the intersection $(S, V \setminus S)$.Then,the edge $(u,v)$ is secure for $A$.

What is that: $(S, V \setminus S)$ any intersection of $G$,that respects $A$? :confused:
  • A minimum spanning tree isn't unique.

If you have edges with equal weight, you may be able to choose which one to include in the mimimum spanning tree.
  • The Template Algorithm is implemented at most $|V|-1$ times.
    $$$$
    Does this sentence maybe stand,because of the fact that $G$ is connected,so $|E|=|V|-1$,and if during the implementation,cycles aren't created,the "while" loop is implemented so many times as the number of edges,so $|V|-1$ times? (Thinking)
    $$$$

Not quite. $G$ can have more edges than that.

How many edges can any tree have at most? (Wondering)
That identifies how many times you can add a secure edge.
  • Let $G_A=(V,A)$.Then, $G_A$ is a forest and each of its connected components , is a tree.

    Why is $G_A$ a forest and not a connected tree,although the condition of the algorithm is:

    Code:
    while A isn't a connected tree

    ? (Thinking)
    $$$$

Let's take a look at the following algorithm:
200px-MST_kruskal_en.gif


At which stages is it a forest of trees? (Wondering)

  • Any secure edge $(u,v)$ for $A$ connects different components of $A$.

At any time $A$ represents a minimum spanning forest of trees.
If you remove any edge from $A$, it will split one of its trees into 2 sub trees. (Mmm)
 
I like Serena said:
What is that: $(S, V \setminus S)$ any intersection of $G$,that respects $A$? :confused:

The edge $(u,v) \in E$ crosses the intersection $(S, V \setminus S)$, if one of its vertices is in $S$ and the other one in $V \setminus S$.

View attachment 3169

An intersection $(S, V \setminus S)$ respects a set of edges, if no edge of the set crosses the intersection.

I like Serena said:
If you have edges with equal weight, you may be able to choose which one to include in the mimimum spanning tree.

I understand.. (Yes)
I like Serena said:
Not quite. $G$ can have more edges than that.

How many edges can any tree have at most? (Wondering)
That identifies how many times you can add a secure edge.

$|V|-1$, in order that we don't have cycles.. Or am I wrong? (Thinking)

I like Serena said:
Let's take a look at the following algorithm:At which stages is it a forest of trees? (Wondering)

Nice algorithm! (Mmm) Isn't it a forest of trees at each stage? (Thinking)

I like Serena said:
At any time $A$ represents a minimum spanning forest of trees.
If you remove any edge from $A$, it will split one of its trees into 2 sub trees. (Mmm)

I understand! (Nod)
 

Attachments

  • intersection.png
    intersection.png
    2.7 KB · Views: 112
evinda said:
$|V|-1$, in order that we don't have cycles.. Or am I wrong? (Thinking)

Nice algorithm! (Mmm) Isn't it a forest of trees at each stage? (Thinking)

I understand! (Nod)

Yep, yep, and good! (Happy)
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 22 ·
Replies
22
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K