How to find the longest path on a chart? I thought I could use a depth search, but I could not find an easier implementation for it?
Like a brainjam , in the comments this is a complete NP. it is only polynomial if the graph is acyclic. if his DAG is even linear. check out wikipage again for more information.
try using topological sorting for a directed graph. it is specifically designed for task planning ...
http://en.wikipedia.org/wiki/Topological_sorting
DAG G = (V, E), .
node s t.
, opt(I)= max(opt(j)+1) j (j, I) E.
opt(I)= max(opt(j)+1)
j
opt (s) = 0 -inf s t ( s, t " t).
, DAG (Directed Acyclic Graph).
, DAG, -1, Bellman Ford, (!) , .
/ node 1/( //),
Source: https://habr.com/ru/post/1738767/More articles:Using db4o with multiple application instances under medium trust - .netWWW :: Perl login mechanism only after restart - perlОбновление источника данных с помощью набора данных - sqlCreating JMS Queues at Run Time - designGet GWT radio value in servlet - javamapping from one to many inside the same table in sleep mode - javaUnable to get max_post_size php variable value on lunar pages - phpMVC pattern in Java Swing? - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1738771/using-powershell-class-to-invoke-a-namespaceclassmethod-style-command&usg=ALkJrhj4ND0t7T78T54GOyaFlAsHhTi6CwDoes jQuery reference to (this) not work? - jqueryAll Articles