Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

algorithm for depending Elements

Name: Someawe 2006-11-06 14:27

I just plainly hate algorithm that should be perfect, but the perfect solutions I come up with sre memory or runtime hungry like doom3 or even worse.
So this time it's about Elements that have dependencies like Linux Packages. So e.g 9 depends on 3 and 6, 3 depends on 6 and 1, etc. Now that I got those conditions I have to find out ALL possible orders in which I could install those Packages. I know that e.g. aptitude solves dependencies, but the packages where only an example.
So is there an perfect algorithm for this Problem and if not I'm sure this Problem has a name in theoretic  computer science.
Please /prog/ be my hero.

Name: Anonymous 2006-11-10 11:00

>>11
He means his dependency graph looks like this:     b
    / \
   /   \
  /     \
 a       d
  \     /
   \   /
    \ /
     c
Where all arrows are pointing to the left (which I wouldn't need to say if there were an easy way of drawing arrow heads in ascii).

So it's not technically a tree. But I can't see why that should be a problem.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List