1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Salsk061 [2.6K]
2 years ago
15

et G = (V, E) be a directed graph in which each vertex in u E V is labeled with a unique integer L(u) from the set {1, 2 ...,V]}

. For each vertex u E V, let R(u) = {v E V: una v} be the set of vertices that are reachable from u (a node can always reach itself by default). Let min(u) be the vertex in R(u) with the minimum label, i.e. min(u) is vertex v such that L(v) is the smallest among all other nodes in R(u). Describe an O(V + E) time algorithm that computes min(u) for all vertices u € V,
Engineering
1 answer:
Bess [88]2 years ago
3 0

Using knowledge in DFS algorithms it is possible to write code that can organize the vertices and create functions that understand the order of factors.

<h3>Writting in DFS algorithm </h3>

<em>dfs(node)</em>

<em>{</em>

<em>mark node as visited</em>

<em>//initialize ans for this node to label of this node</em>

<em>ans=label[node]</em>

<em>for every neigbor of node</em>

<em>{</em>

<em>if the neighbor is visited</em>

<em>{</em>

<em>ans=minimum(ans,calculated[neighbor])</em>

<em>}</em>

<em>else if the neighbor is unvisited</em>

<em>{</em>

<em>call dfs(neighbor)</em>

<em>ans=minimum(ans,calculated[neighbor])</em>

<em>}</em>

<em />

<em>}</em>

<em>calculated[node]=ans</em>

<em>}</em>

<em>{</em>

<em>if the node is not visted{</em>

<em>call dfs(node)</em>

<em>}</em>

<em>}</em>

<em>for the given example graph we get minimum label for vertices as:</em>

<em>1 1 1 3 3 6 (in order for a,b,c,d,e,f), so the vertex with this label are c,c,c,e,e,f.</em>

See more about DFS algorithm at brainly.com/question/13014003

#SPJ1

You might be interested in
All of these are true about GMA (MIG) welding EXCEPT that:
Hatshy [7]

Answer:

the welding gun liner regulates the shielding gas.

Explanation:

The purpose of the welding gun liner is to properly position the welding wire from the wire feeder till it gets to the nozzle or contact tip of the gun. <em>Regulation of the shielding gas depends on factors such as the speed, current, and type of gas being used. </em>In gas metal arc welding, an electric arc is used to generate heat which melts both the electrode and the workpiece or base metal.

The electric arc produced is shielded from contamination by the shielding gas. The heat generated by the short electric arc is low.

3 0
3 years ago
What are the different types of documents used to communicate engineering designs?
Ipatiy [6.2K]

Answer:

COMMON ENGINEERING DOCUMENTS

Inspection or trip reports.

Research, laboratory, and field reports.

Specifications.

Proposals.

Progress reports.

ect...

Explanation:

7 0
3 years ago
PLZZ HELP
9966 [12]

Answer:

Could ask a family member to help

Explanation:

5 0
3 years ago
Read 2 more answers
Design a VHDL module
Aloiza [94]

Answer:

how we gonna do dat

Explanation:

5 0
3 years ago
Why do you think the Combination Square is better to use than the tape
Tatiana [17]

Answer:

The correct answer to the following question will be "Because the head acts as a stop".

Explanation:

  • Since the head serves as either a stopping (especially in comparison to something like a floppy tape clip or hanger), the combination square seems to be more reliable and accurate than those of the tape measure.
  • And maybe you'll know that certain style outlines are still square to something like the sides or finishes.

So that the above seems to be the right answer.

8 0
3 years ago
Other questions:
  • The boiler pressure is 38bar and the condenser pressure 0.032 bar.The saturated steam is superheated to 420 oC before entering t
    8·1 answer
  • A motor vehicle has a mass of 1.8 tonnes and its wheelbase is 3 m. The centre of gravity of the vehicle is situated in the centr
    14·1 answer
  • A budding electronics hobbyist wants to make a simple 1.0-nF capacitor for tuning her crystal radio, using two sheets of aluminu
    10·1 answer
  • Air expands through an ideal turbine from 1 MPa, 900 K to 0.1 MPa, 500K. The inlet velocity is small compared to the exit veloci
    10·1 answer
  • Name the important trees of tropical monsoon forest​
    11·1 answer
  • In the designation of wrought Al alloys, eg. 3m, what does the first digit-3- refer to? A. The main alloying element B. Carbon p
    15·1 answer
  • In a flow over a flat plate, the Stanton number is 0.005: What is the approximate friction factor for this flow a)- 0.01 b)- 0.0
    8·1 answer
  • An undeformed specimen of some alloy has an average grain diameter of 0.050 mm. You are asked to reduce its average grain diamet
    11·1 answer
  • (100 POINTS) {BRIANLIEST} PLEASE HELP ME
    5·1 answer
  • 8th grade safety test
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!