<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Odds_algorithm</id>
	<title>Odds algorithm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Odds_algorithm"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Odds_algorithm&amp;action=history"/>
	<updated>2026-05-01T18:00:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Odds_algorithm&amp;diff=7124569&amp;oldid=prev</id>
		<title>imported&gt;Cmglee: /* Applications */ Add secretary problem illustration</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Odds_algorithm&amp;diff=7124569&amp;oldid=prev"/>
		<updated>2025-04-04T15:08:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Applications: &lt;/span&gt; Add secretary problem illustration&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{short description|Method of computing optimal strategies for last-success problems}}&lt;br /&gt;
&lt;br /&gt;
In [[decision theory]], the &amp;#039;&amp;#039;&amp;#039;odds algorithm&amp;#039;&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;&amp;#039;Bruss algorithm&amp;#039;&amp;#039;&amp;#039;) is a mathematical method for computing optimal strategies for a class of problems that belong to the domain of [[optimal stopping]] problems.  Their solution follows from the &amp;#039;&amp;#039;odds strategy&amp;#039;&amp;#039;, and the importance of the odds strategy lies in its optimality, as explained below. &lt;br /&gt;
&lt;br /&gt;
The odds algorithm applies to a class of problems called  &amp;#039;&amp;#039;last-success&amp;#039;&amp;#039; problems.  Formally, the objective in these problems is to maximize the probability of identifying in a sequence of sequentially observed independent events the last event satisfying a specific criterion (a &amp;quot;specific event&amp;quot;).  This identification must be done at the time of observation.  No revisiting of preceding observations is permitted.  Usually, a specific event is defined by the decision maker as an event that is of true interest in the view of &amp;quot;stopping&amp;quot; to take a well-defined action. Such problems are encountered  in several situations.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Two different situations exemplify the interest in maximizing the probability to stop on a last specific event.&lt;br /&gt;
 &lt;br /&gt;
# Suppose a car is advertised for sale to the highest bidder (best &amp;quot;offer&amp;quot;). Let &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; potential buyers respond and ask to see the car. Each insists upon an immediate decision from the seller to accept the bid, or not. Define a bid as &amp;#039;&amp;#039;interesting&amp;#039;&amp;#039;, and coded 1 if it is better than all preceding bids, and coded 0 otherwise. The bids will form a [[random sequence]] of 0s and 1s. Only 1s interest the seller, who may fear that each successive 1 might be the last. It follows from the definition that the very last 1 is the highest bid. Maximizing the probability of selling on the last 1 therefore means maximizing the probability of selling &amp;#039;&amp;#039;best&amp;#039;&amp;#039;.&lt;br /&gt;
# A physician, using a special treatment, may use the code 1 for a successful treatment, 0 otherwise. The physician treats a sequence of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; patients the same way, and wants to minimize any suffering, and to treat every responsive patient in the sequence. Stopping on the last 1 in such a random sequence of 0s and 1s would achieve this objective.  Since the physician is no prophet, the objective is to maximize the probability of stopping on the last 1. (See [[Compassionate use]].)&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
Consider a sequence of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; [[independent events]]. Associate with this sequence another sequence of independent events &amp;lt;math&amp;gt; I_1,\, I_2,\, \dots ,\, I_n&amp;lt;/math&amp;gt;  with values 1 or 0.   Here  &amp;lt;math&amp;gt; \,I_k =1&amp;lt;/math&amp;gt;, called a success,  stands for&lt;br /&gt;
the event that the kth observation is interesting (as defined by the decision maker), and &amp;lt;math&amp;gt;\, I_k=0&amp;lt;/math&amp;gt; for non-interesting.&lt;br /&gt;
These random variables &amp;lt;math&amp;gt; I_1,\, I_2,\, \dots ,\, I_n &amp;lt;/math&amp;gt; are observed sequentially and the goal is to correctly select the last success when it is observed.  &lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt; \,p_k = P( \,I_k\,=1)&amp;lt;/math&amp;gt; be the probability that the kth event is interesting. Further let&lt;br /&gt;
&amp;lt;math&amp;gt; \,q_k = \,1- p_k &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \,r_k = p_k/q_k&amp;lt;/math&amp;gt;. Note that &amp;lt;math&amp;gt; \,r_k&amp;lt;/math&amp;gt; represents the [[odds]] of the kth event turning out to be interesting, explaining the name of the odds algorithm.&lt;br /&gt;
&lt;br /&gt;
== Algorithmic procedure==&lt;br /&gt;
&lt;br /&gt;
The odds algorithm sums up the odds in reverse order&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; r_n + r_{n-1} + r_{n-2}\, +\cdots, \,  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
until this sum reaches or exceeds the value 1 for the first time. If this happens at index &amp;#039;&amp;#039;s&amp;#039;&amp;#039;, it saves &amp;#039;&amp;#039;s&amp;#039;&amp;#039; and the corresponding sum&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; R_s = \,r_n + r_{n-1} + r_{n-2}  + \cdots + r_s. \, &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the sum of the odds  does not reach 1, it sets &amp;#039;&amp;#039;s&amp;#039;&amp;#039;&amp;amp;nbsp;=&amp;amp;nbsp;1.  At the same time it computes&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; Q_{s}=q_n q_{n-1}\cdots q_s.\,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output is&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;math&amp;gt;\,s&amp;lt;/math&amp;gt;, the stopping threshold&lt;br /&gt;
# &amp;lt;math&amp;gt;\,w = Q_s R_s&amp;lt;/math&amp;gt;, the win probability.&lt;br /&gt;
&lt;br /&gt;
== Odds strategy==&lt;br /&gt;
The odds strategy is the rule to observe the events one after the other and to stop on the first interesting event from index &amp;#039;&amp;#039;s&amp;#039;&amp;#039; onwards (if any), where &amp;#039;&amp;#039;s&amp;#039;&amp;#039; is the stopping threshold of output a.&lt;br /&gt;
&lt;br /&gt;
The importance of the odds strategy, and hence of the odds algorithm, lies in the following odds theorem.&lt;br /&gt;
&lt;br /&gt;
==Odds theorem ==&lt;br /&gt;
The odds theorem states that&lt;br /&gt;
&lt;br /&gt;
# The odds strategy is &amp;#039;&amp;#039;optimal&amp;#039;&amp;#039;, that is, it maximizes the probability of stopping on the last 1.&lt;br /&gt;
# The win probability of the odds strategy equals   &amp;lt;math&amp;gt;w= Q_s R_s&amp;lt;/math&amp;gt;&lt;br /&gt;
# If &amp;lt;math&amp;gt;R_s \ge 1&amp;lt;/math&amp;gt;, the win probability &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is always at least {{math|1=1/[[e (mathematical constant)|&amp;#039;&amp;#039;e&amp;#039;&amp;#039;]] = 0.367879...}}, and this lower bound is &amp;#039;&amp;#039;best possible&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
The odds algorithm computes the optimal &amp;#039;&amp;#039;strategy&amp;#039;&amp;#039; and the optimal &amp;#039;&amp;#039;win probability&amp;#039;&amp;#039; at the same time. Also, the number of operations of the odds algorithm is (sub)linear in n. Hence no quicker algorithm can possibly&lt;br /&gt;
exist for all sequences, so that the odds algorithm is, at the same time, optimal as an algorithm.&lt;br /&gt;
&lt;br /&gt;
==Sources==&lt;br /&gt;
{{harvnb|Bruss|2000}} devised the odds algorithm, and coined its name. It is also known as Bruss algorithm (strategy). Free implementations can be found on the web.&lt;br /&gt;
&lt;br /&gt;
==Applications==&lt;br /&gt;
{{secretary_problem.svg}}&lt;br /&gt;
Applications reach from medical questions in [[clinical trial]]s over sales problems, [[secretary problems]], [[portfolio (finance)|portfolio]] selection, (one way) search strategies, trajectory problems and the [[parking problem]] to problems in online maintenance and others.&lt;br /&gt;
&lt;br /&gt;
There exists, in the same spirit, an Odds Theorem for continuous-time arrival processes with [[independent increments]] such as the [[Poisson process]] ({{harvnb|Bruss|2000}}). In some cases, the odds are not necessarily known in advance (as in Example 2 above) so that the application of the odds algorithm is not directly possible. In this case each step can use [[sequential estimate]]s of the odds. This is meaningful, if the number of unknown parameters is not large compared with the number n of observations. The question of optimality is then more complicated, however, and requires additional studies.  Generalizations of the odds algorithm allow for different rewards for failing to stop&lt;br /&gt;
and wrong stops as well as replacing independence assumptions by weaker ones {{harv|Ferguson|2008}}.&lt;br /&gt;
&lt;br /&gt;
== Variations ==&lt;br /&gt;
{{harvnb|Bruss|Paindaveine|2000}} discussed a problem of selecting the last &amp;lt;math&amp;gt; k &amp;lt;/math&amp;gt; successes. &lt;br /&gt;
&lt;br /&gt;
{{harvnb|Tamaki|2010}} proved a multiplicative odds theorem which deals with a problem of stopping at any of the last &amp;lt;math&amp;gt; \ell &amp;lt;/math&amp;gt; successes.&lt;br /&gt;
A tight lower bound of win probability is obtained by {{harvnb|Matsui|Ano|2014}}.&lt;br /&gt;
&lt;br /&gt;
{{harvnb|Matsui|Ano|2017}} discussed a problem of selecting &amp;lt;math&amp;gt;k &amp;lt;/math&amp;gt; out of the last &amp;lt;math&amp;gt; \ell &amp;lt;/math&amp;gt; successes and obtained a tight lower bound of win probability. When  &amp;lt;math&amp;gt; \ell= k = 1,&amp;lt;/math&amp;gt; the problem is equivalent to Bruss&amp;#039; odds problem. If  &amp;lt;math&amp;gt;\ell= k \geq 1,&amp;lt;/math&amp;gt; the problem is equivalent to that in  {{harvnb|Bruss|Paindaveine|2000}}. A  problem discussed by {{harvnb|Tamaki|2010}} is obtained by setting &amp;lt;math&amp;gt; \ell \geq k=1. &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple choice problem ===&lt;br /&gt;
A player is allowed &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; choices, and he wins if any choice is the last success.&lt;br /&gt;
For classical secretary problem, {{harvnb|Gilbert|Mosteller|1966}} discussed the cases &amp;lt;math&amp;gt;r=2,3,4&amp;lt;/math&amp;gt;.&lt;br /&gt;
The odds problem with &amp;lt;math&amp;gt; r=2, 3 &amp;lt;/math&amp;gt; is discussed by {{harvnb|Ano|Kakinuma|Miyoshi|2010}}.&lt;br /&gt;
For further cases of odds problem, see {{harvnb|Matsui|Ano|2016}}.&lt;br /&gt;
&lt;br /&gt;
An optimal strategy for this problem belongs to the class of strategies defined by a set of threshold numbers &amp;lt;math&amp;gt;(a_1, a_2, ..., a_r)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;a_1 &amp;gt; a_2 &amp;gt; \cdots &amp;gt; a_r&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Specifically, imagine that you have &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; letters of acceptance labelled from &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;. You would have &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; application officers, each holding one letter. You keep interviewing the candidates and rank them on a chart that every application officer can see. Now officer &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; would send their letter of acceptance to the first candidate that is better than all candidates &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;. (Unsent letters of acceptance are by default given to the last applicants, the same as in the standard secretary problem.)&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;math&amp;gt;r=2 &amp;lt;/math&amp;gt;, {{harvnb|Ano|Kakinuma|Miyoshi|2010}} showed that the tight lower bound of win probability is equal to &amp;lt;math&amp;gt;  e^{-1}+ e^{-\frac{3}{2}}. &amp;lt;/math&amp;gt; &lt;br /&gt;
For general positive integer &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;, {{harvnb|Matsui|Ano|2016}} proved that the tight lower bound of win probability is the win probability of the [[Secretary problem#Pick the best, using multiple tries|secretary problem variant where one must pick the top-k candidates using just k attempts]].&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;math&amp;gt; r=3,4,5 &amp;lt;/math&amp;gt;, tight lower bounds of win probabilities are equal to &amp;lt;math&amp;gt; e^{-1}+ e^{-\frac{3}{2}}+e^{-\frac{47}{24}} &amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; e^{-1}+e^{-\frac{3}{2}}+e^{-\frac{47}{24}}+e^{-\frac{2761}{1152}} &amp;lt;/math&amp;gt; and  &amp;lt;math&amp;gt; e^{-1}+e^{-\frac{3}{2}}+e^{-\frac{47}{24}}+e^{-\frac{2761}{1152}}+e^{-\frac{4162637}{1474560}}, &amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
For further numerical cases for &amp;lt;math&amp;gt;r=6,...,10&amp;lt;/math&amp;gt;, and an algorithm for general cases, see {{harvnb|Matsui|Ano|2016}}.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Odds]]&lt;br /&gt;
* [[Clinical trial]]&lt;br /&gt;
* [[Expanded access]]&lt;br /&gt;
* [[Secretary problem]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*{{cite journal |last1=Ano |first1=K.|first2=H. |last2=Kakinuma |first3=N. |last3=Miyoshi |title=Odds theorem with multiple selection chances |journal=Journal of Applied Probability |volume=47 |year=2010 |issue=4|pages=1093–1104 |doi=10.1239/jap/1294170522|s2cid=17598431|doi-access=free }}&lt;br /&gt;
* {{cite journal | last=Bruss | first=F. Thomas | authorlink=Franz Thomas Bruss | title=Sum the odds to one and stop | journal=The Annals of Probability | publisher=Institute of Mathematical Statistics | volume=28 | issue=3 | year=2000 | issn=0091-1798 | doi=10.1214/aop/1019160340 | pages=1384–1391 | doi-access=free }}&lt;br /&gt;
** &amp;quot;[https://www.cambridge.org/core/journals/journal-of-applied-probability/article/note-on-a-lower-bound-for-the-multiplicative-odds-theorem-of-optimal-stopping/B759B6E4A9D83DB84D6EE1B4C827785B A note on Bounds for the Odds Theorem of Optimal Stopping]&amp;quot;, &amp;#039;&amp;#039;[[Annals of Probability]]&amp;#039;&amp;#039; Vol. 31,  1859&amp;amp;ndash;1862,   (2003).&lt;br /&gt;
** &amp;quot;[https://web.archive.org/web/20230409100437/https://www.ems-ph.org/journals/newsletter/pdf/2006-12-62.pdf The art of a right decision]&amp;quot;, &amp;#039;&amp;#039;Newsletter of the [[European Mathematical Society]]&amp;#039;&amp;#039;, Issue 62, 14&amp;amp;ndash;20,  (2005).&lt;br /&gt;
*{{SfnRef inline|Ferguson|2008}}[[Thomas S. Ferguson|T. S. Ferguson]]: (2008, unpublished){{sfn whitelist|CITEREFFerguson2008}}&lt;br /&gt;
*{{cite journal |first1=F. T. |last1=Bruss |first2=D. |last2=Paindaveine |title=Selecting a sequence of last successes in independent trials |journal=Journal of Applied Probability |volume=37 |pages=389–399 |year=2000 |issue=2 |doi=10.1239/jap/1014842544 |url=https://mpra.ub.uni-muenchen.de/21166/1/MPRA_paper_21166.pdf}}  &lt;br /&gt;
*{{Cite journal|last1=Gilbert |first1=J |last2=Mosteller |first2=F |title= Recognizing the Maximum of a Sequence |journal=Journal of the American Statistical Association |volume=61 |pages=35–73 |year=1966 |issue=313 |doi=10.2307/2283044 |jstor=2283044 }}&lt;br /&gt;
*{{cite journal |last1=Matsui |first1=T |last2=Ano | first2=K |title=A note on a lower bound for the multiplicative odds theorem of optimal stopping | journal=Journal of Applied Probability |volume=51 |pages=885–889 |year=2014 |issue=3 |doi=10.1239/jap/1409932681 |doi-access=free }}&lt;br /&gt;
*{{cite journal |last1=Matsui |first1=T |last2=Ano | first2=K |title=Lower bounds for Bruss&amp;#039; odds problem with multiple stoppings |journal=[[Mathematics of Operations Research]] |volume=41 |pages=700–714 |year=2016 |issue=2 |doi=10.1287/moor.2015.0748 |arxiv=1204.5537 |s2cid=31778896 }}&lt;br /&gt;
*{{cite journal |last1=Matsui |first1=T |last2=Ano | first2=K |title=Compare the ratio of symmetric polynomials of odds to one and stop |journal=Journal of Applied Probability |volume=54 |pages=12–22 |year=2017 |doi=10.1017/jpr.2016.83 |s2cid=41639968 |url=http://t2r2.star.titech.ac.jp/cgi-bin/publicationinfo.cgi?q_publication_content_number=CTT100773751 }} &lt;br /&gt;
* Shoo-Ren Hsiao and Jiing-Ru. Yang: &amp;quot;[https://www.cambridge.org/core/journals/journal-of-applied-probability/article/selecting-the-last-success-in-markovdependent-trials/09D192C389B4BA5D4E2CA678E11B31CC Selecting the Last Success in Markov-Dependent Trials]&amp;quot;, &amp;#039;&amp;#039;[[Journal of Applied Probability]]&amp;#039;&amp;#039;, Vol. 93,  271&amp;amp;ndash;281, (2002).&lt;br /&gt;
*{{cite journal |last1=Tamaki |first1=M | title=Sum the multiplicative odds to one and stop |journal=Journal of Applied Probability |volume=47 |pages=761–777 |year=2010 |issue=3 |doi=10.1239/jap/1285335408 |s2cid=32236265 |doi-access=free }}  &lt;br /&gt;
* Mitsushi Tamaki: &amp;quot;[https://www.cambridge.org/core/journals/journal-of-applied-probability/article/optimal-stopping-on-trajectories-and-the-ballot-problem/4DEDE2A52A75420648C0DF39797E4A64 Optimal Stopping on Trajectories and the Ballot Problem]&amp;quot;, &amp;#039;&amp;#039;[[Journal of Applied Probability]]&amp;#039;&amp;#039; Vol.  38, 946&amp;amp;ndash;959 (2001).&lt;br /&gt;
* E. Thomas, E. Levrat, B. Iung: &amp;quot;[https://hal.archives-ouvertes.fr/hal-00149994/document L&amp;#039;algorithme de Bruss comme contribution à une maintenance préventive]&amp;quot;, &amp;#039;&amp;#039;[[Sciences et Technologies de l&amp;#039;automation]]&amp;#039;&amp;#039;, Vol. 4, 13-18 (2007).&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* Bruss Algorithmus http://www.p-roesler.de/odds.html&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Odds Algorithm}}&lt;br /&gt;
[[Category:Optimization algorithms and methods]]&lt;br /&gt;
[[Category:Statistical algorithms]]&lt;br /&gt;
[[Category:Optimal decisions]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Cmglee</name></author>
	</entry>
</feed>