cargo-graph icon indicating copy to clipboard operation
cargo-graph copied to clipboard

Erdős-style graph painting

Open suhr opened this issue 9 years ago • 2 comments

It makes complex graphs a bit more readable.

bar

(mod 3 black-red-blue painting)

suhr avatar Jan 16 '16 01:01 suhr

I'm not familiar with this, could you elaborate or point a link for this? I did some quick googling, if you've got something specific I'd be interested to see it.

kbknapp avatar Jan 18 '16 09:01 kbknapp

https://en.wikipedia.org/wiki/Erd%C5%91s_number

So, the root have n = 0. Direct dependencies of the root have n = 1. Dependencies of these dependencies have n = 2 if they're not direct dependencies of the root. And so on.

The pic uses three colours, so n = 0 → black, n = 1 → red, n = 2 → blue, and n = 3 → black again.

suhr avatar Jan 18 '16 13:01 suhr