Question

In: Advanced Math

Question in graph theory: 1. Let (a1,a2,a3,...an) be a sequence of integers. Given that the sum...

Question in graph theory:

1. Let (a1,a2,a3,...an) be a sequence of integers.

Given that the sum of all integers = 2(n-1)

Write an algorithm that, starting with a sequence (a1,a2,a3,...an) of positive
integers, either constructs a tree with this degree sequence or concludes that
none is possible.

Solutions

Expert Solution

We know that every finite tees has at least one leaf,that is a vertex v with degree 1.

A tree with n vertices has exactly n-1 edges

For n=1,this is trivial.

let n-1 holds the condition.

Let T be a tree with n vertices ,

Let v be a leaf of T and e be a unique edge containing v.

So graph T' obtained by deleting v and e from T remains connected and has no cycles as T does not have any.

So T' is also a tree.

Now by inductive hypothesis , T' has (n-1)-1=n-2 edges.

since T' contain all edges of T except e

so T has n-1 edges.

for n=2 ,sum is 2(2-1)=2

so a1+a2=2 , this will be for a1=1 and a2=1

so there is a tree with degree sequence of single edge containing two vertices.

now let ,and let a1,a2,...an be sequence of positive integer such that

here we claim that aj=1 for some j.

Else,positive integer ai is greater than 2,so we get

this is a contradiction.

let j=1 so a1=1 .

similarly, ak2 for some 2.

else,

so n=2 ,contradicting

so now let

by induction hypothesis there exists a tree whose degree sequence is the sequence of positive integers

attaching one edge to the vertex with degree a2-1 , we get a tree with degree sequence 1,a2,a3,....,an .

Please give thumbs up,if you like.


Related Solutions

Let a1 ≥ a2, . . . , an be a sequence of positive integers whose...
Let a1 ≥ a2, . . . , an be a sequence of positive integers whose sum is 2n − 2. Prove that there exists a tree T on n vertices whose vertices have degrees a1, a2, . . . , an. Sketch of solution: Prove that there exist i and j such that ai = 1 and aj ≥ 2. Remove ai, subtract 1 from aj and induct on n.
Alternating Series Test. Let (an) be a sequence satisfying (i) a1 ≥ a2 ≥ a3 ≥...
Alternating Series Test. Let (an) be a sequence satisfying (i) a1 ≥ a2 ≥ a3 ≥ · · · ≥ an ≥ an+1 ≥ · · · and (ii) (an) → 0. Show that then the alternating series X∞ n=1 (−1)n+1an converges using the following two different approaches. (a) Show that the sequence (sn) of partial sums, sn = a1 − a2 + a3 − · · · ± an is a Cauchy sequence Alternating Series Test. Let (an) be...
Let A = {a1, a2, a3, . . . , an} be a nonempty set of...
Let A = {a1, a2, a3, . . . , an} be a nonempty set of n distinct natural numbers. Prove that there exists a nonempty subset of A for which the sum of its elements is divisible by n.
covert the schema into 3NF. TableC (a1,a2,a3,a4,a5) functionally dependencies: a1 --> {a2,a3,a5} a4 --> {a1,a2,a3,a5} a3...
covert the schema into 3NF. TableC (a1,a2,a3,a4,a5) functionally dependencies: a1 --> {a2,a3,a5} a4 --> {a1,a2,a3,a5} a3 -->{a5} Answer: Relation1: Relation2:
For each of the following sequences find a functionansuch that the sequence is a1, a2, a3,...
For each of the following sequences find a functionansuch that the sequence is a1, a2, a3, . . .. You're looking for a closed form - in particular, your answer may NOT be a recurrence (it may not involveany otherai). Also, while in general it is acceptable to use a "by cases"/piecewise definition, for this task you must instead present a SINGLE function that works for all cases.(Hint: you may find it helpful to first look at the sequence of...
Let A1, A2 and A3 be events except with respective probabilities 1/6 , 1/5, and 1/4.Let...
Let A1, A2 and A3 be events except with respective probabilities 1/6 , 1/5, and 1/4.Let N be the number of these events that occur. a) Write down a formula for N in terms of indicators. b) Find E(N). In each of the following cases, calculate Var(N): c) A1, A2, A3 are disjoint; d) they are independent; e) A1 is in A2 is in A3.
We say that an infinite sequence a0,a1,a2,a3,… of real numbers has the limit L if for...
We say that an infinite sequence a0,a1,a2,a3,… of real numbers has the limit L if for every strictly positive number ε, there is a natural number n such that all the elements an,an+1,an+2,… are within distance ε of the value L. In this case, we write lim a = L. Express the condition that lim a = L as a formula of predicate logic. Your formula may use typical mathematical functions like + and absolute value and mathematical relations like...
Consider the following algorithm, which takes as input a sequence of ?n integers ?1,?2,…,??a1,a2,…,an and produces...
Consider the following algorithm, which takes as input a sequence of ?n integers ?1,?2,…,??a1,a2,…,an and produces as output a matrix ?={???}M={mij} where ???mij is the minim term in the sequence of integers ??,??+1,…,??ai,ai+1,…,aj for ?≥?j≥i and ???=0mij=0 otherwise. for i := 1 to n for j := 1+1 to n for k:= i+1 to j m[i][j] := min(m[i][j], a[k]) end for end for end for return m a.) Show that this algorithm uses ?(?3)O(n3) comparisons to compute the matrix M....
Sum An a series and |An| cnverges to 0. If the partial sum Sn (A1+A2+...+An) is...
Sum An a series and |An| cnverges to 0. If the partial sum Sn (A1+A2+...+An) is bounded, is the partial sum Sn' of all absolute value of An (|A1|+|A2|+...+|An|) also bounded?
A company uses three different assembly lines – A1, A2, and A3 – to manufacture a...
A company uses three different assembly lines – A1, A2, and A3 – to manufacture a particular component. Of those manufactured by line A1, 5% need rework to remedy a defect, whereas 8% of A2’s components need rework and 10% of A3’s need rework. Suppose that 50% of all components are produced by line A1, 30% are produced by line A2, and 20% come from line A3. (a) Suppose a component is selected at random, what is the probability that...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT