Note that there are some explanatory texts on larger screens.

plurals
  1. POTransposing on a Directed Graph
    primarykey
    data
    text
    <p>I've been assigned the following problem, but am having issues figuring it out. I know what I'd like to accomplish, but given the skeleton code he's outlined for us, I'm not sure where to start...I drew a pic to illustrate what I'd like to accomplish (I think...)</p> <p><a href="http://i802.photobucket.com/albums/yy304/Growler2009/Transposing-1.jpg" rel="nofollow">http://i802.photobucket.com/albums/yy304/Growler2009/Transposing-1.jpg</a></p> <p><strong>This is what I need to do:</strong></p> <p>Consider a directed graph G(V;A). The transpose of G written GT (V;AT ) is nothing more than G where all the arcs have been transposed, i.e., the origin of the arc becomes the end and the end becomes the origin. In a sense, GT is the \backward" version of G. For this question you must implement an algorithm which, given a directed graph, produces its transpose. The API of the algorithm is given by the following interface: </p> <pre><code>public interface Transpose&lt;VT,AT&gt; { public DIGraph&lt;VT,AT&gt; doIt(DIGraph&lt;VT,AT&gt; src); } </code></pre> <p>Implement the transpose algorithm given above. You have no restrictions on how to do this (except that it must operate on a graph represented as an adjacency list and it cannot modify the original graph. Report (in the comments) the space and time complexities in big O notation and brie y justify. (i.e., how long does it take and how much space does it uses to transpose a graph with n vertices and m arcs).</p> <p>Any help you can offer to get me started would be great.</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload