9.6.EXERCISES 153
Writea programthatsimulatesmultiplegamesofblackjackandestimatestheprobabilitythatthedealer
willbust.
- Ablackjackdealeralwaysstartswithonecardshowing.It wouldbeusefulfora playertoknowthe
dealer’s bustprobability(seepreviousproblem)foreachpossiblestartingvalue.Writea simulation
programthatrunsmultiplehandsofblackjackforeachpossiblestartingvalue(ace–10)andestimates
theprobabilitythatthedealerbustsforeachstartingvalue.
- MonteCarlotechniquescanbeusedtoestimatethevalueofpi.Supposeyouhave a rounddartboard
thatjustfitsinsideofa squarecabinet. If youthrowdartsrandomly, theproportionthathitthedart
boardvs.thosethathitthecabinet(inthecornersnotcoveredbytheboard)willbedeterminedbythe
relative areaofthedartboardandthecabinet.Ifnis thetotalnumberofdartsrandomlythrown(that
landwithintheconfinesofthecabinet),andhis thenumberthathittheboard,it is easytoshow that
π 4