Hi, I need a help. I came up with following subproblem while working on another problem. Can you confirm if its a recognized problem. I have spent months but couldn’t make any progress.
Design a data structure that maintains a directed graph. A node with node_id=0 is created by default, having no edges. The datastructure supports following queries:

Create() : Create a new node with node_id assigned from an autoincrementing counter. Add a directed edge from node0 to this new node; return node_id of new node.

Add(x, y) : Add a directed edge from nodex to nodey. Ignore if there is already an edge from x to y.

Delete(x, y) : Delete the directed edge from nodex to nodey and also delete all the nodes (and their edges) of graph which are not reachable from node0. return the list of deleted edges and nodes.
All queries should work in amortized complexity O(log(N)), where N is the number of nodes in the graph at the time of query.
Thanks.