p[k-2] && k>1) {
maxp=p[k-1];
maxm=1+maxnum-k;
}
}
}
maxp=p[maxnum-maxm];
p[maxnum]=1/maxnum;
for (m=0; m < s.length; m++) {
stro=""
var rgbcl;
rgbcl=p[maxnum-m]*255/maxp;
rgbcla=255;
if (m==maxm) {rgbcla=170};
if (m==maxm-1) {rgbcla=210};
if (m==maxm+1) {rgbcla=210};
if (m==maxm-2) {rgbcla=230};
if (m==maxm+2) {rgbcla=230};
stro= stro+"";
stro=stro+printround(m,4,0)+" "+printround(100*p[maxnum-m],9,1)+"%"+ " ";
if (m==maxm) {stro = stro + "[Max.Value]"};
stro= stro+"";
stro= stro+"
"
frame1.document.write(stro);
}
maxmd=maxm; posd="ies"
if (maxm==1) {maxmd=""; posd="y";};
comm='Conclusion
'+
''+"Skip the first "+maxmd+ " possibilit"+posd+" and take the best one thereafter, to reach the highest possible probability of P="+printround(100*maxp,5,1)+" % to get the "best" solution in the total of "+ maxnum +" possibilities you are offered.
"+
"So there is always a change of "+printround((100-100*maxp),5,1)+ " % that you don't succeed in selecting "the best one" and that the best solution was part of the first "+maxmd+ " opportunit"+posd+ "."
frame2.document.write('
')
frame2.document.write(comm);
frame1.document.close();
frame2.document.close();
}
function checkandcalculatet(){
maxnum = 1+document.socform.numt.value * 1;
tota='';
maxk=maxnum;
for (kk=1; kk < maxk; kk++) {
maxnum=kk;
var ia,ma,ta,p,q;
var s= Array() , p=Array()
s[0]=0; p[0]=0; maxm=1;
for (k=1; k < maxnum; k++) {
s[k]=s[k-1]+1/(maxnum-k);
p[k]=s[k]*(maxnum-k)/maxnum;
if (p[k]
p[k-2] && k>1) { maxp=p[k-1]; maxm=1+maxnum-k; }}} maxp=p[maxnum-maxm]; if (maxnum==1) {maxp=1} tota=tota+"
" } tota=tota+""+printround(maxnum,8,0)+" | "+printround(maxm,8,0)+" | "+printround(maxp*100,9,1)+" |
Making Decisions The best choice out of 'n' unknown opportunities |
In real life you often have to take a decision in a situation were you have to pick out "the best" opportunity out of "n" possibilities in a situation were you (ex ante) do not know much about what you can expect in terms of quality or quantity.
For example:
In each of these cases you can ask yourself: what is the optimal strategy? Take the first opportunity or wait until the last? Skipping the first 2 opportunities and than take the next one that is better?
In literature (management science) these kind of problems are known as "Best Choice Problems" (BCP's). BCP's are packaged in descriptions like "The Sultan's Dowry Problem" or "The Secretary Problem".
BCP's are characterised by the following assumptions:
Solution
The best strategy in these kind of cases is to wait (don�t choose) until the first "m" possibilities of the total number of opportunities "n" have passed. After these "m" possibilities you accept the first offer that is "better" than the one you�ve had until the moment of decision. The word "better" stands for "better candidate", "better financial offer", etc.
If you�re interested in the mathematical theory behind this kind of problems, click on one of the links below:
Although it�s nice to have a "rule of thumb", don�t forget to decide on your gutfeeling as well.
Mixing intuition, experience and rules of thumb, guarantees the ultimate best choice.