问:
Supremum and infimum of a given set without using limits or differentiation
I need to find the supremum and infimum of the following set:
$$\Big\{ y \in \mathbb{R} \Big| y = x + |x - 1| \text{ for some } x \in \mathbb{R}\Big\}$$

I'm unable to use limits or differentiation for questions like this one and I'm unsure of what to do in order to solve it. If anyone is able to help me I would greatly appreciate it, thanks!

By inspection of the equation I know when $x$ is really large and positive that there's not going to be a supremum, and when $x$ is large and negative it's going to tend towards 0. But I'm not really sure how to show this without taking limits and I'm a bit unsure how to proceed.

答:
Consider two separate cases. The first is $x \ge 1$ and the second is $x <1$.

If $x \ge 1$, then
$$y=x + |x-1| = x+x-1 = 2x-1$$
Clearly this has no upper bound, while the lower bound is $y=1$ (when $x=1$).

If $x<1$, then
$$y=x + |x-1| = x-x+1 = 1$$

In other words your set is
$$\left\{ y \in \Bbb R | y \ge 1\right\}$$
which is the interval $[1, + \infty )$.


问:
Two equivalent definitions of continuity
In the book Topology: A Geometric Approach, two equivalent definitions of continuity. The first one is pretty basic. It is this:

Definition $1.1.1$. $f$ is continuous at $x \in X$ if, given $\epsilon>0$, there is a $\delta>0$ so
that $d(x, y) < δ$ implies that $d(f(x), f(y)) < \epsilon$. Here $d$ is the Euclidean distance function:
$$d((x_1,...x_n),(y_1,...y_n))=\sqrt{\sum_{i=1}^{n}(x_i-y_i)^2}$$

Also, second definition is given:

Definition $1.1.2$. $f : X → Y$ is continuous at $x ∈ X$ if given $\epsilon > 0$, there is a $δ > 0$ so that $B_X(\mathbf{x},\delta)\subset f^{-1}(B_Y(f(x),\epsilon))$.

Where a ball of radius $r$ about $z$, denoted by $B(z,r)$, is defined as $\{y\in\Bbb{R}:d(y,x)<r\}$, and $B_C(z,r)$, where $C$ is a subset of $\Bbb{R}^k$, is defined to be $C\cap B(z,r)$. Next, they give the problem to show that the two definitions are equivalent. How can we do that? I am a beginner in topology, and I am sometimes bad in noticing in obvious things. And also the language and notation makes it look like that there's nothing obvious (even if there is something obvious) so please tell in the comments if I didn't notice something that was obvious.

答: Note that$$d(x,y)<\delta\iff y\in B_X(x,\delta)$$and that\begin{align}d\bigl(f(x),f(y)\bigr)<\varepsilon&\iff f(y)\in B_Y\bigl(f(x),\varepsilon\bigr)\\&\iff y\in f^{-1}\left(B_Y\bigl(f(x),\varepsilon\bigr)\right).\end{align}Can you take it from here?

ContentLicense: CC BY-SA 4.0


问:
Equality $(\frac{q}{p})^{\frac{p}{p+q}}+(\frac{q}{p})^{\frac{-q}{p+q}}=(\frac{q}{p})^{\frac{-q}{p+q}}\frac{p+q}{p}$
I have this equality $$(\frac{q}{p})^{\frac{p}{p+q}}+(\frac{q}{p})^{\frac{-q}{p+q}}=(\frac{q}{p})^{\frac{-q}{p+q}}\frac{p+q}{p}$$
in which $p,q >0$.
I've tried to transform in some way but I have done is this:

$(\frac{q}{p})^{\frac{p}{p+q}}+(\frac{q}{p})^{\frac{-q}{p+q}}=(\frac{q}{p})^{\frac{-q}{p+q}}((\frac{q}{p})^{\frac{p-q}{p+q}}+1)$

but I can't understand why $((\frac{q}{p})^{\frac{p-q}{p+q}}+1)=\frac{p+q}{p}$

Is there same rule that I don't know?

答: $$\left(\frac{p}{q}\right)^{\frac{p}{p+q}} + \left(\frac{p}{q}\right)^{\frac{-q}{p+q}} = \left(\frac{p}{q}\right)^{\frac{p+q-q}{p+q}} + \left(\frac{p}{q}\right)^{\frac{-q}{p+q}} = \left(\frac{p}{q}\right)^{\frac{-q}{p+q}+1} + \left(\frac{p}{q}\right)^{\frac{-q}{p+q}} = \left(\frac{p}{q}\right)^{\frac{-q}{p+q}} + \frac{q}{p}\left(\frac{p}{q}\right)^{\frac{-q}{p+q}} = \left(\frac{p}{q}\right)^{\frac{-q}{p+q}}\left(\frac{p+q}{p}\right) $$


问:
Proof an Equation is Wrong

“For all numbers $j$ and $k$, $(j + k)^2 = j^2 + k^2$.”

How would you prove this is wrong??

When I times out the bracket with the number it makes $j^2 + k^2$ but that's wrong.

Should I put a number for $j$ and $k$ and then times it out?

答:
Oh ok, well I think I've got a way of prooving it. I'm going to add a number for each letter  j and k...

$j = 1$

$k = 2$

$(j+k)^2=j^2+k^2$

$(2 + 1)^2 = 3^2 =9$ and $j^2 + k^2 = 1^2 + 2^2 = 1 + 4 = 5$ and $5$ isn't equal to $9$!

ContentLicense: CC BY-SA 3.0

Title: Proof an Equation is Wrong


问:
How to find the relation for $Q_8 ?$
Problem taken from dummit and Foote  section $1.5$

Find a set of generators and relations for $Q_8$.

My attempt :  The quaternion group $Q_8$  is defined  by $ Q_8=\{1,-1,i,-i,j,-j,k,-k\} $

Therefore the  set of generator  are $1,i,j$ and $k$

But here  i don't know how to find  the  relation for  $Q_8$

答:
You can use $1,i,j,k$ to generate $Q_8$, but there are redundancies here. For instance, I think you know that $i^4=1$, so we don't need $1$ in the generating set (in fact, we never need to include the identity in a generating set). Similarly, we have $ij=k$, so we don't need $k$. Indeed, $\{i,j\}$ is a minimal generating set of $Q_8$.

As for relations, well, I gave you two above: $i^4=1$ and $ij=k$. Are these all the relations? Certainly not, since we can't deduce from these what $i^2$, or $-1\cdot j$ are.

A complete multiplication table would be a sufficient list of relations. However, like your generating set, it can be greatly reduced. In this case, the classic list of defining relations of $Q_8$ are
$$
(-1)^2=1\\
(-1)i=i(-1)=-i\\
(-1)j=j(-1)=-j\\
(-1)k=k(-1)=-k\\
i^2=-1\\
j^2=-1\\
k^2=-1\\
ij=k
$$
From these 11 multiplication table entries (as well as the 15 entries given by stating "$1$ is the identity element"), all 64 possible products may be deduced. Often, though, the first four lines here will be considered implicit (what else would $-1$ mean?), and the last one will be multiplied by $k$ on both sides to yield $ijk=-1$. This way we can write
$$
i^2=j^2=k^2=ijk=-1
$$
and say that this defines $Q_8$.

Title: How to find the relation for $Q_8 ?$


问:
There is no scalar field f such that $f'(a;y) > 0$ for a fixed a and for ever non-zero vector y
Prove that there is no scalar field $f$ such that $f'(a;y)>0$ for a fixed vector $a$ and every non-zero vector $y$.</p>

答:
There are many common notations for the directional derivative. You wrote $f'(a;y)$, while
$$D_yf(a):=\lim_{t\to0}{f(a+ ty)-f(a)\over t}$$
is more common. At any rate, when $f$ and the point $a$ in the domain of $f$ are given, the function
$$\phi(y):=D_yf(a)\qquad(y\in{\mathbb R}^n)$$
is a linear function of the vector variable $y$. When $\phi(y)\not\equiv0$ then there are tangent vectors $y$ with $\phi(y)\ne0$, and for such vectors we have
$$\phi(-y)=-\phi(y)\ ,$$
so that we cannot have $\phi(y)>0$ for all $y\ne0$.

When $f$ has a (strong) local minimum at $a$ then in fact
$$f(a+ty)-f(a)>0\qquad \bigl(0<|ty|<h)\ ,$$
but in this case $\nabla f(a)=0$, and $\phi(y)=\nabla f(a)\cdot y\equiv0$.


Title: Equality $(\frac{q}{p})^{\frac{p}{p+q}}+(\frac{q}{p})^{\frac{-q}{p+q}}=(\frac{q}{p})^{\frac{-q}{p+q}}\frac{p+q}{p}$

Body:
I have this equality $$(\frac{q}{p})^{\frac{p}{p+q}}+(\frac{q}{p})^{\frac{-q}{p+q}}=(\frac{q}{p})^{\frac{-q}{p+q}}\frac{p+q}{p}$$
in which $p,q >0$.
I've tried to transform in some way but I have done is this:

$(\frac{q}{p})^{\frac{p}{p+q}}+(\frac{q}{p})^{\frac{-q}{p+q}}=(\frac{q}{p})^{\frac{-q}{p+q}}((\frac{q}{p})^{\frac{p-q}{p+q}}+1)$

but I can't understand why $((\frac{q}{p})^{\frac{p-q}{p+q}}+1)=\frac{p+q}{p}$

Is there same rule that I don't know?


问:
Books that will help me understand Hilbert spaces, inner products and Cauchy Sequences.
Thanks in advance for reading! Basically I'm in a class that focuses on the abstract linear algebra, LMME, singular value decomposition, linear signal representations, linear algebra, and LMMSE for Machine Learning. It's a masters class, and I have taken linear algebra in college but I realize now that my college did not touch on the more abstract concepts of linear algebra like cauchy sequences, inner products, the triangle inequality etc. I rented out the Gilbert Strang Linear Algebra and Linear Algebra done right. Both had some sections on inner products, which helped, but that's it. The Lema Youtube Videos elucidated what an inner product definition is but not within a Hilbert space (good 1 hour youtube series if anyone ends up finding this question).

Is there any other book that could have a more complete introduction to Hilbert Spaces, or the math in general for Machine Learning? Hopefully with derivations of the proofs and the technicalities required for a Hilbert space. My professor notes only say: Left to the student to derive so I'm pretty lost.

答: The most thorough (but accessible) introduction to Hilbert spaces that I've seen is that given by Chapter 3 of Kreyszig's Introductory Functional Analysis with Applications. I find that his style is similar to that of Strang, so I think that if you like one you should like the other.


问:
Need help understanding the motivation for parametric statistical models
First, let me present the definition of a statistical model and a parametric statistical model.

Definition: A statistical model consists of a set of measures $\mathcal{P}$ on a measurable space $(\mathcal{X},\mathbb{E})$.

Definition: A statistical model is said to be parametric if there exists some surjective function $v:\Theta\to\mathcal{P}$, where $\Theta\subseteq\mathbb{R}^{k}$ is called the parameter space. The parameterised model is then given by $\mathcal{P}=\{v(\theta)\mid \theta\in\Theta\}$.

In regards to the first definition, is it not true to say that the goal in statistics is to infer which one of the measures in $\mathcal{P}$ is the true measure of some underlying experiment? And likewise, in regards to the second definition, we would like to infer which of the parameters in $\Theta$ is the true parameter of some underlying experiment, right?

This made me wonder what the motivation for parametric models is; I mean why do we want to infer a parameter instead of a measure?

Additional question: How would one extend the two definitions such that they include random variables?

I hope my questions are somewhat clear, but let me know if they aren't.

答:
This made me wonder what the motivation for parametric models is; I mean why do we want to infer a parameter instead of a measure?

Additional question: How would one extend the two definitions such that they include random variables?

Let me start from your additional question

Assuming that the Probability Measures are dominated by a $\sigma\text{-finite}$ measure, they could be descrtipted by the Density Function $p(z|\theta)$ with respect to this measure.

As a consequence, if A is any events belonging to the $\sigma\text{-Algebra}$ $\mathcal{F}$ we will have

$$\mathbb{P}(A|\theta)=\int_{A}p(z|\theta)d \mu(x)$$

$\theta \in \Theta$

In this situation the Statistical Model can be represented in a simplyfied form:

$$\Big(Z,p(z|\theta),\theta \in \Theta\Big)$$

In other words, for every choice of $\theta \in \Theta$ se select a density function that regulate the "random mechanism" on the experiment data.

Thus we are in front of a "double uncertainty"

around the value of $\theta \in \Theta$

around the experiment data regulated by the density function $p(z|\theta)$ once that $\theta \in \Theta$ is chosen

When $\Theta$ is a subset of an Euclidean Space, the Statistical model is said Parametric, elsewhere it is said Non-Parametric

Why using a parametric model rather than a Non-Parametric one?

This depends on the inference problem you are facing. There are different inference tools that can be applied in the two kind of model, and different information you have before chosing the appropriate tool to solve the problem...

Example 1

Suppose we have a urn with black and white balls but we do not know the % of White balls. to estimate this % we draw (with replacing) $$n$ draws setting

$X=1$ if the drawn ball is W; $\rightarrow\mathbb{P}[X=1]=\theta$

$X=0$ if the drawn ball is B; $\rightarrow\mathbb{P}[X=0]=1-\theta$

In this situation

$$p(x|\theta)=\theta^x(1-\theta)^{1-x}$$

$x=0;1$ and $0\leq\theta\leq 1$

Thus the model is a Parametric one and there is no need to introduce a non parametric one..

The Statistical Model is this

$$\Bigg(\mathcal{X}^{(n)};\theta^{\Sigma_i x_i}(1-\theta)^{n-\Sigma_i x_i};\theta \in [0;1]\Bigg)$$

Here

a) $\mathcal{X}^{(n)}$ is the set of all possible $n\text{-tuples}$ $(x_1,x_2,\dots,x_n)$ where every element can take the values $\{0;1\}$

b) the function $\theta^{\Sigma_i x_i}(1-\theta)^{n-\Sigma_i x_i}$ assigns the probability to any possible $n\text{-tuple}$ given that $\theta$ is known

Example 2

Let's consider the class $\mathcal{F}$ of all the Cumulative Distribution Function (CDF) on $\mathcal{R}$.

If we consider the Statistical Model, as usual using a Sampling with repetition from the Base Model we have

$$\Bigg(\mathcal{R}^n; \prod_{i=1}^{n}F_{X_i}(x_i);F \in \mathcal{F}\Bigg)$$

Concluding, we can say that the difference between Parametric and Non-parametric Models is essentially based on the structure of the CDF's included in $\mathcal{F}$.
If they are all and only the ones derived by a certain analytical law with an unknown parameter (that can be also a vector) thus the model is parametric.


问:
Show that for all $z \in \mathbb{C}$, $f(z)=zf(1)$, if $f$ has the additive property.

Suppose $f$ is an entire function such that $f(z_1+z_2)=f(z_1)+f(z_2)$ for all $z_1,z_2 \in \mathbb{C}$. Show that for all $z \in \mathbb{C}$, $f(z)=zf(1)$.

 Here, by an entire function, we mean a function $f$ that is holomorphic on the whole of $\mathbb{C}$.

 What I have so far is:

 Since $f$ is differentiable everywhere, then for any $z \in \mathbb{C}$, we have $f'(z)=\mathop {\lim }\limits_{h \to 0} \frac{{f(z + h) - f(z)}}{h}$. But $f(z + h)=f(z)+f(h)$, so that $f'(z)=\mathop {\lim }\limits_{h \to 0} \frac{{f(h)}}{h}$. I'm not sure how to proceed from here. I saw somewhere that you should use $f(0)=0$, to get $f'(z)=f'(0)$, but how is $f(0)=0$?

答: Note that$$f(0)=f(0+0)=f(0)+f(0)$$and that therefore $f(0)=0$. So, for each $z\in\Bbb C$,$$f'(z)=\lim_{h\to0}\frac{f(h)}h=\lim_{h\to0}\frac{f(h)-f(0)}h=f'(0).$$Therefore, for some constant $k$, $(\forall z\in\Bbb C):f(z)=f'(0)z+k$. But $k=f(0)=0$. And then $f(1)=f'(0)\times1=f'(0)$. So, indeed, we always have $f(z)=zf(1)$.


问:
Pigeonhole principle in a congruence problem
Let $m$ be a positive integer, let $1\leq n \leq m$ be an integer coprime to $m$. I want to show that there exists an integer $l \in \{1,2,\ldots,\lceil \sqrt{m}\rceil\}$ such that $ln \equiv i \pmod m$ with $1\leq i\leq \sqrt{m}$.

What I have in hand is that since $(m,n)=1$, so for any $l\not\equiv l' \pmod m$, we always have $ln\not \equiv l'n \pmod m$. Then I think I need to find $l_{1},l_{2} \in \{1,2,\ldots,\lceil \sqrt{m}\rceil+1\}$ such that $l_{1}n-l_{2} n\equiv n(l_{1}-l_{2})\equiv i$ with $1\leq i\leq \sqrt{m}$. But I am not sure how to use pigeonhole here to obtain the conclusion.

Thanks for any help!

答:
Let $k=\lceil\sqrt{m}\rceil$ then $k^2>m$. Divide the elements in $\mathbb{Z_m}$ into $k$ bins:

$1 \text{ to } k$

$k+1 \text { to } 2k$

...

$k(k-1)+1 \text { to } m$.

Can you end it now?


问:
Convention for notation and set representation, for set of all $m\times n$ $F$-valued matrices.
Is it conventional/understandable to denote the set of all $m\times n$ matrices over $F$ as $\left(F^n\right)^m$, as $m$-tuples of column vectors, just like $n$-tuples are used as $n$ dimensional column vectors?  Or is $\left(F^m\right)^n$, row-wise, the convention?

I've seen $F^{m\times n}$, or even $F^{mn}$, which seem so ambiguous, as these just look like vectors of $m\cdot n$ dimensions.

Or are matrices represented an other way entirely?  I'm just curious as to what the conventions of notation and representation are.

答:
$F^{m \times n}$ is universally (among the mathematical community) understood to mean the set of matrices with $m$ rows and $n$ columns; the usage of the symbol $\times$ stands out and is rarely misinterpreted as simple multiplication. In fact, $\times$ is almost never used to denote multiplication except in the specific context of numerical arithmetic (as in $12 \times 11 = 132$).

None of the other notations you suggest would be understood in this way unless you provided further explanation. In fact, my first guess at the meaning of $(F^n)^m$ is that you are looking at block vectors consisting of $m$ blocks of length-$n$ vectors. Effectively, this amounts to seeing $(F^n)^m$ as $F^{mn}$ (vectors of length $n$), which is precisely the misinterpretation you're trying to avoid.

Another common notation that you may prefer (used for instance by Horn and Johnson in their texts) is $\mathcal M_{m,n}(F)$.


问:
For an assertion $P(n)$ where $n\ge2$, the following information is given,
There is no formal Induction assertion given. But there is an assertion $P(n)$ for $n\ge2$.

(a)We know that $P(2)$ is true.

(b) we know for any $a\ge2$, truth of $P(a)$ implies truth of $P(2a)$.

(c) we know for any $b\ge3$, truth of $P(b)$ implies truth of $P(b-1)$.

We have to use induction to prove that $P(n)$ is true for all $n\ge2$.

My Solution: I use the Well-ordering property (WOP) of the natural numbers.

T = { k>= 2; p(k) is True}

F= {l>= 2, p(l) is False}

so T U F = N(all natural Numbers), and T∩F = ∅

Case 1: (F = ∅ Then T = N so P(n) is always True)

Case 2: (F ≠ ∅ Then ∅ ≠ F ⊆ N s.t there is an element m = min F (WOP))

now, m ≠ 2 because 2 ∈ T (by Hypothesis)

I cant figure out how to use p(a) and p(b) to prove the statement p(n).

答:
I think it is easiest to prove using strong induction.

Induction hypothesis: Suppose $P(2), P(3), ..., P(n-1)$ are true.

From this we need to deduce that $P(n)$ is true.

If $n$ is even, then $n=2a$ for some $a<n$. By the induction hypothesis, $P(a)$ is true. From statement (b) it follows that $P(2a)=P(n)$ is true.

If $n$ is odd, then $n+1=2a$ for some $a<n$. As before it follows that $P(2a)=P(n+1)$ is true. From statement (c) with $b=n+1$ it follows that $P(b-1)=P(n)$ is true.

In either case, $P(n)$ is true. Therefore by induction $P(n)$ is true for all values of $n\ge2$.


问:
Find, in terms of $f(x)$, $\int\lvert f'(x)\rvert dx$

Find, in terms of $f(x)$, $$\int\lvert f'(x)\rvert dx$$

I don't know if this question has an answer, it just caught my fancy and I'm wondering if it's possible.

I know that
$$\frac{d}{dx}\lvert f(x)\rvert=\frac{f(x)f'(x)}{\lvert f(x)\rvert}$$

Do you think that could be useful?

Thanks for your help.

答:
Assuming, for simplicity, that $f'$ has a finite number of zeros $z_1, \cdots, z_n$, and denoting
$$
I_0=(-\infty, z_1), I_1=(z_1, z_2), \cdots, I_n = (z_n, +\infty)
$$

$|f'(x)|$ has a primitive defined on each $I_k$ by $ F(x) = \textrm{sgn}(f'(x)) f(x) + C_k$. Note that there is not a single integration constant, there can be a different constant on each interval.


问:
Automorphism of $K$ extending to $K[x_1,\dots,x_n]$.
I think it is well known that if $K$ is field, and $\sigma \in Aut(K)$,
then the extended map  $\sigma: K[x,y] \rightarrow  K[x,y]$, given by
$\sum a_{ij}x^iy^j \mapsto \sum \sigma(a_{ij})x^iy^j$ is an isomorphism.

Proving that

$$\sigma(f(x,y)\cdot g(x,y))=\sigma(f(x,y))\cdot \sigma(g(x,y))$$

was particularly challenging for me. I had to play a bit with the monomials of $f$ and $g$, and arrange them in a suitable way. I don't even know if I can extend that procedure to
the general ring $K[x_1,\dots,x_n]$.

I was wondering if someone know of  an  alternative (preferably neat)  proof of

$\sigma(fg)=\sigma(f)\sigma(g)$

答:
Hint

$$K[x_1,\cdots,x_n] = K[x_1][x_2,\cdots,x_n] = K[x_1][x_2]\cdots[x_n]$$

If you prove this, and use what you proved for one variable, then by induction you can extend $\sigma$ $n$ times.


问:
Root of $x = \tanh(a x)$
Consider the equation:

$$x = \tanh(a x)$$

Given $a\in\mathbb{R}$, let $x=f(a)$ denote the maximum non-negative solution of this equation.

Is there a name for the function $f(a)$? Or can it be expressed in terms of known functions?

This equation comes up in statistical physics, for instance in the Curie-Weiss model. See Eq. 2.12 in https://www.unige.ch/math/folks/velenik/smbook/Curie-Weiss_Model.pdf.

答:
You want to solve for $x$ the equation $$x = \tanh(a x)\tag1$$ which, being transcendental, will require some numerical method and, as usual, a reasonable estimate of the solution.

However, from a formal point of view, there is an anlytical solution. Let $ y=ax$  and rewrite $(1)$ as
$$\tanh(y)=\frac{e^{2 y}-1}{e^{2 y}+1}= \frac ya\tag 2$$ that is to say
$$e^{-2y}=-\frac{y-a}{y+a} \tag 3$$ which has solutions in terms of the generalized Lambert function (have a look at equation $(4)$ in the linked paper).

This being said, it is not very useful from a practical point of view.

For iterative methods, you could use, as an approximation, a $[2n,2n]$ Padé approximant. For example
$$\frac{\tanh (y)}{y}\sim \frac{y^4+105 y^2+945}{15 \left(y^4+28 y^2+63\right)}=\frac 1a$$ is more than decent for $0.2 \leq \frac 1a \leq 1.0$ and let you with solving a quadratic equation in $y^2$.

For sure, you could have better but it will require at least to solve a cubic or quartic in $y^2$.

Title: Root of $x = \tanh(a x)$


问:
DNF to CNF of a simple expression
I have a formula like this:
$$\bigvee_{\substack{i \in [1,...,m] \\ j \in [1,...,m]}} x_{i} \wedge x_{j}$$
What is the equivalent formula in CNF (conjunctive normal form)?

答:
HINT

First see how this goes for a simple concrete example, and then try and make out the general pattern from that.

So, for a simple example, suppose $m=2$. So that means that you are dealing with the following expression:

$(x_1 \land x_1) \lor (x_1 \land x_2) \lor (x_2 \land x_1) \lor (x_2 \land x_2)$

Now, note that by Idempotence, $(x_1 \land x_1)$ is equivalent to just $x_1$.

Also, by Absorption, you have that $x_1 \lor (x_1 \lor x_2)$ is equivalent to just $x_1$.

So, the whole expression is equivalent to simply $x_1 \lor x_2$ ... which is in CNF.

Now, what do you think happens if we do this for any $m$ in general?

Title: DNF to CNF of a simple expression


答:
The right way to do this is to invoke the universal property of the polynomial ring. If $R$ is any commutative ring with identity and $S=R[X_1,\ldots,X_n]$, then $S$ is characterized up to isomorphism by the following property: for every commutative ring $R^\prime$ with identity and every ring homomorphism $\varphi:R\rightarrow R^\prime$ sending $1_R$ to $1_{R^\prime}$ and any $n$ elements $r_1^\prime,\ldots,r_n^\prime$, there is a unique ring homomorphism $\psi:S\rightarrow R^\prime$ with $\psi(r)=\varphi(r)$ for each $r\in R$ and $\psi(X_i)=r_i^\prime$.

This is the way one defines homomorphisms out of polynomial rings. So in your case, you would take $R=k$ and $R^\prime=S$ and let $k\rightarrow S$ be the automorphism of $k$, $\sigma$, followed by the inclusion $k\hookrightarrow S$. This extends uniquely to a ring homomorphism $\psi:S\rightarrow S$ restricting to $\sigma$ on $k$ and sending each $X_i$ to $X_i$, by the universal property, and you can check directly that it is an automorphism because $\sigma$ is an automorphism (you can also check that is the map you want, applying $\sigma$ to each of the coefficients of a polynomial). But you don't need to check that $\psi$ is a homomorphism. It is a homomorphism by definition.

Title: Automorphism of $K$ extending to $K[x_1,\dots,x_n]$.

Body:
I think it is well known that if $K$ is field, and $\sigma \in Aut(K)$,
then the extended map  $\sigma: K[x,y] \rightarrow  K[x,y]$, given by
$\sum a_{ij}x^iy^j \mapsto \sum \sigma(a_{ij})x^iy^j$ is an isomorphism.

Proving that

$$\sigma(f(x,y)\cdot g(x,y))=\sigma(f(x,y))\cdot \sigma(g(x,y))$$

was particularly challenging for me. I had to play a bit with the monomials of $f$ and $g$, and arrange them in a suitable way. I don't even know if I can extend that procedure to
the general ring $K[x_1,\dots,x_n]$.

I was wondering if someone know of  an  alternative (preferably neat)  proof of

$\sigma(fg)=\sigma(f)\sigma(g)$


问:
Characteristic function of the logistic distribution?
I recently came across a question in my graduate course where we have to calculate the characteristic function for the Logistic distribution. The Logistic distribution we are working with is given by the following PDF:
$$
f(x) = \frac{e^{-x}}{(1 + e^{-x})^2}.
$$

The way that I went about doing this is the following:
$$E\left[ e^{itX} \right]
= E[\cos(tX)] + iE[\sin(tX)].
$$
The $E[\sin(tX)] = 0$.

The real problem for me comes when calculating $E[\cos(tX)]$. I tried to express $\cos$ in its exponential representation, but I didn't get too far with that. Upon plugging this integral into WolframAlpha, it says that the hypergeometric function is used for it. Any thoughts on how I can analytically compute this? I'd be happy to use the hypergeometric function, but I don't quite see the connection between that and $\text{csch}(x)$, which is part of the result that WolframAlpha gives (and this result matches the characteristic function listed for the Logistic distribution).

Edit: I would like to be able to do this problem without a computer and solely pencil and paper. This is what I mean by an analytic solution.

答:
This integral can be evaluated with elementary steps and knowledge of basic facts about Beta and Gamma functions (such as the most elementary portions of Whitaker & Watson, A Course of Modern Analysis (4th Ed.) Chapter 12).

In the following I emulate the approach taken to evaluate a related integral at https://math.stackexchange.com/a/2828293/1489 .

First, substitute $y = e^{-x}:$

$$\begin{aligned}
E\left[e^{itX}\right] = \int_{-\infty}^\infty e^{itx}\,\frac{e^{-x}}{(1+e^{-x})^2}\,\mathrm{d}x
= \int_0^\infty y^{-it}\,\frac{y}{(1+y)^2}\,\frac{\mathrm{d}y}{y}
= \int_0^\infty \frac{y^{-it}}{(1+y)^2}\,\mathrm{d}y.
\end{aligned}$$

This is a well-known expression for the Beta function.  Simplify it using the basic relations $\Gamma(2)=1,$ $\Gamma(1+z)=z\Gamma(z),$ $\Gamma(z)\Gamma(1-z)=\pi\csc(\pi z),$ and $\csc(ix) = i\operatorname{csch(x)}:$

$$\begin{aligned}
\int_0^\infty \frac{y^{-it}}{(1+y)^2}\,\mathrm{d}y &= B\left(-it+1, 1-it\right) & \\
& =\frac{\Gamma(1-it)\Gamma(1+it)}{\Gamma(2)}  \\
&= \Gamma(1-it)\Gamma(1+it) \\
&= (-it)\Gamma(-it)\Gamma(1+it)\\
&= -it \pi \csc(\pi t i) \\
&= \pi t \operatorname{csch}(\pi t).
\end{aligned}$$

This procedure readily generalizes to integral powers larger than $2$ in the denominator.


问:
How to use $\lesssim$ when using exponents
I found the explanation for the $\lesssim$ in this question:

What does a tilde underneath an inequality mean?

My problem is of the following nature:

$g_t(y)$ is a stochastic function and $M_t$ some stochastic process, where $t\in[0,T]$ is the time parameter. Then there is the growth condition
\begin{align*}
|g_t(y)|\lesssim 1+|y|+|M_t|.
\end{align*}
Now, when squaring $g_t(y)$ I wonder, whether the growth condition expands to
\begin{align*}
|g_t(y)|^2\lesssim 1+|y|^2+|M_t|^2 \text{ or }\\
|g_t(y)|^2 \lesssim (1+|y|+|M_t|)^2.
\end{align*}

The reason for my question is, that I found an inequation, where they used the first inequation. This triggered the thought, that maybe $g_t(y)$'s growth is determined in the different parameters independently and thus one can square them individually.

答:
Both options are valid, because for any non-negative real numbers $a,b,c$, we have
$$a^2+b^2+c^2\le(a+b+c)^2\le 3(a^2+b^2+c^2)$$
So each of $1+|y|^2+|M_t|^2$ and $(1+|y|+|M_t|)^2$ is bounded by a constant multiple of the other.


问:
Sequence $x_n$ converges in ($\mathbb{R}, d$) $\iff$ $x_n$ converges in ($\mathbb{R}, d^*$)
Let $\rho: \mathbb{R} \to \mathbb{R}$ be defined as $\rho(z) := \frac{z}{1+|z|}$. We further define $d$,$d^*: \mathbb{R} \times \mathbb{R} \to \mathbb{R}$ as $d(x,y) := |x-y|$ and $d^*(x,y) := |\rho(x) - \rho(y)|$.

I have already shown that $d$ and $d^*$ are metrics over $\mathbb{R}$. Now what I need to show is the following:

Let $x_n$ be a sequence of real numbers. Show that $x_n$ converges in $(\mathbb{R}, d)$ $\iff$ $x_n$ converges in $(\mathbb{R}, d^*)$

My approach so far: Let $x$ be the limit of $x_n$ in $(\mathbb{R}, d)$. Then by definition it is true that $\forall \varepsilon > 0$ $\exists N\in \mathbb{N}$ such that $\forall n \geq N$: $|x_n - x| < \varepsilon$. Now let $\varepsilon > 0$ be arbitrary, then we have

$$|\rho(x_n) - \rho(x)| = |\frac{x_n}{1+|x_n|} - \frac{x}{1+|x|}| = \frac{|x_n + x_n|x| - x - x|x_n||}{1 + |x| + |x_n| + |xx_n|} \leq \frac{|x_n - x| + |x_n|x| - x|x_n||}{1 + |x| + |x_n| + |xx_n|}$$

Now we know that an $N \in \mathbb{N}$ exists, such that for all $n \geq N$: $\frac{|x_n - x| + |x_n|x| - x|x_n||}{1 + |x| + |x_n| + |xx_n|} < \frac{\varepsilon + |x_n|x| - x|x_n||}{1 + |x| + |x_n| + |xx_n|}$.

How do I proceed from here?

答: Hint : $\rho$ is a homeomorphism from $\mathbb{R}$ to $(-1,1)$. Therefore, for a sequence $(x_n)$ of real numbers, and $x \in \mathbb{R}$, then $$\lim_{n \rightarrow +\infty} x_n = x \Longleftrightarrow \lim_{n \rightarrow +\infty} \rho(x_n) = \rho(x)$$


问:
Set of fixed points is convex proof
i am stuck as to how the author jumps from the 2 inequalities to two equalities in the following theorem.

For context i state theorem 1.11:
Let X be a uniformly convex Banach space and $C \subset X$ which is nonvoid,closed,convex and bounded.If $f: C\rightarrow C$ is a non expansive map then f has a fixed point.

I understand how the inequalities are derived but not how these inequalities imply the equalities.

Presumably,i would like to show that $||f(x_t)-f(x_0)||<t||x_1-x_0||$ is false and so the equality has to occur.
Any hint?

Title: Set of fixed points is convex proof

Body:
You have
$$||x_1 - x_0|| = ||f(x_t) - x_0 + x_1 - f(x_t)||\leq ||f(x_t) - x_0|| + ||f(x_t) - x_1||$$
by triangle inequality. Hence
$$||x_1 - x_0|| \leq ||f(x_t) - x_0|| + ||f(x_t) - x_1||\leq $$
$$ \leq t||x_1 - x_0|| + (1-t)||x_1 - x_0|| = ||x_1 - x_0||$$
Thus we have $=$ everywhere instead of $\leq$.


问:
Deriving A implies B from Not A
My logic textbook has the following example showing how to derive $A \to B$ from $\neg A$:

First we assume $A$ and use the conjunction introduction rule which results in a contradiction $[A] \land \neg A$. Now we can use the negation introduction rule to get $\neg \neg B$. With the negation elimination rule we get $B$ and after using the implication introduction rule we have $A \to B$.

However, I'm confused when it comes to using the negation introduction rule to get $\neg \neg B$ from $A \land \neg A$. While $A \land \neg A$ is clearly a contradiction resulting from our (temporary) assumption $A$, shouldn't this result the opposite of our assumption, that is $\neg A$, being true? Where does the $\neg \neg B$ come from? Quoting my textbook: "When we have derived a contradiction $B \land \neg B$ from the temporary assumption $A$, we consider $\neg A$ proved."

答:
Not having the proof in front of me, I can't really comment on the proof you are referring to, as a whole, as I can only conclude that you are perhaps mixing up proofs?

Your post begins by stating that you are concerned about a proof in your text about deducing $A\rightarrow B$ from the premise $\lnot A$. And you start by suggesting that the proof proceeds by making the assumption $A$.  With this assumption, together with the premise $\lnot A$, we have conjunction introduction to get $A \land \lnot A$.

But then you go on to discuss $\lnot \lnot B$, and in your second paragraph, refer to the result of having proved $\lnot A$. What I'm confused about is why set out to prove $A \implies B$, given $\lnot A$, and conclude, $\lnot A$ is therefore true?

What I suspect your text is proving is something like the following:

$\lnot A\quad \text{premise}$

$\;\;\;*\;\;A\quad \text{assumption}$

$\;\;\;*\;\;*\;\;\lnot B\quad\text{assumption}$

$\;\;\;*\;\;*\;\;A \land \lnot A \quad\text{$1, 2$, conjunction introduction}$

$\;\;\;*\;\;\lnot\lnot B \quad\text{$3, 4$, negation introduction}$

$\;\;\;*\;\;B\quad\quad\text{$5$, negation elimination}$

$A\rightarrow B \quad\text{$2-6$, conditional introduction}$

Note that following $(4)$, having derived a contradiction, namely $A \land \lnot A$, we can deny any assumption occuring prior to the contradiction.

However, we can alternatively start with the given premise, $\lnot A$.  By disjunction introduction $\lnot A \lor B$ then follows. But $$\lnot A \lor B \equiv A\rightarrow B,$$ thus proving that from $\lnot A$ we can derive $A \rightarrow B$.

Title: Deriving A implies B from Not A


问:
Compare two $a$ and $b$ LPP, and show that if $a$ has non empty feasible region the optimal value of $a$ is either equal to zero or $a$ is unbounded
I have the following information with me consider two LPP $a$ and $b$.

$(b)$ is a standard non empty LPP : $(b)$  min (${c^{T} x, x \in P }$),  $P=\{x \in \mathbb{R}^n: Ax=b, x \ge 0\}$where $A \in \mathbb{R}^{m×n}$, $b \in  \mathbb{R}^m$ and $c \in  \mathbb{R}^n$

let $\hat{x} \in P$ be an arbitary feasible solution. Let $B = (\{j = \{1,\ldots,n\} : x_j  >0 \}$ and $N = \{j = \{1,\ldots,n\} : x_j  =0 \}$.

Consider the LLP
$(a)$  min ${c^{T}_B d_{B} + c^{T}_N d_{N}}$

s.t. $A_{B} d_{B} + A_{N} d_{N} = 0  $ and $d_{N} \ge 0$

where $c_{B} \in  \mathbb{R}^{|B|} $,  $c_{N} \in \mathbb{R}^{|N|} $ denote the sub vectors of  $c \in  \mathbb{R}^{n} $ corresponding to indices $B$ and $N$ and $d_{B}$ and $d_{N}$ are decision variables.

We need to show that $(a)$ has a nonempty feasible region and the optimal value of $(a)$ is either equal to 0 or it is unbounded.

x is an optimal solution of (b) if and only if optimal value of (a) is zero

My approach to this Question is to show that (a) has a finite optimal value(not able to show it is 0) or it is unbounded.

To prove that we would assume that $ x \in  P$ has a rank $k < n$. We show that there exists y $\in$ P such that, $c^T y \le c^T x$. We let $I = \{i:a_i x = b\}$
where $a_i$ is the $i$-th row in A

We now choose a non zero d $\in R^n$ orthogonal to $a_i$, i $\in I$

We suppose that $c^T d <0$

We consider a half line for $k > 0 $ a scalar $ y = x + k d$. As all points on the half line satisfy  $a^T x_i = b \implies a^T y_i = b, i \in I$

if the entire half space will be contained in $P$ then the optimal cost will be $- \infty $ ie unbounded.

This has what I have so far done, I cannot proof the if not unbounded, then the optimal value of (a) is equal to $0$

答:
Clearly, a feasible solution for $(a)$ is let $d=0$ of which it means the optimal value is non-positive.

Hint to complete the argument:

Verify this: If $d$ is a feasible solution of $(a)$ and $k>0$, show that  $kd$ is also a feasible solution to $(a)$.

Use the lemma above to show that if the optimal value is non-zero, then it is unbounded.

 Further guide: if the objective function evaluated at $d$ is $y$, examine what is the objective function evaluated at $2d$, what about $kd$?

Remark: Description of $(b)$ is just meant to define $(a)$, focus on proving something simpler like:

"Prove that $\min c^Tx$ subject to $Ax=0$ either attain the optimal value of  $0$ or it is unbounded."

Edit after attempt is shown:

We first prove that the $(a)$ is feasible. Note that $0$ is a feasible solution and hence the optimal value is non-positive.

Suppose there exists a $d$ such that it is feasible to $(a)$, then let $k>0$, then $kd$ remains feasible since $kd_n \ge 0$ and $A_B(kd_B)+A_N(kd_N)=k(A_Bd_B+A_Nd_N)=k0=0$.

Furthermore, $c^T(kd)=k(c^Td)$. Hence suppose there is a $d$ such that $c^Td < 0$, then $c^T(kd)=k(c^Td)$, that is the objective function get scaled by $k$.  We can let $k$ be arbitarily large and hence if a negative value can be obtained, then it is unbounded. Otherwise the optimal value is $0$.

Comment about your attempt:

What does it mean by $x$ has rank $k$? For $x$ to be feasible, clearly $I=\{1,\ldots, m\}$.

What if $A$ is the identity matrix? In that case, you won't be able to construct your $d$.


问:
Probability: Inventory exercise
A computer store is getting ready to order a batch of computers to sell during
the coming summer. The wholesaler is giving the store a good price on the computers
because they are being phased out and will not be available after the summer.
Each computer will cost the store \$550 to purchase, and they will sell it for \$995.
The wholesaler has also offered to buy back any unsold equipment for \$200. The
manager of the computer store estimates that demand for the computer over the
summer is a Poisson random variable. How many computers should be purchased
by the store in preparation for the summer if the mean demand for the summer is 5?</p>

答:
It is well known that in the Newsvendor Inventory Problem the optimum quantity is the following

$$Q^*=F^{-1}\Big(\frac{995-550}{995-350}\Bigg)=F^{-1}(0.69)$$

Where $350=550-200$ is the sell-back cost

Considering a poisson distribution: $X\sim Po(5)$ you have that

$$\sum_{x=0}^5 \frac{e^{-5}5^x}{x!}\approx 0.62$$

$$\sum_{x=0}^6 \frac{e^{-5}5^x}{x!}\approx 0.76$$

the optimum quantity is between 5 and 6, say $x=6$

Title: Probability: Inventory exercise


问:
Prove $\forall \epsilon >0 \quad log(log(n)) = O(log^\epsilon(n))$
I need to prove that $$\forall \epsilon >0 \quad log(log(n)) = O(log^\epsilon(n))$$.

I started by citing a known result which is  (*)
$$\forall \epsilon >0 \quad log(n) = O(n^\epsilon)$$

Then we can say that $\exists n_0, c$ such that $\forall n>n_0 \quad log(n) \leq c \cdot n^\epsilon$

Then continued with applying $log(n)$ function on the above inequality (since $log(n)$ is monotone the inequality remains)

$log(log(n)) \leq log(c) + log(n^\epsilon)$

Since $log(n)$ is unbound and approaches infinity we can say that $\exists k$ such that $log(c) + log(n^\epsilon) \leq k \cdot log(n^\epsilon)$

So to conclude we arrived at $log(log(n)) \leq k \cdot log(n^\epsilon)$

Not sure how to continue and if what I have done so far is on the right path.

EDIT: Is it valid to substitute $n$ with $log(t)$ and immediately prove this claim (using *)?

答:
I think you can take a very direct approach starting from the following statement: We have $\log \log \log n = \mathcal{O}(\log \log n)$. Hence for fixed $\epsilon > 0$ we get $\log \log \log n \leq \epsilon \log \log n$ for $n$ large enough. Rewriting the RHS yields $\log ((\log n)^{\epsilon})$. Now apply $\exp$ on both sides to conclude:

$$\exp \log \log \log n \leq \exp \log ((\log n)^{\epsilon})$$

for $n$ large enough. As a last step, $\exp$ and $\log$ cancel on both sides.


问:
Crafty solutions to the following limit
The following problem came up at dinner, I know some ways to solve it but they are quite ugly and as some wise man said: There is no place in the world for ugly mathematics.

These methods are using l'Hôpital, but that becomes quite hideous very quickly or by using series expansions.

So I'm looking for slick solutions to the following problem:

Compute $\displaystyle \lim_{x \to 0} \frac{\sin(\tan x) - \tan(\sin x)}{\arcsin(\arctan x) - \arctan(\arcsin x)}$.

I'm curious what you guys will make of this.

Title: Crafty solutions to the following limit

Body:
By Taylor's series we obtain that

$\sin (\tan x)= \sin\left(x + \frac13 x^3 + \frac2{15}x^5+ \frac{17}{315}x^7+O(x^9) \right)=x + \frac16 x^3 -\frac1{40}x^5 - \frac{55}{1008}x^7+O(x^9)$

and similarly

$\tan (\sin x)= x + \frac16 x^3 -\frac1{40}x^5 - \frac{107}{5040}x^7+O(x^9)$

$\arcsin (\arctan x)= x - \frac16 x^3 +\frac{13}{120}x^5 - \frac{341}{5040}x^7+O(x^9)$

$\arctan (\arcsin x)= x - \frac16 x^3 +\frac{13}{120}x^5 - \frac{173}{5040}x^7+O(x^9)$

which leads to the result.


问:
Showing that an ideal is equal to $\mathbb{Z}[i]$
Let $a$, $b$, and $c$ be three elements of $\mathbb{Z}[i]$, the ring of Gaussian integers. We define the following to be  subset of $\mathbb{Z}[i]$:

$$(a,b,c)=\{ax+by+cz:\ x,y,z \in\mathbb{Z}[i]\}.$$

We know that $(a,b,c)$ is an ideal of $\mathbb{Z}[i]$. Show that the ideal $(-1+3i, -1+5i,-4+7i$) is equal to $\mathbb{Z}[i]$ .

What I have done so far:

I have factorised the three elements into a product of irreducible elments in $\mathbb{Z}[i]$:

$(-1+3i)=(1+i)(1+2i)$, $(-1+5i)=(1+i)(2+3i)$,$(-4+7i)=(2+3i)(1+2i)$

However I don't know how to show that the ideal is equal to  $\mathbb{Z}[i]$. I think it might have something to do with the norms of the three elements in the ideal...

答:
As it was pointed out in the comments: In general, if $R$ is a commutative ring with identity and $I\subset R$ is an ideal, then $I=R$ if and only if $1\in I$.

So it suffices to show that there exist $a,b,c\in\Bbb{Z}[i]$ such that
$$a(-1+3i)+b(-1+5i)+c(-4+7i)=1.$$


问:
Crossing Number of K(9, 9)
I'm studying graph theory and I can't figure out how to solve this problem. I'm not pretty good at graphs and it's pretty hard for me to solve this kind of problems. I would highly appreciate if you can hit me up with some explanation. Thanks in advance!

Question: Is it true that every k-connected ($k>1$) graph which does not have a Hamiltonian cycle has a cycle that contains $k$ independent vertices and their neighbors? This is known to be true for $k = 2$ and $3$. For example, the graph to the right is 3-connected but not Hamiltonian. And the dotted cycle shown contains $3$ independent vertices (the three vertices which are lighter in color) and thier neighbors. To see that it is not Hamiltonian, notice that this graph is just the complete bipartite graph $K(3,4)$.

答:
Let's first think about the case when $G$ is connected. If $|V| < k$, then we certainly can't partition $V$ into $k$ non-empty subsets, so let's assume $|V| \geq k$.

I claim that in this case there is a suitable partition. To show this, it is enough to find a subset $V' \subseteq V$ with $|V'| = k-1$ such that $G - V'$ is connected: then we can take $V_1$ to be $V - V'$ and we can $V'$ into sets with one element each to get $V_2,\dots,V_k$. How do we find such a $V'$? Intuitively, we take a spanning tree of $G$ and "snap off" the leaves one by one until we have snapped of $k-1$. Formally, we can traverse $G$ according to some algorithm (e.g. DFS). Let $v_1, \dots, v_n$ be the order in which we visit the vertices during this traversal. The fact that we could traverse the vertices in this order shows that the first $n-(k-1)$ vertices induce a connected subgraph of $G$, so we can take $V'$ to be the last $k-1$ vertices.

What if $G$ is not connected? Well, if it has more connected components than $k$, then there cannot be such a partition (why?). Otherwise (provided that $|V| \geq k$) we can use essentially the same idea: take a spanning forest of $G$ and snap off leaves until the number of leaves snapped of plus the number of the remaining connected components is $k$. Again, this can be done by using a traversal order, only in this case it requires some thought to determine how many leaves we need to snap off.

Title: Crossing Number of K(9, 9)


问:
Is there any finite deductive system for propositional logic which only uses unary rules?
I'm not sure if this has ever been proven/disproven, but, assuming the usual grammar of propositional logic, is there any deductive system which derives exactly the tautologies of classical logic while only using finitely many unary rules and axiom schemes? This would of course be equivalent to proving a similar statement for usual kinds of intutionistic, minimal or
even subminimal logic.

By a unary rule, I mean two propositional formulas (premise and conclusion) built from variables and the usual connectives.

A concept of substitution needs to be implicitly assumed,
as well as syntactic rules.
The restriction to unary rules explicitly forbids the use of binary rules like modus ponens or usual conjunction introduction, as their premises consist both of an implication and its antecedent.

I don't think such a system exists, simply because I cannot think of any real "pattern" in true implications which would apply in such a case. Has any similar statement been proven or is there
some reasonably difficult approach to such questions?

答:
If equivalence rules are allowed, then yes.

You could have one inference rule that infers a tautology from nothing (e.g. Law of Exclude middle: $\vdash \phi \lor \neg \phi$), and other than that use equivalence rules as inference rules. Since we know that a relatively small set of equivalence rules can transform any statement into any equivalent statement, that starting tautology can be transformed into any other tautology.


问:
For matrix $A$ , find $m$, $n$ , $r$ in case that $mA^2 + nA + rI=0$
I have a matrix  $A= \begin{pmatrix} 5 & 3 \\ 2 & 1 \end{pmatrix} $ and I should find $m$, $n$, $r$ in case that $A^2+nA+rI=0$ ($I$ is Identity matrix) . and after that find $A^{-1}$
with that relation .

I really tried to find those variables but i do not know how to solve that with just one equation.
Could you help me find $m$ ,$n$ , $r$ in every way you think is true.

答: Hint : $m=1$, $n=-\mathrm{Tr}(A)$ and $r=\det(A)$ always work. This is called Cayley-Hamilton theorem.


答: Hint: Compute the characteristic polynomial and apply Hamilton-Cayley.

Title: For matrix $A$ , find $m$, $n$ , $r$ in case that $mA^2 + nA + rI=0$

Body:
I have a matrix  $A= \begin{pmatrix} 5 & 3 \\ 2 & 1 \end{pmatrix} $ and I should find $m$, $n$, $r$ in case that $A^2+nA+rI=0$ ($I$ is Identity matrix) . and after that find $A^{-1}$
with that relation .

I really tried to find those variables but i do not know how to solve that with just one equation.
Could you help me find $m$ ,$n$ , $r$ in every way you think is true.


问:
Question on constant velocity (easy)
Two animals are charging at each other. They stand 20 m apart. The smaller animal charges at 6.5 m/s. The larger animal was measured to run 24 m in 3 s. At what position will the two sheep collide?

So far I have this:

$v_L = 8 m/s$, $v_s=-6.5 m/s$

$x_{0_L}= 0$, $x_{0_s}=20$

$x_L=8t$, $x_s=-6.5t+20$

I can set $x_L$ and $x_s$ equal to each other and solve. I know how to do this.

However I am confused because the solution sets these two equations equal:

$$8t=6.5t+20$$

instead of $$8t=-6.5t+20$$

Why isn't the velocity of one of the animals opposite of the other? I thought they would be opposite since they are running towards each other.

答: It is a typo.  The one with the negative sign is correct.  The solution should have $t=\frac{20}{14.5}$ instead of $\frac {20}{1.5}$.  That would indicate which the solution is using, whether or not the negative sign is shown.

Title: Question on constant velocity (easy)


问:
Finding the limit of an expression without the use of L'Hopital
I have the following question:

Calculate the $\lim_{x \to 0} \frac{1-\cos(2x)}{x}$

So to begin I rewrote it as:
$$\lim_{x \to 0} \frac{2\sin^2(x)}{x}$$

& I'm wondering whether it would be acceptable to use the small-angle approximation for sine here since the limit tends towards 0 so it would fit the description. However if anyone has an alternative method that doesn't require any approximation I'd love to hear it. Thank you.

答:
Because $|\sin(x)|\leq |x|$ for all $x \in \mathbb{R}$, you have
$$\left|\frac{2\sin^2(x)}{x} \right| \leq 2|\sin(x)|$$

so you can conclude by squeeze theorem.


问:
$\int_0^1 \frac{{f}(x)}{x^p} $ exists and finite $\implies f(0) = 0 $
Need some help with this question please.

Let $f$ be a continuous function and
let the improper inegral
$$\int_0^1 \frac{{f}(x)}{x^p} $$
exist and be finite for any $ p \geq 1 $.

I need to prove that
$$f(0) = 0 $$

In this question, I really wanted to use somehow integration by parts and/or the Fundamental theorem of calculus.
Or even maybe use Lagrange Means value theorem,
but couldn't find a way to se it up.
I'll really appreciate your help on proving this.

答:
Hint: Let
$$
g(t) = \int_t^1 \frac{f(x)}{x^p}dx
$$
Now investigate properties of $g(t)$ around $t=0$.</p>


答:
You're right and the book is wrong.

A much more direct approach. You can treat the scenario as if it were a single body moving at $6.5 + 8 = 14.5$ m/s (closing speed) travelling $20$m. The time taken for that is $\frac{40}{29}$ seconds, which means at the meeting point the slower sheep would have travelled $\frac{260}{29}$m, while the faster sheep would have travelled $\frac{320}{29}$m. As expected, these distances sum to $20$m.

You know the provided solution is absurd because if you solve the equation they gave, the slower sheep would have gone much further than the initial $20$m spacing at the supposed meeting point.

Title: Question on constant velocity (easy)

Body:
Two animals are charging at each other. They stand 20 m apart. The smaller animal charges at 6.5 m/s. The larger animal was measured to run 24 m in 3 s. At what position will the two sheep collide?

So far I have this:

$v_L = 8 m/s$, $v_s=-6.5 m/s$

$x_{0_L}= 0$, $x_{0_s}=20$

$x_L=8t$, $x_s=-6.5t+20$

I can set $x_L$ and $x_s$ equal to each other and solve. I know how to do this.

However I am confused because the solution sets these two equations equal:

$$8t=6.5t+20$$

instead of $$8t=-6.5t+20$$

Why isn't the velocity of one of the animals opposite of the other? I thought they would be opposite since they are running towards each other.


答:
Your way is fine and by standard limit we can conclude indeed

$$\frac{2\sin^2(x)}{x}= 2\cdot \left(\frac{\sin x}{x}\right)^2 \cdot x \to 2 \cdot 1 \cdot 0 =0$$

as an alternative by standard limit again

$$\frac{1-\cos(2x)}{x}=4x\cdot\frac{1-\cos(2x)}{(2x)^2} \to 0 \cdot \frac1 2=0$$

Title: Finding the limit of an expression without the use of L'Hopital

Body:
I have the following question:

Calculate the $\lim_{x \to 0} \frac{1-\cos(2x)}{x}$

So to begin I rewrote it as:
$$\lim_{x \to 0} \frac{2\sin^2(x)}{x}$$

& I'm wondering whether it would be acceptable to use the small-angle approximation for sine here since the limit tends towards 0 so it would fit the description. However if anyone has an alternative method that doesn't require any approximation I'd love to hear it. Thank you.


问:
prove that $(1 + x)^\frac{1}{b}$ is a formal power series
How to prove that $(1 + x)^\frac{1}{b}$ (where $b$ is an integer) can be expressed as a formal power series without using Binomial theorem?</p>

答: I don't think you mean it is (literally) a formal power series, because it isn't.  It can be expressed as a formal power series (in $x$), because it is an analytic function of $x$ in a neighbourhood of $x=0$.  You could use the Inverse Function Theorem for that.


问:
partial differential equation $y^2\frac{\partial ^2 u}{\partial x\partial y} + \frac{\partial ^2 u}{\partial y^2}$
Helle everybody, i have a problem with a partial differential equation, I tried to work but it's not true
$$\begin{array}{l}
 y^2\frac{\partial ^2 u}{\partial x \, \partial y} + \frac{\partial ^2 u}{\partial y^2} - \frac{2}{y}\frac{\partial u}{\partial y} = 0 \\[6pt]
 u(x,1) = 1 - x \\[6pt]
 \left. \frac{\partial u}{\partial y} \right|_{y = 1} = 3
 \end{array}$$</p>

答:
Let $v=u_y$.  The equation is then 1st order in $v$:

$$y^2 v_x + v_y - \frac{2}{y} v = 0$$

$$v(x,1) = 3$$

This may be solved using the method of characteristics to determine $v(x,y)$; then use $v = u_y$, $u(x,1)=1-x$ to find $u(x,y)$.

I leave the details to the reader; I get

$$u(x,y) = 5 y - 2 y \log y - x - 4$$

ADDENDUM

The method of characteristic solution for $v$ is as follows. Parametrize $x$, $y$, and $v$ in terms of parameters $s$ and $t$ as follows:

$$\frac{dx}{dt} = y^2$$

$$\frac{dy}{dt} = 1$$

$$\frac{dv}{dt} = -\frac{2}{y}$$

subject to the initial conditions

$$x(s,0)=s$$

$$y(s,0)=1$$

$$v(s,0)=3$$

Solving this system, I get

$$y(s,t) = t+1$$

$$v(s,t) = 3 - 2 \log(t+1) \implies v(x,y) = 3 - 2 \log y$$

Integrate over $y$  to get $u(x,y)$:

$$u(x,y) = 3 y - 2 (y \log y -y) + f(x)$$

Use the condition $u(x,1)=1-x$ to get the final result.


问:
Probability from a NBinomial distribution
Please, can someone help me with this question. I need to understand the steps or reasoning to arrive at the answer and not just the answer.
A company that produces fine crystal knows from experience that 10% of its goblets has flaws and must be classified as 'seconds'. If goblets are examined one by one, what is the probability that at most five must be selected to find four that are not 'seconds'.
Here is how I went about it. I analyzed this as a binomial distribution and then said:
X = number not seconds.
p= 0.9
x = 4
Then what varies is n, i.e what n gives the probability for P(X=4). I then told myself that to give 4 non-seconds, then we need to examine either 4 goblets (all are not seconds) or five goblets (4 are not seconds and 1 is a second). So, this is the addition of two binomial probability mass functions, b(4; 4, 0.9) + b(4; 5, 0.9)

b(4; 4, 0.9) = $ {4 \choose 4} (0.9)^4 (0.1)^0$ = 0.6561

b(4; 5, 0.9) = ${5 \choose 4}(0.9)^4(0.1) $ = 0.32805

the total gives = 0.9842.

But the textbook says that the answer is 0.918.
Please, can someone explain to me where I went wrong and how I should have tackled the problem. Or what principle in the problem I am missing?
thanks

答:
You are unlucky...if they asked you "at most 6", for example, with your method you found a probability of about 1.08....greater than 1. So you would have realized that your method is wrong, also without reading the correct solution.

The correct solution is to use a Negative Binomial, the distribution that counts how many trials are necessary to get a fixed number of successes. In your cases

$$\binom{4-1}{4-1}0.9^4\cdot0.1^{4-4}+\binom{5-1}{4-1}0.9^4\cdot0.1^{5-4}=0.656+0.262=0.91854\approx0.919$$


问:
Number of permutations where first $k$ numbers decrease
This comes from a question in Herbert Wilf's generatingfunctionology book:

Exercise 18 (chp. 1): Given $n, k$. For how many of the permutations of $n$ letters is it true that their first $k$ values decrease?

For example, if we let $g(n,k)$ be the number of $n$-permutations with at least $k$ decreasing values, we have $g(3,2) = 3$ since there are 3 permutations $(3 1 2)$, $(2 1 3)$, $(321)$ where the first 2 numbers are decreasing.

I have approached this by finding a recursion in the form (with $n \geq 1, k\geq 1$):

$g(n, k) = g(n-1, k-1) + (n-k)g(n-1,k)$

with $g(n, 0) = g(n,1) = n!$ and $g(n,k) = 0$ if $n < k$.

I could then find its generating function by defining $B_n(x) = \sum _{k \geq 1} g(n,k)x^k$ or sum for $n$. However, both end up with a derivative (a $B'_{n-1}(x)$ term) which I don't know how to solve yet.

I soon knew how to get the answer by using counting principles (with answer ${n \choose k} (n-k)! = \frac{n!}{k!}$), but in the answer section it writes:

The probability is evidently $1/k!$ that the first $k$ values will
  decrease, so $n!/k!$ of the permutations have this property.

I am not sure how he had 'evidently' got this probability, other than empirically observing probabilities at different $n$ values or by counting principles, and would like to ask hints/how to get the probability that he 'evidently' got.

Thank you!

答:
When he said "The probability is evidently $\frac{1}{k!}$ that the first $k$ values will decrease" I understand this to mean that given any $\sigma$ with $\sigma([k])$ to be fixed, then the chances $\sigma$ decreases the first $[k]$ values is $\frac{1}{k!}$ since there are $k!$ possible permutations of $\sigma([k])$ and only one which is decreasing.

When he said "so $\frac{n!}{k!}$ of the permutations have this property". I understand this to mean that there are $n!$ possible permutations and the probability that a permutation has the first $k$ decreasing is thus mass times density which is equal to $n!\times \frac{1}{k!}$.

Another way to see this is the image of $\sigma([k])$ has $\frac{n!}{k!(n-k)!}$ possibilities, and each image corresponds to exactly one decreasing permutation. The complement of the image of $\sigma([k])$ has (n-k)! possible permutations, so the total number of permutations on $n$ elements which permute the first $k$ is equal to $\frac{n!}{k!(n-k)!}\times (n-k)!=\frac{n!}{k!}$.


问:
Are the names and symbols for common mathematical operators the same in every language?
Do all human languages that have arithmetic use +, -, ×, ÷, and ^?

How about sin, cos, tan, asin, acos, and atan?

答:
Some differences I've noticed are the following (this list is by no means exhaustive):

In some languages they use $\times$ for multiplication, some languages use $\cdot$.

Division might be either of $\div$, $/$ or $:$, depending on where you are. Some people use $\div$ as a subtraction symbol.

Dividing large numbers into readable chunks is done differently too. Some places a million and a quarter is written $1,\!000,\!000.25$. Some places it's $1\:000\:000,\!25$. In east Asia, they don't group digits three and three at all, but rather four and four.


问:
Range of square root of rational function
How can I determine the range of the function $$f(x)=\sqrt{\frac{-x^2+2x+3}{18x-3x^3}}$$ without using limits or derivatives? I have factorised numerator and denominator, but nothing simplifies. I tried solving $y=f(x)$ for $x$, because the domain of the inverse function is the range of the initial function, but I am somehow stuck. My guess is that the range is all non-negative real numbers. How can I be sure that we reach all of them? If we have it for the fraction, we will also have it for the whole root. Can someone help me here? Thanks!

答:
Find an interval in which the radicand, and thus $f$ itself is continuous (for example, for all $x$ such that $-\sqrt 6<x<0$).

In this interval, show that $f$ vanishes. This happens for example for $x=-1.$ Then the result follows immediately.


问:
How to prove continuity of a function from a metric space to a discrete space
Given a metric space $X$ and a discrete space $Y$, let $f$ be a surjective function $f:X \rightarrow Y$.

What is the way to prove that $f$ is continuous? Since $Y$ is discrete, each set is clopen. Should I prove two things: that for every open set of $Y$, its pre-image in $X$ is open and that for every closed set in $Y$, its pre-image is closed?

Is there a case where the pre-image under $f$ of an open set in $Y$ is open in $X$, but the pre-image under $f$ of a closed set in $Y$ is not closed in $X$?

答:
This is not always true. Consider the sign function $f:\mathbb{R}\to \{-1,0,1\}$, where $f(x)$ is the sign of $x$ ($-1$, $0$, or $1$, depending on whether $x$ is negative, zero, or positive). Can you graph this function? Does it look continuous for the usual Euclidean metric on $\mathbb{R}$?

However, if you are asking how you would prove this for a particular $f$ that might be continuous, one way is to show that the inverse image of every open set is open. Since every subset of $Y$ is open, then it would suffice to show that the inverse image of every subset $B$ of $Y$ is open. You could do this by showing that $f^{-1}(y)$ is open for each $y\in Y$, because $f^{-1}(B)$ is the union $\bigcup_{y\in B}f^{-1}(y)$, and the union of open sets is open.


问:
$\lim_n nr^n$ if $|r| < 1$
In an exercise I'm asked to study the limit of the following sequence:

$$(nr^n)_{n\in \Bbb N}$$

I'm aware of the following:

If $|r|>1$ then the sequence diverges if $r$ is positive, or it has no limit if $r$ is negative.

If $r=1$ then it also diverges

If $r = -1$ then it has no limit

But I'm not being able to find out what the limit is when $|r| < 1$. I know that if that's the case then $\lim_n r^n = 0$, but I don't know how to do this for this sequence.

答:
From the ratio test you know that $n r^n \to 0$ if:

$$\lim_{n \to \infty} \left|\frac {(n + 1)r^{n + 1}} {n r^n}\right| < 1$$

Alternatively you can use the root test, or consider the derivative of $(1 - x)^{-1} = \sum x^n$ as suggested by Ethan Bolker in the comments, though this is pretty non-trivial if you're to justify it properly.

Title: $\lim_n nr^n$ if $|r| < 1$


问:
Expected number of balls of each color, after drawing until 50 balls from an urn are removed, with each color having a different chance to be put back
Lets say we have an urn with 100 balls (20 red, 30 blue, 50, green). Whenever a ball is dawn there is a chance it will be kept and not put it back. This chance with which the ball is kept is different for each colour (red = 0.5, blue = 0.3, green = 0.2). So for example the first ball randomly drawn is blue and with a 0.3 chance it is kept otherwise it is put back into the urn and another random ball is drawn. This is repeated until 50 balls have been kept. What is the most likely distribution of coloured balls/expected number of balls of each colour of the 50 kept?

The application I need it for is because I am simulating animals eating a certain amount of total food (the 50 balls) made up of different plant types (different colours) that are available differently in the landscape (number of balls per colour and number of total balls) and that are eaten with a certain preference (probability to keep a ball).

I have calculated this by simulating this draw 10000 times in the programming language R and calculating the mean number of balls of each colour. Code is below in case you are interested but it is not needed to answer my question.
For 50 balls taken the most likely distribution is roughly:

Red: 14.3367 balls

Blue: 15.8905 balls

Green: 19.7728 balls

However I do not want to simulate it but just be able to calculate it without simulating this draw as it takes much longer especially if I have more than 3 colours (or plant types). I would very much appreciate your answer or if you can tell me where to find one or how this type of problem is called, as I was unsucessful in googling this problem. Thank you in advance!

```<code>#The find_prob is number of balls in the urn divided by total balls and the keep_prob is the chance the ball will be kept.
total_reds_pre<-20
total_blues_pre<-30
total_greens_pre<-50

total_balls<-total_reds_pre+total_blues_pre+total_greens_pre
red_find_prob<-total_reds_pre/total_balls
blue_find_prob<-red_find_prob + total_blues/total_balls

needed<-50

red_keep_prob<-0.5
blue_keep_prob<-0.3
green_keep_prob<-0.2

red_taken<-c()
blue_taken<-c()
green_taken<-c()

for (i in 1:10000) { # repeated 1000 times to get closer to the real number
  red<-0
  blue<-0
  green<-0

  total_reds<-total_reds_pre
  total_blues<-total_blues_pre
  total_greens<-total_greens_pre
  total_balls<-total_reds+total_blues+total_greens

while ((red+blue+green < needed)) {
  red_find_prob<-total_reds/total_balls
  blue_find_prob<-red_find_prob + total_blues/total_balls
  colour_drawn<-runif(1,min = 0, max = 1)
  keep_colour<-runif(1,min = 0, max = 1)
  if (colour_drawn < red_find_prob){
    if (keep_colour < red_keep_prob) {
      red = red + 1
      total_balls = total_balls - 1
      total_reds = total_reds -1
    }else {}
  }else if (colour_drawn < blue_find_prob) {
    if (keep_colour < blue_keep_prob) {
      blue = blue + 1
      total_balls = total_balls - 1
      total_blues = total_blues - 1
    }else {}
  }else {
    if (keep_colour < green_keep_prob) {
      green = green + 1
      total_balls = total_balls - 1
    }else {}
  }
}
red_taken[i]<-red
blue_taken[i]<-blue
green_taken[i]<-green
}
mean(red_taken)
mean(blue_taken)
mean(green_taken)
mean(red_taken)+mean(blue_taken)+mean(green_taken)
</code>```

Just to make sure it is not misunderstood: I do not need help with the code I need a mathematical formula to calculate the most likely distribution (of course if you find a griveous mistake in the code please point it out).

EDIT: I have finally found a similar question not sure if it exactly what I need, I'll have a closer look once I am back home: Drawing balls from a bin with a color-specific probabilistic discard step

答:
I don't think there's a closed-form formula that will solve this problem in any reasonable way.  There is a procedure for getting the exact solution, but it's harder to program than simulation.

I will talk about computing the expected number of balls of each color remaining in the urn once $50$ balls have been kept.  If we know that, we can at once compute the expected number of balls of each color that are outside the urn.

We can describe the situation at any point by and ordered triple $(r,g,b)$, where $r$ is the number of red balls in the urn, $b$ is the number of blue balls, and $g$ the number of green balls.  We call this the "state" of the system.  If we are in the state $(r,g,b)$ and we draw a ball, the next state will be one of $$(r,g,b)\\(r-1,g,b)\\(r,g-1,b)\\(r,g,b-1)$$ and the probability of transitioning to each of these states is easily computed.  Of course, if $r+g+b=50$, then the process is over, and finishes in this state.  The states with $r+g+b=50$ are called "absorbing".  All other states are called "transient".

The salient point about this process is that the probability of transitioning from one state to another depends only on the current state, not how we got there.  We say that the process has "no memory."  These facts mean that we are dealing with a finite-state, absorbing Markov chain. I'll refer to the wiki article to explain what I'm saying, but it's not necessary for you to master all the theory to follow what I'm saying.

Let $A$ be the set of absorbing states.  For $(r,g,b)\in A$ let $P(r,g,b)$ be the probability that the process stops in state $(r,g,b)$.  The expected number of red balls remaining in the urn is $$\sum_{(r,g,b)\in A}rP(r,g,b)$$ and similar formulas hold for the other colors.

We first to get an idea of the scale of this problem.  Brute force calculation shows that there are $651$ absorbing states and $16,275$ transient states.  The matrix $Q$ in the wiki article, which encodes, the transition probabilities among the transient states, is $16275\times16275$ as in the fundamental matrix $N=(I-Q)^{-1}$  We don't want to store $Q$ in memory, or to compute its inverse.  We can avoid this, because of a special property of this particular Markov chain.

Once the chain has left a particular state, it can never return to it.  Let us number the states in such a way that if state $s_1$ has a higher number than state $s_2$ then it is not possible to go from $s_1$ to $s_2$.  We can accomplish this by sorting a list of all states in order of decreasing values of $r+g+b$.  (It doesn't matter how balls with the same number of balls are sorted among themselves.  We can use dictionary order for example.)  Then we number each state with its index in the sorted list.  What this means is that the matrix $Q$ will be upper triangular, which greatly simplifies the calculations.  We will need the matrix $I-Q$ .  Let $U=I-Q$, where $U$ stands for "upper."

Now on the wiki under "Absorbing Probabilities" it says

the probability of being absorbed in the absorbing state $j$ when
starting from transient state $i$, which is the $(i,j)$-entry of the
matrix $$B=NR.$$
$N$ is defined as $U^{-1}$ and since we don't want to compute inverses, we rewrite this as $$UB=R\tag1$$  We only care about the probability of ending in state $j$ when $i$ is the initial state, so we only care about the first row of $B$.  So far as I can see, unfortunately, there's no way to compute the first row of $B$ without computing the other rows, but we don't have to save the values.

In equation $(1)$, $U$ is $16,275\times16,275$, and $B$ and $R$ are $16,625\times651$.  We can solve for $B$ column-by-column, meaning that we have $651$ systems of linear equations, each of which consists of $16,275$ equations in $16,275$ unknowns.

Since we have arranged for $U$ to be upper-triangular, each such system is easily solved by back-substitution. Once we have gotten the probability $P(r,g,b)$ we can increment the expectations: $$E_r=E_r+rP(r,g,b)\\E_b=E_b+bP(r,g,b)\\E_g=E_g+gP(r,g,b)$$ and we don't need the solution to that system any more, so we can reuse the space.

Also, notice that $U$ is a very sparse matrix.  At most $4$ entries in any row or column are non-zero.  That should make it possible to program the back-substitution to be very efficient.

This would be all very well, if you just had just this one specific problem, but your question suggests that you may have many of them, with differing numbers of colors.  I'm not sure how easy it would be do automate this solution, so it would handle any problem of this type automatically, (subject to size constraints, of course.)

I'll have to think about that.

EDIT

I wrote a python program to perform the calculations described above.  (Sorry, I don't know R).

```<code>from itertools import product

balls = (20,30,50)
probs = (.5,.3,.2)  # probability that ball will be kept
kept = 50
N = sum(balls)-kept
M= len(balls)
expect = list(balls)

absorbing = []
transient = []

for state in product(*[range(b+1) for b in balls]):
    if sum(state)== N:
        absorbing.append(state)
    elif sum(state)>N:
        transient.append(state)

def successors(state):
    answer = []
    for idx, c in enumerate(state):
        if c >0:
            answer.append(state[:idx]+(c-1,)+state[idx+1:])
    return answer

def from2(s,t):
    # probability of moving from s to t in one move
    # Pre: t is a successor of s
    i = {i for i in range(M) if s[i] !=t[i]}.pop()
    return probs[i]*s[i]/sum(s)

# sort the transient states in decreasing order
# of the number of balls.  Make an inverted list
# from state to index.

transient.sort(key=sum, reverse=True)
tran2idx = {s:i for i,s in enumerate(transient)}

# Q is the transition matrix for transient states to transients states.
# U is I-Q
# R is is the transition matrix for transient states to absorbing states
# In the equation UB = R, B[i,j] is the probability of reaching absorbing
# state j from transient state i.  Sorting the transient states  assures that
# U is upper triangular, so we can solve by back substitution.
# We do this column-by-column

b = len(transient)*[0]  # current column of B

for j, a in enumerate(absorbing):
    for t in reversed(transient):
        # p is probability of moving out of state t
        p =sum(s*probs[i] for i,s in enumerate(t))/sum(t)
        r = 0
        for s in successors(t):
            if s == a:
                r += from2(t,s)
            elif sum(s) > N:
                k = tran2idx[s]
                r += b[k]*from2(t,s)
        i = tran2idx[t]
        b[i] = r/p
    for i in range(M):
        expect[i] -= a[i] * b[0]

for i in range(M):
    print(balls[i], probs[i], expect[i])

</code>```

This produced

```<code>20 0.5 14.325163888283411
30 0.3 15.908709486720031
50 0.2 19.76612662499662
</code>```

in close agreement with your simulation results.

This took $3$ minutes to run on my old $2012$ Mac mini.  If you want to do it for more balls and more colors, the number of states will explode.  You could program it in C, and the problem is a natural for parallelization, since we deal with each column independently, but I think that simulation is the way to go.

The fact that your simulation produced results so close to the theoretical answers, should encourage you to use simulation, I would think.

Body:
I don't think there's a closed-form formula that will solve this problem in any reasonable way.  There is a procedure for getting the exact solution, but it's harder to program than simulation.

I will talk about computing the expected number of balls of each color remaining in the urn once $50$ balls have been kept.  If we know that, we can at once compute the expected number of balls of each color that are outside the urn.

We can describe the situation at any point by and ordered triple $(r,g,b)$, where $r$ is the number of red balls in the urn, $b$ is the number of blue balls, and $g$ the number of green balls.  We call this the "state" of the system.  If we are in the state $(r,g,b)$ and we draw a ball, the next state will be one of $$(r,g,b)\\(r-1,g,b)\\(r,g-1,b)\\(r,g,b-1)$$ and the probability of transitioning to each of these states is easily computed.  Of course, if $r+g+b=50$, then the process is over, and finishes in this state.  The states with $r+g+b=50$ are called "absorbing".  All other states are called "transient".

The salient point about this process is that the probability of transitioning from one state to another depends only on the current state, not how we got there.  We say that the process has "no memory."  These facts mean that we are dealing with a finite-state, absorbing Markov chain. I'll refer to the wiki article to explain what I'm saying, but it's not necessary for you to master all the theory to follow what I'm saying.

Let $A$ be the set of absorbing states.  For $(r,g,b)\in A$ let $P(r,g,b)$ be the probability that the process stops in state $(r,g,b)$.  The expected number of red balls remaining in the urn is $$\sum_{(r,g,b)\in A}rP(r,g,b)$$ and similar formulas hold for the other colors.

We first to get an idea of the scale of this problem.  Brute force calculation shows that there are $651$ absorbing states and $16,275$ transient states.  The matrix $Q$ in the wiki article, which encodes, the transition probabilities among the transient states, is $16275\times16275$ as in the fundamental matrix $N=(I-Q)^{-1}$  We don't want to store $Q$ in memory, or to compute its inverse.  We can avoid this, because of a special property of this particular Markov chain.

Once the chain has left a particular state, it can never return to it.  Let us number the states in such a way that if state $s_1$ has a higher number than state $s_2$ then it is not possible to go from $s_1$ to $s_2$.  We can accomplish this by sorting a list of all states in order of decreasing values of $r+g+b$.  (It doesn't matter how balls with the same number of balls are sorted among themselves.  We can use dictionary order for example.)  Then we number each state with its index in the sorted list.  What this means is that the matrix $Q$ will be upper triangular, which greatly simplifies the calculations.  We will need the matrix $I-Q$ .  Let $U=I-Q$, where $U$ stands for "upper."

Now on the wiki under "Absorbing Probabilities" it says

the probability of being absorbed in the absorbing state $j$ when
starting from transient state $i$, which is the $(i,j)$-entry of the
matrix $$B=NR.$$
$N$ is defined as $U^{-1}$ and since we don't want to compute inverses, we rewrite this as $$UB=R\tag1$$  We only care about the probability of ending in state $j$ when $i$ is the initial state, so we only care about the first row of $B$.  So far as I can see, unfortunately, there's no way to compute the first row of $B$ without computing the other rows, but we don't have to save the values.

In equation $(1)$, $U$ is $16,275\times16,275$, and $B$ and $R$ are $16,625\times651$.  We can solve for $B$ column-by-column, meaning that we have $651$ systems of linear equations, each of which consists of $16,275$ equations in $16,275$ unknowns.

Since we have arranged for $U$ to be upper-triangular, each such system is easily solved by back-substitution. Once we have gotten the probability $P(r,g,b)$ we can increment the expectations: $$E_r=E_r+rP(r,g,b)\\E_b=E_b+bP(r,g,b)\\E_g=E_g+gP(r,g,b)$$ and we don't need the solution to that system any more, so we can reuse the space.

Also, notice that $U$ is a very sparse matrix.  At most $4$ entries in any row or column are non-zero.  That should make it possible to program the back-substitution to be very efficient.

This would be all very well, if you just had just this one specific problem, but your question suggests that you may have many of them, with differing numbers of colors.  I'm not sure how easy it would be do automate this solution, so it would handle any problem of this type automatically, (subject to size constraints, of course.)

I'll have to think about that.

EDIT

I wrote a python program to perform the calculations described above.  (Sorry, I don't know R).

from itertools import product

balls = (20,30,50)
probs = (.5,.3,.2)  # probability that ball will be kept
kept = 50
N = sum(balls)-kept
M= len(balls)
expect = list(balls)

absorbing = []
transient = []

for state in product(*[range(b+1) for b in balls]):
    if sum(state)== N:
        absorbing.append(state)
    elif sum(state)>N:
        transient.append(state)

def successors(state):
    answer = []
    for idx, c in enumerate(state):
        if c >0:
            answer.append(state[:idx]+(c-1,)+state[idx+1:])
    return answer

def from2(s,t):
    # probability of moving from s to t in one move
    # Pre: t is a successor of s
    i = {i for i in range(M) if s[i] !=t[i]}.pop()
    return probs[i]*s[i]/sum(s)

# sort the transient states in decreasing order
# of the number of balls.  Make an inverted list
# from state to index.

transient.sort(key=sum, reverse=True)
tran2idx = {s:i for i,s in enumerate(transient)}

# Q is the transition matrix for transient states to transients states.
# U is I-Q
# R is is the transition matrix for transient states to absorbing states
# In the equation UB = R, B[i,j] is the probability of reaching absorbing
# state j from transient state i.  Sorting the transient states  assures that
# U is upper triangular, so we can solve by back substitution.
# We do this column-by-column

b = len(transient)*[0]  # current column of B

for j, a in enumerate(absorbing):
    for t in reversed(transient):
        # p is probability of moving out of state t
        p =sum(s*probs[i] for i,s in enumerate(t))/sum(t)
        r = 0
        for s in successors(t):
            if s == a:
                r += from2(t,s)
            elif sum(s) > N:
                k = tran2idx[s]
                r += b[k]*from2(t,s)
        i = tran2idx[t]
        b[i] = r/p
    for i in range(M):
        expect[i] -= a[i] * b[0]

for i in range(M):
    print(balls[i], probs[i], expect[i])

This produced

20 0.5 14.325163888283411
30 0.3 15.908709486720031
50 0.2 19.76612662499662

in close agreement with your simulation results.

This took $3$ minutes to run on my old $2012$ Mac mini.  If you want to do it for more balls and more colors, the number of states will explode.  You could program it in C, and the problem is a natural for parallelization, since we deal with each column independently, but I think that simulation is the way to go.

The fact that your simulation produced results so close to the theoretical answers, should encourage you to use simulation, I would think.


问:
Find the values of $k$ , for which the system is stable.
I have a multiple choice question , that says , if $y(t) = (k^2 -3k -4)\log(x) + \sin(x)$ , find the values for which the system is stable ( I guess it means BIBO stable) .

$$a. 1
 \ \ \ \ b. 3 \ \ \ \ c.-1 \ \ \ \ d. 5 \quad e. 4
\quad f. 2$$

We are allowed to pick as many choices as we want.
I circled every single choice, am I missing something?

Let's suppose $ \exists M \in R $ such that: $|x(t)| < M  \quad\forall t \in \mathbb{R}$

$ |y(t)| = |(k-4)(k+1)\log(x) + \sin(x)| \leq |(k-4)(k+1)\log(x)| + 1 $

since $\log(x)$ is defined, then $x(t)>0 \forall t \in \mathbb{R} \rightarrow |x(t)| = x(t) < M$

and since $\log_{10}(x) $ is an increasing function $\rightarrow x(t) < M \rightarrow \log(x(t)) < \log M$

$ |y(t)|  \leq |(k-4)(k+1)\log(M)| + 1 $

For every given value of $k$,  $|(k-4)(k+1)\log(M)| \in [0,+\infty]$ so I can't see why not , every value is possible

答:
Hint: Show that if $ k^2 - 3k - 4 \neq 0$, then the system is unstable by considering values around $x=0$.

Then do the case of $k^2 - 3k - 4 = 0 $.


问:
Maple : graphing an ellipse
I want to draw an ellipse on maple, $x^2+xy+y^2+x+y+1=0$ but I think I'm making a mistake :
$Gr1:=plot(x^2+xy+y^2+x+y+1=0,x=-7..14,y=-7..14):$

$display(Gr1);$

But it says enven before my display line : Error, (in plot) unexpected options: [x^2+y^2+x+xy+y+1 = 0, x = -7 .. 15, y = -7 .. 15]
I am using maple 2015.

答:
```<code>with(plots)
implicitplot(x^2+x*y+y^2+x+y-1,x=-10..10,y=-10..10,gridrefine=5)
</code>```

The ellipse you chose, $x^2+xy+y^2+x+y+1=0$, has no real points.

Your new ellipse:

Title: Maple : graphing an ellipse

Body:
with(plots)
implicitplot(x^2+x*y+y^2+x+y-1,x=-10..10,y=-10..10,gridrefine=5)

The ellipse you chose, $x^2+xy+y^2+x+y+1=0$, has no real points.

Your new ellipse:


问:
Comparison of Norm of Positive definite Matrices
If $A \leq B$, and A and B are symmetric matrices, can we say that $ \| A \| \leq \|B\|$? In other words, If $A-B$ is negative semi-definite, does $ \| A \| \leq \|B\|$ hold?

答:
This is obviously false, as $-I\preceq0$ but $\|-I\|>\|0\|$ for every norm.

There are counterexamples even if you require $A$ to be positive semidefinite. E.g. consider
$$
A=\pmatrix{2&1\\ 1&1},
\ B=\pmatrix{3\\ &3},
\ D=\pmatrix{1\\ &4},
\ \|M\|=\|D^{-1}MD\|_\infty\tag{1}
$$
where $\|M\|_\infty=\max_{\|v\|_\infty=1}\|Mv\|_\infty=\max_i\sum_j|m_{ij}|$ is the induced maximum norm. Then the norm $\|\cdot\|$ in $(1)$ is a matrix norm induced by the vector norm $\|x\|=\|D^{-1}x\|_\infty$. Now $0\prec A\prec B$ but $\|A\|=6>3=\|B\|$.

However, the inequality in question is true if $A$ is positive semidefinite and the matrix norm in use is unitarily invariant. (The induced $2$-norm, Frobenius norm and all Schatten norms fall into this category.)

Unitarily invariant norms can be characterised as symmetric gauge functions of singular values. When $A\preceq B$, the Courant-Fischer minimax principle dictates that $\lambda_i(A)\le\lambda_i(B)$ when the eigenvalues of $A$ and $B$ are arranged in the same (ascending or descending) order. So, when $A$ is also positive semidefinite, we have $\sigma_i(A)\le\sigma_i(B)$ for each $i$. Hence $f\left(\sigma_1(A),\ldots,\sigma_n(A)\right)\le f\left(\sigma_1(B),\ldots,\sigma_n(B)\right)$ for every symmetric gauge function $f$. In turn, $\|A\|\le\|B\|$ when the norm is unitarily invariant.


问:
Difference quotient for higher derivatives
For a differentiable function $f:\mathbb R\to\mathbb R$, we have, by definition,

$$f'(x)=\lim_{h\to0} \frac{f(x+h)-f(x)}h.$$

Is there a similar construction for higher derivatives, i.e. is it possible to write $$f^{(n)}=\lim_{h\to0} \Delta_f^n(x,h),$$

where $\Delta_f^n(x,h)$ is a rational function depending only on $$h, f(x), f(x+h), f(x+2h),\dots, f(x+n h)$$ ?

My attempt: See my answer below.

答:
Yes! The idea is to start off with $\Delta^1_f(x,h)\overset{\text{Def.}}=\frac{f(x+h)-f(x)}h$ and to then recursively define $$\Delta^{n+1}_f(x,h)\overset{\text{Def.}}=\frac{\Delta^n_f(x+h,h)-\Delta^n_f(x,h)}h.$$

This construction leads to the following closed form, as can be checked by induction: $$\Delta_f^{n}(x,h)=\frac{\sum_{k=0}^n f(x+ k h) \binom nk (-1)^{n-k}}{h^n}.$$

Now it only remains to show that $\lim_{h\to0} \Delta_f^{n}(x,h) = f^{(n)}(x)$ for any $n$-times differentiable function $f$.

To this end, I will use l'Hôpital. First, I will prove two Lemmas

Lemma 1. Let $n\in\mathbb N$. Then for any polynomial function $P:\mathbb R\to\mathbb R$ of degree $<n$, $$\sum_{k=0}^n (-1)^{n-k} P(k) \binom nk=0.$$

Proof. Without loss of generality one can assume that $P$ is of the form $P(x)=x^m$ for some natural number $m<n$.

By the binomial Theorem, $$(e^x-1)^n=\sum_{k=0}^n \binom nk (-1)^{n-k} e^{kx},$$

so that $$\left.\frac{\mathrm d^m}{\mathrm d^mx}\right|_{x=0}(e^x-1)^n=\sum_{k=0}^n\binom nk (-1)^{n-k} k^m.$$

But $$\left.\frac{\mathrm d^m}{\mathrm d^mx}\right|_{x=0}(e^x-1)^n=\left.(e^x-1)^{n-m}\right|_{x=0} \cdot \text{something} = 0.$$

This achieves a proof. $\square$

Lemma 2. If $x\in\mathbb R$ is a number, $n\in\mathbb N$ is an integer, and $f:\mathbb R\to\mathbb R$ is differentiable in a neighbourhood of $x$, then
$$\lim_{h\to0}\Delta^n_f(x+h,h)-\Delta^n_f(x,h)=0.$$

Proof. We have, using l'Hôpital $n$ times (thanks to Lemma 1, we can apply l'Hôpital $n$ times),
\begin{split}
\lim_{h\to0}\Delta^n_f(x+h,h)-\Delta^n_f(x,h)
&= \lim_{h\to0}\frac{\sum_{k=0}^n (-1)^{n-k} \big(f(x+(k+1)h)-f(x+k h)\big)}{h^n} \\
&= \lim_{h\to0}\frac{\sum_{k=0}^n (-1)^{n-k} \big((k+1)f(x+(k+1)h)-kf(x+k h)\big)}{n h^{n-1}} \\
&= \dots \\
&= \lim_{h\to0}\frac{\sum_{k=0}^n (-1)^{n-k} \big((k+1)^n f(x+(k+1)h)-k^n f(x+k h)\big)}{n!} \\
&= \frac{f(x)}{n!} \sum_{k=0}^n (-1)^{n-k} ((k+1)^n-k^n) \binom nk,
\end{split}
and the last sum is equal to $0$ according to Lemma 1. $\square$

Now we can finally prove the desired result:

Theorem. For any $f$ that is differentiable $n$ times in a neighbourhood of $x\in\mathbb R$, $$\bbox[15px,border:1px groove navy]{\lim_{h\to0}\Delta^n_f(x,h)=f^{(n)}(x).}$$

Proof. Once again I use l'Hôpital:
\begin{split}\lim_{h\to0} \Delta_f^{n}(x,h)&\overset{\text{H}}=\lim_{h\to0}\frac{\sum_{k=0}^n k\cdot f'(x+ k h) \binom nk (-1)^{n-k}}{n h^{n-1}}
\\&\overset{k=0 \text{ term is }0}=\lim_{h\to0}\frac{\sum_{k=1}^n f'(x+ k h) \overbrace{\frac kn\binom nk}^{=\binom{n-1}{k-1}} (-1)^{n-k}}{h^{n-1}}
\\&\overset{j\overset{\text{Def.}}=k-1}=\lim_{h\to0}\frac{\sum_{j=0}^{n-1} f'(x+ (j+1) h) \binom{n-1}j (-1)^{(n-1)-j}}{h^{n-1}} \\
&=\lim_{h\to0} \Delta^{n-1}_{f'}(x+h,h) \\
&\overset{\text{Lemma 2}}=\lim_{h\to0} \Delta^{n-1}_{f'}(x,h).
\end{split}

Since $f'$ is differentiable $n-1$ times in a neighbourhood of $x$, this shows that if the Theorem is true for any $n-1$, then it is also true for $n$. Together with the fact that the Theorem is true by definition for $n=1$, a standard inductive argument shows that the Theorem is also true for any $n\in\mathbb N$.


问:
Prove that $x ^ {1 - x} (1 - x) ^ {x} \le \frac {1}{2}$
How do I prove $x ^ {1 - x}(1 - x) ^ {x} \le \frac{1}{2}$, for every $x \in (0, 1)$.

For $x = \frac {1}{2}$ the LHS is equal to one half. I tried studying what happens when $x \lt \frac {1}{2}$ and its correspondent, but to no result.

答:
Because $1-x+x=1$, and $x \in (0,1)$, by concavity of the $\ln$, one has
$$(1-x)\ln(x)+x \ln(1-x) \leq \ln((1-x)x+x(1-x))=\ln(2x(1-x))$$

But it is easy to see that for every $x$,
$$x(1-x) \leq \frac{1}{4}$$ so $$(1-x)\ln(x)+x \ln(1-x) \leq \ln \left( \frac{1}{2}\right)$$

Now take the $\exp$ : you get directly
$$x^{1-x}(1-x)^x \leq \frac{1}{2}$$


问:
Transformation and its adjoint
For $V$ a vector space.

Let $T\colon V\rightarrow V$ be a linear transformation of a finite dimensional inner product space.

How can I prove that $\ker(T^* T + TT^*) = $\ker(T)$\cap$$\ker(T^*)$?

And what is the meaning of $\ker(T^*T + TT^*)$ ?

Is  $\ker(T^*T + TT^*)=\ker(T^*T)+\ker(TT^*)$ ?

答:
any suggestion ?

I know how to prove that for every vector that is in the kernel of T and T*

is also at the kernel of TT*+T*T (very trivial).

but how to prove the other side ?

Title: Transformation and its adjoint


问:
Another Normal Distribution question I don't get...
Book question: If $Z \sim N(0,1)$ and $P(Z<k) = \Phi(k),$ for $k>0$, find $P(|Z|> k)$ in terms of $\Phi(k)$.

I thought this would be straightforwardly just $2(1-\Phi(k))$. But the answer in the back is $2\Phi(k)-1$, which I don't get at all. Surely $2\Phi(k)-1 = P(|Z|< k)$ ?

答:
You are absolutely right! Your textbook answer is referred to the complement probability

$$\mathbb{P}[|Z|<k]$$


问:
How do you do this vector subspace question?

consider the subset of P2, W = {p(x) ∈ P2 : p(1)p(3) = 0}. Is W is a
subspace of P2? If so, prove it. If not, give a demonstrative
counterexample.

I'm having a little trouble proving this. I know I'm meant to use the 3 tests for subspaces, but they all seem to just end up being 0, and I can't make a definitive conclusion.

Body:
$W$ is not a subspace.

Consider $p=x^2-1$ and $q=x^2-9$

$p(1)p(3)=0(8)=0$ and $q(1)q(3)=-8(0)=0$ so both are in $W$.

But,
$$(p+q)(1)(p+q)(3)=(p(1)+q(1))(p(3)+q(3))=p(1)p(3)+ q(1)q(3) + p(1)q(3) + p(3)q(1)=p(3)q(1)=8(-8)=-64\ne 0$$

Therefore, $W$ is not closed under addition and is not a subspace.


问:
How can I show that the arguments that minimize a function are not affected by a constant (or not affected much by a constant)?
Edit: I feel this question is better suited for MathOverflow, so I added a significant amount of context and posted there. I don't know if I should delete the question on this site, but I feel I should provide the link to not duplicate work. Here is the link: https://mathoverflow.net/questions/375682/how-can-i-analyze-the-the-affect-of-a-constant-on-the-arguments-that-minimize-a

Consider the a function $f(x,y,c)$ where $c$ is a constant. I just wrote $c$ as an argument to emphasize the function contains an important parameter $c$. Now, consider

$$\text{argmin}_{x,y} \; f(x,y,c)$$

How can I either (1) show that the arguments that minimize $f$ is not affected by the choice of $c$, or furthermore, (2) how can I determine how much the parameter $c$ affects the arguments that minimize $f$. I am mostly interested in (2), but I am convinced I need to understand (1) to work out (2).

While the problems I am typically working with are not so simple, I will provide a simple example to illustrate my question.

Example 1: Consider
$$ f(x,y,c) = cx^2 + y^2 $$
where $c > 0$. The minimum of this function is $x=0$ and $y=0$ regardless of the value of $c$. This is simple to see for this function.

Example 2: Consider the following equations,
$$ f_1(x,y,c) = (x+c*0.00001)^2 + y^2 $$
$$ f_2(x,y,c) = (x+c)^2 + y^2 $$

The value of $c$ in the first equation $f_1$ does not affect the minimizing arguments as much as the value of $c$ in the second equation $f_2$.

答:
This answer is sourced from Oregon State University Calculus Undergraduate Study Guide.
[See References]

Compute $f'_x(x,y,c)$ and $f'_y(x,y,c)$ the partial derivatives of $f(x,y,c)$ w.r.t. $x$ and $y$ respectively.

Equate the partial derivatives to $0$ and solve them simultaneously to determine critical points (i.e., maxima or minima) where the tangent plane is horizontal with its normal pointing in the $z$ direction.

Let $(x_c,y_c)$ be a critical point on the 2D surface given by $f(x,y,c)$.

Define $D(x_c,y_c) = f''_x(x,y,c)f''_y(x,y,c) - [f''_{xy}(x_c, y_c, c)]^2$

where

$f''_x(x,y,c)$ and $f''_y(x,y,c)$ are the second derivatives w.r.t $x$ and $y$ respectively and

$f''_{xy}(x,y,c)$ is the second derivative of $f(x,y,c)$ w.r.t $x$ first followed by $y$ next.

We have four cases:

If $D>0$ and $f_xx(x_c,y_c)<0$, then $f(x,y)$ has a relative maximum
at $(x_c,y_c)$.

If $D>0$ and $f_xx(x_c,y_c)>0$, then $f(x,y)$ has a relative minimum
at $(x_c,y_c)$.

If $D<0$, then $f(x,y)$ has a saddle point at $(x_c,y_c)$.

If $D=0$, the second derivative test is inconclusive.

From this we can see that for the question posed, if $c$ appears in the partial derivatives $f'_x(x,y,c)$ or $f'_y(x,y,c)$ we can conclude that it impacts the maxima or minima for general $f(x,y,c)$. The extent of the impact is defined exactly by the system of two equations that equate the partial derivatives to $0$ in the computation of the critical points.

References:

Maxima and Minima of Functions of Two Variables. Oregon State University, Calculus study guide.


答:
$X+Y=1$ on $\Omega \backslash \{5,6\}$ and $X + Y = 2$ on $\{5,6\}$. Therefore, $E(X|X+Y)$ must be a constant on $\Omega \backslash \{5,6\}$, say $a$. We have, $\frac{1}{6} = E(X, X+Y = 1) = a P(X + Y = 1) = a \frac{4}{6}$. Thus, $a = \frac{1}{4}$. Obviously, $E(X|X+Y) = 2$ on $\{5,6\}$.

Therefore, $E(X|X+Y) = \frac{1}{4}$ on $\Omega \backslash \{5,6\}$ and $E(X|X+Y) = 2$ on $\{5, 6\}$.

Title: An example of conditional expectation

Body:
Let $(\Omega, F, P)$ be a probability space.

$P=1/6 \ (\omega \in \{1,2,3, 4, 5, 6\})$

$X=0 \ (\omega \in \{1,2,3\}), \ 1 \ (\omega \in \{4\}), \ 2 \ (\omega \in \{5, 6\})$

$Y=1 \ (\omega \in \{1,2,3\}), \ 0 \ (\omega \in \{4, 5, 6\})$

What is $E(X|\sigma(X+Y))$ ?

I think $X+Y=1 \ (\omega \in \{1,2,3,4\}), \ 2 \ (\omega \in \{5,6\})$
so,

$E(X|\sigma(X+Y))= 1/4 \ (X+Y=1), \ 2 \ (X+Y=2)$

Is this true?


问:
Covariance and indicator function relations
Let $\mathcal A$ and $\mathcal B$ be  two (sub) sigma-algebras of some probability space. If $A\in\mathcal A$ and $B\in\mathcal B$, why the following equality holds:
$$Cov(1_A-1_{A^c},1_B)=E((P(B\lvert \mathcal A)-P(B))(1_A-1_{A^c}))?$$
where the function $1_W$ stands for the indicator function given a measurable set $W$.

答:
\begin{align}
\operatorname{Cov}(1_A-1_{A^c},1_B)&=\mathsf{E}[(1_B-\mathsf{E}1_B)(1_A-1_{A^c})] \\
&=\mathsf{E}\!\left[\mathsf{E}[(1_B-\mathsf{E}1_B)(1_A-1_{A^c})\mid \mathcal{A}]\right] \\
&=\mathsf{E}\!\left[\mathsf{E}[(1_B-\mathsf{E}1_B)\mid \mathcal{A}](1_A-1_{A^c})\right] \\
&=\mathsf{E}\!\left[(\mathsf{E}[1_B\mid \mathcal{A}]-\mathsf{E}1_B)(1_A-1_{A^c})\right].
\end{align}


答:
You calculation of X+ Y is wrong.  If $\omega$ is 1, 2, or 3, X is 0 and Y is 1 so X+ Y= 1. That you have right.  If $\omega$ is 4 or 5, X= 1 and Y= 0 so X+ Y= 1.  X+ Y is NOT 2 for $\omega$= 5.  It is only for $\omega$= 6 that X= 2 and Y is 0 so X+ Y= 2.

You should have X+ Y= 1 for $\omega\in \{1, 2, 3, 4, 5\}$, X+ Y= 2 for $\omega$= 6.

Title: An example of conditional expectation


问:
Normal distribution: standard deviation given as a percentage.
Book question: The concentration of salt in a cell, $X$, can be modelled by a normal distribution with mean $\mu$ and standard deviation $2$%. Find the value of $\alpha$ such that $P(\mu-\alpha< X < \mu+\alpha) = 0.9 $.

What does it mean, standard deviation $2$%? I assumed it meant $X \sim N(\mu, 0.02^2)$, and I then did:

$P(X<\mu-\alpha) = 0.05$. So the $Z$-value is: $z=\frac{x - \mu}{\sigma} = \frac{(\mu-\alpha) - \mu}{\sigma} = \frac{-\alpha}{0.02} = -50\alpha$, where $Z \sim N(0,1)$ is the standard normal deviation. And using the inverse normal distribution function, I get: $-50-\alpha = -1.6448... \implies \alpha =0.0329\ (3sf)$.

But the answer in the back is $3.29$.

Ah but this is $100$ times more than my answer, so perhaps the % sign is just a typo in the question? Standard deviation $2$ instead of $0.02$ would get me the correct answer I think.

答:
The textbook answer is correct. There's just a misunderstanding because the concentration is always misured in %. Thus the result is 3.29 (%, obviously).

Your error is due to the fact that you transformed in % a number that originally was already expressed in %

The correct solution was

$$\mathbb{P}[Z<\frac{a}{2}]=0.95 \rightarrow a\approx3.29$$

Anyway also your reasoning is correct. It is enough that you realize that your result is a % espressed with respect to 1 and not to 100


问:
Derivative of determinant and Mahalanobis distance w.r.t matrix elements
I have the following two functions of a symmetric $k\times k$ positive-definite covariance matrix $\boldsymbol\Sigma = \begin{pmatrix}s_{11} & \cdots & s_{1k}\\ \vdots & \ddots & \vdots \\ s_{k1} & \cdots & s_{kk}\end{pmatrix}$:

$$f_1(\boldsymbol\Sigma) = \ln |\boldsymbol\Sigma|$$
$$f_2(\boldsymbol\Sigma) = -\frac12(\textbf{x}-\boldsymbol\mu)^T\boldsymbol\Sigma^{-1}(\textbf{x}-\boldsymbol\mu).$$

My question is: what is the derivatives of these two functions w.r.t. matrix elements $s_{ij}$? That is, how to calculate:

$$\frac{\partial f_1}{\partial s_{ij}}\;\;\;\;\;\;\text{and}\;\;\;\;\;\;\frac{\partial f_2}{\partial s_{ij}}?$$

I'd be happy also simply to an answer which redirects to a book/source where these questions are addressed. Thank you!

答:
For ease of typing, define the variables
$$w=(x-\mu),\qquad S=\Sigma$$
We'll also need the following results
for an arbitrary matrix ($A$) and function ($f$)
$$\eqalign{
dA^{-1} &= -A^{-1}dA\,A^{-1} \\
d\,{\rm Tr}\Big(f(A)\Big)
 &= {\rm Tr}\Big(df(A)\Big)
  = {\rm Tr}\Big(f'(A)\cdot dA\Big) \\
\log\Big(\det(A)\Big) &= {\rm Tr}\Big(\log(A)\Big) + 2n\pi i\\
}$$
Applying this to the first function
$$\eqalign{
 f_1 &= \log\Big(\det(S)\Big) \\
df_1 &= d\log\Big(\det(S)\Big) \\
  &= d\,{\rm Tr}\Big(\log(S)\Big) \\
  &= {\rm Tr}\Big(S^{-1}\,dS\Big) \\
\frac{\partial f_1}{\partial S} &= S^{-1}
 \quad\implies\quad
\frac{\partial f_1}{\partial s_{ij}} &= \big(S^{-1}\big)_{ij} \\
}$$
and to the second function
$$\eqalign{
 f_2 &= -\tfrac 12 w^TS^{-1}w \\
df_2 &= -\tfrac 12 w^T\color{red}{dS^{-1}}w \\
 &= +\tfrac 12 w^T\color{red}{S^{-1}dS\,S^{-1}}w \\
 &= \tfrac 12\,{\rm Tr}\Big(S^{-1}ww^TS^{-1}dS\Big) \\
\frac{\partial f_2}{\partial S}
  &= \tfrac 12 S^{-1}ww^TS^{-1}
  \quad\implies\quad
\frac{\partial f_2}{\partial s_{ij}}
  &= \tfrac 12\big(S^{-1}ww^TS^{-1}\big)_{ij} \\
}$$


问:
Conditional expectation with 3 random variables
If we know $E(Y) = E( E( Y \mid X ) )$, and $X$ and $Y$ are independent, I am wondering whether $E(Y)$ is still equal to $E( E( Y \mid X, f(X) ) )$, where $f(X)$ is an approximation of $Y$?

答:
Hint:

For any measurable function $f$

$$E(Y|X, f(X))=E(Y|X)$$(it does not require $X$ and $Y$ be independent)

It is enough to show for any measurable function $f$,

$$\sigma(X, f(X))=\sigma(X)$$.


问:
What shapes can be approximated by iid random variables?
We know that if $X_i\sim N(0,1)$, then $(X_1, \dots, X_n)/\sqrt{n} \to \text{Unif}(S^{n-1})$ in distribution.
That is, the uniform distribution on the $n$-dimensional sphere can be approximated by a vector with all entries independent.

Similarly, I believe that $X_i\sim$ Laplace Distribution converges to the uniform distribution on the L1 ball, that is $\{x \in \mathbb R^n : \|x\|_1 = 1\}$. However, I haven't been able to find a reference for this. Maybe it has to be the Cauchy distribution rather than Laplace.

I wonder which other shapes can be approximated in this way?
Maybe shape is the wrong word, since there needs to be an infinite family in progressively higher dimensions.

I assume a necessary condition is symmetry of the coordinates.
Are there well known necessary conditions as well?

答:
(Not an authoritative answer)

Call $Y={(X_1\cdots X_n)\over \sqrt n}$.

My intuition to whether a r.v.is concentrated on a spherical "shell" is how much the fluctuations are with respect to the mean radius. I believe that for both distributions the behavior is qualitatively the same:

The fluctuations around the mean squared radius are   $<(Y^2 -<Y^2>)^2>=<Y^4-<Y^2>^2>={<X^4>-<X^2>^2\over n}$, whereas the mean radius itself is $<Y^2>=<X^2>$, so that  the standard deviation of the radius $\sqrt{{<X^4>-<X^2>^2\over n}}\sim {1\over \sqrt n}$ which means that for both distributions, the fluctuations get tighter and tighter with $n$.

On the other hand, I don't know what the fluctuations of a large $n$ hypercube shell look like, maybe they also get tighter.

PS: the Cauchy distribution doesn't have a second moment, so the previous argument fails.


问:
Finding the Flow of a Vector Field on a Plane
Consider the following autonomous vector field on the plane:

\begin{align}
\dot{x}=-\omega y\\
\dot{y}=wx
\end{align}

where $(x,y)\in\Bbb{R}^{2}$ and $\omega>0$. Show that the flow generated by this vector field is given by

$$
    \begin{pmatrix}
    x(t) \\
    y(t) \\
    \end{pmatrix}
=
    \begin{pmatrix}
    \text{cos}\hspace{1mm}\omega t & -\text{sin}\hspace{1mm}\omega t \\
    \text{sin}\hspace{1mm}\omega t & \text{cos}\hspace{1mm}\omega t \\
    \end{pmatrix}
    \begin{pmatrix}
    x_0 \\
    y_0 \\
    \end{pmatrix}.
$$

I have attempted to solve the above ODEs by implicit integration and obtained $x(t)=\dfrac{x_{0}}{1-\omega^{2}yt}$ and $y(t)=-\dfrac{x_{0}\omega^{2}yt}{1-\omega^{2}yt}+y_0$, and am not sure how to proceed from here - appreciate any pointers I can get, thanks.

答:
Hint:

Why implicit integration ?
Differentiate first DE $x''=-wy'=-w^2x \implies x''+w^2x=0$ and solve. $\implies x(t)=c_1\cos (wt)+c_2\sin (wt)$.

Do the same for the second differential equation.