TITLE: Inequality with vectors
QUESTION [1 upvotes]: Suppose that we are given a vector $v = a_1\mu_1+a_2\mu_2+...a_n\mu_n$
where $\mu_i$ are linearly independent, but not orthogonal vectors. All $\mu_i$ are of equal Euclidean length.
$\sum_{i=1}^na_i = 1$
Suppose that $\mu_{j_1}, \mu_{j_2},... \mu_{j_k}$ are  $k$ vectors from the original set such that the length of projection of vector $v$ on this $k$ vectors is highest possible.
In other words, you need to choose $k$ vectors from $\mu_1,\mu_2,...,\mu_n$ such that when you project $v$ onto these vectors length of the projection is highest possible. $\mu_{j_1}, \mu_{j_2},... \mu_{j_k}$ are these $k$ vectors.
Lets denote by $v_{\text{proj}}$ projection of vector $v$ onto these $k$ vectors.
I want to prove that $ \underset{a_1,a_2,...a_n}{\arg \min}||v_{\text{proj}}|| = (a_1 = a_2 = ... = a_n  = \frac{1}{n})$
Notice that when we change $a_i$ the choice of the best $k$ vectors also changes. $\sum_{i=1}^na_i = 1$
It is easy to prove if vectors $\mu_i$ are orthogonal, but how do we prove it in general? I came up myself with this problem, so if you show  a counterexample to my claim I will be very grateful.

REPLY [1 votes]: I formalize your question as follows. Let $X=\{x_1,\dots,x_n\}$ be a linearly independent set of vectors of unit length of $\Bbb R^m$ (necessarily $m\ge n$) and $k\le n$ be a natural number. Put $[n]^k=\{ J\subset  \{1,\dots,n\}:|J|=k \}$ and $[n]=[n]^1$.
Clearly, $|[n]^k|={n\choose k}$. For any sequence $(a_1,\dots, a_n)$ of non-negative real numbers such that $\sum a_i=1$ let
$a=\|(a_1,\dots,a_n)\|_2$. By the inequality between quadratic and arithmetic means, $a^2\ge\frac{\left(\sum_{i=1}^n a_i\right)^2}{n},$ and the equality holds iff $a_1=\dots=a_n=\tfrac 1n$. Put $$f(a_1,\dots,a_n)=\max\left\{\left\|\sum_{j\in J}: a_jx_j\right\|_2: J\in [n]^k\right\}.$$
The question is whether $f(a_1,\dots,a_n)\ge f\left(\tfrac 1n,\dots, \tfrac 1n\right)$. This is not always true. For instance, let $n=m=3$, $0<\alpha<\frac{\pi}2$ be a small number, $x_1=(1,0,0)$, $x_2=(-\cos\alpha,\sin\alpha,0)$, $x_3=(0,0,1)$, and $k=2$.
Then $$f\left(\tfrac 13, \tfrac 13, \tfrac 13\right)=\tfrac 13\|x_1+x_3\|_2=\tfrac{\sqrt{2}}{2}> \tfrac 12=\tfrac 12\|x_1\|_2=
f\left(\tfrac 12, \tfrac 12,0\right).$$
On the other hand, it is easy to see that $f(\tfrac 1n ,\dots, \tfrac 1n)\le \tfrac kn$ and by a simple averaging argument below we can show that if $n\ge 2$ then $f(a_1,\dots,a_n)\ge \sqrt{\frac {k((k-1)d^2+ (n-k)a^2)}{n(n-1)} },$ where $d$ is the distance from the origin $0$ of $\Bbb R^m$ to the convex hull $\operatorname{conv} X$ of the set $X$. Clearly, $d\ge h$, where $h$ is the distance from the origin to the affine hull $\operatorname{aff} X$ of the set $X$. Since $X$ is linearly independent, $h>0$. More precisely, $h=\tfrac 1{n}\tfrac VS$, where $V$ is content (a counterpart of the volume) of the simplex with vertices $0, x_1,\dots, x_n$ and ans $S$ is content of the simplex with vertices $x_1,\dots, x_n$.
Given $(a_1,\dots,a_n)$, we can prove the claimed inequality as follows.
$$\sum_ {J\in [n]^k} \left\|\sum_{j\in J} a_jx_j\right\|_2^2=$$
$$\sum_ {J\in [n]^k} \left(\sum_{j\in J} a_jx_j, \sum_{j\in J} a_jx_j\right)=$$
$$\sum_ {J\in [n]^k} \sum_{i,j\in J} (a_ix_i,a_jx_j)= $$
$$\sum_{i,j\in [n]} \sum_ {J\in [n]^k\,, i,j\in J}  (a_ix_i,a_jx_j)= $$
$$\sum_{i,j\in [n]\,, i\ne j} \sum_ {J\in [n]^k\,, i,j\in J}  (a_ix_i,a_jx_j)+\sum_{i\in [n]^1} \sum_ {J\in [n]^k\,, i\in J}  (a_ix_i,a_ix_i)= $$
$$\sum_{i,j\in [n]\,, i\ne j} {n-2\choose k-2}  (a_ix_i,a_jx_j)+\sum_{i\in [n]} {n-1\choose k-1}  (a_ix_i,a_ix_i)= $$
$${n-2\choose k-2}\sum_{i,j\in [n]}  (a_ix_i,a_jx_j)+ \left({n-1\choose k-1}-{n-2\choose k-2}\right)\left(\sum_{i\in [n]}   (a_ix_i,a_ix_i)\right)=$$
$${n-2\choose k-2}\left(\sum_{i\in [n]} a_ix_i, \sum_{j\in [n]} a_jx_j\right)+\left({n-1\choose k-1}-{n-2\choose k-2}\right)\left(\sum_{i\in [n]} a_i^2(x_i,x_i)\right)\ge $$
$${n-2\choose k-2}d^2+\left({n-1\choose k-1}-{n-2\choose k-2}\right)\left(\sum_{i\in [n]} a_i^2\right)=$$
$${n-2\choose k-2}d^2+{n-2\choose k-1}a^2.$$
Therefore there exists $J\in [n]^k$ such that
$$f(a_1,\dots,a_n)\ge \left\|\sum_{j\in J} a_jx_j\right\|_2 \ge
\sqrt{\frac{{n-2\choose k-2}d^2+{n-2\choose k-1}a^2}{ {n\choose k}}}
=\sqrt{\frac {k((k-1)d^2+ (n-k)a^2)}{n(n-1)} }.$$
(in the last equality we assumed that $n\ge 2$).


TITLE: Stable Matching Theorem
QUESTION [0 upvotes]: Let $G=(V,E)$ be a graph and let for each $v\in V$ let $\le_v$ be a total order on $\delta(v)$. A matching $M\subseteq E$ is stable, if for every edge $e\in E$ there is $f\in M$, s.t. $e\le_v f$ for a common vertex $v\in e\cap f$
I'm looking at the proof of the stable marriage theorem - which states that every bipartite graph has a stable matching - in Schrijver's book on combinatorial optimization. It goes something like this.
Let $G=(V,E)$ be bipartit with bipartition $V=A\cup B$. For every edge $e=\{a,b\}\in E$ with $a\in A$ and $b\in B$ let $h(e)$ be the height of $e$ in $(\delta(b), \le_b)$. Choose a matching $M$ in $G$ with the property

$(\star)$ For every edge $e=\{a,b\}\in E$ with $a\in A$ and $b\in B$ it
  holds: If $f\le_a e$ for some $f\in M$, then $e\le_b g$ for some $g\in M$

and which maximizes $\sum_{e\in M} h(e)$ under all matchings with $(\star)$.
The claim is that now $M$ is stable, but I don't see why. The proof in the book is confusing, because too many things are called "$e$".
Edit: $\delta(v)$ is the set of all edges incident with $v$

REPLY [1 votes]: I think what makes the statement and proof of the theorem less clear than it might be is the use of non-strict inequality.  In condition $(18.23),\ e,f,\text{ and } g$ can all be the same edge.  I think everything would be clearer if we had $e\notin M$ and strict inequality.
You may find the proof easier to follow if you cast it in terms of marriages as Gale and Shapley did.  Let $U$ be the set of men and $W$ the set of women.  Each person $v$ rates his potential mates form $1$ worst to $\delta(v)$ (best).  Condition $(18.23)$ in the text means if any man $u$ would prefer to be married to some woman $w$ instead of his present wife, then $w$ is already married to a man she prefers to $u$.
The condition $\sum_{e\in M}{\phi(E)}$ is maximized means that the total satisfaction of the women is as large as possible, subject to condition $(18.23).$
Now for the proof.  If we assume that some set of marriages $M$ satisfying condition $(18.23)$ and maximizing the satisfaction of the women is not stable, then there is a man $u$ and a woman $w$ who would like to marry; they are not married to each other now, and neither is in a relationship he or she prefers to the potential marriage.    We can assume that $w$ is $u'$s first choice among all women who would accept him.
By condition $(18.23),\ u$ is not married.  Now let $u$ and $w$ marry, ($w$ leaving her present husband if she was married).  Obviously, this increases the total satisfaction of the women, since only $w's$ changes.  Furthermore, the new set of marriages satisfies condition $(18.23),$ contradicting the definition of $M.$
I'll leave you to verify the last statement, noting simply that there are only three people whose situation has changed: $u, w,$ and $w's$ former husband, if any.
If everyone were married, condition $(18.23)$ would say that the marriages were stable, but there may be unmarried people even at the end, if the numbers of men and women are different.  If I remember correctly, in the original paper, Gale and Shapley had the number of men and women equal, and the algorithm terminated when everyone was married.  The statement in the book is a slight generalization.


TITLE: What does it mean to axiomatize a logic?
QUESTION [4 upvotes]: I'm sorry if this question is not clearly formulated: An axiomatization, or an axiomatic system, usually means a set of axioms (i.e. a theory). A formal theory is such a set of formulas in some formal language (e.g. Peano axioms, in the language of first order arithmetic).
My question is, what does it mean to axiomatize a logic (e.g predicate logic)? It does not seem to mean the same thing because, for example, the Hilbert style of axiomatization of predicate logic includes rules of inference and those are not formulas in a formal language. And what is supposed to be the formal language here in the axiomatization of predicate logic? Is there such a language as "predicate logic"? What is its signature, does it include an infinite number of arbitrary constants, functions and relations?
I understand the difference between a schema and a formula. But I don't see how that difference answers my question.

REPLY [3 votes]: Once you have a syntax for your formal logic, you know what the rules are for putting together symbols in your language, so you know what the valid strings are.
Next we need to know what

what the strings mean and
what we can do with these strings.

The first one is given by the satisfaction relation $\models$, which tells you when a string is satisfied, or in other words, when a string is "true".
The second one is given by the rules of inference of the system, also called the axioms, deduction rules, or proof calculus. These describe the relation $\vdash$, and tell you what are the valid rules for proving new statements in the logic. This is the axiomatization of the logic.
So on the one hand we have a notion of truth and on the other hand we have a notion of provability, and of course we would like these two to correspond to each other, i.e. we want the system to be sound (meaning that if something can be proven, then it is true) and complete (meaning that if something is true, then it can be proven).

So to axiomatize a logic means to start with a formal language for your logic and a satisfaction relation that tells you what those strings mean, and from this create a set of axioms or deduction rules such that the logic is at the least sound, and hopefully also complete.


TITLE: Compute integral using Cauchy Principal Value
QUESTION [1 upvotes]: Using the Cauchy Principal Value, I need to compute the following integral
$$\int_{-\infty}^\infty\frac{\cos(ax) - \cos(bx)}{x^2}dx$$
I have used the standard semi-circle contour with an indentation around the singularity at $x=0$. However integrating around the outer semicircle and smaller one around $0$, I find they have no contribution to the integral and the residue is also $0$. However I know the integral is not equal to $0$.
Where have I gone wrong?

REPLY [1 votes]: Consider the contour of a semi-circle that avoids the singularity at $(0,0)$ of radius $\varepsilon$.  Notice the line integral of the arc of radius $\lim_{R \to \infty} R$ equals 0 from Jordan's lemma.  Also, consider $\cos{x}=\Re{\left(e^{ix}\right)}$, so we will take the real part of the integral.  By Cauchy's 1st theorem you're left with:
$$I=\int_{-\infty}^{\infty}\frac{\cos{ax}-\cos{bx}}{x^2} \; dx =-\int_{\pi}^0 \frac{e^{ia \varepsilon e^{i \theta}}-e^{ib \varepsilon e^{i \theta}}}{{\left(\varepsilon e^{i \theta}\right)}^2} \; i\varepsilon e^{i \theta} d\theta$$
Use the maclaurin series of $e^x$:
$$I=i\int_0^{\pi} \frac{ia \varepsilon e^{i \theta}-ib \varepsilon e^{i \theta}}{\varepsilon e^{i \theta}} \; d\theta$$
$$I=-\int_0^{\pi} {a -b } \; d\theta$$
$$I=\Re{\left(\pi \left(b-a\right)\right)}=\boxed{\pi \left(b-a\right)}$$


TITLE: 2.16 proof lieb and loss, functions of compact support
QUESTION [0 upvotes]: In short, this was proved in Lieb and Loss 2.16 p65.

Let $j \in L^1(\mathbb{R^n}), \int_{\mathbb{R}^n} j =1$. Let $f \in L^P (\mathbb{R^n})$.
If $j$ does not have compact support, we can find (by DCT) $0<R<\infty$ and
$C>1$ such that $j^R = C \chi_{|x|< R } (x) j(x)$,
$\int_{\mathbb{R^n}}j^R=1$ and $||f||_p ||j-j^R||_1 < \delta $.

What I don't understand is how one finds the $j^R by DCT - in particular also the condition of it being scaled to 1.

REPLY [0 votes]: We first let $k^{R}=\chi_{|x|<R}j$, and we see that $k^{R}(x)\rightarrow j(x)$ pointwise since for each $x$, there is a large $R_{0}>0$ such that $|x|<R_{0}$, then $k^{R}(x)=j(x)$ for all $R\geq R_{0}$ and hence the pointwise convergence. Now $|k^{R}|\leq|j|$ where $j\in L^{1}({\bf{R}}^{n})$, so Lebesgue Dominated Convergence Theorem implies that $\|j-k^{R}\|_{L^{1}({\bf{R}}^{n})}\rightarrow 0$ as $R\rightarrow\infty$. As a consequence, $\displaystyle\int_{|x|<R}j(x)dx\rightarrow\int_{{\bf{R}}^{n}}j(x)dx=1$, so for a large $R_{0}$, $\displaystyle\int_{|x|<R_{0}}j(x)dx>\dfrac{1}{2}$ for all $R\geq R_{0}$.
Let $C_{R}=\left(\displaystyle\int_{|x|<R}j(x)dx\right)^{-1}$, then $\displaystyle\int_{{\bf{R}}^{n}}j^{R}(x)dx=C_{R}\int_{|x|<R}j(x)dx=1$.
Since $j^{R}(x)\rightarrow j(x)$ pointwise and $|j^{R}(x)|\leq 2|j(x)|$ for all $R\geq R_{0}$, and $j\in L^{1}({\bf{R}}^{n})$, then Lebesgue Dominated Convergence Theorem implies that $\|j-j^{R}\|_{L^{1}({\bf{R}}^{n})}\rightarrow 0$ as $R\rightarrow\infty$.


TITLE: Number of squares in $(\mathbb{Z}/p\mathbb{Z})^\times$
QUESTION [3 upvotes]: $x$ is a square in $(\mathbb{Z} /p \mathbb{Z})^\times$ iff there is a $y \in (\mathbb{Z} /p \mathbb{Z})^\times$ such that $x \equiv y^2 \mod p$.
I am asked to show that there are exactly $\frac{p-1}{2}$ squares in $(\mathbb{Z} /p \mathbb{Z})^\times$. How do I tackle this?

REPLY [10 votes]: You have of course to assume $p$ odd. Observe that the multiplicative group $(\mathbb{Z}/p\mathbb{Z})^*$ has $p-1$ elements.
Consider the group homomomorphism $\rho\colon (\mathbb{Z}/p\mathbb{Z})^*\to (\mathbb{Z}/p\mathbb{Z})^*$ given by $x\mapsto x^2$. The image is the subgroup $S\subset (\mathbb{Z}/p\mathbb{Z})^*$ of squares. Hence, $S$ is isomorphic to $(\mathbb{Z}/p\mathbb{Z})^*/\mathrm{Ker}(\rho)$. It remains to show that $\mathrm{Ker}(\rho)$ is of order $2$.
This can be for example seen by the fact that $(\mathbb{Z}/p\mathbb{Z})^*$ is cyclic.


TITLE: Is Murasugi's conjecture still open?
QUESTION [8 upvotes]: Normalize the Alexander polynomial (in $t$) so that the positive and negative exponents are balanced.  For example in the Conway normalization, make the substitution $z = t^{1/2} - t^{-1/2}$.  The trefoil gives $t^{-1} - 1 + t$.

Conjecture:  Suppose that $K$ is an alternating knot.  Then the sequence of absolute values of the coefficients is unimodal.  Specifically, if $\Delta_K(t) = \sum_i a_i t^i$, then $|a_0| \ge |a_1| \ge |a_2| \ge \cdots$.

This is a conjecture due to Murasugi, I believe.  Where is it written?  Has this been proved or disproved?

REPLY [2 votes]: See also this paper by Jong which reproves the Ozsvath-Szabo result combinatorially, using Stoimenow's generators for knots of canonical genus 2.
The interesting question which is lurking in the background is the characterization of Alexander polynomials of alternating knots.


TITLE: I cant understand varies jointly
QUESTION [0 upvotes]: If $m$ varies jointly as $n$ and $p$ is like this
$m = K(n)(p)$
is the  $v$ varies jointly as $l$, $w$ and $h$ becomes like this
$v = k(l)(w)(h)$
or it becomes like this
$v = (l)(w)(h)$

REPLY [1 votes]: The amount of work that gets done varies jointly with the number of people working and the amount of time that is spent working.
$$W_{ork} = P_{eople} \times T_{ime} \times K$$
Where $K$ is a constant.
For example, if one person can paint $100$ square feet in one hour, then $K = 100$ square feet per hour per person, or $\frac {100 ft^2}{hr\times person}$.
So $K$ is really the rate.  It also includes the units to make everything work out.
The point here—the point about "varies jointly"—is that if you double the number of people, you will double the amount of work that gets done.  If you double the time that they work, you will double the amount of work that gets done.
Or, on the other side, if you quadruple the amount of work that needs to be done, you will need to quadruple the number of people working, OR quadruple the amount of time they have to work in, OR double the number of people and double the amount of time.
(There are other options that involve fractional multiples; for instance you might change the number of people from $10$ to $15$ and change the amount of time from $3$ hours to $8$.  Together, these actions would quadruple the amount of work that would get done.)

Note that it's possible for $K$ to equal $1$.  Volume of a rectangular prism is like that; the volume varies jointly with the length, width and height—but no conversion is needed.  The product of the length, width and height is the volume.
If you relate the volume to something else—say you're buying styrofoam that's priced by volume—then $K$ will not equal $1$.  The price of the styrofoam varies jointly with the length, width and height, but to calculate the actual price of a particular rectangular prism of styrofoam, you will have to multiply the computed volume by the "price per cubic foot" to get a dollar amount.  So $$V=lwh$$ but $$P_{rice}=lwhK$$where $K$ might be measured in dollars per cubic foot.


TITLE: Algebra vs Sigma algebra
QUESTION [0 upvotes]: Suppose I have a sequence of sets $\{A_n\}$.
Now, we know that an algebra is close under finite union intersection while a sigma-algebra is close under infinite countable intersection.
Finite Intersection means that for Every $N$
$$
\bigcup_{k=1}^N A_k
$$
Is well defined and it's a set in the algebra.
My question is: why this does no imply the Infinite union intersection ?
Intuitively, for every $N$ this set is in the algebra
$$
\bigcup_{k=1}^N A_k \cup A_{N+1}
$$
And I can proceed in such a way for Every $N$. I can do partial union as in the series. Why this does not imply that the infinite union is in the sigma algebra?

REPLY [1 votes]: Example: let $\mathcal{A}$ be the subset of the power set of $\mathbb N$ be defined by:
$A \in \mathcal{A}$  iff $A$ is finite or $ \mathbb N \setminus A$ is finite. $\mathcal{A}$ is an algebra.
Put $A_n=\{2n\}$ for $n \in \mathbb N$.
Then $\bigcup_{k=1}^N A_k \in \mathcal{A}$ for each $N$, but $\bigcup_{k=1}^{\infty} A_k \notin \mathcal{A}$.

REPLY [1 votes]: Take for example the algebra $\mathcal A$ generated by the closed set. It's an algebra, but a countable union of closed can be not closed. Indeed,
$$\bigcup_{n\in\mathbb N}[0,\frac{1}{n}]=[0,1[\notin \mathcal A$$


TITLE: Find the equation of an exponential function knowing that its gradient=y coordinate
QUESTION [0 upvotes]: Find the equation of an exponential function knowing that its gradient=y coordinate.
$f(x)=k^x$
   What values would have to take $k$?
The $y$ coordinate has to be equal to the gradient, e.g. in $y=1$, the gradient has to be $1$.

REPLY [1 votes]: If you are given that
$$f(x)=k^x$$
then $$f'(x)=k^x\log k=f(x)$$ is achieved when $$\log k=1.$$


TITLE: Expected length of the "greedy" increasing sub-sequence?
QUESTION [3 upvotes]: Given a sequence of random unique integers of length $n$, if I select every element that is the largest so far how how many elements should I expect to select?
This seems superficially similar to this problem but based on some trivial counter examples ($9,8,7,6,5,...$) has different results.

REPLY [3 votes]: From symmetry considerations, it's easy to see that the $k$th element has exactly a $1/k$ chance of being the largest among the first $k$ terms.  By linearity of expectation, the expected number of "record-breakers" in a random ordering is just $\sum_{k=1}^n \frac1k$.  This is the $n$th harmonic number, which is well-approximated by $\ln n + \gamma$, where $\gamma = 0.5772\ldots$ is Euler's constant.


TITLE: Two-block system acceleration when applying a force in the $x$ direction
QUESTION [0 upvotes]: Two blocks are connected by a light-weight string that passes over a friction-less pulley (a.k.a. Atwood's machine). Block # 1 (called $m_1$) hangs from the edge of a friction-less table. Block # 2 (called $m_2$) stands on the table in a horizontal position. A force is applied in the $m_2$ block towards the positive $x$ direction and away from tension generated by $m_1$. Find a mathematical expression for the acceleration of the system.

I have been working on this kind of problems with no previous difficulty when no force is applied and the system depends only on the masses of the blocks, but as soon as a force is introduced my calculations seems not to work.
When no force is applied:
$$F_x = -T = m_2 a$$
$$F_y = T - m_1 g = m_1a$$
Adding these two equations and solving for the acceleration you get:
$$a = -\frac{m_1}{m_1 + m_2} g $$
Now, I guess if we want to add a force being applied towards the  positive $x$ direction and away from the tension generated by $m_1$:
$$F_x =  F - T = m_2 a - T = m_2 a$$
I know my mistake is when formulating above equation because I can't added to the $F_y$ equation.
How can I get the acceleration expression when a force is involved ?

REPLY [1 votes]: Intuitively, the force will be applied to the total mass of the blocks and cause an acceleration (in addition to the one of gravity) of $\frac F{m_1+m_2}$, so the total acceleration will be $\frac {F-m_1g}{m_1+m_2}$
In your solution you cannot replace $F$ with $m_2a$ because $F$ is not the whole force on $m_2$  It is correct to say $F-T=m_2a$.  You already have $T-m_1g=m_1a$  That gives you two equations in two unknowns, $a,T$


TITLE: How do I show that something only has one stationary point?
QUESTION [0 upvotes]: I have this question in my homework where I can't quite grasp the solution.
I have been asked to show that a curve with equation $y=(1+2x)^4+(1-2x)^4$ has one singular stationary point and what its coordinates are. Simplifying using binomial expansion, I get $y=2+48x^2+32x^4$ and differentiating that for the gradient function I get $96x+128x^3$.
I know that to have a stationary point, the gradient must be zero so I put $96x+128x^3=0$. I then factorised it to get $32x(3+4x^2)=0$
Now's where the trouble I'm having comes in. I can see that something must be zero in order for the equation to equal zero. If $32x=0$ then $x=0$ at the stationary point. Why can't I say $3+4x^2=0$? The mark scheme I have says $3+4x^2>0$ but I can't see how they reached this conclusion.
Many thanks for your help in advance.

REPLY [0 votes]: Notice that for $x\neq 0$, $\ x^2$ is always positive!

REPLY [0 votes]: Notice that $3>0$ and that $x^2\geq 0 \forall x\in \mathbb{R}$. So there is no way that adding these two terms can ever be less than $3$(nevermind equalling $0$). I.e there will be no real roots of $3+4x^2$

REPLY [0 votes]: The equation $3+4x^2=0$ does not have solution in the domain of real numbers because we have $x^2\geq0$ so $4x^2\geq0$ so $3+4x^2>4x^2\geq0$ so it follows $3+4x^2>0$


TITLE: Compact iff connected
QUESTION [9 upvotes]: Let $X $ be a topological space in which any compact subset is connected and any connected space is compact.
I'm wondering the topological properties of such spaces. For example $X$ is not Hausdorff since all doubleton subsets $\{x,y\}$ for $x\ne y$ is compact, hence connected.
Thanks a million.

REPLY [9 votes]: [In this answer I assume we are defining the empty set to be connected, or else requiring only that nonempty subsets be connected.]

Let $X$ be a topological space.  Define a relation $\leq$ on $X$ by $x\leq y$ iff $x\in\overline{\{y\}}$ (this is the specialization preorder, or maybe its opposite depending on your conventions).  It is easy to see that $\leq$ is transitive.  Then the following are equivalent:

A subspace of $X$ is compact iff it is connected
Every subspace of $X$ is both compact and connected
The relation $\leq$ is a pre-well ordering: that is, it is total and every nonempty subset of $X$ has a least element.

To prove this we will prove $(2)\Rightarrow (1)\Rightarrow (3)\Rightarrow (2)$. The implication $(2)\Rightarrow(1)$ is trivial.
Let us now suppose $(1)$ holds and prove that $(3)$ holds (we will also prove that $(2)$ holds along the way).
To prove totality of $\leq$, note that for any $x,y\in X$, $\{x,y\}$ is compact and hence connected.  If $x\not\leq y$, then $\{y\}$ is closed as a subset of $\{x,y\}$, so $\{x\}$ cannot be closed by connectedness.  This means that $y\in\overline{\{x\}}$, so $y\leq x$.  Thus either $x\leq y$ or $y\leq x$.
It follows also that actually every subset of $X$ is connected.  Indeed, if $A\subseteq X$ and $x,y\in A$, then since $\{x,y\}$ is connected a clopen subset of $A$ contains $x$ iff it contains $y$.  It follows that a clopen subset of $A$ either contains no elements of $A$ or contains all elements of $A$, so $A$ is connected.
Thus every subset of $X$ is also compact.  We now use this to prove that any nonempty subset $A\subseteq X$ has a least element.  First, note that for any $x\in X$, the set $U(x)=\{y\in X:y\not\leq x\}$ is open in $X$.  Indeed, if $y\in U(x)$, then since $y\not\leq x$ there exists some open set $U$ such that $y\in U$ but $x\not\in U$.  For any $z\in U$, then, $x\not\leq z$ since $U$ is a neighborhood of $z$ not containing $x$.  Thus $U\subseteq U(x)$.
Note also that if $y\leq x$, then $U(x)\subseteq U(y)$.
Now suppose there exists a nonempty subset $A\subseteq X$ which has no least element.  For each $a\in A$, there exists some $b\in A$ such that $a\not\leq b$, so that $a\in U(b)$.  So $A$ is covered by the open sets $U(b)$.  Since $A$ is compact, there are finitely many $b_1,\dots,b_n\in A$ such that the sets $U(b_i)$ cover $A$.  Taking a least element among the finitely many $b_i$ (which is possible since $\leq$ is total), we see there is a single element $b\in A$ such that $U(b)$ covers $A$.  But this is impossible, since $b\in A$ and $b\not\in U(b)$.
Thus every nonempty subset of $X$ has a least element, so $\leq$ is a pre-well ordering of $X$.  This concludes the proof that $(1)\Rightarrow (3)$.
Now suppose $(3)$ holds; we will prove $(2)$.  The argument with two-point subspaces above can easily be reversed to show that if $\leq$ is total, then every two-point subspace of $X$ is connected, and that this implies in fact every subspace of $X$ is connected.  So it just remains to be shown that every subspace of $X$ is compact.
To prove this, let $A\subseteq X$ be any nonempty subspace.  By assumption, there is a least element $a\in A$.  For any $b\in A$, then, $a\in\overline{\{b\}}$, which means any open set containing $a$ contains $b$.  So the only open subset of $A$ containing $a$ is the entire space $A$.  It follows that any open cover of $A$ must have $A$ itself as one of the open sets, so there is trivially a finite subcover (namely $\{A\}$).  Thus every subspace of $X$ is compact.


TITLE: Minimum connectivity required for mean field to be a good approximation?
QUESTION [6 upvotes]: In spin models, it is known that mean field becomes a better approximation as the connectivity increases. My question is: Is there an estimate for the threshold connectivity (as a function of the system size, $N$), such that for connectivites greater than the threshold, mean field is a good approximation?
The values I am mainly interested in are the free energy and the magnetization, so the mean field approximation should be good in the sense that these values are accurate.

REPLY [1 votes]: Rigorous bounds comparing mean-field free energy and magnetization to their lattice counterparts, for various interaction ranges and dimensions, have been obtained in the following series of works (after many earlier works, see the references in these works):
arXiv:math/0207242
arXiv:math-ph/0501067
Commun. Math. Phys. 292 No 2 303–341 (2009)
However, note that the bounds they get are probably quite poor (this was not the main point of their work). They treat in details a few models (Potts, XY, etc.), but the approach is not too specific. It is however essential that the model be reflection positive.
Although, this is not your main interest, let me mention, just to complete the answer, the following work, in which rigorous bounds are obtained (using the lace expansion) allowing to derive mean-field values for critical exponents of Ising, percolation and SAW models in either sufficiently high dimensions, or with sufficiently spread-out interactions:
arXiv:0712.0312
There are many other rigorous works on this topic, of course, but this should get you started.


TITLE: Atomic clocks and how to synchronize them
QUESTION [4 upvotes]: While teaching measurement precision in the class, our professor mentioned atomic clocks. I have two questions:

What exactly is exactly an atomic clock?

How do we synchronize two atomic clocks far far away, e.g. in New York and Beijing?

REPLY [1 votes]: Given your refernce to a 9Ghz clock, one can assume you are talking about a Caesium primary reference standard clock like the HP5071 or similar.
These clocks are based on physics discovered and made practical by Isador Rabi on magnetic resonance for which he was awarded the Nobel in 1944. This led to the Stern-Gerlach experiment that forms the core physics package of a caesium primary standard atomic clock. I mention primary standard here as there are other caesium clocks which are not primary standards and use techniques like coherent population trapping to realize their clock. Stern also received the Nobel in 1943, however it was not for the Stern-Gerlach experiment.
The Stern-Gerlach experiment basically described is a mass spectroscopy experiment which can discriminate between atoms with different spin moments. In the original experiment, Stern used silver, however caseium is better suited to a clock since there are two and only two ground states. Caseium in a vacuum is heated in an oven that produces a beam of caesium atoms escaping from the oven through a first magnet that selects (steers) them through a microwave cavity tuned to the 9192... MHz that corresponds to the "definition" of a second. This pumps the caseium atoms into the desired hyperfine state which emerge from the microwave cavity through second magnet that steers resonate atoms to a detector where they are counted. Non-resonate atoms are steered away from the detector and are not counted. By carefully varying the frequency of the 9192... MHz microwave field, and observing the intensity (count) of the Cs atoms at the detector, a feedback loop is established that directly relates the microwave frequency to the resonance of the Cs atom in the desired state. Maximizing the intensity of the detected Cs atoms by varying the microwave frequency, in effect provides a "count" of the 9192...MHz from the SI definition.
This microwave frequency source is thus locked to atoms and can be divided down to the output frequencies normally provided by a Cs reference clock (typically 10Mhz, 5MHz and 10.24 Mhz) Normally a 1PPS (once a second) pulse is also provided which is accurate to a small number of ns. The stability of a Cs primary reference clock exhibits and Allen Deviation of about 10^15. This is exceeded only by hydrogen masers at 10^17 and newer optical clocks which have even better stability. Not bad for technology that was invented in the 1920s and first realized as a clock by  Louis Essen and Jack Parry in 1955. The Cs clock was predated by an NH3 clock at NIST (then NBS) in 1949 but it was less accurate than quartz at the time.
The Cs primary reference standard (eg. HP5071a) does not need calibration since it relies directly on the physics. Since it is a mechanical system however, there are a lot of systemics which must be accounted for, for example, the stability of the oven temperature, the quality of the microwave source, the ability to control the microwave frequency, the physical characteristics of the electronic components used to divide the microwave frequency to output frequencies and a host of others. In theory one properly constructed Cs clock should be the same as the next, to get an idea of how true this is, one can compare the performance of the clock ensembles at the various national labs like NIST an USNO.
As for the synchronization aspect of your question, as explained to me by Judah Lavine at NIST, the time scale ensembles like NIST and USNO are not in fact steered (synchronized). The clocks all run at their natural frequency, some faster, some slower than the theoretical. These measurements are then combined to produce weighted average paper time-scale that is then used to steer a physical device that realizes the paper-time scale. This second seered physical device is then used as the reference and distributed by the time services. By using a sufficiently large number of clocks in your ensemble, the variation across clocks is effective averaged out and the weighted average tends to the true paper-time scale.
For users of the timescale however, the situation is different. A timescale user (for instance a far flung observatory, or someone trying to use GPS navigation) their clocks need to be ticking at the same rate (syntonous (same frequency or tone)) and synchronous (displaying the same time) - for a primary reference standard clock like a Cs clock or Hg maser - the assumption is that the physics package will cover the syntonous requirement - it's why they are call primary. The synchronous aspect is managed by a variety of services, for example common-view GPS, Two way satellite time transfer (TWSTT) (pronounced "twist"), or physical time transfer by using a traveling clock.
Originally, the only mechanism for time transfer was the traveling clock. The traveler was set to the master clock at the start, was left undisturbed until arriving at the destination clock and the destination clock was "set" to the time displayed on the traveling clock. The frequency of update was limited by the speed at which the traveling clock could be moved and the constraint of cost of travel.
From the 1930s thru the 1950s, Western Union offered a time service to provide automatically synchronizing clocks, using signal transmitted over telegraph lines. The time source was the US Naval Observatory and synchronized once an hour, when a pulse was transmitted to the clock that would reset the clock to the hour. This keep the observers clock accurate to a few seconds of the pendulum clocks then in use at the USNO (later replaced by Quartz).
As timing tracability became more of a requirement (for example for testing labs to verify that their clocks matched a known standard when calibrating instruments) NBS - now NIST introduced into the WWV, WWVB and WwVH broadcasts modulations which enable a user to synchronize their clock to within a few miliseconds of the national standard clock. In fact, during the time period of "stretchy seconds" (1960 (start of atomic time) to 1972 (introduction of leap seconds) the nominal 10MHz frequency of WWV was steered to reflect the proper frequency of oscillation for a clock - and lets not start the leap second discussion.
As timing requirements became more demanding, and atomic clocks more available, WWV while still useful, could not satisfy the most stringent applications (like precise navigation and astronomy applications like VLBI). The initial solutions were to use traveling atomic clocks, and this works well (TWSTT verification still uses this today) the limitations of traveling clocks still applied. In addition, since most Cs atomic clocks were transported by aircraft, the most demanding users ran afoul of the revativistic effects introduced by flying a atomic clock near mach 0.6.
The solution was TWSTT, but this requires expensive hardware on both ends of the link and a dedicated satelite channel between the synchronizing station and the master station. The solution was extremely precise, in one installation that I personally know about, the time delta after 1 year was only 300ps - yes picoseconds.
Common view GPS also is a satellite transfer mechanism but relies on the stability of the GPS constelation to be effective. The idea is that if two ground stations can be certain they are observing the same subset of GPS satellites, then this subset can be used to determing the true time at the two stations. This assumes that the ionospheric effects are considered by each of the station. Without the stablity of the GPS system being assured by the GPS operations center (GPSOC) this mechanism would be less effective.
Optical cable transfer is also possible and may have resulted in one of the largest oops of all time when some reserchers at CERN anounced they had observed faster than light neutrinos, only to find that a faulty optical connector was the cause of the timing discrepancy.
Several other mechanisms for the transfer of time have been developed, LORAN which operated from the 1940s to the 1980s is probably the most notable.
References (web based to be easy to find):
Appendix A describes most of the time transfer services used today and in the recent past.
http://www.allanstime.com/Publications/DWA/Science_Timekeeping/TheScienceOfTimekeeping.pdf
The Western Union time service description (not an easy google search)
https://www.kensclockclinic.com/pdf/SWCC%20Historical%20Docs/Western%20Union%20Time%20Service%20Bulletin%2046-B.pdf
Timekeeping at the US Naval Observatory
TWSTT - https://www.usno.navy.mil/USNO/time/twstt/what-is-twstt
https://www.nist.gov/pml/time-and-frequency-division/time-services
the NIST Time and Frequency Division in Boulder
A media treatment of the same subjects:
http://www2.unb.ca/gge/Resources/gpsworld.nov-dec91.corr.pdf
LeapSecond.com - a resource for time-nuts - some links are broken :-(
bipm.org - all things weights and measures


TITLE: Calculate coordinates of triangle corners when area is known
QUESTION [0 upvotes]: The three corners of triangle have following coordinates:
$A = (1,0,0)$
$B = (0,1,0)$
$C = (0,0,z)$
What is the positive value of $z$ when area of triangle is $4$?
I have tried:
$AB = [-1,1,0]$
$AC = [-1,0,z]$
$\begin{bmatrix}i & j & k\\-1 & 1 & 0\\-1 & 0 & z\end{bmatrix} = k + jz + iz$
$(k + jz + iz) / 2 = 4$
$k + jz + iz = 8$
But I cannot solve $z$. Could I have some advice?

REPLY [0 votes]: \begin{align}
   A &= (1,0,0) \\
   B &= (0,1,0) \\
   C &= (0,0,z) \\
\end{align}
\begin{align}
   a &= BC &=\sqrt{1+z^2} \\
   b &= AC &=\sqrt{1+z^2} \\
   c &= AB &=\sqrt 2 \\
\end{align}
$$s = \frac 12(a+b+c) = \sqrt{1+z^2} + \frac{1}{\sqrt 2}$$
\begin{align}
   s-a &= \frac{1}{\sqrt 2} \\
   s-b &= \frac{1}{\sqrt 2} \\
   s-c &= \sqrt{1+z^2} - \frac{1}{\sqrt 2}
\end{align}
$$s(s-c) = (1+z^2) - \frac 12 = z^2 + \frac 12$$
$$(s-a)(s-b) = \frac 12$$
\begin{align}
   |ABC| &= \sqrt{s(s-a)(s-b)(s-c)} &\text{(Heron's formula)}\\
       4 &= \sqrt{\frac 12 \left(z^2 + \frac 12 \right)} \\
      32 &= z^2 + \frac 12 \\
      63 &= 2z^2 \\
     z^2 &= \dfrac{63}{2} \\
       z &= \pm \sqrt{\frac{63}{2}}
\end{align}


TITLE: Sum of squares of middle binomial sums or 'Truncated mean' of binomial coefficients under binomial distribution
QUESTION [2 upvotes]: $\mu=1+\epsilon$ where $\epsilon>0$ holds.

1.Is there a good bound for $$T=\frac{\sum_{i=-\sqrt{\mu n\ln n}}^{\sqrt{\mu n\ln n}}\binom{n}{\frac n2 +i}^2}{2^n}?$$

This quantity can be interpreted as $$\sum_{i=-\sqrt{\mu n\ln n}}^{\sqrt{\mu n\ln n}}\binom{n}{\frac n2 +i}\mathbb P(\frac n2+i)$$
where $\mathbb P(\frac n2+i)$ is under bionmial distribution and thus has probability $\frac{\binom{n}{\frac n2 +i}}{2^n}$ which is 'trucated expected value of $\binom{n}{\frac n2 +i}$'.
Computing few values suggests $\log_2T< n-\log_2\sqrt{\mu n\ln n}$ at $\mu\rightarrow1^+$.
For example at $n=1000$ to $50000$ gives such margin.

How large can $\mu$ be for this $\log_2T< n-\log_2\sqrt{\mu n\ln n}$ bound to hold up?

Naively I can get $$<\frac{2^n}{\sqrt{n\pi/2}}(1-o(1))$$ by using $$2^nT<\binom{n}{\frac n2}\sum_{i=-\sqrt{\mu n\ln n}}^{\sqrt{\mu n\ln n}}\binom{n}{\frac n2 +i}.$$
I also know we can prove $$\binom{n}{\frac n2 +i}\asymp\frac{2^{nH(\frac12+\frac in)}}{\sqrt{n\pi/2}}$$ approximation.

REPLY [2 votes]: Your main conjecture is not quite correct.
Indeed, for each natural $j$, let $B_j$ be a random variable (r.v.) with the binomial distribution with parameters $j$ and $1/2$, and let $C_j$ be an independent copy of $B_j$. Let also $u:=\sqrt{\mu n\ln n}$. Then for all even natural $n$
$$T/2^n=U_n:=\sum_{k\colon\,|k-n/2|<u}P(B_n=k,C_n=n-k)
=\sum_{k=0}^nP(B_n=k,C_n=n-k)-R_n=P(B_{2n}=n)-R_n,
$$
where
$$R_n:=\sum_{k\colon\, n/2\ge|k-n/2|\ge u}P(B_n=k,C_n=n-k)\le P(B_n\ge n/2+u)^2
\le e^{-4u^2/n}=1/n^{4\mu^2},
$$
where, in turn, the latter inequality is an instance of an exponential Hoeffding inequality. On the other hand, by Stirling's formula,
$$P(B_{2n}=n)\sim1/\sqrt{\pi n}$$
(the asymptotics everywhere here are as $n\to\infty$). So,
$$T_n\sim2^n/\sqrt{\pi n}$$
and hence
$$\log_2T=n-\log_2\sqrt{(1+o(1))\pi n}.$$
So, the inequality $\log_2T<n-\log_2\sqrt{\mu n\ln n}$ does not hold for any real $\mu\ge1$ if $n$ is large enough.


TITLE: For which intervals on $\Bbb R$ is $\sum_{n=1}^\infty\frac{x^n}{1+x^{2n}}$ uniformly convergent?
QUESTION [2 upvotes]: For which intervals on $\Bbb R$ is the following series uniformly convergent?
$$\sum_{n=1}^\infty\frac{x^n}{1+x^{2n}}$$
This is what I thought:
Let $a\in[0,1)$. Then on intervals $\left[-a,a\right]$:
$$\left|\frac{x^n}{1+x^{2n}}\right|\leq a^n$$
And the series $\sum a^n$ converges. It is uniformly convergent by the M test.
Is this correct ? Are there more intervals ?

REPLY [3 votes]: Yes, this is correct.
Now note the series diverges for $x=\pm 1$.
And for all $|x|> a>1$, you have
$$
0\leq \frac{x^n}{1+x^{2n}}\leq \frac{x^n}{x^{2n}}= \left(\frac{1}{x}\right)^n\leq  \left(\frac{1}{a}\right)^n.
$$
So you have also uniform convergence by the $M$-test on $(-\infty,-a]\cup[a,+\infty)$.
You can't do better than these intervals, ie you don't have uniform convergence on $(-1,1)$, $(-\infty,-1)$ or $(1,+\infty)$.
Otherwise, by the uniform Cauchy criterion, you would find for instance that
$$
\frac{1}{2}=\lim_{n\rightarrow+\infty} \sup_{x\in(-1,1)}\frac{x^n}{1+x^{2n}}=0.
$$
Contradiction. It works the same on the other two intervals.


TITLE: splitting subsets of cardinals
QUESTION [9 upvotes]: Suppose $\mathbb{P}$ is a separative partial order of uniform density $\kappa$, i.e. for all $p \in \mathbb{P}$, the least size of dense set below $p$ is $\kappa$.  Does forcing with $\mathbb{P}$ add an unbounded $A \subseteq \kappa$ such that for all unbounded $X \subseteq \kappa$ in the ground model, $X \cap A \not= \emptyset$ and $X \setminus A \not= \emptyset$?
In my answer here, I showed one half of this: There is an unbounded $A$ such that $X \setminus A \not= \emptyset$ for all ground model unbounded $X$.  However, the method of construction does not yield the stronger "splitting" property.
Answers with additional assumptions such as $\kappa$ is regular and/or $\mathbb{P}$ is $\kappa$-c.c. would still be useful.  But we already know the case $\kappa = \omega$ is true!

REPLY [1 votes]: Edit: The "proof" of (1)  as given below is flawed as Monroe pointed out in the comments, but it seems that the answer to Monroe's question is yes under GCH. The idea is to use a result of K. Bozeman connecting weak density and density of boolean algebras (see the reference) which in our context implies that for a dense set of $p \in B$, (1) holds with $B$ replaced by $B \upharpoonright p = \{a \in B : a \leq p\}$. See proposition 6.53 here. A consistent counterexample is still possible when $\kappa = \omega_2$. We will have to look at boolean algebras in which weak density is strictly less than density.
Let $B$ be a complete boolean algebra with density $\kappa$ everywhere. The following hold:
(1) For every $F \in [B]^{< \kappa}$, there exists a $p \in B$ that splits every (nonzero) condition in $F$ - i.e., for every $q \in F$, both $p \cap q$ and $\overline{p} \cap q$ are nonzero.
Proof: List $F = \{ p_i : i < \lambda \}$, $\lambda < \kappa$. Using the fact that $B$ has density $\kappa$ below $p_0$, get $q_0 \leq p_0$ such that each $p_i$ satisfies $p_i \cap q_0 = 0$ or $q_0 \subseteq p_i$ for $i \geq 1$. Split $q_0$, remove each $p_i$ in $F$ above $q_0$ and continue.
(2) There is a sequence $\langle p_i : i < \kappa \rangle$ such that for every $p \in B$, there exists $j < \kappa$ such that $p_i$ splits $p$ for every $i > j$.
Proof: Use (1) to construct such a sequence.
(3) Let $X$ be $B$-name for a subset of $\kappa$ defined by letting the boolean value of $i \in X$ to be $p_i$. Then $X$ splits every unbounded subset of $\kappa$ in $V$.
Proof: Let $Y$ be an unbounded subset of $\kappa$ in $V$. Suppose some $p \in B$ forces $Y$ to be disjoint with $X$. Get $i \in Y$ large enough such that $p_i$ splits $p$. Then $p \cap p_i$ forces $i \in X$ - contradiction. Similarly no $p \in B$ can force $Y$ to be contained in $X$.


TITLE: Let $G$ be a group. Let $N\unlhd G$ with $G/N$ being cyclic. Let $H\leq G$. Show that $HN\unlhd G$.
QUESTION [0 upvotes]: Let $G$ be a group. Let $N\unlhd G$ with $G/N$ being cyclic. Let $H\leq G$. Show that $HN\unlhd G$.
I cannot figure out how to use the fact that $G/N$ is cyclic in this proof. Any help is much appreciated.

REPLY [2 votes]: As $G/N$ is abelian, $HN/N$ is a normal subgroup of $G/N$. By the correspondence between subgroups of $G/N$ and subgroups of $G$ containing $N$ (which preserves normality), this implies that $HN$ is normal in $G$


TITLE: A question about biorthogonal basis composed of eigenvectors of a finite-dimensional non-self-adjoint matrix
QUESTION [5 upvotes]: The non-self-adjoint matrix M has non-degenerate eigenvalues, that is $M \psi_i = e_i \psi_i$, and its adjoint matrix satisfies $M^\dagger \chi_j= e_j^*  \chi_j$.
I know that $(\chi_j, \psi_i) = (\psi_i, \chi_j ) = 0$ for $i \neq j$, but why $(\chi_i, \psi_i), \forall i$ cannot be zero?

REPLY [2 votes]: If $\lambda$ is a non-degenerate eigenvalue of $M$, the matrix $M$ is similar to a Jordan form
$$\tag{1}
P^{-1}MP=J:=\lambda\oplus\tilde{J},
$$
where $P$ is a nonsingular matrix.
Let $p$ and $s^*$ denote the first column and row, respectively, of $P$ and $P^{-1}$. It is easy to verify that $p$ and $s^*$ are, respectively, right and left eigenvectors associated with $\lambda$ by evaluating the first column of $MP=PJ$ and the first row of $P^{-1}M=JP^{-1}$ taking into account the form (1) of $J$.
Now since $P^{-1}P=I$, $s^*p=1\neq 0$.

The assumption that $\lambda$ is non-degenerate is important. A simple example of its importance is given by
$$
M=\pmatrix{0&1\\0&0}
$$
with orthogonal left and right eigenvectors. This assumption is not needed, however, to show the biorthogonality of eigenvectors corresponding to distinct eigenvalues.


TITLE: integration help for calculus
QUESTION [2 upvotes]: $$\int_1^3(8x+12)e^{x^2 + 3x - 5}\,dx$$
$$u = x^2 + 3x - 5\implies du = 2x+3$$
$$\int_1^3(8x+12)e^{x^2 + 3x - 5}\,dx = 4\int (2x+3)e^{x^2 + 3x - 5}\,dx$$
$$= 4\int e^u\,du = 4e^u + c = 4e^{x^2 + 3x - 5}\Big|_1^3$$
This is what I have done so far, at the moment I am currently lost and do not know what to do next or even if my current work is correct.

REPLY [1 votes]: What you've done is perfectly fine. You found the indefinite integral $F(x)= 4e^{\large(x^2+3x -5)}$.
Now, you need only evaluate the definite integral at the given bounds, from $x = 1$ to $x=3$:
$$4e^{\large(x^2+3x -5)}\Big|_1^3 = F(3) - F(1) = 4e^{\large( (3)^2 + 3(3) - 5)}- 4e^{\large((1)^2 + 3(1) - 5)}$$


TITLE: How can I determine the coefficient $k$ in $ \dfrac{dT}{dt} = -k(T - 100 \mathrm{^\circ C}) $?
QUESTION [6 upvotes]: I recently spend some time on cooking and I'm curious about the time evolution of the temperature of the water. I did some experiment and the temperature is of the form
$$ T = 100 \mathrm{^\circ C} + (T(t_0) - 100 \mathrm{^\circ C}) e^{-k(t - t_0)} $$
for some positive constant $k$ somehow (for example, see my previous post and my answer). In other words,
$$ \dfrac{dT}{dt} = -k(T - 100 \mathrm{^\circ C}). $$
My question: How can I determine the coefficient $k$? Of course, I can determine it by experiments as shown below. But what I want to do is understanding this as a function of volume of water $V$, power of heater $P$, and some other variables related to a pot. So my expected answer is something like "If the volume (power) is $n$ times larger then the coefficient is $n$ times ($1/n$ times) larger."
Here is the experimental data and fitting graphs.
($V$ water is in the same pot with radius 9cm and heated by IH correspond to power $P$. I measure its temperature every 30 seconds.)
My aim is determine the time evolution of the temperature of the water a priori. So if another approach is better, please tell me. I would appreciate if you help me. Thank you.

REPLY [1 votes]: see we use simple integration ..
$$dT/dt = -k(T - 100)$$
this is in accordance with Newtons Law Of Cooling which says that the negative rate of change of temperature is directly proportional to the difference of the initial temperature of the substance and the surrounding temperature of the environment.
$$dT/dt = -k(T- 100)$$
$$dT/(T- 100) = -k \,dt$$
$$\int dT/(T- 100) = \int -k \,dt$$
$$\ln(T - 100) = -kt + C   \qquad \text{(1)}$$
Putting $t = 0$ at the time of origin  and the corresponding value of $T$, we get the value of $C$.
Putting the value of $C$ in (1) we can find $k$ in terms of $T$ and $t$.
We can put the respective values for the final answer.


text:
\begin{document}
\begin{frontmatter}

\title{Constrained Reinforcement Learning for Dynamic Optimization under Uncertainty}

\thanks[footnoteinfo]{EAC was supported by the Engineering and Physical Sciences Research Council (EPSRC) (EP/P016650/1).}

 \author[a]{P. Petsagkourakis}
 \author[b]{I.O. Sandoval}
 \author[c]{E. Bradford}
 \author[d,e]{D. Zhang}
 \author[e]{E.A. del Rio-Chanona}
 \address[a]{Centre for Process Systems Engineering (CPSE), University College London, Torrington Place, London, United Kingdom}
 \address[b]{Instituto de Ciencias Nucleares, Universidad Nacional Aut\'{o}noma de M\'{e}xico, Ciudad de M\'{e}xico, Mexico}
 \address[c]{Department of Engineering Cybernetics, Norwegian University of Science and Technology, Trondheim, Norway}
  \address[d]{Centre for Process Integration, Department of Chemical Engineering and Analytical Science,The University of Manchester, UK}
 \address[e]{Centre for Process Systems Engineering (CPSE), Imperial College London, UK}

\begin{abstract}
Dynamic real-time optimization (DRTO) is a challenging task due to the fact that optimal operating conditions must be computed in real time. The main bottleneck in the industrial application of DRTO is the presence of uncertainty.
Many stochastic systems present the following obstacles: 1) plant-model mismatch, 2) process disturbances, 3) risks in violation of process constraints. To accommodate these difficulties, we present a constrained
reinforcement learning (RL) based approach.
RL naturally handles the process uncertainty by computing an optimal feedback policy. However, no state
constraints can be introduced intuitively. To address this problem, we present a chance-constrained RL methodology. We
use chance constraints to guarantee the probabilistic satisfaction of process constraints, which is accomplished by
introducing backoffs, such that the optimal policy and backoffs are computed simultaneously. Backoffs are adjusted using the empirical cumulative distribution function to guarantee the satisfaction of a joint
chance constraint. The advantage and performance of this strategy are illustrated
through a stochastic dynamic bioprocess optimization problem, to produce sustainable high-value bioproducts.
\end{abstract}

\begin{keyword}
Reinforcement learning, Uncertain dynamic systems, Stochastic control, Chemical process control, Adaptive control, Policy gradient
\end{keyword}

\end{frontmatter}

\section{Introduction}

The optimization of chemical processes presents a distinctive challenge to the process systems engineering community, given that they suffer from three conditions: 1) there is no precise model known for the process under consideration (plant-model mismatch), leading to inaccurate predictions and convergence to suboptimal solutions, 2) the process is affected by disturbances (i.e. it is stochastic), and 3) process systems can be sensitive, therefore erratic constraint specifications can be inconvenient or even dangerous.

An efficient dynamic process optimization approach needs to be able to handle both the inherent stochasticity of the system (e.g. process disturbances) and plant-model mismatches, while satisfying safety and physical constraints. To accomplish this, we exploit a method from {\it reinforcement learning} (RL) called {\it policy gradient} with the inclusion of chance constraints from sample approximations. RL has been shown to be a powerful control approach, and is one of the few control techniques able to handle nonlinear stochastic optimal control problems \citep{Bertsekas:2000:DPO:517430}. The inclusion of chance constraints is not new in optimal control, however this work focuses on the development of policies that can handle arbitrary stochastic systems and the constructed policy will require less than a second to be computed. It should further be noticed that  recursive feasibility is out of the scope of this work. Here probabilistic guarantee is provided given the uncertain system.

Given the rapid development of machine learning technology, building a data-driven model to simulate, optimize, and control complex processes has become possible. In fact, a number of previous studies have adopted supervised learning methods (e.g. artificial neural network, Gaussian processes) to predict process behaviours and conduct open-loop process optimal control \citep{Bradford2018,DelRio-Chanona2017}. However, few studies have been conducted to investigate the applicability and efficiency of reinforcement learning in process engineering, and none of them include the efficient handling of constraints. Therefore, in this work, we propose a policy gradient reinforcement learning algorithm with efficient sample approximation of chance constraints.

Reinforcement learning (in an approximate dynamic programming (ADP) philosophy), has received significant attention for chemical process control. Most of the approaches rely on the (approximate) solution of the Hamilton–Jacobi–Bellman equation (HJBE), and have been shown to be reliable and robust for several problem instances.  For example, in \cite{Lee2005} a model-based strategy and a model-free strategy for control of nonlinear processes were proposed, in \cite{Peroni2005} ADP strategies were used to address fed-batch reactor optimization. In \cite{Tang2018} with the inclusion of distributed optimization techniques, an input-constrained optimal control problem solution technique was presented, among other works (e.g. \cite{Shah2016}).

In this paper, we present another taking on RL, that of using policy gradient. Policy gradient methods directly estimate the control policy, without the need of a model, or the solution of the HJBE. We highlight their advantages next. In Policy gradient methods, the approximate policy can naturally approach a deterministic policy, whereas action-value methods (that use epsilon-greedy or Boltzmann functions) select a random control action with some heuristic rule. Policy gradient methods work directly with policies that emit probability distributions, which is much faster and does not require an online optimization step. Policy gradient methods are guaranteed to converge at least to a locally optimal policy even in high dimensional continuous state and action spaces, unlike action-value methods where convergence to local optima is not guaranteed. Hence, they also enable the selection of control actions with arbitrary probabilities. In some cases, the best approximate policy may be stochastic \citep{Sutton}. \cite{Petsagkourakis2019a} seems to be the first research where these methods were applied in the context of process optimization and control.

Reinforcement learning and particularly policy gradient methods are considered to be advantageous as discussed above. However, the inclusion of constraints is not straightforward. Various approaches have been proposed in  the literature, where usually penalties are applied for the constraints. Such approaches can be very problematic, easily loosing optimality or feasibility ~\citep{Achiam2017} especially in the case of a fixed penalty. As it is stated in \cite{Wen2018}, existing methods cannot guarantee strict feasibility. The main approaches to incorporate constraints in this way make use of trust-region and fixed penalties~\citep{Achiam2017, Tessler2018}, as well as cross entropy~\citep{Wen2018}.
Unfortunately, existing methods for constrained reinforcement learning that are based on policy gradient methods cannot guarantee strict feasibility of the output policies even when initialized with feasible initial policies. Also, in \citep{Deisenroth2015, Kamthe2018} a reinforcement learning approach was proposed where the constraints are taken into account but without probabilistic guarantee for the joint constraints.

To address the above challenges, we propose a method with probabilistic guarantees for the satisfaction of joint chance constraints. We assume a model with uncertainty to be available, with either parametric uncertainty or structural  mismatch. The training of the policy is fully offline and can adapt to different environments as in~\cite{Petsagkourakis2019a}. The proposed method utilizes backoffs for the tightening of the constraints. Several works have been proposed in the area of stochastic MPC including the recently proposed~\cite{koller, Paulson2018, Bradford2019} to account for stochastic uncertainties in NMPC. These methods generally rely on generating closed-loop Monte Carlo (MC) samples offline from the plant to attain the required backoff values.

The structure of this paper is as follows: the problem statement is given in section 2, then in section 3 the details of proposed method for probabilistic satisfaction in reinforcement learning is given. An illustrative case study follows, where the framework is applied in a batch bioreactor. In the last session, the conclusions are discussed.

\section{Problem Statement}
In this work, the dynamic system is assumed to be given by a probability distribution, following a Markov process,
\begin{equation}\label{MC_unc}
    \textbf{x}_{t+1}\sim p(\textbf{x}_{t+1}|\textbf{x}_t, \textbf{u}_t),
\end{equation}
with $\textbf{x}\in \mathbb{R}^{n_x}$, $\textbf{u}\in \mathbb{R}^{n_u}$ and $t$ being the states, control inputs and discrete time, respectively. This behaviour is observed in systems when stochastic disturbances are present and/or other uncertainties affect the physical system, like parametric uncertainties. The case of additive disturbance can be written as:
\begin{equation}\label{additive_unc}
        \textbf{x}_{t+1} =f(\textbf{x}_{t},\textbf{u}_t) + \textbf{w}_t ,
\end{equation}
where $\textbf{w}\in \mathbb{R}^{n_w}$ is a vector of Gaussian distributed additive disturbance. Additionally in the case of parametric uncertainty the model can be described as
\begin{equation}\label{parametric_unc}
        \textbf{x}_{t+1} =f(\textbf{x}_{t},\textbf{u}_t, \textbf{p}),
\end{equation}
with $\textbf{p}$ being the uncertain parameters. Both (\ref{additive_unc}) and (\ref{parametric_unc}) can be represented by (\ref{MC_unc}).
In this work we seek to maximize an objective function in expectation, using an optimal stochastic policy subject to probabilistic constraints despite the uncertainty of the system. This problem can be written as a Stochastic Optimal Control Problem (SOCP) in (\ref{eq:OCP}). It should be noticed that the notation from reinforcement learning is followed, where the objective is to maximize a total reward instead of minimizing a cost~\citep{Bertsekas:2000:DPO:517430}.

\begin{equation}
\mathcal{P}(\pi^*(\cdot)):=\left
\{\begin{aligned}
        &\max_{\pi(\cdot)} \mathbb{E}[J(\textbf{x}_{t},\textbf{u}_{t})]\\
    &\text{s.t.}\\
    &\textbf{x}_0 = \textbf{x}(0)\\
    &\textbf{x}_{t+1} \sim p(\textbf{x}_{t+1}|\textbf{x}_t, \textbf{u}_t)\\
    &\textbf{u}_t \sim \pi(\textbf{x}_t, D_t)\\
    &\textbf{u}\in\mathbb{U}\\
    &\mathbb{P}(\bigcap_{i=1}^T \{\textbf{x}_i \in \mathbb{X}_i\})\geq 1-\alpha\\
    &  \forall t \in \left\{0,...,T-1\right\}\label{eq:OCP}
\end{aligned}\right.
\end{equation}
with $J$ being the objective function, $\mathbb{U}$ the set of hard constraints for the control inputs and $\mathbb{X}_i$ constraints for states that must be satisfied with a probability $1-\alpha$. Specifically,
\begin{equation}\label{constraint}
    \mathbb{X}_t = \{\textbf{x}_t\in \mathbb{R}^{n_x}|g_{j, t}(\textbf{x}_t) \leq 0, j =1,\dots,n_g\},
\end{equation}
and the joint chance constraints are satisfied for the joint event over all $t\in\{1,\dots,T\}$.
Additionally, $\pi(\cdot)$ is the stochastic policy and $D_t$ is a window of past inputs and states that are used by the policy. Unfortunately, this SOCP is intractable in general, and therefore, approximations must be made, some of these approximate methods come from the family of RL algorithms \citep{Bertsekas:2000:DPO:517430, schulman2017proximal, Petsagkourakis2019a}.

In RL a policy $\pi_\theta(\cdot)$ parametrized by the parameters $\theta$, is constructed. This policy, seeks to maximize the expectation of some objective function $J(\cdot)$. We can define this objective function in the finite horizon discrete-time case as
\begin{equation}
    J = \sum_{t=0}^T\gamma^{t}R_t(\textbf{u}_t,\textbf{x}_t),
\end{equation}
where $\gamma\in (0,1]$ is the {\it discount factor} that allows to give more importance to the short-term actions  and $R_t$ a given reward at the time instance $t$ for the values of $\textbf{u}_t$, $\textbf{x}_t$.

The problem that we aim to solve is challenging, since the policy must be
constructed such that it satisfies the probabilistic joint state constraints with some probability, and not only in expectation. The next section discusses the methodology followed by the joint satisfaction of constraints utilizing explicit backoffs, where we can denote a tightened constraint set as:
\begin{equation}\label{constraint1}
    \mathbb{\bar{X}}_t = \{\textbf{x}_t\in \mathbb{R}^{n_x}|g_{j, t}(\textbf{x}_t)+b_{j,t} \leq 0, j =1,\dots,n_g\},
\end{equation}
where variables $b_{j,t}$ represent the backoffs which tighten the original constraints $\mathbb{X}_t$ defined in (\ref{constraint}).

\section{Constrained Policy Optimization for Probabilistic Constraints}

In this section, the general proposed framework for safe reinforcement learning is described. A policy $\pi(\cdot)$ is constructed to optimize in expectation an economic metric of the process ($J$). To accomplish this, a policy optimization is performed, by sampling the physical system (or the generative model) at each time instant. We denote  $\pmb{\tau}$, as the joint random variable of states, controls and rewards for a trajectory with a time horizon $T$:
\begin{equation}\label{tau}
    \pmb{\tau} = (\textbf{x}_0,\textbf{u}_0,R_0,...,\textbf{x}_{T-1},\textbf{u}_{T-1},R_{T-1},\textbf{x}_T,R_T),
\end{equation}
 then the policy optimization can be defined as:

\begin{equation}\label{policyopt}
    \pi^*_\theta = \arg\max_{\pi_\theta(\cdot)} \mathbb{E}_{\pmb{\tau}\sim p(\pmb{\tau}|\theta)}J(\pmb{\tau}),
\end{equation}

where $p(\pmb{\tau}|\theta)$ represents the probability of the trajectory $\pmb{\tau}$ given the parametrization $\theta$ of the policy. Several approximation are required in  (\ref{policyopt}) to lead to satisfaction of constraints. Recently a methodology was proposed that satisfies the expected value of the constraints~\citep{Tessler2018, Wen2018}, however this is not adequate for most engineering problems, as usually the system is subject to safety constraints, that need to be satisfied with with high probability. To account for constraint violations, in this work, probabilistic constraints are incorporated. The problem is then formulated as:

\begin{equation}\label{policyopt_con}
\begin{split}
    \pi^*_\theta =& \arg\max_{\pi_\theta(\cdot)} \mathbb{E}_{\pmb{\tau}\sim p(\pmb{\tau}|\theta)}J(\pmb{\tau})\\
    &s.t.\\
& \mathbb{P}(\bigcap_{i=1}^T \{\textbf{x}_i \in \mathbb{X}_i\})\geq 1-\alpha\\
& \pmb{\tau} = (\textbf{x}_0,\textbf{u}_0,R_0,...,\textbf{x}_{T-1},\textbf{u}_{T-1},R_{T-1},\textbf{x}_T,R_T)
    \end{split}
\end{equation}

We omit the hard constraints for the control inputs in (\ref{policyopt_con}) as they are inherently satisfied by the construction of the policy, e.g. the policy passes through a bounded and differential squashing function~\citep{Deisenroth2015}.

In order to solve~(\ref{policyopt_con}) three steps must be applied: 1) The policy is parameterized by a multilayer recurrent neural network that computes the mean and variance of the control actions given a state, resulting in a stochastic policy. 2)  The probabilistic constraint in (\ref{policyopt_con}) is substituted by a surrogate set of constraints to guarantee closed-loop probabilistic constraint satisfaction. 3) The `new' constraint is incorporated into the objective function as a penalty to be solved as an unconstrained optimization problem~\citep{Nocedal2006}. The policy optimization is solved by a policy gradient framework~\citep{Sutton:1999:PGM:3009657.3009806}. In the next subsections these components are described.

\subsection{Recurrent Neural Networks}
Recurrent neural networks, (RNNs)~\citep{Rumelhart1986}, are artificial neural networks that have recursive connections between hidden units. This allows them to obtain a `memory' of previous data and model more accurately time-series. Let $\hat{\textbf{x}}_t$ be the vector that contains previous realizations of the states $\textbf{x}$ and the controls $\textbf{u}$, i.e. $\hat{\textbf{x}}_t = \left[\textbf{x}_{t}^T,\dots,\textbf{x}_{t-N}^T,\textbf{u}_{t-2}^T,\dots, \textbf{u}_{t-N-1}^T \right]^T$. Then the stochastic policy can be defined as:
 \begin{equation}\label{rnn}
     \textbf{u}_t \sim \pi_\theta(\textbf{u}_t|\hat{\textbf{x}}_{t},\textbf{u}_{t-1}):=\left
\{\begin{aligned}
         \left[\pmb{\mu}_{t}, \pmb{\Sigma}_{t}\right] &= s_\theta(\hat{\textbf{x}}_{t},\textbf{u}_{t-1})\\
         \textbf{u}_{t} &\sim  \mathcal{N}(\pmb{\mu}_t,\pmb{\Sigma}_t)
     \end{aligned}\right.,
 \end{equation}
where $s_\theta$ is the multilayer RNN parametrized by $\theta$. Deep structures (which means having more than one hidden layer) are employed to enhance the performance of the learning process ~\citep{Mnih2013,Mnih2015}.  The {\it actual} control inputs are drawn from the mean and variance that has been computed from (\ref{rnn}). Having a stochastic policy could be advantageous when uncertainties are present, as a deterministic policy will always compute the same control inputs with the same states since it learns a deterministic mapping from states to control inputs. On the contrary, a stochastic policy draws a control action from a probability distribution which can account for inherent stochasticity of the uncertain environments.

\subsection{Probabilistic constraints}
In this section, we introduce the surrogate inequality constraints to substitute the probabilistic (chance) constraints. To achieve a probabilistic guarantee, backoff based tightening of individual constraints will be introduced such that satisfaction for the joint chance constraint is attained.
The probabilistic constraints are intractable, but they can be approximated by the empirical cumulative distribution function (ecdf), using a sample approximation and $S$ Monte Carlo (MC) simulations:
\begin{equation}\label{ecdf}
F = \mathbb{P}(\bigcap_{t=1}^T \{\textbf{x}_t \in \mathbb{X}_t\}) \approx \hat{F}_S = \dfrac{1}{S}\sum_{s=1}^S \mathds{1}\{\bigcap_{t=1}^T \{\textbf{x}^{s}_t \in \mathbb{X}_t\}\ \},
\end{equation}
where $\hat{F}_S$ is the approximate joint constraint satisfaction probability for a trajectory, $\mathds{1}\{\bigcap_{t=1}^T \{\textbf{x}^{s}_t \in \mathbb{X}_t\ \} \} = \begin{cases}1,&  \textbf{x}^{s}_t \in \mathbb{X}_t \, \forall t \in \{ 1,\ldots,T\}\\ 0,& otherwise\end{cases}$. The indicator function is a Bernoulli random variable, which means that $\hat{F}_S$ follows a binomial distribution, with $\hat{F}_S \sim \dfrac{1}{S}\text{Bin}(S, F)$, $F$ being the cumulative distribution function (cdf). The confidence bound for the ecdf can then be computed from the Binomial cdf~\citep{10.2307/2331986}. In fact a simplified expression can be obtained using beta distributions instead leading to the following theorem.

\begin{theorem}[\cite{10.2307/2331986}]\label{lower}
Assume we are given a value of the ecdf $\hat{F}_S$ (see (\ref{ecdf}))  based on $S$ i.i.d. samples, then the true value of the cdf, $F$, has a lower bound $F_{lb}$ and lies inside the confidence interval $[F_{lb}(\epsilon;S;\hat{F}_S); F_{ub}(\epsilon;S;\hat{F}_S)]$ with a confidence level of $1-\epsilon$. Therefore, the probability of $F$ given a lower bound $F_{lb}(\epsilon;S;\hat{F}_S)$ is as follows:
\begin{equation}
    \begin{split}

        &\mathbb{P}\{F \geq 1-\alpha |{F}_{lb}\geq 1-\alpha\}\geq 1-\epsilon,\\
        &{F}_{lb} = 1-\text{betainv}(1-{\epsilon}, S + 1-S\hat{F}_S, S\hat{F}_S),
    \end{split}
\end{equation}
with $\text{betainv}(\cdot,\cdot,\cdot)$ being the inverse of the beta cdf with parameters  $\{S + 1-S\hat{F}_S\}$ and $\{S\hat{F}_S\}$, where $1-\alpha$ is the value for the probabilistic constraint satisfaction and $1-\epsilon$ is the confidence level.
\end{theorem}

The objective now is to tighten the individual constraints using backoffs such that the probabilistic lower bound of the ecdf of the joint constraints is equal to $1-\alpha$ (see (\ref{lb_e})), given the confidence level of $1-\epsilon$.
\begin{equation}\label{lb_e}
    F_{lb} = 1-\alpha.
\end{equation}
In other words, if the lower bound of the ecdf ($F_{lb}$) is equal to $1-\alpha$, then the probability of satisfaction of the joint chance constraints in ($\ref{policyopt_con}$) is larger than $1-\alpha$ with a certainty no smaller than $1-\epsilon$.

Hence, we aim to compute the tightened constraints by backoffs $b_{j,t}$ such that (\ref{lb_e}) is satisfied when the policy optimization has finished.

To find $b_{j,t}$, we first compute an initial set of backoffs ($b_{j,t}^0$), as it has been proposed in~\cite{Paulson2018}, where
\begin{equation}
    \bar{g}_{j,t}(\textbf{x}_t) + b^0_{j,t} =0~ \forall j,t~\text{gives}~ \mathbb{P}(\textbf{x}_t \in \mathbb{X}_t)\geq 1-\delta,
\end{equation}
with $\delta$ being a tuning parameter. Additionally, the mean value for $g_{j,t}$ is  the sample average approximation (SAA): $\bar{g}_{j,t} =\frac{1}{S} \sum_{s=1}^Sg_{j,t}^{s}$.
The initial backoff values are computed to probabilistically satisfy each constraint:
\begin{subequations}
\begin{align}
 &\mathbb{P}(\textbf{x}_t \in \mathbb{X}_t)\geq 1-\delta\label{prob_in}\\
    &b^0_{j,t} = \hat{F}_S^{-1}(1-\delta) - (\bar{g}_{j,t}(\textbf{x}_t)),~\forall j,t
\end{align}
\end{subequations}

with $\hat{F}_S^{-1}(1-\delta)$ being the inverse ecdf of (\ref{prob_in}).
We wish the backoffs $\textbf{b}$ (with elements $b_{j,t}~\forall~j,t~\in \{1,\dots,n_g\}\times\{1,\dots,T\}$) to be large enough to ensure the probabilistic satisfaction of constraints. However, if the backoffs are too large, unnecessary
conservatism will be present, since relaxing any active state constraint can only result in improved performance. Therefore, we wish for all active constraints to be as close to zero as possible. This results in a root-finding problem using Theorem~\ref{lower} with  $F_{lb}-(1-\alpha)= 0$. Given that we do not have the derivatives with respect to the backoffs, we solve this problem by a bisection algorithm. We implement this by iterating over a design parameter $\gamma$, such that $F_{lb}-(1-\alpha) = 0$, and $b_{j,t} = \gamma~b^0_{j,t}$ is used as an update rule. Notice that now $F_{lb}$ is a function of the design parameter $\gamma$, since the lower bound depends on the tightening that is applied.

With the above procedure we are able to compute a surrogate for the probabilistic constraints.

\subsection{Penalty Function and policy gradient method}
In this work we reformulate the constraint using a quadratic penalty function and then solve the problem using a policy gradient method.
A smooth quadratic penalty is added to the objective function of (\ref{policyopt_con})

\begin{equation}
\begin{split}
          \max_{\pi_\theta(\cdot)} \mathbb{E}_{\pmb{\tau}}\left(J(\pmb{\tau}) - \mu \sum_{j=1}^{n_g}\sum_{t=1}^T\max({g}_{j,t}(\textbf{x}_t)), 0)^2\right),
          \end{split}
\end{equation}

where ${g}_{j,t}$ is given in~(\ref{constraint}) and $\pmb{\tau}$ in (\ref{tau}). It should be noted that the same framework can be implemented in most policy optimization methods \citep{Tessler2018, Achiam2017}. As it is observed in~\cite{Achiam2017}, when penalty methods are applied in policy optimization, depending on the value of parameter $\mu$ the behaviour of the policy may change. If a large value of $\mu$ is used, then the policy tends to be over-conservative resulting in feasible areas that are not optimal; on the other hand, when the value for $\mu$ is too small, the policy tends to ignore the constraints as in the unconstrained optimization case.
Therefore, the value of $\mu$ must be carefully chosen, with the constraints substituted by the tightened constraints using backoffs. In this way, the policy optimization will compute the `near'-optimal solution, at the same time guaranteeing the probabilistic satisfaction of the constraints for a given value of $\mu$.

\subsection{Proposed Algorithm}\label{alg}

In this work we propose the use of policy gradient, and particularly of the Reinforce algorithm. Reinforce ~\citep{Sutton:1999:PGM:3009657.3009806} approximates the gradient of the policy to maximize the expected reward with respect to the parameters $\theta$ without the need of a dynamic model of the process. It should be mentioned that different algorithms may be applied \citep{schulman2017proximal, Kakade2002}. However the focus here is on the probabilistic guarantee of the constraints. We now define our reward function as:

$\hat{J}(\pmb{\tau}, \textbf{b}) = J(\pmb{\tau}) + \mu \sum_{j=1}^{n_g}\sum_{t=1}^T\max({g}_{j,t}(\textbf{x}_t)) + b_{j,t}, 0)^2$, which is now an explicit function of our probabilistic constraints.
We now use the Policy Gradient theorem \citep{Sutton:1999:PGM:3009657.3009806} to obtain an explicit gradient of the reward with respect to the parameters that parameterize our policy:
\begin{align}
\nabla_\theta \mathbb{E}_{\pmb{\tau}} (J) \approx \frac{1}{K} \sum_{k=1}^{K}  \left[ \hat{J}(\pmb{\tau}^{k},\textbf{b}) \nabla_\theta \sum_{t=0}^{T-1} \text{log}\left( \pi(\textbf{u}_t^k|\hat{\textbf{x}}_t^k,\theta)\right)\right]
\end{align}

where we denote the sample $k$ as a superscript that denotes the $k^{th}$ sampled trajectory. The variance of this estimation can be reduced with the aid of an action-independent baseline $\bar{\beta}_s$, which does not introduce a bias \citep{Sutton}. A simple but effective baseline is the expectation of reward under the current policy, approximated by the mean over the sampled paths:

\begin{equation}\label{baseline}
    \bar{\beta}_s = \bar{J}(\theta) \approx \frac{1}{S} \sum_{k=1}^K\hat{J}(\pmb{\tau}^{k},\textbf{b}),
\end{equation}
which leads to:
\begin{equation}\label{Rew-Baseline}
	\nabla_\theta \hat J(\theta) \approx \frac{1}{K} \sum_{k=1}^{K}  \left[ (\hat{J}(\pmb{\tau}^k,\textbf{b})-\bar{\beta}_s) \nabla_\theta \sum_{t=0}^{T-1} \text{log}\left( \pi(\textbf{u}_t^k|\hat{\textbf{x}}_t^k,\theta)\right)\right]
\end{equation}

This selection increases the log likelihood of an action by comparing it to the expected reward of the current policy. Equation (\ref{Rew-Baseline}) is the gradient that is used to update the policy in a gradient ascent fashion in policy gradient methods. For fixed values of backoffs, the policy gradient method is outlined in Algorithm~\ref{alg:PG alg1}.

\begin{algorithm}[H]
\caption{Policy gradient for fixed backoff}\label{alg:PG alg1}
\smallskip
{\bf Input:} Initialize policy parameter $\theta = \theta_0$, with $\theta_0\in\Theta_0$,
learning rate $\alpha_0$ and its update rule, the number of episodes $K_0$ and the number of epochs $N_0$, $\mu$ parameter, tolerance $tol$, set backoffs $\textbf{b}$\\
{\bf Output:} policy $\pi^{*}(\cdot | \cdot ,\theta)$ and $\Theta$.
\smallskip

{\bf for} m = 1,\dots, N {\bf do}
\begin{enumerate}
\item Collect $\textbf{u}_t^k , \textbf{x}_t^k$ for $T$ time steps for $K$ trajectories along with $\hat{J}(\textbf{x}_T^k)$, also for $K$ trajectories.
\item Update the policy: $\theta_{m+1} = \theta_m +  \frac{\alpha_m}{K} \sum_{k=1}^{K}  \left[ (\hat{J}(\pmb{\tau}^k, \textbf{b})-\bar{\beta}_s) \nabla_\theta \sum_{t=0}^{T-1} \text{log}\left( \pi(\textbf{u}_t^k|\hat{\textbf{x}}_t^k,\theta)\right)\right]$
\item $history(m+1) := \mathbb{E}(\hat{J})$
\item if $|history(m+1)-history(m)|\leq tol$ then $exit$
\end{enumerate}

\end{algorithm}

Algorithm~\ref{alg:PG alg1} is the base for Algorithm~\ref{alg:PG alg2}, which is discribed next. In \textbf{step (1)}  the policy is trained with $\textbf{b} = 0$, with the initial estimate of the backoffs $b_{j,t}^0$ computed in \textbf{step (2)} with i.i.d. $S$  samples.  Then, the backoff values will repeatedly change (\textbf{3}) until the desired performance is achieved, which corresponds to the satisfaction of (\ref{lb_e}). The value of $\gamma_m$ is the half of $a_m$ and $c_m$ in \textbf{step 3i}. After construction of the new policy, (\ref{lb_e}) is evaluated in \textbf{step 3iv} using $S$ i.i.d. samples and the relevant changes of $a_m$ and $c_m$ subject to bisection method are made in \textbf{ step 3v}. Lastly the algorithm terminates when a desirable tolerance $tol_0$ has been achieved (\textbf{step 3vi}).
It should be noted that every time a new backoff is computed then the policy is re-optimized. This may look inefficient at first glance, however the convergence is achieved fast, as everytime the previous policy is used as an initial guess for the next iteration. In the end of Algorithm \ref{alg:PG alg2}, a probabilistically constrained policy will have been constructed.

\subsection{Policy initialization}

Reinforcement learning (including policy gradient methods) is computationally expensive; this is mainly because most of the the computational cost is shifted offline, but also because initially the agent (or controller in our case) explores the control action space randomly. In the case of process optimization and control, it is possible to use a preliminary controller, along with supervised learning to hot-start the policy, and significantly speed-up convergence.

The main idea here is to have data from some policy or state-feedback control (e.g. PID controller, (economic) model predictive controller) to compute control actions given observed states. The initial parameterization for the policy (before {\textbf{ step 1}}) is trained in a supervised learning fashion where the states are the inputs and the control actions are the outputs. Subsequently, this parameterized policy is used to initialize the policy in \textbf{step 1} and then trained by the RL algorithm.

\begin{algorithm}[H]
\caption{Backoff-Based Policy Optimization}\label{alg:PG alg2}
\smallskip

{\bf Input:} Initialize policy parameter $\theta = \theta_0$, with $\theta_0\in\Theta_0$,
learning rate, its update rule $\alpha$, $m:=0$, the number of episodes $K_0, K_1$ and the number of epochs $N_0, N_1$, $\mu$ parameter, set backoffs $\textbf{b} = \textbf{0}$, $\delta<1$, $\alpha< 1$, $tol_0 = 1\times10^{-4}$, $a_0=0$, $c_0$, maximum number of backoff iterations $M$ and $S$ number of samples to compute $\hat{F}_S$\\
{\bf Output:} policy $\pi^{*}(\cdot | \cdot ,\theta)$ and $\Theta$.
\smallskip
\begin{enumerate}
    \item { Perform policy optimization} with $\textbf{b} = \textbf{0}$ using Algorithm~\ref{alg:PG alg1} with $K_0$ episodes and $N_0$ epochs.\\
    Obtain policy $\pi_0(\cdot|\cdot) = \pi^{*}(\cdot|\cdot,\theta)$
 \item Estimate initial backoff using $S$ i.i.d. samples:\\ $b^0_{j,t} = \hat{F}_S^{-1}(1-\delta) - \bar{g}_{j,t}(\textbf{x}_t)~\forall j, t$
\item {\bf for} m = 0,\dots, $M$ {\bf do}.
\begin{enumerate}[i]
\item Set $\gamma_m = \dfrac{a_m + c_m}{2}$
\item Set $\textbf{b} = \gamma_m \textbf{b}^0$
    \item { Perform policy optimization} with backoffs $\textbf{b}$ using Algorithm~\ref{alg:PG alg1} with $N_1$, $K_1$ and $tol_0$.\\
    Obtain policy $\pi_\text{m}(\cdot|\cdot) = \pi^*(\cdot|\cdot,\theta)$.
    \item Compute  $e_m = F_{lb} - (1-\alpha)$ using $S$ i.i.d. samples.
    \item if $e_m<0$ then: $a_{m+1} :=\gamma_m$\\ else $c_{m+1} := \gamma_m$
    \item if $|e_m|\leq tol_0$ then {\it exit}
\end{enumerate}
\end{enumerate}

\end{algorithm}

\section{Case Study}

The case study in this paper focuses on the photo-production of phycocyanin synthesized by cyanobacterium \textit{Arthrospira platensis}. Phycocyanin is a high-value bioproduct and its biological function is to enhance the photosynthetic
efficiency of cyanobacteria and red algae. It has applications as a natural colorant to replace other toxic synthetic pigments in both food and cosmetic production. Additionally, the pharmaceutical industry considers it as beneficial because of its unique antioxidant, neuroprotective, and anti-inflammatory properties.

The  dynamic system consists of the following system of ODEs describing the evolution of the concentration of biomass ($X$), nitrate ($N$), and product ($q$) under parametric uncertainty. The dynamic model is based on Monod kinetics, which describes microorganism growth in nutrient sufficient cultures, where intracellular nutrient concentration is kept constant because of the rapid replenishment. We assume a fixed volume fed-batch. The manipulated variables as in the previous examples are the light intensity ($u_1=I$) and inflow rate ($u_2=F_N$). The mass balance equations are
\begin{align}
     \dfrac{dc_x}{dt} &=  u_m \dfrac{I}{I + k_s + I^2/k_i}c_x \dfrac{c_N}{c_N + K_N} - u_dc_X\label{biomas}\\
     \dfrac{dc_N}{dt} &= -Y_{N/X} u_m \dfrac{I}{I + k_s + I^2/k_i}c_x \dfrac{c_N}{c_N + K_N} + F_N \label{Nitrogen}\\
     \dfrac{dc_q}{dt} &=
      k_m \dfrac{I}{I + k_{sq} + I^2/k_{iq}}c_x \dfrac{c_N}{c_N + K_N} - k_d\dfrac{c_{q}}{C_N + K_{N_q}}       \label{product}
\end{align}
The parameter values are adopted from~\citep{Bradford2019}. Uncertainty is assumed for the initial concentration, where

\begin{align}
    &\begin{bmatrix}
    c_x(0) & c_N(0)
    \end{bmatrix} \sim \mathcal{N}(    \begin{bmatrix}
    1. & 150.
    \end{bmatrix}, diag(1\times 10^{-3}, 22.5)).\\
    &c_q(0) = 0.
\end{align}
Additionally, the 10\% parametric uncertainty of the system:        ${k_s} \sim \mathcal{N}(178.9, 17.89)$, ${k_i} \sim \mathcal{N}(447.1, 44.71)$ and ${k_N} \sim \mathcal{N}( 393.1, 39.31).$
The objective function(reward) in this work is to maximize the product's concentration ($c_q$) at the end of the batch. The objective is additionally penalized by the change of the control actions $\textbf{u}(t) = \left[ I, F_N\right]^{T}$. As a result the reward is given as:
 \begin{equation}\label{reward_bio}
 \begin{split}
     &R_t = -\Delta \textbf{u}_t^T diag(3.125\times10^{-8}, 3.125 \times 10^{-6})  \Delta \textbf{u}_t,\\
     & t\in \{0, T-1\}, R_T = c_q(T),
 \end{split}
 \end{equation}
 where $\Delta \textbf{u}_t = \textbf{u}_t - \textbf{u}_{t-1}$. The relevant constraints in this work for each time step are $g_{1,t}=c_N - 800\leq 0$ and $g_{2,t}=c_q -0.011c_X\leq 0$. This constraints have been normalized as:
 \begin{equation}
         \tilde{g}_{1,t} =\dfrac{c_N}{800} - 1\leq 0, ~~~
         \tilde{g}_{2,t} = \dfrac{c_q}{0.011c_X} - 1\leq 0
 \end{equation}
and the constraints are meant to be satisfied with probability $99\%$ ($\alpha = 0.01$) and confidence level is $99\%$ ($\epsilon = 0.01$). The constraints are added as a penalty with $\mu = 10$. The control actions are constrained to be in the interval $0\leq F_N \leq 40$ and $120 \leq I\leq 400$, these constraints are considered to be hard. The control policy RNN is designed to contain 4 hidden layers, each of which comprises 20 neurons embedded by a leaky rectified linear unit (ReLU)  activation function. A unified policy network with diagonal variance is utilized such that the control actions share memory and the previous states are used from the RNN (together the current measured states). The  computational cost for each control action online is insignificant since it only requires the evaluation of the corresponding RNN. First the algorithm computes the policy for the bakcoffs to be zero ($\textbf{b} =0$), then the backoffs are updated according to the Algorithm~\ref{alg:PG alg2}. The parameters for the trainings are: $N_0 = 500$, $N_1 = S = 500$, $M = 100$, $K_0 = 150$, $K_1=50$, $tol=tol_0=10^{-4}$ and the two previous states and controls are used from the policy. After the completion of the training the backoffs have been computed and in Fig.~\ref{fig:lb} the convergence of the lower bound $F_{lb}$ is shown. In a rather small number of iterations the backoff values managed to force the $F_{lb}$ to 0.99. The figure shows $F_{lb}$ against all the iterations performed in {\textbf{step 3}} including the training of policy in {\textbf{step 3iii}}.

\begin{figure}
    \centering
    \includegraphics[scale=0.3]{lb_satisfaction.png}
    \caption{Convergence of lower bound of $F_{lb}$ to $1-\alpha$.}
    \label{fig:lb}
\end{figure}

Now, the actual value of the constraints can be depicted in Fig~\ref{fig:h2}, where the shaded areas are the 98\% and 2\% percentiles. The results are also compared with the case of the absence of backoffs ($\textbf{b}=0$). As it was expected the use of backoffs managed to remain feasible and in the case of the $g_2$ steer the problem to its boundary.

\begin{figure}
    \centering
    \includegraphics[scale=0.3]{gs.png}
    \caption{Constraint satisfaction under the absence and presence of backoffs, where the shaded areas are the 98\% and 2\% percentiles.}
    \label{fig:h2}
\end{figure}

The normalized backoff values of the $\tilde{g}_{1,t}$ and $\tilde{g}_{2,t}$ for each update are shown in Fig \ref{fig:backoff2}, where the red-dashed represents the converged final value.
Based on the comparison, it is concluded that integrating backoffs into RL can significantly improve RL's optimal control performance when handling complex systems with high stochasticity. From Fig~\ref{fig:h2}, it is seen that the current strategy can well satisfy all the practical constraints; while the RL without backoffs breaches $g_1$ in the middle of the operation and violates $g_2$ at the later stage of the process, hence resulting in an infeasible optimal policy.
It should be noted that the final value for the product $c_q$~(\ref{reward_bio}) is 0.159 and 0.172 when backoffs are applied and when they are not. This difference makes sense since the case of $\textbf{b} = 0$ does not have probabilistic guarantee for the satisfaction of the constraints and the objective can attain higher value in the infeasible area.

\begin{figure}
\centering
 \includegraphics[scale=0.3]{bs.png}
\caption{The backoff values (dimensionless) are plotted over number of epochs, which are faded out towards earlier iterations.}
 \label{fig:backoff2}
\end{figure}

\begin{figure}
    \centering
    \includegraphics[scale =0.3]{us.png}
    \caption{Comparison of the time trajectories of the piecewise constant control actions, where the shaded areas are the 98\% and 2\% percentiles.}
    \label{fig:my_label}
\end{figure}
The algorithm is implemented in Pytorch version 0.4.1.  Adam~\citep{Kingma2014} is employed to compute the network's parameter values using a step size of $10^{-2}$ with the rest of hyperparameters at their default values.
\section{Conclusions}
 For fermentation and pharmaceutical processes, even a transitory violation of hard constraints may directly damage the product quality and result in an early termination of ongoing batch operation. As a result, choosing a robust online optimization method is of critical importance when uncertainty is present in a process.
The current results further reveal that it is possible to obtain a near optimal and feasible policy given a general uncertain system. In real systems with the absence of a true model, it is impossible to generate highly accurate datasets to train the policy network. As a result, a method that estimates offline backoffs should be thoroughly investigated as it can offer additional advantages to guarantee the probabilistic feasibility of hard constraints when computing an optimal policy. In terms of future work, experimental verification will be conducted to test the efficiency of this strategy and provide suggestions to further improve the current method.

\bibliography{ifacconf}

\end{document}

config: arxiv


TITLE: A special class of weighted Motzkin paths
QUESTION [4 upvotes]: Consider Motzkin paths with the following weight:
All up-steps and the horizontal steps on height $0$ have weight $1$, all down-steps have weight $t$ and the horizontal steps on even heights have weight $1-t$ while those on odd heights have weight $t-1.$
Computations suggest that the weight $c_n(t)$ of all paths of length $n$ is
$$c_n(t)=\sum_j\binom{\lfloor{\frac{n-1}{2}}\rfloor}{\lfloor{\frac{j-1}{2}}\rfloor}\binom{\lfloor{\frac{n}{2}}\rfloor}{\lfloor{\frac{j}{2}}\rfloor}t^{j-1}.$$
Is there a simple way to prove this?  The use of continued fractions seems to be rather hard.
Could it help that $c_n(t)$ is the special case for $q=-1$ of the q-Narayana polynomials
$\sum{\binom{n}{j}_q \binom{n-1}{j}_q \frac{q^{j^2+j}}{[j+1]_q} t^j}$?

REPLY [3 votes]: Let $F_k(x)$ be a generating function for the total weight of Motzkin paths of length $n$ starting and ending at height $k$ and not going below that height. Let $G_k(x)$ be a similar generating function with an additional restriction that paths do not come to height $k$, except at the beginning and at the end. Then $c_n(t)$ is the coefficient of $x^n$ in $F_0(x)$.
Clearly, we have $F_{k+2}(x)=F_k(x)$ for any $k\geq 1$, and $G_{k+2}(x)=G_k(x)$ for any $k\geq 0$. Taking into account up and down steps, we also have
$$G_k(x) = 1 + tx^2F_{k+1}(x),$$
which we will use for $k\in\{0,1\}$.
Finally, taking into account the weight of horizontal steps, we have
$$\begin{cases}
F_0(x) = \frac{1}{1-(G_0(x)-1+x)},\\
F_1(x) = \frac{1}{1-(G_1(x)-1+(t-1)x)},\\
F_2(x) = \frac{1}{1-(G_0(x)-1+(1-t)x)}.
\end{cases}
$$
This gives us a system of 5 equations w.r.t. $F_0(x), F_1(x), F_2(x)$ and $G_0(x), G_1(x)$. Solving it, we get
$$F_0(x) = \frac{1-2tx+\left(t^{2}-1\right) x^{2}-\sqrt{1-2\left(1+ t^{2}\right) x^{2}+\left(1-t^2\right)^2 x^{4}}}{2 x \left(-1+\left(1+t \right) x \right) t}.$$
Extracting the coefficient of $x^n$ is now a technical task.

ADDED. Proving the required identity can be done in three straightforward steps:

Notice that the sum in question equals the coefficient of $z^n$ in
$$\big((1+z^2)(1+z^2t^2)\big)^{n/2} (1+z^2t) \big(z ((1+z^2)(1+z^2t^2))^{-1/2} + (1+z^2t^2)^{-1}\big).$$

Apply Lagrange–Bürmann formula to turn the above expression into a generating function.

Verify that the obtained generating function is the same as $F_0(x)$.


TITLE: Vanishing terms in vector calculus proof
QUESTION [1 upvotes]: In a proof from Boas mathematical methods, the solution has (where $\vec{C}$ is an arbitrary vector)
$$\iiint_\tau \nabla\cdot(\vec{V} \times \vec{C}) \, d\tau = \iint_S (\vec{V}\times \vec{C}) \cdot \hat{n} \, d\sigma$$
which then turns into
$$\vec{C}\cdot \iiint_\tau (\nabla\times \vec{V}) \, d\tau = \vec{C}\cdot \iint_S (\hat{n}\times\vec{V}) \, d\sigma$$
which seems to be missing terms as $\nabla\cdot(\vec{V} \times \vec{C}) = \vec{C}\cdot(\nabla \times \vec{V}) - \vec{V}\cdot(\nabla\times \vec{C})$. There are similar missing terms on the right hand side. Can anyone help me understand why these terms vanish?

REPLY [1 votes]: $\vec{C}$ is an arbitrary vector, not a vector field, so it is constant. Therefore any derivatives of it, including the curl, are zero.


TITLE: If a and b are two sequences that converge to the same number, then f(a) and f(b) converge to the same number.
QUESTION [0 upvotes]: Entire Question:
Let $f:A\to \mathbb{R}$ be a unif. cont. function and $\underline{a},\underline{b}:\mathbb{N}\to A$ be two sequences which converge to the same number. Prove that $f(\underline{a}),f(\underline{b})$ converge to the same number.
My Attempt so far :
Say $\underline{a},\underline{b}\to \ell$. We know that $f(\underline{a})\to x$ and $f(\underline{b}) \to y$ for some $x,y \in \mathbb{R}$, since uniformly continuous functions preserve convergence. We will show that $x = y$. Let $\varepsilon > 0$, and we will argue that $|x-y| < \varepsilon$, for any $\varepsilon > 0$. We have,
$$ |x-y| = |(x-f(a_n)) + (f(a_n) - f(b_n)) + (f(b_n) - y)| \leq |x-f(a_n)| + |f(a_n) - f(b_n)| + |f(b_n) - y| $$
What I want to do it to present an n large enough so that all three terms on the RHS of the inequality are less than $\frac{1}{3}\epsilon$.
Any guidence is appreciated !

REPLY [0 votes]: Let $d$ be the metric on $A$ with respect to which $f$ is uniformly continuous.
Let $\epsilon>0$. Since $f$ is uniformly continuous, there is $\delta>0$ such that if $d(z,w)<\delta$, then $|f(z)-f(w)|<\epsilon/3$. There is $N$ such that if $n>N$ then
$$d(a_n, l)<\delta/2$$
and
$$d(b_n, l) <\delta/2$$,
since you know there are $N_1$ and $N_2$ such that the statements hold, and if you take the maximum of these two you find $N$. Now, by the triangle inequality
$$d(a_n, b_n)\leq d(a_n, l)+d(b_n, l)<\delta.$$
Moreover, there exists $M$ such that if $n>M$ then
$$|x-f(a_n)|<\epsilon/3$$
and
$$|y-f(b_n)|<\epsilon/3,$$
since we find $M$ again by taking appropriate maxima. Now if $n>\max \{M, N \}$, then
$$|x-y|<\epsilon.$$


TITLE: Find $\sum_{n=1}^\infty\frac{2^{f(n)}+2^{-f(n)}}{2^n}$, where $f(n)=\left[\sqrt n +\frac 12\right]$ denotes greatest integer function
QUESTION [8 upvotes]: Question:  Let $f(n)=\left[\sqrt n +\dfrac 12\right]$, where $[\cdot]$ denotes greatest integer function, $\forall n\in \Bbb N$. Then,
  $$\sum_{n=1}^\infty\frac{2^{f(n)}+2^{-f(n)}}{2^n}={\color{red}?}$$

My solution :
I tried with trapping gif function into its lower value and
upper values using $x-1< [x] <x$,
but i am not getting any result.

REPLY [5 votes]: Note that $f(n) = \left\lfloor \sqrt{n}+\tfrac{1}{2}\right\rfloor = k$ iff $k^2-k+\tfrac{1}{4} \le n < k^2+k+\tfrac{1}{4}$, i.e. $k^2-k+1 \le n \le k^2+k$.
Therefore, we have:
\begin{align*}
\sum_{n = 1}^{\infty}\dfrac{2^{f(n)}+2^{-f(n)}}{2^n} &= \sum_{k = 1}^{\infty}\sum_{f(n) = k}\dfrac{2^{f(n)}+2^{-f(n)}}{2^n}
\\
&= \sum_{k = 1}^{\infty}\sum_{n = k^2-k+1}^{k^2+k}\dfrac{2^k+2^{-k}}{2^n}
\\
&= \sum_{k = 1}^{\infty}(2^k+2^{-k})\cdot\sum_{n = k^2-k+1}^{k^2+k}\dfrac{1}{2^n}
\\
&= \sum_{k = 1}^{\infty}(2^k+2^{-k})\left(2^{-(k^2-k)}-2^{-(k^2+k)}\right)
\\
&= \sum_{k = 1}^{\infty}\left(2^{-k^2+2k}+2^{-k^2}-2^{-k^2}-2^{-k^2-2k} \right)
\\
&=  \sum_{k = 1}^{\infty}\left(2^{-(k-1)^2+1} - 2^{-(k+1)^2+1}\right)
\\
&=  \sum_{i = 0}^{\infty}2^{-i^2+1} - \sum_{j = 2}^{\infty}2^{-j^2+1}
\\
&= 2^{-0^2+1}+2^{-1^2+1}
\\
&=3
\end{align*}


TITLE: What is the effect of "The Ground Effect" on a load bearing structure?
QUESTION [0 upvotes]: If a train was made to utilize the ground effect, (or plane made to follow a rail) not to have any contact with the ground other than air, would the rail need to be so heavily built since the air is distributing the weight?
Keep in mind the fastest train's full weight is still supported by a rail suspended with magnets. Also, I understand the dynamics of ground effect and I wonder if utilizing ground effect in this could increase the speed of the train while retaining some efficiency. In this scenario, the train would be suspended over a rail by air not magnets; possibly bracketed by magnets to keep it fixed to a platform or rail. A plane could work, but the idea is the vehicle is still fixed to the (possibly an existing) rail but not supporting by it.
Another way to ask, is how much would a very large cruise missile shaped vehicle benefit from using ground effect (possibly using curved surface area to follow the contour of the vehicle) verses not? How sturdy would that rail need to be?

REPLY [1 votes]: In ground effect, the moving vehicle is going so fast and is so close to the ground that it is riding on a bubble of air that is trapped between the vehicle and the ground. The ground is still supporting its weight, through the action of the compressed air in between the vehicle and the ground.
It takes less work to move a vehicle through the air when it is flying in ground effect, and there are vehicles which have been designed to take advantage of this. But the smaller a vehicle (like for example an airplane) is, the closer it needs to get to the ground to enter ground effect (the rule of thumb is one wingspan or less), and for a cruise missile it would fly into the trees before it could get close enough.
Since cruise missiles are subsonic and leave a big thermal exhaust plume, they would also be easily shot down if they were trying to cash in on ground effect while on their way to blow up their target.