Click here to Skip to main content
15,889,096 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionLoop Pin
MoustafaS21-Apr-07 9:21
MoustafaS21-Apr-07 9:21 
GeneralRe: Loop Pin
MoustafaS21-Apr-07 10:27
MoustafaS21-Apr-07 10:27 
AnswerRe: Loop Pin
Frank Kerrigan2-May-07 5:45
Frank Kerrigan2-May-07 5:45 
QuestionImage Recognition Algorithm Pin
softwaremonkey19-Apr-07 5:42
softwaremonkey19-Apr-07 5:42 
AnswerRe: Image Recognition Algorithm Pin
Luc Pattyn19-Apr-07 6:24
sitebuilderLuc Pattyn19-Apr-07 6:24 
AnswerRe: Image Recognition Algorithm Pin
Nathan Addy19-Apr-07 7:14
Nathan Addy19-Apr-07 7:14 
AnswerRe: Image Recognition Algorithm [modified] Pin
Rilhas19-May-07 9:43
Rilhas19-May-07 9:43 
Questionhelp genetic algo Pin
clemzug15-Apr-07 1:12
clemzug15-Apr-07 1:12 
I need help to implement the genetic algorithm to find the minimum spanning tree of a graph.(if possible in Matlab)

I have the program to generate different random spanning trees but to implement into the initial population.???Confused | :confused: Confused | :confused:

program to generate random spanning tree:

% To make random spanning tree from the adjacency matrix of a graph<br />
% Where A is the adjacency matrix<br />
<br />
<br />
n = length(A);<br />
Ta = sparse(n,n);<br />
comps = [1:n];<br />
<br />
for its = 1:(n-1),<br />
[ii,jj,vv] = find(A);<br />
r = ceil(rand(1)*length(ii));<br />
Ta(ii(r),jj(r)) = 1;<br />
comp = comps(jj(r));<br />
comps(comps == comps(ii(r))) = comp;<br />
nodes = find(comps == comp);<br />
<br />
for n = nodes;<br />
nds = find(A(n,nodes));<br />
A(n,nodes(nds)) = 0;<br />
end<br />
<br />
% A(nodes,nodes) = 0;<br />
end<br />
Ta = Ta + Ta';


an other problem is that the above program give an edge list not a adjacency list so to implement the initial population is not really easy.

If somebody can help me Cry | :((

clem
AnswerRe: help genetic algo Pin
cp987615-Apr-07 2:31
cp987615-Apr-07 2:31 
GeneralRe: help genetic algo Pin
clemzug15-Apr-07 2:44
clemzug15-Apr-07 2:44 
GeneralRe: help genetic algo Pin
cp987615-Apr-07 16:01
cp987615-Apr-07 16:01 
GeneralRe: help genetic algo Pin
Tim Craig15-Apr-07 18:08
Tim Craig15-Apr-07 18:08 
QuestionAnswer for this algorithm Pin
MoustafaS13-Apr-07 4:24
MoustafaS13-Apr-07 4:24 
AnswerRe: Answer for this algorithm Pin
CPallini13-Apr-07 4:37
mveCPallini13-Apr-07 4:37 
GeneralRe: Answer for this algorithm Pin
MoustafaS13-Apr-07 4:40
MoustafaS13-Apr-07 4:40 
AnswerRe: Answer for this algorithm [modified] Pin
Leslie Sanford13-Apr-07 4:46
Leslie Sanford13-Apr-07 4:46 
AnswerRe: Answer for this algorithm Pin
cp987613-Apr-07 4:47
cp987613-Apr-07 4:47 
GeneralRe: Answer for this algorithm Pin
MoustafaS13-Apr-07 4:51
MoustafaS13-Apr-07 4:51 
GeneralRe: Answer for this algorithm Pin
cp987613-Apr-07 4:59
cp987613-Apr-07 4:59 
GeneralRe: Answer for this algorithm Pin
MoustafaS13-Apr-07 5:02
MoustafaS13-Apr-07 5:02 
QuestionSkip List Indexing Pin
Leslie Sanford12-Apr-07 5:55
Leslie Sanford12-Apr-07 5:55 
AnswerRe: Skip List Indexing Pin
Luc Pattyn12-Apr-07 9:30
sitebuilderLuc Pattyn12-Apr-07 9:30 
GeneralRe: Skip List Indexing Pin
Leslie Sanford12-Apr-07 10:44
Leslie Sanford12-Apr-07 10:44 
QuestionThe Perfect Circle Pin
Bassam Abdul-Baki10-Apr-07 4:15
professionalBassam Abdul-Baki10-Apr-07 4:15 
AnswerRe: The Perfect Circle Pin
Paddy Boyd12-Apr-07 2:57
Paddy Boyd12-Apr-07 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.