#### Topic: Search of loops in dependences

There is a sequence of entities - A, B, a C, D, E, F..... Any essence can comprise the link to any other of this sequence, except itself. Mandatory there is an essence which does not depend from any another. A question two 1) whether How to find is loops in dependences? That is to eliminate cases when In depends from With, With depends from D and And, and D depends from F and B? 2) How to sort this sequence by a principle of dependences? That is the first should stand what on anybody what depend only on the first and so on do not depend, further? However, on the second at me the decision was invented. To enter number for each essence - coefficient of dependences. At what on anybody do not depend - it is equal to zero, and at what - from it is equal (a maximum of coefficient of children + 1). And by this number and to sort. This approach will work? There are no reefs? And here on the first something of anything optimal was not invented, except a heap of searches.