## Minimum spanning tree formulation

Can any expert explain the reasoning behind the constraint in the following formulation of the minimum spanning tree?

To formulate the minimum-cost spanning tree (MST) problem as an LP, we associate a variable $$x_e$$ with every edge $$e \in E$$. Each spanning tree $$T$$ corresponds to its incidence vector $$x^T$$, which is defined by $$x^T_e = 1$$ if $$T$$ contains $$e$$ and $$x^T_e = 0$$ otherwise. Let $$\Pi$$ denote the set of all partitions of the vertex set $$V$$, and suppose that $$\pi \in \Pi$$. The rank $$r(\pi)$$ of $$\pi$$ is the number of parts of $$\pi$$. Let $$E_\pi$$ denote the set of edges whose ends lie in different parts of $$\pi$$. Consider the following LP: \begin{align*} \min &\sum_{e \in E} c_ex_e \ \text{s.t. } &\sum_{e \in E_\pi} x_e \geq r(\pi) – 1 \quad \forall \pi \in \Pi, \ & x \geq 0. \ \end{align*}

## Minimum Spanning Tree Turing Machine and Complexity

How do I construct a single-tape deterministic Turing Machine for Minimum spanning tree and how would I analyze it? I’m practicing for an exam and would appreciate details.

## Is there an example of when DFS will not return the min. spanning tree?

If we have a connected, weighted, undirected graph. Can anyone provide an example where DFS will not return the MST? No matter what vertex we start from ?

## Number of spanning trees in undirected simple graph

What is the number of spanning trees in an undirected simple graph?

My attempt:

Let $$m$$ be the number of edges in a simple graph, and let $$n$$ be the number of vertices.

Then number of spanning trees is $$\binom{m}{n-1}$$ minus the number of cycles of length $$n-1$$.

I read on Wikipedia that the number of spanning trees in the complete graph $$K_n$$ is $$n^{n-2}$$.

According to the formula I stated above, it should be $$\binom{n(n-1)/2}{n-1} – \binom{n}{n-1} (n-1)!$$.

How do I show that this is equal to $$n^{n-2}$$ for $$K_n$$?

## Extracting a spanning tree from a directed acyclic graph with minimum total distance between terminal nodes

I have a directed acyclic graph that has uniform edge weights. I would like to extract from this graph a spanning tree (an arborescence) with the property that the total distance between all pairs of leaf nodes (the sum of combined distances from each pair’s nearest common ancestor) is minimized.

What I’m ultimately trying to accomplish is to find the best way of ordering the leaf nodes in such a way that the most closely related nodes are closest to each other in the list. If I can find the spanning tree as described, I can easily order the leaf nodes in the way I need.

Can anyone point me to a solution to this problem other than just brute force optimization?

## campaigns spanning long time [on hold]

In my experience, campaigns often span a relative short amount of time, and i’d like to change this.

On one side, this is because downtime is often hard to play and justify and make meaningful: you’re an adventurer, why would you wait in a town for days when there’s adventure to be had? Travel around and find the new adventure if none is at hand!

Long voyages (when they happen) seem to be the only exception for time passing, (though often these are turned into interesting, sequences of brief events) it is hard to justify an adventure having to span months, or even years. Also, often these long voyages (3week +) change setting, which makes it hard for past actions to influence the future, which is what i’d like to achieve by having campaign that span longer in time.

What are plausible ways to add “span” to a campaign, so that it is plausible for the party to want to wait some months in a place (or in a set of places)?

These plausible ways would be sped-up at the table, the goal would be to have the world move on for months, while the table has not.

## Number of Spanning Trees

We are given a graph G with N(numbered 1 to N) nodes and M edges.

Let’s create a big graph B with NK nodes (numbered 1 through NK) and MK edges. B consists of K copies of G ― formally, for each k (0≤k≤K−1) and each edge between nodes u and v in G, there is an edge between nodes u+kN and v+kN in B.

We take the complement of the graph B and name it H.

The task is to calculate the number of spanning trees in H.

Note : The maximum number of nodes in graph G is 20. The maximum value of K is 10^8. The graph G doesn’t have any self-loops or multiple-edges.

My approach : When the value of K is less than 40, I am being able to apply Kirchoff’s Matrix Tree theorem with a complexity of O(N^3)(Gaussian elimination gives us a O(n^3) algorithm to compute determinants). However,my solution doesn’t scale for very large graphs which are formed for high values of K. I am figuring I should be able to derive a formula to calculate the number of spanning trees because of the repeated copies of small graph G. But because of my limited mathematical knowledge, I am not being able to converge to a formula.

Any help would be greatly appreciated.

## How do I design an efficient and easy layout for a settings page which has at least 200+ options spanning 18+ categories

The web app I am now working on as a pilot project for my learning has a very complex settings page. It has 18-20 main categories and tweaks about 200 configurations within these categories. There are 2 access levels, one is a manager and another is owner. Owner can see all changes, but doesn’t necessarily have to configure all of them. Manager can see only select tweaking options and has to configure things by himself.

Right now I am using a vertical tabbed approach. How can I improve it further?

Here’s the screenshot for reference

https://pasteboard.co/IroZI2x.png

## Finding minimum spanning tree of a special form graph

I’m trying to find an efficient algorithm that will find me the minimum spanning tree of an undirected, weighted graph of this particular form:

My idea was a recursive solution: Suppose the algorithm recieve the graph with n as a parameter,

if n==2 then:     take the lower cost path between vo-->v1-->v2 and v0-->v2 if n==1 then:     take the lower cost path between v0-->v2-->v1 (if v2 exists) and v0-->v1 else:     - recursivly call the algorithm for n-1     - take the lower cost edge between v0-->vn and v(n-1)-->vn 

I’m really not sure wheather this algorithm is correct, i was trying to prove this by induction and got a bit stuck at the base, which got me thinking maybe the algorithm is flawed.

Any suggestions would be much appreciated.

## Finding minimum spanning tree with O(|V|)

Given an undirected weighted graph $G(V,E)$ , where the number of edges is $|V|+10$ , how can I find the minimum spanning tree of $G$ in $O(|V|)$ ?

Kruskal’s algorithm is out of the question, since sorting alone is $O(|V|\log |V|)$ , so I thought maybe using Prim’s algorithm with minimum binary heap, but still – every iteration will cost $\log |V|$ for updating vertices keys in the heap, so altogether it’s $|V|\log |V|$ .
I know that the key here is to use the fact that $|E|=|V|+10$ , so I start thinking maybe removing the 11 edges with the biggest weights, as long as the graph stays connected, but that’s obviously a bad idea since it’ll – again – require sorting.
I just can’t figure it out. Any help would be greatly appreciated.