Algorithms or theory for combining parts of two graphic structures?

I have a directed acyclic graph, an example of which might look like this:

                     | 
                    (1)
                   / | \
                  /  |  \
                (3) (2) (4)
                /  / | \  \
               /  /  |  \  \
              /  /   |   \  \
            (6)(7)  (5)  (8)(9)
             |  |    |    |  |
           (10)(11) (12)(13)(14)
             \   \   |    /  /
              \   \ (15)_/  /
               \   \ |     /
                \___(16)__/
                     |  
                     |  
  • Each node runs down.
  • If node has more than one outgoing branch, a copy of the graph is executed, and the selected branch is executed in another process.
  • If a node has more than one incoming branch, copies of the graph return to the main process, so they can be merged, so the main copy has all the changes made to the branches (in separate processes).
  • The processes are long and temporary, so I can not / do not want to direct each node back to the master after its execution - I only want to join the master when a large piece of work (branch) is completed remotely.

, , node (1) , node (16). - node (16) synch node (1) node (1) (16) , , (16).

node (2) , node (16) ( , node (15)).

, , node (16), , (.. node (1) (2)).

- , node, , , (11) -> (16) , , node (2).

- , ? ?

+3
1

- , . node X - X, X , X.

, , , ( ).

  • - DP node X.
  • node Ni DP - Pi.
  • - CP, Pi.
  • node CP ( CP ).

node 15. 12 13. - 12 5, 2 1. 13 8, 2 1. 2 1, , node 2 ( node 1 , node 2 ). node 15 , node 2.

+2

Source: https://habr.com/ru/post/1754590/


All Articles