Assume that all the graphs in the fol- lowing problems are simple, with no self-loops or...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Assume that all the graphs in the fol- lowing problems are simple, with no self-loops or multiple edges (in the same direction) between any two vertices. (a) Show that the total number of edges for a connected undirected graph with n vertices is bounded between n - 1 and (2), i.e., n-1≤m≤ (2) (b) Show that the total number of edges for a strongly connected directed graph with n vertices is bounded between n and n(n-1). (Hint: If we remove the directions, n - 1 suffices. Why having n - 1 edges isn't sufficient to ensure strong connectivity in a directed graph?) (c) Given a graph with n vertices and edge set E as the input, write the pseudocode of algorithms that achieve the following tasks: i. Assuming E is the adjacency linked list of undirected edges, given a vertex s, return the list of vertices that are reachable from s. This is called the connected component of s. ii. Let's refer to the function from the previous part as Connected Comp. Now, write an algo- rithm that returns the set of edges required to make your graph connected. The algorithm should also minimize the number of edges returned, and its time complexity should be O(m +n). Assume that all the graphs in the fol- lowing problems are simple, with no self-loops or multiple edges (in the same direction) between any two vertices. (a) Show that the total number of edges for a connected undirected graph with n vertices is bounded between n - 1 and (2), i.e., n-1≤m≤ (2) (b) Show that the total number of edges for a strongly connected directed graph with n vertices is bounded between n and n(n-1). (Hint: If we remove the directions, n - 1 suffices. Why having n - 1 edges isn't sufficient to ensure strong connectivity in a directed graph?) (c) Given a graph with n vertices and edge set E as the input, write the pseudocode of algorithms that achieve the following tasks: i. Assuming E is the adjacency linked list of undirected edges, given a vertex s, return the list of vertices that are reachable from s. This is called the connected component of s. ii. Let's refer to the function from the previous part as Connected Comp. Now, write an algo- rithm that returns the set of edges required to make your graph connected. The algorithm should also minimize the number of edges returned, and its time complexity should be O(m +n).
Expert Answer:
Answer rating: 100% (QA)
a i For a connected undirected graph with n vertices the minimum numb... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Our company - Public Eye Corp. - is an early-stage company providing real-time access to satellite images. Our clients include government entities and private firms. Demand for our services has been...
-
An appropriate structure for large-scale distributed systems is as multiple, independently administered, firewall-protected, domains. Examples are a national health service, a national police service...
-
The information listed below refers to the employees of Lemonica Company for the year ended December 31, 2016. The wages are separated into the quarters in which they were paid to the individual...
-
Review Organicos financial statements presented in the chapter for the month ended March 31, 2017. Review the balance sheet and determine the business form Hailey Walker has chosen to organize her...
-
Show that the polar equation of the circle with center (c, a) and radius a is r2 + c2 - 2rc cos( - ) = a2.
-
The J. S. Bach Foundation is a non-profit charitable institution dedicated to providing musical education to children in elementary schools. There is a provision in the document that created the...
-
Determine which of the following are rational numbers: 1. \(\sqrt{73}\) 2. 4.556 3. \(3 \frac{1}{5}\) 4. \(\frac{41}{17}\) 5. \(5 . \overline{64}\)
-
Solich Sandwich Shop had the following long-term asset balances as of December 31, 2015: Solich purchased all the assets at the beginning of 2013 (3 years ago). The building is depreciated over a...
-
Chem-Lite Inc. maintains its accounts on the basis of a fiscalyear ending March 31. At March 31, 20X1, the Equipment account inthe general ledger appeared as shown below. The company usesstraight-l 2...
-
Prime Corporation acquired 80 percent of Steak Companys voting shares on January 1, 20X4, for $280,000 in cash and marketable securities. At that date, the noncontrolling interest had a fair value of...
-
What is attachment? Why is it important? How does it happen? (Be specific here.)
-
How can the audit program be used to summarize audit work performed?
-
What kind of background in data processing do you think an internal auditor should have?
-
In many cases the objectives of management and the computer specialist vary. Explain.
-
What are the different ways a deposition summary may be prepared?
-
How should insignificant deficiencies be reported?
-
Let { N ( t ) , t > = 0 } be a non - homogeneous Poisson process with intensity function \ lambda ( t ) = { 2 + t , if 0 < = t < = 2 , 4 , otherwise. ( a ) Compute P { N ( 3 ) = 7 | N ( 1 ) = 5 } . (...
-
Define a traverse in Surveying?
-
During 2016, Jake Gore worked for two different employers. Until May, he worked for Wonderman Construction Company in Kansas City, Kansas, and earned $21,500. The state unemployment rate for...
-
Gabrielle Hunter, a waitress at the Hole-in-the-Wall restaurant, worked 42 hours this week and collected over $500 in tips. The restaurant uses the full tip credit against the minimum wage and pays...
-
The taxable wages and withheld taxes for Stafford Company (EIN 00-0001462), semiweekly depositor, for the first quarter of 2016 follow. a. Complete Schedule B of Form 941 for the first quarter for...
-
Your European subsidiary has cash and accounts receivable of 100 and 300 euros respectively, and accounts payable and short-term debt of 100 and 200 euros respectively. US headquarters re-measures...
-
In 2006, five retired software developers opened an auto dealership in Redmond, Washington, which they named WinTechMotors. The company specializes in "high-end" sports and luxury autos, and has one...
-
The time value of money Consider the following cash flows from today (year zero) to year 3 in pounds sterling: Your interest rate (or discount rate) in pounds is 10 percent. a Compute the net present...
Study smarter with the SolutionInn App