If $A$ is normal and $A$ and $B$ commute, then $A^*$ and $B$ commute Let $A$ is a normal matrix: $A^*\! A = A A^*\!\!$,$\,$ and $AB = BA$. Prove that $A^*\!B=BA^*\!\!$.

I can prove that if $\det A\ne 0$ by multiplication $AB=BA$ by $A^*$ left and right and using some manipulation. But I have no idea what to do if $\det A = 0$.

Hint: If $A$ is normal then $A^*$ is a polynomial in $A$.

$\bf{Added:}$

Since $A$ is normal there exists $U$ a unitary matrix so that $A = U D U^*$ ( $A$ is unitarily diagonalizable), and so $A^* = U \bar D U^*$. Let $\lambda_k$ be the eigenvalues of $A$ ( the diagonal of $D$). Take $P$ a polynomial with complex coefficients so that $$P(\lambda_k) = \bar \lambda_k$$ Check that $P(A) = A^*$

In fact, if $|A|\neq 0$, then we can find a sequence $A_n$ such that $\lim_{n\rightarrow \infty}A_n=A$ and every term $A_n$ is inverse, that is, $|A_n|\neq 0$.


Combinatorics and Derangements Determine the number of permutations of $\{1, 2, \dots, n\}$ in which no odd integer is in its natural position.

I'm having a hard time generalizing this situation for $\{1, 2, \dots, n\}$

When there is a finite set, for example $\{1, 2, \dots, 6\}$, I know that I will have
$$6!-\binom{3}{1}5!+\binom{3}{2}4!-\binom{3}{3}3!$$

Any advice of how to generalize this situation?

Would it be something like
$$\sum_{k=0} (-1)^k \binom{n/2}{k+1} (n-1)!$$

Consider arranging the odd integers of the given sequence (1,3,5,7,9,............,n-1 or n) in n spaces, such that none of them occupies the same position as thier numerical value (i.e., 1 doesn't stay in the first position, or 3 in the third, and so on.)

You'll have to choose a position for (1) from n positions other than the first position. This can be done in n-1 ways.

Similarly, (3) can be anywhere other than in the third position or the chosen position for (1).There are n-2 ways of assigning a position to (3).
There are n/2 odd numbers in the sequence if n is even and n+1/2 odd numbers if n is odd.

Having placed all but the last (odd) number,

1)if n is odd, there are n-1/2 ways to place the last number.
Hence, there are (n-1)!/(n-3/2)! ways to arrange the odd integers.
So, there are (n-1/2)!.(n-1)!/(n-3/2)! ways of permutating all the numbers in the sequence 1,2,3,.....n (since there will be n-1/2 even numbers).

2)if n is even, there are n/2 ways to place the last odd number.
So, there are (n-1)!/(n-2/2)! ways of arranging the odd numbers and (n/2)!.(n-1)!/(n-2/2)! total ways of permutating all the numbers in the sequence.


Question about KKT conditions and strong duality I am confused about the KKT conditions. I have seen similar questions asked here, but I think none of the questions/answers cleared up my confusion.

In Boyd and Vandenberghe's Convex Optimization [Sec 5.5.3] , KKT is explained in the following way.

I-For any differentiable (potentially non-convex) problem:
If strong duality holds, then any primal/dual (global) optimal pair must satisfy the KKT conditions (i.e., gradient of Lagrangian must vanish, points must be primal/dual feasible, and they must satisfy complementary slackness).

II-For convex problems:
If the problem is convex, then (a) any (primal/dual) points that satisfy the KTT conditions (same as above) are (global) primal/dual optimal pairs and (b) strong duality holds.

Using I and II, Boyd and Vandenberghe conclude that for convex problems that satisfy the Slater's condition (hence strong duality holds), KKT conditions are both necessary and sufficient for (global) primal/dual optimality.

Now in traditional Nonlinear Programming textbooks, the same KKT conditions are presented as first-order necessary condition for local optimality for any (differentiable, but potentially non-convex) problem. In those references, there is no discussion of dual points (instead, we treat them as Lagrange multipliers) or  strong duality: (III) for any regular locally optimal (primal) point, there must exist Lagrange multipliers such that jointly they satisfy the KKT conditions (same as above).

I have three related questions:

(Q1) does III imply that the strong duality requirement in I was unnecessary? (edit: I realized that III is a necessary condition for regular local optima - but still, it would be great to hear about the relation between I and III)

(Q2) What can be said in general about the KKT conditions in differentiable nonlinear programs that do not satisfy strong duality?

(Q3) Consider a general nonlinear program (primal) with differentiable cost and constraints where strong duality does not hold. Now imagine I have found all KKT pairs for the primal. The Lagrange multipliers in my KKT pairs are clearly feasible for the dual problem. But is it also guaranteed that every regular local optima of the dual problem appears in my KKT pairs of the primal?

My guess: I guess the answer to Q1 is negative - if strong duality does not hold, regular primal (global/local) optimal points must still satisfy the KKT conditions with some Lagrange multipliers that may not have anything to do with (optimal) dual points (?).

I think that your guess in (Q1) is correct.

Consider the following optimization problem:
\begin{align}
&\min_{x\in \mathbb{R}^n}\ f_0(x)\\
&\mathrm{s.t.}\ \ f_i(x) \le 0, \ i=1,2, \cdots,m\\
&\qquad h_j(x) = 0, \ j=1,2,\cdots, p
\end{align}
where $f_0$, $f_i, \forall i$ and $h_j, \forall j$ are all differentiable.
The KKT conditions are the following
\begin{align}
\nabla f_0(x^\ast) + \sum_{i=1}^m \lambda_i^\ast \nabla f_i(x^\ast) +
\sum_{j=1}^p \mu_j^\ast \nabla h_j(x^\ast) &= 0, \\
f_i(x^\ast) &\le 0, \ i = 1, 2, \cdots, m\\
h_j(x^\ast) &= 0, \ j=1, 2, \cdots, p\\
\lambda_i^\ast &\ge 0, \ i=1, 2, \cdots, m\\
\lambda_i^\ast f_i(x^\ast) &= 0, \ i = 1, 2, \cdots, m.
\end{align}

See: [1], and [2], page 356, Ch. 9.

1) If $x^\ast$ is locally optimal and $x^\ast$ is regular (regularity conditions,
or constraint qualifications), then there exists $(\lambda^\ast, \mu^\ast)$
such that the KKT conditions hold.

2) If strong duality holds, the KKT conditions are necessary optimality conditions:
if $x^\ast$ and $(\lambda^\ast, \mu^\ast)$ are primal and dual optimal,
then the KKT conditions hold.

3) For convex problems with strong duality (e.g., when Slater's condition is satisfied),
the KKT conditions are sufficient and necessary optimality conditions, i.e.,
$x^\ast$ and $(\lambda^\ast, \mu^\ast)$ are primal and dual optimal
if and only if the KKT conditions hold.

Reference

[1] https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions

[2] Chong-Yung Chi, Wei-Chiang Li, Chia-Hsiang Lin, "Convex Optimization for Signal Processing and Communications: From Fundamentals to Applications", 2017.

If strong duality does not hold, then we have no reason to believe there must exist Lagrange multipliers such that jointly they satisfy the KKT conditions. Here is an counter-example
${\bf counter-example 1}$
If one drops the convexity condition on objective function, then strong duality could fails even with relative interior condition.
The counter-example is the same as the following one.
${\bf counter-example 2}$
For non-convex problem where strong duality does not hold, primal-dual optimal pairs may not satisfy KKT condition.
Consider the optimization problem
\begin{align}
 \operatorname{minimize} & \quad e^{-x_1x_2} \\
 \text{subject to} & \quad x_1\le 0.
\end{align}
The domain for the problem is $D = \{ (x_1,x_2) \ge 0 \}$. The problem is not convex by calculating the Hessian matrix. Clearly, any $x_1 = 0, x_2 \in\mathbb R_+$ is a primal optimal solution with primal optimal value $1$ .
The Lagrangian is
$$
L(x_1,x_2,\lambda) = e^{-x_1x_2} + \lambda  x_1.
$$
The dual function is
\begin{align}
 G(\lambda) &= \inf L(x_1,x_2,\lambda) =
 \begin{cases}
  0&  \lambda\ge 0\\
  -\infty& \lambda < 0
 \end{cases}
\end{align}
Thus, $\lambda \geq 0$ is dual optimal solution with dual optimal value $0$, so dual gap is $1$, strong duality fails. As for the KKT conditions, remember the domain is $D = \{ (x_1,x_2) \ge 0 \}$
\begin{align*}
 &\lambda-x_2e^{-x_1x_2}=0\\
 &x_1\le 0\\
 &\lambda\ge 0\\
 &\lambda x_1=0\\
\end{align*}
Pick any primal-dual pair satisfying $x_1 = 0, x_2\ge 0, \lambda\ge0, \lambda\ne x_2$, the KKT conditions fail.
${\bf counter-example 3}$
For a non-convex problem, even strong duality holds, solutions for KKT conditions may not be primal-dual optimal solution.
Consider the optimization problem on $\mathbb R$
\begin{align}
 \operatorname{minimize} & \quad x^3 \\
 \text{subject to} & -x^3-1\le 0.
\end{align}
The objective function is not convex by calculating the Hessian matrix. Clearly, $x=-1$ is the unique primal optimal solution with primal optimal value $-1$.
The Lagrangian is
$$
L(x,\lambda) = x^3 - \lambda  (x^3+1).
$$
The dual function is
\begin{align}
 G(\lambda) &= \inf L(x,\lambda) =
 \begin{cases}
  -1&  \lambda=1\\
  -\infty& otherwise
 \end{cases}
\end{align}
Thus, $\lambda = 1 $ is dual optimal solution with dual optimal value $-1$, so dual gap is $0$, strong duality holds. While the KKT conditions are
\begin{align*}
 &3x^2(1-\lambda)=0\\
 &-x^3-1\le 0\\
 &\lambda\ge 0\\
 &\lambda (-x^3-1)=0\\
\end{align*}
Solutions for KKT conditions are $x=-1, \lambda=1$ or $x=0,\lambda=0$. Notice that $x=0,\lambda=0$ satisfies KKT conditions but has nothing to do with primal-dual optimal solutions.
The discussion indicates for non-convex problem, KKT conditions may be neither necessary nor sufficient conditions for primal-dual optimal solutions.
${\bf counter-example4}$
For a convex problem, even strong duality holds, there could be no solution for the KKT condition, thus no solution for Lagrangian multipliers.
Consider the optimization problem on domain $\mathbb R$
\begin{align}
 \operatorname{minimize} & \quad x \\
 \text{subject to} & \quad x^2\le 0.
\end{align}
Obviously, the problem is convex with unique primal optimal solution $x=0$ and optimal value $0$; Feasible set is $\{0\}$, therefore Slater's condition fails.
The Lagrangian is
$$
L(x,\lambda) = x + \lambda  x^2.
$$
The dual function is
\begin{align}
 G(\lambda) &= \inf L(x,\lambda) =
 \begin{cases}
  -\infty&  \lambda\le 0\\
  -\frac{1}{4\lambda} &\lambda >0
 \end{cases}
\end{align}
Thus, dual optimal value is $0$, so dual gap is $0$, strong duality holds. However, there are no solution for dual optimal solution because the optimal value is attained as $\lambda\rightarrow \infty$. As for the KKT conditions
\begin{align*}
 &1+2\lambda x=0\\
 &x^2\le 0\\
 &\lambda\ge 0\\
 &\lambda x^2=0\\
\end{align*}
No solution for KKT conditions.
This is the convex problem where the dual problem has no feasible solution and KKT conditions have no solution but the primal problem is simple to solve.
${\bf counter-example 5}$
For a differentiable convex problem, there could be no solution for the KKT conditions, even if the primal-dual pair exists. In that case, the strong duality fails.
Consider the optimization problem on domain $D:=\{(x,y):y>0\}$
\begin{align}
 \operatorname{minimize} & \quad e^{-x} \\
 \text{subject to} & \quad \frac{x^2}{y}\le 0.
\end{align}
The problem can be proved to be convex with primal optimal solution $x=0, y>0$ and optimal value $1$; Feasible set is $\{(0,y): y > 0\}$, therefore Slater's condition fails.
The Lagrangian is
$$
L(x,y,\lambda) = e^{-x} + \lambda  \frac{x^2}{y}.
$$
After some careful calculation, the dual function is
\begin{align}
 G(\lambda) &= \inf L(x,y,\lambda) =
 \begin{cases}
  0&  \lambda\ge 0\\
  -\infty &\lambda <0
 \end{cases}
\end{align}
Thus, dual optimal value is $0$, so dual gap is $1$, strong duality fails. We can pick primal-dual pair to be $x=0, y=1, \lambda=2$. As for the KKT conditions
\begin{align*}
 &-e^{-x}+\frac{2\lambda x}{y}=0\\
 &\frac{x^2}{y}\le0\\
 &\lambda\ge 0\\
 &\lambda \frac{x^2}{y}=0\\
\end{align*}
with $y>0$, thus no solution for KKT conditions.
This counter-example warns us that we have to be careful about the strong duality condition even for differentiable convex problems.


Looking for the best way to find Pythagorean triples where $B-A=\pm1$. Pythagorean triples where $A-B=\pm1$ are some of the rarest; the $19^{th}$ has terms $A,B,C$ in the quadrillions. I found a formula in a book, "Pythagorean Triangles" that generates them in sequence beginning with a seed triple $T_1=(3,4,5)$: $A=3A+2C+1\quad B=3A+2C+2\quad C=4A+3C+2$ will generate $T_2=(20,21,29)\quad T_3=(119,120,169)\quad T_4=(697,696,985)$ and so on. Nineteen iterations gives you the first $19$ triples and that is great but I developed a formula which uses less computation until you get to the $n^{th}$ triple you want to view. It generates the parameters $(m,n)$ to feed Euclid's formula:$$A=m^2-n^2\quad B=2mn\quad C=m^2+n^2$$

The formula is $\quad m_{x+1}=2m_x+n_x\quad n_{x+1}=m_x\quad $ and generates the following pairs with a seed: $P_0=(1,0)$. $$P_1=(2,1)\quad P_2=(5,2)\quad P_3=(12,5)\quad P_4=(29,12)\quad P_5=(70,29)\quad P_6=(169,70)\quad ...$$

I would like to be able to generate the $6^{th}$ or the $1000^{th}$ pair directly without generating $1$-thru-$5$ or $1$-thru-$999$ to get there but I haven't been able to figure out any way to generate an individual pair directly. I have tried $2=2^1, 5=2^2+2^1, 12=2^3+2^2, hmm, 29=2^4+2^3+2^2+2^1+2^0 $ and other things like factors of $2,5,12,29...$ and I'm out of ideas.

Is it possible to generate an $x^{th}$ member pair using just $x$ as an input number or, by the nature of this sequence, is it required to generate all of them in order until I get to the desired pair?

Someone said my formula does not work but here it is working in a spreadsheet.

The computation of the Pythagorean triples of the form $T_n=(a_n,a_n+1,c_n)$ is equivalent to the computation of some convergents of the continued fraction of $\sqrt{2}$: in particular
$$ [1;\underbrace{2,2,\ldots,2,2}_{2n\text{ times}}]=\frac{2a_n+1}{c_n} $$
where
$$ c_n = \frac{(1+\sqrt{2})^{2n+1}-(1-\sqrt{2})^{2n+1}}{2\sqrt{2}},\qquad 2a_n+1 =\frac{(1+\sqrt{2})^{2n+1}+(1-\sqrt{2})^{2n+1}}{2}=d_n $$
both fulfill the recurrence $\ell_{n+2}=6\ell_{n+1}-\ell_n$. They can be expressed in terms of $D_n$ and $D_{n+1}$, where
$$ D_n = (3+2\sqrt{2})^n+(3-2\sqrt{2})^n =\sigma^n+{\bar{\sigma}}^n$$
is the trace of the $n$-th power of a $2\times 2$ matrix. This sequence fulfills

$$ D_{2n} = D_n^2-2,\qquad D_{2n+1}=D_n D_{n+1}-6 \tag{R}$$
so the couple $(D_n,D_{n+1})$ can be computed by a repeat-squaring algorithm. A concrete example will hopefully clarify how. Let us assume to want to compute $D_{23}$ and $D_{24}$. The binary representation of $23$ is $10111_2$, so we compute the couples $(D_m,D_{m+1})$ for $m=1_2,10_2,101_2,1011_2$ and finally $10111_2$ via $(R)$.
$$ (D_1,D_2)=(6,34) $$
$$ (D_2,D_3)= (34,198)$$
$$ (D_5,D_6)=(6726,39202) $$
$$ (D_{11},D_{12})=(263672646,15367968024) $$
$$ (D_{23},D_{24})=(405211279147678086,2361744410637427202)$$
This gives us $c_{23}$ and $d_{23}$, thus $T_{23}$, with no more than $3\log_2(23)$ multiplications.

Edited answer...

which starts with a comment.

The title Looking for the best way to find Pythagorean triples where $B−A=\pm1$ is possibly misleading for the actual question, which after many comments can be extracted only from the fact that the initial answer for the $(A,C)$ recursion (remained in the sequel) is not the wanted answer. Please always make clear in the OP which is the question (without alternatives, best stated as question, not as a wish).

The OP gives two ways to construct Pythagorean triples, one is "from a book" and constructs triples $T_x=(A_x,B_x,C_x)$ recursively, the other one comes from a formula, it constructs intermediate pairs $P_x=(m_x,n_x)$ given by an other recursion, that may be used to reconstruct $(A_x,B_x,C_x)$. As i extract  the information from the comments, we need only the $P_x$ (despite of the title, and the initial digression / divagation on triples). OK, this is even simpler.

We have the linear recursion formula for the pair written as column vector
$$
\begin{aligned}
\begin{bmatrix}
m_{x+1}\\
n_{x+1}
\end{bmatrix}
&=
\begin{bmatrix}
2&1\\1&0
\end{bmatrix}
\begin{bmatrix}
m_{x}\\
n_{x}
\end{bmatrix}
\\
&=
\underbrace{
\begin{bmatrix}
1+\sqrt 2&1-\sqrt 2\\1&1
\end{bmatrix}}_C
\underbrace{
\begin{bmatrix}
1+\sqrt 2&\\&1-\sqrt 2
\end{bmatrix}}_D
\underbrace{
\frac 1{2\sqrt 2}
\begin{bmatrix}
1 &\sqrt 2-1\\-1&\sqrt 2+1
\end{bmatrix}}_{C^{-1}}
\begin{bmatrix}
m_{x}\\
n_{x}
\end{bmatrix}
\ ,
\end{aligned}
$$
with a diagonal matrix $D$ above. The powers of
$\begin{bmatrix}2&1\\1&0\end{bmatrix}$ are not immediate, but the powers of $D$ are.
We get directly for your pairs formula the explicit version with proof:
$$
\begin{aligned}
\begin{bmatrix}
m_x\\n_x
\end{bmatrix}
&=
(CDC^{-1})^x\begin{bmatrix}m_0\\n_0\end{bmatrix}
=
CD^xC^{-1}\begin{bmatrix}1\\0\end{bmatrix}
\\[2mm]
&=
\frac 1{2\sqrt 2}
\begin{bmatrix}
1+\sqrt 2&1-\sqrt 2\\1&1
\end{bmatrix}
\begin{bmatrix}
(1+\sqrt 2)^x&\\&(1-\sqrt 2)^x
\end{bmatrix}
\begin{bmatrix}
1 &\sqrt 2-1\\-1&\sqrt 2+1
\end{bmatrix}
\begin{bmatrix}1\\0
\end{bmatrix}
\\[2mm]
&=
\frac 1{2\sqrt 2}
\begin{bmatrix}
(1+\sqrt 2)^{x+1} & (1-\sqrt 2)^{x+1}\\
(1+\sqrt 2)^{x  } & (1-\sqrt 2)^{x  }
\end{bmatrix}
\begin{bmatrix}
1 &\sqrt 2-1\\-1&\sqrt 2+1
\end{bmatrix}
\begin{bmatrix}1\\0
\end{bmatrix}
\\[2mm]
&=
\frac 1{2\sqrt 2}
\begin{bmatrix}
(1+\sqrt 2)^{x+1} - (1-\sqrt 2)^{x+1} & ? \\
(1+\sqrt 2)^{x  } - (1-\sqrt 2)^{x  } & ?
\end{bmatrix}
\begin{bmatrix}1\\0
\end{bmatrix}
\\[2mm]
&=
\frac 1{2\sqrt 2}
\begin{bmatrix}
(1+\sqrt 2)^{x+1} - (1-\sqrt 2)^{x+1}  \\
(1+\sqrt 2)^{x  } - (1-\sqrt 2)^{x  }
\end{bmatrix}
\ ,
\end{aligned}
$$
which gives $\displaystyle n_x=\frac 1{2\sqrt 2}\Big(\ (1+\sqrt 2)^{x  } - (1-\sqrt 2)^{x  }\ \Big)$.

$\square$

In particular, for $x>0$ we can compute $n_x$ by rounding to an integer the number $\displaystyle n_x=\frac 1{2\sqrt 2} (1+\sqrt 2)^x$. For instance, for $x=7$ we obtain $168.99926035179\dots$ and after rounding we get $n_7=169$.

Older answer for the explicit form of the $(A,C)$ recursion:

You may try to write explicitly the recursion formula as passing from one pair $(A,C)$ to the next pair $(A',C')$ in the form:
$$
\begin{aligned}
\begin{bmatrix}
A'\\C'\\1
\end{bmatrix}
&=
\underbrace{
\begin{bmatrix}
3&2&1\\4&3&2\\0&0&1
\end{bmatrix}}_{=:T}
\begin{bmatrix}
A\\C\\1
\end{bmatrix}
\ ,
\\
&\qquad\text{ extracted from the mentioned passage}
\\
A' &=3A+2C+1\ ,\\
C' &=4A+3C+2\ ,
\end{aligned}
$$
thus introducing a matrix $T$. Its charactristic polynomial is $(x - 1)  (x^2 - 6x + 1)$, so we have the following diagonalization over $\Bbb Q(a)$ with $a=\sqrt 2$. We expect a diagonal matrix with diagonal entries corresponding to the roots of the above characteristic polynomial, they are $1$ and $3\pm 2\sqrt 2$. Computer aided typing:

sage: K.<a> = QuadraticField(2)
sage: a^2
2
sage: T = matrix( K, 3,3, [3,2,1, 4,3,2, 0,0,1] )
sage: T
[3 2 1]
[4 3 2]
[0 0 1]
sage: D, change = T.jordan_form(transformation=True)
sage: D
[ 2*a + 3|       0|       0]
[--------+--------+--------]
[       0|       1|       0]
[--------+--------+--------]
[       0|       0|-2*a + 3]
sage: change
[ 1  1  1]
[ a  0 -a]
[ 0 -2  0]
sage: change * D * change^-1 == T
True

Later edit: Let us use, and type explicitly the obtained formula for $T$, and thus also for the powers of $T$. Below, $S$ is the base change matrix.
$$
\begin{aligned}
T
&=
\underbrace{
\begin{bmatrix}
1&1&1\\
a&0&-a\\
0&-2&0
\end{bmatrix}}_S
\begin{bmatrix}
3+2a&&\\
&1&\\
&&3-2a
\end{bmatrix}
\underbrace{
\frac 14
\begin{bmatrix}
2 & a & 1\\
0&0&-2\\
2&-a&1
\end{bmatrix}}_{S^{-1}}
\\
T^n
&=
\frac 14
\begin{bmatrix}
1&1&1\\
a&0&-a\\
0&-2&0
\end{bmatrix}
\begin{bmatrix}
(3+2a)^n&&\\
&1&\\
&&(3-2a)^n
\end{bmatrix}
\begin{bmatrix}
2 & a & 1\\
0&0&-2\\
2&-a&1
\end{bmatrix}
\\[3mm]
&\qquad\text{ Above }a=\sqrt 2\ .
\\
&\qquad\text{ This gives an }\color{blue}{\text{explicit formula}:}
\\[3mm]
\color{blue}{
\begin{bmatrix}
A_n\\ C_n\\ 1
\end{bmatrix}}
&=
T^n
\begin{bmatrix}
A_0\\ C_0\\ 1
\end{bmatrix}
=
T^n
\begin{bmatrix}
0\\ 1\\ 1
\end{bmatrix}
\\
&=
\color{blue}{
\frac 14
\begin{bmatrix}
1&1&1\\
a&0&-a\\
0&-2&0
\end{bmatrix}
\begin{bmatrix}
(3+2a)^n&&\\
&1&\\
&&(3-2a)^n
\end{bmatrix}
\begin{bmatrix}
2 & a & 1\\
0&0&-2\\
2&-a&1
\end{bmatrix}
\begin{bmatrix}
0\\ 1\\ 1
\end{bmatrix}}\ .
\end{aligned}
$$

$\square$

Please stop reading here if computer experiments are not welcome. (I posted this since the shape of the OP also has similar collection of data. It is often for me a check, and in this case it may be helpful for some readers, too.)

Example of an explicit computation:

To compute -say- the $15$.th term (or so) we already have $D^{15}$, so compute with sage the product:
$$
\frac 14
\begin{bmatrix}
1&1&1\\
a&0&-a\\
0&-2&0
\end{bmatrix}
\begin{bmatrix}
(3+2a)^{15}&&\\
&1&\\
&&(3-2a)^{15}
\end{bmatrix}
\begin{bmatrix}
2 & a & 1\\
0&0&-2\\
2&-a&1
\end{bmatrix}
\begin{bmatrix}
0\\1\\1
\end{bmatrix}
\ ,
$$
and we get:

sage: Z = matrix(3, 1, [0,1,1])    # initial solution, A=0, C=1
sage: change * D^15 * change^-1 * Z
[183648021599]
[259717522849]
[           1]
sage: A15, C15 = 183648021599, 259717522849
sage: B15 = A15 + 1
sage: A15^2 + B15^2 == C15^2
True

This is the kind of direct computation needed. (The diagonal matrix $D$ has diagonal entries $1$, and $3\pm 2\sqrt 2$, so the only involved involved computation is the one of the powers of these diagonal entries.)


How to solve card related combination problem A deck of cards has 4 suits: diamonds, hearts, clubs, and spades. The suits of diamonds and hearts are both red and the suits of clubs and spades are both black. Each suit has the following denominations: Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, and King. The Jacks, Queens and Kings are also called face cards.

Question: In how many ways 2 cards can be drawn such that one card is from red face cards and the other is a black card.

I know this is a combination problem, and I have tried solving it by taking (26!/1!(26-1)!) * (26!/1!(26-1)!). My main concern is whether or not I have to account for whether 2 black cards can be drawn with 0 red cards or 0 black cards drawn with 2 red cards. Thank you for any advice.

No you don't need to take cases 0 red, 2 black and 2 red, 0 black. As from question it is cleared that we need 1 black and 1 red face card.

If the order doesn't matter (drawing the red face after or before the black card is the same) then you have

$$\dfrac{(\text{total of red faces})\times (\text{total black cards})}{2} $$

where the 2 comes from the fact that the order doesn't matter. There are 52 cards, 26 of each color and 3 faces every suit, therefore 6 faces of each color. Hence, the numbers are:

$$\dfrac{6 \times 26}{2} = 78 $$


The tangent bundle $TS^n$ is diffeomorphic the $S^n \times \mathbb{R}^n$? The tangent bundle $TS^n$ is diffeomorphic the $S^n \times \mathbb{R}^n$?

Comments: I was able to show that $TS^1$ is diffeomorphic the $S^1 \times \mathbb{R}$. For the case $n=2$, I believe it is not true, but I do not know how to justify it.


Eilenberg-Maclane space, when can $K(\pi, 1)$ be constructed as a compact manifold? See here.

  Let $\pi$ be any group. Construct a connected CW complex $K(\pi, 1)$ such that $\pi_1(K(\pi, 1)) = \pi$ and $\pi_q(K(\pi, 1)) = 0$ for $q \neq 1$.

It is rarely the case that $K(\pi, 1)$ can be constructed as a compact manifold. What is a necessary condition on $\pi$ for this to happen?

$\pi$ has to be torsions free:

Let $M$ be a compact aspherical manifold and $C$ a finite cyclic subgroup of its fundamental group. As $M$ is aspherical, its universal covering $\tilde{M}$ is contractible, so the quotient $\tilde{M}/C$ provides a finite dimensional model for the classifying space $BC$ of $C$. In particular, $C$ has nonzero homology groups only in finitely many degrees. This implies that $C$ is trivial.

If $\pi$ acts freely and properly on $R^n$ and the quotient is compact. Example $\pi=Z^n$ $K(Z^n,1)$ is the n-dimensional torus.


Proof that a Hermitian Matrix has orthogonal eigenvectors, real eigenvalues Here's my feeble attempt:

A = A* is the condition for a Hermitian matrix. So I try expanding both sides in terms of their SVD:

A = USV* and A* = (USV*)* = ... = VSU*

So equating I get:

VSU* = USV*

Now maybe through this I can conclude something about how V and U relate to each other but I don't know how...

Thanks for any help.

The process is fairly straightforward given the fact that any square matrix has at least one eigenvalue and eigenvector.

Suppose $Ax = \lambda x$. Then $\langle x , Ax \rangle = \langle Ax , x \rangle = \overline{\langle x , Ax \rangle} = \lambda \|x\|^2$, hence $\lambda \in \mathbb{R}$.

The point about being Hermitian is that if $x$ is an eigenvector of $A$, then both $\text{sp} \{x\}$ and the subspace $\{x\}^\bot$ are invariant under $A$. To see the latter, suppose $v \bot x$, then $\langle x , Av \rangle = \langle Ax , v \rangle = \lambda \langle x , v \rangle = 0$, hence $A v \bot x$. Now let $v_k$ be a basis for $\{x\}^\bot$, then in the basis $x, v_1,...,v_k$, $A$ must have a block diagonal form:
$$ A \sim \begin{bmatrix} \lambda & \\ & \tilde{A}\end{bmatrix}$$
(By $\sim$ I mean that the two matrices are similar.)
Now find an eigenvalue of $\tilde{A}$ (which must also be Hermitian) and repeat the process until $A$ is diagonalized.

Use the eigenvalue decomposition of the hermitian matrix $A$.

$A=S \Lambda S^{-1}$

$ A^H = (S \Lambda S^{-1})^{H} $

$ A^H = ( S^{-1})^{H} \Lambda^H S^H$

Since all eigenvalues for a hermitian matrix are real, $\Lambda = \Lambda^H$, and since $A$ is hermitian we have

$S \Lambda S^{-1} =  ( S^{-1})^{H} \Lambda S^H$

This shows $S^{-1}=S^H$ implying $SS^H=I$ as required.


Card doubling paradox Suppose there are two face down cards each with a positive real number and with one twice the other. Each card has value equal to its number. You are given one of the cards (with value $x$) and after you have seen it, the dealer offers you an opportunity to swap without anyone having looked at the other card.

If you choose to swap, your expected value should be the same, as you still have a $50\%$ chance of getting the higher card and $50\%$ of getting the lower card.

However, the other card has a $50\%$ chance of being $0.5x$ and a $50\%$ chance of being $2x$. If we keep the card, our expected value is $x$, while if we swap it, then our expected value is:
$$0.5(0.5x)+0.5(2x)=1.25x$$
so it seems like it is better to swap. Can anyone explain this apparent contradiction?

This paradox has always interested me.  Something to think about is that there does not exist a uniform probability distribution over the positive real numbers (since they are infinite).  In arriving at your paradox, it seems you are assuming that any real number is equally likely, but this cannot be the case.

I know this question was asked a very long time ago, but I would like to share my response nonetheless, because it seems to me that there is an issue with the problem statement itself, and that clarifying this issue would resolve the paradox that is posed here.

The issue is with you stating that it "seems like it would be better to swap." What do you mean by better?

Suppose that by better you mean that the goal of this game is to have the card with greater value at the end of each turn. Say you score 1 point each time this happens, and get 0 points otherwise. Then the expected value associated with the cards is 1 for the winning card and 0 for the losing card -- it has nothing to do with the specific values of the cards. In that case, the overall expected value is 0.5 * 0 + 0.5 * 1 = 0.5 for staying and 0.5 * 0 + 0.5 * 1 = 0.5 for swapping; i.e., the same value, as you'd expect.

Now suppose, as I think is implied in the original problem statement, that by better you mean that the goal of the game is to have the card with greater value at the end of each turn, and that points are awarded to each player equal to the value of their card at the end of the turn, and the player with the most points after a set number of turns wins.

In that case the expected values for staying and swapping are, in fact, as you say, and there is no paradox here. Suppose for the sake of argument that you drew the number 4 on every turn, and that there's a 50% chance that the second card is a 2 and a 50% chance that the second card is an 8. Then your expected value is 1 * 4 = 4 for staying and 0.5 * 2 + 0.5 * 8 = 5 for swapping, and 5/4 = 1.25. But this is exactly correct: over the course of, say, 2 turns, swapping twice might get you a 2 once and an 8 once (for a total of 10), while staying twice would get you a 4 twice (for a total of 8), and 10/8 = 1.25 as expected. The reason why swapping is better is that the 50% chance of doubling your number outweighs the 50% chance of halving your number. In the case of our example, 2 is only worth 2 points less than 4, while 8 is worth 4 more points than 4, which means that you could get an 8 once every 3 turns and a 2 the other 2 turns when swapping and have the same number of points as your opponent (who would have 4 for all 3 turns), while in actuality you should get an 8 once every 2 turns.

So, there's your answer (I think -- I could be wrong). In your original problem statement, you say

  If you choose to swap, your expected value should be the same, as you still have a 50% chance of getting the higher card and 50% of getting the lower card.

but this is under the assumption that the only "valuable" occurrence in the game is having  a card that has a higher value than the other (i.e., the first case I mentioned), whereas when you actually do your expected value calculation for swapping, you switch to the assumption that a card is just as valuable as the number it has on it (i.e., the second case I talked about). In other words, everything that you have said in your post is literally true, but given different assumptions, which is why a paradox seems to arise when there is none.


Is convex subdifferential always non-empty? Let $f:X\to \mathbb{R}\cup\{+\infty\}$ be a proper, convex and l.s.c. function on a Banach space $X$. The mapping $\partial f:X\to 2^{X^*}$ defined by
$$\partial f(x)=\{x^*\in X^*: (x^*, v-x)\le f(v)-f(x)\,\,\mbox{for all}\, v\in X\}$$
is called the convex subdifferential of $f$. I was thinking: what if $f(x_0)=\infty$? Since $f$ is proper, then there exists at least one element $v\in X$ such that $f(v)\neq\infty$. It follows that $x^*=-\infty$ for all $x\in X$ if I consider $\partial f(x_{0})$. Does it have any sense? Natural question emerges: is always $\partial f\neq\emptyset$?

It might be easier to consider the real case $X = \mathbb R$ first. Then, if $f(x_0) = \infty$ and $f(v) < \infty$, you never have
$$\mathbb R \ni (x^*, v - x_0) \le f(v) - f(x_0) = -\infty,$$
hence $\partial f(x_0) = \emptyset$.

Even if $f(x_0) \in \mathbb R$, the subdifferential might be empty, consider
$f(x) = -\sqrt{1-x^2}$ for $x \in [-1,1]$ and $f(x) = +\infty$ otherwise, at the points $x = \pm 1$.

Let assume $X$ be Banch.

Yes. always $\partial f\neq\emptyset$ !

Since epi$(f)$ is closed, nonempty, convex subset of $X \times R$. Therefore based bishop-phelps theorem supporting point on its boundary.

Note that This is a partial answer you must elaborate it.


If $T: X\to Y$ is a bijective closed linear operator, show that $T^{-1}$ is bounded. Let $X$ and $Y$ be normed spaces and $X$ compact.  If $T: X\to Y$ is a bijective closed linear operator, show that $T^{-1}$ is bounded.

I don't know where to start here. Any help would be appreciated.

To show that $T^{-1}$ is bounded it is enough to show that $T^{-1}$ is continuous.

Now $T^{-1}:Y\to X$

Select a closed set $C\subseteq X$ then since $C$ is closed hence it is compact .

Since $T$ is a closed linear operator so image of a compact set under $T$ is closed.

Hence $(T^{-1})^{-1}(C)=T(C)$ is closed .

Select a compact set $C \subset X$ (which is closed and bounded). Therefore the preimage of $T^{-1}$ is also compact because $(T^{-1})^{-1}(C) = T(C) \subset Y$. Why? Because the preimage of $T$, $T^{-1}T(C) = C$ since $T$ is bijective, so the set $(T^{-1})^{-1}(C)$ is also compact (which is closed and bounded) meaning $T^{-1}$ is continuous, so $T^{-1}$ must be bounded.

I think there is a better argument where you can use the definition of being a closed linear operator, get continuity out of that, and then apply compactness to this.


Finding Grandma's Car - a word problem This word problem came up in a lunchtime discussion with coworkers.  None of us are professional mathematicians or teachers of math, and we weren't sure how to get the answer.  The word problem goes like this:

Grandma Q drove her car downtown to do some shopping and parked it at a random spot on the street.  While shopping she forgot where she parked and called me on her cell phone asking how to find her car.

The downtown is a 10x10 set of square city blocks in a regular grid pattern.  The car could be on any one of the streets of this grid, including the outside edges, between two intersections.

Grandma Q can see both sides of the street so she only has to walk one time between any two intersections to search for her car.  However she can only see cars on the street she is on between the two intersections she is walking (i.e. she can't look down to the next block or from an intersection to the four blocks it connects).

Because she is elderly and gets tired easily (but not while shopping apparently), I don't want to have her walk where she has already searched, and I want to get to the car as quickly as possible.

Is there a mathematical way to determine the most efficient (minimum time, minimum retracing) search pattern for Grandma Q?  Is there more than one solution?  Does it matter where she starts (center, edge, corner, random)?  Can the answer be scaled to any x-by-x square or x-by-y rectangle?

(we weren't sure which branch of math most effectively deals with this kind of problem, so if someone could tell me, that would be great too.)

Thank you!

The problem is equivalent to the traveling salesman problem. We can visualize this with a 3x3 version:

Here the intersections are circles and are connected by a line. Draw something like the dual of the graph, i.e. on each edge place a new vertex (marked by an X) and connect those vertices if you could get from one street to another (blue line). Your problem really isn't about the intersections (circles), but about streets themselves (x's).

Each blue line has a weight, the cost of going from one street to another. On a uniform city block all the weights are unity. We now have the traveling salesman problem since we want to find the shortest route that visits every (X) vertex at least once.

In general this problem is NP-complete, meaning it is (probably) quite difficult to solve exactly. However, our graph has symmetry and structure that may be worth exploiting. There are also approximate algorithms that do good job much more quickly. In addition, the computational cost might be worth if Grandma gets lost in the same city all since the underlying graph (and hence the solution) would be the same.

Since the problem boils down to performing a fast search, I would consider this a computer science problem. You can think of the cars as being values stored in nodes of a graph, and you are looking for a path that stumbles near a node with the requested value.

See for instance https://en.wikipedia.org/wiki/Graph_search_algorithm


Are terminating decimals dense in the reals? I have read that rationals are dense in the reals, but I've been curious if the terminating decimals are as well. Since, in applied math, all effectively "real" numbers are approximated with terminating decimals, I would expect the terminating decimals to have this property, and if not I'm curious why. Here I'm defining the terminating decimals like this:
$$D = \{\frac{m}{10^n} \in \mathbb{Q} : m \in \mathbb{Z} \wedge n \in \mathbb{N}_0\}$$.

Yes, they are.
First, think informally (and you do this, with your sentence beginning "since"). A set $X$ is dense iff every real number $r$ can be "well-approximated" by an element of $X$. For terminating decimals, this approximation amounts to simply ... truncating at a certain point! E.g. $\pi$ is the limit of the sequence $$3.0000..., 3.1000..., 3.1400..., ...$$ of reals with terminating decimal expansions.

OK, now we need to make this rigorous. Fix reals $a<b$.

First, show that there is some $n$ such that $10^{-n}<b-a$. (This is actually the most substantial step, but at the same time may be the intuitively clearest one.)

Let $X=\{z\cdot 10^{-n}: z\in\mathbb{Z}\}$. Show that $X\cap (-\infty,a]$ has a greatest element - that is, there is a largest "$n$-place decimal" which is $\le a$.

It may be easiest to first assume $a>0$ here.

Calling that number "$\alpha$," what can you say about $\alpha+10^{-n}$?

Note that this works for any base, not just $10$.

Suppose $a$ and $b$ are terminating decimals. We will find a terminating decimal that lies between them, namely  $\frac{a+b}2$.  For example, between $1.7$ and $0.0001$ is $\frac{1.7+0.0001}2 = 0.850005$.
First, as you said, write $$a=\frac A{10^i}, b=\frac B{10^j}.$$
Without loss of generality, $i\le j$. Then write $$a=\frac{A\cdot 10^{j-i}}{10^j}.$$
Now $$\frac{a+b}2=   \frac{A\cdot10^{j-i} + B}{2\cdot 10^j} =
 \frac{5A\cdot 10^{j-i} + 5B}{10^{j+1}} $$
is a terminating decimal between $a$ and $b$.


How do I work out an unknown probability? (Sorry if I'm not specific enough details in main body) There are two blue beads and x red beads in a box. The probability that two random beads taken at random from the box are both red is 15/22, how do I work out x?

Hint:

There are $x+2$ beads total, hence the probability of selecting a red bead first is $\frac{x}{x+2}$

What will the probability of selecting another red bead after this be?

The probability of picking two red balls (by uniform picking) is:

$$p = \frac {x}{x+2} \times \frac {x-1}{x+1} = \frac {x^2 - x}{(x+2)(x+1)}.$$

You want this probability to equal $\frac {15}{22}$. Just make these two quantities equal and you find the following equation:

$$\begin{aligned}
15(x^2 + 3x + 2) &= 22(x^2-x) \\
7x^2 - 67x - 30 &= 0
\end{aligned}$$

Which gives you the (positive) solution $x = 10$.


Getting rid of the denominator of a polynomial I'm tutoring a high school precalculus student; our current topic is the roots of higher order polynomials.

The problem we're solving is:

Find a polynomial with the roots $\frac23$, -1, and $(3 + \sqrt{2}i)$

I started the solution by explaining that since one of the roots is a complex number, that root's complex conjugate must also be a root. So the polynomial (well, one of many possible answers) must be:

$(x-\frac 23)(x+1)(x-(3+\sqrt{2}i))(x-(3-\sqrt{i}))$

When I multiplied all these terms, I get:

$f(x) = x^4-5x^3+5x^2+11x- \frac 23x^3+ \frac{10}3x^2- \frac{10}3x- \frac {22}3$

Now, I put as the next step, "multiply all terms by 3 to get rid of the denominator."

This does in fact arrive at the correct answer:

$f(x)=3x^4-17x^3+25x^2+23x-22$

This solution matches the instructor's solution. What my college-educated brain can't figure out is: why does this work? I've got an equation and I'm multiplying everything on the right-hand side by 3 without doing the same to the left hand side. How does this maintain equality between the left and right hand sides of the equation?

I realize this is remedial math here; I've been doing this algebra for a while today and it's currently 1AM so hopefully I'm just overlooking something every high school kid knows because I'm cross eyed and tired. Still, if someone could point out the obvious, I'd be grateful.

They aren't the same function, so it's not correct to call them the same letter. However, the new polynomial will still have the exact same roots as the old polynomial, so it's one of the many other possible answers for the question.

It would be better to write $f(x) = x^4 - 5x^3 + ...$, and then define

$$g(x) = 3f(x) = 3x^4 - 17x^3 + ...$$

I know this is an old question, but since I'd found myself here, so too may others, so...

Your problem asks for "a" solution, not "the" solution.  As user61527 has said, your solutions really aren't the same function, but they are multiples of some function.  Since you are seeking an equation whilst knowing the zero points, every solution will equal zero so any multiple thereof will also equal zero.  Both your original solution (with fractions) and your simplified one are therefore correct and, while being different functions, satisfy the instructions to find "a" solution.


Average distance from any point within a square to its diagonal Given a square with a side length "s".
1) What is the average distance from any random point x,y within the square to the diagonal of the square?
2) if a circle with radius "r" is located at the center of the square, what is the average distance from any random point within the square to the circumference of the circle?

Thank you very much

For 1)

I'm not great at calculus but I have observed:
The average will be the same if you used a right angled triangle not an entire square.
And for a right angled triangle, the distance from the diagonal is equivalent when x+y is constant which I think really simplifies the problem.

The formula I derived was distance = (s - (x + y)) ÷ √2

Sorry I don't know how to insert math formulae.

This is the result I get from a reasonable double integral... I needed the general answer for a rectangle, which is below, where:
$w$ = rectangle width
$m$ = diagonal slope = (rectangle height / rectangle width)
For a square, $m = 1$. Hope this helps. If I get ambitious later I'll see if I can answer part two of this about the distance to the circumference of an inscribed circle.
$$ \frac13 \frac m{\sqrt{m^2+1}} w $$


Help with a natural deduction proof Does anyone have any idea how to prove this?

/[P ⊃ (Q ⊃ R)] ⊃ [(P ⊃ Q) ⊃ (P ⊃ R)]

So far I have

1' P ⊃ (Q ⊃ R)         AcP

 2' P ⊃ Q              AcP

  3' ~P                AIP

Thanks

Standard notation is "$\to$" for "implies" because "$\supset$" denotes "[strict] superset". Also, "$\neg$" is standard for "not".

If $P \to ( Q \to R )$:
  If $P \to Q$:
    If $P$:
      $Q \to R$.
      $Q$.
      $R$.
$\cdots$

I'll leave you to fill in the final steps and the justification for each step.

Here is a completed proof with justifications. The proof checker and an associated text are cited in the links below:

Kevin Klement's JavaScript/PHP Fitch-style natural deduction proof editor and checker http://proofs.openlogicproject.org/

P. D. Magnus, Tim Button with additions by J. Robert Loftis remixed and revised by Aaron Thomas-Bolduc, Richard Zach, forallx Calgary Remix: An Introduction to Formal Logic, Winter 2018. http://forallx.openlogicproject.org/


Finding the Transform matrix from 4 projected points (with Javascript) I'm working on a project using Chrome - JS and Webkit 3D CSS3 transform matrix.

The final goal is to create a tool for artistic projects using projectors and animation - somewhat far away from using maths...

I'm using a projector to projects several square over several shapes - as seen in the picture.

What I would like to do is for the user to draw 4 points on the screen (2D x and y) and from there extract a matrix object that I could apply to a regular DIV element of a dimension of 100 by 100px.

By finding scaleX, scaleY, rotation, rotationX, rotationZ and probably some perspective that i could apply to the div to relatively match the surface.

I'm not really familiar with geometry beyond sin and cos, and 3D in general and don't even know if that is something doable. If anyone could help me get started or point me in the right direction, I would greatly appreciate.

Here is a link an animated gif, hoping it makes it more clear to understand.

Computing a projective transformation

A projective transformation of the (projective) plane is uniquely defined by four projected points, unless three of them are collinear. Here is how you can obtain the $3\times 3$ transformation matrix of the projective transformation.

Step 1: Starting with the 4 positions in the source image, named $(x_1,y_1)$ through $(x_4,y_4)$, you solve the following system of linear equations:

$$\begin{pmatrix}
x_1 & x_2 & x_3 \\
y_1 & y_2 & y_3 \\
1 & 1 & 1
\end{pmatrix}\cdot
\begin{pmatrix}\lambda\\\mu\\\tau\end{pmatrix}=
\begin{pmatrix}x_4\\y_4\\1\end{pmatrix}$$

The colums form homogenous coordinates: one dimension more, created by adding a $1$ as the last entry. In subsequent steps, multiples of these vectors will be used to denote the same points. See the last step for an example of how to turn these back into two-dimensional coordinates.

Step 2: Scale the columns by the coefficients you just computed:

$$A=\left(\begin{array}{lll}
\lambda\cdot x_1 & \mu\cdot x_2 & \tau\cdot x_3 \\
\lambda\cdot y_1 & \mu\cdot y_2 & \tau\cdot y_3 \\
\lambda & \mu & \tau
\end{array}\right)$$

This matrix will map $(1,0,0)$ to a multiple of $(x_1,y_1,1)$, $(0,1,0)$ to a multiple of $(x_2,y_2,1)$, $(0,0,1)$ to a multiple of $(x_3,y_3,1)$ and $(1,1,1)$ to $(x_4,y_4,1)$. So it will map these four special vectors (called basis vectors in subsequent explanations) to the specified positions in the image.

Step 3: Repeat steps 1 and 2 for the corresponding positions in the destination image, in order to obtain a second matrix called $B$.

This is a map from basis vectors to destination positions.

Step 4: Invert $A$ to obtain $A^{-1}$ (or use the adjugate as discussed below).

$A$ maps from basis vectors to the source positions, so the inverse matrix maps in the reverse direction.

Step 5: Compute the combined Matrix $C = B\cdot A^{-1}$.

$A^{-1}$ maps from source positions to basis vectors, while $B$ maps from there to destination positions. So the combination maps source positions to destination positions. This is the matrix of the transformation you were requesting.

Step 6: To map a location $(x,y)$ from the source image to its corresponding location in the destination image, compute the product

$$\begin{pmatrix}x'\\y'\\z'\end{pmatrix} =
C\cdot\begin{pmatrix}x\\y\\1\end{pmatrix}$$

These are the homogenous coordinates of your transformed point.

Step 7: Compute the position in the destination image like this:

\begin{align*}
x'' &= \frac{x'}{z'} \\
y'' &= \frac{y'}{z'}
\end{align*}

This is called dehomogenization of the coordinate vector.

How to use this projective transformation with CSS

In general such a transformation will not be an affine transformation, so you cannot express this in terms of affine transformations like scaling, rotating and shearing, since these cannot express perspectivity. You might however try to simply set the first two entries of the last row to zero, so you get an affine transformation which might be close enough to your desired transformation.

If on the other hand you can use a matrix3d transformation, then you can take the 2D projective transformation matrix $C$ computed as described above, and use its entries to build a 3D projective transformation matrix like this:

$$\begin{pmatrix}
C_{1,1} & C_{1,2} & 0 & C_{1,3} \\
C_{2,1} & C_{2,2} & 0 & C_{2,3} \\
0 & 0 & 1 & 0 \\
C_{3,1} & C_{3,2} & 0 & C_{3,3}
\end{pmatrix}$$

This transformation will transform $x$ and $y$ coordinate as above, but leave the $z$ coordinates of the homogenous coordinate vectors alone. Dehomogenization might still change the value of the $z$ coordinate in space, but as you don't really care about these, this should be good enough.

I've written a proof-of-concept implementation. The user interface is pretty crude, but the math works well enough. The implementation there uses the adjugate matrix instead of the inverse, both in solving the linear equations in step 1 and for the reverse transform in step 4. The result differs only by a scalar factor, which is irrelevant for homogenous coordinates. The benefit is that this avoids computing a bunch of determinants and performing a bunch of divisions.

If you wanted to, you could play the same game for five points in 3D space, in order to compute the full spatial projective transformation matrix. But that only makes sense if you actually have depth, sice no four of the five points may be coplanar.

I could be wrong, but I believe the transform should be a projective transformation of the plane; i.e. a Möbius transform.

Any Möbius transform is completely determined by three points; the wikipedia link should give you enough information to obtain the transform.

Since you are asking the user to provide four points, it is possible that he could provide an impossible set of points. Ideally, the distortion is minor, and a reasonable strategy might be to compute all four possible transforms (there are four ways of selecting corners) and averaging them.

Another possibility is to try and correct the four endpoints, finding a small perturbation that has cross ratio 2, which (if I've calculated correctly) is the cross ratio of the default square with vertices 0, 1, 1+i, i. (All transformations of squares should have the same cross ratio!) Then use the transformation corresponding to the corrected endpoints.

Or you could only allow them to select 3 endpoints and fill in the fourth endpoint for them, and allow the user to adjust the corners until he's happy.


for $I = [0,1]$, is $I\times I$ convex in $\mathbb{R} \times \mathbb{R}$? for $I = [0,1]$, is $I \times I$ convex in $\mathbb{R} \times \mathbb{R}$?

The definition of convex seems to be that

  $Y \subset X$ is convex in $X$ if $\forall a < b $ in $Y$ whole of $(a,b)$ in $X$ lies in  $Y$.

For example, if I take $(1/3, 1/3) < (2/3,1/3)$ in $I \times I $ then, the rectangular strip in $\mathbb{R} \times \mathbb{R}$ $( (1/3, 1/3) , (2/3,1/3)$ is obviously not entirely in  $I \times I$.

So, this subset $I \times I$ of $\mathbb{R} \times \mathbb{R}$ is not convex.

Am I doing it correctly? I will really appreciate some help on the matter.

The set is convex. Take any two points $a$ and $b$ in the unit square, consider the line joining them $a+t(b-a)$ where $t\in[0,1]$, and check that the components of every point on the line lie in $[0,1]$.

Okay so after consultation with @mzp, I discovered that my question was not clear enough. I was considering dictionary order topology, which I didn't make clear in the question or discussion. In that case, I $\times$ I is not convex.

Thank you so much everyone. I really appreciate your inputs.


Finding a convex set that approaches a boundary point Let $K$ be a non-empty closed convex set in a real normed space $X$. Let $x_0$ be a boundary point of $K$ i.e. $x_0 \in \partial K$. Is there a convex set $Y$ disjoint from $K$ such that $x_0$ is also a boundary point of $Y$? Can you ensure $Y$ has an interior point?

Background: I was trying to prove supporting hyperplane theorem for normed spaces and my strategy was to use Hahn-Banach separation theorem on two convex sets ($K$ and $Y$) to obtain a continuous functional separating the sets. Then by the fact $x_0$ lies on the boundary of both sets and by continuity, it must be a maximum or minimum for the functional, giving us the result. Ideally $Y$ would also have an interior point, so I may actually apply the theorem.

As a simple example suppose $\mathbb{R}$ as a normed space.Let $K=[0,1] $ which is convex and closed and $1\in \partial K$. Now let $Y=(1,2)$ we have also $1\in \partial Y.$

Certainly we can consider $\mathbb{R}^2$ and other important spaces.


How to show $\int_{0}^{\infty}e^{-x}x^{-1} dx = \infty$ How do we obtain result

  $$\int_{0}^{\infty}e^{-x}x^{-1} \;\mathrm dx = \infty$$

Notice,
Laplace transform of a function divided by $t$ is given as $$L\left[\frac{f(t)}{t}\right]=\int_{s}^{\infty}L[f(t)]ds$$

Now, using Laplace transform as follows $$\int_{0}^{\infty}e^{-x}x^{-1}dx$$
$$=\int_{0}^{\infty}e^{-x}\frac{1}{x}dx$$
$$=L\left[\frac{1}{t}\right]_{s=1}$$
$$=\int_{s=1}^{\infty} L\left[1\right] ds$$
$$=\int_{1}^{\infty} \frac{1}{s} ds$$
$$=[\ln |s|]_{1}^{\infty}$$ $$=\lim_{s\to \infty}\ln |s|-\ln|1|$$
$$=\lim_{s\to \infty}\ln |s|=\infty$$


Understanding the definition of tensor product as a quotient of a free abelian group I've been give the Definition:

  Let F be a free abelian group with a basis $X$ such that.
  $$F = \langle A\times B\mid \emptyset \rangle $$

  Let $f$ be a subgroup of $F$ generated by the elements $$(a + b, g) - (a,g) - (b,g), \\  n(a,g) - (na,g),(a,g + h) - (a,g) - (a,h), \\ n(a,g) - (a,ng)\\  \forall n \in \mathbb{Z}\space,\forall a,b \in A\space,\forall g,h \in B$$

Then $A\otimes B = F/f$

By problem is I don't understand how the elements stated in the definition form basis for the free abelian group. Could someone provide me with some examples to help understand the group that is being quotient out please.

This bothered me too at first. The key thing to note is that the group operation in $F$ has nothing at all to do with the group operation in $A\times B$. For example, let $A=\mathbb{Z}_2$ and $B=\mathbb{Z}_4$. Then an element of $F$ looks like
$$a_1(0,0)+a_2(1,0)+a_3(0,1)+a_4(1,1)+a_5(0,2)+a_6(1,2)+a_7(0,3)+a_8(1,3)$$
where the $a_i$ are integers. $F$ is the set of all formal integer linear combinations of the elements of $A\times B$. When we take the quotient, we impose relations on these elements. An example of one of the elements that generate the kernel $f$ is
$$(1,1+2)-(1,1)-(1,2)$$
This is sent to $0$ when we take the quotient, which means that
$$[(1,1+2)]-[(1,1)]-[(1,2)]=0$$
or
$$[(1,1+2)]=[(1,1)]+[(1,2)]$$
In tensor product notation we are saying that $1\otimes (1+2)=1\otimes 1+1\otimes 2$, as $(a,b)\mapsto a\otimes b$.

If you write $F=<A\times B|\emptyset>$ then this is just the same as saying that $F$ is the free abelian group generated by the set $A\times B$ (by definition of a presentation). I think what confuses you is a notation failure: it is intended that $X=A\times B$. Just forget about the $X$.

In any case, if you want to understand the tensor product, you should distinguish conceptually between the definition (universal property) and the proof of existence (which is the $F/f$). The former is by what the tensor product does, and the second one you can essentially forget about, you never use it in dealing with tensor products (I say this as someone who uses every day, it is just not useful in practice); in fact you can find this statement in the standard textbook on commutative algebra by M. Atiyah.

To understand this group $F$: let $X$ be any set (in your case you have $X:=A\times B$). We can form the set of maps $X\rightarrow\mathbf{Z}$ with finite support, and define the free abelian group $F(X)$ generated by $X$ to be this set with the pointwise defined group operation. Note that the elements $\delta_x$ ($x\in X$) given by $\delta_x:X\rightarrow\mathbf{Z}$, $\delta_x(y)=0$ for $x\neq y$ and $\delta_x(x)=1$ form a basis of this group: for $\alpha:X\rightarrow\mathbf{Z}$ you have $\alpha=\sum_{x\in X}\alpha(x)\delta_x$ and this expression is unique. The map from $X$ to $F(X)$ by $x\mapsto\delta_x$ is injective, and if we identify $X$ with its image, then $X$ can be viewed as a basis for this group.

Do you still need an example? I think you are mostly confused about notation. In any case: take for instance $X=\mathbf{N}$. Then $F(X)$ is just the set of sequences in $\mathbf{Z}$ with finite support (meaning that for every sequence only finitely many members are nonzero).


Can $(0,0,0)$ be considered a particular solution in linear algebra? For the following matrix $A$:
$$
\left[
\begin{matrix}
    1 & 5 & 2 \\
    \end{matrix}
\right]$$
If we solve $Ax = 0$, we get the general solution as:
$$
\left[
\begin{matrix}
-5t_1 - 2t_2\\
t_1\\
t_2
\end{matrix}
\right]
$$
Is $(0,0,0)$ a particular solution or does a particular solution not exist?

In general solutions for a linear system are given by
$$Ax=b \quad x=x_P+x_H$$
such that
$$Ax_P=b \quad Ax_H=0 \implies A(x_P+x_H)= Ax_P+Ax_H=b+0=b$$
In this case $b=0$ therefore the zero vector is a particular solution and some not trivial particular solution are for example
$$\left[
\begin{matrix}
0\\
\frac15\\
-\frac12
\end{matrix}
\right],\quad \left[
\begin{matrix}
1\\
0\\
-\frac12
\end{matrix}
\right], \quad \left[
\begin{matrix}
1\\
-\frac15\\
0
\end{matrix}
\right]$$


Argument for why $a^2 + 1$ is never divisible by a $3 \mod 4$ integer How do you show that $$a^2 + 1$$ is never divisible by a $3 \mod 4$ integer (which is equivalent to showing that it has no $3 \mod 4$ prime factor) for any non-negative integer $a$ by analysing the arithmetic series representation of $a^2$, $1 + 3 + 5 + ... + (2a-1)$?

Suppose $a \in \mathbb{Z}$ is such that $p\mid (a^2+1)$, where $p$ is prime, and $p \equiv -1 \pmod 4$.

Since $p\mid (a^2+1)$, it follows that $p \not\mid a$, hence $\gcd(a,p)=1$.
\begin{align*}
\text{Then}\;\;&p\mid (a^2+1)\\[4pt]
\implies\;&a^2\equiv -1\pmod p\\[4pt]
\implies\;&(a^2)^\frac{p-1}{2}\equiv -1\pmod p
&&\text{[since $\small{\frac{p-1}{2}}$ is odd]}\\[4pt]
\implies\;&a^{p-1}\equiv -1\pmod p\\[4pt]
\implies\;&1\equiv -1\pmod p
&&\text{[by Fermat's little Theorem]}\\[4pt]
\implies\;&2\equiv 0\pmod p\\[4pt]
\end{align*}
contradiction.

Hmmm . . .

I didn't see the end of your question. It looks like you want a different kind of proof. In any case, the proof I gave above, using Fermat's little Theorem, is an easy way to prove the claim.

Not using the series:

Case 1: $a$ is even, say, $a=2k$. Then $a^2+1 = 4k^2 + 1$.
Case 2: $a$ is odd, say, $a=2k+1$. Then $a^2+1 = 4k^2+4k+2$.

Using the series $a^2=1+3+5+...+(2a-5)+(2a-3)+(2a-1)$.

Note that consecutive terms add to multiples of $4$.
Therefore, $a^2$ is either $(1+3)+(5+7)+...+((2a-3)+(2a-1))$, which is a sum of multiples of 4, or $1 + (3+5)+(7+9)+...+((2a-3)+(2a-1))$, which is one more than a multiple of $4$.
in any case, the result follows for $a^2+1$

Explicitly in $\mathbb{Z}_4$:

$a$ is either 0, 1, 2 or 3. Therefore $a^2$ is either 0 or 1, so $a^2+1$ is 1 or 2.


How do I find $P(X+Y = k)$ for a geometric distribution? If $X$ and $Y$ are independent identically distributed random variables where

$P(X=k) = P(Y=k) = pq^{k-1}$ where $q = 1-p$.

How do you find $P(X+Y=k)$? Is it acceptable to say that
$$P(X+Y=k) = P(\{X=m\} , \{Y=k-m\}) = P(X=m)P(Y=n-m)$$ since$ X, Y$ are independent? I'm not sure if this is legitimate and I'm also not sure whether it's possible to do this without throwing in the extra '$m$' variable.

Any advice would be much appreciated.

Thanks

The wider question that I'm trying to solve is $P(X=k \mid X+Y=n+1)$ and my method so far requires $P(X+Y = n+1)$ - is there another method?

By its moment generating function, you can prove that the sum of geometric distribution rv is a negative binomial distribution.

your way is legit. but for a k of large value, you have to calculate a lot.

please refer to this link:Sum of two independent geometric random variables


Calculating missing data points from standard deviation and mean I have to figure out what to missing data points are from a set of 10 scores. The mean of the 10 observed scores is 20.0 and the standard deviation is 6.0. The observed scores are listed below, with the two missing scores shown as a blanks. What formula/method do I use to determine these scores? We learned basic standard deviation calculations in class but I can't figure out how to reverse it to find these two scores.

{13, 11, 20, 24, 29, 27, 16, 20, _, _ }

Hint:  The mean is the sum of the scores divided by the number, so if the mean is 20 the total is 200.  Let the remaining scores be $x$ and $y$ and this gives you $x+y$.  Then the standard deviation is the square root of the variance.  The variance is the sum of the squares of the difference of each square from the mean.  So you have $(13-20)^2+(11-20)^2+\ldots+(x-20)^2+(y-20)^2=$what?

Okay. this is how you do it.
use this formula
1/n SIGMA xi^2-meansquared
okay?
okay.
n= the number of numerical thingies
sothe mean, dear dude, is
160+a+b/10 = 20
160+a+b = 200
a+b = 40
b= 40-a EQN 1
1/10 (13)^2+(11)^2+(20)^2+(24)^2+(27)^2+(16)^2+(20)^2+(a)^2+(b)^2- 20=6^2
1/10(2651+a^2+b^2) - 20 = 36
2651+a^2+b^2 - 200= 360
a^2+b^2+2001=0 substitute EQN 1 into this
so
a^2+(40-a)^2+2001=0
a^2+1600-80a+a^2+2001=0
2a^2-80a+3601=0
now solve this. and you will get two values, they can be used interchangeably


Constructing a sequence of functions, not Cauchy I'm working in the set $B = \{ f \in C[0,1] : \int_0^1 f(x)dx \leq 1\}$. I'm constructing an argument to show that there exists at least one sequence that has a subsequences satisfying the property that $d(f,g) = \int_0^1 \left| f(x) - g(x) \right| dx = k$ for some fixed $k$ and $\forall f,g$ in the sequence. I've been told it's quite obvious to think of an example, but I can't seem to come up with it.

Assuming we can take $k\leq 1$, we can define such a sequence $\{f_n\}$ by letting $f_n$ have a sawtooth spike enclosing area $k/2$ on the interval $[2^{-n}, 2^{-n-1}]$ (for example, an isosceles triangle of height $2^{n+1}k$ based on this interval), and letting it be $0$ everywhere else.

It is easy to see that each of these are continuous, and they all clearly satisfy $\int_0^1 f_n = k/2<1$. Moreover, given distinct $f_n$ and $f_m$ in the sequence, these define spikes on disjoint intervals, so there is no cancellation when we form their difference. Indeed, $|f_n-f_m|$ has spikes enclosing positive area $k/2$ on the intervals $[2^{-n}, 2^{-n-1}]$ and $[2^{-m}, 2^{-m-1}]$ and is zero elsewhere, so $\int_0^1 |f_n-f_m| = k/2+k/2=k$.

It's worth noting that the existence of such a sequence proves that the closed unit ball in $C[0,1]$ with $L^1$ norm is not compact, since no subsequence of $\{f_n\}$ converges.

Let the elements of a sequence $(f_n)_{n=1}^{\infty}$ be defined by
$$
f_n:=n(n+1)\chi_{[\frac 1{n+1},\frac 1{n}]}\ ,
$$
where $\chi_A$ is the characteristic function of a set $A$. It is not hard to see that $\int_0^1 f_n(x)dx = 1$ for all $n\in \Bbb N$. Since for any two distinct $f_n$ and $f_m$, their supports intersect on a set of zero measure, we have
$$\begin{align}
d(f_n,f_m) &= \int_0^1 \left| f_n(x) - f_m(x) \right| dx \\
&= \int_0^1 \left| f_n(x) \right| dx + \int_0^1 \left|f_m(x) \right| dx \\
&= 2\ .
\end{align}$$

Edit: As Mr.Glare has pointed out, I missed the condition that $f_n$ need to be continuous.


Let $f(x) = (x^n-1)/(x-1)$. Why does $f(1)=n$? In the back of De Souza (Berkeley Problems in Mathematics, page 305), it says:

  For $x \neq 1$,
  $$
f(x) = (x^n-1)/(x-1) = x^{n-1} + \cdots + 1
$$
  so $f(1) = n$.

The expansion for $x \neq 1$ obviously follows from the definition of a partial geometric series. But since it requires $x \neq 1$, how can it follow that $f(1)=n$?

Edit: $f$ is defined as above as a polynomial. I think this changes the question since if $f$ is given as a polynomial, it must then be continuous. The only way for $f$ to be continuous is to define $f(1)=n$. Someone else can confirm if this is correct reasoning.

I think what you want to say is

$$\lim_{x \to 1} f(x) = n$$

The reason is that, when $x \ne 1$, we may rewrite $f(x)$ as

$$x^{n-1} + x^{n-2} + \cdots +x +1$$

and now, because this form is continuous at $x=1$, we may extend the definition of the function to include $x=1$, which is $1+1+\cdots+1+1 = n$.

Two major way to define a function from A to B, in both its just a part of AxB (Cartesian product), such that , ether:
1-for every x in A there only one y in B that (x,y) is member of the function .
you can say that f is from A to B, and give the expression of f(x) (that should be well defined in B for all x in A)
2-for every x in A there at most one y in B that (x,y) is member of the function .
you can say that f is from A to B, and give the expression of f(x) , then we should find the part of A where this is defined

So based on your text: I guess that your function has IR (reels) as first set, witch contains 1. And some where that function is mentioned as continuous , then that expression of f(x) where x#1 so you can conclude that f(1)=n


Sylvester's criteria and Negative definite Matrices. A)Sylvester's criterion states that a Hermitian matrix M is positive-definite if and only if all leading principal minors are positive.

AA) a Hermitian matrix M is negative-definite if and only if all leading principal minors are negative.

B)a Hermitian matrix M is positive-semidefinite if and only if all principal minors of M are nonnegative.

BB) a Hermitian matrix M is negative-semidefinite if and only if all principal minors of M are nonpositive.

Now My question is the following::
1) Can AA) be deduced from A) ? Or vice versa..

2) Can BB ) be deduced from B) ?  Or vice vera...

My Thoughts: I think they can be as if $A$ is positive definite or positive semi definite then $-A$ will be negative definite or negative semi definite.
So AA)[BB) ] can be deduced from  A)[BB) ].

Edit I wanted to ask if AA)[BB) ] can be deduced from A) [B) ]???? Basically I wanted to know if Sylvester's law is useful to determine whether a Matrix is negative-semidefinite or negative definite?? I am sorry..PLease edit your answer accordingly..

Can anyone please correct me if I went wrong anywhere??

Thank You.

Let $A$ be a symmetric $ n \times n $ - matrix. For $k=0,1,,,n$ we denote the leading principal minors by $d_k$.

$A$ is positive definite $ \iff $ all $d_k>0$;

$A$ is negative definite $ \iff   (-1)^kd_k>0$ for $k=0,1,,,n$ .

Careful there, because minors are not linear functions: a minor of order $k$ is a $k$-homogeneous function, id est: if $I=\{i_1,\cdots, i_k\}$ and $J=\{j_1,\cdots, j_k\}$ are subsets of $\{1,\cdots,n\}$ with cardinality $k$, then $\det( \lambda A_{I,J})=\lambda^k\det A_{I,J}$. And you can see what happens to you criterion (B) when $\lambda=-1$:

  $A$ is negative-semidefinite if and only if $-A$ is positive-semidefinite, if and only if $(-1)^{\lvert I\rvert}\det A_{I,I}\ge 0$ for all $I\in\mathcal P\{1,\cdots, n\}$.

Same with (A).


$(A,+)$ and $(U(A), \cdot)$ are not isomorphic Let $A$ be a ring with $0\ne1$ and without divisors of $0$. Prove that the groups $(A,+)$ and $(U(A), \cdot)$ are not isomorphic.

I supposed that there is an isomorphism and I got $f(x)=1,\forall x\in A$. Can somebody tell me what can I do now?

Assume there existed an isomorphism $f \in \mathrm{Hom}_{\mathrm{Gr}} (A, \mathrm{U}(A))$. For arbitrary integer $n \in \mathbb{Z}$ denote $n_{A}=n1_{A}$. Since $f$ is surjective and $-1_A \in \mathrm{U}(A)$ there exists $a \in A$ such that $f(a)=-1_A$. It follows that $1_A=f(0_A)=\left(-1_A\right)^2=f(a)^2=f(2a)$, whence by injectivity of $f$ we infer $2a=2_Aa=0_A$.
Since $A$ has no zero-divisors, we have either $2_A=0_A$ or $a=0_A$ which also leads to $1_A=f(0_A)=f(a)=-1_A$ and hence $2_A=0_A$. This however entails for any $x \in A$ that $f(x)^2=f(2x)=f(0_A)=1_A$, which by virtue of the surjectivity of $f$ means that for any $y \in \mathrm{U}(A)$ the relation $y^2=1_A$ holds.
Since any element of $A$ commutes with the unity $1_A$, we have the binomial development $(y-1_A)^2=y^2-2y+1_A=y^2-1_A$ (taking $2y=0_A$ and $1_A=-1_A$ again into account), which combined with the previous relation signifies that $(y-1_A)^2=0_A$ for every unit $y \in \mathrm{U}(A)$. By once again appealing to the absence of zero-divisors we infer that $\mathrm{U}(A)=\{1_A\}$, in other words the group of units is trivial. Since this multiplicative group is isomorphic to the additive group $(A, +)$ we gather that the latter is also trivial, in other words $A=\{0_A\}$. This however means that the ring $A$ is null (degenerate) and contradicts our starting premise.

$f(0+0)=f(0)=f(0)^2$ implies that $f(0)=1$.

Let $p$ be the characteristtic suppose that $p>0$, $f(p-(p-1))=f(p)f(-(p-1))=f(-(p-1))=f(1)$ implies that $1-p=1$ and $p=2$. This implies that $f(1+1)=f(1)^2=f(0)=1$ $(f(1)-1)(f(1)+1)=0$  since $R$ does not have divisors of zero, and $p=2$, $f(1)=1$ contradiction since $f$ is injective, thus the characteristic is zero.

$f(a)=2,f(b)=3, f(b-a)=f(1)=3/2$, $f(c)=4,f(d)=5$, $f(d-c)=f(1)=5/4$ implies that $5/4=3/2$ and $10=12$ contradiction since no zero divisors.


Are pairwise mutually exclusive events the same as mutually exclusive events? Larson (1982) defining the probability axioms talks about "mutually exclusive" events, while Poirier (1995) about "$A_1, A_2, \ldots$ as a sequence of pairwise mutually exclusive events events in the sigma-algebra $\tilde A$."

I suppose that the two notions are equivalent (they both refer two disjoint sets), right? Does this make adding the word "pairwise" superfluous on behalf of Poirier?

Is there any other context out of probability that makes this distinction (using the word pair-wise) meaningful? According to wikipedia, in Logic, "pairwise mutually exclusive" means that both propositions cannot be true simultaneously, in contrast to just mutually exclusivity that means that if one is true, then the other cannot be true.

What about vicious cycles? For example, suppose you have three binary random variables $A$, $B$, and $C$ that each take values $0$ or $1$. In this example, $A$ and $B$ are mutually exclusive if whenever $A = 0$, $B = 1$, and similarly for $C$.

$A$, $B$, and $C$ cannot all be pairwise mutually exclusive.

However, they can be "globally" mutually exclusive in the sense that, for example, if $A = 0$, then $B = 1$ and $C = 1$, and so on for the other variables.

I think that this counterexample proves that pairwise mutual exclusivity is not equivalent to mutual exclusivity.

They don't mean the same thing, but it is a short jump to show they are equivalent. A set of events, $A_1,...,A_n$ are mutually exclusive if the occurrence of one of them implies that the other $n-1$ events can't happen. It's immediate that the events are pairwise mutually exclusive. The other direction is immediate as well.

They aren't a priori the same, but it's immediate that they're equivalent.


Find a function that satisfies the following five conditions. My task is to find a function $h:[-1,1] \to \mathbb{R}$ so that

(i) $h(-1) = h(1) = 0$

(ii) $h$ is continuously differentiable on $[-1,1]$

(iii) $h$ is twice differentiable on $(-1,0) \cup (0,1)$

(iv) $|h^{\prime\prime}(x)| < 1$ for all $x \in (-1,0)\cup(0,1)$

(v) $|h(x)| > \frac{1}{2}$ for some $x \in [-1,1]$

The source I have says to use the function

$h(x) = \frac{3}{4}\left(1-x^{4/3}\right)$

which fails to satisfy condition (iv) so it is incorrect. I'm starting to doubt the validity of the problem statement because of this. So my question is does such a function exist? If not, why? Thanks!

Such a function does exist. Try $h(x) = e^{-x^2b}-\frac{b}{e}$. This function trivially satisfies (i)-(iii). Now you just need to find $b$ such that (iv) and (v) also hold. Assuming $b >0$ we get :
$|h^{''}(x)|= |2be^{-x^2b}(2bx^2-1)| \leq 2b |2b-1|$ for $x\in[-1,1]$.
So choosing a very small $b$ like $b=1/8$ will make this smaller than $1/2$. For this $b$ we also get $h(0)=1-\frac{1}{8e} > 1/2$. So (iv) and (v) also hold.


Definition of a category as a monoid This is my first time writing here. If you want me to write my questions in another way, please let me know because I have no experience in doing that at all.

I am using the book of MacLane introducing the concept of categories.

Let $O$ be a set of objects and $A$ a set of arrows.

A category can be seen as a monoid $(A, \circ)$ by using the following “product over the set O” which is the set of all composable pairs $$A \times_O A = \{\langle f,g \rangle : f,g \in A \text{ with } dom(g) = cod(f) \}.$$

As set we do have the set of arrows. As inner binary operation we do have the composition $\circ$. Associativity is given by the common definition of a category (MacLane).

I would like to show properly the condition of the existence of the neutral element. We know that there exists for each arrow $f: a \to b$ the identity arrows $id_a$ and $id_b$ so that $$f \circ id_a = id_b \circ f = f.$$ But it should be rewritten in a way so that it makes sense with the definition of a neutral element and we can write a real triple $(A,\circ, e)$.

Could you give me some hints? Thank you in advance.

In one line, what MacLane is saying is that (small) categories are monads in the bicategory of spans of sets.

More precisely: monoids are a notion that makes sense in any monoidal category. Fix the set $O$ and consider the category $\mathbf G_O$ whose objects are the triples $(A,s,t)$ with $s,t$ maps $A \to O$ and whose mrophisms $(A,s,t) \to (A',s',t')$ are the map $F:A \to A'$ such that $s=s'F$ and $t=t'F$. Then there is a monoidal product on $\mathbf G_O$ defined as:
$$ (A,s,t) \otimes (A',s',t') := (\{(f,f') \in  A\times A' : t(f) = s'(f')\}, (f,f')\mapsto s(f), (f,f') \mapsto t'(f')) $$
The unit for this monoidal product is $(O,\mathrm{id}_O,\mathrm{id}_O)$. The claim is that a monoid in this monoidal category $\mathbf G_O$ is precisely a (samll) category with set of objects $O$. In particular, the unit of such a monoid is expressed as a map $e : (O,\mathrm{id}_O,\mathrm{id}_O) \to (A,s,t)$ in $\mathbf G_O$, meaning a map $e:O \to A$ such that $s=se$ and $t=te$.

Interesting question, I never realised we could see a category in this way!

Before I answer your question, let me first point out where in MacLane's Categories for the Working Mathematician the relevant definitions can be found (in case anyone else is interested). Page 10 defines the sets $O$, $A$ and the product $A \times_O A$, together with how these sets with the necessary operations form a category. Earlier, in the introduction, on page 2 it is explained what a monoid is in terms of diagrams (with their usual meaning, with respect to the cartesian product $\times$). Then on page 4 it is explained how we can replace the usual cartesian product $\times$ by a similar binary operation $\square$.

The question is then: given a category with $A$ and $O$ as its set of arrows and objects respectively, in the case where this operation $\square$ is given by $\times_O$, what is the neutral element for the monoid $(A, \circ)$?

For any such operation $\square$, the neutral element will be given by an arrow $1 \to A$, where $1$ is the unit of the operation $A \square A$. That is, for all objects $X$, we must have isomorphisms
$$
1 \square X \cong X \cong X \square 1.
$$
Note that if $\square$ is the cartesian product $\times$, then 1 is just a singleton and an arrow $1 \to A$ just amounts to an element of $A$. So this is why we usually think of it as just an element. For other operations than the cartesian product, the unit may be something more complex than just a singleton and we get a 'neutral element' that is no longer just an element.

One of these more complex cases is where $\square$ is $\times_O$. First let us determine the unit. I will denote the unit of this operation by $I$ to avoid confusion in notation. So we want some set $I$ such that for all $B \subseteq A$ ($\times_O$ is only defined on subsets of $A$), there are isomorphisms:
$$
I \times_O B \cong B \cong B \times_O I.
$$
It turns out that taking
$$
I = \{ id_a : a \in O \}
$$
will do the job (check this!).

Now the 'neutral element' (which is no longer just one element) will be given by an arrow $I \to A$. There is only one, very natural, choice here and that is the inclusion. You should check that this indeed makes the entire construction into a monoid. So the 'neutral element' is now actually a subset of $A$.


System of congruences with moduli not coprime and chinese remainder theorem application Find all solutions, if any, to the system of congruences
$$\Bigg\{
 \begin{array}{c}
     x \equiv 1 (\mod 6)\\
     x \equiv 7 (\mod 9)\\
     x \equiv 4 (\mod 15)\\
    \end{array}$$
we can see that
$ x \equiv 1 \pmod 6 \implies
    \left\{
    \begin{array}{l}
        x\equiv 1 \pmod 2 \\
        x \equiv 1 \pmod 3
    \end{array}
    \right.$
as well as
$ x \equiv 7 \pmod 9\\
    \qquad \Rightarrow \quad x=7+9k\\
   \qquad \Rightarrow \quad x=1+3(2+3k)\\
   \qquad \Rightarrow \quad x\equiv 1 \pmod 3\\
$
and
$  x \equiv 4 \pmod{15} \implies
    \left\{
    \begin{array}{l}
        x\equiv 4 \pmod 5 \\
        x \equiv 1 \pmod 3
    \end{array}
    \right.
$
After removal of redundant congruences and picking the one with the highest power of 3 we are left with:
$
\Bigg\{
 \begin{array}{c}
     x \equiv 1 \pmod 2\\
     x \equiv 7 \pmod {3^2}\\
     x \equiv 4 \pmod 5\\
    \end{array}
$
Now we reduced it to standard CRT problem.
$ x=2k+1 \\
2k+1 \equiv 7\pmod{9}\\
2k \equiv 6\pmod{9}\quad \gcd{(2,9)}=1\\
k\equiv 3\pmod{9}\\
k=9\cdot l+3$
$x=2\cdot(9\cdot l+3)+1=18l+7$
$
18l+7\equiv 4\pmod{5}\\
18l\equiv -3\pmod{5}\\
18l\equiv 2\pmod{5}\\
3l\equiv 2\pmod{5}\\
\quad \Rightarrow \quad 7\pmod{5}\\
\quad \Rightarrow \quad 12\pmod{5} \quad \gcd{(3,5)}=1\\
l\equiv 4\pmod{5}\\
l=5\cdot m +4\\
$
The solution to the original system:
$
x=2\cdot(9\cdot (5\cdot m +4)+3)+1=90\cdot m+79\\
x\equiv 79\pmod{90}
$
with the smallest x = 79
Is it a correct approach?

It is correct, but you can make the solution a bit shorter using the explicit inverse isomorphism in the C.R.T. for two coprime  moduli $a$ and $b$, given a Bézout's relation $ua+vb=1$:

$$x\equiv \begin{cases}\alpha\mod a,\\\beta\mod b,\end{cases}\iff x\equiv \beta ua+\alpha vb\mod ab$$

As $4\cdot 3^2-7\cdot 5=1$, the last two final congruences yield as a first step $$x\equiv 4\cdot 4\cdot 9-7\cdot 7\cdot 5=144-245=-101\mod 45.$$
Next, from $45-22\cdot 2=1$, you deduce from this congruence and the first above that
$$x\equiv 45+101\cdot 22\cdot 2=4489\equiv 79\mod 90.$$


When is $991n^2 +1$ a perfect square? What should be the value of $n$ so that the number obtained after adding $1$ to $991$ times its square is itself a perfect square?  Can you please give me a few hints on this topic with a few specific reasons?


Solving system of ODEs using Fourier transforms I have a system of ODEs I'd like to solve. It seems in the literature that the best way of getting a complete solution is with Fourier transforms (and that under some conditions perturbative solutions do not work).
\begin{align}
\frac{d P_{11}(t)}{dt} &= V(t) P_{21}- V(t)^* P_{12}\\
\frac{d P_{12}(t)}{dt} &=  V(t)(P_{22}- P_{11})-c P_{12}\\
\frac{d P_{21}(t)}{dt} &=  V^*(t)(P_{22}- P_{11})-c P_{21}\\
\frac{d P_{22}(t)}{dt} &=  V^*(t) P_{12}- V(t) P_{21}
\end{align}
where ${P_{11},P_{12},P_{21},P_{22}}$ are functions of t that I'm solving for; c is a constant, V* is the complex conjugate of V; and $V = E_1 e^{-i \omega_1 t} + E_2 e^{-i \omega_2 t}$, with $E_1$ and $E_2$ being constants.

My plan is to Fourier transform this set of ODEs, solve the resultant linear algebra, and then inverse Fourier transform back to get my solution.

So first I apply some standard rules to Fourier transforms (convolution, $F(P(t) \cdot e^{i\omega_1 t}) = F(P)(\omega-\omega_1)$, and the rules for Fourier transformed derivatives $F(\dot{\rho}) = i \omega F(\rho)$).

But in doing so, I see that my system of equations (after transforming) has the form:

$$
\begin{equation}
i \omega \hat{\rho}_{11} + \hat{\rho}_{21}(\omega-\omega_1)-\hat{\rho}_{12}(\omega - \omega_2) = 0  \\
-(\hat{\rho}_{11}(\omega-\omega_1) -\hat{\rho}_{11}(\omega-\omega_2) + (i\omega + c)\hat{\rho}_{12}+ \hat{\rho}_{22}(\omega-\omega_1)+\hat{\rho}_{22}(\omega-\omega_2)) = 0
\end{equation} \\
...
$$
My four equations now have terms like $\hat{\rho}_{21}(\omega)$ and $\hat{\rho}_{21}(\omega-\omega_1)$. In the basic methods of Fourier transforming to solve different equations, we solve algebraically for the fouriered functions. But in this case it's not obvious how to solve this system algebraically. I've thought about manually solving this system by hand using substitution (of both the input arguments and the functions themselves), but haven't had any luck.

Any ideas on how I can move forward to solve the system?

Edit:
The fourier transform of a derivative is known to be ${\widehat {f'\;}}(\xi )=2\pi i\xi {\hat {f}}(\xi )$.  This is found by performing integration by parts and identifying that the function at the boundaries is zero. In my case, I'm not completely sure if $ \lim_{x \to \infty} \hat{\rho}_{12}(\omega)$ (but, as discussed in the comments, I think that it's likely that there's some "energy" constraints limiting the maximum amount of frequencies allowed) And so, for now, I have omitted any potential contribution due to the boundaries.

A partial answer, but hopefully somewhat useful:

First off, it would be instructive to know how you obtained this system, but in the absense of this context, we can still do a few things.

Notice that $\frac{\text{d}}{\text{d} t}\left(P_{11}+P_{22}\right) = 0$; hence, the system reduces to
\begin{align}
 \frac{\text{d} x}{\text{d} t} &= 2 V\,z - 2 \,V^*y\\
 \frac{\text{d} y}{\text{d} t} &= V\,x - c\,y\\
 \frac{\text{d} z}{\text{d} t} &= V^*x - c\,z\\
\end{align}
with $x = P_{11}-P_{22}$, $y=P_{12}$ and $z=P_{21}$.
Now, when the frequencies $\omega_1$ and $\omega_2$ are commensurable, the matrix
$$
 A(t) = \begin{pmatrix} 0 & -2 V^* & 2 V \\ V & -c & 0 \\ V^* & 0 & -c\end{pmatrix}
$$
is periodic. In that case, you can try to attack the above system using Floquet theory, see e.g. here.

Alternatively, you can rewrite $y = e^{-c t} Y$, $z = e^{-c t} Z$ and $V = e^{- c t} W$ to obtain the even simpler system
\begin{align}
 \frac{\text{d} x}{\text{d} t} &= 2 W\,Z - 2 W^*Y\\
 \frac{\text{d} Y}{\text{d} t} &= W\,x \\
 \frac{\text{d} Z}{\text{d} t} &= W^*x.
\end{align}
Unfortunately, $W$ is not periodic anymore; however, you might be able to make some headway with this formulation.

Personally, I have never been a big fan of "Fourier transform" methods- or transform methods in general.  Since these are linear equations with constant coefficients, I would write them in matrix form:
$\frac{d}{dt}\begin{pmatrix}P_{11} \\ P_{12} \\ P_{21} \\ P_{22}\end{pmatrix}= \begin{pmatrix}0 & -V^* & V & 0 \\ -V & -c & 0 & V \\ -V^* & 0 & -c & V^* \\ 0 & V^* & V & 0 \end{pmatrix}\begin{pmatrix}P_{11} \\ P_{12} \\ P_{21} \\ P_{22}\end{pmatrix}$.

Now determine the eigenvalues and eigenvectors of that matrix.


Splitting the dollar Nash equilibrium I'm working on a game theory problem I can't seem to figure out.

Players 1 and 2 are bargaining over how to split $\$10$. Each player names an amount $s_i$, between 0 and 10 for herself. These numbers do not have to be in whole dollar units. The choices are made simultaneously. Each player's payoff is equal to her own money payoff. In all the cases below, if $s_1+s_2\leq 10$, then the players get the amounts they named (and the remainder is destroyed).
(a) In the first case, if $s_1+s_2 >10$, then both players get zero and the money is destroyed.
(b) In the second case, if $s_1+s_2 >10$ and the amounts named are different, then the person who names the smaller amount gets that amount and the other person gets the remaining money. If $s_1+s_2 >10$ and $s_1=s_2$, then both players get $\$5$.
(c) In the third case, the games (a) and (b) must be played such that only integer dollar amounts can be named by both players.
Determine the pure strategy Nash Equilibria for all games (a) - (c).

I'm pretty sure I've figured out (a), noting that if player 2 chooses a strategy such that $0 \leq s_2 < 10$, the best response of player 1 is $BR_1(s_2) = 10- s_2$. If $s_2 = 10$, then $BR_1(s_2) = [0,10]$ since the payoff is $0$ regardless. The same holds for player 2. The Nash Equilibria is the intersection of the BR lines, and occur at $(10,10)$ and the line $s_1+s_2=10$.
For (b), my thought is that if player 2 chooses $s_2 \leq 5$, then $BR_1(s_2) = 10-s_2$ as in (a). However, if $s_2 > 5$, I feel that $BR_1(s_2) = s_2 -\epsilon$ for some very small $\epsilon >0$. This way, the total amount will be over $\$10$, but player 1 will have the smaller amount and thus get his money. However, I'm not sure if this is right or how to find the Nash Equilibrium in this case. Any help would be greatly appreciated.

This was just bumped to the homepage by Community ♦ because it had only unvoted answers. Since it turns out that these were wrong, here's a new one:

In (b), every strategy below $\$5$ is strictly dominated by $\$5$, since that always wins exactly $\$5$ independent of the other player's strategy.

On the other hand, no strategy above $\$5$ has a best response. If $s_1\gt5$, then if $s_2\ge s_1$, Player $2$ can improve by switching to $s_2=s_1-\epsilon$; whereas if $s_2\lt s_1$, Player $2$ can improve by switching to $\frac{s_1+s_2}2$.

Thus the only pure-strategy Nash equilibrium is $(5,5)$, where deviating in either direction reduces the payoff.

Here, in case b), given the sum >10, a player would always try to choose a pay off that would maximize his utility. He would choose 10, and hence the rest of the amount that is 0 should go to the player 2, provided he had chosen an amount less than 10. However, player 2 also would try to maximize his utility and choose max amount 10. This would lead to an equal pay off of (5,5). This is PSNE.


Finding the Chromatic Polynomial for the wheel graph $W_5$ Let $G$ be a graph and let $k \in N$. The chromatic polynomial $P_G(k)$ is the
  number of distinct $k$-colourings if the vertices of G.

Standard results for chromatic polynomials:

  1) $G = N_n$,  $P_G(k) = k^n$ (Null graphs with $n$ vertices)

  2) $G = K_n$,  $P_G(k) = \frac{k!}{(k-n)!}$ (Complete graph with $n$ vertices)

  3) When G is a tree with $n$ vertices, $P_G(k) = k(k-1)^{n-1}$

  4) $G = C_n$ (for $n \geq 3$),   $\quad P_G(k) = (k-1)^n +(-1)^n(k-1)$. (Cycle graph with $n$ vertices)

Given these standard results I could be asked to find the chromatic polynomial of the Wheel graph $W_n$. Where $W_n$ is defined to be the graph formed by joining each vertex of $C_{n-1}$ to one more vertex.

I have found a proposition:

  Let $G$ be a simple graph with $n$ vertices and $m$ edges.

  For each edge $e$ of $G$, $P_G(k) = P_{G-e}(k) - P_{G\backslash e}(k)$

Using this result to decompose $W_5$:

The chromatic polynomial of $W_5$ is equal to the CP of ($W_5$ minus and edge) - the CP of $W_5$ with the middle vertex contracted to one of the vertices of $C_4$. As I believe the chromatic polynomial is not affected by double edges I can remove all the multiple edges from $W_5$ with the middle vertex contracted to one of the vertices of $C_4$ and hence I get $C_4$.

Continuing the same method as above for $W_5$ minus 2 edges...

I iterated this until my calculation reduced to the CP of $C_4 \cup N_1$ - CP of $C_4$.

Adding all the elements together I got the following:

$$C_4 \cup N_1 - 4 C_4$$

Also, if $G$ is disconnected then $P_G(k)$ is the product of the chromatic polynomials of all the components.

Given the standard results and the above statement I thought that

$P_{W_5}(k) = k\times P_{C_4}(k) - 4P_{C_4}(k)$

$P_{W_5}(k) = (k-4)\times P_{C_4}(k)$

$P_{W_5}(k) = (k-4)\times \left[(k-1)^4 +(-1)^4(k-1)\right]$

$P_{W_5}(k) = (k-4)\times \left[(k-1)^4 +(k-1)\right]$

$P_{W_5}(k) = k^5 - 8k^4 +22k^3-27k^2+12k$

Which is not even close to the formula I found here : Wolfram Mathworld

$$P_{W_n}(k) = k\left[(k-2)^{n-1} - (-1)^n(k-2)\right]$$

$$P_{W_5}(k) = k\left[(k-2)^{4} - (k-2)\right] = k^5 - 8k^4 +24k^3-33k^2+18k$$

Could anyone please point out where I went wrong and give me some intuition how to solve this type of problems in general?
Any resources where I could find worked out examples?


Show that there is a nonabelian group of order $p^n$ with a cyclic subgroup of index $p$ Assume $p$ is a prime integer and let $n$ be an integer such that $n \geq 3$.

  Show that there is a nonabelian group of order $p^n$ with a cyclic subgroup of index $p$.

The dihedral group $D_8$ is of order $8=2^3$ and it is non-abelian group. Also, any subgroup of $D_8$ with order $2$ is cyclic.


Angle Addition Identities Trignometry I'm working on a problem with angle addition, using the trig identities and seem to have gotten stuck. See screenshot for the work I have done in the red area. Any assistance is appreciated.

Your work up to the last step is fine.  (Yes, you could have said $\tan 45^\circ = 1$ but
$\sqrt{2}/\sqrt{2}$ is surely OK.)

After your last step, I would rationalize the denominator as follows:
$$
\frac{6+\sqrt{12}}{6-\sqrt{12}} = \frac{6+\sqrt{12}}{6+\sqrt{12}} \cdot \frac{6+\sqrt{12}}{6-\sqrt{12}} = \frac{36+12\sqrt{12}+12}{6^2-12}= \frac{48+12\sqrt{12}}{24} = 2+\frac{\sqrt{12}}{2} = 2+\sqrt{3}
$$


finding limit: result division by null I've got a question concerning this task:
$$\lim\limits_{x \rightarrow -{\frac{1}2}^+}{\frac{e^{2x-1}-1}{cos(\pi x)}}$$
So the limit value given in the solution is $-\infty$.

I am a bit confused about limit values and division by null in that context; So I know that in general $\lim\limits_{x \rightarrow -\frac{1}2}{\frac{1}{cos(\pi x)}}$ doesn't exist since the limit value is different for $\lim\limits_{x \rightarrow {-\frac{1}2}^-}$ and $\lim\limits_{x \rightarrow {-\frac{1}2}^+}$.
In my case ,though, it is possible because I'm only interested in $\lim\limits_{x \rightarrow -{\frac{1}2}^+}{cos(\pi x)}=0^+$ and therefore, with $\lim\limits_{x \rightarrow -{\frac{1}2}^+}{e^{2x-1}-1}={e^{-2}-1}^+$ that gives me $$\lim\limits_{x \rightarrow -{\frac{1}2}^+}{\frac{e^{2x-1}-1}{cos(\pi x)}}=\frac{{e^{-2}-1}^+}{0^+}$$ which is in that case $-\infty$, since the numerator is $<0$, right?
So could I say that I can - in the context of limit values - divide by null if I'm only interested in the limit value from one side?

Thanks in advance.

It is not $e^{-2}$ but $e^0$. You have to use L'Hopital rule to get
$$
\lim\limits_{x \rightarrow -{\frac{1}2}^+}{\frac{e^{2x-1}-1}{\cos(\pi x)}}=
\lim\limits_{x \rightarrow -{\frac{1}2}^+}\frac{\frac{d}{dx}\left(e^{2x-1}-1\right)}{\frac{d}{dx} \cos(\pi x)}=
\lim\limits_{x \rightarrow -{\frac{1}2}^+}\frac{2 e^{2x-1}}{ -\pi \sin(\pi x)}=
-\frac{2}{\pi}
$$


Proof of index laws for complex numbers Can someone give a proof that index laws (and hence log laws) apply for complex numbers in the same way they do to reals, specifically that:

$(a^{ix})^n = a^{ixn}$

Assuming $a, x, n$ are real and $i$ defined as $i^2 = -1$
I am trying to prove de Moivre's theorem from Euler's formula but have been told I can't just assume that index laws apply to complex numbers (but rather have to prove that they do).

Help would be greatly appreciated!

Thank you!!

You have to be careful about multivalued functions.  By definition, $a^z = \exp(z \log(a))$, but $\log$ is multivalued: $\log(a) = \text{Log}(a) + 2 \pi i k$ where $\text{Log}$ is one particular branch of the logarithm, and $k$ can be any integer.
Now
$(a^{ix})^n = (\exp(i x \log(a))^n = \exp(n \log(\exp(i x \log(a)))$
and $\log(\exp(i x \log(a))) = i x \log(a) + 2 \pi i k$ for arbitrary integer $k$
so
$$(a^{ix})^n = \exp(n (i x \log(a) + 2 \pi i k)) = a^{ixn} \exp(2 \pi i k n)$$

If $n$ is an integer, so is $k n$, so $\exp(2 \pi i k n) = 1$ and you do have
$(a^{ix})^n = a^{ixn}$ (i.e. every value of the left side is a value of the right side, and vice versa).
However, if $n$ is not an integer they can be different.

For example, $(i^2)^{1/2} = (-1)^{1/2} = \pm i$, but $i^{2 \cdot 1/2} = i$.

Using logarithms (in base a) we get $(a^{ix})^n \to n\log_a{a^{ix}}=ixn$ which is the same as the right hand side.


How to check if function has global extremes? I need to determine if function:

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

has global minimum/maximum.

I've found local minimum at $(2,1)$, but that's not any proof of global minimum.

Put $x=1/y$. You get $f(x,1/x)=x+2/x$. Approach $x$ to zero from below and from above. What do you get?

Hint: $$f(x,y)=x+2y−2\log(xy) = (x-2 \log(x)) + (2y-2 \log(y))$$ so you have a separable function and can look for minima for $x$ and for $y$ individually.

So long as both are positive, it is obvious that $(2,1)$ is the only point giving a minimum and that there is no maximum.


Confidence interval for a function of estimators Let $X_i$ be iid samples and
$$I_f = \frac{1}{N}\sum_{i=1}^N f(X_i)$$
be an estimator for the mean of $f(X)$ and
$$I_g = \frac{1}{N}\sum_{i=1}^N g(X_i)$$
an estimator for the mean of $g(X)$.

How can someone construct confidence interval for the product of $I_f$ and $I_g$?

More general, how to construct confidence intervals for a function $F(I_f,I_g)$.

Delta method
Suppose $\{Z_n\}_{n=0}^\infty$ is a sequence of random vectors in $\mathbb{R}^K$ such that
\begin{equation}
\sqrt{n} \left ( Z_n - \mu \right) \; \xrightarrow{d} \; \mathcal{N}(0,\Sigma),
\end{equation}
for some $\mu\in\mathbb{R}^K$ and $\Sigma\in\mathbb{R}^{K\times K}$. Let $F:\mathbb{R}^K\rightarrow\mathbb{R}$ and $J(\mu) = \left . \nabla F(x) \right |_{x=\mu}$. Then,
\begin{equation}
\sqrt{n} \big ( F(Z_n) - F(\mu) \big) \; \xrightarrow{d} \; \mathcal{N}\big( 0,J(\mu)^T \Sigma J(\mu)  \big).
\end{equation}
For a proof see theorem 3.1 in  "A. W. van der Vaart. Asymptotic Statistics. Cambridge University Press, 1998".
Answer to your question
In order to answer your question, define $Z_n = (I_{f,n},I_{g,n})$ and $F(Z_n) = I_{f,n}I_{g,n}$ and then apply the Delta method.


Show the differential operator is bounded I need to show the differential operator is bounded. I believe it is bounded on $C[0,1]$ with the sup norm by 1, but I am struggling to show this. What I have so far:
NTS: $\|Tf\|\leq\|T\|\|f\|$ Where:

\begin{equation} \|Tf\|=\sup_{\|f\|=1}\|Tf\|=\sup_{\|f\|=1} \sup_{x\in [0,1]} |f'(x)|=\sup_{\|f\|=1} \sup_{x\in [0,1]} \left|\frac{\lim_{h\rightarrow 0} f(a+h)-f(a)}{h}\right|
\end{equation}

Not entirely sure if I should have written the derivative like that in the last equality above. I need a hint to see where to go next.

Thanks in advance!

Hint: Denote by
$$D:(C^{1}[0,1],\Vert\cdot\Vert_{\infty})\rightarrow(C[0,1],\Vert\cdot\Vert_{\infty})$$
the differential operator. Let $f_{n}(x)=\sin(nx)$. Note that $\Vert f_{n}\Vert_{\infty}=1$ (for $n\geq 2$). However, $(Df_{n})(x)=n\cos(nx)$, and hence $\Vert Df_{n}\Vert_\infty=n$. What does this mean?

What about the effect of differentiating a sequence f sub n = sin(2pi* n* x) where n is integer > 0?
You get 2pi *n *cosine, whose supremum is infinite


The function $f:A \subseteq \mathbb{R}^n→\mathbb{R}^m$is differentiable at the point Definition : The function $f:A \subseteq  \mathbb{R}^n→\mathbb{R}^m$is differentiable at the point $a$ if there exists a linear transformation $T:\mathbb{R}^n→\mathbb{R}^m $ that satisfies the condition :
$$\lim\limits_{x \to a} \frac{ \parallel f(x)-f(a)-T(x-a)  \parallel }{ \parallel  x-a\parallel }=0$$
Or :
$$f(x)=f(a)+T(x-a)+r(x) \ \ \ \ \ : \lim\limits_{x \to a} \frac{\parallel r(x)  \parallel }{\parallel  x-a\parallel }=0$$
The $m×n$ matrix associated with the linear transformation $T$ is the matrix of partial derivatives, which we denote by $Df(a)$. We can refer to $Df(a)$ as the total derivative (or simply the derivative) of $f$.

Now :

Definition : The function $f:A \subseteq  \mathbb{R}→\mathbb{R}$ is differentiable at the point $a$ if there exists a linear transformation $T:\mathbb{R}→\mathbb{R} $ that satisfies the condition :
$$\lim\limits_{x \to a} \frac{ \parallel f(x)-f(a)-T(x-a)  \parallel }{ \parallel  x-a\parallel }=0$$
Or :
$$f(x)=f(a)+T(x-a)+r(x) \ \ \ \ \ : \lim\limits_{x \to a} \frac{\parallel r(x)  \parallel }{\parallel  x-a\parallel }=0$$

Is it right ?
but why in here :
Absolute value is not !!!!

Because, in $\mathbb R$, $f(x) \to 0$ if and only if $|f(x)| \to 0$.

If $f(x) = |x|$, try writing down which linear function $df_0$ would be.  Probably either $df_0(x) = x$ or $df_0 = -x$.  Let's say $df(x) = x$.  Then we evaluate the one sided limits:
\begin{eqnarray}
\lim_{x \to 0^-} \frac{f(x) - f(0) - df_0(x - 0)}{x - 0} &=&
\lim_{x \to 0^-} \frac{|x| - 0 - (x - 0)}{x - 0}\\
&=&\lim_{x \to 0^-} \frac{(-x)  - x }{x }\\
&=& -2
\end{eqnarray}
and
\begin{eqnarray}
\lim_{x \to 0^+} \frac{f(x) - f(0) - df_0(x - 0)}{x - 0} &=&
\lim_{x \to 0^+} \frac{|x| - 0 - (x - 0)}{x - 0}\\
&=&\lim_{x \to 0^+} \frac{x  - x }{x }\\
&=& 0.
\end{eqnarray}
So we see that the limit does not exist if $df_0(x) = x$.  You'll get a similar thing if you try $df_0(x) = -x$, or any other linear function.


Show that $L^{\infty}$ space does not have a countable dense set. I was able to show that when $p ≥ 1$, the $L^p$ space on the interval $[0,1]$ has a countable dense set.

However, when $p$ is infinite, how to prove that $L^p$ space on the interval $[0,1]$ does not have a countable dense set? I can't find some way to approach.

Consider all those elements $e_i$ whose terms are either $0$ or $1$ .They all belong to $L^\infty$ and they are uncountable having cardinality $c$

$||e_i-e_j||=1$

Now if we a countable dense set $D$ say then we should have for each $e_i$ an element $d_i$ such that $||e_i-d_i||<\epsilon $ for any $\epsilon $>0(take $\epsilon=\dfrac{1}{2}$)

This is not possible as $D$ is countable


Mean and Variance of subset of a data set I have a data set of position measurements of an object. However, the data set is split into subsets. The subsets have equal size. I want to find the mean and variance of the whole data set only with access to the subsets, and the not the whole data set at once. How would I go about doing this? Is it correct that the mean of the means of the subsets is equal to the mean of the whole set? What about the variance?

Suppose you have $k$ groups of observations on a variable $x$ (say) where the $i$th group consists of $n_i$ observations, $i=1,\ldots,k$. Let the $j$th observation in the $i$th group be $x_{ij}$ for $i=1,\ldots,k$ and $j=1,\ldots,n_i$.

The $i$th group mean is defined as $$\overline{x_i}=\frac1{n_i}\sum_{j=1}^{n_i} x_{ij}\quad,\,i=1,\ldots,k $$

Then the pooled mean or combined mean is given by $$\overline{\overline x}=\frac{\sum_{i=1}^k n_i\overline x_i }{\sum_{i=1}^k n_i} $$

This is a weighted average with weights being the number of observations in the $i$th group.

The $i$th group variance is defined as

$$s_i^2=\frac1{n_i}\sum_{j=1}^{n_i}\left(x_{ij}-\overline{\overline x}\right)^2\quad,\,i=1,\ldots,k $$

And the pooled variance based on all observations from all groups is given by

$$s^2=\frac{\sum_{i=1}^k\sum_{j=1}^{n_i}\left(x_{ij}-\overline{\overline x}\right)^2}{\sum_{i=1}^k n_i}=\frac{\sum_{i=1}^k n_is_i^2}{\sum_{i=1}^k n_i}+\frac{\sum_{i=1}^k n_i\left(\overline x_i-\overline{\overline x}\right)^2}{\sum_{i=1}^k n_i}$$

You are concerned with the case $n_1=n_2=\cdots=n_k$.

If ${\cal D} = \{ {\cal D}_1, {\cal D}_2, \ldots, {\cal D}_n \}$, each of the same number of points, then the mean of ${\cal D}$ is simply the mean (expectation) of the individual means:

$${\cal E}[{\cal D}] = \frac{1}{n} \sum\limits_{i=1}^n {\cal E}[{\cal D}_i]$$

The variance sum law states is just the sum of the individual variances (for non-zero variances):

$${\rm Var}[{\cal D}] = \sum\limits_{i=1}^n {\rm Var}[{\cal D}_i]$$