Company: Infosys_
Difficulty: medium
Geodesic Triple Sequence Alignment Problem Description You are given three sequences of points lying on a Riemannian manifold: X = (X1, X2,..., Xn) Y = (Y1, Y2,..., Ym) Z = (Z1, Z2,..., Zk) A distance function d is provided which returns the geodesic distance between any two manifold points. You must align all three sequences into a single timeline. An alignment is constructed by performing a series of steps. In each step, you may consume elements from one, two, or all three sequences. From any state (i,j,l), exactly one of the following moves may be chosen: Triple Move (advance all sequences) Transition: (i,j,l) → (i+1, j+1, l+1) Warp cost: 0 Double Moves (advance exactly two sequences) Transitions: (i+1, j+1, l), (i+1, j, l+1), (i, j+1, l+1). Warp cost: 1 Single Moves (advance exactly one sequence) Transitions: (i+1, j, l), (i, j+1, l), (i, j, l+1). Warp cost: 1 An empty move is not allowed. The alignment must finish exactly at state (N, M, K). Each step produces a cost based o