HW 1 QIQC Fall 2023
HW 1 QIQC Fall 2023
]:= ClearAll["Global'*"]
2.0
1.5
F[x]
1.0 Log[x]
1-x
0.5
0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
At a glance we can say the following:
- Log[x] >= 1-x becomes Log 1x ≥ 1 - x becomes 1x ≥ e1-x
Clearly for x= 1, we find that 1 = 1 as expected. So this is the unique value. Below is the “sanity” check:
In[! ]:= FindRoot[- Log[x] - (1 - x), {x, 0.3}]
Out[! ]=
{x → 1.}
The idea of this plot is to show the contrast between overlapping distributions above and disjointed
q
distributions below. We define p = ϵ as the parameter that describes how disjointed p and q are.
p
q
This plot shows that for a variable log base the asymptotic form is the same as Ln. Thus we find that the
relative entropy is non negative for any of these log bases.
In[! ]:= Plot[{Log[2, x], Log[4, x], Log[6, x], Log[8, x], Log[10, x]}, {x, 0, 1},
Frame → True, FrameStyle → Large, FrameLabel → {"x", "Logb [x]"},
ImageSize → Large, PlotLegends → "Expressions", PlotRange → {0, - 15}]
Out[! ]=
0
-2
-4
-6
Logb[x]
log2 (x)
log4 (x)
-8 log6 (x)