Algorithms – Partition in paths in a directed acyclic graph

I have a directed acyclic graph $ G = (V, A) $, I want to cover the vertices of $ G $ with a minimum number of roads so that each vertex $ v_i $ is covered by $ b_i $ different paths

When $ b_i = 1 $ For all vertices, the problem can be solved in polynomial time. But I am looking for the complexity of the problem when $ b_i> 1 $ for at least one vertex $ v_i $Do you know any results that can help me?

Algorithm: find all routes between 2 nodes of the directed acyclic graph (DAG) represented as adjacency list or edge pairs

Suppose we have an acyclic graph directed like this:

Text

What is represented in the code as pairs of borders:

[ [1,2], [1,3], [2,4], [2,7], [3,4], [4,5], [4,6], [5,7], [6,7] ]

Or an adjacency list:

{
  1 => [2, 3],
  2 => [4, 7],
  3 => [4],
  4 => [5, 6],
  5 => [7],
  6 => [7]
}

My question is how can we find all the paths between 2 nodes

For example, if I enter these 3 parameters:

start = 1
end = 7
edge_pairs = [ [1,2], [1,3], [2,4], [2,7], [3,4], [4,5], [4,6], [5,7], [6,7] ]

Then you should get this result:

[ [1,2,7], [1,2,4,5,7], [1,2,4,6,7], [1,3,4,5,7], [1,3,4,6,7] ]

PS I would appreciate if the code snippets in the answers are in Ruby language

gt. geometric topology: acyclic space that is not simply connected

I am reading the article & # 39; Morse theory and properties of finitude of the groups & # 39; Bestvina and Brady, where they demonstrate the following:

Leave $ L $ Be a finite flag complex. Leave $ G = G_ {L} $ be the associated right angle Artin group, and $ H = H_ {L} $ the nucleus of homomorphism $ G_ {L} mapsto mathbb {Z} $ sending all generators to $ 1 $. So,

(one) $ H in FP_ {n + 1} (R) $ it is and only if $ L $ it's homologically $ n $-connected;

(2) $ H in FP (R) $ it is and only if $ L $ it is acyclic;

(3) $ H $ It appears finely if and only if $ L $ is simply connected

I've tried to think of a flag complex that is acyclic but not simply connected, so I have a $ FP $ group that does not present itself in a finite way, but I cannot find an example. Can anybody help me please?

Thanks in advance.

Representation of genetic algorithms for directed acyclic graphs

I have a problem in which each possible solution is a Directed Acyclic Graph (DAG) more if a node $ x $ have $ d $ incoming edges in the chart, there are $ 2 ^ d $ binary bits associated with $ x $ that I also need to discover

So every possible solution is $ (G, theta) $. I am learning about GA and I am trying to represent a solution through a binary chain. The ultimate goal is to learn a hidden graph. $ (G, theta) $ of some data given by a genetic algorithm. I wonder what is the most compact representation of a binary chain for these types of solutions. The graph can be represented by $ n times n $ matrix $ c $ where $ c_ {ij} = 1 $ if there is an incoming edge of $ x_i $ to $ x_j $. But fighting with him $ theta $ representation.

Classification: is there a topological classification for any complete directed acyclic graph?

Yes, it exists and the existence of a linear arrangement not only shows the existence of the topological rearrangement on the vertices but also that this arrangement is unique. It is not difficult to demonstrate that the graph represents a linear ordering using the facts that the graph is complete and acyclic. That should be a good exercise for you (prove that a relationship is a linear order to show that it is reflective, asymmetric and transitive).

graphics – acyclic turtle from Manhattan

There is a grammar that describes the steps of a turtle around Manhattan, such that the turtle
He always comes home. It is described in the book. "Analysis techniques" by Dick Grune and Ceriel
J H. Jacobs
, page 18. Unfortunately, I couldn't find a source online, but the rules are
pretty simple:

$$ G = left langle {0 }, Sigma = {N, S, E, W }, R, 0 right rangle \ (2ex)
R = left { begin {align}
& 0 a N 0 S \
& 0 a E 0 W \
& 0 a epsilon \ (2ex)
& N S a S N \
& dots quad scriptsize {( text {11 other flag pairs} sigma, tau in Sigma)}
end {align} right. $$

In fact, I went ahead and generated some sentences of this grammar. Example:

(N,E,N,N,E,E,N,S,W,W,S,W,S,S)

(Prayer № 10617)

A sentence like this corresponds to a graph, like the following:

+-----------------+
|                 |
|                 |
|              *  |
|              ⭣  |
|      * ⭠ * ⭠ *  |
|      ⭣          |
|  * ⭠ *          |
|  ⭣   ⭡          |
|  * ⭢ *          |
|  ⭣              |
|  +              |
|                 |
|                 |
+-----------------+

(Or, rather, to a road in Manhattan's square lattice, but a road defines a subgraph).

As this example shows, our turtle's walk will sometimes have loops.

How difficult would it be to compose a grammar that generates exactly acyclic walks?

Algorithms: minimum route coverage in a directed acyclic graph

Given a weighted directed acyclic graph G = (V, D, W) and a set of arches RE & # 39; of rewhere the weights of W They are at the vertices. The problem is partitioning Sun on a minimum number of paths separated from vertices that cover all vertices of Sun subject to restrictions that:

  1. the weight of each route is maximum k.
  2. each route must include at least one edge of D & # 39;

What is the complexity of this problem?

Longer trajectory in an acyclic graph directed with restrictions

Given a directed weighted acyclic graph G = (V, D, W) and a subset of edges RE & # 39; of re. The problem is finding the longest path in Sun that goes through exactly one edge of RE & # 39;.

What is the complexity of this problem?

algorithms: extraction of an expansion tree from a directed acyclic graph with a minimum total distance between terminal nodes

I have a directed acyclic graph that has uniform edge weights. I would like to extract from this graph an expansion tree (an arborescence) with the property that the total distance between all pairs of leaf nodes (the sum of the combined distances of the closest common ancestor of each pair) is minimized.

What I am finally trying to achieve is finding the best way to sort the leaf nodes so that the most related nodes are closer to each other on the list. If I can find the expansion tree as described, I can easily sort the leaf nodes the way I need.

Can anyone point me to a solution to this problem that is not just brute force optimization?

Direct the partition of the acyclic graph into minimal subgraphs with a restriction

enter the description of the image here

I have this problem, I am not sure there is a name for it, where a Directed Acyclic Graph has nodes of different colors. The idea is to divide it into a minimum number of subgraphs with the following 2 restrictions:

  1. A sub-graph must have nodes of similar color
  2. A subgraph cannot depend directly or indirectly on its own output

Example: – In the attached image, the subgraph with yellow nodes is not valid since the entry of the red node breaks rule # 2: the fourth node from above has an entry that depends on the output of the second node, through the node red (outside the subgraph
Therefore, the algorithm should divide it after # 2 or # 3 so that 2 and 4 are on different nodes

I am sure that this is a fairly common problem in graph theory and should have a name and a standard algorithm for it. Thanks in advance for any pointer to it!