Code: Select all
FindMincut(undirected graph G)
{
while there are more than 2 nodes in G do
{
pick an edge (u,v) at random in G;
contract the edge, while preserving multi-edges;
remove all loops;
}
output the remaining edges;
}
Code: Select all
\begin{framed}
\begin{verbatim}
FindMincut(undirected graph G)
{
while there are more than 2 nodes in G do
{
pick an edge (u,v) at random in G;
contract the edge, while preserving multi-edges;
remove all loops;
}
output the remaining edges;
}
\end{verbatim}
\end{framed}
Can I make it smaller and more descent looking?
I want the boxes like this given in the PAGE-4 of the following PDF.
Code: Select all
http://www.cs.dartmouth.edu/~ac/Teach/CS105-Winter05/Handouts/05-mincut.pdf