问:
Finding the zeros of $ g(x) = \frac{1}{x-a} + \frac{1}{x-b} + \frac{1}{x-c}$

$$ g  = \frac{1}{x-f(1)} +  \frac{3}{x- f(2) }  + \frac{4}{x-f(3)}$$
And,
$$ f(x) = x^3 + 6x^2 + 12x + 108$$
Find number of real solutions to $g=0$

A 'brute force' way to approach this is by simplfying $g$ :

$$  \frac{(x-f(2) ) (x-f(3) ) + 3 (x-f(1) ) ( x- f(3) )  + 4 (x-f(1) ) (x-f(2) )}{(x-f(1) ) (x-f(2) ) (x-f(3) ) }=g(x)$$

After this, we can find the roots by seeing the behaviour of the function:
$$(x-f(2) ) (x-f(3) ) + 3 (x-f(1) ) ( x- f(3) )  + 4 (x-f(1) ) (x-f(2) )=q(x)$$

and evaluating $q$ at $f(1)$ , $f(2)$ and $f(3)$, and using the identity (from evaluating the function) of :

$$ f(1) < f(2) < f(3)$$

This leads to total roots as zero as we find$ q(f(1) ) $ is postive $q(f(2) ) $ is negative and $q(f(3) )$ is positive, and intermediate value theorem gives the answer.

However, I find this method quite lengthy and algebra messy, is there a faster and maybe easier method?

答:
We'll consider four intervals $(-\infty, a),(a,b), (b,c),(c,\infty)$. Let's call these $A,B,C,D$ respectively. Here $a\lt b\lt c$.

On each of these intervals: $g'(x)\lt 0$. By Rolle's theorem, $g(x)=0$ can have at most 1 root in each of the intervals considered above.

Now we'll analyze each of the above intervals.

$A$: $g(x)\to -\infty$ as $x\to a^-$. No root here.

$B$: $g(x)\to \infty $ as $x\to a^+$ and $g(x)\to -\infty$ as $x\to b^-$, which means that given any $M\gt 0, M'\lt 0$, there exist $\delta,\delta'\gt 0$ such that $a\lt x\lt a+\delta\implies g(x)\gt M$ and $b-\delta'\lt x\lt b\implies g(x)\lt M'\lt 0$. Choose $x_1,x_2$ such that $a\lt x_1\lt a+\delta$ and $b-\delta'\lt x_2\lt b$. Hence, by IVT, there is root of $g(x)=0$ on $[x_1,x_2]$.

$C:$ As in $B$, there is a root of $g(x)=0$ in C.

$D$: No root as in $A$.


问:
How to find the maximum value of this expression?
expression:$$\sum_{i=1}^{n-1} \frac{\sqrt{1+\cos(\theta_i)}}{\sqrt{2}} +\frac{\sqrt{1-\cos(\sum_{i=1}^{n-1}\theta_i)}}{\sqrt{2}}$$ I guess its maximum value is obtained when all $\theta_i=\pi/n$ are the same and the the max value is $n\cos(\frac{\pi}{2n})$.The partial derivatives is so complex that I can't analytically  solve it.

答:
Hint.

Calling $\sum_{i=1}^{n-1}\theta_i = \phi_{n-1}$ we have

$$
\frac{d}{d\theta_i}\left(\sqrt{1+\cos(\theta_i)} +\sqrt{1-\cos(\phi_{n-1})}\right)=\frac 12\left(-\frac{\sin(\theta_i)}{\sqrt{1+\cos(\theta_i)}}+\frac{\sin(\phi_{n-1})}{\sqrt{1+\cos(\phi_{n-1})}}\right)=0
$$

so we have as a consequence for $i\ne j$

$$
\frac{\sin(\theta_i)}{\sqrt{1+\cos(\theta_i)}}=\frac{\sin(\theta_j)}{\sqrt{1+\cos(\theta_j)}}
$$

as the stationary condition. So the maximum is obtained by solving

$$
\max_{\theta}\frac{n-1}{\sqrt{2}}\left(\sqrt{1+\cos(\theta)} +\sqrt{1-\cos((n-1)\theta)}\right)
$$

or when

$$
\frac{\sin(\theta)}{\sqrt{1+\cos(\theta)}}=\frac{\sin((n-1)\theta)}{\sqrt{1+\cos((n-1)\theta)}}
$$

ContentLicense: CC BY-SA 4.0


答:
Note that
$$g'(x) = -\frac{1}{(x-f(1))^2} - \frac{3}{(x- f(2))^2 }  - \frac{4}{(x-f(3))^2} < 0$$
which means $g(x)$ is always decreasing. However, we should take into account that the graph of $g$ consists of many lines.

Also, note that
$$\lim_{x\to-\infty} g(x) = 0^-, \qquad \lim_{x\to+\infty} g(x) = 0^+$$
and
$$\lim_{x\to a^-}g(x) = -\infty, \qquad \lim_{x\to a^+}g(x) = +\infty \\
\lim_{x\to b^-}g(x) = -\infty, \qquad \lim_{x\to b^+}g(x) = +\infty \\
\lim_{x\to c^-}g(x) = -\infty, \qquad \lim_{x\to c^+}g(x) = +\infty$$
Hence, there are two roots: one in $(a, b)$ and another in $(b, c)$.

Using the above analysis, we can easily verify by hand that he graph has the following form:

Title: Finding the zeros of $ g(x) = \frac{1}{x-a} + \frac{1}{x-b} + \frac{1}{x-c}$

Body:
$$ g  = \frac{1}{x-f(1)} +  \frac{3}{x- f(2) }  + \frac{4}{x-f(3)}$$
And,
$$ f(x) = x^3 + 6x^2 + 12x + 108$$
Find number of real solutions to $g=0$

A 'brute force' way to approach this is by simplfying $g$ :

$$  \frac{(x-f(2) ) (x-f(3) ) + 3 (x-f(1) ) ( x- f(3) )  + 4 (x-f(1) ) (x-f(2) )}{(x-f(1) ) (x-f(2) ) (x-f(3) ) }=g(x)$$

After this, we can find the roots by seeing the behaviour of the function:
$$(x-f(2) ) (x-f(3) ) + 3 (x-f(1) ) ( x- f(3) )  + 4 (x-f(1) ) (x-f(2) )=q(x)$$

and evaluating $q$ at $f(1)$ , $f(2)$ and $f(3)$, and using the identity (from evaluating the function) of :

$$ f(1) < f(2) < f(3)$$

This leads to total roots as zero as we find$ q(f(1) ) $ is postive $q(f(2) ) $ is negative and $q(f(3) )$ is positive, and intermediate value theorem gives the answer.

However, I find this method quite lengthy and algebra messy, is there a faster and maybe easier method?


问:
factor $1/(x\pm y)$ as $f(x)g(y)$
Is it possible to rewrite
$$\frac{1}{x\pm y}$$
as multiplication of an expression containing only $x$ and another containing only $y$ ($x$ and $y$ are real independent variables), i.e.
$$\frac{1}{x\pm y}\stackrel{?}{=}f(x)g(y)$$
If it is possible, what are $f(x)$ and $g(y)$?

答:
No, this is not possible.

For one, you have a problem when taking $x,y$ such that $x+y=0$, since in that case, $\frac{1}{x+y}$ is not defined, while $f(x)\cdot g(y)$ is a well defined number.

But let's avoid the region around $0$. Say, for example, that $x$ and $y$ are both positive. That means $x+y>0$ and you are in the clear.

Fix $y=1$ and observe your expression. It becomes $$\frac1{x+1}=f(x)g(1)$$ which means that $f(x)=\frac{1}{g(1)(x+1)}$ for all values of $x$. Similarly, you can show that $g(y)=\frac{1}{f(1)(y+1)}$ for all values of $y$. Put the two expressions together, and you get $$f(x)g(y)=\frac{1}{(x+1)(y+1)f(1)g(1)} = \frac{1}{x+y}$$ and this rewrites to $$f(1)g(1)=\frac{x+y}{(x+1)(y+1)}.$$ The right hand side of the equation is a non-constant function (just take $(1,1)$ and $(2,2)$ as examples of input values that do not return the same value), while the left hand side is a constant, which leads to a contradiction.

Title: factor $1/(x\pm y)$ as $f(x)g(y)$


问:
Calculate the next Inverse laplace transform
This question may be very basic, but I dont know how to get the next inverse laplace's transform:

$${\scr L}^{-1}\left\{\frac{1}{(s-1)^2}\right\}$$

I can only use these two formulas:
${\scr L}\{e^{at}\}=\frac{1}{(s-a)}$ and
${\scr L}\{t^n\}=\frac{n!}{s^{n+1}}$

I can also use all the laplace's transform properties but the definition of the laplace transform definition

答:
Frequency shift property: If $\mathcal{L}[f(t)]=F(s)$ then $\mathcal{L}[e^{a t}f(t)]=F(s-a)$.

Try using it to evaluate $\mathcal{L}[e^{t}t]$.

ContentLicense: CC BY-SA 3.0


问:
Elementary proofs about $f(t)=\lim_{n\to\infty}(1+\frac tn)^n$
Please read carefully what I mean by elementary before marking the question as duplicate.

I'm starting calculus lessons in High School; that is: no series, no derivatives, no limits of functions, no continuity... I have just stated the axiom of supreme and defined sequence and limit of sequence. I have proved that a monotone, bounded sequence has limit. Just that.

Under so 'elementary' conditions, I'd like to prove:

For each real $t$, the sequence $\left(1+\dfrac tn\right)^n$ converges. (I have problems for $t<0$). Then I'll define $e^t$ as the limit of this sequence.

For every pair $t,s$, $e^{t+s}=e^te^s$.

Any ideas or bibliography?

答:
For convergence, I show that the sequence $\left(1+\dfrac tn\right)^n$ is increasing.

If $t>0$ and $n$ is big, this is seen as follows: $$\frac{\left(1+\dfrac t{n+1}\right)^{n+1}}{\left(1+\dfrac tn\right)^n} = \left(1+\dfrac t{n+1}\right) \left[ \frac{n(n+1+t)}{(n+t)(n+1)}\right]^n = \left(1+\dfrac t{n+1}\right)\left[1-\frac{t}{(n+t)(n+1)}\right]^n \geq^1$$
$$\geq^1\left(1+\dfrac t{n+1}\right)\left[1-\frac{nt}{(n+t)(n+1)}\right]\geq^2 \left(1+\dfrac t{n+1}\right)\left(\frac{1}{1+\frac{t}{n+1}}\right)=1$$Where inequality $\geq^1$ follows from $(1+x)^n \geq 1+nx$ for $x>-1$ (and this is where we are taking $n$ big enough so $1-\frac{t}{(n+t)(n+1)}>-1$) and inequality $\geq^2$ is algebraic manipulation: $$1-\frac{nt}{(n+t)(n+1)} = \frac{n^2+t+n}{n^2+nt+t+n} = \frac{1}{1+\frac{nt}{n^2+n+t}} = \frac{1}{1+\frac{t}{n+1+t/n}} \geq \frac{1}{1+\frac{t}{n+1}}$$
For $t<0$, the inequalities I have written can be seen to still hold if $n$ is big enough.

Also, the sequences are bounded. For $t<0$ this is easy because $\left(1+\dfrac tn\right)^n<1^n=1$. For $t>0$, fix an integer $m>\max \{t,2\}$, and write $$\left(1+\dfrac tn\right)^n \leq \left(1+\dfrac mn\right)^n = \sum_{k=0}^n\frac{n!}{(n-k)!}\frac{m^k}{n^k}\frac{1}{k!} \leq \sum_{k=0}^n \frac{m^k}{k!} = $$ $$= \sum_{k=0}^{3m} \frac{m^k}{k!} + \sum_{k=3m+1}^n\frac{m \cdot \ldots \cdot m}{(2m)(2m-1) \ldots1} \frac{1}{(2m+1) \ldots (3m) \ldots k} \leq $$ $$\leq \sum_{k=0}^{3m} \frac{m^k}{k!} + \sum_{k=3m+1}^n \left(\frac{1}{4} \right)^{k-2m} \leq \sum_{k=0}^{3m} \frac{m^k}{k!} + 1 < \infty$$
Now, an increasing and bounded sequence has a limit, proving the first claim.

I have been trying to see the product rule but could not finish it, at least using only the definition $e^t = \lim_n \left( 1+\dfrac tn\right)^n$. I have seen that: $$e^{s+t} = \lim_n \sum_{k=0}^n {n \choose k}\left(1+\dfrac sn\right)^{n-k}\left(\dfrac tn\right)^k \leq e^s \sum_{k=0}^n {n \choose k}\left(\dfrac tn\right)^k = e^se^t$$and this holds for $s \in \mathbb{R}$ and $t\geq 0$. On the other hand, if $s$ and $t$ are both negative, $$e^se^t = \lim_n \left( 1+\dfrac tn\right)^n\left( 1+\dfrac sn\right)^n= \lim_n \left( 1+\dfrac {t+s}n +\frac{st}{n^2}\right)^n \geq \lim_n \left( 1+\dfrac {t+s}n\right)^n=e^{s+t}$$Proving that, in general, $e^{s+t} \leq e^se^t$. Now, if $s$ and $t$ have opposite signs, the above inequaity changes its direction, and one has that $e^se^t \leq e^{s+t}$, so I still need to prove that $e^se^t \leq e^{s+t}$ when $s$ and $t$ are positive.

I hope this helps; this is not taken from any book, so probably there are faster ways to prove some facts.

EDIT: I finally got to prove it. Because $e^{s+t} = e^se^t$ holds for opposite signs, I get $e^{t}e^{-t}=1$, which is equivalent to $$\lim_n\left(1+\dfrac tn\right)^n = \lim_n \left(1-\dfrac tn\right)^{-n}$$And therefore $$\frac{e^se^t}{e^{s+t}} = \lim_n \left[ 1+\frac{st}{n(n-s-t)}\right]^{-n} \leq 1$$when $s$ and $t$ have the same sign.

Elementary results I am using:

A bounded increasing sequence  has a limit

Binomial theorem $(a+b)^n = \sum_{k=0}^n {n \choose k} a^k b^{n-k}$

If $x>-1$, $(1+x)^n \geq 1+nx$

$\sum_{k=1}^n \frac{1}{4^k}\leq 1$ for any $n$


问:
Prove that $\frac{10^n-1}{9n}$ is integer when $n=3^k$
I have no idea how to go about proving this. The furthest I've gotten is to say that the sequence equals 1/1, 11/2, 111/3, etc.

So that means that $\frac{10^a-1}{9}$ must be divisible by 3.

$\frac{10^a-1}{9} = 3b \implies 10^a-1 = 27b \implies 27b+1 = 10^a$.

When is that last statement true?

答:
Recall a simple form (with simple proof)  of  LTE = Lifting The Exponent is

$$a\equiv b\!\!\! \pmod{kn}\,\Rightarrow\, a^k\equiv b^k\!\!\!\! \pmod{k^2n}$$

Applied inductively for $\,k=3\,$ (i.e. repeatedly cubing) yields the claim as follows
$$\begin{align}
&10^{\large 3^\color{#c00}0}\! \equiv 1\!\!\! \pmod{3^{2+\color{#c00}0}}\\
\Rightarrow\ &10^{\large 3^\color{#c00}1}\! \equiv 1\!\!\! \pmod{3^{2+\color{#c00}1}}\ \ \rm by\ \ LTE\\
\Rightarrow\ &10^{\large 3^\color{#c00}2}\! \equiv 1\!\!\! \pmod{3^{2+\color{#c00}2}}\ \ \rm by\ \ LTE\\
&\ \ \ \ \ \ \ \ \ \vdots\\
\Rightarrow\ &10^{\large 3^\color{#c00}k}\! \equiv 1\!\!\! \pmod{3^{2+\color{#c00}k}}\ \ \rm by\ \ LTE\\[.1em]
\Rightarrow\ &9\cdot 3^k\mid 10^{3^k}\!\!-1\\[.1em]
\Rightarrow\ & 9\cdot n\ \mid 10^n-1
\end{align}\qquad$$


答:
Note that with $3$ terms in $g(x)$ then $q(x)$ will at always be of second degree, so this is easily soluble.

In fact $g(x)=\dfrac 1{x-a}+\dfrac 1{x-b}+\dfrac 1{x-c}=\dfrac {3x^2-2(a+b+c)x+(ab+bc+ca)}{(x-a)(x-b)(x-c)}$

So the roots are $$\frac13{(a+b+c)}\pm\frac 13\sqrt{(a+b+c)^2-3(ab+bc+ca)}$$

Depending on $a,b,c$ you may have $0,1$ or $2$ roots, depending on the sign of the inners of the square root.


问:
Uniqueness of spectral decomposition
Consider the spectral decomposition of a hermitian positive semi-definite matrix $A\in M_n(\mathbb{C})$:

$$A = \sum_{i=1}^k \lambda_i P_i, $$

where $\lambda_i >0$ are the distinct non-zero eigenvalues and $P_i\in M_n(\mathbb{C})$ are projectors onto the corresponding eigenspaces. If $Q_i\in M_n(\mathbb{C})$ are arbitrary positive semi-definite matrices with $trQ_i = trP_i$ for each $i$ such that $A= \sum_{i=1}^k \lambda_i Q_i$, can one conclude that $Q_i=P_i$ for each $i$ ?

Title: Uniqueness of spectral decomposition

Body:
No. E.g.
$$
2\pmatrix{1&0\\ 0&0}
+3\pmatrix{0&0\\ 0&1}
=\pmatrix{2&0\\ 0&3}
=2\pmatrix{\frac12&0\\ 0&\frac12}
+3\pmatrix{\frac13&0\\ 0&\frac23}.
$$


答:
From the definition we have the phase shift,$$
F(s):={\scr L} \{ f(t) \}\implies {\scr L} \{ e^{at} f(t) \} = F(s-a)
$$

Therefore
$$
{\scr L}\{e^tt\}(s) = {\scr L}\{t\}(s-1) = \left\{\frac 1 {s^2}\right\}(s-1) = \frac 1 {(s-1)^2}
$$

Giving,

$$
{\scr L^{-1}}\left\{ \frac 1 {(s-1)^2} \right\} = e^tt
$$

Title: Calculate the next Inverse laplace transform

Body:
This question may be very basic, but I dont know how to get the next inverse laplace's transform:

$${\scr L}^{-1}\left\{\frac{1}{(s-1)^2}\right\}$$

I can only use these two formulas:
${\scr L}\{e^{at}\}=\frac{1}{(s-a)}$ and
${\scr L}\{t^n\}=\frac{n!}{s^{n+1}}$

I can also use all the laplace's transform properties but the definition of the laplace transform definition


问:
Help with Linear Algebra
I need to solve part a) of the following question:

This is what I have done:

Is the above sufficient to prove this part of the question and is it correct?

答:
No, not even close. For one you are proving a statement that has nothing to do with limits, and you are bringing limits into it. Second, your proof is not a proof by induction (as the instructions of the task demand). Finally, you make a false statement in the proof. You say

Let $A\geq 0$. Then $\lim_{t\to\infty} B^t=B$

The two statements you wrote are completely unconnected, and, more importantly, the second one is false. Take, for example, $B=[\frac12]$, the $1\times 1$ matrix with one value, $\frac12$. Then you can clearly see that $$\lim_{t\to\infty} B^t=[0]\neq B$$ which means your statement is false.

Title: Help with Linear Algebra


问:
How to summarize the rewards of a "lottery" sequence?
I play a game where we can collect a certain type of resource, let's say it is money. With a certain amount of money we can buy a sort of lottery ticket. The ticket either gives back some money or gives other types of resources with certain chances. So what we have is something like:

```<code>B[money]      balance
T[function]   ticket
   p[money]   the price of the ticket
   rm[money]  money reward
   cm[%]      chance of winning the money reward
   rx[x]      resource x reward
   cx[%]      chance of winning the resource x reward
   ry[y]      resource y reward
   cy[%]      chance of winning the resource y reward
   rz[z]      resource z reward
   cz[%]      chance of winning the resource z reward
   ...
</code>```

We can buy tickets until we run out of money and there are different types of tickets we can choose from. The goal is comparing tickets and choosing the right one for winning the most type "x" resources. It really depends on the players needs which resource is more important for them so for others "y" might be more useful. I want to compare tickets to be able to decide which one to choose for my needs.

For a comparison I need to know how much rewards I can expect from them when I start with a certain amount of money. For now what I did is using a random number generator and buying tickets until I ran out of money. After that I start over, and I do this for example 10k times. I end up with a multi dimensional reward distribution:

$$
T_p(B) = \{
  a_1 x + b_1 y + c_1 z + ...,
  a_2 x + b_2 y + c_2 z + ...,
  ...
  a_{10000} x + b_{10000} y + c_{10000} z + ...
\}
$$

After that I calculate average and standard deviation for each resources and end up with a statistics something like the following with for example 68% confidence:

$$S(T_p(B)) = (avg(a_i) \pm stdev(a_i))x + (avg(b_i) \pm stdev(b_i))y + (avg(c_i) \pm stdev(c_i))z + ...$$

I am not sure if standard deviation is valid here. Is it?

With the average I can compare my chests so for example if "x" is the most important resource, then a comparison is something simple like:

$$S(T_p).avg.x > S(T_q).avg.x$$

Which means ticket "p" gives more resource "x" than ticket "q", so I have to choose ticket "p" over ticket "q".

What I want to do is figuring out the formula for the upper results. For certain tickets it is trivial to count the average, because they don't give back any money $r_m = 0, x_m = 0$.

$$S(T(B)).{avg} = B/p \cdot [ (r_x \cdot c_x)x + (r_y \cdot c_y)y + (r_z \cdot c_z)z + ... ]$$

Here the number of drawing lots is $L = B/p$. It is possible to count this number for a ticket that gives back money too. We have a series there:

$$L(B) = B/p + L(r_m \cdot c_m \cdot B/p)$$
$$L(B) = B/p \cdot [1 + (r_m \cdot c_m) / p + ((r_m \cdot c_m)/p)^2 + ((r_m \cdot c_m)/p)^3 + ... ]$$
$$L(B) = B/p \cdot \sum_{i=0}^\infty{((r_m \cdot c_m)/p)^i}$$

For this kind of series we can use the following solution:

$$L(B) \cdot [1 - ((r_m \cdot c_m)/p)] = B/p \cdot [1 - ((r_m \cdot c_m)/p)^\infty]$$
$$0 < (r_m \cdot c_m)/p < 1$$
$$L(B) = \frac{B/p}{1 - (r_m \cdot c_m)/p} = \frac{B}{p - r_m \cdot c_m}$$

This works pretty well for the average number of drawing lots, but I am not sure how do I get the average for the rewards. Should I just multiply this with the chances and rewards like I did in the trivial case?

$$S(T(B)).{avg} = \frac{B}{p - r_m \cdot c_m} \cdot [ (r_x \cdot c_x)x + (r_y \cdot c_y)y + (r_z \cdot c_z)z + ... ]$$

I guess this is right, so this is the easy question.

The hard question is how do I get information about the distribution? So what kind of distribution do we have here and how can I describe it?

The $0 < (r_m \cdot c_m)/p < 1$ is always true, but $r_m > p$ is possible in the case of some tickets, so it is possible to win more money than we spend on the ticket. Which means it is possible to buy certain tickets infinite times $L_{max}(B) = \infty$ with a zero chance, while there are tickets which can we win only a finite times $L_{max}(B) \neq \infty$.

The $L_{min}(B) = B/p$ is trivial again. I think I can calculate the probability for these corner cases, but I have no idea about how to calculate the probability for the $L(B)$ values that are not average, min or max. I can get the same L value in many possible ways and for me it is a little confusing to work through all of these permutations. Even if I manage to somehow calculate the probabilities for different $L(B)$ values, I have no idea how I can calculate the chance and reward distributions even for these corner cases. For me knowing the $S(T(B)).{avg}$ is enough and probably the formula I wrote for it is ok, I just want to know if it is possible to say anything about the distributions without doing a simulation and how?

答:
I managed to figure this out meanwhile, but it is a complex question. We need some tools here from statistics and enumerative combinatorics.

I have the upper formula for average:

$$S(T(B)).{avg} = \frac{B}{p - r_m \cdot c_m} \cdot [ (r_x \cdot c_x)x + (r_y \cdot c_y)y + (r_z \cdot c_z)z + ... ]$$

I want to change the symbols here, and I would rather use

$p$ for probability instead of $c$ for chance

$c_t$ for ticket costs instead of $p$ for ticket price

$m0$ money at the beginning instead of $B$ balance

avoid dot for properties.

So the upper formula looks like the following with the new symbols:

$$S_{avg}(T(m_0)) = \frac{m_0}{c_t - r_m \cdot p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ]$$

I checked and it certainly works for the average, but for the distribution it is useless. I don't know if there is any shortcut for the distribution, I just thought it through with a brute force method sort of and tried to reuse certain recurring patterns.

1.) How many time can we draw lots with what probability?

First we need to deal with the ever changing $L$ number, which represents the number of drawing lots. In the upper formula we are talking about average too.

$$L_{avg} = \frac{m_0}{c_t - r_m \cdot p_m}$$

The exact number is unknown, because it depends on the $r_m$ and the $c_m$. If we are lucky, then we can draw more lots if we can win back our money. We can talk about the minimum and the maximum numbers here. We got the minimum if we never win back money and we got the maximum if we always win back money.

$$L_{min} = floor(m_0/c_t)$$

$$
L_{max}(m=m_0) = \left\{\begin{array}{ll}
0 & m < c_t\\
\infty & r_m > c_t\\
floor(m/c_t) + L_{max}(m\%c_t + floor(m/c_t) \cdot r_m) & otherwise
\end{array}\right.
$$

Everything is in-between these two edge cases.

$$L_{min} \leq L \leq L_{max}$$

I assume that we can count the average from this too, though in the case of $L_{max} = \infty$ we need to draw the line somewhere. I guess we need to check how much probability we have left from $p(L \leq L_{max}) = 100\%$ and draw the line around $p(L \leq L_{max}) = 99.9\%$, ofc. this is arbitrary. I guess this method works sometimes even with an $r_m \cdot p_m >= c_t$ here if $m_0$ is low enough, because with each cycle we increase the $p(L \leq L_{max})$ value, though we need to be careful, because we can easily end up with an ifinite loop.

$$L_{avg} = \sum_{L=L_{min}}^{L_{max}}{p(L) \cdot L}$$

I don't think we have a shortcut to count probability for $L$ because we cannot be sure what scenarios leads there. Let's call the number of drawing lots where we got money reward $L_m$. We can count the probability of a certain $L$ and $L_m$ pair this way:

$$p(L,L_m) = p_m^{L_m} \cdot (1-p_m)^{(L-L_m)}$$

But if we think about it, then this formula does not work in the case of $r_m > 0$, because these events are not necessarily independent from each other. For example if $m_0 = 4 \cdot c_t$ and $r_m = 1/2 \cdot c_t$, then

$$L_{min} = 4$$
$$L_{max} = 7$$

If we start with $L = 4$ and with $L_m = 0$ and increase $L_m$ with 1 in each cycle, then we soon run into a problem, because in the case of $L_m = 2$ we can draw lots another time. So certain permutations just don't exist here. I try to express this with sequences and unordered lists:

$$\{0,0,1,1\} \rightarrow (\{0,0,1,1\},0),(\{0,0,1,1\},1)$$
$$p(L=4,L_m=2) = 0 \neq (1/2)^2 \cdot (1-1/2)^{(4-2)}$$

So only $L = 5$ can exist with $L_m = 2$. But if we check, then we don't have all the permutations for $L = 5$ and $L_m = 2$, because if we don't win 2 in the first 4 times, then we won't have enough money to draw lots a 5th time and win money there.

$$\{0,0,0,1\} \nrightarrow (\{0,0,0,1\},1)$$
$$p(L=5,L_m=2) < (1/2)^2 \cdot (1-1/2)^{(5-2)}$$

So if we want to know the real probabilities we need a hierarchical approach and start with scenarios that certainly happen. We need a loops here just like in the formula of $L_{max}$ and work only with the money we currently have.

$$p(\{0,0,0,0\}) = (1-p_m)^4$$
$$p(\{0,0,0,1\}) = p_m \cdot (1-p_m)^3$$
$$p(\{0,0,1,1,...\}) = p_m^2 \cdot (1-p_m)^2$$
$$p(\{0,1,1,1,...\}) = p_m^3 \cdot (1-p_m)$$
$$p(\{1,1,1,1,...\}) = p_m^4$$

After this first cycle we ended up with some leaves and some branches and we can continue to grow our tree.

$$p(\{0,0,1,1,...\}) = p_m^2 \cdot (1-p_m)^2$$

If we continue with winning money, then

$$p((\{0,0,1,1\},1)) = p(\{0,0,1,1,...\}) \cdot p_m$$

On the other hand if we continue with not winning money, then

$$p((\{0,0,1,1\},0)) = p(\{0,0,1,1,...\}) \cdot (1-p_m)$$

In both cases we cannot continue further, because we don't have enough money to be able to draw lots one more time. If we could continue e.g. in the case of $(\{0,1,1,1,...\},1)$, then again we could count the probability for $(\{0,1,1,1\},1,0)$ and $(\{0,1,1,1\},1,1)$ and we would stop there after running out of money.

So for example if we want to know $p(L=6,L_m=4)$, then we need to sum up the probability of all leaves where that composition happens.

$$
p(L=6,L_m=4) = p(\{0,0,1,1,1,1\}) = \\
p((\{1,1,1,1\},0,0)) + p((\{0,1,1,1\},1,0)) + p((\{0,0,1,1\},1,1)) = \\
p(\{1,1,1,1\,...\}) \cdot p((0,0)) + p(\{0,1,1,1,...\}) \cdot p((1,0)) + p(\{0,0,1,1,...\}) \cdot p((1,1))
$$

Note that in this example the order matters, because we are talking about unordered lists and sequences.

$$
p(\{0,1\}) = p((0,1)) + p((1,0))
$$

In our example $(\{0,1,1,1\},1,0)$ exists, while $(\{0,1,1,1\},0,1)$ is non-existent, because we need to win money 4 times in 5 to be able to draw lots a 6th time.

Okay, so we counted the probabilities for different $L$ and $L_m$ pairs. We can calculate the probabilities for $L$ and $L_m$ individually too by summing up the probabilities of their pairs.

$$p(L) = \sum_{L_m = 0}^{L}{p(L,L_m)}$$

$$p(L_m) = \sum_{L = L_{min}}^{L_{max}}{p(L,L_m)}$$

2.) What do we win with what probabilities?

In my case this is tricky, because I have another extra constant reward, which I calculate this way:

$$S_{e_{avg}}(T(m_0)) = \sum_{L=L_{min}}^{L_{max}}{(p(L) \cdot L \cdot r_e)e}$$

Or we can draw a distribution for it based on the results:

$$S_{e}(T(m_0)) = (p(L), (L \cdot r_e)e)$$

As of the other non-money rewards I have to use the drawing lots where I did not win money, so

$$L_{(x,y,z,...)} = L - L_m$$

We can count probabilities for this too:

$$p(L_{(x,y,z,...)}) = \sum_{L = L_{min}}^{L_{max}}{p(L,(L_m=L-L_{(x,y,z,...)}))}$$

For a certain $L_{(x,y,z,...)}$ we have 100% probability of winning something different than money $L_{(x,y,z,...)}$ times. So $p_x + p_y + p_z = 1$ and $p_m = 0$ for these scenarios. I believe the relative probabilities stay the same, so

$$p(x)/p(y) = p_2(x)/p_2(y)$$
$$p_2(x) = p_x/(1-p_m)$$

If this is the case, then we can count the average for different rewards:

$$S_{avg}(T(m_0)) = \sum_{L_{(x,y,z,...)}=0}^{L_{max}}{p(L_{(x,y,z,...)}) \cdot L_{(x,y,z,...)} \cdot [\frac{r_x \cdot p_x}{(1-p_m)}x + \frac{r_y \cdot p_y}{(1-p_m)}y + \frac{r_z \cdot p_z}{(1-p_m)}z + ...]}$$

We can simplify this further because we multiply with constants by summing up:

$$S_{avg}(T(m_0)) = \frac{\sum_{L_{(x,y,z,...)}=0}^{L_{max}}{p(L_{(x,y,z,...)}) \cdot L_{(x,y,z,...)}}}{1-p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ]$$

Which is very similar to what we started with.

$$S_{avg}(T(m_0)) = \frac{m_0}{c_t - r_m \cdot p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ]$$

So we have a new equation, which is sort of trivial if we think about it:

$$L_{(x,y,z,...)_{avg}} = \frac{m_0}{c_t - r_m \cdot p_m} \cdot (1-p_m) = L_{avg} \cdot (1-p_m)$$

We can draw a distribution for these the following way:

$$S(T(m_0)) = (p(L_{(x,y,z,...)}),  \frac{L_{(x,y,z,...)}}{1-p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ])$$

If we want to draw this with $S_e$ too, then it is somewhat more complicated:

$$S(T(m_0)) = (p(L, L_m), (L \cdot r_e)e + \frac{L - L_m}{1-p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ])$$

Thought we still have an average here for $x,y,z,...$ for each $L$ and $L_m$ pair. We can get the real probability here for the certain reward permutations by doing the following:

$$S(T(m_0)) = (p(L, L_m), (L \cdot r_e)e + [\frac{(r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... }{1-p_m}]^{L - L_m})$$

It is possible to expand the $[(r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ...]^{L - L_m}$, because it is the same as expanding $(a + b + c + ...)^n$ where $a = (r_x \cdot p_x)x$, $b = (r_y \cdot p_y)y$, $z = (r_z \cdot p_z)z$ and $n = L - L_m$.

Let's call $s = (a, b, c, d, ...)$, so if we multiply these $n$ times we will end up with $|s|^n$ permutations, which we could draw in an n-dimensional square matrix or we can draw it in $|s|^{n-2}$ 2d tables too:

```<code>a_  | a^2  | ab   | ac   | ad   | ...
--- | ---- | ---- | ---- | ---- | ---
a   | a^3  | a^2b | a^2c | a^2d | ...
b   | a^2b | ab^2 | abc  | abd  | ...
c   | a^2c | abc  | ac^2 | acd  | ...
d   | a^2d | abd  | acd  | ad^2 | ...
... | ...  | ...  | ...  | ...  | ...

b_  | ab   | b^2  | bc   | bd   | ...
--- | ---- | ---- | ---- | ---- | ---
a   | a^2b | ab^2 | abc  | abd  | ...
b   | ab^2 | b^3  | b^2c | b^2d | ...
c   | abc  | b^2c | bc^2 | bcd  | ...
d   | abd  | b^2d | bcd  | bd^2 | ...
... | ...  | ...  | ...  | ...  | ...

c_  | ac   | bc   | c^2  | cd   | ...
--- | ---- | ---- | ---- | ---- | ---
a   | a^2c | abc  | ac^2 | acd  | ...
b   | abc  | b^2c | bc^2 | bcd  | ...
c   | ac^2 | bc^2 | c^3  | c^2d | ...
d   | acd  | bcd  | c^2d | cd^2 | ...
... | ...  | ...  | ...  | ...  | ...

d_  | ad   | bd   | cd   | d^2  | ...
--- | ---- | ---- | ---- | ---- | ---
a   | a^2d | abd  | acd  | ad^2 | ...
b   | abd  | b^2d | bcd  | bd^2 | ...
c   | acd  | bcd  | c^2d | cd^2 | ...
d   | ad^2 | bd^2 | cd^2 | d^3  | ...
... | ...  | ...  | ...  | ...  | ...

...
</code>```

If we do so we realize, that the upper formula is wrong. Well I am not sure how to explain it. Here we have one $a^3$ in our table and we have $4^3 = 64$ permutations. So the probability of having $a^3$ is $1/64$. Now if we check it with our original example $((r_x \cdot p_x)x)^3 = ({r_x}^3 \cdot {p_x}^3)x^3$, which is not what we need. What we really need in this scenario is $((3 \cdot {r_x}x) \cdot (1 \cdot {p_x}^3))$. If we check another scenario, for example $a^2c$, then we have it 3 times in our table, so we have $(2 \cdot {r_x}x + 1 \cdot {r_z}z) \cdot (3 \cdot {p_x}^2 \cdot p_z)$ there. Now writing down the exact formula of this with the language of math is beyond my abilities currently, but I guess you get what I mean. What we really have here is $(p_x + p_y + p_z + p_q)^3$ and the quantity of the reward depends on the power of the probability. If we check, we don't really need the $r_x$ value, the $x$ would be enough here, but in my case I can have multiple ${r_x}_i$ values with multiple ${p_x}_i$ probabilities, that's why I need it.

Summary

So we will end up with a distribution for drawing lots and inside that with a distribution of different outcomes. We can sum these up based on our needs, for example if we care only about $x$, then we need to sum up the probabilities of winning $(0 \cdot r_x)x$, $(1 \cdot r_x)x$, ..., $(L_{max} \cdot r_x)x$ and we end up with a nice distribution for $x$. We can even draw the different types of lotteries on the same $p(S_x)$ - $S_x$ distribution chart though in the case of different $r_x$ values we'll need to rather use ranges for this chart to be able to compare them. If we care about both $e$ and $x$ or $x$ and $y$, then we can try to draw a 3d surface for the probabilities, but it is easier to sum them up separately and draw it that way. We lose some covariance info this way, so for example if the probability of $x$ is always low when the probability of $y$ is high or vice-versa, then we won't see it on these 2d charts, while we would be able to see it on the 3d surface chart. So in theory I could write a nice program for this, in practice, I was just curious how this can be done, in practice I'll use the original formula for the average, because it is simple, fast and according to my simulations the deviation is not very high, maybe around 20% in most of the cases.

I hope this was not completely wrong, it was fun to think it through.

Body:
I managed to figure this out meanwhile, but it is a complex question. We need some tools here from statistics and enumerative combinatorics.

I have the upper formula for average:

$$S(T(B)).{avg} = \frac{B}{p - r_m \cdot c_m} \cdot [ (r_x \cdot c_x)x + (r_y \cdot c_y)y + (r_z \cdot c_z)z + ... ]$$

I want to change the symbols here, and I would rather use

$p$ for probability instead of $c$ for chance

$c_t$ for ticket costs instead of $p$ for ticket price

$m0$ money at the beginning instead of $B$ balance

avoid dot for properties.

So the upper formula looks like the following with the new symbols:

$$S_{avg}(T(m_0)) = \frac{m_0}{c_t - r_m \cdot p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ]$$

I checked and it certainly works for the average, but for the distribution it is useless. I don't know if there is any shortcut for the distribution, I just thought it through with a brute force method sort of and tried to reuse certain recurring patterns.

1.) How many time can we draw lots with what probability?

First we need to deal with the ever changing $L$ number, which represents the number of drawing lots. In the upper formula we are talking about average too.

$$L_{avg} = \frac{m_0}{c_t - r_m \cdot p_m}$$

The exact number is unknown, because it depends on the $r_m$ and the $c_m$. If we are lucky, then we can draw more lots if we can win back our money. We can talk about the minimum and the maximum numbers here. We got the minimum if we never win back money and we got the maximum if we always win back money.

$$L_{min} = floor(m_0/c_t)$$

$$
L_{max}(m=m_0) = \left\{\begin{array}{ll}
0 & m < c_t\\
\infty & r_m > c_t\\
floor(m/c_t) + L_{max}(m\%c_t + floor(m/c_t) \cdot r_m) & otherwise
\end{array}\right.
$$

Everything is in-between these two edge cases.

$$L_{min} \leq L \leq L_{max}$$

I assume that we can count the average from this too, though in the case of $L_{max} = \infty$ we need to draw the line somewhere. I guess we need to check how much probability we have left from $p(L \leq L_{max}) = 100\%$ and draw the line around $p(L \leq L_{max}) = 99.9\%$, ofc. this is arbitrary. I guess this method works sometimes even with an $r_m \cdot p_m >= c_t$ here if $m_0$ is low enough, because with each cycle we increase the $p(L \leq L_{max})$ value, though we need to be careful, because we can easily end up with an ifinite loop.

$$L_{avg} = \sum_{L=L_{min}}^{L_{max}}{p(L) \cdot L}$$

I don't think we have a shortcut to count probability for $L$ because we cannot be sure what scenarios leads there. Let's call the number of drawing lots where we got money reward $L_m$. We can count the probability of a certain $L$ and $L_m$ pair this way:

$$p(L,L_m) = p_m^{L_m} \cdot (1-p_m)^{(L-L_m)}$$

But if we think about it, then this formula does not work in the case of $r_m > 0$, because these events are not necessarily independent from each other. For example if $m_0 = 4 \cdot c_t$ and $r_m = 1/2 \cdot c_t$, then

$$L_{min} = 4$$
$$L_{max} = 7$$

If we start with $L = 4$ and with $L_m = 0$ and increase $L_m$ with 1 in each cycle, then we soon run into a problem, because in the case of $L_m = 2$ we can draw lots another time. So certain permutations just don't exist here. I try to express this with sequences and unordered lists:

$$\{0,0,1,1\} \rightarrow (\{0,0,1,1\},0),(\{0,0,1,1\},1)$$
$$p(L=4,L_m=2) = 0 \neq (1/2)^2 \cdot (1-1/2)^{(4-2)}$$

So only $L = 5$ can exist with $L_m = 2$. But if we check, then we don't have all the permutations for $L = 5$ and $L_m = 2$, because if we don't win 2 in the first 4 times, then we won't have enough money to draw lots a 5th time and win money there.

$$\{0,0,0,1\} \nrightarrow (\{0,0,0,1\},1)$$
$$p(L=5,L_m=2) < (1/2)^2 \cdot (1-1/2)^{(5-2)}$$

So if we want to know the real probabilities we need a hierarchical approach and start with scenarios that certainly happen. We need a loops here just like in the formula of $L_{max}$ and work only with the money we currently have.

$$p(\{0,0,0,0\}) = (1-p_m)^4$$
$$p(\{0,0,0,1\}) = p_m \cdot (1-p_m)^3$$
$$p(\{0,0,1,1,...\}) = p_m^2 \cdot (1-p_m)^2$$
$$p(\{0,1,1,1,...\}) = p_m^3 \cdot (1-p_m)$$
$$p(\{1,1,1,1,...\}) = p_m^4$$

After this first cycle we ended up with some leaves and some branches and we can continue to grow our tree.

$$p(\{0,0,1,1,...\}) = p_m^2 \cdot (1-p_m)^2$$

If we continue with winning money, then

$$p((\{0,0,1,1\},1)) = p(\{0,0,1,1,...\}) \cdot p_m$$

On the other hand if we continue with not winning money, then

$$p((\{0,0,1,1\},0)) = p(\{0,0,1,1,...\}) \cdot (1-p_m)$$

In both cases we cannot continue further, because we don't have enough money to be able to draw lots one more time. If we could continue e.g. in the case of $(\{0,1,1,1,...\},1)$, then again we could count the probability for $(\{0,1,1,1\},1,0)$ and $(\{0,1,1,1\},1,1)$ and we would stop there after running out of money.

So for example if we want to know $p(L=6,L_m=4)$, then we need to sum up the probability of all leaves where that composition happens.

$$
p(L=6,L_m=4) = p(\{0,0,1,1,1,1\}) = \\
p((\{1,1,1,1\},0,0)) + p((\{0,1,1,1\},1,0)) + p((\{0,0,1,1\},1,1)) = \\
p(\{1,1,1,1\,...\}) \cdot p((0,0)) + p(\{0,1,1,1,...\}) \cdot p((1,0)) + p(\{0,0,1,1,...\}) \cdot p((1,1))
$$

Note that in this example the order matters, because we are talking about unordered lists and sequences.

$$
p(\{0,1\}) = p((0,1)) + p((1,0))
$$

In our example $(\{0,1,1,1\},1,0)$ exists, while $(\{0,1,1,1\},0,1)$ is non-existent, because we need to win money 4 times in 5 to be able to draw lots a 6th time.

Okay, so we counted the probabilities for different $L$ and $L_m$ pairs. We can calculate the probabilities for $L$ and $L_m$ individually too by summing up the probabilities of their pairs.

$$p(L) = \sum_{L_m = 0}^{L}{p(L,L_m)}$$

$$p(L_m) = \sum_{L = L_{min}}^{L_{max}}{p(L,L_m)}$$

2.) What do we win with what probabilities?

In my case this is tricky, because I have another extra constant reward, which I calculate this way:

$$S_{e_{avg}}(T(m_0)) = \sum_{L=L_{min}}^{L_{max}}{(p(L) \cdot L \cdot r_e)e}$$

Or we can draw a distribution for it based on the results:

$$S_{e}(T(m_0)) = (p(L), (L \cdot r_e)e)$$

As of the other non-money rewards I have to use the drawing lots where I did not win money, so

$$L_{(x,y,z,...)} = L - L_m$$

We can count probabilities for this too:

$$p(L_{(x,y,z,...)}) = \sum_{L = L_{min}}^{L_{max}}{p(L,(L_m=L-L_{(x,y,z,...)}))}$$

For a certain $L_{(x,y,z,...)}$ we have 100% probability of winning something different than money $L_{(x,y,z,...)}$ times. So $p_x + p_y + p_z = 1$ and $p_m = 0$ for these scenarios. I believe the relative probabilities stay the same, so

$$p(x)/p(y) = p_2(x)/p_2(y)$$
$$p_2(x) = p_x/(1-p_m)$$

If this is the case, then we can count the average for different rewards:

$$S_{avg}(T(m_0)) = \sum_{L_{(x,y,z,...)}=0}^{L_{max}}{p(L_{(x,y,z,...)}) \cdot L_{(x,y,z,...)} \cdot [\frac{r_x \cdot p_x}{(1-p_m)}x + \frac{r_y \cdot p_y}{(1-p_m)}y + \frac{r_z \cdot p_z}{(1-p_m)}z + ...]}$$

We can simplify this further because we multiply with constants by summing up:

$$S_{avg}(T(m_0)) = \frac{\sum_{L_{(x,y,z,...)}=0}^{L_{max}}{p(L_{(x,y,z,...)}) \cdot L_{(x,y,z,...)}}}{1-p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ]$$

Which is very similar to what we started with.

$$S_{avg}(T(m_0)) = \frac{m_0}{c_t - r_m \cdot p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ]$$

So we have a new equation, which is sort of trivial if we think about it:

$$L_{(x,y,z,...)_{avg}} = \frac{m_0}{c_t - r_m \cdot p_m} \cdot (1-p_m) = L_{avg} \cdot (1-p_m)$$

We can draw a distribution for these the following way:

$$S(T(m_0)) = (p(L_{(x,y,z,...)}),  \frac{L_{(x,y,z,...)}}{1-p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ])$$

If we want to draw this with $S_e$ too, then it is somewhat more complicated:

$$S(T(m_0)) = (p(L, L_m), (L \cdot r_e)e + \frac{L - L_m}{1-p_m} \cdot [ (r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... ])$$

Thought we still have an average here for $x,y,z,...$ for each $L$ and $L_m$ pair. We can get the real probability here for the certain reward permutations by doing the following:

$$S(T(m_0)) = (p(L, L_m), (L \cdot r_e)e + [\frac{(r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ... }{1-p_m}]^{L - L_m})$$

It is possible to expand the $[(r_x \cdot p_x)x + (r_y \cdot p_y)y + (r_z \cdot p_z)z + ...]^{L - L_m}$, because it is the same as expanding $(a + b + c + ...)^n$ where $a = (r_x \cdot p_x)x$, $b = (r_y \cdot p_y)y$, $z = (r_z \cdot p_z)z$ and $n = L - L_m$.

Let's call $s = (a, b, c, d, ...)$, so if we multiply these $n$ times we will end up with $|s|^n$ permutations, which we could draw in an n-dimensional square matrix or we can draw it in $|s|^{n-2}$ 2d tables too:

a_  | a^2  | ab   | ac   | ad   | ...
--- | ---- | ---- | ---- | ---- | ---
a   | a^3  | a^2b | a^2c | a^2d | ...
b   | a^2b | ab^2 | abc  | abd  | ...
c   | a^2c | abc  | ac^2 | acd  | ...
d   | a^2d | abd  | acd  | ad^2 | ...
... | ...  | ...  | ...  | ...  | ...

b_  | ab   | b^2  | bc   | bd   | ...
--- | ---- | ---- | ---- | ---- | ---
a   | a^2b | ab^2 | abc  | abd  | ...
b   | ab^2 | b^3  | b^2c | b^2d | ...
c   | abc  | b^2c | bc^2 | bcd  | ...
d   | abd  | b^2d | bcd  | bd^2 | ...
... | ...  | ...  | ...  | ...  | ...

c_  | ac   | bc   | c^2  | cd   | ...
--- | ---- | ---- | ---- | ---- | ---
a   | a^2c | abc  | ac^2 | acd  | ...
b   | abc  | b^2c | bc^2 | bcd  | ...
c   | ac^2 | bc^2 | c^3  | c^2d | ...
d   | acd  | bcd  | c^2d | cd^2 | ...
... | ...  | ...  | ...  | ...  | ...

d_  | ad   | bd   | cd   | d^2  | ...
--- | ---- | ---- | ---- | ---- | ---
a   | a^2d | abd  | acd  | ad^2 | ...
b   | abd  | b^2d | bcd  | bd^2 | ...
c   | acd  | bcd  | c^2d | cd^2 | ...
d   | ad^2 | bd^2 | cd^2 | d^3  | ...
... | ...  | ...  | ...  | ...  | ...

...

If we do so we realize, that the upper formula is wrong. Well I am not sure how to explain it. Here we have one $a^3$ in our table and we have $4^3 = 64$ permutations. So the probability of having $a^3$ is $1/64$. Now if we check it with our original example $((r_x \cdot p_x)x)^3 = ({r_x}^3 \cdot {p_x}^3)x^3$, which is not what we need. What we really need in this scenario is $((3 \cdot {r_x}x) \cdot (1 \cdot {p_x}^3))$. If we check another scenario, for example $a^2c$, then we have it 3 times in our table, so we have $(2 \cdot {r_x}x + 1 \cdot {r_z}z) \cdot (3 \cdot {p_x}^2 \cdot p_z)$ there. Now writing down the exact formula of this with the language of math is beyond my abilities currently, but I guess you get what I mean. What we really have here is $(p_x + p_y + p_z + p_q)^3$ and the quantity of the reward depends on the power of the probability. If we check, we don't really need the $r_x$ value, the $x$ would be enough here, but in my case I can have multiple ${r_x}_i$ values with multiple ${p_x}_i$ probabilities, that's why I need it.

Summary

So we will end up with a distribution for drawing lots and inside that with a distribution of different outcomes. We can sum these up based on our needs, for example if we care only about $x$, then we need to sum up the probabilities of winning $(0 \cdot r_x)x$, $(1 \cdot r_x)x$, ..., $(L_{max} \cdot r_x)x$ and we end up with a nice distribution for $x$. We can even draw the different types of lotteries on the same $p(S_x)$ - $S_x$ distribution chart though in the case of different $r_x$ values we'll need to rather use ranges for this chart to be able to compare them. If we care about both $e$ and $x$ or $x$ and $y$, then we can try to draw a 3d surface for the probabilities, but it is easier to sum them up separately and draw it that way. We lose some covariance info this way, so for example if the probability of $x$ is always low when the probability of $y$ is high or vice-versa, then we won't see it on these 2d charts, while we would be able to see it on the 3d surface chart. So in theory I could write a nice program for this, in practice, I was just curious how this can be done, in practice I'll use the original formula for the average, because it is simple, fast and according to my simulations the deviation is not very high, maybe around 20% in most of the cases.

I hope this was not completely wrong, it was fun to think it through.


答:
To prove something by induction, you need :

to check that it is true at the first step.

You know by hypothesis that $A \geq O$, then we have (obviously)
$A^{1} \geq O$

so the first step is ok (if $t$ starts at $1$).

Assuming that $A^{t} \geq O$,  you need to prove that $A^{t+1} \geq O$.

Hence, you'll have shown that for all $t \in \mathbb{N}^{\ast}$, $A^{t} \geq O$.

Title: Help with Linear Algebra

Body:
I need to solve part a) of the following question:

This is what I have done:

Is the above sufficient to prove this part of the question and is it correct?


问:
Proving existence of a sequence limit

Let $(a_n)^\infty_{n=1}$ and $(b_n)^\infty_{n=1}$ be two sequences that are defined by the recursive formulas

\begin{cases}
0 \lt b_1 \lt a_1\\
a_{n+1}=\frac{a_n+b_n}{2}, &b_{n+1}=\frac{2a_nb_n}{a_n+b_n} & \forall n\in\mathbb{N}
\end{cases}

I'm having trouble with some questions regarding these two sequences.
First I have to show they are well defined and I'm a bit lost on the procedure to prove such a thing.

Second, given that $a_{n+1\ }\ge b_{n+1}$ for every $n$, I need to show that the limits of the sequences are equal and converge to some $L$, my plan was to show that one of the sequences converges by the definition of limit but I'm having trouble proving it

答:
Hint
To show thay are well defined, you need to check that $a_n+b_n$ can't be $0$ (for all $n \geq 1$), so $\left(b_n\right)$ exists.

For the limit, you might notice that
$$
a_{n+1}b_{n+1}=\frac{a_n+b_n}{2}\times\frac{2a_nb_n}{a_n+b_n}=a_nb_n
$$
(under condition you've proved that $a_n+b_n \ne 0$ for all $n \geq 1$).
The you can deduce that

$$
a_{n+1}=\frac{1}{2}\left(a_n+\frac{a_1b_1}{a_n}\right)
$$
And maybe you know this type of sequences ? This is a "Babylon Algorithm".

Title: Proving existence of a sequence limit


问:
What are the oldest mathematics that have no applications to other fields?
In popular culture, mathematics are often split between applied mathematics, which provide tools for science and engineering, and pure mathematics, that are somewhat useless. Although this distinction is dubious, this might be a real issue when searching for funding. This distinction is often replied with the insight that "pure math" find their applications decades, or centuries afterwards.

And yet, there has to be examples where pure maths stayed pure and without applications until now, and we can't really foresee how they could be useful for anything other than themselves. What are some of the oldest or most iconic examples of this ?

答:
There is a clay tablet that is roughly 3800 years old, called Plimpton 322. It contains a list of Pythagorean triplets. One of them is the triplet
$$12709^2+13500^2=18541^2.$$
I don't think there is or was any practical application of this particular identity.


问:
Proving $\vec{x} \cdot (\vec{x} \times \vec{y}) = 0$
R.T.P $\vec{x} \cdot (\vec{x} \times \vec{y}) = 0$ using index notation

what i had done was the following:

$\vec{x} \cdot (\vec{x} \times \vec{y}) = x_{i}(\vec{x} \times \vec{y})_{i}$

$= x_{i}(\epsilon_{ijk} x_{j} y_{k})$

$= \epsilon_{ijk} x_{i} x_{j} y_{k}$

where $\epsilon_{ijk} = \begin{cases} 1 : (i,j,k) \in \lbrace (1,2,3);(2,3,1);(3,1,2) \rbrace \\ -1: (i,j,k) \in \lbrace (1,3,2);(2,1,3);(3,2,1) \rbrace \\ 0: i=j;i=k;j=k  \end{cases}$

i am unable to go further from here. is there an identity i could possibly use to finish the proof.

答: If you exchange the indices $i$ and $j$ and then use that $\epsilon_{ijk} = -\epsilon_{jik}$, you get that $$\epsilon_{ijk} x_{i} x_{j} y_{k} = \epsilon_{jik}x_jx_iy_k = -\epsilon_{ijk} x_{i} x_{j} y_{k}$$ and therefore $2\epsilon_{ijk} x_{i} x_{j} y_{k}=0$


问:
Weakly atomic lattice
The definition is that

The lattice $\mathcal{L}$ is said to be weakly atomic if whenever $a > b$ in $\mathcal{L}$, there exist elements $u,v \in L$ such that $a \geq u \succ v \geq b.$ ($\succ$ means cover).

I think all finite lattices are weakly atomic, is there a lattice that is not weakly atomic? Thanks in advance.

答:
Indeed all finite lattices are weakly atomic.

For example $(\mathbb Q, \leq)$, where $\leq$ is the usual order, is not weakly atomic: whenever $u < v$ in $\mathbb Q$, there exists $w$ such that $u < w < v$ (just take $w = \frac{u+v}{2}$).

Title: Weakly atomic lattice


答:
$\epsilon_{ijk}$ is anti-symmetric, i.e. if you swap two indices, its value changes sign. In particular,
$$\epsilon_{ijk} = -\epsilon_{jik}$$
Note that
$$\epsilon_{ijk}x_i x_j y_k = -\epsilon_{jik}x_jx_iy_k = -\epsilon_{jik}x_ix_jy_k $$
In the expression you've obtained, it wouldn't matter if you swapped $i$ and $j$. Think about what the summation (this is Einstein summation notation, you must be familiar since you're using it) turns out to be - I'm sure you'll convince yourself.
Hence,
$$\epsilon_{ijk}x_i x_j y_k = \epsilon_{jik}x_j x_i y_k = \epsilon_{jik}x_i x_j y_k$$
Combining this result with the immediately previous one, we get
$$\epsilon_{ijk}x_i x_j y_k = - \epsilon_{ijk}x_i x_j y_k \implies \epsilon_{ijk}x_i x_j y_k = 0$$
and that is what we wanted to show!

Title: Proving $\vec{x} \cdot (\vec{x} \times \vec{y}) = 0$

Body:
R.T.P $\vec{x} \cdot (\vec{x} \times \vec{y}) = 0$ using index notation

what i had done was the following:

$\vec{x} \cdot (\vec{x} \times \vec{y}) = x_{i}(\vec{x} \times \vec{y})_{i}$

$= x_{i}(\epsilon_{ijk} x_{j} y_{k})$

$= \epsilon_{ijk} x_{i} x_{j} y_{k}$

where $\epsilon_{ijk} = \begin{cases} 1 : (i,j,k) \in \lbrace (1,2,3);(2,3,1);(3,1,2) \rbrace \\ -1: (i,j,k) \in \lbrace (1,3,2);(2,1,3);(3,2,1) \rbrace \\ 0: i=j;i=k;j=k  \end{cases}$

i am unable to go further from here. is there an identity i could possibly use to finish the proof.


答: One possibility is the computation of $\pi$ with many digits. In the sixteenth century, Ludolph van Ceulen computed $\pi$ with $32$ digits and, of course, now we now how to compute it (and have computed it) with billions of digits. But if you want to compute the perimeter $p$ of a circle whose radius $r$ is the distance from the Sun to Neptune with an error inferior to the thickness of a hair (let's say, $0.1$ millimeters) using the formula $p=2\pi r$ (that is, in such a way that difference, in absolute value, between the real value of $p$ and $2\pi r$ is smaller than $10^{-7}$, if $p$ and $r$ are measured on kilometers), you only need $15$ digits.

Title: What are the oldest mathematics that have no applications to other fields?

Body:
In popular culture, mathematics are often split between applied mathematics, which provide tools for science and engineering, and pure mathematics, that are somewhat useless. Although this distinction is dubious, this might be a real issue when searching for funding. This distinction is often replied with the insight that "pure math" find their applications decades, or centuries afterwards.

And yet, there has to be examples where pure maths stayed pure and without applications until now, and we can't really foresee how they could be useful for anything other than themselves. What are some of the oldest or most iconic examples of this ?


问:
How to understand the statement:”a map from the coproduct $X_1 \coprod X_2$ is equivalent to a pair of maps from $X_1$ and $X_2$”?
I’m reading up about universal properties. The following is the definition of the coproduct.

Definition. The coproduct $X_{1} \coprod X_{2}$ of $X_{1}$ and $X_{2},$ together with the morphisms $i_{j}: X_{j} \rightarrow X_{1} \coprod X_{2},$ is characterized by the following universal property: Given any object $Y$ with morphisms $f_{j}: X_{j} \rightarrow Y,$ there exists a unique $f: X_{1} \coprod X_{2} \rightarrow Y$ such that $f_{j}=f \circ i_{j}$.

The comment in the title follows this definition.

I’m not sure how to understand the term “equivalent”. I’ve been reading around and seen some relevant statements, so I guess it’s the same as $\text{Hom}(X_1 \coprod X_2,Y) = \text{Hom}(X_1,Y) \times \text{Hom}(X_2,Y)$? But again, my grasp on category theory is quite limited, and I’m learning these things from a group-theoretic perspective, so I’m not sure how to interpret the “$\times$” sign.

Say we have $x_1 \in X_1$ and $x_2 \in X_2$. How do we represent the comment above in this setup?

答:
As to the last sentence: in category one doesn't talk about elements, not just objects and arrows (morphisms). In general $X_i$ need not even be sets for a coproduct.

There is indeed a natural bijection between $\text{Hom}(X_1 \coprod X_2,Y) = \text{Hom}(X_1,Y) \times \text{Hom}(X_2,Y)$: for every pair $(f_1,f_2)$ from the right we assign the unique $f$ from the diagram while to some $g: X_1 \coprod X_2)$ we can assign $(g \circ i_1, g \circ i_2)$ on the right, which is (by unicity) the inverse of the first map.

The $\times$ is just the standard Cartesian product in Set, so we have an isomorphism of Hom-sets in that category. So a coproduct in $C$ (the category we're working in) corresponds bijectively to a product in Set via Hom-sets.


问:
Differential equation with start condition and maximum capacity
The house with 1000 people have got 1 infected with an unknown virus.
The number of students who are newly infected is proportional to the number of healthy product of current and the current number of infected students. After 2 days is 5 people infected. How many of them will be infected in a week?

I have calculated this with diferencial equation and i have got 1000 people. Is that OK??

Thanks for answers

My solution:

MAX people: 1000

day: 1 infected

day: 5 infected

$P (7) = (1000* (\frac{2}{998} e^{10})*e^{5*7}) / ( 1 + (\frac{2}{998} e^{10}) * e^{5*7}) = 999,99 = 1000$

答: Hint: The logistic equations sounds like a good model.</p>


问:
Understanding convergence in probability, why do we write $P(|X_n-X|>\epsilon$) instead of $P(|X_n-X|<\epsilon$)?
The definition states :

a sequence ${X_n}$ of random variables converges in probability towards the random variable $X$ if for all $\epsilon \gt 0$ : $\lim_{n\to \infty}Pr(|X_n-X|\gt \epsilon)=0$\

Why can't we write $\lim_{n\to \infty}Pr(|X_n-X|\lt \epsilon)=0$ knowing that we want the probability of $X_n-X$ to be $0$  with a large enough $n$?

答:
$$\lim\limits_{n\to \infty}\mathbb{P}[|X_n-X|>\epsilon]=0$$

is the same as writing

$$\lim\limits_{n\to \infty}\mathbb{P}[|X_n-X|\leq \epsilon]=1$$


问:
If $A$ and $B$ are subgroups of $G$ such that $[[A, B], B] = 1$, then $[A, B]$ is abelian.
I am stuck on the following question:

If $A$ and $B$ are subgroups of $G$ such that $[[A, B], B] = 1$, then $[A, B]$ is abelian, where $[X, Y]$ denotes the commutator subgroup of $X$ and $Y$ as usual.

I have seen that $[A, B]$ is in the intersection of all the centralizer of each $b\in B$. And I am trying to show that $B$ is a normal subgroup of $G$, then it follows that $[A, B] \subseteq Z(B)$, where $Z(B)$ denotes for the centre of $B$. Then the result follows.

But I have no idea how to show that $B$ is normal in $G$ or maybe I am completely on the wrong way.

Anyone can help?

Body:
First of all, each $b \in B$ commutes with $[A, B]$.

$[a_1,b_1][a_2,b_2]=(a_1^{-1}b_1^{-1}a_1)[a_2,b_2]b_1=(a_1^{-1}b_1^{-1}a_1)[a_2,b_2](a_1^{-1}b_1^{-1}a_1)^{-1}[a_1,b_1]=[a_2,b_2][a_1,b_1]$

as

$(a_1^{-1}b_1^{-1}a_1)[a_2,b_2](a_1^{-1}b_1^{-1}a_1)^{-1}=[a_2,b_2]$ as $b_1$ commutes with any $[a, b]$.

Sorry I don't have any mathtype software please don't be upset.


问:
$\eta(I)=m(I)$ for a generic pluri-interval $I$
Let $\eta$ be a measure on the Borel algebra (generated by the open sets in $\mathbb R^n$) $\mathcal B$ such that

$\eta([0,1]^n)=1$;

$\eta(A+y)=\eta(A)$, $\forall A\in \mathcal B$, $\forall y\in\mathbb R^n$;

$\eta(\lambda A)=\lambda^n\eta(A)$, $\forall A\in\mathcal B$ $\forall \lambda>0$;

I have to show that the lebesgue measure $\mu$ is such that $\mu(I)=\eta(I)$, for every pluri-interval in $\mathbb R^n$.

My idea was this: If I consider an interval of the form $[\alpha,\beta]\subseteq \mathbb R$ and a measure $\bar \eta$, with the same properties of $\eta$, but defined in $\mathbb R$, I could write $[\alpha,\beta]$ as $\lambda[0,1]+y$,and, since $\bar\eta(A+y)=\bar\eta(A)$, I'd get $\bar\eta([\alpha,\beta])=\bar\eta(\lambda[0,1]+y)=\bar\eta(\lambda[0,1])$. The number $\lambda $ could be chosen as the lenght of the interval (respect to the euclidean metric) $\lambda=l([\alpha,\beta])=|\beta-\alpha|$ (?).

If I now extend this idea to a generic interval in $\mathbb R^n$, I can write a generic interval $H=[\alpha_1,\beta_1]\times\dots\times [\alpha_n,\beta_n]$ as
$(\lambda_1[0,1]+y_1)\times  \dots\times (\lambda_n[0,1]+y_n)$, where $\lambda_j=l([\alpha_j,\beta_j])\in\mathbb R$ , $j=1,\dots,n$ and $y=(y_1,\dots,y_n)\in\mathbb R^n$.

Now, since $\eta$ preserves the measure of sets obtained by translation so $$\eta(H)=\eta([\alpha_1,\beta_1]\times\dots\times [\alpha_n,\beta_n])=\eta((\lambda_1[0,1]+y_1)\times\dots\times (\lambda_n[0,1]+y_n))=\eta((\lambda_1[0,1]\times\dots\times\lambda_n[0,1])+y)=\eta(\lambda_1[0,1]\times\dots\times\lambda_n[0,1]),$$

is there a way to conclude the proof? Should I've followed a completely different way to show this?

Thank you for your help.

答:
I don't know the best way to show this, but I will suggest an outline of what I think is easiest to me.

(I) You need to show this only for pluri-intervals contained in $[0,1]^n$ of the form $\prod_{j=1}^n [0,r_j]$, where $0\leq r_j\leq 1$ for all $j$.

(II) Show that $\eta$ assigns $0$ values for pluri-interval with one side being of length $0$. This should be showed using $1.$, $2.$ and sub-additivity of $\eta$.

(III) Since any number can be written by a dyadic expansion, it is enough to show this for a pluri-interval of the form

$$ B=\prod_{j=1}^n \Big[0, \frac{q_j}{2^{m_j}} \Big] \quad \text{where} \quad 1 \leq q_j \leq 2^{m_j}. $$

(IV) Using $3.$ , you know that

$$\eta \Bigg( \prod_{j=1}^n \Big[0, \frac{1}{2^{m}} \Big] \Bigg)= \Big( \frac{1}{2^m} \Big)^n. $$
Therefore using translation invariance, you get by $2.$ that

$$ \eta(B)= \eta \Bigg(  \Big[0, \frac{1}{2^{max_{1\leq j\leq n} \{m_j\}}} \Big]^n \Bigg) \cdot \prod_{j=1}^n q_j\cdot 2^{max_{1\leq j\leq n} \{m_j\} -m_j}=m(B). $$


问:
Equal areas of segments in the lazy caterer problem?
In the book "Build Your Brain Power" by Wootton and Horne, they mention the lazy caterer's problem, asking for a way to cut a circular cake into 8 equally sized pieces with 3 cuts. Clearly since the maximum number of possible segments is 7 for the $n=3$ case, that is impossible.

But, I was nonetheless wondering about this: is it possible, for any $n\geq 3$ (3 cuts or more) case of the lazy caterer's problem, for each of the resulting areas to be equal? How would one prove or disprove this?

答: A cake is a 3D object, and it is perfectly possible to cut it into 8 equally-sized pieces, but size should be understood as volume, not 2D area as seen from above. Each of the three cuts should be across a different dimension. Note that the description of the cake as circular is misleading, it is actually cylindrical, but describing it as such in the problem would give away the answer.</p>


问:
Proof Verification: If $ ( a_n ) $ is a cauchy sequence then it converges.
Theorem: If $ ( a_n ) $ is a cauchy sequence then it converges.

Note: I know that the common proof of this theorem uses subsequences and the fact that if we have a cauchy sequence then it is bounded, but I first tried to prove the above theorem on my own and stumbled upon a difficulty I haven't found elsewhere.

My attempt of proof:
Suppose $ ( a_n ) $ is a cauchy sequence. Let $ \epsilon > 0 $ be arbitrary, hence there exists $ N \in \mathbb{N} $ s.t. $ \forall n,m>N. | a_n-  a_m | < \epsilon$. Choose $ m=N+1 $, hence we have $ \forall n>N. |a_n - a_{N+1} | < \epsilon $. Since $ \epsilon >0 $ was arbitrary, we have $ \forall \epsilon>0 \exists N \in \mathbb{N} \forall n>N. |a_n - a_{N+1} | < \epsilon $, Therefore $ \lim a_n = a_{N+1} $, hence the sequence converges.

Question: Obviously there is a fallacy with the proof since following the reasoning in my proof, $ ( a_n) $ could converge also to $ a_{N+2} , a_{N+3}, ... $ and so forth which is obviously false since only one limit can exist for a sequence that converges. However I don't fully understand what went wrong, maybe something is wrong with the logic? can you please help me as to why my proof is wrong?

答:
In the definition of a limit, the limit is a constant not depending on $N$. Formally, a sequence $(a_n)$ converges to a number $a$ iff

$\forall \epsilon >0 \exists N\in \mathbb{N}: \forall n\ge N, |a-a_n|<\epsilon$

So you see, in the defintion of a limit, we start out by choosing the limit $a$. You choose this after choosing $\epsilon$, so $a_N$ is not necessarily a limit of the sequence.


问:
Find $a_1+\frac{a_2}{2}+\frac{a_3}{2^2}+\cdots\infty$
A sequence $\left\{a_n\right\}$ is defined as $a_n=a_{n-1}+2a_{n-2}-a_{n-3}$ and $a_1=a_2=\frac{a_3}{3}=1$

Find the value of $$a_1+\frac{a_2}{2}+\frac{a_3}{2^2}+\cdots\infty$$

I actually tried this using difference equation method.Let the solution be of the form $a_n=\lambda^n$
$$\lambda^n=\lambda^{n-1}+2\lambda^{n-2}-\lambda^{n-3}$$ which gives the cubic equation $\lambda^3-\lambda^2-2\lambda+1=0$. But i am not able to find the roots manually.

Body:
Let $S=a_1+\dfrac{a_2}{2}+\dfrac{a_3}{2^2}+\dfrac{a_4}{2^3}+\ldots $

Then $\dfrac{S}{2} = \dfrac{a_1}{2}+\dfrac{a_2}{2^2}+\dfrac{a_3}{2^3}+ \ldots$

Subtracting we get

$\dfrac{S}{2} = a_1 +\dfrac{a_2-a_1}{2}+\dfrac{a_3-a_2}{2^2}+\dfrac{a_4-a_3}{2^3}+ \ldots$

Now $a_4-a_3 = 2a_2-a_1, a_5-a_4=2a_3-a_2$ etc.

So $\dfrac{S}{2} = 1 +\dfrac{1-1}{2}+\dfrac{3-1}{2^2}+\dfrac{2a_2-a_1}{2^3}+ \dfrac{2a_3-a_2}{2^4}+\ldots $

$=1+\dfrac{1}{2}-\dfrac{1}{8}+3\left(\dfrac{a_2}{2^4}+\dfrac{a_3}{2^5}+\ldots \right)$

$=\dfrac{11}{8}+\dfrac{3}{8} (S-1) =1+\dfrac{3S}{8}$

$ \Rightarrow \dfrac{S}{8} = 1 $ so that $S=8$


答:
To show that the sequences are well defined, you can proceed by induction using AM-GM: $\frac{a+b}2\geq \sqrt{ab}$ for $a,b>0$ where equality holds if and only if $a=b$:

$$0<b_n < a_n \Rightarrow b_n < a_{n+1}= \frac{a_n+b_n}2 < a_n$$

and

$$b_{n+1} = \frac 2{a_{n}+b_n}a_nb_n > \frac 2{a_{n}+a_n}a_nb_n = b_n$$

and

$$b_{n+1} =\frac 2{a_{n}+b_n}a_nb_n \stackrel{AM-GM}{<} \frac{a_nb_n}{\sqrt{a_nb_n}}=\sqrt{a_nb_n}\stackrel{GM-AM}{<}\frac{a_n+b_n}2 = a_{n+1}$$

All together
$$0 < b_n < a_n \Rightarrow b_n < b_{n+1} < a_{n+1} < a_n $$

Hence, the recursion is well defined.

Now, you have bounded monotonous sequences. Hence, the limits
$a=\lim_{n\to \infty}a_n$ and $b=\lim_{n\to \infty}b_n$ exist.

With $a_{n+1} = \frac{a_n+b_n}2$ and using limit laws you get

$$a = \frac{a+b}2 \Leftrightarrow a=b$$

Title: Proving existence of a sequence limit

Body:
Let $(a_n)^\infty_{n=1}$ and $(b_n)^\infty_{n=1}$ be two sequences that are defined by the recursive formulas

\begin{cases}
0 \lt b_1 \lt a_1\\
a_{n+1}=\frac{a_n+b_n}{2}, &b_{n+1}=\frac{2a_nb_n}{a_n+b_n} & \forall n\in\mathbb{N}
\end{cases}

I'm having trouble with some questions regarding these two sequences.
First I have to show they are well defined and I'm a bit lost on the procedure to prove such a thing.

Second, given that $a_{n+1\ }\ge b_{n+1}$ for every $n$, I need to show that the limits of the sequences are equal and converge to some $L$, my plan was to show that one of the sequences converges by the definition of limit but I'm having trouble proving it


问:
Clearly, $3 \in \mathbb{Z}$ is not a unit, because $1/3 \notin \mathbb{Z}$. What theorem does this kind of reasoning appeal to?
Intuitively, we may conclude that $3$ is not a unit in $\mathbb{Z}$ simply by observing that $1/3 \notin \mathbb{Z}$. However, what does this reasoning actually appeal to??? Is it true that:

Conjecture. For all rings $R$ and all $r \in R$, if there exists a ring $S$ and a homomorphism $\varphi : R \rightarrow S$ such that $\varphi(r)$ has a multiplicative inverse $s' \in S$ such that $s' \notin \mathrm{im}\, \varphi$, then $r$  is not a unit in $R$.

If not, what is the correct statement of the theorem?

答:
I have often seen the proof "$\mathbb{Z}$ is not a field: $2$ is not invertible, since $1/2 \notin \mathbb{Z}$" (of course the same can be said with $3$ instead of $2$). But this is not a proof. It is only a reformulation of the claim: We use the embedding $\mathbb{Z} \to \mathbb{Q}$ and say that $1/2 \in \mathbb{Q}$ does not lie in the image of $\mathbb{Z}$. Ok but one has to argue why this is the case. Why is there no integer among $0,1,-1,2,-2,\dotsc$ which becomes $1$ when doubled? Of course we learn this in school, but in school one doesn't learn a proof for this either. $^{(1)}$

Anyway, here is a correct proof, in fact for a stronger statement: $\pm 1$ are the only units of $\mathbb{Z}$. For that, let $n \in \mathbb{Z}$. Assume $n \geq 2$. Then for every $m \in \mathbb{Z}$ we have either $m \leq 0$, hence $mn \leq 0$, or $m \geq 1$, hence $mn \geq n > 1$, in particular $mn \neq 1$ (these properties of inequalities can be derived from any formal definition of the set of natural numbers, using induction). This shows $mn \neq 1$. Hence, $n$ is not a unit in $\mathbb{Z}$. Assuming $n \leq -2$, then $-n \geq 2$, hence $-n$ is not a unit, and therefore $n$ is not a unit. $\square$

$^{(1)}$ Here is another example which hopefully convinces you that this proof is incomplete: Consider the ring of formal power series with, say, rational coefficients $\mathbb{Q}[[x]]$. Then one might say "this is not a field, since $\frac{1}{1-x} \notin \mathbb{Q}[[x]]$". Well, it is true that a priori this fraction is not represented as a formal power series. And this fake proof could be be able to convince students who have just learned the definition of formal power series, and remember that $1-x$ is not a unit in $\mathbb{Q}[x]$. But actually $1-x$ is a unit, the inverse is the well-known geometric series $1+x+x^2+\dotsc$. Actually this is the key step to the more general result $R[[x]]^* = \{f \in R[[x]] : f(0) \in R^*\}$ for commutative rings $R$. From this we can build more complicated examples, such as

$$\frac{1}{x^2+x+1} = \sum_{k=0}^{\infty} x^{3k} - \sum_{k=0}^{\infty} x^{3k+1},$$
$$\frac{1}{x^2+x-2}=\sum_{k=0}^{\infty} \bigl(-\frac{1}{3} - \frac{(-1/2)^k}{6}\bigr) x^k.$$


答: what do you mean for "they go for first one"? It depends which book you are reading. This is from Casella Berger, one of the most reputable source and, as you can see, both definitions are given

Title: Understanding convergence in probability, why do we write $P(|X_n-X|>\epsilon$) instead of $P(|X_n-X|<\epsilon$)?

Body:
The definition states :

a sequence ${X_n}$ of random variables converges in probability towards the random variable $X$ if for all $\epsilon \gt 0$ : $\lim_{n\to \infty}Pr(|X_n-X|\gt \epsilon)=0$\

Why can't we write $\lim_{n\to \infty}Pr(|X_n-X|\lt \epsilon)=0$ knowing that we want the probability of $X_n-X$ to be $0$  with a large enough $n$?


问:
$\{(x,f(x)): x\in E\}$ is compact in $\mathbb R^2 \implies f:E\to\mathbb R$ is continuous

Given $f: E\to\mathbb R$, define $G: E\to\mathbb R^2$ by $G(x) = (x,f(x))$ for all $x\in E$. $E$ is a compact subset of $\mathbb R$. The following are equivalent:

$f$ is continuous.

$G$ is continuous.

The graph of $f$ is a compact subset of $\mathbb R^2$.

First, let $E = [a,b]$. I have shown $1\implies 2$ and $2\implies 3$. Proving $3\implies 1$ would help me complete the argument full circle. Please let me know if the following makes sense (point out errors if any), and help me complete the proof.

$[1\implies 2]$: If $x_n\to x$ and $f$ is continuous, then $f(x_n)\to f(x)$, and hence $G(x_n)\to G(x)$ meaning $G$ is continuous. Does this need more argument?

$[2\implies 3]:$ The continuous image of a compact set is compact. Hence, $G([a,b])$, i.e. the graph of $f$ is compact in $\mathbb R^2$.

I found the following for $[3\implies 1]$:

Let $G([a,b])$ be compact and $x_n\rightarrow x$ be a convergent sequence in $[a,b]$. We show that $f(x_n)$ converges to $f(x)$. Since the graph is compact, $f(x_n)$ has a convergent subsequence,

Q1. $G([a,b])$ is compact, so $(x_n,f(x_n))$ has a convergent subsequence. How does this tell us that $f(x_n)$ has a convergent subsequence? I feel we need to add some details here.

i.e. $f(x_{n_j})\rightarrow y$. That is $(x_{n_j}, f(x_{n_j}))\rightarrow (x, y)$. The graph is closed. That is, the limit of every convergent sequence in $G([a,b])$ is again in $G([a,b])$. Therefore $(x,y)\in G([a,b])$, i.e. $y=f(x)$. Since this is true for every convergent subsequence, we showed that $f(x)$ is the only limit point of $f(x_n)$, i.e. $f(x_n)$ converges to $f(x)$.

Q2. How is the last sentence concluded? We choose an arbitrary convergent subsequence $f(x_{n_j}) \to y$, and found $y = f(x)$. What now?

My attempt for $[3\implies 1]$:

Suppose $G_f = \{(x,f(x)): x\in [a,b]\}$ is compact in $\mathbb R^2$. Define $\phi_1(x,y) = x, \phi_2(x,y) = y$. Suppose $S\subset\mathbb R$ is an arbitrary closed set in $\mathbb R$. $$f^{-1}(S) = \{x\in [a,b]: f(x) \in S\}$$
We can write $$f^{-1}(S) = \phi_1(G_f \cap \phi_2^{-1}(S))$$
The above expression seems good intuitively but I need help establishing it by showing $\subseteq$ and $\supseteq$ inclusions. Next, $S\subset \mathbb R$ is closed tells us that $\phi_2^{-1}(S) \subset \mathbb R^2$ is closed - since $\phi_1,\phi_2$ are continuous. $G_f \cap \phi_2^{-1}(S)\subset G_f$, and $G_f \cap \phi_2^{-1}(S)$ is closed. So, $G_f \cap \phi_2^{-1}(S)$ is compact. $\phi_1$ is continuous, which means $f^{-1}(S)$ is compact. Hence, $f^{-1}(S)$ is closed. Done!

Please help me fill in the gaps in my attempt, and let me know if you've any other ideas to solve the problem, such as $[3\implies 2]$ and $[2\implies 1]$. I'd also like to understand the proof posted above my attempt. Thank you!

答:
Let me expand the proof $3\Rightarrow 1$ with sequences.

Let $x_n \to x$. Then $(x_n,f(x_n))$ is a sequence in the compact set $G$, hence it has a converging subsequence. Since $(x_n)$ is already converging as a whole, this implies that $(f(x_n))$ has a converging subsequence. So we have $x_n \to x$ and $f(x_{n_k})\to y$. By compactness $(x,y) \in G$. This implies $y=f(x)$ by definition of $G$ (there is no $z\ne f(x)$ such that $(x,z)\in G$). Note that the limit $(x,f(x))$ is independent of the chosen subsequence.

If we repeat this argument with an arbitrary subsequence of $(x_n,f(x_n))$, we find
that this subsequence has another subsequence converging to $(x,f(x))$.
This implies that the whole sequence $(x_n,f(x_n))$ converges to $(x,f(x))$.

Here we have used the following convergence principle: Let $(a_n)$ be a sequence, $a$ a given point. If every subsequence of $(a_n)$ contains another subsequence converging to $a$, then the whole sequence converges to $a$.

This is a very useful principle and holds in much more  general situations.


答:
Please note that if $(a_n)$ is a Cauchy sequence in $\mathbb R$ (or in general in a complete metric space) then it converges. For example $(a_n):a_n=\frac 1n$ is a Cauchy sequence in $(0,\infty)$ but does not converge in $(0,\infty)$.

Coming to your proof, It is true that for every $\epsilon\gt 0,\exists N_\epsilon\in \mathbb N$ such that $m,n \gt N\implies |a_m-a_n|\lt \epsilon$. Note the subscript of $N_\epsilon$ here. If your change $\epsilon\gt 0$, then $N_\epsilon$ will also change and so will $a_{N_\epsilon}$. Limit of a sequence is  unique so $a_{N_\epsilon}$ is not limit of the sequence unless the sequence is eventually constant sequence (i.e., there exists $M\in \mathbb N:m\gt M\implies a_m=a_{m+i}$ for all $i\in \mathbb N$.

Title: Proof Verification: If $ ( a_n ) $ is a cauchy sequence then it converges.

Body:
Theorem: If $ ( a_n ) $ is a cauchy sequence then it converges.

Note: I know that the common proof of this theorem uses subsequences and the fact that if we have a cauchy sequence then it is bounded, but I first tried to prove the above theorem on my own and stumbled upon a difficulty I haven't found elsewhere.

My attempt of proof:
Suppose $ ( a_n ) $ is a cauchy sequence. Let $ \epsilon > 0 $ be arbitrary, hence there exists $ N \in \mathbb{N} $ s.t. $ \forall n,m>N. | a_n-  a_m | < \epsilon$. Choose $ m=N+1 $, hence we have $ \forall n>N. |a_n - a_{N+1} | < \epsilon $. Since $ \epsilon >0 $ was arbitrary, we have $ \forall \epsilon>0 \exists N \in \mathbb{N} \forall n>N. |a_n - a_{N+1} | < \epsilon $, Therefore $ \lim a_n = a_{N+1} $, hence the sequence converges.

Question: Obviously there is a fallacy with the proof since following the reasoning in my proof, $ ( a_n) $ could converge also to $ a_{N+2} , a_{N+3}, ... $ and so forth which is obviously false since only one limit can exist for a sequence that converges. However I don't fully understand what went wrong, maybe something is wrong with the logic? can you please help me as to why my proof is wrong?


问:
Upper bound for Poisson distribution
For a Poisson random variable $Z$ with the parameter $\lambda,\,$ what would be a good upper bound (sub-exponential type perhaps?) for $P(Z \geq \frac{\lambda}{2})?$

The issue here is that I can't use the large deviation bound for Poisson. What would be an alternative argument?

答:
Note: definitely worth checking the computations, and trivial things like the base of the logarithm. It's late here.

If you can show a sufficiently good bound of that sort for a Binomial random variables with parameters $n$ and $p$, then you will get what you want by applying it to $X^{(n)}\sim \mathrm{Bin}(n,\lambda/n)$ and taking the limit as $n\to \infty$:
$$
\mathbb{P}\{X^{(n)} \geq \lambda/2\} \xrightarrow[n\to\infty]{} \mathbb{P}\{Z \geq \lambda/2\}
$$
where $Z\sim \mathrm{Poisson}(\lambda)$. Now, using the computations by Thomas Ahle here, for $k := \frac{np_n}{2} = \frac{\lambda}{2}$, we get
$$
\mathbb{P}\{X^{(n)} > \lambda/2\} \leq 1- \frac{1}{\sqrt{4\lambda(1-\lambda/(2n))}}e^{-n D\left(\frac{p_n}{2} \,\big\|\, p_n\right)}
$$
where, again, $p_n := \frac{\lambda}{n}$. From the definition of the relative entropy and our $p_n$
$$
n D\left(\frac{p_n}{2} \,\big\|\, p_n\right) =  \frac{1-\log 2}{2}\cdot \lambda + o(1)
$$
and so
$$
\boxed{\mathbb{P}\{Z > \lambda/2\} \leq 1- \frac{1}{2\sqrt{\lambda}}e^{-\frac{1-\log 2}{2}\cdot \lambda} }
$$
Note that $\frac{1-\log 2}{2} \approx 0.153$, so this appears to be consistent with the empirical upper bound provided by Henry.

Why this behaviour is nearly tight (up to the low-order term in the exponent).
We also have, by standard bounds on Binomial r.v.'s, that
$$
\mathbb{P}\{X^{(n)} \leq \lambda/2\} \leq e^{-n D\left(\frac{p_n}{2} \,\big\|\, p_n\right)} \xrightarrow[n\to\infty]{}  e^{-\frac{1-\log 2}{2}\cdot \lambda}
$$
and so
$$
\boxed{\mathbb{P}\{Z > \lambda/2\} \geq 1-e^{-\frac{1-\log 2}{2}\cdot \lambda} }
$$

Title: Upper bound for Poisson distribution


问:
Help proving that $\vec{a}\times(\vec{a}\times(\vec{a}\times\vec{b}))\cdot\vec{c} = -\|\vec{a}\|^2\vec{a}\cdot\vec{b}\times\vec{c}$
This is problem 13 from Chapter 13, Section 14 of Apostol's Calculus Vol 1.

I need to prove or disprove the formula $\vec{a}\times(\vec{a}\times(\vec{a}\times\vec{b}))\cdot\vec{c} = -\|\vec{a}\|^2\vec{a}\cdot\vec{b}\times\vec{c}$.

This is what I have so far:

We have $\vec{a}\times(\vec{a}\times(\vec{a}\times\vec{b})) = k\vec{a}\times\vec{b}$ for some $k\in\mathbb{R}$.Hence $\vec{a}\times(\vec{a}\times(\vec{a}\times\vec{b}))\cdot\vec{c} = k\vec{a}\cdot\vec{b}\times\vec{c} $ and thus we need to determine if $k=-\|\vec{a}\|^2$. Using the identities $\vec{x}\cdot\vec{y} = \|\vec{x}\|\,\|\vec{y}\|\,\cos\theta$, where $\theta$ is the angle between $x$ and $y$, and $\|\vec{x}\times\vec{y}\|=\|\vec{x}\|\,\|\vec{y}\|\sin\theta$, we get
$$
\|\vec{a}\|^3\,\|\vec{b}\|\,\|\vec{c}\|\,\cos\theta_1\sin\theta_3\sin\theta_4\sin\theta_5 = k\|\vec{a}\|\,\|\vec{b}\|\,\|\vec{c}\|\,\cos\theta_2\sin\theta_4 \ .
$$
The angles correspond to:
\begin{align*}
&\theta_1 \ : \quad k\vec{a}\times\vec{b} \ \text{and} \ \vec{c} \\
&\theta_2 \ : \quad \vec{a} \ \text{and} \ \vec{b}\times\vec{c} \\
&\theta_3 \ : \quad \vec{a} \ \text{and} \ \vec{a}\times(\vec{a}\times\vec{b}) \\
&\theta_4 \ : \quad \vec{a} \ \text{and} \ \vec{b} \\
&\theta_5 \ : \quad \vec{a} \ \text{and} \ \vec{a}\times\vec{b}.
\end{align*}

If $\vec{a},\vec{b},\vec{c}$ are dependent, then the equality we wish to prove becomes $0=0$ and is thus true. Assume that $\vec{a},\vec{b},\vec{c}$ are independent.Then we can simplify the previous equation to
$$
\|\vec{a}\|^2\cos\theta_1\sin\theta_3\sin\theta_5 = k\cos\theta_2 \ .
$$
Notice that $\theta_3=\theta_5=\frac{\pi}{2}$. Therefore $\|\vec{a}\|^2\cos\theta_1 = k\cos\theta_2.$

This is where I am stuck. Any hints or suggestions? Am I making this a lot harder than it needs to be?

答:
Using $$(u×v)·w=\det([u,v,w])=\det([v,w,u])=v·(w\times u),$$ one can transform the expression to a scalar product of two cross products, which after Cauchy-Binet is $$(a×b)·(c×d)=[a·c][b·d]-[a·d][b·c]$$. With the anti-symmetry of the cross product one then gets
\begin{align}
a×(a×(a×b))·c&=-(a×(a×b))·(a×c)
\\&=-\|a\|^2[(a×b)·c]+[a·c][(a×b)·a]
\\&=-\|a\|^2[a·(b×c)]
\end{align}


问:
Proof of Tychonoff's Theorem with Ultrafilter in Dudley's "Real Analysis and Probability"
I am stuck on Theorem 2.2.8 (Tychonoff's Theorem) in  Dudley's Real Analysis and Probability.

The theorem is here:

Let $(K_i , T_i )$ be compact topological spaces for each $i$ in a set $I$. Then the Cartesian product $\Pi_i K_i$ with product topology is compact.

Since the proof uses ultrafilter, I write a definition of ultrafilter that Dudley used (p. 35 in his book); A Filter $\mathcal F$ in a set $X$ is called an ultrafilter iff for all $Y\subset X$, either $Y\in \mathcal F$ of $X-Y\in \mathcal F$.

The proof is here:

Let $\mathcal U$ be an ultrafilter in $\Pi_i K_i$. Then for all $i$, $p_i(\mathcal U)$ is an ultrafilter in $K_i$, since for each set $A\subset K_i$, either $p_i^{-1}(A)$ or its complement $p_i^{-1}(K_i-A)$ is in $\mathcal U$. So by

Theorem 2.2.5 : A topological space $(S, \mathcal T)$ is compact iff every ultrafilter in $S$ converges; that is, for any $x\in S$ every neighborhood of $x$ belongs to the ultrafilter,

$p_i(\mathcal U)$ converges to some $x_i\in K_i$. For any neighborhood $U$ of $x\equiv \{x_i \}_{i\in I} $, by definition of product topology, there is a finite set $F\subset I$ and $U_i \in \mathcal T$ for $i\in F$ such that $x\in \bigcap \{ p_i^{-1}(U_i) : i\in F \}\subset U$. For each $i\in F$, $p_i^{-1}(U_i)\in \mathcal U$, so $U\in \mathcal U$ and $\mathcal U\longrightarrow x$. So every ultrafilter converges and by Therem 2.2.5 again, $\Pi_i K_i$ is compact.

My questions:

Why can we use Theorem 2.2.5 for $p_i(\mathcal U)$? It looks like we need to show that  $p_i(\mathcal U)$ is closed to do this because of Theorem 2.2.2. Theorem 2.2.2 says that a closed subset of compact set is also compact. Note that $K_i (\supset p_i(\mathcal U))$ is compact by the assumption.

How did Dudley use the definition of product topology to get the $F$ and $U_i$ that satisfy the condition? By the definition of product topology, every $p_i^{-1}(U_i)$ is open set in $\Pi_i K_i$. Thus $\bigcap \{ p_i^{-1}(U_i)$ is also open (since $F$ is finite). Since $U$ is a neighborhood, we can take open set in $U$, but can it be $\bigcap \{ p_i^{-1}(U_i) : i\in F \}\subset U$ for any neighborhood $U$? Is it always possible to say that there is such an finite set $F$?

答:
We can apply 2.2.5 to $p_i(\mathcal{U})$ because it is an ultrafilter on $K_i$ and $K_i$ is compact. Once you accept that $p_i(\mathcal{U})$ is an ultrafilter on $K_i$, 2.2.5 says it has to converge to some $x_i \in K_i$.

If $A \subseteq K_i$, either $p_i^{-1}[A]$ is in $\mathcal{U}$, so $p_i[p_i^{-1}[A]] \in p_i(\mathcal{U})$ and as $p_i[p_i^{-1}[A]] \subseteq A$ by definition, the superset property of filters says that $A \in p_i(\mathcal{U})$ as well, or $(\prod_i K_i) - p_i^{-1}[A] \in \mathcal{U}$ (as $\mathcal{U}$ is an ultrafilter) but then $p_i[ (\prod_i K_i) - p_i^{-1}[A] ] \subseteq K_i - A$ and by the same reasoning, $K_i - A \in \mathcal{U}$. As $A$ is arbitrary, $p_i(\mathcal{U})$ is an ultrafilter on $K_i$.

The definition of the product topology is used in the fact that the collection of all sets of the form $\bigcap \{p_i^{-1}[U_i] \mid i \in F\}$, where $F \subseteq I$ is finite and all $U_i$ are open in $K_i$ for all $i \in F$, is a base for the product topology and so suffice to determine the convergence of filters: a filter converges to $x$ iff all basic open sets that contain $x$ are in that filter. This is a simple general fact about filter convergence.
Any neighbourhood $U$ of $x$ contains such a basic neighbourhood by the definition of the product topology. It follows in essence from the fact that the product topology is the minimal topology such that all projections $p_i$ are continuous: we need these finite intersections to be open for that and we can stop there for minimality reasons.


问:
What is $\lim\limits_{n→∞}(\frac{n-x}{n+x})^{n^2}$?
What is $$\lim_{n\rightarrow\infty}\left(\frac{n-x}{n+x}\right)^{n^2},$$ where $x$ is a real number. Mathematica tells me the limit is $0$ when I put an exact value for $x$ in (Mathematica is inconclusive if I don't substitute for $x$), but using $f(n)=(n-x)^{n^2}$ and $g(n)=(n+x)^{n^2}$, then $$\lim_{n\rightarrow\infty}f(n)=\lim_{n\rightarrow\infty}g(n)=\infty,$$ and by L'Hopital's rule we have
$$\lim_{n\rightarrow\infty}\frac{f(n)}{g(n)} = \lim_{n\rightarrow\infty}\frac{f'(n)}{g'(n)} = \lim_{n\rightarrow\infty}\frac{(s-z)^{-1+s^2} (s+z)^{1-s^2} (s+2 (s-z) \text{Log}[s-z])}{s+2 (s+z) \text{Log}[s+z]} = 1.$$

I'm not sure which to believe - Mathematica or L'Hopital.

答:
If $x=0$ the limit is clearly $1$.

Let $x$ be positive, and note that our expression is equal to
$$\left(\frac{(1-\frac{x}{n})^n}{(1+\frac{x}{n})^n}   \right)^n.$$

The thing inside the large brackets has limit $e^{-2x}$. So for large enough $n$, it is less than, for example, $e^{-x}$. Thus for large enough $n$, the whole thing is $\lt e^{-nx}$. It follows that our limit is $0$.

The argument for negative $x$ is similar. Let $y=-x$. The thing inside the large brackets has limit $e^{2y}$, so for large enough $n$ it is bigger than $e^y$. Thus the whole thing is bigger than $e^{ny}$, and therefore the limit doesn't exist, or, if one prefers, is $\infty$.


问:
Is a polyhedron with different prime length edges possible?
Can a polyhedron be constructed  with all its  edges of different prime number length ? A primahedron maybe ? Is there a limit or constraint on the number of such polyhedra, similar to the limit of 5 Platonic regular solids?</p>

答:
For the elementary case of a tetrahedron, the smallest one you can consider is:

$$3,5,7,11,13,17$$

In this reference, you will find its folding pattern:

In fact, many others can be constructed (maybe an infinity of them), for example:

$$13, 17, 19,23,29,31$$

Indeed, considering triangle with sides $13,17,19$ as the base triangle, strict triangle inequalities are valid for the 3 other facets:

$$(13,23,27), \ \ (17,27,31), \ \ (19,31,23)$$

The farthest you take, in the table of primes, $6$ consecutive primes, the more "almost-equilateral" the facets will be , with a guarantee that all triangle inequalities are checked...

The case of a hexahedron (volume with six faces): build two tetrahedra in the manner seen above with the same base, then glue them on this common base.

This "gluing" method could be extended to more general polyhedra (with the possibility that the generated polyhedron isn't convex).

About "stacked polyhedra", in particular stacked (or glued) tetrahedra, see here.


问:
Finding the zeros of $ g(x) = \frac{1}{x-a} + \frac{1}{x-b} + \frac{1}{x-c}$

$$ g  = \frac{1}{x-f(1)} +  \frac{3}{x- f(2) }  + \frac{4}{x-f(3)}$$
And,
$$ f(x) = x^3 + 6x^2 + 12x + 108$$
Find number of real solutions to $g=0$

A 'brute force' way to approach this is by simplfying $g$ :

$$  \frac{(x-f(2) ) (x-f(3) ) + 3 (x-f(1) ) ( x- f(3) )  + 4 (x-f(1) ) (x-f(2) )}{(x-f(1) ) (x-f(2) ) (x-f(3) ) }=g(x)$$

After this, we can find the roots by seeing the behaviour of the function:
$$(x-f(2) ) (x-f(3) ) + 3 (x-f(1) ) ( x- f(3) )  + 4 (x-f(1) ) (x-f(2) )=q(x)$$

and evaluating $q$ at $f(1)$ , $f(2)$ and $f(3)$, and using the identity (from evaluating the function) of :

$$ f(1) < f(2) < f(3)$$

This leads to total roots as zero as we find$ q(f(1) ) $ is postive $q(f(2) ) $ is negative and $q(f(3) )$ is positive, and intermediate value theorem gives the answer.

However, I find this method quite lengthy and algebra messy, is there a faster and maybe easier method?

答:
Keep in mind, all you want to know here is how many times the curve $y=g(x)$ crosses the $x$ axis, not where. So a certain amount of qualitative thinking will get the answer.

To begin, it's easy to see that rationalizing the expression for $g(x)$ produces a quadratic over a cubic, so there can be at most two roots. Next, note that the expression for $f(x)$ guarantees that $f(1)\lt f(2)\lt f(3)$, so in particular they are not equal. Finally, note that $g(x)\to+\infty$ as $x\to f(k)^+$ for $k=1$ and $2$ while $g(x)\to-\infty$ as $x\to f(k)^-$ for $k=2$ and $3$. Since $g(x)$ is continuous elsewhere, the Intermediate Value Theorem tells us it must cross the $x$ axis somewhere between $f(1)$ and $f(2)$, and again between $f(2)$ and $f(3)$. Thus there are exactly two zeroes.


问:
Properties surrounding Polynomial Interpolation
A polynomial $P(x)$ of degree $n-1$ interpolates $n$ distinct points $(x_i, f_i)$, i.e $P(x_i) = f_i$, $i = 1,\dots, n$. Assuming that $P(x)$ is known, we wish to construct, without using the Lagrange polynomials $L_k(x)$, the polynomial of degree $n$, $Q(x)$, that interpolates the new point $(x_{n+1}, f_{n+1})$ in addition to the $n$ points aforementioned.

We will say: $Q(x) = P(x) + W(x)$, where $W(x)$ is a polynomial to determine.

How can I prove that the points $x_i$, $i=1,\dots,n$ are $n$ roots of $W$? Then, finding the degree of $W$, I want to be able to show that \begin{equation}
W(x) = C \prod_{i=1}^n (x-x_i),
\end{equation} where $C$ is a constant.

I am struggling to figure out how to show a few of these properties, so any guidance would be appreciated.

答:
To show that every $x_i$ is a root to $W$, we can re-write the definition of $W$ as
$$W(x) = Q(x) - P(x)$$ but $Q$ and $P$ are equal for all $x_i \ i = 1, 2, \ldots, n$ as they both interpolate the same $n$ points, so the claim follows.

For the degree of $W$, we use the fact that two polynomials are equal if and only if their coefficients corresponding to the same powers of $x$ are equal. As the left-hand side of $Q = P + W$ is a polynomial of degree $n$, the right hand-side must be, too. We know that $P$ is of degree $n-1$ so $W$ must have a $x^n$ term and no higher powers of $x$, proving the claim.

For the explicit formula for $W$, we can use the fundamental theorem of algebra and the fact that we know that $W$ is of degree $n$ and has $n$ real roots.


问:
Proving existence of a sequence limit

Let $(a_n)^\infty_{n=1}$ and $(b_n)^\infty_{n=1}$ be two sequences that are defined by the recursive formulas

\begin{cases}
0 \lt b_1 \lt a_1\\
a_{n+1}=\frac{a_n+b_n}{2}, &b_{n+1}=\frac{2a_nb_n}{a_n+b_n} & \forall n\in\mathbb{N}
\end{cases}

I'm having trouble with some questions regarding these two sequences.
First I have to show they are well defined and I'm a bit lost on the procedure to prove such a thing.

Second, given that $a_{n+1\ }\ge b_{n+1}$ for every $n$, I need to show that the limits of the sequences are equal and converge to some $L$, my plan was to show that one of the sequences converges by the definition of limit but I'm having trouble proving it

答:
The fact that $(a_n)_n$ and $(b_n)_n$ are well-defined it pretty obvious, since one can see by an easy induction that $a_n, b_n>0$, for all $n\ge 0$.

The fact that $a_n\ge b_n$ for all $n \ge 0$ is again pretty obvious, since $(\forall) x,y >0$:
$$\frac{x+y}{2} \ge \frac{2xy}{x+y} \iff (x+y)^2 \ge 4xy \iff (x-y)^2\ge 0 \text{ which is true}$$
In fact, this inequality says that the arithmetic mean of $x,y $ is greater or equal to the harmonic mean of $x,y$.

Now, remark that $$a_{n+1} = \frac{a_n+b_n}{2} \le \frac{a_n+a_n}{2} = a_n$$ and $$b_{n+1} = \frac{2a_nb_n}{a_n+b_n} = \frac{2}{\frac{1}{a_n}+\frac{1}{b_n}} \ge \frac{2}{\frac{1}{b_n}+\frac{1}{b_n}} = b_n$$
Therefore, one has
$$b_1 \le b_2 \le \ldots \le b_n \le a_n \le a_{n-1} \le \ldots \le a_1$$ for all $n\ge 1$. Thus, the sequences $(a_n)_n$ and $(b_n)_n$ are monotone and bounded, hence convergent. Let $l_1 = \lim_\limits{n \to \infty} a_n$ and $l_2 = \lim_\limits{n \to \infty} b_n$. Now, passing to limit in $a_{n+1} = \frac{a_n+b_n}{2}$, we get $l_1 = \frac{l_1+l_2}{2}$, i.e. $l_1 = l_2$, Q.E.D.

Title: Proving existence of a sequence limit


问:
"De Morgan’s laws" vs "De Morgan's principles"
In the book Fuzzy Logic with Engineering Applications by Timothy J. Ross, it is written we can't write "De Morgan's laws"; instead, it should be "De Morgan's Principles". The authors used only "De Morgan's Principles" throughout the book.

I want to ask:

Is there any difference between the two phrases, or are they the same?

Thank you!

答:
These are lines from the same book (3rd ed.) ref. by @ Mauro ALLEGRANZA. I hope these lines clear the point if someone else has the same confusion:

"The operations due to De Morgan are also not be referred to as a law, but
as a principle . . . since this principle does apply to some (not all) uncertainty theories (e.g., probability and fuzzy). The excluded middle axiom (and its dual, the axiom of contradiction) are not laws; Newton produced laws, Kepler produced laws, Darcy, Boyle,
Ohm, Kirchhoff, Bernoulli, and many others too numerous to list here all developed
laws. Laws are mathematical expressions describing the immutable realizations of nature.
Definitions, theorems, and axioms collectively can describe a certain axiomatic foundation
describing a particular kind of theory, and nothing more; in this case, the excluded middle and other axioms can be used to describe a probability theory. Hence, if a fuzzy set theory does not happen to be constrained by an excluded middle axiom, it is not a violation of some immutable law of nature like Newton’s laws; fuzzy set theory simply does not happen to have an axiom of the excluded middle – it does not need, nor is constrained
by, such an axiom." from (Fuzzy Logic with Engineering Applications by Timothy J. Ross)


问:
Elegant way to solve $n\log_2(n) \le 10^6$
I'm studying Tomas Cormen Algorithms book and solve tasks listed after each chapter.

I'm curious about task 1-1. that is right after Chapter #1.

The question is: what is the best way to solve: $n\lg(n) \le 10^6$, $n \in \mathbb Z$, $\lg(n) = \log_2(n)$; ?

The simplest but longest one is substitution. Are there some elegant ways to solve this? Thank you!

Some explanations: $n$ - is what I should calculate - total quantity of input elements, $10^6$ - time in microseconds - total algorithm running time. I should figure out nmax.

答:
To solve for $n\log_2(n)=10^6$, we can use the Lambert-W function. A bit of manipulation yields
$$
\log(n)e^{\log(n)}=10^6\log(2)
$$
and the Lambert-W function, being the inverse of $xe^x$, says that
$$
\log(n)=\mathrm{W}\left(10^6\log(2)\right)
$$
or
$$
n=\exp\left(\mathrm{W}\left(10^6\log(2)\right)\right)
$$
on the positive reals, the Lambert-W function is monotonically increasing, so you can simply get the desired inequality.

Mathematica gives the result $62746.1264697$ for N[Exp[LambertW[10^6Log[2]]],12].

Therefore, the largest $n$ is $62746$.


问:
Prove if X is an orthonormal frame then so is Y
I'm trying to prove that if $Y_1, Y_2 : P → V$ is an orthonormal frame with respect to $g$, then so is $X_1, X_2 : P → V$
defined by $X_i(F(p)) = F'(p)(Y_ i(p))$.

It is given that $F : P → P$ is an isometry, from the Riemannian chart $(P,g)$ back to itself. So $F∗g = g$.

How can I prove $X_1, X_2 : P → V$ is also an orthonormal frame?

答: For $p \in P$ we have $g(F(p))(X_i(F(p)),X_j(F(p))) = g(F(p))(F'(p)(Y_i(p)),F'(p)(Y_j(p)))$. Now, you need to apply the definition of the pull-back together with the fact that $F_*g = g.$


问:
Pullback of sheaf of roots of unity.
Given a closed immersion of integral (and maybe normal) schemes $i^*:Z\hookrightarrow X$. Is it true that $i^*\mu_n$ is isomorphic to $\mu_n|_{Z}$? Here by pullback we consider the sheaf of $n$-th root of unity as a sheaf on the small etale site. By the restriction to $Z$, I mean the sheaf of $n$-th root of unity naturally defined on $Z$.

答:
This isn't true in general. Let me give a counterexample first, and then discuss two cases in which it works.

Counterexample. Consider $X=\operatorname{Spec} \mathbb Z_p[\zeta_p]$, where $\zeta_p$ is a $p$-th root of unity, and let $Z=\operatorname{Spec}\mathbb F_p$, with $i\colon Z\hookrightarrow X$ being the inclusion of the special point. All étale $\mathbb F_p$-algebras are finite products $\prod_i\mathbb F_{p^i}$, hence they don't contain any non-trivial $p$-th root of unity. Thus, the stalk of $\mu_{n,Z}$ at any geometric point $\overline{z}$ of $Z$ is $\{1\}$. However, any étale $\mathbb Z_p[\zeta_p]$-algebra $B$ contains the element $\zeta_p$, and $\zeta_p-1$ is a nonzerodivisor by flatness. Hence also the stalk of $\mu_{n,X}$ at $i(\overline{z})$ contains the non-trivial root of unity $\zeta_p$. Since $(i^*\mu_{n,X})_{\overline{z}}=(\mu_{n,X})_{i(\overline{z})}$ (pullback of étale sheaves preserves stalks), this shows that $i^*\mu_{n,X}$ cannot coincide with $\mu_{n,Z}$.

And now for the two cases in which it works. Neither case needs that $i$ is a closed immersion.

Case 1. Assume $n$ is invertible on $X$ and thus on $Z$ too (I believe you already discussed that case in the now deleted comments, but let me spell it out for completeness). Then the canonical map $i^*\mu_{n,X}\rightarrow  \mu_{n,Z}$ is always an isomorphism, even for $i$ not a closed immersion and $X$, $Z$ not reduced.

This can be seen as follows: $\mu_{n,X}$ is always represented by the scheme $Y=\operatorname{\underline{Spec}}\mathcal O_X[T]/(T^n-1)$, and similarly $\mu_{n,Z}$ is represented by the base change $i^*Y$. If $n$ is invertible, then $Y$ is étale over $X$ and (thus) $i^*Y$ is étale over $Z$. In this case it is completely formal to show that the induced map $i^*h_Y\rightarrow h_{i^*Y}$ on representable sheaves is an isomorphism. Indeed, by Yoneda's lemma, it suffices to check that $$\operatorname{Hom}_{\mathrm{Sh}(Z_{\mathrm{\acute{e}t}})}(h_{i^*Y},\mathcal F)\rightarrow \operatorname{Hom}_{\mathrm{Sh}(Z_{\mathrm{\acute{e}t}})}(i^*h_Y,\mathcal F)$$is an isomorphism for all sheaves $\mathcal F\in \mathrm{Sh}(Z_{\mathrm{\acute{e}t}})$. This follows from the calculation $$ \operatorname{Hom}_{\mathrm{Sh}(Z_{\mathrm{\acute{e}t}})}(h_{i^*Y},\mathcal F)\cong\Gamma(i^*Y,\mathcal F)\cong\Gamma(Y,i_*\mathcal F)\cong\operatorname{Hom}_{\mathrm{Sh}(X_{\mathrm{\acute{e}t}})}(h_{Y},i_*\mathcal F)\cong \operatorname{Hom}_{\mathrm{Sh}(Z_{\mathrm{\acute{e}t}})}(i^*h_{Y},\mathcal F)\,.$$ The first and third isomorphism follow from Yoneda's lemma, the second holds by definition of $i_*\mathcal F$, and the fourth by the $(i^*,i_*)$-adjunction. In the first and the third isomorphism, we critically used that $i^*Y$ and $Y$ are étale over $Z$ and $X$, respectively. This explains why $i^*\mathbb G_{m,X}\rightarrow \mathbb G_{m,Z}$ may fail to be an isomorphism, as you note in the comments: $\mathbb G_{m,X}$ is representable by an $X$-scheme, but not by an étale one.

Case 2. $X$ and (thus) $Z$ have characteristic $p$. We'll only need that $X$ and $Z$ are reduced and $i$ can be any map. Moreover, the question is local, so we may assume $X=\operatorname{Spec} A$ and $Z$ are affine. Finally, $\mu_{n,X}$ is the direct sum of its subsheaves $\mu_{\ell^{m}}$, where $\ell$ is a prime divisor of $n$ and $\ell^m$ is the highest power of $\ell$ dividing $n$. For $\ell\neq p$, case 1 does it, hence we may assume $n=p^m$.

Note that every $\mathbb F_p$-algebra $B$ with a non-trivial $p^m$-th root of unity $\zeta$ is necessarily non-reduced, as $0=\zeta^{p^m}-1=(\zeta-1)^{p^m}$. But every étale algebra over the reduced ring $A$ is reduced again. For $A$ noetherian, this follows from the fact that a noetherian ring is reduced iff it satisfies Serre's conditions $(R_0)$ and $(S_1)$ (the little brother of Serre's normality criterion) and that the conditions $(R_k)$ and $(S_k)$ ascend along étale maps. In general, we can write any étale map $A\rightarrow B$ as a filtered colimit $\operatorname{colimit} (A_\alpha\rightarrow B_\alpha)$ of étale maps between finite type $\mathbb Z$-algebras. Replacing all $A_\alpha$ by their reductions, the above argument shows that $B$ can be written as a filtered colimit of reduced rings $B_\alpha$, whence $B$ is reduced itself.

Therefore, the étale sheaves $\mu_{p^m,X}$ and $\mu_{p^m,Z}$ vanish if $X$ and $Z$ are reduced of characteristic $p$, so $i^*\mu_{p^m,X}\rightarrow \mu_{p^m,Z}$ is trivially an isomorphism.

Title: Pullback of sheaf of roots of unity.


问:
Number of possible solutions to $2 \le |x-1||y+3| \le 5$, where $x$ and $y$ are negative integers

If $$2 \le |x-1||y+3| \le 5$$ and both $x$ and $y$ are negative integers, find the number of possible combinations of $x$ and $y$ .

Below is my solution approach :-

As $x$ is a negative integer, hence $|x-1|$ in the $2 \le |x-1||y+3| \le 5$ will be come $-(x-1)$ or $(1-x)$ and the main equation will transform into $2 \le (1-x)|y+3| \le 5$.

$1st$ case when $y+3 \ge 0 \Rightarrow y \ge -3 \Rightarrow y \in \{{-3,-2,-1}\} $ as $y$ is a negative integer :

For $y=-3$ we can see that there is no valid solution for $x$ as $|y+3|$ part will become $0$, hence this case is invalid.

For $y=-2$ we get the solution set for $x$ to be $x \in \{{-4,-3,-2,-1}\} $  and total number of solutions possible in this case is $4$.

For $y=-1$ we get the solution set for $x$ to be $x \in \{{-1}\} $ and total number of solutions possible in this case is $1$.

So for this $1st$ case when $y+3 \ge 0$ we have in total 5 solutions.

$2nd$ case when $y+3 \lt 0 \Rightarrow y \lt -3$ and in this case $y$ will have infinite values and I am not able to proceed from here.

The answer for the total number of solutions provided is $10$ and you can see that I've been able to find out the $5$ solutions in my $1st$ case. Can someone please guide or help me about how to proceed in the 2nd case?

Thanks in advance !

答:
Both $|x-1|$ and $|y+3|$ are non-negative integers. As the product must lie between $2$ and $5$, the only candidates are:

$$(1,2), (1,3), (1,4), (1,5), (2,1), (2,2), (3,1), (4,1), (5,1)$$

However, we can't force $|x-1|=1$ with a negative $x$, so this leaves just five possible solutions:

$$(2,1), (2,2), (3,1), (4,1), (5,1)$$

We can make $|y+3|$ equal $1$ or $2$ twice though, with $|-2
+3|=1,|-4+3|=1$ and similarly with $y=-1,-5$, so each pair can be made two times, once with each $y$, and this gives $10$ solutions.


问:
Percentage of the normal area - How to find the area under the normal distribution?
First this is not my homework is an example for learn and solve this little problem.

(Reference online pdf here.)

I have problems only with this section in exercise text:

The middle $60\%$ means that $30\%$ of the area will be on either side of the mean. The corresponding $z$ score is found using $\rm{area} = 0.20$. The $z$ scores are $\pm 0.84$.

How did they find the area is $0.2$ they skipped this part?

答: Hint: How big is the not shaded area?</p>

Body: Hint: How big is the not shaded area?