---
title: Viterbi Algorithm Generalized for n-Tape Best-Path Search
url: https://www.emergentmind.com/papers/0612041
type: paper
arxiv_id: '0612041'
arxiv_url: https://arxiv.org/abs/0612041
published: '2006-12-07'
categories:
- cs.CL
- cs.DS
- cs.SC
---

# Viterbi Algorithm Generalized for n-Tape Best-Path Search

## Abstract

We present a generalization of the Viterbi algorithm for identifying the path with minimal (resp. maximal) weight in a n-tape weighted finite-state machine (n-WFSM), that accepts a given n-tuple of input strings (s_1,... s_n). It also allows us to compile the best transduction of a given input n-tuple by a weighted (n+m)-WFSM (transducer) with n input and m output tapes. Our algorithm has a worst-case time complexity of O(|s|^n |E| log (|s|^n |Q|)), where n and |s| are the number and average length of the strings in the n-tuple, and |Q| and |E| the number of states and transitions in the n-WFSM, respectively. A straight forward alternative, consisting in intersection followed by classical shortest-distance search, operates in O(|s|^n (|E|+|Q|) log (|s|^n |Q|)) time.