/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} 12 E The k鈭捖犅燬PANNING TREE proble... [FREE SOLUTION] | 91影视

91影视

The kSPANNING TREE problem is the following.Input: An undirected graph G=(V,E) Output: A spanning tree of G in which each node has degree k, if such a tree exists.Show that for any k2:

  1. k SPANNING TREE is a search problem.
  2. k SPANNING TREE is NP-complete. (Hint: Start with k=2 and consider the relation between this problem and RUDRATA PATH.)

Short Answer

Expert verified

1.k SPANNING TREE is a search problem for any k2.

2.kSPANNING TREE is NP-complete.

Step by step solution

01

Explain Spanning tree

Consider that the spanning tree is a subset of a Graph G that covers all of the vertices with the fewest number of edges feasible. It can be deduced from this definition that every linked and undirected Graph Gcontains at least one spanning tree

02

To prove that k−  SPANNING TREE is a search problem

Consider the given input and output with k2.

Here, it is important to demonstrate that given a solution S to the spanning tree problem that can be checked in polynomial time whether it is in fact a k-spanning tree. This comments to verifying that every node in the original graph is used in S such that S have no cycle because it is a tree.

Every node in the tree has a maximum degree k . All of these can be checked efficiently and therefore the k spanning tree is a search problem.

Therefore, it can be concluded that for k2, the kspanning tree is a search problem.

03

To prove that k -SPANNING TREE is NP-Complete problem

Any of a class of computer problems for which no efficient solution algorithm has been developed is known as an NP-complete issue.From part (a) it is known that the kspanning tree is in NP.

In the Rudrata path algorithm, assume G is an unweighted undirected graph. Add weights equal to 1 on every edge of G while executing the Rudrata path algorithm with k=2 .It is observed that a tree that has each vertex with a degree at most 2 is a path. Hence, there is no path without loops that reaches all the vertices so there will be no Rudrata path.

Therefore, it can be concluded that the Rudrata path is reduced to a kspanning tree along with the fact that the kspanning tree is in NP.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with 91影视!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

There are many variants of Rudrata鈥檚 problem, depending on whether the graph is undirected or directed, and whether a cycle or path is sought. Reduce the DIRECTED RUDRATA PATH problem to each of the following.(a)The (undirected) RUDRATA PATH problem.(b) The undirected RUDRATA PATH problem, which is just like RUDRATA PATH except that the endpoints of the path are specified in the input.

The tramp steamer problem. You are the owner of a steamship that can apply between a group of port cities V . You make money at each port: a visit to city i earns you a profit of pi dollars. Meanwhile, the transportation cost from port i to port j is cij>0 .You want to find a cyclic route in which the ratio of profit to cost is maximized.

To this end, consider a directed graph G=(V,E) whose nodes are ports, and which has edges between each pair of ports. For any cycle C in this graph, the profit-to-cost ratio is

role="math" localid="1658920675878" r(c)=i,jicPiji,jicCij

Let r' be the maximum ratio achievable by a simple cycle. One way to determine r' is by binary search: by first guessing some ratio r , and then testing whether it is too large or too small. Consider any positive r>0 . Give each edge (i,j) a weight of wij=rcij-pj .

  1. Show that if there is a cycle of negative weight, then .
  2. Show that if all cycles in the graph have strictly positive weight, then r<r*.
  3. Give an efficient algorithm that takes as input a desired accuracy >0 and returns a simple cycle c for which r(C)3r*- Justify the correctness of your algorithm and analyze its running time in terms of |V|, and R=max(i,j)iE(PJCIJ) .

Mean and median. One of the most basic tasks in statistics is to summarize a set of observations x1,x2,,xnR by a single number. Two popular choices for this summary statistic are:

鈥 The median, which we鈥檒l call1

鈥 The mean, which we鈥檒l call2

(a) Show that the median is the value of that minimizes the function

i|xi-|

You can assume for simplicity that is odd. (Hint: Show that for any , the function decreases if you move either slightly to the left or slightly to the right.)

(b) Show that the mean is the value of that minimizes the function

i(xi-)2

One way to do this is by calculus. Another method is to prove that for any R,

i(xi-)2=i(xi-2)2+n(-2)2

Notice how the function for 2 penalizes points that are far from much more heavily than the function for 1 . Thus 2 tries much harder to be close to all the observations. This might sound like a good thing at some level, but it is statistically undesirable because just a few outliers can severely throw off the estimate of 2 . It is therefore sometimes said that 1 is a more robust estimator than 2 . Worse than either of them, however, is , the value of that minimizes the function

maxi|xi-|

(c) Show that can be computed in O(n) time (assuming the numbers are xismall enough that basic arithmetic operations on them take unit time).

Question: An Eulerian tourin an undirected graph is a cycle that is allowed to pass through each vertex multiple times, but must use each edge exactly once.

This simple concept was used by Euler in to solve the famous Konigsberg bridge problem, which launched the field of graph theory. The city of Konigsberg (now called Kaliningrad, in western Russia) is the meeting point of two rivers with a small island in the middle. There are seven bridges across the rivers, and a popular recreational question of the time was to determine whether it is possible to perform a tour in which each bridge is crossed exactly once. Euler formulated the relevant information as a graph with four nodes (denoting land masses) and seven edges (denoting bridges), as shown here.

Notice an unusual feature of this problem: multiple edges between certain pairs of nodes.

(a) Show that an undirected graph has an Eulerian tour if and only if all its vertices have even degree. Conclude that there is no Eulerian tour of the Konigsberg bridges.

(b) An Eulerian pathis a path which uses each edge exactly once. Can you give a similar if-and-only-if characterization of which undirected graphs have Eulerian paths?

(c) Can you give an analog of part (a) for directedgraphs?

Consider the following game. A 鈥渄ealer鈥 produces a sequence s1sn of 鈥渃ards,鈥 face up, where each card si has a value vi. Then two players take turns picking a card from the sequence, but can only pick the first or the last card of the (remaining) sequence. The goal is to collect cards of largest total value. (For example, you can think of the cards as bills of different denominations.) Assume n is even. (a) Show a sequence of cards such that it is not optimal for the first player to start by picking up the available card of larger value. That is, the natural greedy strategy is suboptimal. (b) Give an O(n2) algorithm to compute an optimal strategy for the first player. Given the initial sequence, your algorithm should precompute in O(n2) time some information, and then the first player should be able to make each move optimally in O(1) time by looking up the precomputed information.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.