Fork me on GitHub
#test-check
<
2017-06-03
>
alex.ter.weele12:06:43

@nwjsmith: I’m working on a similar problem. My approach (which doesn’t work yet) will be something like this: Perform a random number of “rounds” On each round, generate an arbitrary number of new nodes, then draw arbitrary edges from the already-existing nodes to new nodes. Recur on the union of new nodes and existing nodes (i.e. add the new nodes to the already existing nodes)

nwjsmith15:06:47

@alex.ter.weele I managed to figure out how to generate the DAG in the way I described: https://gist.github.com/nwjsmith/0f4288db2f7c0be8b06e5237d6175b3d

nwjsmith15:06:28

The magic happens in gen-acyclic-edges, where we build up a list of generators of connecting edges, and call gen/tuple on it once we're finished

alex.ter.weele15:06:30

OK, I get it! It took me a second to realize why gen-acyclic-edges will never create cycles--because edges only go forward in the list.