A number of art museums around the countts, have been featuring work by an artist named mark lombardi (1951-2000), consisting of a set of intricately rendered graphs. building on a great deal of research, these graphs encode the relationships among people involved in major political scandals over the past several decades: the nodes correspond to partici- pants, and each edge indicates some type of relationship between a pair of participants. and so, if you peer c!osely enough at the drawings, you can trace out ominous-looking paths from a high-ranking u.s. govern- ment official, to a former business partner, to a bank in switzerland, to a shadowy arms dealer.

Respuesta :

Answer:

The answer is This should be possible in O(m+n) with BFS.  

Explanation:

Give us a chance to take your chart G.  Complete a BFS on the diagram.  Check every one of the hubs in the diagrams as visited as normal with BFS.  Rather than adding only hubs to the line in the DFS include hubs in addition to number of incoming ways.  On the off chance that a hub that has been visited ought to be included disregard it.  On the off chance that you discover a hub again which is as of now present in your line don't include it once more, rather include the checks together.  Proliferate the depends on the line while including new hubs  when you experience the last hub i.e the goal hub the number that is put away with it is the quantity of briefest ways in the diagram.

ACCESS MORE
EDU ACCESS