# Re: Initial state options for Viterbi algorithm

**URL:** <https://www.ruby-forum.com/t/re-initial-state-options-for-viterbi-algorithm/236032>\
**Category:** GNU Radio\
**Created:** [July 31, 2013, 6:54pm UTC](https://www.ruby-forum.com/t/re-initial-state-options-for-viterbi-algorithm/236032 "2013-07-31T18:54:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [July 31, 2013, 6:54pm UTC](https://www.ruby-forum.com/t/re-initial-state-options-for-viterbi-algorithm/236032/1 "2013-07-31T18:54:49Z")

</div>

I do not see the need for such an option:

regarding the initial state at the encoder, I do not see why anyone  
wouldn’t reset the initial state of a block but use the state of a  
previous block.

Say it another way, if you want to decode two blocks by setting the  
initial state of one as the final state of the other, why don’t you  
run the Viterbi algorithm for the entire two-block set of data in one  
shot…

best  
Achilleas

---

<div class="post-metadata">

**Author:** ![Achilleas\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Achilleas\_A](https://www.ruby-forum.com/u/Achilleas_A)\
**Post date:** [July 31, 2013, 7:15pm UTC](https://www.ruby-forum.com/t/re-initial-state-options-for-viterbi-algorithm/236032/2 "2013-07-31T19:15:51Z")

</div>

Hi,

if you encode a continuous stream of data you will not reset your  
encoder  
state in between. However if you want to decode the stream you want to  
perform blockwise operation to keep the latency and memory requirements  
down. In this cases it makes sense for me to reuse the last state as the  
initial state of the next block at the decoder.

If your underlying data is however of a block nature (e.g. frames) I  
agree  
with you that it makes sense to reset the initial states.

Yours  
Martin
