This is brilliant, but 1) I think it should be `inv(-D+eye(size(D,1))`, no?  2) If so, in the presence of cycles, the resulting matrix won't be invertible (interpretation: each member of a cycle would have an infinite number of depending packages).

I think that what we really want is something like `sum([zerodiag(D^i) for i=1:size(D,1)-1])` where `zerodiag(x)=x-diagm(diag(x))`, or better something like:

```
L = size(D,1)
sD = copy(D)
pD = sD
for i = 2:L-1
  pD *= D
  for j=1:L pD[j,j] = 0 end
  pD == zero(pD) && break
  sD += pD
end
```

all of this by maybe in a sparse representation.

Another option is to officially forbid cycles when versions are taken into account (which is silly anyway), i.e. if package A version X depends on package B versionset S, then for any version Y in S package B cannot depend on A versionset R unless X is not in R. Then we could simply use `inv`.