Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
pit
Commits
b33252ff
Commit
b33252ff
authored
Feb 23, 2019
by
Erik Strand
Browse files
Options
Downloads
Patches
Plain Diff
Add answer for 4.3
parent
a0bc6d37
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
_psets/3.md
+139
-6
139 additions, 6 deletions
_psets/3.md
_sass/main.scss
+13
-0
13 additions, 0 deletions
_sass/main.scss
with
152 additions
and
6 deletions
_psets/3.md
+
139
−
6
View file @
b33252ff
...
...
@@ -179,10 +179,7 @@ $$
{:.question}
Consider a binary channel that has a small probability $$
\e
psilon$$ of making a bit error.
$$
\b
egin{align
*
}
\e
nd{align
*
}
$$
For reasons that will become clear I will call the error probability $$
\e
psilon_0$$.
### (a)
...
...
@@ -190,16 +187,147 @@ $$
What is the probability of an error if a bit is sent independently three times and the value
determined by majority voting?
Majority voting can recover the message if a single instance of the bit is flipped. So the
probability of an error is the probability of having two or three bits flipped. This can be
expressed using the binomial distribution. Let's call it $$
\e
psilon_1$$.
$$
\b
egin{align
*
}
\e
psilon_1 &= B(2;
\e
psilon_0, 3) + B(3,
\e
psilon_0, 3)
\\
&= {3
\c
hoose 2}
\e
psilon_0^2 (1 -
\e
psilon_0) + {3
\c
hoose 3}
\e
psilon_0^3
\\
&= 3
\e
psilon_0^2 (1 -
\e
psilon_0) +
\e
psilon_0^3
\\
&= 3
\e
psilon_0^2 - 2
\e
psilon_0^3
\e
nd{align
*
}
$$
### (b)
{:.question}
How about if that is done three times, and majority voting is done on the majority voting?
The answer is the same as above, just using $$
\e
psilon_1$$ instead of $$
\e
psilon_0$$.
$$
\b
egin{align
*
}
\e
psilon_2 &= B(2;
\e
psilon_1, 3) + B(3,
\e
psilon_1, 3)
\\
&= 3
\e
psilon_1^2 - 2
\e
psilon_1^3
\e
nd{align
*
}
$$
### (c)
{:.question}
If majority voting on majority voting on
…
on majority voting is done N times, how many bits are
needed, and what is the probability of an error? How does this probability depend on $$
\e
psilon$$?
If majority voting on majority voting on
…
on majority voting is done N times, how many bits
are needed, and what is the probability of an error? How does this probability depend on
$$
\e
psilon$$?
Each round triples the total number of bits sent. So $$n$$ rounds of voting requires $$3^n$$ bits.
The probability of an error can be expressed as a recurrence relation. Define
$$
\b
egin{align
*
}
f_0(x) &= 3 x^2 - 2 x^3
\\
f_{n+1}(x) &= f_0(f_n(x))
\e
nd{align
*
}
$$
Then with a base error rate (i.e. per individual bit) of $$
\e
psilon_0$$, the probability of an error
after $$n$$ rounds of voting is $$
\e
psilon_n = f_n(
\e
psilon_0)$$. If there is a closed form solution
to this relation, I don't know how to find it. But it's still possible to say a lot about its
behavior.
### Convergence to a step function
As $$n$$ approaches infinity, $$f_n$$ converges pointwise to
$$
f_
\i
nfty(x) =
\b
egin{cases}
0 &
\t
ext{for} & 0
\l
eq x < 1/2
\\
1/2 &
\t
ext{for} & x = 1/2
\\
1 &
\t
ext{for} & 1/2
\l
eq x
\l
eq 1
\e
nd{cases}
$$
So as long as the error rate isn't $$1/2$$ (i.e. zero information gets through), with enough rounds
of majority voting the error rate can be made arbitrarily small.
Let's prove this. Since $$f_0$$ is a polynomial, it's continuous. By inspection there are three
solutions to $$x = 3 x^2 - 2 x^3$$: zero, one half, and one. Thus $$f_0$$ has three
[
fixed points
](
https://en.wikipedia.org/wiki/Fixed_point_(mathematics
)
). This suffices to show that
for any $$x$$, if $$f_n(x)$$ converges it must converge to zero, one half, or one.
Now fix any $$x$$ such that $$0 < x < 1/2$$. Because $$f_0$$ is a cubic polynomial, it can't cross the
line $$y = x$$ more than three times. We've shown that it does cross this line exactly three times
(at zero, one half, and one). So noting that $$3
\c
dot 0.25^2 - 2
\c
dot 0.25^3 = 5/32
\a
pprox 0.16$$
is sufficient to prove that $$f_0(x) < x$$. Furthermore, $$3 x^2$$ is greater than $$2 x^3$$, so
$$0 < f_0(x)$$. Thus $$0 < f_0(x) < x < 1/2$$. By induction this shows that
$$
0 <
\c
dots < f_2(x) < f_1(x) < f_0(x) < x
$$
Thus $$f_n(x)$$ is a bounded monotonic sequence, and must converge. Since $$x < 1/2$$ the only fixed
point it can converge to is zero.
All that remains is to show that all points in $$(1/2, 1)$$ converge to one. Note that
$$
\b
egin{align
*
}
1 - f_0(1 - x)
&= 1 - 3(1 - x)^2 + 2(1 - x)^3
\\
&= 1 - (1 - x)^2 (3 - 2(1 - x))
\\
&= 1 - (1 - 2x + x^2) (1 + 2x))
\\
&= 1 - (1 + 2x - 2x - 4x^2 + x^2 + 2x^3)
\\
&= 3x^2 - 2x^3
\\
&= f_0(x)
\e
nd{align
*
}
$$
This symmetry establishes the claim.
### Behavior of leading term
By induction it's clear that $$f_n$$ is a polynomial for all $$n$$. So another way to look at
$$f_n$$ is to consider its lowest degree term. In particular consider $$g_0(x) = 3x^2$$, with
$$g_n$$ defined recursively in a similar fashion as $$f_n$$.
For any $$x
\i
n (0, 1]$$, it's clear that $$f_0(x) < g_0(x)$$. And for any $$x$$ and $$y$$ such that
$$0 < x < y < 1$$,
$$0 < 3x^2 - 2x^3 < 3x^2 < 3y^2 < 1$$
so $$0 < f_0(x) < g_0(y) < 1$$. Thus by induction $$f_n(x) < g_n(x)$$ for any x in $$(0, 1]$$ and
for all $$n$$. So $$g_n(
\e
psilon)$$ is an upper bound for the probability of an error after $$n$$
rounds of majority voting with a base error rate of $$
\e
psilon$$.
The interesting thing about $$g_n$$ is that it has a closed form solution that's easy to find.
$$
g_n(x) = 3^{2^n - 1} x^{2^n}
$$
So while each round of voting increases the number of bits by a factor of three, the
*exponent*
on
top of the base error rate grows by a factor of two. This is an astonishing win for majority voting.
### Examples
Here is a table showing error rates after various numbers of voting rounds for a variety of base
rates.
|voting rounds| 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
|bits|1 |3 |9 |27 |81 |243|
|---|---|---|---|---|---|---|
|$$p_
\t
ext{error}$$|0.25|$$
\n
um{1.6e-1}$$|$$
\n
um{6.6e-2}$$|$$
\n
um{1.2e-3}$$|$$
\n
um{4.5e-4}$$|$$
\n
um{6.2e-7}$$|
|---|---|---|---|---|---|---|
|$$p_
\t
ext{error}$$|0.1|$$
\n
um{2.8e-2}$$|$$
\n
um{2.3e-3}$$|$$
\n
um{1.6e-5}$$|$$
\n
um{7.6e-10}$$|$$
\n
um{1.8e-18}$$|
|---|---|---|---|---|---|---|
|$$p_
\t
ext{error}$$|0.01|$$
\n
um{3.0e-4}$$|$$
\n
um{2.7e-7}$$|$$
\n
um{2.1e-13}$$|$$
\n
um{1.4e-25}$$|$$
\n
um{5.5e-50}$$|
|---|---|---|---|---|---|---|
|$$p_
\t
ext{error}$$|0.001|$$
\n
um{3.0e-6}$$|$$
\n
um{2.7e-11}$$|$$
\n
um{2.2e-21}$$|$$
\n
um{1.4e-41}$$|$$
\n
um{6.1e-82}$$|
|---|---|---|---|---|---|---|
## (4.4)
...
...
@@ -213,6 +341,11 @@ Calculate the differential entropy of a Gaussian process.
{:.question}
A standard telephone line is specified to have a bandwidth of 3300 Hz and an SNR of 20 dB.
$$
\b
egin{align
*
}
\e
nd{align
*
}
$$
### (a)
{:.question}
...
...
This diff is collapsed.
Click to expand it.
_sass/main.scss
+
13
−
0
View file @
b33252ff
...
...
@@ -32,3 +32,16 @@ a:visited {
.question
{
font-style
:
italic
;
}
table
{
margin
:
1
.6em
auto
;
}
table
,
th
,
td
{
border
:
1px
solid
black
;
border-collapse
:
collapse
;
}
th
,
td
{
padding
:
5px
10px
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment