Mythical Bears

Formula Test

[latexpage]
\begin{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
[/preamble]
\begin{axis}
\addplot3[surf,domain=0:360,samples=40] {cos(x)*cos(y)};
\end{axis}
\end{tikzpicture}

Example 7.3.5

A person has four keys and only one key fits to the lock of a door. What is the probability that the locked door can be unlocked in at most three tries?
Solution

Let U be the event that the door has been unlocked and L be the event that the door has not been unlocked. We illustrate with a tree diagram.

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[grow=right, sloped]
\tikzstyle{level 1}=[level distance=2cm, sibling distance=4cm]
\tikzstyle{level 2}=[level distance=2cm, sibling distance=2cm]
\node {}
child {
node[label=right:
{$L_1$}] {}
edge from parent
node[below] {$3/4$}
child {
node[label=right:
{$L_2$}] {}
edge from parent
node[below] {$2/3$}
child {
node[label=right:
{$L_3$}] {}
edge from parent
node[below] {$1/2$}
}
child {
node[label=right:
{$U_3$}] {}
edge from parent
node[above] {$1/2$}
}
}
child {
node[label=right:
{$U_2$}] {}
edge from parent
node[above] {$1/3$}
}
}
child {
node[label=right:
{$U_1$}] {}
edge from parent
node[above] {$1/4$}
};
\end{tikzpicture}
\end{document}

First Try:

\begin{tikzpicture}[grow=right, sloped]
\tikzstyle{level 1}=[level distance=2cm, sibling distance=3cm]
\node {}
child {
node[label=right:
{$L$}] {}
edge from parent
node[below] {$3/4$}
}
child {
node[label=right:
{$U=1/4$}] {}
edge from parent
node[above] {$1/4$}
};
\end{tikzpicture}

Second Try:

$\begin{tikzpicture}[grow=right, sloped]
\tikzstyle{level 1}=[level distance=2cm, sibling distance=3cm]
\node {}
child {
node[label=right:
{$L$}] {}
edge from parent
node[below] {$2/3$}
}
child {
node[label=right:
{$U=(3/4)(1/3)$}] {}
edge from parent
node[above] {$1/3$}
};
\end{tikzpicture}$

Third Try:

\begin{tikzpicture}[grow=right, sloped]
\tikzstyle{level 1}=[level distance=2cm, sibling distance=3cm]
\node {}
child {
node[label=right:
{$L$}] {}
edge from parent
node[below] {$1/2$}
}
child {
node[label=right:
{$U=(3/4)(2/3)(1/2)$}] {}
edge from parent
node[above] {$1/2$}
};
\end{tikzpicture}

The probability of unlocking the door in the first try = 1/4.
The probability of unlocking the door in the second try = (3/4)(1/3) = 1/4.
The probability of unlocking the door in the third try = (3/4)(2/3)(1/2) = 1/4.
Therefore, the probability of unlocking the door in at most three tries = 1/4 + 1/4 + 1/4 = 3/4.

License

Icon for the Creative Commons Attribution 4.0 International License

A Guide to Bears Copyright © by Toronto Metropolitan University is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book