问:
Find the shortest route to visit at least once all edges of a undirected weighted non-Eulerian graph
I'm trying to adress the following algorithmic problem using graph theory and Python:

I (personaly) want to find the shortest route I would follow to run through all streets of my district. I don't have the requirement to start from nor end on a particular node, I'm flexible here.

I have represented my district with a weighted undirected graph in Python using Networkx library. Edges weight being the street distance. I have 107 nodes and 130 edges. My graph is not Eulerian and I want to point out that my district has many dead-ends.

I know what I'm looking for is a variant (or equal?) to the Chinese Postman Problem but I could not find any relevant and clear process to progress...

I believe my problem is a variant of the undirected postman/chinease problem but I'm not sure how to start. In particular, I'm not sure which algorithm I could leverage.

I would be very thanksful if I could receive guidance on the approach please.

答:
Thanks @Hugo! It was useful.

I was able to develop an approach and started a Python program to calculate it with inspiration from this article: https://towardsdatascience.com/chinese-postman-in-python-8b1187a3e5a

Here is the approach I followed, my graph being G:

Build a list containing all odd degree vertices of G

Generate all unique pairs of odd degree vertices of G

Recurcively, I generate all odd pairing combinations

Calculate the shortest distance of all pairs

Finally, the shortest route = sum of all G edges + minimum of edges that are necessary to repease (obtained from the previous step)


问:
A variant of Min-Max Theorem
I have encountered the following exercise:

Let $\lambda_1(A) \geq \lambda_2(A) \geq \cdots \geq \lambda_n(A)$ be all eigenvalues of the real symmetric matrix $A$. Prove:
$$\sup_{XX^T = I_{(k)}} \lambda_k(XAX^T) = \lambda_k(A).$$

My attempt: by taking $X = (I_{(k)}, 0)P^T$, where $P$ is an order $n$ orthogonal matrix such that $A = P\mathrm{diag}(\lambda_1(A), \ldots, \lambda_n(A))P^T$, I am able to show that LHS $\geq$ RHS. I am stuck with the reverse direction. I think the Courant-Fischer min-max principle should help but haven't worked it out completely.

答:
$\newcommand{\real}{\mathbb{R}}$
$\newcommand{\rank}{\mathrm{rank}}$
$\newcommand{\Im}{\mathrm{Im}}$

Given what I have achieved in the question, it suffices to prove $\lambda_k(A) \geq \lambda_k(XAX^T)$ for any $k \times n$ matrix with $XX^T = I_{(k)}, k = 1, \ldots, n$. We fix $k$ in the subsequent arguments.

Viewing $X^T \in \real^{n \times k}$ as a linear transformation from $\real^k$ to $\real^n$, then
$$\dim(\Im(X^T)) = \rank(X^T) = \rank(XX^T) = \rank(I_{(k)}) = k.$$
Moreover, since $XAX^T$ is an order $k$ symmetric matrix, it follows by Courant-Fischer Max-min principle (apply it twice) that
\begin{align*}
\lambda_k(XAX^T) &= \min_{y \in \real^k\backslash\{0\}}\frac{y^TXAX^Ty}{y^Ty} =
\min_{y \in \real^k\backslash\{0\}}\frac{y^TXAX^Ty}{y^TXX^Ty} =
\min_{z \in \Im(X^T)\backslash\{0\}}\frac{z^TAz}{z^Tz} \\
&\leq \max_{S: \dim(S) = k}\min_{z \in S\backslash\{0\}}\frac{z^TAz}{z^Tz} = \lambda_k(A).
\end{align*}

This completes the proof.

ContentLicense: CC BY-SA 4.0

Title: A variant of Min-Max Theorem


问:
Proof of Eckart-Young-Mirsky theorem -- Revisited
This is a question about an answer in the forum. Th question was originally about  Eckart-Young-Mirsky theorem proof. The first answer, still, very concise and I have some questions about. There were some discussions in the comment but I still cannot get answers for my questions. Here is the answer:

Since $\mathrm{rank}(B)=k$, $\dim\mathcal{N}(B)=n-k$ and from
$$\dim\mathcal{N}(B)+\dim\mathcal{R}(V_{k+1})=n-k+k+1=n+1$$ (where
$V_{k+1}=[v_1,\ldots,v_{k+1}]$ is the matrix of right singular vectors
associated with the first $k+1$ singular values in the descending
order), we have that there exists an
$$x\in\mathcal{N}(B)\cap\mathcal{R}(V_{k+1}), \quad \|x\|_2=1.$$ Hence
$$
> \|A-B\|_2^2\geq\|(A-B)x\|_2^2=\|Ax\|_2^2=\sum_{i=1}^{k+1}\sigma_i^2|v_i^*x|^2\geq\sigma_{k+1}^2\sum_{i=1}^{k+1}|v_i^*x|^2=\sigma_{k+1}^2.
> $$ From $\|A-A_k\|_2=\sigma_{k+1}$, one gets hence
$\|A-B\|_2\geq\|A-A_k\|_2$. No contradiction required.

I do not understand why $x\in\mathcal{N}(B)\cap\mathcal{R}(V_{k+1}) \ne {0}?$

I do not understand $\|Ax\|_2^2=\sum_{i=1}^{k+1}\sigma_i^2|v_i^*x|^2.$ Is it because that $v_i^Tx = 0,  i> k +1$. If yes, where does the absolute value come from?

I do not understand $\sigma_{k+1}^2\sum_{i=1}^{k+1}|v_i^*x|^2=\sigma_{k+1}^2.$ I think this is related to the assumption that the norm of $x$ is 1, but not sure how to rigorously show this.

答:
Choose bases in both $\mathcal{N}(B)$ and $\mathcal{R}(V_{k+1})$. Take the vectors from both bases, that's going to be $n+1$ vectors. So that system cannot be linearly independent. Hopefully, you can show that there're non-zero vectors in $\mathcal{N}(B) \cap \mathcal{R}(V_{k+1})$ from that.

$Ax = U \Sigma V^* x$. But multiplying a vector by $V^* = V^{-1}$ is the same as representing it in the basis formed by the columns of $V$. $x \in \mathcal{R}(V_{k+1})$ and therefore its coordinates after the $k+1$ would be $0$. So the coordinates of the vector $V^* x$ are $v_1^* x, v_2^* x, \ldots, v_{k+1}^* x, 0, \ldots, 0$. After multiplication by $\Sigma$ the coordinates would become $\sigma_1 v_1^* x, \sigma_2 v_2^* x, \ldots, \sigma_{k+1} v_{k+1}^* x, 0, \ldots, 0$. Then we multiply be $U$, but it's unitary and doesn't change the norm.

We've already shown that the coordinates of $V^* x$ are $v_1^* x, v_2^* x, \ldots, v_{k+1}^* x, 0, \ldots, 0$. So the norm of that vector is $\sum_{i=1}^{k+1} |v_i^* x|^2$. But $V$ is unitary, and so is $V^*$, so after applying it to the vector of norm 1, you would get a vector of norm 1 again.


问:
Finding the fraction $\frac{a^5+b^5+c^5+d^5}{a^6+b^6+c^6+d^6}$ when knowing the sums $a+b+c+d$ to $a^4+b^4+c^4+d^4$
How can I solve this question with out find a,b,c,d

$$a+b+c+d=2$$

$$a^2+b^2+c^2+d^2=30$$

$$a^3+b^3+c^3+d^3=44$$

$$a^4+b^4+c^4+d^4=354$$

so :$$\frac{a^5+b^5+c^5+d^5}{a^6+b^6+c^6+d^6}=?$$

If the qusetion impossible to solve withot find a,b,c,d then is there any simple way to find a,b,c,d

Is there any help?

答:
One way to approach such questions is to view $a, b, c, d$ as roots of a single quartic equation $x^4-s_1x^3+s_2x^2-s_3x+s_4=0$, when we have Vieta's relations
$$s_1=a+b+c+d$$$$s_2=ab+ac+ad+bc+bd+cd=(a+b)(c+d)+ab+cd$$$$s_3=abc+abd+acd+bcd$$$$s_4=abcd$$

We then let $p_k=a^k+b^k+c^k+d^k$ with: $$p_0=4$$$$p_1-s_1=0$$$$p_2-p_1s_1+2s_2=0$$$$p_3-p_2s_1+p_1s_2-3s_3=0$$

With the given values of $p_1, p_2, p_3$ these determine $s_1, s_2, s_3$.

For higher powers $(k\ge4)$ we have $$a^k-s_1a^{k-1}+s_2a^{k-2}-s_3a^{k-3}+s_4a^{k-4}=0$$ using the quartic equation. Adding together the corresponding equations for $a , b, c, d$ we obtain the recurrence for $p_k$$$p_k-s_1p_{k-1}+s_2p_{k-2}-s_3p_{k-3}+s_4p_{k-4}=0$$

Since we know $p_4$ we can use the recurrence to find $s_4$, and this is then sufficient to compute $p_5, p_6$ from the recurrence.

If this looks complicated, this is misleading. The relations between the elementary symmetric functions $s_r$ and the sums of powers $p_r$ are useful to know, and render this kind of problem essentially mechanical. You can see that you can solve the problem without solving explicitly for $a, b, c, d$.

Following this scheme we find successively $s_1=2, s_2=-13, s_3=-14, s_4=24$. Then the recurrence gives:$$p_5-2p_4-13p_3+14p_2+24p_1=0$$ and$$p_6-2p_5-13p_4+14p_3+24p_2=0$$

And this gives $p_5=812, p_6=4890$

ContentLicense: CC BY-SA 3.0


问:
If I roll 3 die at the same time and know that two of them are 3's, what is the probability the 3rd is also a 3?
This is not a homework problem, I'm just trying to better my understanding of this concept because it's so interesting yet counterintuitive to me and. I'm hoping someone will confirm that this is either correct or provide me with a logical explanation for why it's wrong.

Say you have $3$ die. They're all indistinguishable, 6-sided and fair. Let's say you roll all $3$ die at the exact same time. $2$ of the die land on the table, and $1$ rolls off and hits the floor.

You see that the $2$ die on the table are both $3$'s. What is the probability that the die on the floor is also a $3$?

My understanding is that the correct probability that 3rd die is a 3 should be $1/16$.

$3$ die were rolled for a total of $6^3$ possible combinations = $216$ and by revealing that there are two 3's, we reduce our sample space to the following 16 possibilities:

of which only {3, 3, 3} satisfies our event, thus 1/16.

Because the die are unordered, the 3rd die would not be considered an independent event. If I said I have a red die, a blue die, and a green die and after rolling them I saw that the red and blue die landed on the table, then the green die that lands on the floor would be considered to be a 1/6 chance.

I'd also appreciate any additional information that might help me further wrap my head around why this is.

答:
Your fundamental mistake is that, contrary to your belief, the third die is an independent event.  Even though the dice aren't numbered or painted and weren't initially distinguishable, the fact that the third die is the die on the floor and the two dice whose results you know are precisely the two dice that aren't on the floor makes the third die distinguishable.  In the terms of your brute force listing, you are including combinations where one of the dice on the table shows something other than a $3$.  The correct answer is therefore $\frac 16$.

As stated in the comments, if you knew that at least two dice showed a $3$ and exactly two dice ended up on the table, then the result of the "floor" die would not be independent from the information that you already have.


问:
Solving a system of ODEs with a zero eigenvalue and non-zero initial velocity
Consider a system of two second-order linear ODEs for which I have found a solution:

$$
\pmatrix{y_1 \\ y_2} = (A_1\cos\omega t + B_1\sin\omega t )\pmatrix{a \\ b} + \pmatrix{C_1 \\ C_2}
$$

the constant term being due to an eigenvalue of zero for the matrix $A$ in the equation:

$$
\ddot{\boldsymbol{y}} = -A\cdot \boldsymbol{y}
$$

Say I am now given an initial condition of $\dot{\boldsymbol{y}} = (v, 0)^T$ at $t = 0$. Differentiating my solution, I find:

$$
\dot{\boldsymbol{y}} = \pmatrix{v \\ 0} = B_1\omega\pmatrix{a \\ b}
$$

Clearly there is no constant $B_1$ which satisfies this condition. How is it physically possible that my system cannot have an initial velocity? I'm really struggling to see what I might be doing wrong here, and can provide more context for how I arrived at my original equation if necessary. Sorry if this is confusing.

Original ODE:

$$
M\cdot\ddot{\boldsymbol{y}} = -\begin{bmatrix}
k & -k \\
-k & k
\end{bmatrix}\boldsymbol{y}
$$

where $M = \mathrm{diag}(m_1, m_2)$, two known constants. $k$ is also known.

答:
As $\left(
\begin{array}{cc}
 k & -k \\
 -k & k \\
\end{array}
\right) = T^{-1}\Lambda T$ with $T = \left(
\begin{array}{cc}
 -1 & 1 \\
 1 & 1 \\
\end{array}
\right)$ and $\Lambda = \left(
\begin{array}{cc}
 2 k & 0 \\
 0 & 0 \\
\end{array}
\right)$ we have

$$
m\ddot y + T^{-1}\Lambda Ty=0\ \ \Rightarrow mT\ddot y + \Lambda T y = 0
$$

so calling $z = T y$ we have the decoupled linear system

$$
m\ddot z + \Lambda z = 0
$$

with solution

$$
\cases{
z_1 = c_1\cos\left(\sqrt{\frac{2k}{m}}t\right)+ c_2\sin\left(\sqrt{\frac{2k}{m}}t\right)\\
z_2 = c_3+c_4 t
}
$$

so we have four independent constants to configure with the initial/boundary conditions. From $z$ to $y$ we proceed as $y = T^{-1}z$. Concluding, we are free to configure those initial/boundary conditions as needed.


问:
Linear Algebra counter example with orthonormal basis and isometries
Prove or give a counterexample: if $S \in \mathcal{L}(V)$ and there exists an ortho- normalbasis $e_{1},...,e_{n} $ of V such that $||Se_{j}|| = 1$ for each $e_{j}$, then S is an isometry

I saw this question in my textbook while self studying (Axler 7.C.13) and I saw a solution online which stated that S was not invertible which therefore means its not an isometry by a theorem but I was wondering why its not invertible. Any help would be appreciated. thanks

答:
The conditions given about $S$ in your questions do not rule out invertibility.  After all $S = I$ will satisfy those conditions.

But the statement is false for $n \geq 2$.  Here is a counterexample.  Define $S$ to map every basis vector $e_{j}$ to the same vector $e_{1}$.  Then $S$ has a non-trivial kernel (for example, this kernel contains the nonzero vector $e_{1}-e_{2}$), hence fails to be invertible, hence fails to be an isometry.


问:
Solving a separable ODE explicitly
I am stuck at solving the following separable ODE:
$$f(x)=\sqrt{1+[f'(x)]^2},$$
with the condition that $f:[0,\infty)\longrightarrow [0,\infty)$.

I first note that $f(x)\geq 1$ and that the constant function $f(x)=1$ is a solution.

By squaring both sides and separating $f'(x)$, I get that
$$[f(x)]^2=1+[f'(x)]^2 \iff \\ f'(x)=\pm\sqrt{[f(x)]^2-1}$$

Now, for $f(x)\neq 1$, using the fact that $f'(x)=\frac{df}{dx}$ and abusing the notaion $f=f(x)$, I separate the differentials as follows:
$$\frac{df}{dx}=\pm\sqrt{f^2-1} \iff\\ \frac{df}{\sqrt{f^2-1}}=\pm dx$$

Integrating both sides gives
$$\int\frac{df}{\sqrt{f^2-1}}=\int \pm dx \implies ln(f+\sqrt{f^2-1})=\pm x+C$$

We can collect the R.H.S.
\begin{cases}
x+C_1 & (1)\\
-x+C_2 & (2)
\end{cases}

For the left integral, I used the standard integral that is provided in my textbook, namely that
$$\int\frac{dx}{\sqrt{x^2+\alpha}}=\\ ln\left|x+\sqrt{x^2+\alpha}\right|+C$$

I know that I can get rid of the logarithm in the L.H.S., using $(1)$ from above,
$$ln(f+\sqrt{f^2-1})=x+C_1\iff \\ f+\sqrt{f^2-1}=e^{x+C_1}$$
Note that i have dropped the absolute value sign, due to the given condition which constraints $f=f(x)$ to the positive real numbers.

But this is where I am stuck. What am I supposed to do? I am failing to factorize $f$. I know that we can have implicit answers for separable ODEs, but I am supposed to satisfy the condition that $f:[0,\infty)\longrightarrow [0,\infty)$, i.e., I need to find all such functions $f$.

To reiterate: how do I continue to find the explicit answer to the given separable ODE?

P.S. This is my very first time posting a question, although I have read a lot of answers. Also, english is not my first language, please excuse any grammatical errors.

答:
I stumbled across my question after some time, and i noticed that it is possible to continue my work and therefore answer the question with a different approach.

From my original answer I had arrived at

$$f+\sqrt{f^2-1}=e^{x+C_1}. (1)$$
Now, squaring both sides,
$$\left(f+\sqrt{f^2-1}\right)^2=\left(e^{x+C_1}\right)^2 \iff f^2+2f\sqrt{f^2-1}+f^2-1=e^{2(x+C_1)} \\ \iff 2f^2+2f\sqrt{f^2-1}-1=e^{2(x+C_1)}$$
and now we factor out common factors from the L.H.S. and use $\mathbf{(1)}$ from above to solve for $f$,
$$2f\underbrace{\left(f+\sqrt{f^2-1}\right)}_{e^{x+C_1}}-1=e^{2(x+C_1)} \iff 2f\cdot e^{x+C_1}=e^{2(x+C_1)}+1 \\ \iff f=\frac{e^{x+C_1}+e^{-(x+C_1)}}{2}=\text{cosh}\ \left(x+C_1\right).$$

Going back to my original question, we find that there are two different cases for $\mathbf{(1)}$, the first case is the one used above, namely that $f+\sqrt{f^2-1}=e^{x+C_1}$. The second case is $f+\sqrt{f^2-1}=e^{-x+C_2}$. However, we solve this second case just like we did above for the first case. We would then arrive at a different $f$:
$$f=\text{cosh}\ \left(-x+C_2\right)=\text{cosh}\ \left(x-C_2\right).$$
Notice that the last equality is true because hyperbolic cosine is an even function.
We recall from my original post that the constant function $f=1$ is also a solution to the DE.

Now we are done since all $f$ that satisfies the original DE are found. But we could note that the solutions are shifted hyperbolic cosine and we can therefore conclude the solutions and form a general solution with a new piecewise function $f$ by introducing arbitrary constants, say $x_0\leq x_1$:
$$f=
   \begin{cases}
      \text{cosh}\ \left(x-x_0\right) & x\leq x_0, \\
      1 & x_0\leq x\leq x_1, \\
      \text{cosh}\ \left(x-x_1\right) & x_1\leq x.
   \end{cases}
$$

Title: Solving a separable ODE explicitly


问:
Question about Trudinger-Moser type inequality
Let $N\geq 2$ and $\Omega$ be an open bounded subset of $\mathbb{R}^N$ and consider the Trudinger-Moser inequality
$$
\sup_{\substack{u\in W_0^{1, N}(\Omega)\\\|u\|_{W_0^{1, N}}\leq 1}}\int_{\Omega} e^{\alpha_N |u|^{N^{\prime}}} dx <+\infty,
$$
where $\|u\|_{W_0^{1, N}}^N =\int_{\Omega}|\nabla u|^N dx$ and $\alpha_N =N\omega_{N-1}^{\frac{1}{N-1}}$.

The inequality is clear, but my question is: if I only know that $u\in W_0^{1, N}(\Omega)$ and $\|u\|_{W_0^{1, N}}$ is bounded (I don't know if $\|u\|_{W_0^{1, N}}\leq 1$), I can say, anyway, that that supremum is finite? Intuitively I would say "yes", because it seems a bit strange to have the supremum finite in the unitary ball and not, e.g., in the ball of radius 2.

If yes, why? Alternatively, there is a version of Trudinger-Moser inequality which does not ask for the norm to be less or equal than $1$ but only bounded?

Thank you in advance!

答:
Let $v=u/\|u\|_{W_0^{1,N}},$ with $\|u\|_{W_0^{1,N}}<\infty.$  Since $v$ has $W^{1,N}_0$ norm $1$, we know that

$$\int_{\Omega} e^{\alpha_N |v|^{N^{\prime}}}\, dx<\infty.$$ Now,

$$\int_{\Omega} e^{\alpha_N |v|^{N^{\prime}}}\, dx=e^{\alpha_N \|u\|_{W_0^{1,N}}^{-N^{\prime}}}\int_{\Omega} e^{\alpha_N |u|^{N^{\prime}}}\, dx\implies \int_{\Omega} e^{\alpha_N |u|^{N^{\prime}}}\, dx=e^{\alpha_N \|u\|_{W_0^{1,N}}^{N^{\prime}}}\int_{\Omega} e^{\alpha_N |v|^{N^{\prime}}}\, dx<\infty.$$ So, it is true whenever you take a sup over elements of $W_0^{1,N}(\Omega)$ with fixed, finite norm $M$.


问:
When does $\sqrt{wz}=\sqrt{w}\sqrt{z}$?
There exists a unique function $\sqrt{*} : \mathbb{C} \rightarrow \mathbb{C}$ such that for all $r \in [0,\infty)$ and $\theta \in (-\pi,\pi]$ it holds that $$\sqrt{r\exp(i\theta)}=\sqrt{r}\exp(i\theta/2),$$

where $\sqrt{r}$ denotes the usual principal square root of a real number $r$.

Lets take this as our definition of the principal square root of a complex number. Thus $i=\sqrt{-1}.$

Now. We know that, for all positive real $w$ and $z$, it holds that $\sqrt{wz}=\sqrt{w}\sqrt{z}$. We also know that this fails for certain complex $w$ and $z$. Otherwise, we'd be allowed to argue as follows:

$$-1 = i\cdot i = \sqrt{-1} \cdot \sqrt{-1} = \sqrt{-1 \cdot -1} = \sqrt{1}=1$$

My question: for which complex $w$ and $z$ does it hold that $\sqrt{wz}=\sqrt{w}\sqrt{z}$?

答:
The solution to this question requires the definition of the unwinding number. Check the paper The unwinding number by Corless and Jeffrey, SIGSAM Bulletin 116, pp. 28-35.

The unwinding number is defined by
$$\ln(e^z) = z + 2 \pi i \mathcal{K}(z).$$
Obviously, $\mathcal{K}(z) \in \mathbb{Z}$.

For your question, Theorem 5 is the most relevant one, along with the point 1 in the second list in section 5.2:

$\sqrt{zw}$. By theorem (5c) we would expect this to expand to
$$\sqrt{z}\sqrt{w}e^{\pi i \mathcal{K}(\ln z + \ln w)}$$
and this would not simplify further unless the assume system knew that $-\pi < \arg z + \arg w \le \pi$, in which case $\mathcal{K}$ would simplify to $0$.

Read the paper for a deeper insight.

Title: When does $\sqrt{wz}=\sqrt{w}\sqrt{z}$?


问:
Determining the coordinates of a point in a distorted cube
Is it possible to express the coordinates of a point in a distorted cube? That is, given a distorted cube in 3D space with 8 points (the coordinates of which are not necessarily on the regular positions you'd expect them to be for a non-distorted cube), and a point within that cube, finding a universal way of expressing its position. And if this is possible, is there some established method for determining this alternative expression, so as to transfer it to a differently distorted cube?

The tetrahedron-equivalent of this would be to use a barycentric coordinate system, but that is for 4-point simplexes.

答:
Yes, it is called trilinear interpolation: linear interpolation in three variables.

Let the vertices be called $\vec{p}_{000}$, $\vec{p}_{001}$, $\vec{p}_{010}$, $\vec{p}_{011}$, $\vec{p}_{100}$, $\vec{p}_{101}$, $\vec{p}_{110}$, and $\vec{p}_{111}$.

Let $u$ axis be between $\vec{p}_{0 v w}$ and $\vec{p}_{1 v w}$, $v$ axis be between $\vec{p}_{u 0 w}$ and $\vec{p}_{u 1 w}$, and $w$ axis between $\vec{p}_{u v 0}$ and $\vec{p}_{u v 1}$, for $u, v, w \in 0, 1$.

Then, $(u, v, w)$ is within the cuboid if and only if $0 \le u, v, w \le 1$, and corresponds to point $\vec{p}$:
$$\begin{aligned}
\vec{p} & = ((\vec{p}_{111} u + \vec{p}_{011} (1 - u)) v + (\vec{p}_{101} u + \vec{p}_{001} (1 - u)) (1 - v)) w \\
~ & + ((\vec{p}_{110} u + \vec{p}_{010} (1 - u)) v + (\vec{p}_{100} u + \vec{p}_{000} (1 - u)) (1 - v)) (1 - w) \\
\end{aligned}$$

This is trilinear interpolation, because if we use $L(p_0, p_1, x)$ to denote linear interpolation between $p_0$ and $p_1$,
$$L(p_0, p_1, x) = (1 - x)p_0 + x p_1 = p_0 + x (p_1 - p_0)$$
then
$$\begin{aligned}
\vec{p} & = L(L(L(\vec{p}_{000}, \vec{p}_{100}, u), L(\vec{p}_{010}, \vec{p}_{110}, u), v), L(L(\vec{p}_{001}, \vec{p}_{101}, u), L(\vec{p}_{011}, \vec{p}_{111}, u), v), w) \\
\end{aligned}$$


问:
What is the difference between faster by factor and faster by percent?
I don't understand the difference between faster by factor versus faster by percent. For example,

```<code>Machine A Execution Time: 5.106 ms
Machine B Execution Time: 0.851 ms
</code>```

Obviously, machine B is faster 4.255 ms. Now, I want to display how much faster B is than A by what factor as well as what percent. As far as I'm concerned:

```<code>Machine B is 600% faster than machine A. (5.106 ms / 0.851 ms)
</code>```

By what factor is B faster than A? I don't see how it's different than percent.

答:
Your original answer is correct, even if by accident.
"Faster" implies relative speed or velocity ("wow, that car is fast!"). So first, you would express both values in terms of a speed or velocity. Instead of number of seconds (a duration), convert to "executions per second", which more accurately describes your situation (you described that the duration corresponded to an execution).

vA = 1 execution / 5.106 ms = 1 / 0.005106 = 195.848 executions/second
vB = 1 execution / 0.851 ms = 1 / 0.000851 = 1175.088 executions/second

So Machine B is (vB/vA = 6.0) times faster than Machine A.

Of course, to calculate vB/vA you get (1/tB)/(1/tA) and you can cancel everything out to get tA/tB to arrive at the same result.

This would still work even you described it in terms of executions per millisecond, since the units will cancel out.


问:
Set Theory request for knowledge: Need criticism of where my logic is flawed with respect to the intersection of infinite sets. Example in post.
Greetings fellow problem solvers! I'll start off by thanking anyone who takes the time to look over what I've done and redirect me. Now I'm not looking for solutions to this problem. My approach to learning this is by working out why something I have done is incorrect then refining it until I come to a proper solution.

The exercise: Produce an infinite collection of sets $A_{1}, A_{2}, A_{3},...$ with the property that every $A_i$ has an infinite number of elements $A_{j}\ \cap\ A_i = \emptyset$ for all $i\neq j$ and $\bigcup_{i=1}^{\infty}A_{j} = N.$ Where N is the Natural Numbers

My solution to this is as follows.

$$A_1 = \{1, 2,..., n\}\\
A_2 = \{n+1, n+2, ..., k\}\\
A_3 = \{k+1, k+2, ..., m\}\\
A_i = \{m+1, m+2, ...\}$$
Where $n, k, m \in$ natural numbers.

Now to me, the above shows every $A_i$ has an infinite number of elements and  $A_{j}\ \cap\ A_i = \emptyset$ for all $i\neq j$ and $\bigcup_{i=1}^{\infty}A_{j} = N.$ Where N is the Natural Numbers.

I feel like what I've done here is a horrible abuse of notation, at best. Worst case the logic doesn't even follow. Regardless I hope it gives enough insight into how I'm thinking about the intersection of these sets, for someone to help redirect my thought process.

Again I appreciate any feedback,

答:
First of all, what exactly are $n,k,m$, etc. in the definitions of your sets? E.g. is $A_1=\{1,2,3\}$ ($n=3$), or $\{1,2,3,4,5\}$ ($n=5$) or ...?

More importantly, contra your claim, each $A_i$ you've described is finite - e.g. if $n=6$ and $k=17$, then $A_2$ has only $17-6=11$ elements.

Since the $A_i$s have to be infinite, nothing like $\{a, a+1,..., b\}$ is going to work. Your $A_i$s have to be more complicated - essentially, they'll have to "interleave" with each other.

A good first step is to solve the following simpler problem:

Find two sets $A_1,A_2$ such that $A_1\cap A_2=\emptyset$ but $A_1$ and $A_2$ each have infinitely many elements.

Don't try anything too fancy:

 For example, set $A_1=\{$evens$\}$ and $A_2=\{$odds$\}$.

Now how about three infinite, pairwise-disjoint sets - or more generally, $n$-many for $n$ finite?

 Try mod $3$, or mod $n$ more generally.

Getting infinitely many infinite, pairwise-disjoint sets is harder and the above idea doesn't immediately generalize. However, it should suggest some things to try, and there are various ways to get this to work. Here's one idea:

 Given a prime number $p$, let $Pow_p$ be the set of powers of $p$. How big is each $Pow_p$? If $p,q$ are distinct primes, what can you say about $Pow_p\cap Pow_q$? And finally, how many primes are there?


问:
Solve $\frac{dy}{dx}=\frac{y+y^2+x^2}{x}$
Suppose I didn't know to begin with that $y=x\tan x$ satisfies the differential equation below; how I would I go about solving this differential equation?

$$\frac{dy}{dx}=\frac{y+y^2+x^2}{x}$$
It seems very unlikely that I can use some clever manipulation to convert this into a differential equation that can be solved by separating the variables, and I also don't think that I'd be able to use the integrating factor method here.

The only thing that comes to mind as possibly useful is to use some substitution, but I cannot yet see any substitution that is useful.

Thank you for your help.

答:
I'd use $y = xv$ to homogenize the right side (i.e. $y^2+x^2 = x^2(1+v^2))$

$$y' = v+xv' = \frac{xv+x^2v^2+x^2}{x} = v + x(1+v^2)$$

$$\implies v' = 1+v^2$$

which has the solution $v = \tan(x+C)$ by separation of variables


问:
Binomial identity arising from Catalan recurrence.
The following identity features right at the end of the answer to another question I asked: https://math.stackexchange.com/a/4019598/155881.

$$F(x) = \frac{1}{\sqrt{1-4x}} \left(\frac{1- \sqrt{1-4x}}{2x}\right)^n = \sum\limits_{k=0}^{\infty}{n+2k \choose k}x^k$$

Haven't been able to prove this. We know the expansions of both terms on the left side, making the identity:

$$\left(\sum\limits_{j=0}^{\infty} \left(\binom{n+2j-1}{j} - \binom{n+2j-1}{j-1}\right)x^j\right)
\left(\sum\limits_{l=0}^{\infty}{2l \choose l} x^l\right) = \sum\limits_{k=0}^{\infty}{2n+k \choose k}x^k$$

My attempt:
An obvious thing to do is to try a convolution of the left side and equate coefficients of $x^k$ (also using an alternate expression for the first summation in the product of the left side):

$$\sum\limits_{l=0}^k {n+2l-1\choose l}\frac{l}{n+l} {2k-2l\choose k-l} = {2n+k\choose k}$$

Not sure how to make progress on this. Expanding the binomial terms doesn't lead anywhere.

答:
Here is an approach based upon the Lagrange inversion theorem. We follow the paper Lagrange Inversion: when and how by R. Sprugnoli etal.

We consider the generating function
\begin{align*}
F(x)=\sum_{k=0}^{\infty}a_kx^k=\sum_{k=0}^\infty\binom{n+2k}{k}x^k
\end{align*}
and apply formula (G6) from the paper. The formula (G6) says that if there are functions $A(u)$ and $\phi(u)$, so that the coefficient $a_k$ admits a representation
\begin{align*}
a_k=[u^k]A(u)\phi(u)^k
\end{align*}
then the following is valid:
\begin{align*}
F(x)&=\sum_{k=0}^{\infty}[u^k]A(u)\phi(u)^kx^k\\
&=\left.\frac{A(u)}{1-x\phi^{\prime}(u)}\right|_{u=x\phi(u)}\tag{1}
\end{align*}

We obtain
\begin{align*}
\color{blue}{F(x)}&\color{blue}{=\sum_{k=0}^\infty\binom{n+2k}{k}x^k}\\
&=\sum_{k=0}^\infty[u^k](1+u)^{n+2k}x^k\tag{2}\\
&=\left.\frac{(1+u)^n}{1-x\,\frac{d}{du}(1+u)^2}\right|_{u=x(1+u)^2}\tag{3}\\
&=\frac{(1+u)^n}{1-\frac{u}{(1+u)^2}\cdot 2(1+u)}\tag{4}\\
&=\frac{(1+u)^{n+1}}{1-u}\tag{5}\\
&=\frac{\left(\frac{1}{2x}\left(1-\sqrt{1-4x}\right)\right)^{n+1}}{2-\frac{1}{2x}\left(1-\sqrt{1-4x}\right)}\tag{6}\\
&\,\,\color{blue}{=\frac{1}{\sqrt{1-4x}}\left(\frac{1-\sqrt{1-4x}}{2x}\right)^n}\tag{7}
\end{align*}
and the claim follows.

Comment:

In (2) we use the coefficient of operator $[x^k]$ to denote the coefficient of a series. We observe we can apply the Lagrange Inversion theorem with $A(u)=(1+u)^n$ and $\phi(u)=(1+u)^2$.

In (3) we use formula (1) with $A$ and $\phi$ as stated in the comment above.

In (4) we substitute $x=\frac{u}{1+u}$ and do the derivation.

In (5) we simplify the expression.

In (6) we recall $u=x(1+u)^2$ which is a quadratic equation in $u=u(x)$. We calculate
\begin{align*}
u(x)&=\frac{1}{2x}\left(1-2x\pm\sqrt{1-4x}\right)\\
&=\frac{1}{2x}\left(1\pm\sqrt{1-4x}\right)-1
\end{align*}
and take the solution with the minus sign, since this one can be expanded as generating function.

In (7) we make again some simplifications to obtain the wanted form.


问:
Spring/Mass Systems: Driven Motion
Problem Statement:

A mass m is attached to the end of a spring whose constant is k. After the mass reaches equilibrium, its support begins to oscillate vertically about a horizontal line L according to a formula $h(t)$. The value of h represents the distance in feet measured from L. Determine the DE of motion if the entire system moves through a medium offering a damping force that is numerically equal to (beta: B)(dx/dt).

I understand how to set up the equation and to solve when given numerical values for the above variables. I am stuck however with their solution. They are multiplying h(t) by the spring constant to get the DE:
$$mx''(t) = -kx(t) - Bx'(t) + kh.$$

I thought it would be
$$mx''(t) = -kx(t) - Bx'(t) + h(t)$$
and don't understand why we multiply by the spring constant for the $h(t)$ term.

Can anyone please help me understand this part?

Thank you!

Alex

答:
Because the length of the spring (better difference in length from the rest length) is $(x-h)$. $h$ is not an extra force, but the forced movement of the other end of the spring. So you could better write
$$
m\ddot x + \beta\dot x+k(x-h)=0
$$

Title: Spring/Mass Systems: Driven Motion


问:
Symbol for "if and only if": $\implies$ or $\iff$?
I was wondering about the iff sign in maths.
I've never learned about it in school & see it a lot online. Usually the sign looks like this: $\implies$, but in math.stackexchange I always see this: $\iff$.

Does that sign means iff?

Am I using iff right here:

$$8x + 2x - 44 = 220 + 4 - x \implies 11x = 268 \implies x = 24.36$$

答:
$\rightarrow$ means implies, not iff; that would be $⟺$.

$A \rightarrow B$ translates in English to "if $A$ is true, then $B$ is true."

$A ⟺ B$ means $A \rightarrow B$ and $B \rightarrow A$ at the same time (and so translates to "if $A$ or $B$ is true, then the other one is true too)."


问:
Linear regression on a simple dataset
I have the following data sets, and I'm asked to apply linear regression to find the optimal solution (the example is taken from a book called data analytics by T. Runkler):

$X = \{1,2,4,5,3 \}$ and $Y = \{ -1, 1,1,-1,15\}$

Now if apply linear regression to those sets (i.e. $a = (X^T \cdot X)^{-1} \cdot X^T \cdot Y $) I get $45/55 = 0.8$. But in the book the answer is 3. And moreover, in the book I have the following as a solution: "$\frac{-1 + 1+ 15+1 -1}{5} = 3$ due to symmetry". I can't understand how one arrives at this solution from the linear regression formula, and what does symmetry mean in that case? Furthermore, where does the 5 in the denominator come from? It seems to like we're calculating $\frac{\sum_{i = 1}^{n} y_i}{|Y|}$. Which is the mean of $Y$?

答:
You have a model $Y=X\beta+\epsilon$ with an intercept. It looks like

$$\begin{pmatrix}-1\\1\\1\\-1\\15\end{pmatrix}=\begin{pmatrix}1&1\\1&2\\1&3\\1&4\\1&5\end{pmatrix}\begin{pmatrix}\beta_0\\\beta_1\end{pmatrix}+\epsilon$$

The least squares solution is given by $(X^TX)^{-1}X^TY=\begin{pmatrix}-6\\3\end{pmatrix}$, so I guess the question is asking you for the coefficient $\beta_1$, which is the coefficient of "X" as opposed to the intercept coefficient.

Title: Linear regression on a simple dataset


答:
Your sets are pairwise disjoint, and their union is $\Bbb N$, but none of them has an infinite number of elements: all of them are finite. Your $A_1$ has $n$ elements for some positive integer $n$; that is a finite number. Your $A_2$ has $k-n$ elements, again a finite number, your $A_3$ has $m-k$ elements, and so on.

There is the additional problem that you’ve not really explained how to keep going, though since the idea doesn’t work, this is perhaps of secondary significance. Still, it might be useful in the future to know how to write up the idea. Here is one way:

Let $\langle n_k:k\in\Bbb Z^+\rangle$ be a strictly increasing sequence of non-negative integers such that $n_1=0$, and for each $k\in\Bbb Z^+$ let $$A_k=\{m\in\Bbb Z^+:n_k+1\le m\le n_{k+1}\}\,.$$

Now let’s get back to the problem. Here is a sketch of one of the nicer ways to solve it.

Show that for each positive integer $n$ there are unique non-negative integers $m$ and $k$ such that $n=2^k(2m+1)$.

Then for each non-negative integer $m$ let

$$A_m=\left\{2^k(2m+1):k\ge 0\right\}$$

and show that $\{A_m:m\ge 0\}$ satisfies the requirements of the problem.

Title: Set Theory request for knowledge: Need criticism of where my logic is flawed with respect to the intersection of infinite sets. Example in post.

Body:
Greetings fellow problem solvers! I'll start off by thanking anyone who takes the time to look over what I've done and redirect me. Now I'm not looking for solutions to this problem. My approach to learning this is by working out why something I have done is incorrect then refining it until I come to a proper solution.

The exercise: Produce an infinite collection of sets $A_{1}, A_{2}, A_{3},...$ with the property that every $A_i$ has an infinite number of elements $A_{j}\ \cap\ A_i = \emptyset$ for all $i\neq j$ and $\bigcup_{i=1}^{\infty}A_{j} = N.$ Where N is the Natural Numbers

My solution to this is as follows.

$$A_1 = \{1, 2,..., n\}\\
A_2 = \{n+1, n+2, ..., k\}\\
A_3 = \{k+1, k+2, ..., m\}\\
A_i = \{m+1, m+2, ...\}$$
Where $n, k, m \in$ natural numbers.

Now to me, the above shows every $A_i$ has an infinite number of elements and  $A_{j}\ \cap\ A_i = \emptyset$ for all $i\neq j$ and $\bigcup_{i=1}^{\infty}A_{j} = N.$ Where N is the Natural Numbers.

I feel like what I've done here is a horrible abuse of notation, at best. Worst case the logic doesn't even follow. Regardless I hope it gives enough insight into how I'm thinking about the intersection of these sets, for someone to help redirect my thought process.

Again I appreciate any feedback,


问:
Intuition on what $(1-o(1))$ means.
Does $(1-o(1))$ imply something very close to $1$ or something very close to $0$.
I understand that $o(1)$ means a function growing at less than 1.
Thanks for your help.

答: A function $f\in 1-o(1)$ iff a function $g\in o(1)$ exists satisfying $f(x)\equiv1-g(x)$. So in the limit where $g\to0$, $f\to1$.

Title: Intuition on what $(1-o(1))$ means.


问:
Mathematics of signal processing
I've done an undergraduate in electrical and communication engineering. And now after 4 years, I want to pursue masters (graduation) in signal processing and communications. Hence I want to brush up my mathematics concept regarding the same. I need a suggestion for the books to refer.</p>

答: I just came across this question. In addition to the textbook, you might like to try my YouTube channel. All the videos are categorised and linked from the following website: http://iaincollings.com I'm a professor and I've been building what I like to think of as an on-line video textbook for Signals, Systems, and Digital Communications.</p>

Title: Mathematics of signal processing


问:
Throwing n-sided fair dice until sum of two throws equals n
I have an $n$-sided fair die and each side has a different number from the set $\{0, 1, 2, ... , n - 1\}$. On each throw I write down number what was thrown. I do this until the sum of two numbers from the list that I wrote down equals $n$. So the question is, what is the probability that this game ends in $k$ throws? It is clear that when $k = 1$ the probability is $0$. I thought of using a Markov chain to solve this problem, but I don't know how to represent states and what is the probability of going from one state to another. Can anybody help me with this?

答:
Here somewhat detailed instructions for constructing the transition probabilities for Markov chain.

To proceed to the final state ($\dagger$) we should collect a pair $(i,n-i)$. So let characterize a state by the number $k$ of the collected unpaired numbers disregarding '$0$', so that $0\le k\le\left\lfloor\dfrac n2\right\rfloor$. There is however a serious difference between the cases with odd and even $n$. In the latter case there is single number $\frac n2$ which is self-paired. This almost doubles the number of Markov states: from $\frac{n+3}2$ to $n+1$. We shall designate the states which include the number $\frac n2$ by $k^*$. Observe that the numbers of starred and unstarred states are equal: the former do not include the state $0$, and the latter do not include the state $\frac n2$.

The non-zero transition probabilities are shown in the following tables (with the transition probability of the absorbing state $\dagger\to\dagger$ equal to $1$):

Even $n$:
$$
\begin{array}{|c|c|c|c|}
\hline
k\to k& k\to (k+1)& k\to (k+1)^*&k\to\dagger\\
\frac{k+1}n& \frac{n-2k-2}n&\frac1n&\frac kn\\
\hline
k^*\to k^*& k^*\to (k+1)^*&&k^*\to\dagger\\
\frac{k}n& \frac{n-2k}n&&\frac kn\\
\hline
\end{array}$$

Odd $n$:

$$
\begin{array}{|c|c|c|c|}
\hline
k\to k& k\to (k+1)&k\to\dagger\\
\frac{k+1}n& \frac{n-2k-1}n&\frac kn\\
\hline
\end{array}$$

A simpler method to compute the probability is the following. Let us compute the probability that the game does not end after $k$ throws:
$$
P_k(n)=\frac1{n^k}\sum_{i=0}^N\binom Ni 2^i i!\left({k+1 \brace i+1}
+\left[k {k \brace i+1}\right]_{n\in 2\mathbb Z}\right),\tag1
$$
with
$$
N=\left\lfloor\frac{n-1}2\right\rfloor
$$
being the number of the complementary pairs.

Then the probability in question can be computed as
$$
p_k(n)=P_{k-1}(n)-P_k(n).
$$

Explanation.

We need to count all sequences of the length $k$ which do not contain any two of the complementary numbers. To avoid the double counting we split the sequences in the disjoint classes labeled by the representatives of the pairs showing up at least once in the sequence. The factor $\binom Ni$ counts the number of classes with $i$ representatives. The factor $2^i$ takes into account the fact that there are two possible representatives for a pair.
The factor $i!{k+1 \brace i+1}$ counts the number of ways to distribute $k$ dices (labeled by their position in the sequence) into $(i+1)$ distinguishable "boxes" (an additional box is for the dice showing up $0$ and is the only one which is allowed to be empty). Finally in the case of even $n$ we can have in the sequence one special die $\frac n2$ which results in the additional term $k{k \brace i+1}$ (the factor $k$ counts the number of ways to choose the position of the special die in the sequence).


问:
Solving $A*X*B = X*C$ with $X$ the only unknown
I've formulated a problem as above, and wondering if a solution is actually possible.

Dimensionality:

$A$ is $N \times N$ (known)

$B$ and $C$ are $N \times 1$ (known)

$X$ is $N \times N$ (unknown)

Now obviously the problem is very underdetermined, and I am also expecting the solution would involve null space, but I am not worried about this for now as I can add an arbitrary number of observations.

But before I do that, I am just wondering if it is possible in principle to disentangle X from the sandwich it finds itself in?

答:
$\def\L{\left}\def\R{\right}\def\v{\operatorname{vec}}$Use
a Kronecker product to flatten the unknown matrix into a vector
$x=\v(X),\,$ i.e.
$$\eqalign{
\v(AXb) - \v(I_nXc) &= 0 \\
\L((b^T\otimes A)-(c^T\otimes I_n)\R)x &= 0 \\
Mx &= 0 \\
}$$
Therefore $x$ lies in the nullspace of $M$ and can be calculated in terms of an arbitrary vector $w$ and the pseudoinverse $M^+$
$$\eqalign{
x &= \L(I_{n^2}-M^+M\R)w \\
X &= {\rm reshape}(x,n,n)
}$$
This isn't a unique solution but a whole family of solutions determined by the $w$ vector.


问:
If $\int_a^\infty f(x)dx$ exists (converges), then $\int_a^\infty \frac{f(x)}{x}dx$ exists
This is a true or false statement:

If $\displaystyle \int_a^\infty f(x)dx$ exists (converges), then $\displaystyle\int_a^\infty \frac{f(x)}{x}dx$ converges for $a>0$ (and $a\in\mathbb{R^+}$).

In first place I thought this was false, but tried a numerous amount of functions but none of them works as a counterexample. It also confuses me that $a>0$, since I'm not sure if an inegral where I take $a=10^{-50}$ (for instance) it should diverge if it's a "huge" number or not.

It might be true, but I can't prove it. Any hint?

PD: I don't know if working with bounded functions in the interval $[a,1]$ may also work.

答:
I suppose that $f \in L^1(a, \infty)$. By integration by part :

$$\int_a^\infty f(t) \frac1t dt = \Big[ \int_a^t f(u) du \times \frac1t \Big]_{t = a}^{t = \infty} + \int_a^\infty \int_a^t f(u) du \frac1{t^2} dt $$

Because $t \to |\int_a^t f(u) du| $ converges to a finite limite as $t \to \infty$ it is bounded by $M > 0$.

Thus :

$$\int_a^\infty f(t) \frac1t dt = 0 - 0 + \int_a^\infty \int_a^t f(u) du \frac1{t^2} dt $$

And :
$$| \int_a^t f(u) du \frac1{t^2} | \leq M \frac1{t^2} \in L^1(a, \infty)$$

Hence $\int_a^\infty \int_a^t f(u) du \frac1{t^2} dt$ converges.

I don't know if the result is still true when $f$ isn't in $L^1(a, \infty)$.


问:
Log likelihood from density
Suppose $X_1,…,X_n$ are iid with density $f(x|α)=(α+1)x^αI(x∈[0,1])$,
where $α>−1$ parameterizes the family.

Suppose $x_i∈[0,1]$ for all $i$. I am trying to find the natural log of the density (log likelihood) given the parameter $α$ as a function of $x_1,…,x_n?$

答:
The density for a sample is

$$f(x|a)=\prod (a+1)x^aI(x_{min}\ge0)I(x_{max}\le1)\\
=(a+1)^n\prod x^aI(x_{min}\ge0)I(x_{max}\le1)$$

Take the log to get the log likelihood

$$\log f(x|a)=n\log(a+1)+a\sum\log x+\log I(x_{min}\ge0)I(x_{max}\le1)$$

(it is undefined if there is a data point not in the support)

Title: Log likelihood from density


答:
$f(x) = o(g(x))$ is defined by saying that for any positive $\epsilon$, there exists a value $N$ such that $\forall x \geq N \ |f(x)| \leq \epsilon g(x)$, i.e. $f$ is bounded by $\epsilon g$.

So if $1 - f(x) = o(g(x))$ where $g(x) = 1$, we have that $\forall \epsilon > 0$ there is a value $N$ such that $\forall x \geq N \ |1 - f(x)| \leq \epsilon$, which implies that $\lim_{x \rightarrow \infty} f(x) = 1$.

Title: Intuition on what $(1-o(1))$ means.

Body:
Does $(1-o(1))$ imply something very close to $1$ or something very close to $0$.
I understand that $o(1)$ means a function growing at less than 1.
Thanks for your help.


问:
Proving a multivariable function is a constant
Say we have $f:\Bbb{R^2}\rightarrow \Bbb{R}$ satisfying the following property:

$f$ is differentiable everywhere and for every $(x,y)\in\mathbb{R^2}$, $xf_x(x,y)+yf_y(x,y)=0$. I want to prove that $f$ is constant. From a theorem we proved, since $\Bbb{R^2}$ is path-connected, it's enought to prove that the differential is identically $0$.

Since $f$ is differentiable, we get that $xf_x(x,y)+yf_y(x,y)=<\nabla f(x,y),(x,y)>=D_vf(x,y)=0$ - meaning every directional derivative at the point $(x,y)$ in the direction of $(x,y)$ for every $(x,y)$ is $0$, but I can't see how this helps me (if it even has anything to do with the solution). Any help would be appreciated.

答:
When the directional derivative of function $f$ along the nonzero vector $v$ at certain point is equal to $0$, it means that the function $f$ is constant in that direction. If the function is constant in every arbitrary direction and for any arbitrary point $(x,y)$ of $\mathbb{R}^2$ then it is constant everywhere.

If $D_v f(x_0)=0$, then $f$ is constant in the direction $v$ which means if you consider the values of $f$ along the line in the direction $v$, you find that:

$$ f(x_0+tv) = f(x_0) + t D_vf(x_0) + o(t) = f(x_0) + o(t). $$

(Recall that $o(t)$ is some function of $t$ such that $o(t)/t \to 0$ as $t \to 0$, by well-known asymptotic theory)

Always recall that the directional derivative gives you a real number that measures how much the function increases or decreases if you consider points in the direction given by ${v}$, hence if $\nabla f(x,y) \cdot v= 0$ then the function is neither increasing nor decreasing when you consider points in the direction of ${v}$.


答:
Instead of Landau notation $ o(g(x)) $ near the point $ x=a $, it is more pratical to write
$$g(x)\epsilon(x)\;with\; \lim_{x\to a}\epsilon(x)=0$$

So

$$1-o(\color{red}{1})=1-\color{red}{1}.\epsilon(x)=1-\epsilon(x)$$
and

$$2-o(x^3)=2-x^3\epsilon(x)$$

Title: Intuition on what $(1-o(1))$ means.


答:
The expression $A \implies B$ means "if $A$ is true, then $B$ must be true". You can make a truth table: the truth or falsity of the statement $A\implies B$ is determined like this

$$\begin{array}{c|c|c|}
& B\text{ is true}& B\text{ is false}\\\hline
A\text{ is true} & \text{true} & \text{false}\\\hline
A\text{ is false} & \text{true} & \text{true}\\\hline
\end{array}$$

Similarly, $A\impliedby B$ means "if $B$ is true, then $A$ must be true". The truth table for $\impliedby$ is
$$\begin{array}{c|c|c|}
& B\text{ is true}& B\text{ is false}\\\hline
A\text{ is true} & \text{true} & \text{true}\\\hline
A\text{ is false} & \text{false} & \text{true}\\\hline
\end{array}$$

The expression $A\iff B$ then means "both $A\implies B$ and $B\implies A$". For $\iff$, we get
$$\begin{array}{c|c|c|}
& B\text{ is true}& B\text{ is false}\\\hline
A\text{ is true} & \text{true} & \text{false}\\\hline
A\text{ is false} & \text{false} & \text{true}\\\hline
\end{array}$$

Examples: for a real number $r$,

$r>0\implies r^2>0$ (but $r>0\,\,\,\,\not\!\!\!\!\impliedby r^2>0$, because $(-1)^2>0$ even though $-1\not> 0$)

$r=1\iff r+1=2$

The Wikipedia page on logical connectives should be helpful.

Title: Symbol for "if and only if": $\implies$ or $\iff$?

Body:
I was wondering about the iff sign in maths.
I've never learned about it in school & see it a lot online. Usually the sign looks like this: $\implies$, but in math.stackexchange I always see this: $\iff$.

Does that sign means iff?

Am I using iff right here:

$$8x + 2x - 44 = 220 + 4 - x \implies 11x = 268 \implies x = 24.36$$


答:
Take $(a,b)\in\Bbb{R}^2$ and define$$\begin{array}{rccc}\varphi\colon&\Bbb R&\longrightarrow&\Bbb R^2\\&t&\mapsto&(ta,tb).\end{array}$$This function is differentiable, and therefore we have, by the chain rule\begin{align}(f\circ\varphi)'(t)&=D_f(\varphi(t)).D_\varphi(t)\\&=af_x(ta,tb)+bf_y(ta,tb).\end{align}If $t>0$, we have$$(f\circ\varphi)'(t)=\frac1t\bigl(taf_x(ta,tb)+tbf_y(ta,tb)\bigr)=0.$$So $f\circ\varphi$ is constant on $(0,\infty)$. Let $k\in\Bbb R$ be such that $f\circ\varphi=k$. Since $f$ is differentiable, it is continuous and therefore we have $k=\lim_{t \to 0^+} f(ta,tb)=f(0,0)$.

If $(x,y)\in\mathbb{R}^2$ we can write it as $(ta,tb)$ for $(a,b)\in\Bbb R^2$ and $t>0$ and, by what was proved above, $f(x,y)=f(ta,tb)=f(0,0)$.

Title: Proving a multivariable function is a constant

Body:
Say we have $f:\Bbb{R^2}\rightarrow \Bbb{R}$ satisfying the following property:

$f$ is differentiable everywhere and for every $(x,y)\in\mathbb{R^2}$, $xf_x(x,y)+yf_y(x,y)=0$. I want to prove that $f$ is constant. From a theorem we proved, since $\Bbb{R^2}$ is path-connected, it's enought to prove that the differential is identically $0$.

Since $f$ is differentiable, we get that $xf_x(x,y)+yf_y(x,y)=<\nabla f(x,y),(x,y)>=D_vf(x,y)=0$ - meaning every directional derivative at the point $(x,y)$ in the direction of $(x,y)$ for every $(x,y)$ is $0$, but I can't see how this helps me (if it even has anything to do with the solution). Any help would be appreciated.


问:
Why does the argument that $\mathbb{Q}[x] / \langle x^{2}\rangle \simeq \mathbb{Q}[x] / \langle x^{2} - 1\rangle $ not apply in $\mathbb{Z_2}$?
So I have an exercise asking if $\mathbb{Q}{[x]} / \langle x^{2}\rangle  \simeq \mathbb{Q}{[x]} / \langle x^{2} - 1\rangle $ and if $\mathbb{Z_2}{[x]} / \langle x^{2}\rangle  \simeq \mathbb{Z_2}{[x]} / \langle x^{2} - 1\rangle $. My opinion is yes for $\mathbb{Q}$ and no for $\mathbb{Z_2}$, using contradiction:

Suppose we have an isomorphism $\phi : \mathbb{Q}{[x]} / \langle x^{2}\rangle  \rightarrow \mathbb{Q}{[x]} / \langle x^{2} - 1\rangle $, that implies $\phi(x^{2}) = \phi(0) = 0 \implies \phi^{-1}(0) = \phi(x^{2}) = 0$, which is not possible since $\phi^{-1}(x^{2}) = 1$, it will work in $\mathbb{Q}$ but we have $0 = 1$ in $\mathbb{Z_2}$.

Could someone please explain to me how to do this?

答:
(Thanks to Vercassivelaunos for the correction. My previous answer was quite far off.)

Define a homomorphism of rings (check it's well-defined)
$$
\varphi \colon k[x] \to k[y]/(y^2-1),
x \mapsto y-1, 1 \mapsto 1.
$$

In characteristic 2, $$y^2 -1 = 0 \iff (y-1)^2 = 0 \iff y = 1,$$
so the kernel is $(x^2)$, and apply the fundamental homomorphism theorem to conclude.

In characteristic zero this map $\varphi$ is not an isomorphism. In fact, you should convince yourself that however we write down a map it cannot possibly be an isomorphism (see Showing that $\frac{\mathbb{R}[x]}{\langle x \rangle}$ and $\frac{\mathbb{R}[x]}{\langle x-1 \rangle}$ are not isomorphic as $\mathbb{R}[x]$ modules.).


问:
Kelly criterion for Each-Way betting
3 outcome answered question

Hi all,

I've been having trouble finding the Kelly Criterion bet size for an each-way bet.

The above link shows the solution to a problem with 3 distinct and mutually exclusive outcomes. In an each-way bet there are three distinct outcomes (Lose all bets, horse places but doesn't win, horse places and does win).

An each way bet is a matched bet of one bet on the outright win and one on the placing of the horse (1st or 2nd or 3rd for example). These bets are of an equal amount.

I have calculated the Kelly criterion decimal bet for the win only and place bets independently and these are:
0.06 and 0.23 respectively but since to place this each way bet, I must choose an equal stake for each bet, hence my problem.

One option is a simple average which brings us to 0.145

The problem to use the Kelly criterion method as linked is that I can not know the odds for the second possible outcome (places but doesn't win) as the odds for place (win or not) or outright win can only be known. Does anyone have any insights into this?

Thanks for reading and any forthcoming help!

答:
In its simplest possible form, the Kelly Criterion states that, on an even money bet, the percentage of the bankroll to bet is:

(Win probability x 2) - 1

So if the chance of winning on a single bet is 80%, the bettor should wager 60% of one’s bankroll. Note that if the formula is absolutely strictly applied, one would literally never make an even money bet, because the equation results in a zero when 50% as the win probability. read more here if you want to apply to NFL betting

https://nflbets.com/2021/02/12/kelly-criterion-betting-system

Title: Kelly criterion for Each-Way betting


问:
Finding $\frac{\mathrm d}{\mathrm dx}(6)$ by first principles
I had an exercise in my text book:

Find $\frac{\mathrm d}{\mathrm dx}(6)$ by first principles.

The answer that they gave was as follows:

$$\lim_{h\to 0} \frac{6-6}{h} = 0$$

However surely that answer would be undefined if we let $h$ tend towards $0$, as for finding all other limits like that we substitute $0$ in the place of $h$?

答: The answer is right. We know that if the following limit $$\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ exists, then it is denoted by $f'(x)$. In the case $f$ is a constant function, the numerator of previous fraction in limit is absolutely zero but the variable $h$ in the denominator is going to zero but it is not zero. We know many functions that $x=0$ is excluded from their domains but we prove their limit at zero.


问:
Compare two normal distribution that are unrelated
I have two normal distributions, about the incomes of 2 stores (assuming they are unrelated).

For each of the 2 stores I have mean and standard deviation over a 40 days income samples.

Now, I'd like to compute the probability of Store A to perform better than Store B on a new day.

I was thinking to use

$$ (A-B) \sim \mathscr{N} (\mu_A - \mu_B, \sigma_A^2 + \sigma_A^2) , $$

And then do something like probability of B performing better than A is as $P(B>A) = P(A-B<0)$, and we use the normal distribution, to evaluate $A-B < 0$.

But I want to evaluate if my reasoning is correct.

Thanks!

答: Not really, it seems like you are mixing two different concepts. You would be evaluating that the mean of B is greater than the mean of A, e.g. that overall B receives higher income, not the probability that B performs better than A on any given day. In addition, you wouldn't be finding the probability that B has a greater mean than A; it's more like testing if B has a greater mean than A at all.</p>


问:
Confusion colouring path graphs
I'm a bit confused about how to count the number of colourings on a path graph. In my textbook, the following theorem is given:

In general, if $G$ is a path on $n$ vertices, then $P(G,\lambda)=\lambda(\lambda - 1)^{n-1}$

Where $\lambda$ is the number of colours available. Obviously, this is the number of proper colourings of $P_n$ (the path graph on $n$ vertices), where no two adjacent vertices have the same colour.

Am I correct that this also assumes that the graph is labelled? If the graph weren't labelled then the colouring $RGB$ would be the same as the colouring $BGR$ and shouldn't be counted twice.

This brings me to my main question. I'm being asked to count the number of colourings of $P_n$ with the colours red, green, and blue, such that no two adjacent vertices are blue. I'm confused as to whether I should be assuming that $P_n$ is labelled or not? I know the theorem from the text isn't exactly relevant to my question but it assumes that $P_n$ is labelled, but my understanding of paths untill now had been that they're to be taken as unlabelled.

I'm looking for advice on how to interpret and begin to approach this problem, and hopefully clear up some of my confusion. Thanks

答:
You should always assume that a graph is labeled. An "unlabeled graph" isn't really a graph; it's an equivalence class of graphs with respect to isomorphism. (Or some other definition that cashes out to the same thing.)

If this clashes with statements you've encountered like "A clique in a graph is a $K_n$ subgraph for some $n$" - well, the precise way to say that is "A clique in a graph is a subgraph which is a copy of $K_n$" - in other words, "a subgraph which is isomorphic to $K_n$". I'm not entirely sure what you mean when you say "my understanding of paths until now had been that they're to be taken as unlabelled" but it's probably something along those lines.

In particular, you should assume that a graph is labeled when counting colorings. A coloring of a graph $G$ is a function $V(G) \to C$, where $C$ is some set of colors. A proper coloring is a coloring in which no two adjacent vertices are colored (that is, mapped to) the same color.

If $G$ is a path on $n$ vertices and $|C|=\lambda$, then there are $\lambda^n$ possibly-improper colorings, because that's how many functions there are from an $n$-element set to a $\lambda$-element set. Of those colorings, $\lambda (\lambda-1)^{n-1}$ are proper.

Title: Confusion colouring path graphs


问:
To find a temporal bisimulation between $w,w'$ given $w\leftrightsquigarrow w'$ where $\mathfrak M,\mathfrak M'$ (finite) are generated by $w,w'$

Let $\mathfrak M$ and $\mathfrak M'$ be finite rooted models for basic temporal logic with $F$ and $P$. Let $w$ and $w'$ be the roots of $\mathfrak M$ and $\mathfrak M'$ respectively. Prove that if $w$ and $w'$ satisfy the same basic temporal formulae with $F$ and $P$, then there exists a basic temporal bisimulation that relates $w$ and $w'$.

In other words, we want to show that $w \leftrightsquigarrow w'$ (modal equivalence) in the basic temporal language gives rise to a basic temporal bisimulation. All conventions are as per Blackburn's Modal Logic textbook.

A (temporal) bisimulation is a relation $Z\subseteq W\times W'$ which satisfies five properties:

$wZw' \implies (w\in V(p)\Leftrightarrow w'\in V'(p))$

$wZw',wRv \implies \exists v'\in W' (w'R'v' \land vZv')$

$wZw',w'Rv' \implies \exists v\in W (wRv \land vZv')$

$wZw',vRw \implies \exists v'\in W'(v'R'w' \land vzv')$

$wZw',v'Rw' \implies \exists v\in W(vRw \land vzv')$

That being said, the challenge is to produce such a relation in our case! We only want to construct $Z$ so that $wZw'$ - what happens to other worlds, we don't care in particular (right?).

Also since we are in the temporal language, note that I am using $R$ to denote the relation associated with $F$, and $R^{-1}$ to denote the relation associated with $P$.

The strategy that I feel is best in this situation, is to produce formulae, the truth of which at $w$ (and hence $w'$) would help us come up with the above five properties. I don't think there's any other way to use modal equivalence - since all it says is that the same formulae are true at $w,w'$.

I was able to show the first property! $w\leftrightsquigarrow w' \implies (w\in V(p) \Leftrightarrow w' \in V'(p))$, by the definition of modal equivalence ($p$ holds at one world, iff $p$ also holds at the other). That hints at the fact that the required bisimulation might be the modal equivalence relation $\leftrightsquigarrow$ itself!

Unfortunately, I am unable to take these thoughts further to complete the proof - I do not know what formulae to come up with, which would help me deduce Properties 2-5.

I would appreciate any help and ideas! Thank you so much.

答:
This is the other direction of the Hennessy–Milner theorem, and the crucial condition here is that $\mathfrak{M}$ and $\mathfrak{M}^\prime$ are finite.

I will show only the proof for properties 1 and 2, and the remaining ones can be proved in the similar manner. Also, cheating alert: I will use the proof by contradiction.

Let $M_w = (W^M, R^M, V^M)$ and $N_{s} = (W^N, R^N, V^N)$ be finite models such that $M_w \leftrightsquigarrow N_s$. Also, let $Z = \{(v,t) \mid M_v \leftrightsquigarrow N_t\}$. We need to show that $Z$ is a bisimulation.

Assume that $vZt$. By the definition of $Z$, this implies that $v$ and $t$ agree on propositional variables.

Assume that $vZt$ and $v R^M u$ for some $u \in W^M$. Suppose towards a contradiction that there is no $r \in W^N$ such that $tZr$ and $t R^N r$. This means that for each $r$ such that $tR^Nr$, there is a modal formula $\varphi_r$ such that $N_r \models \varphi_r$ and $M_u \not \models \varphi_r$. Since $N$ is finite, we can collect all these $\varphi_r$ in one disjunction: $\varphi := \bigvee_{tR^nr} \varphi_r$. Finally, we have that $M_v \not \models \square \varphi$ and $N_t \models \square \varphi$, which contradicts our assumption.


问:
$\operatorname{Trdeg}(\operatorname{Frac}(R/(a))) =\operatorname{Trdeg}(\operatorname{Frac}(R))-1$
Let $R$ be a commuative (noetherian?) integral domain and $Q=\operatorname{Frac}(R)$.
Assume that $\operatorname{Trdeg}(Q) := n < \infty$. Let $a \in R$
a nonzero prime element of $R$. I want to understand if that's true that
$\operatorname{Trdeg}(\operatorname{Frac}(R/(a)))= n-1$ without
using PID and identification of Krull dimension of the ring
with transcendence degree of accociated field of fractions. Is there
a direct argument known with similar spirit as for
$R= K[x_1,...,x_n]$ that quoting out a nonzero prime element of $R$
reduces the maximal number of algebraically independent elements
of $\operatorname{Frac}(R/(a))$?

In case of $R= K[x_1,...,x_n]$ we deal with special case where
the transcendental basis $x_1,x_2,...,x_n \in K[x_1,...,x_n]$
already generate the ring, so quoting every nonzero $f \in K[x_1,...,x_n]$
provides already a nontrivial algebraic relation between
$x_1,x_2,...,x_n$ and
$\operatorname{Trdeg}(\operatorname{Frac}(K[x_1,...,x_n]/(f)))
=\operatorname{Trdeg}(K(x_1,...,x_n))-1$ is automatically satisfied
for prime $f$. Can this argument can be adapted for arbitrary commuative noetherian domain?

答:
Did you mean an integral domain? The transcendence degree over the prime field? $(a)$ not containing any non-zero integer (ie. not $a=2,R=\Bbb{Z}$) ? If so then $$Tr\deg(Frac(R/(a)))\le Tr\deg(Frac(R))-1$$ use that $R$ is algebraic over $\Bbb{Z}/(c)[x_1,\ldots,x_n]$ where $c$ is the characteristic and $x_1=a$.

Then try with $R=\bigcup_{k\ge 1}\Bbb{Q}[x_1,x_2/x_1^k],a=x_1$ to see that sometimes $$Tr\deg(Frac(R/(a)))=Tr\deg(Frac(R))-2$$
But this ring is not Noetherian as $I_k=(x_2/x_1^k)$ is a strictly increasing sequence of ideals.


问:
Prove that a subsequence converges.

Suppose that $b_n^{2} \rightarrow4$. Prove that $b_n$ has a
subsequence that converges to $2$ or $-2$.

I'm not really sure on the approach, I see that simply taking the root yields something similar, but doesn't say much about a subsequence and doesn't really seem like a proof.

答:
Define

Let $P_1$ be the condition that a subsequence of $b_n$ converges to $-2$.

$$\forall N_1,\epsilon_1\gt0,\exists n\ge N_1:|b_n+2|\lt\epsilon_1$$

Let $P_2$ be the condition that a subsequence of $b_n$ converges to $2$.
$$\forall N_2,\epsilon_2\gt0,\exists n\ge N_2:|b_n-2|\lt\epsilon_2$$

Assume

Assume that $\lnot(P_1\lor P_2)$, which is equivalent to $\lnot P_1\land\lnot P_2$.

$\lnot P_1$: no subsequence of $b_n$ converges to $-2$.
$$\exists N_1,\epsilon_1\gt0:\forall n\ge N_1,|b_n+2|\ge\epsilon_1$$

$\lnot P_2$: no subsequence of $b_n$ converges to $2$.
$$\exists N_2,\epsilon_2\gt0:\forall n\ge N_2,|b_n-2|\ge\epsilon_2$$

Since $\lnot P_1\land\lnot P_2$, we get that
$$\forall n\ge\max(N_1,N_2),\left|b_n^2-4\right|\ge\epsilon_1\epsilon_2$$

However, this means that $b_n^2$ does not converge to $4$, which is a contradiction.

Conclude

Therefore, we must have $P_1\lor P_2$.

Title: Prove that a subsequence converges.


问:
Symbol for "if and only if": $\implies$ or $\iff$?
I was wondering about the iff sign in maths.
I've never learned about it in school & see it a lot online. Usually the sign looks like this: $\implies$, but in math.stackexchange I always see this: $\iff$.

Does that sign means iff?

Am I using iff right here:

$$8x + 2x - 44 = 220 + 4 - x \implies 11x = 268 \implies x = 24.36$$

答:
The symbol $\implies$ means "implies" or "only if", and in $\LaTeX$, which you should use, it is called \implies.

The symbol $\iff$ means "if and only if (iff)" or "implies and is implied by" or "is equivalent to". It is \iff.

For example, $$x=1 \implies x^2=1$$ is a correct use but $$x=1\iff x^2=1$$ is incorrect because it is possible that $x=-1,0$ from the right hand side.

Your statement is true, but you could replace the $\implies$ with $\iff$ because they hold both ways.


问:
Conditional probability lie detector
A lie detector returns a positive result when a person is lying in
90% of all cases. Unfortunately, it also results a positive result when a person
is telling the truth in 20% of all cases. Statistically, it is estimated that 10% of
all test subjects lie.
A randomly chosen test subject takes a test and obtains a negative result.
What is the probability that the subject told the truth?

So this was a 2 part question in which I have taken $A=$ Positive Result and $B=$ Subject is Lying:
I've then calculated $P(B)=0.1,$ $P(A|B^c)=0.2,$ $P(A|B)=0.9,$ $P(B^c)= 0.9,$
and  $P(B|A)=1/3.$
I was thinking of using Bayes' formula and using the law of total probability to figure out $P(B^c|A^c)$ but I am struggling with this. If anyone can point me in the right direction it would be appreciated.

答:
You may be "struggling" because your answer(s) may be puzzling. [I was trying to avoid giving a final numerical answer, but @Stacker's answer (+1), just now posted, has the same interpretation as mine.]

You are right about using Bayes' Theorem. This problem can be solved with a straightforward application of Bayes' Theorem where the sample space is partitioned into Truth-tellers $(T)$ [with $P(T) = 0.9]$ and Liars $(L = T^c)$ [with $P(L) = .1].$

Denote lie detector results as positive (finds evidence of lying) and negative (no evidence of lying = passes test) by $+$ and $-,$ respectively. Then

$$P(-) = P(T\cap -)+P(L\cap -) = P(T)P(-|T) + P(L)P(-|L),$$
where you can deduce all four probabilities on the right-hand side
from the information provided. [For example, $P(-|T) = 1 - P(+|T) = 1-0.2 = 0.8.$ Note the initial sentences that mean 'The lie detector accuses 90% of liars of not telling the truth' and (b) `Unfortunately, the lie detector accuses 20% of truth tellers
of being liars.' (This potentially-confusing terminology is also used in medical testing
for diseases. A "negative" test means "disease free." A "positive" test means "disease detected.")]

Then $P(T|-) = P(T\cap -)/P(-),$ where you know both probabilities from above.

Note: Unless the lie detector is worse than useless, one
would expect $P(T|-) \ge P(T) = 0.9.$

Title: Conditional probability lie detector


问:
Proving that $\sum_{n=1}^{p} n^m \equiv 0 \pmod{p}$
Suppose $p$ is a prime number not equal to $2$ and $m$ is a positive integer, where $$p \nmid 2^m - 1.$$ Prove that $$\sum_{n=1}^{p} n^m \equiv 0 \pmod{p}.$$

I first wrote out the sum, which gave me $$1^m + 2^m + \ldots + p^m \equiv 0 \pmod{p}.$$ However, I had no idea how to proceed from here.

答:
$\sum_{n=1}^{p-1} n^m = 0\bmod p$ iff $p-1 \nmid m$.

If $p-1 \ | \ m$ then the sum is $p-1$

If $p-1 \nmid m$ then take $g$ such that $g^m \ne 0,1\bmod p$, we get that
$$g^m\sum_{n=1}^{p-1} n^m = \sum_{n\ne 0\bmod p}(gn)^m = \sum_{n\ne 0\bmod p}n^m$$
which implies that the RHS is $0$.


问:
Any subset of separable metric space is separable
Is this proof correct?

Claim: if $(M,d)$ is a separable metric space, then so is any subset $U\subseteq M$

Proof:

let $C=(c_k)_{k\in \mathbb{N}}$ be a countable dense subset of $M$. Fix $n \in \mathbb{N}$. Consider $B_{1/n}(c_k)$ (open ball around $c_k$ of radius $1/n$). If $B_{1/n}(c_k) \cap U$ is non empty, then add to the set $U_n$ a point $u_k^{n}$ in $B_{1/n}(c_k) \cap U$

every $U_n$ is non empty by density of $C$, and being every $U_n$ at most countable, so is $U:=\bigcup_n U_n$, which I now claim to be dense in $U$

let $u \in U$. Find $c_l\rightarrow_l u$ such that $d(c_l,u)< 1/l$. Thus $B_{1/l}(c_l)\cap U \neq \emptyset$, and by construction there is $u_l^l \in U_l\subseteq U$ with $d(u_l^l,c_l)<1/l$

by triangle inequality: $d(u_l^l,u)<1/(2l)$, so that $u_l^l\rightarrow_l u$

答:
While you said enough that I can guess with some confidence what you intended, you never really defined the sets $U_n$. Here’s what I think you had in mind:

Fix an arbitrary point $u\in U$. For all $n,k\in\Bbb Z^+$, if $U\cap B_{1/n}(c_k)\ne\varnothing$ let $u_k^n\in U\cap B_{1/n}(c_k)$, and otherwise let $u_k^n=u$. Then for each $n\in\Bbb Z^+$ let $U_n=\{u_k^n:k\in\Bbb Z^+\}$.

(The only reason for $u$ is to allow me to define $u_k^n$ for all $n,k\in\Bbb Z^+$; this makes the later definition of $U_n$ a little simpler.)

It is clear that each $U_n$ is at most countable, and my small trick wth $u$ ensures that each $U_n$ is non-empty. If you define $u_k^n$ only when $U\cap B_{1/n}(c_k)\ne\varnothing$, then you actually have to do a bit of work to show that each $U_n$ is non-empty. You can argue that the fact that $C$ is dense in $M$ ensures that $B_{1/n}(u)\cap C\ne\varnothing$ for each $n\in\Bbb Z^+$, so for each $n\in\Bbb Z^+$ there is a $c_{k(n)}\in C\cap B_{1/n}(u)$. But then $u\in U\cap B_{1/n}(c_{k(n)})$, so $u_{k(n)}^n\in U_n$. (Here $u$ is any fixed point of $U$.) Thus, it is true that $\bigcup_{n\in\Bbb Z^+}U_n$ is a countable subset of $U$, but you cannot name it $U$: in your second bullet point you are using $U$ as a name for two different sets. I’ll call it $D$: $D=\bigcup_{n\in\Bbb Z^+}U_n$.

Your argument to show that $D$ is dense in $U$ would be right if you hadn’t got some of the notation wrong. Let $u\in U$; there is indeed a sequence in $C$ converging to $u$, but you’ve already indexed $C$ as $C=\{c_\ell:\ell\in\Bbb Z^+\}$, so you can’t just say that there is a sequence $\langle c_\ell:\ell\in\Bbb Z^+\rangle$ in $C$ that converges to $u$: you then have two competing (and almost certainly conflicting) indexings of $C$.

Use a different name: there is a sequence $\langle x_\ell:\ell\in\Bbb Z^+\rangle$ in $C$ that converges to $u$ and moreover has the property that $d(u,x_\ell)<\frac1\ell$ for each $\ell\in\Bbb Z^+$. For each $\ell\in\Bbb Z^+$ there is a $k(\ell)\in\Bbb Z^+$ such that $x_\ell=c_{k(\ell)}$, so $u\in U\cap B_{1/\ell}(c_{k(\ell)})$, and therefore $u_{k(\ell)}^\ell\in U\cap B_{1/\ell}(c_{k(\ell)})=U\cap B_{1/\ell}(x_\ell)$. Thus, $d(u_{k(\ell)}^\ell,x_\ell)<\frac1\ell$, and the triangle inequality ensures that

$$d(u,u_{k(\ell)}^\ell)\le d(u,x_\ell)+d(x_\ell,u_{k(\ell)}^\ell)<\frac2\ell\,.$$

(Note that the bound is $\frac2\ell$, not $\frac1{2\ell}$.) It follows that the sequence $\langle u_{k(\ell)}^\ell:\ell\in\Bbb Z^+\rangle$ in $D$ converges to $u$ and hence that $D$ is dense in $U$.


问:
An operator whose adjoint has dense range is injective
How can I solve this question:

An operator $A$ whose adjoint has dense range is injective.

答:
Suppose $Ax = 0$ for $x$ in your Hilbert space $\mathcal{H}$. Then note that for all $y \in \mathcal{H}$, we have $0 = \left \langle Ax, y \right \rangle = \left \langle x ,A^*y \right \rangle$, so $x$ is orthogonal to the range of $A^*$. But it is also orthogonal to the closure of the range of $A^*$, which is $\mathcal{H}$. Thus $x=0$ so $A$'s kernel is trivial. Therefore, $A$ is injective.

I'll leave it to you to fill in the details, like showing that $x$ is orthogonal to the closure of the range of $A^*$.


问:
Prove there are infinitely many squares ending in the digits $54321$
I was training for the math olympiad as I encountered the following, designated simple problem:
Prove there are infintely many squares ending in the digits $54321$.
I tried obvious factorization $3*18107$ and then an approach $\mod 10^5$ but the number is so large, I did not find any example, from which the rest would be trivial.
Factorization of the form $a^2-10^{2n}=54321$ also didn't work, any hints or solutions?

答:
Hint

If $a^2$ ends in $54321$ show that $(a+b\cdot 10^5)^2$ also ends in $54321$.


问:
Prove that $\frac{a^2}{a^2+bc}+\frac{b^2}{b^2+ac}+\frac{c^2}{c^2+ab}<2$
Prove that for every $a,b,c \in \mathbb{R}^{+}$ We have $$\frac{a^2}{a^2+bc}+\frac{b^2}{b^2+ac}+\frac{c^2}{c^2+ab}<2$$
Unfortunately i can just prove that :
$$\frac{a^2}{a^2+bc}+\frac{b^2}{b^2+ac}+\frac{b^2}{b^2+ac} <3$$
like this :
$$a^2+bc>a^2 \iff \frac{a^2}{a^2+bc}<1$$
and by the same method we have :
$$\frac{b^2}{b^2+ac}<1,\frac{b^2}{b^2+ac}<1$$
Adding them together will give us the desired inequality.

and please don't use any $\sum_{cyc}$ because I get confused with it.

Body:
From
$$\frac{a^2}{a^2+bc}+\frac{b^2}{b^2+ac}+\frac{c^2}{c^2+ab}<2 \iff\\
\frac{a^2+bc-bc}{a^2+bc}+\frac{b^2+ac-ac}{b^2+ac}+\frac{c^2+ab-ab}{c^2+ab}<2 \iff\\
3-\frac{bc}{a^2+bc}-\frac{ac}{b^2+ac}-\frac{ab}{c^2+ab}<2 \iff\\
\frac{bc}{a^2+bc}+\frac{ac}{b^2+ac}+\frac{ab}{c^2+ab}>1$$
and applying Titu's Lemma
$$\frac{bc}{a^2+bc}+\frac{ac}{b^2+ac}+\frac{ab}{c^2+ab}=\\
\frac{b^2c^2}{a^2bc+b^2c^2}+\frac{a^2c^2}{b^2ac+a^2c^2}+\frac{a^2b^2}{c^2ab+a^2b^2}\geq\\
\frac{(bc+ac+ab)^2}{b^2c^2+a^2c^2+a^2b^2+a^2bc+b^2ac+c^2ab}=\\
\frac{\color{green}{b^2c^2+a^2c^2+a^2b^2}+\color{red}{2a^2bc+2b^2ac+2c^2ab}}{\color{green}{b^2c^2+a^2c^2+a^2b^2}+\color{red}{a^2bc+b^2ac+c^2ab}}>1$$


问:
Intuition on what $(1-o(1))$ means.
Does $(1-o(1))$ imply something very close to $1$ or something very close to $0$.
I understand that $o(1)$ means a function growing at less than 1.
Thanks for your help.

答:
Let me add one more view: $o(1)$ is set of functions with limit zero i.e. $f\in o(1)\Leftrightarrow \lim f = 0$. Also set is expression $1 \pm o(1)=\{g\colon g=1\pm f, f \in  o(1) \}$.

So we can conclude, that $g=1 \pm o(1)$ is equivalence $\lim g =1$.

Title: Intuition on what $(1-o(1))$ means.


问:
If $\operatorname{rank}(A) = \operatorname{rank}(A^2)$, thn $\operatorname{rank}(A) = \operatorname{rank}(A^n)$, if $A$ has $2$ rows and $2$ columns?
How to prove that if $\operatorname{rank}(A) = \operatorname{rank} (A^2)$, then $\operatorname{rank}(A) = \operatorname{rank}(A^n)$, if $A$ has $2$ rows and $2$ columns?

答:
Since $\operatorname{im}(AB)\subset \operatorname{im}(A)$ for any $A, B$, and since a proper subspace ha a smaller dimension, the condition on ranks can be recast in terms of images: if $\operatorname{im}(A)=\operatorname{im}(A^2)$, then $\operatorname{im}(A)=\operatorname{im}(A^n)$ for all $n$.  This is true for any square matrix (not just $2\times 2$).

Let us proceed by induction.  For the sake of notation, let $A:V\to V$, and we write $A^n(V)$ for the image of $A$. By assumption $A^2(V)=A(V)$. Applying $A^{n-1}$ to both sides, we get $A^{n+1}(V)=A^n(V)$.  If we know that $A^n(V)=A(V)$, then $A^{n+1}(V)=A^n(V)=A(V)$.  Thus, but induction, the proposition will be true for all $n$.

It is perhaps worth noting that we can strengthen this result quite easily.  If $A^N(V)=A^{N+1}(V)$, for some $N$, then $A^n(V)=A^{N}(V)$ for all $n>N$. The proof is identical.


问:
Prove that $\sum_{n=1}^{\infty}n!x^n$ only converges if $x=0$
The question title basically sums up the goal of this question, that is, how to show that the power series $$\sum_{n=0}^{\infty}n!x^n $$ converges only if $x=0$.

I will show my closest attempt at proving this, using the root test as all other methods, like divergence test or ratio test, seemed to be inconclusive or out of reach for me to prove.

Attempt

Although I cannot prove this (and it would be amazing if someone could offer a proof outline or show a proof of this), it is known that $$n!\geq \left(\frac{n}{3}\right)^n\tag{1}$$ for all $n\in\mathbb{N}$ which gives $$\sqrt[n]{n!}\geq \frac{n}{3}\tag{2}$$ for all $n\in\mathbb{N}$.

Assuming this, let $x\neq 0$. Then $$\lim_{n\to\infty}\sqrt[n]{n!|x|^n }=|x|\cdot\lim_{n\to\infty}\sqrt[n]{n!}=\infty $$ since $$\lim_{n\to\infty}\frac{n}{3}=\infty$$ thus the power series diverges by the root test.

Questions

I have two questions.

First: Is this valid assuming $(1)$ and $(2)$?

Second: How would one prove $(1)$ and $(2)$. I cannot do it inductively. Also, if there is a different or simpler method, please let me know or guide me in the right direction. Thanks

答: Yes, the proof is corect if (1) and (2) aer assumed. To prove (1) use induction. To go from $n$ to $n+1$ you will need $3 \geq (1+\frac 1 n)^{n}$. For this note that $(1+\frac 1 n)^{n}=e^{n \log (1+\frac 1 n)} \leq e^{1}<3$.


答:
```<code>                                                  overall
                 / positive lie detector .9       .09
/ lie         .1
                 \ negative lie detector .1       .01

                 / positive lie detector .2       .18
\ tell truth  .9
                 \ negative lie detector .8       .72
</code>```

You could draw a tree, and  then get the overall possibility from each branch by multiplying the probabilities along each branch. So you want P(told truth | detector says negative)=$\frac{P(told truth,detector negative)}{P(detectove negative)}=\frac{.72}{.01+.72}=\frac{72}{73}\approx .9863$ by the definition of conditional probability/Bayes formula. So if a negative result is obtained it is highly probable that the person told the truth.

Title: Conditional probability lie detector

Body:
A lie detector returns a positive result when a person is lying in
90% of all cases. Unfortunately, it also results a positive result when a person
is telling the truth in 20% of all cases. Statistically, it is estimated that 10% of
all test subjects lie.
A randomly chosen test subject takes a test and obtains a negative result.
What is the probability that the subject told the truth?

So this was a 2 part question in which I have taken $A=$ Positive Result and $B=$ Subject is Lying:
I've then calculated $P(B)=0.1,$ $P(A|B^c)=0.2,$ $P(A|B)=0.9,$ $P(B^c)= 0.9,$
and  $P(B|A)=1/3.$
I was thinking of using Bayes' formula and using the law of total probability to figure out $P(B^c|A^c)$ but I am struggling with this. If anyone can point me in the right direction it would be appreciated.

Body:
                                                  overall
                 / positive lie detector .9       .09
/ lie         .1
                 \ negative lie detector .1       .01

                 / positive lie detector .2       .18
\ tell truth  .9
                 \ negative lie detector .8       .72

You could draw a tree, and  then get the overall possibility from each branch by multiplying the probabilities along each branch. So you want P(told truth | detector says negative)=$\frac{P(told truth,detector negative)}{P(detectove negative)}=\frac{.72}{.01+.72}=\frac{72}{73}\approx .9863$ by the definition of conditional probability/Bayes formula. So if a negative result is obtained it is highly probable that the person told the truth.


问:
Why is nPr represented as n! / (n-r)!?
I recently started re-learning maths and have started with Combinatorics. I was trying to understand permutations and noticed that nPr which is number of ways r elements can be picked and arranged out of n elements is equal to n! / (n-r)!.

When I was going through the proof, I realised it's because of the multiplication n * (n-1) * ... * (n-r+1)

My questions is - since factorials can not be calculated without going through each multiplication, what are we gaining by denoting value of nPr in the 1st form instead of the 2nd.

First - n! / (n-r)! - Communicates that an extra work of calculating (n-r)! is needed.

Second - n * (n-1) * ... * (n-r+1) - No extra work and easy to understand.

Am I missing something?

答: Depends on what you mean by "extra work". The variant with factorials is certainly easier to write by hand. And on a calculator with factorials it is much easier to type, significantly reducing the risk of human error.</p>

Title: Why is nPr represented as n! / (n-r)!?


答:
No I do not think you are.
But in practice, - your calculation is what we all, - and our calculators does.

The notation is just a lot easier. As you have demonstrated. :)

Title: Why is nPr represented as n! / (n-r)!?

Body:
I recently started re-learning maths and have started with Combinatorics. I was trying to understand permutations and noticed that nPr which is number of ways r elements can be picked and arranged out of n elements is equal to n! / (n-r)!.

When I was going through the proof, I realised it's because of the multiplication n * (n-1) * ... * (n-r+1)

My questions is - since factorials can not be calculated without going through each multiplication, what are we gaining by denoting value of nPr in the 1st form instead of the 2nd.

First - n! / (n-r)! - Communicates that an extra work of calculating (n-r)! is needed.

Second - n * (n-1) * ... * (n-r+1) - No extra work and easy to understand.

Am I missing something?


答:
The main issue with your approach is that the comparison of incomes of the two stores needs to be done for the same day--in other words, there is a time component that needs to be taken into account in both the analysis and the sampling.

To illustrate, suppose your data on store A was collected during the holiday season when sales volume is generally high, but the data on store B was collected during a time when there was inclement weather.  Then comparing the mean income is not really fair, because the circumstances that have a causal relationship to income are different.  Therefore, the easiest way to control for this source of variability is to sample the store incomes on the same days over the same time period.  We call this "paired" sampling.

This is a very natural and intuitive approach and may seem obvious, but what this also means is that the analysis of this paired data must also account for this structure, and the way it does so depends on the question you are hoping to answer through that data.  For instance, if you are interested in testing whether the average daily incomes of the two stores are different, then you would perform a paired $t$-test.  But if you are interested in testing whether one store is more likely to have a larger daily income than the other store, then you do not care about the magnitude of the difference, only whether store A "wins" more frequently than store B, or vice versa--where a "win" means they earned more money, even if only by a little.  In such a case, you would perform a test on the proportion of wins in your sample.

Then there is the matter of prediction and estimation versus testing.  If you are interested in estimating the true mean incomes of each store, then a straightforward approach is to construct confidence intervals for those incomes--here, pairing is not needed.  More sophisticated would be a Bayesian approach to modeling the posterior predictive distribution of the next day's income based on the historical data.  Again, pairing is not used.  But if we are interested in predicting or estimating the difference in incomes, whether that is through a confidence interval estimate or a Bayesian model, then you must perform that analysis on the paired differences of the data.

If we take your question literally:

Compute the probability of Store A to perform better than Store B on a new day

then it seems to me that the approach to take, assuming the data is paired, is the test of proportions I mentioned.  Specifically, suppose our data structure is

$$A = (x_1, x_2, \ldots, x_n) \\ B = (y_1, y_2, \ldots, y_n)$$ where $x_i$ and $y_i$ are the incomes reported for Store A and Store B on sample day $i$, respectively.  Then we construct the statistic
$$S = \sum_{i=1}^n \mathbb 1(x_i > y_i)$$ which counts the number of days for which Store A earns more income than Store B.  Next, let $$N = \sum_{i=1}^n \mathbb 1(x_i \ne y_i),$$ that is to say, $N$ counts the number of days in which the incomes are not tied--if you do not observe any ties, then $N = n$.  Then $$S \mid N \sim \operatorname{Binomial}(N, p)$$ where $p$ is the probability that Store A "wins" against Store B.  (The unconditional statistic $S$ is not binomial because $N$ is random, but in practice, if ties are highly unlikely, we can ignore the conditionality.)  A hypothesis test of the form
$$H_0 : p = p_0 = 0.5 \quad \text{vs.} \quad H_1 : p \ne 0.5$$ with the test statistic $$Z = \frac{S/N - p_0}{\sqrt{p_0(1-p_0)/N}} \sim \operatorname{Normal}(0,1)$$ is asymptotically standard normal for sufficiently large $N$.

But if your goal is to estimate the probability $p$, then you could construct the confidence interval
$$\hat p \pm z_{\alpha/2}^* \sqrt{\hat p (1 - \hat p)/N},$$ where $\hat p = S/N$ is the observed win rate for Store A, and $z_{\alpha/2}^*$ is the critical value for a $100(1-\alpha)\%$ confidence interval and equals the upper $\alpha/2$ quantile of the standard normal distribution.

Alternatively the Bayesian model would employ a binomial likelihood with beta prior, whose posterior for the probability of Store A winning on the next day is beta distributed.  But this answer is already too long for a detailed treatment.

Title: Compare two normal distribution that are unrelated

Body:
I have two normal distributions, about the incomes of 2 stores (assuming they are unrelated).

For each of the 2 stores I have mean and standard deviation over a 40 days income samples.

Now, I'd like to compute the probability of Store A to perform better than Store B on a new day.

I was thinking to use

$$ (A-B) \sim \mathscr{N} (\mu_A - \mu_B, \sigma_A^2 + \sigma_A^2) , $$

And then do something like probability of B performing better than A is as $P(B>A) = P(A-B<0)$, and we use the normal distribution, to evaluate $A-B < 0$.

But I want to evaluate if my reasoning is correct.

Thanks!


问:
Prove that the least upper bound of $A$ cannot be rational
Let $A\subseteq\mathbb{Q}$ be defined by
$$
A=\{x\in\mathbb{Q}:x^2<2\}.
$$

Prove that $A$ cannot have a least upper bound in $\mathbb{Q}$.

I know I could prove that $\sqrt2$ is the least upper bound of $A$ and prove that $\sqrt2$ is irrational. However, I'm looking to prove this using an alternative method because it might not always be obvious what the least upper bound should be.

Initial thoughts

My initial thinking is to prove this by contradiction.

So, suppose $y\in\mathbb{Q}$ is the least upper bound of $A$. Then for any $z\in\mathbb{R}$ with $z<y$, we can find $a\in A$ such that $a>z$.

Since $a\in A$, we have that $a=m/n$ for some $m,n\in\mathbb{Z}$ and that $a^2<2$. Similarly, since $y\in\mathbb{Q}$, we have that $y=p/q$ for some $p,q\in\mathbb{Z}$.

Problem

I'm not sure how to combine these facts to construct a contradiction. Any hints/insights would be great.

答:
There exists a function $f: [0, \infty) \to [0, \infty)$ with the following properties:

$f(x) \in \mathbb{Q}$ if $x \in \mathbb{Q}$,

$f$ is increasing,

$x < f(x) < 2$ if $x < 2$.

Thus for any proposed $a \in A$, we have

$f(a) \in A$ and

$f(a) > a$.

This shows that $a$ cannot be the supremum of $A$.

Can you find such a function? Spoiler below.

 The rational function
 $$f(x) = \frac{4 + 3x}{3 + 2x}$$ works.

 It is constructed as
 $f(x) = g(g(x))$, where     $$g(x) = \frac{2 + x}{1 + x}$$
 which also converges to $\sqrt{2}$ upon
 iteration, but in an alternating manner.


答:
In maths, different presentations of the same thing might yield different insights. In this case, you might derive $^nP_r$ from $^nC_r$ as follows:

We know that $^nC_r$ counts the number of ways to choose $r$ objects from $n$ objects, without caring about the order you choose them from.

But suppose now we want to care about the order. There are $r!$ ways to order the $r$ chosen objects. So we have $$^nP_r = {}^nC_r\times r!$$

Recall the formula for

$$^nC_r=\frac{n!}{r!(n-r)!}$$

so we have $$^nP_r=\frac{n!}{(n-r)!}$$

Title: Why is nPr represented as n! / (n-r)!?


答:
Consider this:

"It's Christmas" implies "Current month is december"

But
"Current month is december" does not imply "It's Christmas"

Both assertions are not equivalent, but "Christmas" implies the other


问:
How to prove $\log n \leq \sqrt n$ over natural numbers?
It seems like $$\log n \leq \sqrt n \quad \forall n \in \mathbb{N} .$$ I've tried to prove this by induction where I use $$ \log p + \log q \leq \sqrt p \sqrt q $$ when $n=pq$, but this fails for prime numbers. Does anyone know a proof?</p>

答:
Here's a different way to look at this problem. Let $f, g : \mathbb{R} \rightrightarrows \mathbb{R}$ be functions such that

$f$ is monotonically increasing.

$f(x) > g(x)$ for all $x$.

I claim that this implies $f^{-1}(x) < g^{-1}(x)$ for all $x$.

Proof: Suppose toward a contradiction that there is some $x \in \mathbb{R}$ such that $f^{-1}(x) \geq g^{-1}(x)$. By (1), we have

$$
\tag{*}
x = f(f^{-1}(x)) \geq f(g^{-1}(x)).
$$

And by (2), we have

$$
\tag{**}
f(g^{-1}(x)) > g(g^{-1}(x)) = x.
$$

Combining (*) and (**), we get that $x > x$, which is a contradiction.

Applying this fact to $e^x$ and $x^2$, we can show that

$e^x$ is monotonically increasing.

$e^x > x^2$ for all $x$.

This would imply that $\ln x < \sqrt x$ for all $x$. These statements should be simpler to prove. At the very least, it's more intuitive (in my opinion) than working with $\ln x$ and $\sqrt x$.


问:
Essential Selfadjointness of Quantum Harmonic Oscillator Hamiltonian
The Hamiltonian for the Quantum Harmonic Oscillator is (disregarding constants) the Hermite operator
$$
                    Hf = -f''+x^{2}f,
$$
where $\mathcal{D}(H)$ consists of all twice absolutely continuous functions $f \in L^{2}(\mathbb{R})$ for which $Hf \in L^{2}(\mathbb{R})$.

Question: Without using properties of Hermite functions or Hermite polynomials, is there a direct method to show that

$f \in \mathcal{D}(H) \implies xf, f' \in L^{2}(\mathbb{R})$.

$f,g \in \mathcal{D}(H) \implies (Hf,g)= (f',g')+(xf,xg)=(f,Hg)$.

$H$ is selfadjoint. (2 implies the spectrum is non-negative.)

Background: Using these facts, the standard ladder argument used in Physics becomes a rigorous proof that $f$ is an $L^{2}(\mathbb{R})$ eigenfunction of $H$ with eigenvalue $\lambda$ iff

$\lambda=2n+1$ for some $n=0,1,2,3,\cdots$, and

$f$ is a constant multiple of the Hermite function
$$
       h_{n}(x) = (-1)^{n}e^{x^{2}/2}\frac{d^{n}}{dx^{n}}e^{-x^{2}}.
$$

(Actually, only properties (1) and (2) are needed to fully justify the ladder argument.)

答:
Summary

The symmetry (and hence self-adjointness) of the maximal operator is a case of the so-called Sears Theorem; the presentation of the in the book of F. A. Berezin and M. Shubin  [BerShu91] (Section 2.1, starting on page 50) should handle the boundary issues to your satisfaction.  (In particular, they only work on $[-T, T]$ until they're ready to handle the limit $T \to \infty$, and use clever integrating factors roughly akin to $\left( 1 - \frac{|x|}{T}\right)$ to force the necessary cancellation at the endpoints, when needed.)

Once that is established, the compatibility with the quadratic form $\langle f', g' \rangle + \langle xf, xg \rangle$ arises by the theory of closed, densely defined, semibounded-below quadratic forms (see Reed and Simon [ReeSim72], Volume I, Chapter VIII [I think? I don't have it on me]; in the alternative, see T. Kato's text [Kat76] on the more general closed sectorial forms [Chapter VI]).

The general family of problems (in one dimension) is the study of limit-point and limit-circle operators; see D.B. Sears's paper [Sea50], and Volume II of Reed and Simon [ReeSim75], Chapter X, Appendix 1 for more information.

Self-adjointness -- Sears Theorem

More generally, for the (symmetric, densely-defined) operator (and using $\mathfrak{D}$ for domains)

\begin{align}
\mathfrak{D}(H_0) & = C^{\infty}_{0}(\mathbb{R}) = \lbrace C^{\infty}(\mathbb{R})\text{ functions with compact support} \rbrace\\
H_0 y &= -y'' + v(x) y,
\end{align}
where $v(x)$ is real-valued, measurable, locally-bounded, and not too negative, a proof of the symmetry of $H_0^*$ (i.e., a proof of the essential self-adjointness of $H_0$) is given in Berezin and Shubin (Section 2.1, starting p. 50).  They call the result the Sears Theorem, which I believe refers to D. B. Sears and his paper [Sea50], handling a similar problem on $(0, \infty)$.  In the particular case $v(x) = x^2$, I believe that their $H_0^*$ is your $H$, so that you have the necessary self-adjointness ($H_0$ is essentially self-adjoint if and only if $\overline{H_0} = H_0^* = H_0^{**}$.)

Moreover, to avoid special notation, we note that if $v(x) \geq -1$ for all $x$, they show that for all $f \in \mathfrak{D}(H_0^*)$, $f'(x) \in L^2(\mathbb{R})$.

The proof is long enough that I don't think I can summarize it with justice here.  For example, one of the steps you are effectively left to do for yourself is that for $f \in \mathfrak{D}(H_0^*)$, the following expression is finite (if $f$-dependent):
$$
\sup_{T > 0} \frac{1}{T^2} \left( \int_{-T}^T |f(x)|^2 \, dx - 2 |f(0)| T \right).
$$

Quadratic-Form Compatibility -- Lots of Theory

The work of Berezin and Shubin does not directly show $xf(x) \in L^2(\mathbb{R})$, or compatibility with the semi-bounded-below (hence sectorial), closed quadratic form
\begin{align}
\mathfrak{D}(\mathfrak{h}) &= \lbrace f \in L^2(\mathbb{R}): f'(x) \in L^2(\mathbb{R}), xf(x) \in L^2(\mathbb{R}) \rbrace\\
\mathfrak{h}(f, g) &= \langle f', g' \rangle + \langle xf, xg \rangle
\end{align}
(I leave the proof of closure to you unless requested.)

Fortunately, there is a workaround for this with the theory of quadratic forms and some symbol-pushing.  Define $H_{\text{sum}}$ to be the literal operator sum of $-D^2$ and the multiplication-by-$x^2$ operator,
\begin{align}
\mathfrak{D}(H_{\text{sum}}) & = \lbrace f \in L^2(\mathbb{R}): f''(x) \in L^2(\mathbb{R}), x^2f(x) \in L^2(\mathbb{R}) \rbrace\\
H_{\text{sum}}y & = -y'' + x^2y
\end{align}
and define $H_{\text{quad}}$ to be the nonnegative self-adjoint operator coming by theory from the nonnegative, closed, quadratic form $\mathfrak{h}$ (see, e.g., [Kat76], Chapter VI, Section 2.1, Thm. 2.1, pp. 322-323), which in particular satisfies
\begin{equation} \tag{$\dagger$} \label{eq:domincl}
\mathfrak{D}(H_{\text{quad}}) \subseteq \mathfrak{D}(\mathfrak{h}),
\end{equation} and for all $f \in \mathfrak{D}(H_{\text{quad}})$ and $g \in \mathfrak{D}(\mathfrak{h})$,
\begin{equation} \tag{$\dagger \dagger$} \label{eq:compatible}
\langle H_{\text{quad}}f, g \rangle = \mathfrak{h}(f, g).
\end{equation}

We have, or can show, the inclusions
$$H_0 \subseteq H_{\text{sum}} \subseteq H_{\text{quad}},$$
and hence by taking adjoints
$$H_{\text{quad}}^* \subseteq H_{\text{sum}}^* \subseteq H_0^*.$$
Yet $H_{\text{quad}}$ is self-adjoint and closed, and $H_0$ is essentially self-adjoint,  and so by combining the above two lines,
$$H_0 \subseteq H_{\text{quad}} \subseteq H_0^* = \overline{H_0}$$,

and hence $H_{\text{quad}}$ is a closed extension of $H_0$ inside the closure $\overline{H_0}$, so $H_{\text{quad}} = H_0^* = \overline{H_0} = H$.  Therefore, the properties \eqref{eq:domincl} and \eqref{eq:compatible} apply to $H$, so $xf(x) \in L^2(\mathbb{R})$ by the former, and the compatibility with the quadratic form by the latter.

(In fact, $H_{\text{sum}}$ is equal to $H$ as well, but I don't know how to prove that without involving the Hermite functions.)

References:

[BerShu91] F. A. Berezin and M. Shubin, The Schrödinger Equation, Mathematics and its Applications vol. 76, Springer, 1991.  Springer link

[Kat76] T. Kato, Perturbation Theory for Linear Operators, Second Edition, Grundlehren der mathematischen Wissenschaftern 132, Springer-Verlag, 1976.

[ReeSim72] Michael Reed and Barry Simon, Methods of Mathematical Physics, vol I: Functional Analysis, Academic Press, 1972.

[ReeSim75] Michael Reed and Barry Simon, Methods of Mathematical Physics, vol II: Fourier Analysis, Self-Adjointness, Academic Press, 1975.

[Sea50] D. B. Sears, "Note on the uniqueness of Green's functions associated with certain differential equations," Canad. J. Math, 2, 314 -- 325. Scopus link


问:
Coordinates of longitude and latitude in 3d.
The Earth is centered at the origin of a 3d graph, such that the xy-plane has the equator, the xz-plane has the prime meridian, and the north pole is on the positive z-axis.

Find the Cartesian coordinates of the town Beta which is located 40 degrees north of the equator and 15 degrees east of the prime meridian.

I am so confused by this problem. I tried to parameterize this and it led me nowhere.

答:
I express my answer in terms of the formalism of spherical coordinates illustrated there https://en.wikipedia.org/wiki/File:3D_Spherical.svg.

It's all about to recognise $(r,\theta,\phi)$ identify town Beta and converting them into $(x,y,z)$. To do that imagine to have a compass and looking Earth like in this picture https://en.wikipedia.org/wiki/File:Spherical_coordinate_system.svg .

Then saying that Beta is located $40$° north of the equator means that the complementary angle of $\theta$ is $40$°, then $\theta=90°-40°=50°$. Now, moving $\phi$ to east from the first meridian means that it moves in its positive direction, i.e. in your right direction if you watch it as in the picture below. Then, $(r,\theta,\phi)=(R_E,50°,15°)$, where $R_E:=$ Earth radius. So using the conversion relations, cartesian coordinates are: $(x,y,z)=\bigl( R_E \sin \theta \cos \phi, R_E \sin \theta \sin \phi, R_E \cos \theta \bigr)$, where values found below have to be use.


问:
Bijection between $\mathbb{R}$ and $\{(X,Y), X\subset Y\subset \mathbb{N}\}$
Does anyone know how to construct a bijection between $\mathbb{R}$ and $\{(X,Y), X\subset Y\subset \mathbb{N}\}$?($\subset$ means "lies in or equals to")

I'll  appreciate any help!

Thanks in advance.

答:
Note that I'm assuming in the following that $0\notin\mathbb{N}$ (because I think that way it's a bit easier to write the bijection). Of course adjusting for $0\in N$ is trivial.

Step 1: Define a bijection from $\mathbb{R}$ to the interval $(0,1)$. This is easy, e.g
$$ f(x) = \mathrm{e}^{-\mathrm e^x} $$

Step 2: Define a bijection from $(0,1)$ to $(0,1]$ by the function
$$F(x) = \begin{cases}
\frac{1}{n-1} & x=\frac1n, n\in\mathbb{N}, n>1\\
x & \text{otherwise}
\end{cases}$$

Step 3: For each number $y\in(0,1]$, take the ternary expansion. Always choose the expansion which ends in "$222\ldots$" instead of "$000\ldots$".
Now define
$$g(y) = (\mathcal{X}, \mathcal{Y})$$
where
$$\begin{align}
\mathcal{X} &= \{n\in\mathbb{N}: \text{The $n$-th digit of the ternary representation of $y$ is $2$}\}\\
\mathcal{Y} &= \{n\in\mathbb{N}: \text{The $n$-th digit of the ternary representation of $y$ is not $0$}\}
\end{align}$$
Quite obviously $\mathcal{X}\subset\mathcal{Y}\subset{N}$. However, by construction, we only get infinite $\mathcal{Y}$ (because finite $\mathcal{Y}$ would correspond to a ternary expansion ending in period $0$). On the other hand, all pairs of arbitrary $\mathcal{X}$ and infinite $\mathcal{Y}$ with $\mathcal{X}\subset\mathcal{Y}$ uniquely define an $y\in(0,1]$.

Proof that $g$ is bijective:

For any $y\in (0,1]$, there's (thanks to the disambiguation rule to never take the periodic 0 representation) exactly one ternary representation, and each such representation there's exactly one $y$.

The sets $\mathcal{X}$ and $\mathcal{Y}$ encode exactly the sequence of digits (digit $n$ is $0$ iff $n\notin\mathcal{Y}$, digit $n$ is $1$ iff $n\in\mathcal{Y}\setminus\mathcal{X}$, digit $n$ is $2$ iff $n\in\mathcal{X}$). As long as $\mathcal{Y}$ is infinite, the corresponding ternary representation will not be finite (end in period $0$), and vice versa. Thus we have an one-to-one mapping between the set pairs with infinite $\mathcal{Y}$ and the infinite ternary representations, and thus the real numbers in the interval $(0,1]$.

Step 4: Now all that's left is to map the pairs of sets with the subset property where $\mathcal{Y}$ is infinite to the set of pairs of possibly finite sets with the inclusion property.

This bijection from the set of all pairs to the set of infinite pairs (note: that's the opposite direction we need, but I think it's easier to write down than the reverse) is given by
$$h(X,Y) =
\begin{cases}
(X,Y) & \text{neither $Y$ nor $\mathbb{N}\setminus X$ is finite}\\
(X+1,Y+1) & \text{$\mathbb{N}\setminus X$ is finite}\\
\left(\{1\}\cup\left((\mathbb{N}\setminus Y)+1\right),\{1\}\cup\left((\mathbb{N}\setminus X)+1\right)\right) & \text{Y is finite}
\end{cases}$$
Here $X+1 = \{n+1: n\in X\}$.

The complete bijection is therefore $h^{-1}\circ g\circ F\circ f$.