• 沒有找到結果。

Spanning Trees and Optimization Problems (Excerpt)-Chapter 1 Counting Spanning Trees

N/A
N/A
Protected

Academic year: 2021

Share "Spanning Trees and Optimization Problems (Excerpt)-Chapter 1 Counting Spanning Trees"

Copied!
7
0
0

加載中.... (立即查看全文)

全文

(1)

Bang Ye Wu and Kun-Mao Chao

Spanning Trees and

Optimization Problems

(Excerpt)

CRC PRESS

(2)
(3)

Chapter 1

Counting Spanning Trees

A spanning tree for a graph G is a subgraph of G that is a tree and contains all the vertices of G.

How many trees are there spanning all the vertices in Figure 1.1?



 

FIGURE 1.1: A four-vertex complete graph K4.

Figure 1.2 gives all 16 spanning trees of the four-vertex complete graph in Figure 1.1.

DEFINITION 1.1 A Pr¨ufer sequence of length n − 2, for n ≥ 2, is any sequence of integers between 1 and n, with repetitions allowed.

LEMMA 1.1

There are nn−2 Pr¨ufer sequences of length n − 2.

Example 1.1

The set of Pr¨ufer sequences of length 2 is {(1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (2, 4), (3, 1), (3, 2), (3, 3), (3, 4), (4, 1), (4, 2), (4, 3), (4, 4)}. In total, there are 44−2= 16 Pr¨ufer sequences of length 2.

Algorithm: Pr¨ufer Encoding

Input: A labeled tree with vertices labeled by 1, 2, 3, . . . , n. Output: A Pr¨ufer sequence.

Repeat n − 2 times

(4)

2 Spanning Trees and Optimization Problems (Excerpt)                                                                                                                         

FIGURE 1.2: All 16 spanning trees of K4.

v ← the leaf with the lowest label

Put the label of v’s unique neighbor in the output sequence. Remove v from the tree.

Now consider a more complicated tree in Figure 1.3. What is its corre-sponding Pr¨ufer sequence?

Figure 1.4 illustrates the encoding process step by step. Algorithm: Pr¨ufer Decoding

Input: A Pr¨ufer sequence P = (p1, p2, . . . , pn−2).

Output: A labeled tree with vertices labeled by 1, 2, 3, . . . , n. P ← the input Pr¨ufer sequence

(5)

Counting Spanning Trees 3       

FIGURE 1.3: An eight-vertex spanning tree.

                                                           

FIGURE 1.4: Generating a Pr¨ufer sequence from a spanning tree.

V ← {1, 2, . . . , n}

Start with n isolated vertices labeled 1, 2, . . . , n. for i = 1 to n − 2 do

(6)

4 Spanning Trees and Optimization Problems (Excerpt) Connect vertex v to vertex pi

Remove v from the set V

Remove the element pi from the sequence P

/* Now P = (pi+1, pi+2, . . . , pn−2) */

Connect the vertices corresponding to the two numbers in V .

Figure 1.5 illustrates the decoding process step by step.

                                                                                                                                

(7)

Counting Spanning Trees 5 THEOREM 1.1

The number of spanning trees in Kn is nn−2.

Let G − e denote the graph obtained by removing edge e from G. Let G\e denote the resulting graph after contracting e in G. In other words, G\e is the graph obtained by deleting e, and merging its ends. Let τ (G) denote the number of spanning trees of G. The following recursive formula computes the number of spanning trees in a graph.

THEOREM 1.2

數據

FIGURE 1.1: A four-vertex complete graph K 4 .
FIGURE 1.2: All 16 spanning trees of K 4 .
FIGURE 1.3: An eight-vertex spanning tree.
Figure 1.5 illustrates the decoding process step by step.

參考文獻

相關文件

These are quite light states with masses in the 10 GeV to 20 GeV range and they have very small Yukawa couplings (implying that higgs to higgs pair chain decays are probable)..

Ayurvedic medicine aims to keep each individual’s bo dy in a health y ba lanc e accord in g to its uniqu e combina ti on of doshas... It is also a money -making business where th

Contribute to the global LMS community and inform about the challenges and opportunities for executing computer- based assessment using the LMS platform in Hong Kong secondary

Lecture by baluteshih Credit by zolution... Minimum

Given an undirected graph with nonnegative edge lengths and nonnegative vertex weights, the routing requirement of a pair of vertices is assumed to be the product of their weights.

Both problems are special cases of the optimum communication spanning tree problem, and are reduced to the minimum routing cost spanning tree (MRCT) prob- lem when all the

Large data: if solving linear systems is needed, use iterative (e.g., CG) instead of direct methods Feature correlation: methods working on some variables at a time (e.g.,

Given a graph and a set of p sources, the problem of finding the minimum routing cost spanning tree (MRCT) is NP-hard for any constant p > 1 [9].. When p = 1, i.e., there is only