J Comb Optim

DOI 10.1007/s10878-014-9705-5

The best choice problem for posets; colored complete binary trees

Wojciech Kazmierczak

© The Author(s) 2014. This article is published with open access at Springerlink.com

Abstract We consider the poset version of the secretary problem for rooted complete binary trees of a given length n where the 2n-a complete binary trees whose roots are at the level a + 1 (counting from the leaves) are colored with different colors visible to the selector and the vertices above level a + 1 are colored in a natural way according to the vertices below them that came earlier. We find an optimal stopping time for two-colored trees and near optimal strategies for more than two colors.

Keywords Secretary problem • Best choice • Partial order

1 Introduction

The following problem is well known as the secretary problem. There are n objects that are linearly ordered. They are examined one by one in a random permutation by a selector. The selector can compare only the objects that have already been examined with the current one. The aim of the selector is to choose the current object maximizing the probability that it is the absolute best. The name secretary problem refers to the entertaining version of the problem where an administrator (our selector) examines candidates (our linearly ordered objects) for a job of a secretary, and the aim is to choose on-line the absolute best candidate with the maximal possible probability. See Lindley (1961) for the solution of this problem.

This problem has attracted a lot of attention. Many enriched versions of it were considered. An interesting survey is Ferguson (1989). The secretary problem has also a natural generalization to posets. Namely we can assume that the selector can see

W. KaZmierczak (B)

Institute of Mathematics and Computer Science, Wroclaw University of Technology, WybrzeZe Wyspianskiego 27, Wroclaw 50-370, Poland e-mail: wojciech.kazmierczak@pwr.wroc.pl

Published online: 22 January 2014

Springer

at a given moment the partial order induced by the candidates that have come so far, and the aim is to choose, again on-line, a maximal element (there can be more than one) of the underlying poset. This subject was initiated in Stadje (1980) and in a series of papers by Russian mathematicians nicely surveyed in Gnedin (1992). Effective universal algorithms for families of posets whose structure is not known to the selector before the search were considered in Preater (1999), Garrod and Morris (2013), Freij and Wastlund (2010), Georgiou et al. (2008) and Kumar et al. (2011). Optimal algorithms for simple non-linear posets were found in Kazmierczak (2013), Tkocz and Tkocz and KaZmierczak. A poset secretary problem was also considered in Garrod et al. (2012) where every candidate has an equally qualified twin. An optimal algorithm for the posets whose Hasse diagrams are complete binary trees of given length was found in Morayne (1998). Additional assumptions about a model are also possible in the poset version of the secretary problem. Posets, e.g., have sides and it is natural to assume that the selector can recognize from which side a particular element comes. In this paper we enrich the complete binary tree model considered in Morayne (1998). Namely, in the original version the selector in a given moment can see only the poset induced by the elements that have come so far, having no information from which side of the tree the observed elements came. However, this information can be provided if we assume that the elements from the left-hand side are black and from the right-hand side are white and the selector can see these colors. In fact, we can consider even a more colorful model. We assume that from some level down the complete subtrees in our underlying complete binary tree are colored with different colors (see Fig. 1 where four different colors are used below level four where we count the levels from the leaves). We will call such colored complete binary tree CCBTn where n is the height of the tree and k is the number of non-colored levels, or simply CCBT. If during a search an element x from non-colored (upper) part of the tree appears it gets the color of the first colored element related to x from the current permutation—it does not matter whether the element appears after or before x (Fig. 2 illustrates the first seven consecutive observations of the selector for a permu-

Fig. 1 ccbt25

ZiV t = 1

X2V i = 2

^v^V 2WZ3V ^V^V^S' t = 3 t = 4 t = 5

t=6 t=7

Fig. 2 Example of consecutive observations; note that the color V of X4 has been inherited from x\ and the color □ of X6 has been inherited from X7 (because the next colored element related to X6 in this permutation is X7, despite the fact that X7 appeared after xg)

tation ((xi, V), (x2, V), (x3, V), (x4, V), (x5, o), (x6, □), (x7, □)...); note that the color c4 = V of x4 has been inherited from x1 and the color c6 = □ of x6 has been inherited from x7 (because the next colored element related to x6 in this permutation is x7, despite the fact that x7 appeared after x6); note also that at t = 5 x4 is already identified as lying in the originally uncolored part because there are more than one colors below x4).

In this note we limit ourselves to an informal treatment, referring the reader to, e.g. Morayne (1998) or Preater (1999) for further details. We hope the following description will be sufficient to follow the argument given and to enable the reader to add the formalism lacked.

We will refer to posets whose Hasse diagrams are trees simply as trees. We will also call complete binary trees CBT and complete binary trees of height n CBTn.

Let N = 2n — 1. The elementary events of our probability space are permutations x = (x1, x2, ...,xN) of the vertices of our CCBT; each such permutation has uniquely assigned sequence of colors c(x) = (c1, c2,..., cN): a is the color of the vertex xt if it is colored in our CCBT, or, if it is in the uncolored part, ct is the color of the first colored element in the permutation x that is in the CCBT below xt.

We deal with a stochastic process whose values are colored and labeled posets nt isomorphic to subposets of our CCBT induced by the first t elements x1 ,...,xt of x where vertices are labelled with the times they arrived at and have colors from c(x).

We are looking for a stopping time t : x ^ t(x ) e{1,...,n} such that the vertex xT(x) is equal to the root 1 of our CCBT with the maximal possible probability. The

Fig. 3 CBTA'm

decision of selection is based only on the structure of nt and the information about colors of the elements of nt as described above. In other words the value t of t(x) must be determinable only by what has happened by t — t(x) (this exactly means that t is a stopping time).

More formally let ^ = Sn (the family of all permutations of 1,..., n ) and Ft be the a-algebra of events that depend only of the first t elements of a permutation (the atoms of Ft are sets Ai1,...jt — {n : n e Sn and n — i1,...,nt — it}. A stopping time t : ^ ^{1,..., n} is a random variable such that t-1({t}) e Ft (T(i) depends only on what happened till time i). Let for n e ^ Xt (n) — 1 if n(t) — 1 and Xt (n) — 0 otherwise. The selectors aim is to find a stopping time t* such that P [Xt * — 1]> P [Xt — 1] for all stopping times t .

Let Y be a poset whose Hasse diagram consists of a chain of length m - 1 and a complete binary tree CBTn under this chain (see Fig. 3). We will call such a poset a complete binary tree with antenna, CBTA'm for short or simply CBTA.

The paper is organized as follows. Section 2 contains some combinatorial facts about counting embeddings of a tree into a tree. They will be necessary for estimating probabilities of success conditioned by the fact that the selector sees a specific structure at a given moment. In Sect. 3 we will find the strategy for CCBTn that will be near optimal in the following sense: for all multicolor structures and asymptotically almost all monochromatic ones the selector's decisions are optimal. For other monochromatic structures the strategy is optimal asymptotically.

2 Embeddings of non-linear trees into CBT and CBTA

Let T be any tree. Let l(T) be the number of leaves of T. Let T\, T2 be any rooted trees. Let S be a subset of Ti such that S and T2 are isomorphic as posets. Let us call S an embedding of T2 into T1. Let us call S a good embedding if S contains the root of T1 and a bad embedding if it does not contain the root of T1.

Let A"m,n, Bm,n, cm,n be the number of good, bad, all embeddings of T into CBTA^l, respectively. Let A'T, B£, CT be th number of good, bad, all embeddings of T into CBTn, respectively.

Throughout this section we establish several facts about these numbers. Let us mention that such counting problems stemming from the secretary problem for posets attracted independent attention and were considered in Kubicki et al. (2002, 2003, 2006), Kuchta et al. (2005, 2009) and Georgiou (2005).

Fig. 4 S'

Let k e {1, 2,...}. Let S' be any tree whose first k biggest elements form a chain and the k'th element has more than one child. (see Fig. 4). Let S be the subset of S' which consists of all elements from S' except the first k - 1 ones. Let s be the height of S.

We will use the following well known elementary fact about the convergence of a sequence of series to a series (which is a discrete version and a consequence of Lebesgue's bounded convergence theorem). We will not prove it here.

Lemma 2.1 Let i0 e N. Let 0 < utn < wt for i > i0 and^°=0 wt < <x>. Then if limn^OT ut,n = vt thenYT=0 ut,n ^ Z ¿=0 vt.

We will also use the following technical lemma:

H d J~\d - 1)) ~ \d,

Lemma 2.2 £ 2+t ^+ ^ - (c + 1 = (c)' c'd e N (we use the conven-

ionQ = 0 for c < d). Proof Let

( d +0)

c+0 +(d+0)- 2 S^ld+0

1 / , \ 1 / . \ V — (c + i + ^ _2 V — (c + i\

2i+M d I ¿-<2i+M d - lj i =0 X ' i =0 x '

VIC+0 - VHc+0=--(0-

Thus we get V = .

Now we will prove a series of lemmas comparing the numbers of particular embed-dings into CBT and CBTA.

Lemma 2.3 AS+1 > 2l(S) AnS.

Proof The proof goes along the same lines as the proof of Propostion 2.1 in Kubicki et al. (2003). □

Lemma 2.4 limn^œ AnS+l/AnS = 2l(S).

Proof From Kubicki et al. (2003) we know that lim^oo -d = 2l(S)-1 - 1 and

limn^œ = 2l(S). Thus

AS+1 -n+1 2l(S)-1 - 1 l (S) l (S) lim —— = S-,---^ = --2l (S) = 2l (S).

n^œ AnS AS -S 2l(S)-1 - 1

Let a, be the number of embeddings of S into C-Tn such that the maximal element

of S is on level i (the leaves of CBTn are on level 1). Of course, aa+1 — ^Aw. Let 2k — m + y for some y e{1, 2,...}. Let s be the height of S.

Lemma 2.5 Ifl(S') > 2 and 2k > m > k, then Amsf > Bp".

Proof Note that

Amn=x г+m-2- 2 Ь + m - ib

-m ' = Z (" + m - - 2)at + ( m->)a„.

The inequality AS; > -S; is equivalent to the inequality:

Z((n + m - i - 2\ (n+m - i - 2\\ ((m - 1\ (m - 1 \\

,__,{{ m - 1 ) Л к - 2 ))at'{V - Л к ))

which can be written as

Z( (n + m — i — 2 — s\ (n + m — i — 2 — s\\ ,—,(( k - 1 ) — k — 2 ))■««

<(( m — 0 — (m—

Changing the order of summation we obtain the inequality

Zn_1—s ((m — 1 + i \ (m — 1 + i\\ //m — 1 \ /m — 1 \\

„(( k — 1 ) — ( k — 2 ii — Hlm — >) i k ))

and replacing m by 2k - y, dividing both sides by an and using - y - 1) ( 2k - y - 1 \ ( 2k - y - 1 \ y

I k M k-1 weobtain

Z" 1 s //2k - y - 1 + i \ /2k - y - 1 + i \\ an-1-t /2k - y - 1 \ y ^ U k - 1 / V k -2 //' an n k - 1 /k •

Now removing from the left -hand side the terms lower than 0 and applying an-1-i <

4+y we get the following stronger inequality

//2k - y - 1 + i\_(2k - y - 1 + i\\ /2k - y - 1 \ y

k - 1 ) V k -2 //' 4i+1 <\ k - 1 )k •

Now we will show that

z 2k-+0-2k-ky--21+' -4+1 <2k--v-1k

i =y—1

or, equivalently,

^ ((2k - 2 + i \ (2k - 2 + i\\ 4y (2k - y - 1 \ y

¿U k - 1 / V k -2 ))' 4i< \ k - 1 )k-

It is easy to show that the right-hand side of the inequality is minimal for y = 1. So it is enough to show that

V (( 2k - 2 + i \ ( 2k - 2 + i W 1 . ( 2k - 2 \ 1

£(( k-1 )-( k-2 < Hk-J 1

which is equivalent to

V (2k - 2 + 1)(2k - 2 + 2) ■ ■ ■ (2k - 2 + i)(i + 1) < 1 ^ (k + 1)(k + 2)- ■ ■ (k + i )4i+1 < '

But k+i+C < 2 for every c > 0. Thus the conclusion folows from the equality

i+1 — 2 n

Z^=0 2i+1 = 2. u

Lemma 2.6 Ifm < k andl (S') > 2, then A'm^ > B"m,n.

Proof Note that m < k means that y = k + z for some z e {1, 2,...}. From the proof

S' > BS'

of Lemma 2.5 we know that the inequality AZ,n > bsj'"" is equivalent to inequality

(1) with the right-hand side equal to 0 (we assume ^b ) — 0 for a < b). So we have to prove that

(( 2k — y — 1 + i ) ( 2k — y — 1 + i)) an—1—i h\\ k — 1 ) — { k — 2 ))■ — <0

i —0

which is equivalent to

n z(C—i=i+0 — (k—i—2+')) —

Note that the first k + z — 2 terms of the sum above are < 0. We move them to the other side and we obtain the following inequality (note that if k + z — 2 > n — 1 — s then our inequality is obvious so further we assume that k + z — 2 < n — 1 — s).

't (C—z—1+0—C—z+OK-

i —k+z—2 x x 7 x 77

k+T3 ((k — z — 1 + i \ (k — z — 1 + i\\ < — k — 1 ) — ( k — 2 ))-an—1—i.

Now we shift a summation index, we divide both sides by an—k—z+2 and we obtain

n — s— k— z+1 / / v / v v

— 3 + i\ (2k — 3 + an—i —k—z+1

T ((W •) '))

i — 0

k+z—3

k — 2 an—k—z+2

'k — z — 1 + i\ (k — z — 1 + i\\ an — 1—i

^ ((k — z — 1 + A (k — z — 1 + i\\ —0 U k — 1 / V k —2 )) an—k—z+2

Applying a— < 1 and replacing the summation boundary by to we get the following stronger inequality:

^ (( 2k — 3 + i ) ( 2k — 3 + i\\ _J_

¿U k —1 ) V k —2 ))'2i+1

<-—Y ((k—zk —— 1+i)—(k—z=2+i ))• . (2)

Let L, R be the left-hand and the right-hand side of the inequality above, respectively. Using L < to (Lemma 2.2) we can write — R as follows:

-«=|( C- k -1+0 -(k - k - 2+0)^-3" ^t ((k - k -1+1) - (k-k - 2+0)

V ((k - k -1+') - (k - k -1+i))

s((2kt--31+ 0-(0)-1

V ((k - z--1+i) - (k - k--1+0)

k - z - 1 + A /k - z - 1 +1 n ■ 2k+z-3-i

i =k+z- 2

= 2k+z-2 Vf ik - z - 1 + ^ -( k - z - 2 + M) -2--1

i i ) fr _ -i _L » \ / 7/^ _ -i _L 1 \ \

i=0 ' ' '

= 2k+z-r^ - 1 ¡J -( ^k -2 '2-i-1 - L' i =0

Hence (2) is equivalent to

k+z-2 ^ ^^k - z — 1 + ^ - ^k - z — 1 + ¡y^ _ i-1

L^L-2k+z~2>=o" k-1 M k-2 ii'2

Now using Lemma 2.2 we get

V( C- k -1+0-(k - z -1+0)'2-i-1=C - --0=0

for z > 0. □

Lemma 2.7 For I(S') = 2, if y < k (i.e. m > k) then

jym,n ■m,n

bs/ as/

lim -^ > 0

n^TO an

and ify = k (i.e. m = k) then

Bm,n Am,n

lim S/ - S/ = 0-

n ^to an

Bm,n _Am,n

Proof From the proof of Lemma 2.5 (inequality (1)) the inequality S/ S/ > 0 takes the form:

r,m,n Am,n n-1-s //_, , .s , .ss

BS' - As' _ V (/2k - v - 1 + A /2k - v - 1 + i\\ an-1-i

K (2k -tv--11 + 0-( 2k - ■ 2 +i))

( 2k - v - 1 ) y \ k-1 )k'

- v - 1 \ v

Now we use Lemma 2.1 for

//2k — y — 1 + A_ /2k — y — 1 + A\ an—1~ U k — 1 ) \ k — 2 )) an

Ul>n — »» k — 11 \ k — 2

((2k — y — 1 + A /2k — y — 1 + A\

u k —1 ) v k—2 /M1.

Wi — Vi —

We know that u,n — Vi (use — -sat and Lemma 2.4 for l(S') — 2). And, for i

an 2 AS

big enough, we have Ui,n < Vi (Lemma 2.3). Hence

m, n m, n

lim y- ^ — y — (2k— y — 1) y,

V k — 1 ) k

V — X 2+r(r 7-11 + 0 — ( 2t ^ + 0) •

Now using Lemma 2.2 for c — 2k — y — 1 and d — k — 1 we obtain V —

(V—1).

Bm;n—Al

So the inequality limn—TO —^ > 0 is equivalent to the inequality k > y.

BS' AS' ^n—>to a an

Bm,n _ Am,n

And, analogously, the equality limn—TO S/ S/ — 0 is equivalent to k — y. □

Lemma 2.8 Ifl(S') — 2, then: ify < k (i.e. m > k) then limn—TO Bpn/A^z" > 1, and ify — k (i.e. m — k) then limn—TO Bj;n / A— 1.

Proof First we will show that 0 < limn—TO AS; /an < to. From the proof of Lemma 2.5 we know that

m,n n—1

AS> n + m — i — 2\ Oi + (m — 1\

an — ¿V k — 2 ) an + V k — 1J

Z/n + m — i — 2 — s \ ai/ m — 1 \ V k — 2 )' an + \ k — l)

Z(m + i - A an-i-i (m - 1 \ I=0 V k - 2 ) ' an "U k - ^

^* / m + i - 1 \ / m - 1 \

A ^ k - 2 >/'2i+1 + ^ k - ^ •

to / ' 1 \ 1 1 ^

- )'2FT (m +i - 1y 2i+1

i=0 x 7 v 7 i=0

1 to 1

— V ik-2 1

- 2)! ^ i =m-1

2m-2 TO <k-2

(k - 2)! ^ 2' +2-i =m-1

(k - 2)! ^ 2"+1 i=m-1

.c Am,n because Xto=0 2. < to for any c < to. So by Lemma 2.1 limn^TO exists and

Am;n / m — 1 \ Am;n

limn^TO -S— < to. As ( k 1 J > 1 the inequality 0 < limn^TO -S— is obvious.

Now we get

B-' B -' A -' lim —= 1 + lim —-—m^-S—

n^TO Am'n n >to A™^

BS/ AS/

= 1 + lim

----------. m,n

n^TO A-/

< limn^TO — < to and (by Lemma 2.7) if y < k then 0 < limn

Bm,n _ Am,n j^m,n _ Am,n

S' a S' < TO and limn^TO S' a S' = 0 if y = k.

lin tin ^

3 Near optimal strategy

Recall that CCBTf is a colored complete binary tree of height n with m non-colored

levels where all complete binary subtrees below level m are colored with distinct colors. In this section we will define a stopping time r0 for our best choice problem for CCBTm. It is, in general, not optimal but nearly optimal in the sense that within the event of probability asymptotically equal to one it behaves in the optimal way and in the marginal situations, i.e. those of probability tending to zero, even if it is not optimal for some given fixed poset we deal with, it is either optimal for this poset from some n on or asymptotically this strategy gives us the same result as the optimal strategy.

Let x (c1,..., cd) be the minimal element from our CCBTm such that the elements of colors c1,...,cd are below x (c1,..., cd). Let S'(k) be the class of trees whose first biggest k elements form a chain and the kth element has more than one child (compare Fig. 3).

We will stop at time t = t0 only if xt = max{x1, ...,xt} and one of the following holds:

(1) x1,...,xt form a chain and 2t > T;

(2) x1,...,xt are colored with d > 1 different colors c1;.., cd and 2k > z where k is the number of elements from {x1,...,xt} such that below each of them are elements from {x1,...,xt} of d different colors (of course these k elements form a chain) and z is the length of the chain from 1 to x (c1; ...,cd) (including 1 and x (c1,...,cd));

(3) x1,...,xt form a monochromatic non-linear order S' e S '(k) and

(a) l (S') > 2 and 2k > m or

(b) l (Sr) = 2 and k > m.

All these stoppings are optimal except possibly the case l(S') = 2, k = m (3(b)). In Morayne (1998) it is proved that there are more good than bad chains of length t in CBTn when 2t > T. This justifies the optimality of stopping in the first case. For the second case, p = P [xt = 1] = Z .Soif p > 1/2 we should obviously stop. Case 3(a) is justified by Lemmas 2.5 and 2.6.

Case 3(b) is justified by Lemma 2.6 for k > m. For k = m the asymptotic correctness of stopping is justified by Lemma 2.8.

We do not stop in all other cases. In some of them this is the optimal behavior, in the other ones it is asymptotically optimal.

Let ts be the strategy such that we do not stop before we have elements from both sides of CCBTn.

For multicolor structures when p = P [xt = 1] = | < 1 /2 we should continue because if, for instance, we follow ts the probability of success is better than if we stop (it can be showed as in the proof of Theorem 3.2 below).

In Morayne (1998) it was proved that for chains of length t, where 2t < T, playing optimally we do not stop; actually, the justification is similar as for the previous case (using ts ).

For monochromatic structures S' e S'(k) with more than two leaves if 2k < m playing optimally we do not stop as is justified by Theorem 3.2. If 2k = m the asymptotically optimal behavior is not to stop as is justified by Theorem 3.1.

For monochromatic structures S' e S'(k) with exactly two leaves if k < m the fact that asymptotically we should not stop is justified by Lemma 2.8 and the usage of strategy ts .

Theorem 3.1 Let xt = max{x1, ...,xt} and x1,...,xt form a monochromatic nonlinear order S' e S' (k). For fixed S' e S'(k) and 2k = m there exists some n0 such that playing optimally for n > n0 we do not stop at time t.

Proof Let Gk be an event such that x1,...,xt form S'. We are going to prove the following inequality:

P[[xt = 1]\Gk] < P[[xts = 1]\Gk n [xt = 1]] ■ P[[xt = 1]\Gk]. (3)

Let n = n - m + 1. Let g be the number of embeddings of S' into CBTAm such that the first k elements of S' are among the first m = 2k elements of CBTA%. Let h

i 2k \

be the number of remaining embeddings of S' into CBTA%. Note that g = ( j A^

and h * Bn{k - 0.

Now let us note that

1 g k - 1 h 1 1 h P[[xt = l]\Gk] <--?— + ■

2 g + h 2k g + h 2 2kg + h

1 1 Bs\k -<--

(k -,)

AS( ?) + < -,)

But we know that there exists some c > 0 such that from some n on (because lim^co As = 2l- 1). So we can write

On the other hand

P[[xt = Wk]< ^ - ^

P[[xtS = 1]\Gk n[xt = 1]] = 1 -

ts = k n[t = *]] = i - 2„-i ■

So our inequality follows from

1 - c < (1 + c ) .(1 - J—),

2 2k " \2 2k/ V 2n-1 /

which is true for some n0 and n > n0, because limn^OT ' = 0 and c > 0. □

Theorem 3.2 Let xt = max{xi, ...,xt} and x1,...,xt form a monochromatic nonlinear order S' e S'(k). If 2k < m then playing optimal strategy we should not stop.

Proof As in the proof of Theorem 3.1 let Gk be an event such that x1,...,xt form S'. We want to show that

P[[xt = 1]\Gk] < P[[xts = 1]\Gk n [xt = 1]] ■ P[[xt = 1]\Gk].

Note that P[[xt = 1]\Gk] < m < mm and P[[xts = 1]\Gk n [xt = 1]] = So we need to show that m - 1 < (m + 1) 2"2n-~-1 which is obviously true. □

The theorems above justify our claim that t0 is near-optimal in the sense stated in the beginning of this section.

Fig. 5 ccbt\

4 Optimal stopping time for two-colored complete binary tree CCBTn

For the case CCBT\, i.e. when a CBTn is colored with only two colors (say the right-hand side is black and the left-hand side is white, see Fig. 5) we can find an optimal stopping time t .

Let us define t as the stopping time such that t = t if and only if t is the first time such that xt = max{xi, ...,xt} and one of the following situations occurs:

(1) x1,...,xt form a chain and 2t > n;

(2) x1,...,xt are colored with 2 different colors;

(3) x1,...,xt form a monochromatic non-linear order S' e S '(k) and k > 1.

If none of these situations occurs then t = 2n — 1.

Note that this strategy is the near-optimal strategy from the previous section for the case of two colors.

Let us denote by Dit theeventwhen {x1, ...,xt} form a monochromatic non-linear order S' e S'(i) and xt = max{x1,..., xt}. Let U be the order constructed from S' by removing from S' the maximal element.

Theorem 4.1 The stopping time t is optimal for CCBT\.

Proof The optimality of t in situations (1) and (2) was proved in the previous sections. Now we will show that for Di,t for i > 1 we should stop.

Let T be any non-linear order with one maximal element. Let AT, BT, CT be the number of good, bad, all embeddings of T into CBTn, respectively. Let A'T, B'T, C'T be a number of good, bad, all embeddings of T into CBTAn, respectively. From Morayne (1998) we know that AT > BT .We will show that A'S, > B's,.

It is enough to notice that AS, = Cu, B's, = CS/ and AS/ = Bu. Note also that the inequality AT > BT is equivalent to each of the inequalities CT > 2BT and 2 AT > CT (because CT = AT + BT). Now we can write

A's, = Cu > 2Bu = 2A-/ > C-' = B-,

thus we should stop.

It remains to show that stopping for D1t is not optimal. Assume that none of situations (1), (2) and (3) occurred before time t. Let 2 be the son of 1 which has the color of S'. First note that

P [[xt = 1]| Dx,t ] = P [[xt = 2]| Dx,t ]

P[[xr = 1]|Dx,t n [xt = 2]] = 1.

We want to show that

P[[xt = 1]|Dx,t] < P[[xr = 1]|Dx,t n [xt = 1]] • P[[xt = 1]|Dx,t]•

P[[xr = 1]|Dx,t n [xt = 1]] • P[[xt = 1]|Dx,t] = P [[xr = 1]|Dx,t n [xt = 1] n [xt = 2]] •P[[xt = 2]|Dx,t n [xt = 1]] • P[[xt = 1]|Dx,t]

+P[[xr = 1]|Dx,t n [xt = 1] n [xt = 2]] •P[[xt = 2]|Dx,t n [xt = 1]] • P[[xt = 1]|Dx,t] > P [[xr = 1]|Dx,t n [xt = 1] n [xt = 2]] •P[[xt = 2]|D1,t n [xt = 1]] • P[[xt = 1]|D1,t] = P[[xt = 2] n [xt = 1]|Dx,t] = P[[xt = 2]|Dx,t] = P[[xt = 1]|Dx,t].

It is interesting to compare the efficiency of optimal strategies for the two-colored complete binary trees and the non-colored complete binary trees.

The difference between these two cases appears when we get the induced monochromatic order S' e S'(1) and the last element we get is maximal and we have not stopped earlier. In such situations in the case of two-colored complete binary tree we continue and in the case of non-colored complete binary tree we stop (see Morayne (1998)).

Thus in the first case we make a mistake 2 A--1 times, and in the second case 2C--1 times, where An, is the number of good,all embeddings of the order T into CBTn, respectively.

Let Pi, P2 be the probabilities of making a mistake for the colored case and the non-colored one, respectively, in the situations when both strategies are different. Let PS/ be the probability of the event that at some time t we get S' as the induced order and the decisions at the moment t in both cases are different.

Because we know from Morayne (1998) that 2An — CS we get

AS' cs' 1

P= V P as-1 > V P Cn-1 = 1 P

S AS' ,CS' - Z^ 2(AS' , CS' ) 2

S'es'(1) as-1 + cs-1 S'es'(1) 2(as-1 + Ch-v

So we can see that, rather surprisingly, a two-coloring of CBT, even in the (marginal) situations where the strategies differ, does not reduce the probability of mistake more than twice.

Acknowledgments This work has been partially supported by MNiSW Grant NN 206 36 9739.

Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.

References

Ferguson T (1989) Who solved the secretary problem? Stat Sci 4:215-282 Freij R, Wastlund J (2010) Partially ordered secretaries. Electron Commun Probab 15:504-507 Garrod B, Morris R (2013) The secretary problem on an uknown poset. Random Struct Algorithms 43:429451

Garrod B, Kubicki G, Morayne M (2012) How to choose the best twins. SIAM J Discret Math 26:384-398 Georgiou N (2005) Embeddings and other mappings of rooted trees into complete trees. Order 22:257-288 Georgiou N, Kuchta M, Morayne M, Niemiec J (2008) On a universal best choice algorithm for partially

ordered sets. Random Struct Algorithms 32:263-273 Gnedin AV (1992) Multicriteria extensions of the best choice problem: sequential selection without linear

order. Contemp Math 125:153-172 Kazmierczak W (2013) The best choice problem for a union of two linear orders with common maximum.

Discret Appl Math 161:3090-3096 Kubicki G, Lehel J, Morayne M (2002) A ratio inequality for binary trees and the best secretary. Comb

Probab Comput 11:149-161 Kubicki G, Lehel J, Morayne M (2003) An asymptotic ratio in the complete binary tree. Order 20:91-97 Kubicki G, Lehel J, Morayne M (2006) Counting chains and antichains in the complete binary tree. Ars Comb. 79:245-256

Kuchta M, Morayne M, Niemiec J (2005) Counting emebedings of a chain into a tree. Discret Math 297:4959

Kuchta M, Morayne M, Niemiec J (2009) Counting emebedings of a chain into a binary tree. Ars Comb 91:97-111

Kumar R, Vassilvitskii S, Lattanzi S, Vattani A (2011) Hiring a secretary from a poset. In: ACM conference

on electronic commerce, pp 39-48 Lindley DV (1961) Dynamic programming and decision theory. Appl Stat 10:39-51 Morayne M (1998) Partial-order analogue of the secretary problem. The binary tree case. Discret Math 184:165-181

Preater J (1999) The best-choice problem for partially ordered objects. Oper Res Lett 25:187-190 Stadje W (1980) Efficient stopping of a random series of partially ordered points. In: Proceedings of the III international conference on multiple criteria decision making. Lecture notes in economics and mathematical systems. Springer, Konigswinter, pp 177 Tkocz J. Best choice problem for almost linear orders (preprint)

Tkocz J, KaZmierczak W. The secretary problem for single branching symmetric trees (preprint)