الگوریتم یافتن دور اویلری در یک گراف را کسی دارد (فرصت زیادی ندارم)
باتشکر فراوان
الگوریتم یافتن دور اویلری در یک گراف را کسی دارد (فرصت زیادی ندارم)
باتشکر فراوان
type
yalrec=record
color:1..4;
state:0..1;
end;
var
counternode:integer;// count of node in graph
yalarray:array[1..100,1..100] of yalrec; // yal state in graph
Function Oleri : Boolean;
var i,j:integer;
counter:integer;
begin
Result := True;
for i:=1 to counternode do
begin
counter:=0;
for j:=1 to counternode do
if yalarray[i,j].state=1 then inc(counter);
if counter mod 2 =1 then
begin
Result := False;
exit;
end;
end;
end;
آخرین ویرایش به وسیله whitehat : سه شنبه 30 بهمن 1386 در 17:32 عصر