Thursday, November 2, 2017

integration - Double Integral using Polar Co-ordinates

Can someone please help me as to how to calculate this double integral using polar co-ordinates - please see attached picture: double int. polar co-ords

modular arithmetic - Calculating the summation of $n bmod i$


This is a codeforces question, where we have to calculate the sum of $N\bmod i$ modulo $10^9 + 7$ where $i$ goes from $1$ to $M$.


$N$ and $M$ are very large values about $10^{13}$.



They have provided an editorial for this question, but I dont understand it completely.


I understand why they rewrote the question like this $$mn - \sum_{n=1}^{\min(n,m)} \left \lfloor{\frac{n}{i}}\right \rfloor i$$


I also understand the inequality they wrote ( which was obtained from the fact that factors of a number are less than or equal to its square root since floor(n/i) is a factor of n) $$ \left \lfloor{\frac{n}{i}}\right \rfloor <= (n)^{1/2} $$ But I dont understand anything that they did further, what are the two sums the are talking about and how did the reduce the summation? Any help is appreciated :)


Answer



A very similar problem is present on spoj: SUMPRO


C++ implementation to find the summation of i*(n/i) from i=1 to n for t number of testcases is given below:


#include
#include
using namespace std;
int main()

{
long long t,n,sqrt_n;
long long mod = 1000000007;
cin>>t;
while(t--){
cin>>n;
sqrt_n = sqrt(n);
long long sum = 0;
//finding summation of N/i *i from i=1 to sqrt(N)
for(long long i=1; i<=sqrt_n; i++)

sum = sum + (n/i)*i;
// after i=sqrt(N), there is no need to iterate further bcoz value of N/i will either decrease by 1 or remain same
for(long long i=n/sqrt_n-1; i>=1; i--)
{
long long lower_limit = n/(i+1);
long long upper_limit = n/i;
long long tmp = ((upper_limit*(upper_limit+1))/2 - (lower_limit*(lower_limit+1))/2);
sum = sum + tmp*i;
}
cout<
}
return 0;
}

Complexity of this solution is O(sqrt(N)) for each testcase. If you wanna print the actual sum, don't perform the modulo operation in cout<.


probability - Proof of the monotone convergence theorem for the conditional expectation

Let




  • $(\Omega,\mathcal A,\operatorname P)$ be a probability space

  • $\mathcal F$ be a $\sigma$-algebra on $\Omega$ with $\mathcal
    F\subseteq\mathcal A$

  • $X_n,X$ be non-negative random variables on $(\Omega,\mathcal A,\operatorname P)$




The monotone convergence theorem for the conditional expectation states, that if $X_n\uparrow X$ almost surely, then $$\operatorname E\left[X_n\mid\mathcal F\right]\stackrel{n\to\infty}\to\operatorname E\left[X\mid\mathcal F\right]\;.$$



Clearly, by the monotonicity of the conditional expectation, $$Z:=\lim_{n\to\infty}\operatorname E\left[X_n\mid\mathcal F\right]$$ exists. Since each $\operatorname E\left[X_n\mid\mathcal F\right]$ is $\mathcal F$-measurable by definition, $Z$ is $\mathcal F$-measurable, too.



Why is it not that clear, that $$\operatorname E\left[X_n\mid\mathcal F\right]\uparrow Z\;?\tag{1}$$ All proofs I've read so far only state, that there is a modification (version) of $Z$ with $(1)$.



Clearly, the conditional expectation is only almost everywhere uniquely determined. So, the monotonicity only yields $$\operatorname E\left[X_n\mid\mathcal F\right]\le \operatorname E\left[X_{n+1}\mid\mathcal F\right]$$ on $\Omega\setminus N_n$ for some $\operatorname P$-null set $N_n\subseteq\Omega$. However, since $$N:=\bigcup_nN_n$$ is a $\operatorname P$-null set, too, we should be able to immediately conclude, that $(1)$ holds on $\Omega\setminus N$, i.e. almost everywhere.



So, what am I missing?

linear algebra - What subspace of 3 x 3 matrices is spanned by the invertible matrices? Rank 1 matrices? [GStrang P181, 3.5.29(a)(b)]


What subspace of $3$ by $3$ matrices is spanned (take all combinations) by
(a) the invertible matrices?
(b) the rank one matrices?




Answer: (a) The invertible matrices span the space of all $3$ by $3$ matrices.
(b) The rank one matrices also span the space of all $3$ by $3$ matrices. $\quad \square$



P144: The rank of a matrix is its number of pivots.
P171: A set of vectors spans a space if their linear combinations fill the space.




How'd you divine that these matrices fulfill the questions? The answers don't explain.



For (a), I recalled that invertible matrices have $n$ pivots (1 in each row) and so $n$ linearly-independent columns.




(b) Rank one matrices must've only 1 pivot. Thus, its $n - 1$ columns are linearly dependent. Then what?



This question precedes dimensions/theorems of the 4 subspaces, Orthogonality, Determinants, eigenvalues and eigenvectors, and linear transformations. Please pretermit them.






Supplementary added on Nov 26



The standard basis for $\mathbb{M}_{n \times n}$ is $\{E(i, j)\}_{1 \le i, j\le n}$ with $1$ in the $i$th row and $j$th column and $0$ elsewhere. Call this $S$.





  1. Is the next step rewriting, in terms of $S$, all (a) the invertible matrices and (b) rank one matrices.


  2. Then, how'd I describe the space of all the invertible matrices (neither a subspace nor a vector space)? Since these two matrices in Deven Ware's last equation have 3 and 2 pivots respectively, they're invertible, but don't span the set of all invertible matrices? $\left( \begin{array}{ccc}
    -1 & 0 & 0 \\
    0 & -1 & 0 \\
    0 & 0 & -1 \end{array} \right), \left( \begin{array}{ccc}
    1 & 0 & 0 \\
    1 & 1 & 0 \\
    0 & 0 & 1 \end{array} \right) $


  3. I know that each of the $n\cdot n$ matrices of size $n \times n$ in $S$ are rank one, but how'd I describe the set of all rank $1$ matrices?



Wednesday, November 1, 2017

The Formula to this Sequence Series

What is the formula for following sequence?



$$\frac12 + \frac12 \cdot \frac34 + \frac12 \cdot \frac34 \cdot \frac56 + ... + \frac12 \cdot \frac34 \cdot \frac56 ... \frac{2n - 1}{2n}$$



This is a question from my Calculus class about sequences.

trigonometry - Product of projections of equispaced rotating vector



When equal and equi-spaced forces are summed on y-axis what is vector sum? How do we derive the formula





$$ \sum_{k=1}^{n-1}\sin\frac{\pi k}{n} = \cot \frac{\pi}{2 n} $$




( Formula given by Marco Cantarini in comments below. )



By a similar token, can





$$ \prod_{k=1}^{n-1}\sin\frac{\pi k}{n}=\frac{2n}{2^n} $$




represent some physics force multiplication situation or any generalized law in which



this analogue is valid? (Formula mentioned by Jack D'Aurizio in a recent thread



Geometric proof of $\frac{\sin{60^\circ}}{\sin{40^\circ}...}$).


Answer



With some preliminary manipulations, both the identities can be derived by regarding




$$\zeta_k = \sin\frac{\pi k}{n}$$
as roots of a suitable Chebyshev polynomial, then applying Vieta's formulas - relations between the roots and the coefficients of a monic polynomial.


elementary set theory - How did Cantor demonstrate a bijection from $I=[0,1]$ to $I^n$?




"I See It, but I Don't Believe It."




Georg Cantor showed that sets of different dimensions can have the same cardinality; in particular, he demonstrated that there is a bijection between the interval $I= [0,1]$ and the $n$-fold product $I^{n} = I \times I \times \cdots \times I$.





Does anyone know specifically how this was done?


Answer



I am not sure if Cantor did it this way, but this argument works: any number $x$ in $[0,1]$ has an expansion to base $2$: $x=\sum \frac {a_k} {2^{k}}$ where $a_k =0$ or $a_k=1$ for each $k$. This expansion is not unique but it can be made unique by avoiding expansions with $a_k=1$ for all but finitely many $k$ (except when $x=1$). Now let $r \in \{0,1,2,...,n-1\}$ and form a sequence $(b_k^{(r)})$ using the coefficients $a_k$ with $k=r\, \pmod{n}$. Let $x_r$ be the number whose expansion to base $2$ has the coefficient sequence $(b_k^{(r)})$. Then the map $x \to (x_1,x_2,...,x_n)$ is a bijection.



A correction: it has been pointed out that $x=1$ causes problem in this argument. (See comment by Henno Brandsma). As suggested we can use the proof to show that there is a bijection between $[0,1)$ and $[0,1) \times [0,1)\times \cdots\times [0,1)$ and use the fact that there are bijections between $[0,1)$ and $[0,1]$ as well as between $[0,1) \times [0,1)\times \cdots \times [0,1)$ and $[0,1] \times [0,1]\times \cdots \times [0,1]$


analysis - Injection, making bijection

I have injection $f \colon A \rightarrow B$ and I want to get bijection. Can I just resting codomain to $f(A)$? I know that every function i...