Closed stevenbird closed 8 years ago
e.g. some kind of dynamic programming
for i in 1..n:
add edge (i, 2i)
add edge (i, 3i-1) if i is odd
Any others?
If something like this were used:
We run into problems because the resultant graph isn't connected - and I think it would only become connected if we kept performing iterations forever.
I can't think of ways to obtain graph connectivity without guaranteeing it (the usual way being to start at 1 and then perform the next iteration on the newly added nodes, instead of the i+1
th node)
Could we please have 2+ implementations for this graph: https://xkcd.com/710/