This is a big question, but I'm a little stuck!
I am wondering if there is a name for this problem or the like.
I probably complicate the search for a solution too much, but I cannot come up with a way without a full exhaustive brute force search (my current implementation). This is not acceptable for the application.
I am wondering if there are ways to simplify this problem or implementation strategies that I could use (language / tool selection is open).
Here is a brief description of the problem:
Given n sequences of length k :
a = [0, 1, 1] == [a1, a2, a3]
b = [1, 0, 2] == [b1, b2, b3]
c = [0, 0, 2] == [c1, c2, c3]
find paths of length k through sequences as such (I will give examples starting with a1, but I hope you get the idea that the same paths should be obtained from b1, c1)
a1 -> a2 -> a3
a1 -> b1 -> b2
a1 -> b1 -> a2
a1 -> b1 -> c1
a1 -> c1 -> c2
a1 -> c1 -> a2
a1 -> c1 -> b1
, :
a1 -> a2 -> a3 == 2
a1 -> b1 -> b2 == 1
a1 -> b1 -> a2 == 2
a1 -> b1 -> c1 == 1
a1 -> c1 -> c2 == 0
a1 -> c1 -> a2 == 1
a1 -> c1 -> b1 == 1
, a1 β c1 β c2 .
EDIT:
, .
, node a1 b2, b2 node (b1).