Sometimes we see things that hide a secret. 

Sometimes we see clues that hide a secret. 

Sometimes we see clues that hide a secret. 
Andrew Viterbi proposed this idea in 1967. It helps solve puzzles with hidden events. One event is what we see. The other event is the hidden cause. For example, a computer hears a sound. The sound is what we see. The actual words are the hidden cause. The algorithm finds the best string of text.
This tool is used in many places. It helps our cell phones work well. It is used in satellite signals. It even helps computers recognize speech. It can help scientists study biology, too. It works by looking at many paths. It picks the path with the best chance of being right. This path is called the Viterbi path. 
Sometimes we see clues that hint at a secret. Imagine a doctor watching a patient for three days. The patient says they feel cold or dizzy. The doctor cannot see the actual sickness, only these symptoms. This is a puzzle of hidden events. The symptoms are what we observe. The sickness is the hidden cause. The Viterbi algorithm is a math tool used to solve this. It finds the most likely sequence of hidden events that explains the clues. This best guess is called the Viterbi path. 
How does this math tool work? It uses something called dynamic programming. This is a way to solve a big problem by breaking it into smaller steps. The algorithm looks at each moment in time one by one. It builds two special tables, or matrices, to keep track of information. One table stores the highest probability of reaching a certain state. The other table remembers which previous state led to that high probability. At the very end, the algorithm looks at the final results. It then follows the trail backward to find the most likely path. 
This idea has a very interesting history. It is named after Andrew Viterbi. He proposed it in 1967 to help decode digital signals. He wanted to fix errors in noisy communication links. However, the math was not just his discovery. At least seven different people found this method on their own. This includes people named Needleman, Wunsch, Wagner, and Fischer. By 1987, people began using it for natural language processing. This helped computers understand how words are used in sentences.
Today, the Viterbi algorithm is used in many amazing places. It helps your cell phone work using GSM or CDMA technology. It is also used in satellite signals and deep-space communications. When you talk to a computer, it uses this math for speech recognition. It turns the sounds you make into written text. Scientists also use it in bioinformatics to study biology. It even helps with target tracking to find the best path for observations. 
You can see this math in action with a simple example. Imagine a patient is either healthy or has a fever. On day one, they feel normal. On day two, they feel cold. On day three, they feel dizzy. The algorithm looks at the chances for each day. It might find that the person was healthy for two days. Then, it might show they caught a fever on the third day. It picks the single most likely story that fits all the clues. 
The Viterbi algorithm is a dynamic programming method used to find the most likely sequence of hidden events. These hidden events are the underlying causes that explain a series of observed events. In mathematics and computer science, this process is often applied to Hidden Markov Models (HMMs). An HMM is a system where you can see certain outcomes, but the actual states causing them remain invisible. The resulting sequence of most probable states is known as the Viterbi path. This algorithm is essential for making sense of noisy or incomplete data.
To understand the mechanism, imagine a system with a set of hidden states and a sequence of observations. The algorithm works by solving smaller subproblems at every time step. It builds two specific matrices to manage the data. The first matrix, often called the probability matrix, stores the maximum probability of ending up in a specific state at a specific time. It considers all possible sequences that could have led to that point. The second matrix, the backpointer matrix, tracks which previous state was used to reach that maximum probability. 
The calculation follows a specific mathematical recurrence. For every state at a new time step, the algorithm looks at all possible previous states. It multiplies the previous maximum probability by the transition probability and the emission probability. The emission probability is the likelihood of seeing a specific observation given a certain state. The algorithm then selects the highest resulting value and stores it. Once the algorithm reaches the final observation, it identifies the state with the highest probability. It then follows the backpointers in reverse to reconstruct the entire Viterbi path.
The history of this discovery is a story of multiple independent inventions. Andrew Viterbi proposed the algorithm in 1967. He originally designed it as a decoding algorithm for convolutional codes. This was meant to help digital communication links handle noise. However, at least seven different researchers discovered similar methods independently. These include Needleman and Wunsch, as well as Wagner and Fischer. By 1987, the algorithm moved into the field of natural language processing. It became a standard way to perform part-of-speech tagging in linguistics.
The significance of the Viterbi algorithm is seen in its wide range of technical applications. It is a core component in digital cellular technologies like CDMA and GSM. It also enables reliable communication in dial-up modems, satellite systems, and deep-space missions. In wireless networking, it helps manage 802.11 LANs. Speech recognition technology relies on it to turn acoustic signals into strings of text. In bioinformatics, it helps scientists analyze biological sequences. The algorithm's efficiency is measured by its time complexity, which is related to the number of states and observations.
Consider a medical example to see the logic in action. A doctor observes a patient's symptoms, such as feeling normal, cold, or dizzy. The actual health condition, like being healthy or having a fever, is hidden. If a patient feels normal on day one, cold on day two, and dizzy on day three, the algorithm calculates the probabilities for every possible health sequence. Even if the patient felt cold on day two, the algorithm might determine they were still healthy. It might find the most likely sequence is (healthy, healthy, fever). It chooses the single path that provides the maximum likelihood for the entire observed history.
There are several advanced variations of this algorithm used for different needs. The max-sum or max-product algorithm is a generalization used in large graphical models like Bayesian networks. Another version is called iterative Viterbi decoding, which helps process turbo codes by reestimating scores until they converge. There is also the Lazy Viterbi algorithm, which is often faster than the original. It works by maintaining a prioritized list of nodes to evaluate rather than calculating every single node in the trellis. Finally, the Soft Output Viterbi Algorithm (SOVA) provides a measure of reliability. Instead of just giving a hard decision, it indicates how certain the algorithm is about its choice.
🖼️ Images & Media (1)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.