search
Log In
1 vote
139 views
Given an undirected weighted graph $G = (V, E)$ with non-negative edge weights, we can compute a minimum cost spanning tree $T = (V, E')$. We can also compute, for a given source vertex $s \epsilon V$ , the shortest paths from s to every other vertex in $V$. We now increase the weight of every edge in the graph by 1. Are the following true or false, regardless of the structure of $G$? Give a mathematically sound argument if you claim the statement is true or a counterexample if the statement is false.

$T$ is still a minimum cost spanning tree of $G$.
in Algorithms
edited by
139 views

1 Answer

0 votes
for statement 2:let there are three vertices and three edges(ABC) and cost of each is AB=1,BC=2,CA=3.

now from A TO C IS COST 3.    IF WE INCREASE THE COST BY 1 OF EACH EDGE THEN AB=2,BC=3,CA=4

NOW FROM A TO C IS 5.

SO SHORTEST PATH CHANGES

=>II IS FALSE.

FOR 1:

THE QUESTION DOES NOT SAY ANYTHING ABOUT THE WEIGHT OF ST THAT IS WHEATHER IT IS DISTINCT OR SAME.

HOWEVER THIS STATEMENT IS TRUE .

SO STMT 1 IS TRUE

Related questions

5 votes
1 answer
1
502 views
Given an undirected weighted graph $G = (V, E)$ with non-negative edge weights, we can compute a minimum cost spanning tree $T = (V, E')$. We can also compute, for a given source vertex $s \epsilon V$ , the shortest paths from s to every other ... you claim the statement is true or a counterexample if the statement is false. All the shortest paths from $s$ to the other vertices are unchanged.
asked May 27, 2016 in Algorithms jothee 502 views
11 votes
4 answers
2
762 views
Let $A$ be an array of $n$ integers, sorted so that $A[1] \leq A[2] \leq \dots A[n]$. Suppose you are given a number $x$ and you wish to find out if there exist indices $k$ and $l$ such that $A[k]+A[l] = x$. Design an $O(n)$ algorithm for this problem.
asked May 27, 2016 in Algorithms jothee 762 views
1 vote
0 answers
3
585 views
A certain string-processing language offers a primitive operation which splits a string into two pieces. Since this operation involves copying the original string, it takes $n$ units of time for a string of length $n$, regardless of the location of the cut. Suppose, now, that you ... $m + 1$ pieces. You may assume that all m locations are in the interior of the string so each split is non-trivial.
asked May 23, 2016 in Algorithms jothee 585 views
5 votes
1 answer
4
474 views
Let $A$ be an array of $n$ integers, sorted, so that $A[1] \leq A[2] \leq \dots A[n]$. Suppose you are given a number $x$ and you wish to find out if there are indices $k$ and $l$ such that $A[k]+A[l] = x$. Design an $O(n \log n)$ time algorithm for this problem.
asked May 23, 2016 in Algorithms jothee 474 views
...