Odds algorithm: Difference between revisions

Content deleted Content added
Algorithmic procedure of the odds-algorithm: TeX cleanups, including proper use of \cdots
Line 34:
== Algorithmic procedure of the odds-algorithm==
The odds-algorithm sums up the odds in reverse order
 
:<math>\, r_n\, + r_{n-1}\, + r_{n-2}\, +\cdots, . . .\, </math>,
until this sum reaches or exceeds the value 1 for the first time. If this happens at index <math> \,s</math>, it saves <math> \,s</math> and the corresponding sum
 
:<math>\,R_s = \,r_n\, + r_{n-1}\,+ r_{n-2}\, + . . . +r_s </math>.
until this sum reaches or exceeds the value 1 for the first time. If this happens at index <math> \,''s</math>'', it saves <math> \,''s</math>'' and the corresponding sum
 
:<math>\, R_s = \,r_n\, + r_{n-1}\, + r_{n-2}\, + .\cddots .+ r_s. +r_s\, </math>.
 
If the sum of the odds does not reach 1, it sets <math> \,s = 1</math>. At the same time it computes
 
:<math>\, Q_{n}=q_n q_{n-1}...\cdots q_s.\,</math>. The output is
 
The output is
 
a) <math> \,s </math> (stopping threshold)