Skip to content

Commit 4ecb9be

Browse files
committed
Fix mathematical equations for chapter 20-26
1 parent 61ea888 commit 4ecb9be

File tree

34 files changed

+3015
-3039
lines changed

34 files changed

+3015
-3039
lines changed

_site/bayesian-learning-exercises/ex_8/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ <h3 class="masthead-title">
168168

169169
This exercise investigates properties of
170170
the Beta distribution defined in
171-
Equation (<a class="equationRef" title="" href="#">beta-equation</a><br />.
171+
Equation (<a class="equationRef" title="" href="#">beta-equation</a>).
172+
<br />
172173

173174
1. By integrating over the range $[0,1]$, show that the normalization
174175
constant for the distribution $[a,b]$ is given by
@@ -205,7 +206,8 @@ <h3 class="masthead-title">
205206

206207
This exercise investigates properties of
207208
the Beta distribution defined in
208-
Equation (<a class="equationRef" title="" href="#">beta-equation</a><br>.
209+
Equation (<a class="equationRef" title="" href="#">beta-equation</a>).
210+
<br>
209211

210212
1. By integrating over the range $[0,1]$, show that the normalization
211213
constant for the distribution $[a,b]$ is given by

_site/bayesian-learning-exercises/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ <h1 id="20-learning-probabilistic-models">20. Learning Probabilistic Models</h1>
305305

306306
This exercise investigates properties of
307307
the Beta distribution defined in
308-
Equation (<a class="equationRef" title="" href="#">beta-equation</a><br />.
308+
Equation (<a class="equationRef" title="" href="#">beta-equation</a>).
309+
<br />
309310

310311
1. By integrating over the range $[0,1]$, show that the normalization
311312
constant for the distribution $[a,b]$ is given by

_site/markdown/20-Learning-Probabilistic-Models/exercises/ex_8/question.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
This exercise investigates properties of
44
the Beta distribution defined in
5-
Equation (<a class="equationRef" title="" href="#">beta-equation</a><br>.
5+
Equation (<a class="equationRef" title="" href="#">beta-equation</a>).
6+
<br>
67

78
1. By integrating over the range $[0,1]$, show that the normalization
89
constant for the distribution ${{\rm beta}}[a,b]$ is given by

_site/markdown/22-Natural-Language-Processing/exercises/ex_11/question.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ each of the following models, propose a corresponding numeric measure.<br>
2727
end of the hour.<br>
2828

2929
5. The searcher will look through all the answers. Examining a document
30-
has cost \\$ A; finding a relevant document has value \\$ B; failing
31-
to find a relevant document has cost \\$ C for each relevant
30+
has cost \$ A; finding a relevant document has value \$ B; failing
31+
to find a relevant document has cost \$ C for each relevant
3232
document not found.<br>
3333

3434
6. The searcher wants to collect as many relevant documents as

_site/markdown/22-Natural-Language-Processing/exercises/ex_2/question.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22

3-
Write a program to do **segmentation** of
3+
Write a program to do <b>segmentation</b> of
44
words without spaces. Given a string, such as the URL
55
“thelongestlistofthelongeststuffatthelongestdomainnameatlonglast.com,”
6-
return a list of component words: \[“the,” “longest,” “list,”
7-
$\ldots$\]. This task is useful for parsing URLs, for spelling
6+
return a list of component words: [“the,” “longest,” “list,”
7+
$\ldots$]. This task is useful for parsing URLs, for spelling
88
correction when words runtogether, and for languages such as Chinese
99
that do not have spaces between words. It can be solved with a unigram
1010
or bigram word model and a dynamic programming algorithm similar to the

_site/markdown/23-Natural-Language-For-Communication/exercises/ex_10/question.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
In this exercise you will transform $\large \varepsilon_0$ into
44
Chomsky Normal Form (CNF). There are five steps: (a) Add a new start
55
symbol, (b) Eliminate $\epsilon$ rules, (c) Eliminate multiple words on
6-
right-hand sides, (d) Eliminate rules of the form<br>
7-
(${\it X}$<br>
8-
${{\;}}\rightarrow{{\;}}$${\it Y}$),<br>
6+
right-hand sides, (d) Eliminate rules of the form
7+
(${\it X} \rightarrow{{\;}}$${\it Y}$),
98
(e) Convert long right-hand sides into binary rules.<br>
109

1110
1. The start symbol, $S$, can occur only on the left-hand side in CNF.
@@ -20,21 +19,21 @@ ${{\;}}\rightarrow{{\;}}$${\it Y}$),<br>
2019

2120
3. A word can appear on the right-hand side in a rule only of the form
2221
(${\it X}$
23-
${{\;}}\rightarrow{{\;}}$*word*).
22+
${{\;}}\rightarrow{{\;}}$<i>word</i>).
2423
Replace each rule of the form (${\it X}$
25-
${{\;}}\rightarrow{{\;}}$…*word* …)
24+
${{\;}}\rightarrow{{\;}}$…<i>word</i> …)
2625
with (${\it X}$
2726
${{\;}}\rightarrow{{\;}}$…${\it W'}$ …)
2827
and (${\it W'}$
29-
${{\;}}\rightarrow{{\;}}$*word*),
28+
${{\;}}\rightarrow{{\;}}$<i>word</i>),
3029
using a new symbol ${\it W'}$.<br>
3130

3231
4. A rule (${\it X}$
3332
${{\;}}\rightarrow{{\;}}$${\it Y}$)
3433
is not allowed in CNF; it must be (${\it X}$
3534
${{\;}}\rightarrow{{\;}}$${\it Y}$
3635
${\it Z}$) or (${\it X}$
37-
${{\;}}\rightarrow{{\;}}$*word*).
36+
${{\;}}\rightarrow{{\;}}$<i>word</i>).
3837
Replace each rule of the form (${\it X}$
3938
${{\;}}\rightarrow{{\;}}$${\it Y}$)
4039
with a set of rules of the form (${\it X}$

_site/markdown/23-Natural-Language-For-Communication/exercises/ex_14/question.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ context-free grammar cannot. Show an augmented context-free grammar for
55
the language $a^nb^nc^n$. The allowable values for augmentation
66
variables are 1 and $SUCCESSOR(n)$, where $n$ is a value. The rule for a sentence
77
in this language is<br>
8-
$$S(n) {{{{\;}}\rightarrow{{\;}}}}A(n) {{\;}}B(n) {{\;}}C(n) \ .$$
8+
$$S(n) \rightarrow A(n) B(n) C(n) \ .$$
99
Show the rule(s) for each of ${\it A}$,
1010
${\it B}$, and ${\it C}$.

_site/markdown/23-Natural-Language-For-Communication/exercises/ex_2/question.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ such as $is$, $duck$, and so on). The HMM model includes a prior
77
${\textbf{P}}(N_0)$, a transition model
88
${\textbf{P}}(N_{t+1}|N_t)$, and a sensor model
99
${\textbf{P}}(W_t|N_t)$. Show that every HMM grammar can be
10-
written as a PCFG. \[Hint: start by thinking about how the HMM prior can
10+
written as a PCFG. [Hint: start by thinking about how the HMM prior can
1111
be represented by PCFG rules for the sentence symbol. You may find it
1212
helpful to illustrate for the particular HMM with values $A$, $B$ for
13-
$N$ and values $x$, $y$ for $W$.\]
13+
$N$ and values $x$, $y$ for $W$.]

_site/markdown/23-Natural-Language-For-Communication/exercises/ex_7/question.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@ $Article \rightarrow \textbf{the} \quad Noun \rightarrow \textbf{supermarket}$<b
1212
Which of the following three grammars, combined with the lexicon,
1313
generates the given sentence? Show the corresponding parse tree(s).<br>
1414

15-
| $\quad\quad\quad\quad (A):\quad\quad\quad\quad$ | $\quad\quad\quad\quad(B):\quad\quad\quad\quad$ | $\quad\quad\quad\quad(C):\quad\quad\quad\quad$ |
16-
| --- | --- | --- |
17-
| $S\rightarrow NP\space VP$ | $S\rightarrow NP\space VP$ | $S\rightarrow NP\space VP$ |
18-
| $NP\rightarrow Pronoun$ | $NP\rightarrow Pronoun$ | $NP\rightarrow Pronoun$ |
19-
| $NP\rightarrow Article\space Noun $ | $NP\rightarrow Noun$ | $NP\rightarrow Article\space NP$ |
20-
| $VP\rightarrow VP\space PP$ | $NP\rightarrow Article\space NP$ | $VP\rightarrow Verb\space Adv$ |
21-
| $VP\rightarrow VP\space Adv\space Adv$ | $VP\rightarrow Verb\space Vmod$ | $Adv\rightarrow Adv\space Adv$ |
22-
| $VP\rightarrow Verb$ | $Vmod\rightarrow Adv\space Vmod$ | $Adv\rightarrow PP$ |
23-
| $PP\rightarrow Prep\space NP$ | $Vmod\rightarrow Adv$ | $PP\rightarrow Prep\space NP$ |
24-
| $NP\rightarrow Noun$ | $Adv\rightarrow PP$ | $NP\rightarrow Noun$ |
25-
| $\quad$ | $PP\rightarrow Prep\space NP$ | $\quad$ |<br>
26-
15+
$$
16+
\quad\quad\quad\quad (A):\quad\quad\quad\quad \quad\quad\quad\quad(B):\quad\quad\quad\quad \quad\quad\quad\quad(C):\\
17+
\quad\quad\quad\quad S \rightarrow NP \space VP \quad\quad\quad\quad \quad\quad\quad\quad S\rightarrow NP\space VP \quad\quad\quad\quad S\rightarrow NP\space VP\\
18+
\quad\quad\quad\quad NP\rightarrow Pronoun \quad\quad\quad\quad NP\rightarrow Pronoun \quad\quad\quad\quad NP\rightarrow Pronoun\\
19+
\quad\quad\quad\quad NP\rightarrow Article\space Noun \quad\quad\quad\quad NP\rightarrow Noun \quad\quad\quad\quad NP\rightarrow Article\space NP\\
20+
\quad\quad\quad\quad VP\rightarrow VP\space PP \quad\quad\quad\quad NP\rightarrow Article\space NP \quad\quad\quad\quad VP\rightarrow Verb\space Adv\\
21+
\quad\quad\quad\quad VP\rightarrow VP\space Adv\space Adv \quad\quad\quad\quad VP\rightarrow Verb\space Vmod \quad\quad\quad\quad Adv\rightarrow Adv\space Adv\\
22+
\quad\quad\quad\quad VP\rightarrow Verb \quad\quad\quad\quad Vmod\rightarrow Adv\space Vmod \quad\quad\quad\quad Adv\rightarrow PP\\
23+
\quad\quad\quad\quad PP\rightarrow Prep\space NP \quad\quad\quad\quad Vmod\rightarrow Adv \quad\quad\quad\quad PP\rightarrow Prep\space NP\\
24+
\quad\quad\quad\quad NP\rightarrow Noun \quad\quad\quad\quad Adv\rightarrow PP \quad\quad\quad\quad NP\rightarrow Noun\\
25+
\quad\quad\quad\quad\quad \quad\quad\quad\quad PP\rightarrow Prep\space NP \quad\quad\quad\quad \quad\quad\quad\quad
26+
27+
$$
2728

2829
For each of the preceding three grammars, write down three sentences of
2930
English and three sentences of non-English generated by the grammar.

_site/markdown/25-Robotics/exercises/ex_1/question.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,22 @@ expected value—because of the way particle filtering works. In this
77
question, you are asked to quantify this bias.<br>
88

99
To simplify, consider a world with four possible robot locations:
10-
$X=\{x_{{\rm 1}},x_{{\rm 2}},x_{{\rm 3}},x_{{\rm 4}}\}$. Initially, we
10+
$X=\{x_1,x_2,x_3,x_4\}$. Initially, we
1111
draw $N\geq {{\rm 1}}$ samples uniformly from among those locations. As
1212
usual, it is perfectly acceptable if more than one sample is generated
1313
for any of the locations $X$. Let $Z$ be a Boolean sensor variable
1414
characterized by the following conditional probabilities:<br>
1515

16+
1617
$$\begin{aligned}
17-
P(z\mid x_{{\rm 1}}) &=& {{\rm {0.8}}} \qquad\qquad P(\lnot z\mid x_{{\rm 1}})\;\;=\;\;{{\rm {0.2}}} \\
18-
P(z\mid x_{{\rm 2}}) &=& {{\rm {0.4}}} \qquad\qquad P(\lnot z\mid x_{{\rm 2}})\;\;=\;\;{{\rm {0.6}}} \\
19-
P(z\mid x_{{\rm 3}}) &=& {{\rm {0.1}}} \qquad\qquad P(\lnot z\mid x_{{\rm 3}})\;\;=\;\;{{\rm {0.9}}} \\
20-
P(z\mid x_{{\rm 4}}) &=& {{\rm {0.1}}} \qquad\qquad P(\lnot z\mid x_{{\rm 4}})\;\;=\;\;{{\rm {0.9}}}\ .\end{aligned}$$<br>
18+
P(z | x_1) = 0.8 \qquad\qquad P(z | x_1) = 0.2 \\
19+
P(z | x_2) = 0.4 \qquad\qquad P(z | x_2) = 0.6 \\
20+
P(z | x_3) = 0.1 \qquad\qquad P(z | x_3) = 0.9 \\
21+
P(z | x_4) = 0.1 \qquad\qquad P(z | x_4) = 0.9
22+
\end{aligned}$$
2123

22-
\begin{table}[]
23-
\begin{tabular}{ll}
24-
P(z\textbackslash{}mid x\_\{\{\textbackslash{}rm 1\}\}) \&=\& \{\{\textbackslash{}rm \{0.8\}\}\} & 1 \\
25-
1 & 1 \\
26-
1 & 1 \\
27-
1 & 1
28-
\end{tabular}
29-
\end{table}
3024

25+
<br>
3126

3227
MCL uses these probabilities to generate particle weights, which are
3328
subsequently normalized and used in the resampling process. For
@@ -38,7 +33,7 @@ probability distribution over $X$.<br>
3833

3934
1. What is the resulting probability distribution over $X$ for this new
4035
sample? Answer this question separately for
41-
$N={{\rm 1}},\ldots,{{\rm {10}}}$, and for $N=\infty$.<br>
36+
$N=1,\ldots,10$, and for $N=\infty$.<br>
4237

4338
2. The difference between two probability distributions $P$ and $Q$ can
4439
be measured by the KL divergence, which is defined as

0 commit comments

Comments
 (0)