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
-
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...
-
Refer to the data in QS 16-11. 1. How much cash is received from sales to customers for year 2017? 2. What is the net increase or decrease in cash for year 2017? CRUZ, INC. Income Statement For Year...
-
Reconsider Prob. 1021. Irreversibilities in the turbine cause the steam quality at the outlet of the turbine to be 70 percent. Determine the isentropic efficiency of the turbine and the thermal...
-
What are the three components of an Expert System (ES) program? Explain what each component does.
-
Change in Principle, Estimate As a certified public accountant you have been contacted by Joe Davison, CEO of Sports-Pro Athletics, Inc., a manufacturer of a variety of athletic equipment. He has...
-
Papraika Limited ( also known as Papraika Stores ) is the largest non - food retailer in South Africa and is listed on the Johannesburg Stock Exchange ( JSE ) . The company is the leading retailer of...
-
The owner of Neros company has hired you to analyze her company's performance and financial position, as well as the positions of Iits competitors, Centar and Xermix. However, the data Neros abtained...
-
Read the Case From Good to Great to Gone: The Rise and Fall of Circuit City and answer the following question: Discuss the current events relevant to the case contents (e.g., the industry development...
-
How to solve Taxation, types of taxation, how to count tax for ltd and self employed?
-
If the electoral system is replaced with a proportional representation system, what kind of effects will it have on Canadian politics and government?
-
How can a company effectively plan and manage their human resources in the face of rapidly changing technological advancements and disruptions in the industry?
-
1. What do you think of using small area studies based on large Medicare databases to identify outliers like the cardiology treatment in Elyria, Ohio? 2. Contrast the information from such a study...
-
How does Material Resource Planning (MRP) differ from Enterprise Resource Planning (ERP)?
-
Following are extracts from the accounting records of Shellfish Ltd at 30 June 2020: Shellfish Ltd 2019 2020 ($000) ($000) Items from balance sheet as at 30 June 2020 Assets Cash Trade receivables...
-
What is a manufacturing system?
-
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...
-
Calculate the volatility and the current price of oil futures implied by the call 1600 August and the call 1700 August of Figure 19.8 by using the Black-Scholes formula with \(T=.25\). OIL CRUDE OIL...
-
Consider a continuous-time environment, with \(e\) as a variable outside of the market. (a) Suppose the final payoff is \(V\left(x_{e}, T ight)=x_{e}(T)\). Find \(V\left(x_{e}, t ight)\). (b) Find a...
-
Mr. Smith wants to buy a car and is deciding between brands A and B. Car A costs \(\$ 20,000\), and Mr. Smith estimates that at the rate he drives he will sell it after 2 years and buy another of the...
Study smarter with the SolutionInn App