From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: HELP URGENT! greedy algorithm
Date: Sun, 20 Mar 2011 18:33:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 8
Message-ID: <im5h90$avv$>
References: <im4csk$9p9$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1300645984 11263 (20 Mar 2011 18:33:04 GMT)
NNTP-Posting-Date: Sun, 20 Mar 2011 18:33:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:716989

"R. S." wrote in message <im4csk$9p9$>...
> I have a symmetrical nxn matrix and I am deleting an edge each time. Except before I delete the edge, i have to make sure the matrix is still connected and acyclic. How else would I put this in MATLAB?
> thanks :)
- - - - - - - - - -
  I assume by 'connected' and 'acyclic' you are referring to the associated graph of the matrix.  If I understand this concept correctly, a 'tree' is both connected and acyclic.  By removing any of its edges, you are certain to make it disconnected.  If you add any edge you are certain to make it no longer acyclic.  Therefore I don't understand what you are trying to do when you use the word 'still' in "make sure the matrix is still connected and acyclic".  Can you please explain what you mean?

Roger Stafford