# Repeatedly taking differences on a polynomial yields the factorial of its degree?

Consider a function such that it takes in polynomial function and creates an array of its outputs and then using that array creates another new array by calculating the absolute difference between the first $2$ values and keeps doing this until it reaches an array full of zeros.

This is much easier to show you by example.

For example take $F(x)= x^2$, the first array would be

$1,4,9,16,25,36,49,64,81$ and so on, the second would be

$3,5,7,9,11,13,15,17,19$ ( the difference between the first value and the second one)

but the third one is where it gets interesting as if we continue the pattern we would get an array filled with only $2$'s and after that it would only be zeros.

Lets do another example, $F(x)=x^3$

$1,8,27,64,125,216,343$

$7,19,37,61,91,\dotsc$ but here is the interesting part if we continue this

$12,18,24,30,\dotsc$ and once more then we get

$6,6,6,6,6,\dotsc$ after that it would just be an array of zeros

There are $2$ main observation that I made about this

Firstly, the value that is begin repeated indefinitely is equals to the factorial of the functions power. Meaning that for $F(x)=x^2$ the value being repeated is $2!$. For $F(x)=x^3$ , it's $3!$ and this is true for all polynomials (I tried it up to $x^7$, after that it got too messy)

Secondly, the value that is repeated always occurs on the $n$th iteration of the function. Meaning that for $F(x)=x^2$, we have to go through the processes $2$ times before we find the value. For $F(x)=x^3$, we have to go through it $3$ times before getting the value.

Is there any way to prove this and does this mean anything at all?

• Lookup finite differences ("an $n^{th}$ power has a constant $n^{th}$ finite difference") . Also for example this answer. – dxiv Jun 12 '17 at 3:25
• Good. You discovered a concept (through on a sequence basis) very similar to derivative. An excellent mind of discovering and inducting. Continue it if you are still young and have enough time. – BAI Jun 12 '17 at 4:45
• Welcome to Math.SE! Since one aim of the site is to collect questions and answers in forms useful for posterity, would you please consider re-titling your question to indicate its content? (Perhaps something like "Repeated differences for polynomial functions at equally-spaced inputs"...?) – Andrew D. Hwang Jun 12 '17 at 11:18
• – Simply Beautiful Art Jun 12 '17 at 17:21
• @user21820 your edit to the question is a great example of what a good title can do for a better understanding of a given topic and to promote the curiosity of the reader. – iadvd Jun 13 '17 at 0:12

## 2 Answers

Here's a fact:

• If $p(x)$ is a polynomial of degree $n$ with leading term $ax^n$ then $p(x+1)-p(x)$ is a polyomial of degree $n-1$ with leading term $a \, n \, x^{n-1}$.

(I'll prove this fact below).

Applying this fact together with an induction argument, it follows that after repeating the process $n$ times, one obtains a polynomial of degree zero whose leading term is $$a \, n \, (n-1) \ldots (2) (1) = a \, n!$$ which is just a constant having that value.

So if the original leading coefficient $a$ is equal to $1$, as it is in the specific cases $F(x)=x^n$ that you ask about, repeating the difference process $n$ times yields a constant sequence of $n!$ as you ask.

Here's a proof of the fact by applying induction (the base case $n=1$ is easy).

Assuming the induction hypothesis for polynomials of degree $\le n-1$, suppose that $$p(x) = a \, x^n + q(x)$$ where $q(x)$ is a polynomial of degree $\le n-1$.

We have $$p(x+1)-p(x) = a \, (x+1)^n - a \, x^n + \underbrace{(q(x+1)-q(x))}_{r(x)}$$ and $r(x)$ is a polynomial of degree $\le n-2$ by induction. Thus $$p(x+1)-p(x) = a \, (x^n + n \, x^{n-1} + s(x)) - a\, x^n + r(x)$$ where $s(x)$ is also a polynomial of degree $\le n-2$ (by application of the binomial theorem). Therefore $$p(x+1)-p(x) = a \, n \, x^{n-1} + (a \, s(x)+r(x))$$ which is a polynomial of degree $n-1$ with leading term as required.

What you have discovered/invented is known as the forward difference operator $D$ defined as: $\def\nn{\mathbb{N}} \def\zz{\mathbb{Z}} \def\lfrac#1#2{{\large\frac{#1}{#2}}} \def\lbinom#1#2{{\large\binom{#1}{#2}}}$

$D = ( \text{function$f$on$\zz$} \mapsto ( \text{int$n$} \mapsto f(n+1) - f(n) ) )$

Namely for any function $f$ on $\zz$ and $n \in \zz$, $D(f)(n) = f(n+1) - f(n)$.

If you think of the functions as sequences (infinite in both directions), then taking the forward difference means replacing each term with the value of the next term minus itself. What you did is essentially to repeatedly take the forward difference of the sequence of cubes:

...,-27,-8,-1, 0, 1, 8,27,...
..., 19, 7, 1, 1, 7,19,37,...
...,-12,-6, 0, 6,12,18,24,...
...,  6, 6, 6, 6, 6, 6, 6,...
...,  0, 0, 0, 0, 0, 0, 0,...
...,  0, 0, 0, 0, 0, 0, 0,...

This powerful abstraction makes it easy to get a lot of things. For instance, the numbers obtained here can be easily used to obtain the general formula for sum of cubes!

General method for indefinite summation

The key is that:

$D\left( \text{int$n$} \mapsto \lbinom{n}{k+1} \right) = \left( \text{int$n$} \mapsto \lbinom{n}{k} \right)$ for any $k \in \zz$.

This is to be expected because it follows directly from Pascal's triangle, especially if we define $\lbinom{n}{k}$ using the triangle.

This means that if we have any function $f$ on $\zz$ such that $f(n) = \sum_{k=0}^\infty a_k \lbinom{n}{k}$ for any $n \in \zz$, then we get the Newton series:

$D(f)(n) = \sum_{k=0}^\infty a_{k+1} \lbinom{n}{k}$ for any $n \in \zz$.

From a high-level perspective, this is the discrete version of the Taylor series, and indeed for such a function we easily see that $f(n) = \sum_{k=0}^\infty D^k(f)(0) \lbinom{n}{k}$ for any $n \in \zz$, because $\binom{0}{0} = 1$ while $\lbinom{0}{k} = 0$ for any $k \in \nn^+$.

This works for any polynomial function $f$ on $\zz$, since $D^k(f)$ is the zero function once $k$ is larger than the degree of $f$, so we can use it to immediately find the series for $(\text{int n} \mapsto n^3)$, and then just take the anti-difference by shifting the coefficients of the series the other way. The undetermined constant that appears will drop out once we perform a definite sum like if we want the sum of the first $m$ cubes.

Note also that $D^k(f)$ is the constant function with value $k!$ if $f(n) = n^k$ for every $n$. Lee Mosher has already explained this particular fact by directly proving it, but another way to see it is that the highest order term in its Newton series is $k! \lbinom{n}{k}$, because $\lbinom{n}{k}$ is the only term that can contribute the $k$-th power of $n$. Since $D$ merely shifts the coefficients, $D^k(f) = \left( \text{int$n$} \mapsto k! \lbinom{n}{0} \right)$ and we are done.

Sum of $p$ powers

For example if we want $\sum_{k=1}^{n-1} k^3$ we first find the iterated forward differences of the sequence of cubes $( n^3 )_{n \in \zz}$:

..., 0, 1, 8,27,64,...
..., 1, 7,19,37,...
..., 6,12,18,...
..., 6, 6,...
..., 0,...

So we immediately get $n^3 = 0 \binom{n}{0} + 1 \binom{n}{1} + 6 \binom{n}{2} + 6 \binom{n}{3}$ and hence $\sum_{k=0}^{n-1} k^3 = 0 \binom{n}{1} + 1 \binom{n}{2} + 6 \binom{n}{3} + 6 \binom{n}{4} = \lfrac{n(n-1)}{2} \Big( 1 + \lfrac{6(n-2)}{3} \big( 1 + \lfrac{n-3}{4} \big) \Big) = \Big( \lfrac{n(n-1)}{2} \Big)^2$.

Computation efficiency

This is far more efficient than the usual method (namely by taking summation on both sides of $(n+1)^3-n^3 = 3n^2+3n+1$ and telescoping) because the series using binomial coefficients is easy to manipulate and easy to compute. For sum of $p$-powers we only need $O(p^2)$ arithmetic operations to find the forward-differences and then $O(p^2)$ more to simplify the series form into a standard polynomial form. In contrast, the other method requires $O(p^3)$ arithmetic operations.

Indefinite summation of non-polynomials

Also, for a wide class of non-polynomial functions, we can still compute the indefinite sum without using the series, by using the discrete analogue to integration by parts, here called summation by parts.

To derive it, simply check that $D(f \times g)(n) = f(n+1) g(n+1) - f(n) g(n) = f(n+1) D(g)(n) - D(f)(n) g(n)$ and so we get the product rule:

$D(f \times g) = R(f) \times D(g) + D(f) \times g$

where $R$ is the right-shift operator defined as:

$R = ( \text{function$f$on$\zz$} \mapsto ( \text{int$n$} \mapsto f(n+1) ) )$

Namely for any function $f$ on $\zz$ and $n \in Z$, $R(f)(n) = f(n+1)$.

For convenience we also define the summation operator:

$S = ( \text{function$f$on$\zz$} \mapsto ( \text{int$n$} \mapsto \sum_{k=0}^{n-1} f(k) ) )$

Then we have the important property that $DS(f) = f$ for any function $f$ on $\zz$, analogous to the fundamental theorem of calculus.

Now by substituting $f$ with $S(f)$ into the product rule and taking summation on both sides we get summation by parts:

$S( f \times g ) = S(f) \times g - S( R(S(f)) \times D(g) ) + c$ for some constant function $c$ on $\zz$.

Example indefinite sum

Using this we can easily compute things like $\sum_{k=1}^n k^3 3^k$ by applying it three times, each time reducing the degree of the polynomial part. There are other ways to achieve this using differentiation, but this method is purely discrete.


Study Guides (248,357)
United States (123,340)
MATH 4389 (17)
Almus (17)
Final

# MATH 4389 Final: Real_Analysis(part_2) Premium

28 Pages
72 Views

School
Department
Mathematics
Course
MATH 4389
Professor
Almus
Semester
Spring

Description
PART II. SEQUENCES OF REAL NUMBERS II.1. CONVERGENCE Deﬁnition 1. A sequence is a real-valued function f whose domain is the set positive integers (N). The numbers f(1),f (2), ··· are called the terms of the sequence. Notation Function notation vs subscript notation: f(1) ≡ 1 ,f (2) ≡2s ,··· ,f (n) n s , ··· . In discussing sequences the subscript notation is much more common than functional notation. We’ll use subscript notation throughout our treatment of analysis. Specifying a sequence There are several ways to specify a sequence. 1. By giving the function. For example: 1 1 1 1 1 1 (a) sn= n or {sn} = n . This is the sequence {12 ,3 ,4 ,...,n,... }. (b) s = n − 1. This is the sequence {0, ,2 , 3,...,n − 1,... }. n n 2 3 4 n (c) sn=( −1) n . This is the sequence {−1,4,−9,16,..., (−1) n ,... }. 2. By giving the ﬁrst few terms to establish a pattern, leaving it to you to ﬁnd the function. This is risky – it might not be easy to recognize the pattern and/or you can be misled. (a) {sn} = {0,1,0,1,0,1,... }( The pattern here is obvious; can you devise the function? It’s 1 − (−1)n) 0, n odd sn= or s n= 2 1, n even 2 (b) {s } = 2, 5,10,17 ,6 ,... ,s = n +1 . n 2 3 4 5 n n (c) {sn} = {2,4,8,16,32,... }. What is6s ? What is the function? While you might say 64 n and s n2 , the function I have in mind gives s6= π/6: n π 64 sn=2 +( n − 1)(n − 2)(n − 3)(n − 4)(n − 5) − 720 120 3. By a recursion formula. For example: (a) s = 1 s ,s = 1. The ﬁrst 5 terms are 1,1, , 1 , 1 ,.... Assuming that n+1 n +1 n 1 2 6 24 120 1 the pattern continues n = . n! 1 (b) sn+1 = (n +1) ,s 1 = 1. The ﬁrst 5 terms are {1,1,1,1,1,... }. Assuming that the 2 pattern continues n = 1 for all n; {n } is a “constant” sequence. 13 Deﬁnition 2. A sequence {s }nconverges to the number s if to each > 0 there corresponds a positive integer N such that |s − s| for all n>N. n The number s is called the limit of the sequence. Notation “{s } converges to s” is denoted by n n→∞ sn= s, or by limsn= s, or by n → s. A sequence that does not converge is said to diverge. Examples Which of the sequences given above converge and which diverge; give the limits of the convergent sequences. THEOREM 1. If s → s and s → t, then s = t. That is, the limit of a convergent sequence is unique. Proof: Suppose s 6= t. Assume t>s and let = t − s. Since sn→ s, there exists a positive integer N such that |s − s | / 2 for all n>N . Since s → t, there exists a positive integer 1 n 1 n N 2 such that |t−s n / 2 for all n>N 2. Let N = max{N ,N1} a2d choose a positive integer k>N . Then t − s = |t − s| = |tk− s k s − s|≤| t k s | + |sk− s |+< = = t − s, 2 2 a contradiction. Therefore, s = t. THEOREM 2. If {s } connerges, then {s } is bnunded. Proof: Suppose s → s. There exists a positive integer N such that |s−s | < 1 for all n>N . n n Therefore, it follows that |sn| = |n − s + s|≤| sn− s| + |s| < 1+ |s| for alln>N. Let M = max{|s |, |s |, ..., |s |, 1+ |s|}. Then |s | N. If an→ 0, then s →n0. Proof: Note ﬁrst that a ≥n0 for all n>N . Since a → 0,nthere exists a positive integer N 1 such that |an| < /k. Without loss of generality, assume that1N ≥ N. Then, for all n>N 1, |sn− 0| = |sn|≤ ka n
More Less

Related notes for MATH 4389
Me

OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Join to view

OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.


Suppose we take a sample of numbers with unique congruence class modulo p:

x_0 ≡ 0 (mod p)
x_1 ≡ 1 (mod p)
x_2 ≡ 2 (mod p)
...
x_(p-2) ≡ p-2 (mod p)
x_(p-1) ≡ p-1 (mod p)

and we then examine their class under modulo q. How will these classes be distributed? For example, will some values appear more often than others? Or might they be uniform in number or all unique? I imagine this result would depend on if p<q or p>q, and perhaps other things.

Specific, numerical example

15 = 5(3) ≡ 0 (mod 5)
26 = 5(5)+1 ≡ 1 (mod 5)
37 = 5(7)+2 ≡ 2 (mod 5)
58 = 5(11)+3 ≡ 3 (mod 5)
69 = 5(13)+4 ≡ 4 (mod 5)

and

15 ≡ 1 (mod 2)
26 ≡ 0 (mod 2)
37 ≡ 1 (mod 2)
58 ≡ 0 (mod 2)
69 ≡ 1 (mod 2)

and

15 ≡ 3 (mod 6)
26 ≡ 2 (mod 6)
37 ≡ 1 (mod 6)
58 ≡ 4 (mod 6)
69 ≡ 3 (mod 6)

• If you sample the $x_i$ values uniformly, then I imagine their remainders modulo $p$ is uniform, so that the following remainders modulo $q$ are also uniform. – Bill Wallis Jul 10 '18 at 19:08
• That seems vaguely intuitive to me as well (and for my purposes, I'd like that to be true in general), but I'd like for someone to prove that if it is the case. Then again, it can't be completely true, right, since when q>p, we'll never get the larger modulo values, larger than p-1? – Steve Jul 10 '18 at 19:11
• If $q<p$ and the samples are uniform $\bmod p$, they can be uniform $\bmod q$ only if $q|p$ (pigeonhole principle) – gammatester Jul 10 '18 at 19:12
• An example of something I'd like to know if ever occurs, say we have sample (0,1,2,3,4,5,6.....20) in mod 21, is it possible to get a skewed distribution like (0,1,1,1,4,1,0,1,1,0,3) in mod 11 where there are "more 1s than expected"? – Steve Jul 10 '18 at 19:28
• @Steve: If $p=2$, there's nothing stopping you from taking large values of $x$ like $x_0 = 384$ and $x_1 = -7447$. – user14972 Jul 10 '18 at 23:18

Recall the Chinese Remainder Theorem; in one form, it says that if $p$ and $q$ are relatively prime integers, then there is a bijective correspondence between the

• residue classes modulo $pq$
• pairs consisting of a residue class modulo $p$ and a residue class modulo $q$

Furthermore, given any integer $x$, its residue classes modulo $pq$, $p$ and $q$ are related by this correspondence.

In particular, integers fall into every combination of residues modulo $p$ and $q$, and they do so exactly once per period of length $pq$. So knowing the residue class of an integer modulo $p$ tells you absolutely nothing about its residue class modulo $q$.

And while the notion of a uniform distribution doesn't actually make sense for the integers, this periodic behavior still allows us to capture the idea that such a thing would have independent distributions modulo $p$ and $q$.

In the example of taking $p=21$ and $q=11$, we can give this bijection by explicit formula (discussions of the CRT should show how to obtain this):

• $22 x - 21 y \equiv x \bmod 21$
• $22 x - 21 y \equiv y \bmod 11$

Similarly, any other integer with the same residue as $22x - 21y \bmod 231$ will also satisfy these congruences.

So, given any choice of twenty-one residue class modulo 11, you could find a sequence of $x$'s that have the chosen residues $\bmod 11$ along with the required residues $\bmod 21$. For example, if you want all $1$'s, then we can take

$$x_n = 1 + 22(n-1)$$

to get

• $x_n \equiv n \bmod 21$
• $x_n \equiv 1 \bmod 11$
• This is fantastic and I think I roughly follow what you're saying and at least understand it's impact in a very generalized sense. In your explicit example, 1, 23, 45, 67, ..., 199, 221 are all 1 mod 11 while running across the 0,1,2,...,11 spectrum of values under mod 21. This is helpful because it allows me to refine my question back to my original post, however. What if we restrict ourselves to numbers which not only are sequential in mod 21, but rather are strictly sequential numbers (x, x+1, x+2, ...). Can we know anything about these numbers under mod q? – Steve Jul 11 '18 at 12:48
• I'm realizing now, maybe my question is stupid and obvious afterall. Can you tell me if this follows? Let a, p, q be constant integers. Let x_n= ap+n for n={0,1,...p-1}. Then x_n (mod p) ≡ n. Observe that ap (mod q) ≡ B for some integer B. Thus, x_n (mod q) = ap+n (mod q) ≡n (mod q)+B, so the residues unders mod q are "uniformly distributed" save some wrapping around if q is smaller than p. Is this correct? – Steve Jul 11 '18 at 13:02

If you take any $q$ successive numbers, there will be one in each congruence class $\bmod q$. You start with the lowest one in its class, the next is in the next class up, and so on, wrapping around at $0$. When you get to $q$ you have put one in each class and are ready to start again. If you take $p$ successive numbers where $q\not | p$ you will have two different counts among the congruence classes. Let $r$ be the remainder on dividing $p$ by $q$. There will be $q-r$ classes with $\lfloor \frac pq \rfloor$ because you go around fully that many times. There will be $r$ classes with one more because you have $r$ numbers left after the full cycles.


Definite integral - possible evaluation using real methods?

The book "inside interesting integrals" gives the following exercise for the chapter about contour integration and the residue theorem: $$\int_{0}^\infty \frac{e^{\cos x}\sin(\sin x)}{x}dx=\space\space ?$$ This can be solved using the function $$f(z)=\frac{\exp(e^{iz})}{z}$$ on a quarter-circular contour, and is pretty straightforward. The answer turns out to be $$\frac{\pi}{2}(e-1)$$ However, in the book, the author makes the following comment:

Edward Copson (1901-1980), who was professor of mathematics at the University of St. Andrews in Scotland, wrote "A definite integral which can be evaluated using Cauchy's method of residues can always be evaluated by other means, though generally not so simply." Here's an example of what Copson meant, an integral attributed to the great Cauchy himself. It is easily done with contour integration, but would (I think) otherwise be pretty darn tough.

Does anyone know how to evaluate this integral using real methods?

• This question should actually get more attention... I already grabbed my popcorn to see how real methods come in action. If this does not get attention I'm considering to put a bounty on it (if that is possible, I don't know how that works). – Shashi Jan 7 '18 at 21:14
• I have put a bounty on this question. @Nilknarf Are there some updates concerning this question? – Shashi Jan 8 '18 at 20:47
• @Shashi No... Do you suggest that I add anything in particular to the question? – Frpzzd Jan 8 '18 at 23:55
• I was curious whether you have solved it in the mean time – Shashi Jan 9 '18 at 8:00

Perhaps surprisingly, a straightforward trick works. To this end we refer to the following easy-to-prove lemma.

Lemma. Define $\operatorname{Si}(x) = \int_{0}^{x} \frac{\sin t}{t} \, dt$. Then

1. $\int_{0}^{x} \frac{\sin(yt)}{t} \, dt = \operatorname{Si}(xy)$, and
2. $\operatorname{Si}(x) = \frac{\pi}{2} + \mathcal{O}(x^{-1})$ as $x \to \infty$.

Then for $R > 0$,

\begin{align*} \int_{0}^{R} \frac{e^{\cos x}\sin(\sin x)}{x} \, dx &= \int_{0}^{R} \frac{1}{x}\operatorname{Im}(e^{e^{ix}}) \, dx \\ &= \int_{0}^{R} \frac{1}{x}\sum_{n=1}^{\infty} \frac{\sin(nx)}{n!} \, dx \\ &= \sum_{n=1}^{\infty} \frac{1}{n!} \int_{0}^{R} \frac{\sin(nx)}{x} \, dx \\ &= \sum_{n=1}^{\infty} \frac{1}{n!} \operatorname{Si}(nR) \\ &= \sum_{n=1}^{\infty} \frac{1}{n!} \left( \frac{\pi}{2} + \mathcal{O}\left( (nR)^{-1} \right) \right) \\ &= \frac{\pi}{2}(e - 1) + \mathcal{O}(R^{-1}) \end{align*}

Letting $R \to \infty$ proves the claim.

• Not thought about a single contour and yet so simple! Conclusion: the author of the book lied lol (jk I know one does not have full vision on everything) – Shashi Jan 9 '18 at 8:03

$$e^{\cos x}\sin(\sin x) = \text{Im}\, e^{\cos x+i\sin x} = \text{Im}\exp\left(e^{ix}\right) = \text{Im}\sum_{n\geq 0}\frac{e^{nix}}{n!}=\sum_{n\geq 1}\frac{\sin(nx)}{n!}$$ and since $\int_{0}^{+\infty}\frac{\sin(nx)}{x}\,dx = \frac{\pi}{2}$ for any $n>0$, we have $$\int_{0}^{+\infty}\frac{e^{\cos x}\sin(\sin x)}{x}\,dx = \frac{\pi}{2}\sum_{n\geq 1}\frac{1}{n!}=\color{red}{\frac{\pi}{2}(e-1)}.$$

• Is it true that interchanging series and integral is allowed since the series with sine is uniformly convergent? The answer is so neat. I guess it is even easier with Real methods after seeing the answers. – Shashi Jan 9 '18 at 7:55
• "Real methods=without Residue Theorem " in the last comment – Shashi Jan 9 '18 at 8:06
• @Shashi: indeed, this is a small variation on the improper Riemann-integrability of $\frac{\sin x}{x}$ on $\mathbb{R}^+$, which can be proved by real (Fourier-analytic), almost-real (Laplace transform) or complex techniques (residue theorem) in few steps, anyway. – Jack D'Aurizio Jan 9 '18 at 14:45


# What is zero? Irrational or rational or it have both the properties? [duplicate]

We say,

A number is rational if it can be represented as $\frac{p}{q}$ with $p,q \in \mathbb Z$ and $q\neq 0$.

Any number which doesn't fulfill the above conditions is irrational.

It can be represented as a ratio of two integers as well as ratio of itself and an irrational number such that zero is not dividend in any case.

People say that $0$ is rational because it is an integer. Which I find to be a lame reason. May be any strong reason is there. Can any one tell me please?

## marked as duplicate by Jack M, Chappers, N. F. Taussig, Dietrich Burde, Joel Reyes NocheMay 19 '15 at 12:21

• $0$ can be represented as $0/1$, therefore by your definition it is rational. – TonyK May 19 '15 at 10:30
• And it can also be shown as $\frac{0}{\sqrt{2}}$. Then what? – Man_Of_Wisdom May 19 '15 at 10:30
• $1=\frac{\sqrt{2}}{\sqrt{2}}$. So? – Hayden May 19 '15 at 10:31
• Or less trivially, $2=\frac {\sqrt 8} {\sqrt 2}$ – Jack M May 19 '15 at 10:40
• You may simply notice that $q=\sqrt(2) \not\in \mathbb{Z}$ – Manlio May 19 '15 at 10:42

The definition of an irrational number is that it is not rational. And $0$ is by definition a rational number.

• Why should I consider it a rational number if it can be represented as $\frac{0}{\sqrt{2}}$ – Man_Of_Wisdom May 19 '15 at 10:27
• @Man_Of_Wisdom: What about $\sqrt2/\sqrt2$ then? Do you consider that irrational? – John Bentin May 19 '15 at 10:33
• Nope. No. Not.. – Man_Of_Wisdom May 19 '15 at 10:45
• @Alwin can you please roll back your edit to the fresh one. Which includes only two lines? I want to accept that because it answers at hand! – Man_Of_Wisdom May 19 '15 at 11:10
• Do you mean this one above? – Alwin May 19 '15 at 11:25

I think you're confusing some of the language in the definition. The definition says that if a number may be written in a certain way, namely as a fraction in which both numerator and denominator are integers, then it's rational. If it cannot be written this way, then it is irrational. There is nothing in the definition that prevents a rational number from being written as a fraction in other ways, such as having rational or irrational numerator or denominator.

The phrase "Any number which doesn't fulfill the above conditions is irrational" does NOT say "Any number which can be written as a fraction $\frac{p}{q}$ with $p,q\notin \mathbb{Z}$ is irrational". It simply says any number that can not be written $\frac{p}{q}$ with $p,q\in \mathbb{Z}$ is irrational.

• One could also use the irrationality critereon to show zero can't be an irrational number. – Rammus May 19 '15 at 11:49

$r$ is rational if you find integers $p,q$ such that $r=\dfrac pq$. This is obviously the case for $r=0$.

The contraposition of this property is "$r$ is irrational if you cannot find integers $p,q$ such that $r=\dfrac pq$".

The contraposition is not at all "$r$ is irrational if you find irrationals $p,q$ such that $r=\dfrac pq$". (By the way, this would be a somewhat circular definition.)

$\newcommand{\Reals}{\mathbf{R}}$You've got excellent explanations of the logical reasons for saying "$0$ is rational". Here are some complementary thoughts too long for a comment:

Definitions in mathematics exist to give convenient labels to useful logical distinctions. "Convenient" is a loose term, but generally refers to simplifying statements of theorems and facilitating common types of discussion.

When two criteria (such as "rational" and "irrational") are logical opposites by definition, it's never a good idea to allow some widespread mathematical concept (such as $0$) to be "both": If you do, every theorem that would apply to that object has to contain a clause explicitly excluding that object. That's inconvenient. In rare cases (see below), you might say "neither". But in the case of $0$, "rational" is the better label:

• Literal application of the definition ("there exist integers $q \neq 0$ and $p$ such that $0 = p/q$") says $0$ is rational.

• The set of rational numbers has pleasant algebraic properties (closed under addition, closed under multiplication) because $0$ is rational. (By contrast, the set of irrational real numbers is not closed under addition, e.g., $(1 - \sqrt{2}) + \sqrt{2} = 1$, or under multiplication, e.g., $\sqrt{2} \cdot \sqrt{2} = 2$, whether or not $0$ is rational.)

To make a case that "$0$ is not rational", i.e., that the definition of "rational number" should exclude $0$, one would want a compelling reason, such as "the statement of a useful theorem becomes awkward if $0$ is (regarded as) rational".

With due respect, the possibility of writing $0$ as $0/\sqrt{2}$ isn't compelling in the above sense; as others have explained, this representation does not contravene the definition. Further, it's useful, and causes no hardship, to agree that $0$ is rational.

For contrast, here are some other "edge cases" that crop up now and again:

• The integer $0$ is "even" ($2$ times some integer) rather than "odd" (leaves a remainder of $1$ on division by $2$). (By the division algorithm, every integer is even or odd, but no integer is both. In this setting, "even" and "not odd" are logically equivalent for integers. I mention this example because a colleague once informed me that some teachers regard $0$ as neither even nor odd.(!!))

• The zero function $z: \Reals \to \Reals$ is both "even" (for all real $x$, $z(-x) = z(x)$) and "odd" (for all real $x$, $z(-x) = -z(x)$). The notions of "even" and "odd" for functions are not logical opposites. Moreover, it is useful to declare the zero function to be both even and odd: The set of even functions is a vector space under "the usual operations"; the set of odd functions is, too. If $z$ were not "both even and odd (as a function)", at least one of these useful theorems would be false.

• The integer $1$ is neither "prime" nor "composite". (Even though "$1$ has no positive integer factors other than $1$ and itself", we explicitly exclude $1$ from membership in the primes because declaring $1$ "prime" would spoil the uniqueness of prime factorization. On the other hand, $1$ is not "composite" because $1$ is not a product of smaller positive primes.)

There's a deeper point that, ironically, may seem at odds with my earlier stance: Mathematical definitions are human conventions, not absolute, immutable, incontestable features of logic, mathematics, or the physical universe. I suspect this raises unnecessary obstacles for the philosophically-minded who study mathematics. (Everything and More by David Foster Wallace is the most extreme example I've encountered; Wallace seemed tormented by the ontology of infinity.)

On the other hand, when one sees how tightly mathematics hangs together across times and cultures, how definitions lead to the same theorems, one is forced (even fully accepting the preceding paragraph) to admire the phenomenal coherence of the logical structure of mathematics. One starts to feel as if definitions are inevitable. One becomes willing to fight emphatically for the correct definitions. This last, I expect, explains the downvotes to your good question.

As I understand it, the definition of an irrational number is that it is not rational. By definition then, $0$ is rational.


Constructing a non-linear system with prerequisites about the nature of its critical points.

An exercise from the book I am reading is: "Construct a non-linear system that has four critical points:two saddle points, one stable focus, and one unstable focus."

I have tried many systems. I found one quickly but I was lucky even if I had a few clues thanks my previous trials.

I wonder if there is any way to find such systems using a not completely "gropingly way".

Edit: with only two equations in the system.

The system I have is:

$\dot{x}=y^2-x^2$

$\dot{y}=x^2+y^2-2$

• Is the dimension of system = 2 ? – nonlinearism Aug 2 '13 at 17:13
• Yes the dimension is 2 as it was in the chapter preceding this exercise, I should have written that also ^^ Thanks. – Ouistiti Aug 2 '13 at 22:44
• @Ouistiti: Was the answer helpful? What does your system look like? Where is this problem from? – Amzoti Aug 4 '13 at 1:29
• @Amzoti I will post my system above. The answer was very helpful, I learned more from your answer than I expected. Thank you :) The problem is from "Dynamical Systems with Applications using Mathematica®" written by Stephen Lynch. – Ouistiti Aug 5 '13 at 12:22
• @Ouistiti: It makes me very happy to hear that! If you write the four sets of eigenvalues for the Jacobian matrix at each critical point, It may be possible to set up an optimization problem to solve for the six parameters. Look forward to seeing your system and this was a fun problem. Regards – Amzoti Aug 5 '13 at 12:25

We need to choose a form for our system to give us exactly four critical points. This selection is not unique, hence, we can get more than one solution.

Lets choose a system with parameters that give us some degree of freedom. An example of a system that gives us four critical points and some degree of freedom is (there are other choices, this is not unique):

$$\tag 1 x' = a x + b x^2 + c x y = x(a + bx + cy)\\ y' = d y + e y^2 + f x y = y(d+ey + fx)$$

First thing we need to do is to find the critical points (recall, we need exactly four of them).

• $x = 0 \rightarrow y = 0$ or $y = -\dfrac{d}{e}$
• $y = 0 \rightarrow x = 0$ or $x = -\dfrac{a}{b}$
• $x \ne 0, y \ne 0 \rightarrow x = \dfrac{cd -ae}{be - cf}, y = \dfrac{af -bd}{be - cf},~~\text{with}~~ c \ne 0, be \ne cf$

Thus, our four critical points are (note the constraints above):

$$(0,0), ~\left(0, -\dfrac{d}{e}\right), ~\left(-\dfrac{a}{b}, 0\right), \left(\dfrac{cd -ae}{be - cf}, \dfrac{af -bd}{be - cf}\right)$$

The Jacobian matrix of $(1)$ is given by:

$$\tag 2 \displaystyle J(x, y) = \begin{bmatrix}\frac{\partial x'}{\partial x} & \frac{\partial x'}{\partial y}\\\frac{\partial y'}{\partial x} & \frac{\partial y'}{\partial y}\end{bmatrix} = \begin{bmatrix}a + 2bx + cy & cx \\ fy & d + 2 e y + fx \end{bmatrix}$$

Now, we have freedom when choosing the parameters with the goal to get two saddle points, one stable focus, and one unstable focus.

There is not a clean way to do this, but our problem now is to choose the parameters $a, b, c, d, e, f$ to make that happen by evaluating the eigenvalues of the Jacobian at each critical point, and choosing the parameters to give us the desired behavior.

I am going to crank these one at a time and keep my fingers crossed for the last critical point.

Point (0,0)

We have:

$$\displaystyle J(0, 0) = \begin{bmatrix} a & 0 \\ 0 & d \end{bmatrix}$$

Lets choose $a = -1, d = 1$ and this is our first saddle.

Point (0,-d/e)

We have:

$$\displaystyle J(0, -d/e) = \begin{bmatrix}a - (cd)/e & 0 \\ -(fd)/e & d -(2d)/e \end{bmatrix}$$

Lets choose $e = 1, c = -3$ and this is our second saddle.

Point (-a/b, 0)

We have:

$$\displaystyle J(-a/b, 0) = \begin{bmatrix} - a - (ac)/b & 0 \\ 0 & d -(af)/b \end{bmatrix}$$

Lets choose $b = 1, f = 1$ and this is our unstable focus.

Point $\left(\dfrac{cd -ae}{be - cf}, \dfrac{af -bd}{be - cf}\right)$

Well, this is where we need luck with the parameters we chose, but I think it might be possible to cast this problem as an optimization problem, so you might want to play around with that. This would give you ranges for these six parameters, so no guesswork is needed.

Anyway, from our parameter choices above, we get $x = y = -1/2$.

$$\displaystyle J(-1/2, -1,2) = \begin{bmatrix} -1/2 & 3/2 \\ -1/2 & -1 \end{bmatrix}$$

This, thankfully, gives us our stable focus.

Thus, we have the system:

$$\tag 1 x' = - x + x^2 -3 x y \\ y' = y + y^2 + x y$$

Lets draw the phase portrait and validate this analysis.

We have what we need with two saddles, an unstable and a stable focus at the four critical points.

I am curious how you did it (even if it is guessing) and what your system looks like and it would help to post your solution in your question.

Update

Here is the phase portrait of the system you wrote and it is also a good example.

• Great job. For my knowledge how did you come up with the second order system in (1)? By intuition ? – kaka Aug 3 '13 at 6:14
• @kaka: Yes, by intuition and a bit of handwaving. I wish I could say I had some wonderful approach to that. I realized that we needed something that could give us a point at (0,0) and then realized we needed a parabola that gave points at (0, w), and (f, 0) and one more at some (h, j). Thinking along those lines lead me to that system. Then, we needed freedom, so I added all of the parameters. I still think the approach can be improved using optimization for ranges on the parameters, but I'll let the OP work that. Thanks for the kind words. Regards – Amzoti Aug 3 '13 at 6:19
• @Amzoti: Wowwww. It is complete as always. Full of points, and finally a nice illustrating graph. – mrs Aug 3 '13 at 14:56
• This is a nice problem. Go for it! ;-) – Namaste Aug 4 '13 at 1:14


# What does it mean for a sequence to be decreasing in regards to the Integral Test for Convergence?

Example: $$\sum \limits_{n=1}^{\infty} n^k e^{-n}$$

This is the problem that I am to solve with the Integral test. I know that it converges, and I know the answer, but just don't fully get the point about it being decreasing.

How does one if a function is decreasing, the first derivative is less than zero.

$f^{\prime}\left(x\right) = \dfrac{\left(k-x\right)x^{k-1}}{e^x}$ is less than zero when $x > k$. I do understand that there is always an $x > k$. (Not really sure if what happens when $k = \infty$ leaving that issue till I learn more).

So my confusion comes to when can you say that a sequence is decreasing? What about when $x < k$: does the Integral test fail on that interval? Or just does the long-term behavior is all that matters? I mean what if just the very last number before infinity the sequence decreases, then will the Integral Test for convergence work?

Could you explain in the realm of sequences and series what does it truly mean to be decreasing? I do understand that I am just learning this, but don't be afraid to start at a high school level and build up your answers to a Field Medal level of understanding. :)

-
A sequence $a_n$ is decreasing if $a_{n+1} \le a_n$ for all $n$. –  Javier Mar 5 '13 at 13:54
@JavierBadia So what about the example I give, if $k = 3$ then for the first three terms its is not decreasing? Why doesn't that invalidate the Integral Test for Convergance? –  yiyi Mar 5 '13 at 13:55
The first terms don't affect convergence. You want to know what happens for $n$ large. –  L. F. Mar 5 '13 at 13:57
@L.F. Why don't the first terms don't affect convergance? That is really my question. Thanks for putting it into words. –  yiyi Mar 5 '13 at 13:57
Because there are only finitely many first terms, so their sum will always converge. As long as your sequence is defined, it can jump, fly, or hula hoop at the beginning for all that matters. What we really want to know, is if the "infinite portion" (i.e. what happens after a certain point) will sum to a value or not. –  L. F. Mar 5 '13 at 14:01

A sequence is of the form $\{x_n\}$, and a series is of the form $\sum \limits_{n=1}^{\infty} x_n$. So for a sequence $\{x_n\}$ to be decreasing means $x_1 > x_2 > x_3 > \ldots$.

As long as there is some $k$ such that $f(n)$ is decreasing for all $n > k$, the integral test applies.

Consider the series $\sum \limits_{n=1}^{\infty} f(n) = \sum \limits_{n=1}^k f(n) + \sum \limits_{n=k + 1}^{\infty} f(n)$. The first term is finite, so converges, and the second term converges due to the integral test because it is always decreasing.

-
So what about the example I give, if k=3 then for the first three terms its is not decreasing? Why doesn't that invalidate the Integral Test for Convergance? –  yiyi Mar 5 '13 at 13:56
The integral test applies as long as the function is eventually decreasing. –  ferson2020 Mar 5 '13 at 13:59
Thanks for your answer, but it has never been explained why the long term behavior is only which is important? Is it because if it converges then it stops "growing/shrinking" at that number, otherwise it just "grows/decreases" without limit? –  yiyi Mar 5 '13 at 14:03
I added to my answer; does that help make it clear? –  ferson2020 Mar 5 '13 at 14:04

Say a sequence $\{a_n\}_{n\in\mathbb{N}}$ is decreasing provided $a_{n+1}\leq a_n$ for every $n\in\mathbb{N}$. So the bigger subscripts correspond to smaller numbers. You really just need it decreasing from a rank on, so decreasing for large $n\in\mathbb{N}$.

You are looking at a series. What you want to show is that the associated sequence (that is, given the series $\sum_{n=1}^\infty a_n$ the associated sequence is $\{a_n\}_{n\in\mathbb{N}}$) is nonnegative and decreasing, then you define a function $f:[1,+\infty)\to[0,+\infty)$ so that $f(n)=a_n$ and $\int_1^\infty f<+\infty$.

Also, $k$ is an exponent so it can't be $\infty$.

Also, for series we only care what happens "near $\infty$", so to speak. So say if your sequence doesn't start decreasing until $n=100$ then just apply the integral test to the series $\sum_{n=100}^\infty a_n$, in which case you look at $\int_{100}^\infty f$.

Rationale for "near $\infty$": First of all, usually by something happening "near $\infty$ we mean there exists $N\in\mathbb{N}$ so that for all $x\geq N$ the condition happens. Convergence of a series (or a sequence for that matter, and keep in mind a series can be seen as a sequence of partial sums) only has to do with the "tail," or what happens near $\infty$. This is because for any natural number $N\in\mathbb{N}$ the first part of the series $\sum_{n=1}^Na_n$ is always finite. No matter what $N$ you choose. Because of this, if $\sum_{n=1}^\infty$ is going to diverge the problem must occur near $\infty$.

So if your associated sequence doesn't start decreasing until after $n=10,000,000,000$, no problem. Just write $\sum_{n=1}^\infty a_n=\sum_{n=1}^{10,000,000,000}a_n+\sum_{n=10,000,000,000}^\infty a_n$ and apply the integral test to the tail.

-
Nice and informative answer, could you point me to some papers which explain the rational why only "near $\infity$" matters? –  yiyi Mar 5 '13 at 14:01


1. two variable limit

Hi! I am new and I can't solve this limit:

limit x,y->(0,0) (( x^2 ) * ( y^4)) / (|x^6|+|y^4|)

Can anyone give me a hand?

2. Originally Posted by venturozzaccio
Hi! I am new and I can't solve this limit:

limit x,y->(0,0) (( x^2 ) * ( y^4)) / (|x^6|+|y^4|)

Can anyone give me a hand?
Try converting to polars:

$\lim_{(x, y) \to (0,0)}\left(\frac{x^2y^4}{|x^6| + |y^4|}\right) = \lim_{r \to 0}\left[\frac{(r\cos{\theta})^2(r\sin{\theta})^4}{|(r\cos{ \theta})^6| + |(r\sin{\theta})^4|}\right]$

$= \lim_{r \to 0}\left[\frac{r^6\cos^2{\theta}\sin^4{\theta}}{r^6|\cos^6{ \theta}| + r^4|\sin^4{\theta}|}\right]$

$= \lim_{r \to 0}\left[\frac{r^2\cos^2{\theta}\sin^4{\theta}}{r^2|\cos^6{ \theta}| + |\sin^4{\theta}|}\right]$

$= \frac{0^2\cos^2{\theta}\sin^4{\theta}}{0^2|\cos^6{ \theta}| + |\sin^4{\theta}|}$

$= \frac{0}{|\sin^4{\theta}|}$

$= 0$.

3. sorry I make a mistake writing.

the real one is :

limit x,y->(0,0) (( x^2 ) * ( y^4)) / (|x^2|+|y^4|)

4. Originally Posted by Prove It
Try converting to polars:

$\lim_{(x, y) \to (0,0)}\left(\frac{x^2y^4}{|x^6| + |y^4|}\right) = \lim_{r \to 0}\left[\frac{(r\cos{\theta})^2(r\sin{\theta})^4}{|(r\cos{ \theta})^6| + |(r\sin{\theta})^4|}\right]$

$= \lim_{r \to 0}\left[\frac{r^6\cos^2{\theta}\sin^4{\theta}}{r^6|\cos^6{ \theta}| + r^4|\sin^4{\theta}|}\right]$

$= \lim_{r \to 0}\left[\frac{r^2\cos^2{\theta}\sin^4{\theta}}{r^2|\cos^6{ \theta}| + |\sin^4{\theta}|}\right]$

$= \frac{0^2\cos^2{\theta}\sin^4{\theta}}{0^2|\cos^6{ \theta}| + |\sin^4{\theta}|}$

$= \frac{0}{|\sin^4{\theta}|}$

$= 0$.
This is really nice

5. yes but about the revised question?

6. Use the exact same process. You will still be able to cancel enough $r$'s to be able to evaluate the limit.

7. so the result is still 0 ?

8. Originally Posted by venturozzaccio
so the result is still 0 ?
Correct.

9. ok. but if the limit is

limit x,y->(0,0) $xy^2 / (x^2+y^4)$

then I have $0cos()sen^2() /( cos^2+0^2cos^4())$

And following the previous example this should be 0 again. But this time the limit doesn't exist. where I make a mistake?

10. Originally Posted by venturozzaccio
ok. but if the limit is

limit x,y->(0,0) $xy^2 / (x^2+y^4)$

then I have $0cos()sen^2() /( cos^2+0^2cos^4())$

And following the previous example this should be 0 again. But this time the limit doesn't exist. where I make a mistake?
I get that the limit is $0$...

$\lim_{(x, y) \to (0, 0)}\frac{xy^2}{x^2 + y^4} = \lim_{r \to 0}\frac{r\cos{\theta}\,r^2\sin^2{\theta}}{r^2\cos^ 2{\theta} + r^4\sin^4{\theta}}$

$= \lim_{r \to 0}\frac{r^3\cos{\theta}\sin^2{\theta}}{r^2(\cos^2{ \theta} + r^2\sin^4{\theta})}$

$= \lim_{r \to 0}\frac{r\cos{\theta}\sin^2{\theta}}{\cos^2{\theta } + r^2\sin^4{\theta}}$

$= \frac{0}{\cos^2{\theta}}$

$= 0$.

11. I think it's not true. Just because if you set x=y the limit is 0. But if you set x=y^2 then the limit is 1/2. So limit change according the way you approach to (0,0) and for this it doesn't exist.


# What is the difference between and projection and a reflection, in vector transformation?

In my text book I have the problems of finding the standard matrix of the given linear transformation from $\mathbb{R}^2$ to $\mathbb{R}^2$;

1. Projection onto the line $y = -x$.

2. Reflection in the line $y = -x$.

Both of these give different answers. I was hoping for an explanation of the difference between a projection/reflection in a vector transformation.

• Aprojection $p$ satisfies the equality $p\circ p=p$, while a reflection $r$ staisfies $r\circ r=\operatorname{id}$. This is quite different. – Bernard Jun 3 '16 at 19:36

The (orthogonal) projection onto a line "compresses" every point in the plane onto the line. If you drop the perpendicular from the point to the line, the image of the point after projection is the intersection of the perpendicular with the line you are projecting onto.

The reflection across a line moves a point to its "mirror image" across the line. If you drop a the perpendicular from a point onto the line of reflection, then the mirror image is going to lie at the same distance from the line of reflection on this perpendicular, but it will be on the other side of the line of reflection from the original.

Of course, in both cases, a point already on the line of reflection or projection is going to stay where it started.

A huge difference between these two transformations is that reflections are always invertible (since $R^2=Id$), but projections are almost never invertible. An orthogonal projection of the plane onto a line is never invertible since every point on a perpendicular to the line of projection maps to the same point on the line you are projecting onto.

In terms of eigenvalues, the projection in this case would have eigenvalues $\{0,1\}$ whereas the reflection would have eigenvalues $\{-1,1\}$.

The answer of @rschwieb gives you the theoretical vision of the problem. I add a figure to support it in a geometrical intuitive way.

The blue line is your $y=-x$. Given the points $P$ or $Q$, than $P'$ and $Q'$ are the orthogonal projection on this line and $P''$ and $Q''$ are the reflections. As you can see the prjections of the two points coincide, so the orthogonal projection is not invertible.

If you take $P=(1,0)^T$ (a standard basis vector) you can easely see that $P'=(\frac{1}{2},-\frac{1}{2})^T$ and $P''=(0,-1)^T$, and if you do the same for the other basis vector $N=(0,1)^T$, you find $N'=((-\frac{1}{2},\frac{1}{2})^T$ and $N''=(-1,0)^T$, so you have the matrices that represents the two transformations (in the standard basis):

$$\frac{1}{2} \begin{bmatrix} 1&-1\\-1&1 \end{bmatrix}$$ for the projection, and $$\begin{bmatrix} 0&-1\\-1&0 \end{bmatrix}$$

for the reflecion.

• I must beg to differ: my answer is almost purely geometric intuition. But what you've written is certainly a concrete and explicit analytical answer, which is good too :) – rschwieb Jun 4 '16 at 0:56


# Stopping criteria for gradient method

For numerically solving a smooth convex optimization $\min\{f(x): x\in S\}$ where $S$ is a closed convex set, we can apply some different algorithms: gradient method, accelerated gradient, proximal gradient ... depending on the structure of the problem. Solving is to find a solution $x*$ such that $f(x^*)=\inf\{f(x): x\in S\}:=f^*$. To this end, we try to construct an iterative sequence $\{x^k\}$ that converges to some solution $x^*$, or the sequence of numbers $\{f(x^k)\}$ tends to $f^*$. Note that, if $x^k\to x^*$ then the continuity of $f$ can ensures that $f(x^k) \to f^*$.

My questions are:

1. In which cases we should focus on the convergence of $\{f(x^k)\}$ rather than of $\{x^k\}$? Is finding a point $x^K$ such that $x^K$ close enough to a solution $x^*$ better than finding a point $x^K$ such that $f(x^K)$ close enough to $f^*$?

2. What is the best stopping criteria for an algorithm? I know the following ways:

• Determine the number of iterations we need to perform to achieve a desired error $\epsilon$, i.e., $||x^k-x^*||<\epsilon$ or $|f(x^k)-f^*|<\epsilon$ implies $k\geq N$ for some $N$. I see that this way is very reliable.

• terminating when $||x^{k+1}-x^k||$ or $|f(x^{k+1})-f(x^k)|$ is small enough.

• terminating when $||\nabla f(x^k)||$ is small enough.

Could you explain how the second and the third cases work? Why $||\nabla f(x^k)||$ small enough can implies that $f(x^k)$ is approximate the optimal value $f^*$. I have been know that the case $f$ is strongly convex this can be verified. Is this stopping criteria still reliable in the case where $f$ is not strongly convex?

I will discuss the termination criteria for the simple gradient method $x_{k+1} = x_{k} - \frac{1}{L}\nabla f(x_k)$ for unconstrained minimisation problems. If there are constraints, then we would use the projected gradient method, but similar termination condition hold (imposed on the norm of the difference $x_k-z_k$).

The third criterion, namely $\|\nabla f(x_k) \| < \epsilon$ if fine for strongly convex functions with $L$-Lipschitz gradient. Indeed, if $f$ is $\mu$-strongly convex, that is

\begin{aligned} f(y) \geq f(x) + \nabla f(x)^\top (y-x) + \tfrac{\mu}{2} \|y-x\|^2 \end{aligned},\tag{1}

then, for $x^*$ such that $\nabla f(x^*)=0$ (the unique minimiser of $f$), we have

\begin{aligned} f(x) - f(x^*)\leq \tfrac{1}{2\mu}\|\nabla f(x) \|^2, \end{aligned}\tag{2}

so, if $\|\nabla f(x) \|^2 < 2\mu\epsilon$, then $f(x) - f(x^*) < \epsilon$, i.e., $x$ is $\epsilon$-suboptimal.

But termination is a mysterious thing... In general (under the assumptions you drew) it is not true that we will have $\|x-x^*\|<\epsilon$ if $\| \nabla f(x) \| < \kappa \epsilon$, for some $\kappa > 0$ (not even locally). There might be specific cases where such a bound holds, notwithstanding. Unless you draw some additional assumptions on $f$, this will not be a reliable termination criterion.

However, strong convexity is often too strong a requirement in practice. Weaker conditions are discussed in the article: D. Drusvyatskiy and A.S. Lewis, Error bounds, quadratic growth, and linear convergence of proximal methods, 2016.

Let $f$ be convex with $L$-Lipschithz gradient and define $\mathcal{B}_\nu^f = \{x: f(x) - f^* < \nu\}$. Let us assume that $f$ has a unique minimiser $x^*$ (e.g., $f$ is strictly convex). Then assume that $f$ has the property

\begin{aligned} f(x) - f(x^*) \geq \tfrac{\alpha}{2} \|x-x^*\|^2, \end{aligned}\tag{3}\label{3}

for all $x\in\mathcal{B}_\nu^f$ for some $\nu>0$. Functions which satisfy this property are not necessarily strongly convex. As a counterexample we have $f = (\max\{|x|-1,0\})^2$. Of course if $f$ is strongly convex the above holds and if $f$ is given in the form $f(x) = h(Ax)$ where $h$ is a strongly convex function and $A$ is any matrix.

Then, condition \eqref{3} is shown to be equivalent to

\begin{aligned} \|x-x^*\| \leq \frac{2}{\alpha} \|\nabla f(x) \|, \end{aligned}\tag{4}\label{4}

for all $x\in\mathcal{B}_{\nu}^f$ and with $\alpha < 1/L$.

Clearly in this case we may use the termination condition $\| \nabla f(x) \| < \epsilon\alpha/2$ which will imply that $\|x-x^*\| < \epsilon$.

In regard to the second condition, you may use it again for strongly convex functions or if \eqref{3} holds locally about $x^*$. The reason for that is that the following bound holds for the gradient method:

\begin{aligned} \tfrac{L}{2}\|\nabla f(x_k) \|^2 \leq f(x_k) - f(x_{k+1}). \end{aligned}\tag{5}\label{5}

The right hand side of \eqref{5} is further upper bounded by $L_f \|x_k - x_{k+1}\|$, where $L_f$ is the Lipschitz constant of $f$ (we know that $f$ is Lipshcitz continuous), so a condition on $\|x_{k+1}-x_{k}\|$ may potentially be used, but we may see that the basis for all this is the bound on $\|\nabla f(x_k) \|$.

If $$f$$ is strictly convex, it has at most one minimum and at this minimum its gradient is zero. So the third criteria should work fine. If $$f$$ is not convex, you may reach a local minimum so this criterion is not really justified. If you are using a gradient method, the second criteria is very similar to the third because each step (or the difference $$x^{k+1}-x^{k}$$) is obtained from the gradient.

• I know the fact that "If $f$ is convex, it has just one minimum on $R^n$ and at this minimum its gradient is zero. But can you explain why $||\nabla f(x^k)||$ small enough can implies that $f(x^k)$ is approximate the optimal value $f^*$? In addition, in the constrained case, the gradient does not need to be zero at the minimum point. – Richkent Jan 19 '16 at 16:27
• Well, if $\|\nabla f\|$ is small enough (say below $\epsilon$), it can be approximated by zero, meaning that you are very close to the optimal. If $f$ is convex, the gradient is monotonous and continuous, so if it's close to zero, you are close to the minimum. – citronrose Jan 19 '16 at 16:34
• draw a $C^1$ (strictly) convex function $\mathbb{R} \to \mathbb{R}$ you'll see that if the minimum is at $a \ne -\infty$ then $|f'(x)| < \epsilon$ only when $x \in ]a-\delta;a+\delta[$, and the smaller is $\epsilon$ the smaller will be $\delta$ . after that, just remember that convex on $\mathbb{R}^n$ means that you can minimize with respect to each $x_i$ one after the other. – reuns Jan 19 '16 at 16:44
• "If $f$ is convex, it has just one minimum" is completely wrong. Some convex functions have no minimizers (e.g. $f(x) = \exp(x)$), others have a continuum of minimizers (e.g. $f(x) = 0$). – Guillaume Garrigos Mar 1 at 21:02
• @citronrose $\exp$ doesn't necessarily have a minimum on a closed domain, take for instance $S = \mathbb{R}$ or $S = [a,+\infty[$ for any $a \in \mathbb{R}$. Of course there is no such counterexamples if $S$ is compact, which is maybe the case you had in mind. – Guillaume Garrigos Mar 5 at 15:53


Author Message
TAGS:

Hide Tags

Manager
Joined: 02 Dec 2012
Posts: 178
Followers: 5

Kudos [?]: 2319 [1] , given: 0

Show Tags

15 Dec 2012, 04:14
2
KUDOS
Expert's post
This might sound stupid, but how do we know that we need to round up 64 to 65 without losing to much time. I did this question before and it took over 2 min before i knew that i had to round 64 to 65 in order to solve the problem. Do you have any trick in mind?

65 is the closest multiple of 13: 5*13=65.
_________________
Senior Manager
Joined: 20 Aug 2015
Posts: 398
Location: India
GMAT 1: 760 Q50 V44
Followers: 25

Kudos [?]: 213 [1] , given: 10

Show Tags

07 Dec 2012, 04:35
Expert's post
3
This post was
BOOKMARKED
A store reported total sales of $385 million for February of this year. If the total sales for the same month last year was$320 million, approximately what was the percent increase in sales?

(A) 2%
(B) 17%
(C) 20%
(D) 65%
(E) 83%

Last year's sales = $320 million; This year's sales =$385 million;
Increase = $65 million. Now, 20% of$320 million is $64 million, which is very close to actual increase of$65 million.

OR:
General formula for percent increase or decrease, or percent change:

$$Percent=\frac{Change}{Original}*100$$ --> $$Percent=\frac{65}{320}*100=\frac{13}{64}*100\approx{\frac{13}{65}}*100=20%$$.

_________________
Intern
Joined: 06 Jun 2012
Posts: 18
Followers: 0

Kudos [?]: 0 [0], given: 9

Show Tags

11 Sep 2014, 06:09
A store reported total sales of $385 million for February of this year. If the total sales for the same month last year was$320 million, approximately what was the percent increase in sales?

(A) 2%
(B) 17%
(C) 20%
(D) 65%
(E) 83%

last year= 320
this year = 385

((385-320)/320)*100 = (65/320 )*100 approx.. 20
SVP
Status: The Best Or Nothing
Joined: 27 Dec 2012
Posts: 1858
Location: India
Concentration: General Management, Technology
WE: Information Technology (Computer Software)
Followers: 47

Kudos [?]: 1929 [0], given: 193

Show Tags

20 Oct 2015, 02:42
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________
Senior Manager
Affiliations: Target Test Prep
Joined: 04 Mar 2011
Posts: 458
Followers: 22

Kudos [?]: 187 [0], given: 2

Re: A store reported total sales of $385 million for February of [#permalink] Show Tags 07 Jun 2016, 10:09 Walkabout wrote: A store reported total sales of$385 million for February of this year. If the total sales for the same month last year was $320 million, approximately what was the percent increase in sales? (A) 2% (B) 17% (C) 20% (D) 65% (E) 83% The problem is testing us on using the percent change formula: (New Value – Old Value)/Old Value x 100 We are given: February sales this year = 385 million February sales last year = 320 million We need to determine the percent increase between sales from last year to sales this year. Thus, the new value = 385 million and the old value = 320 million. Let’s plug them into our percent change formula. (New Value – Old Value)/Old Value x 100 [(385 – 320)/320] x 100 65/320 x 100 13/64 x 100 ≈ 13/65 x 100 ≈ 1/5 x 100 ≈ 20%. The answer is C. _________________ Jeffrey Miller Jeffrey Miller Head of GMAT Instruction Re: A store reported total sales of$385 million for February of   [#permalink] 07 Jun 2016, 10:09
Similar topics Replies Last post
Similar
Topics:
5 At the store, Sam bought a shirt and a toaster. There was an 8% sales 6 18 Feb 2015, 03:20
9 During a sale of 20% on everything in a store, a kid is successful in 4 02 Oct 2014, 23:52
12 Last year Department Store X had a sales total for December 12 05 Mar 2014, 01:12
21 There are 6 stores in town that had a total of 20 visitors 14 08 Sep 2011, 22:53
18 Last year Department Store X had a sales total for December 10 03 Dec 2007, 17:11
Display posts from previous: Sort by


# How many numbers are there of 2n digits that the sum of the digits in the first half equals the sum of the digits in the second half

The question is how many number of a given number of digits 2n where the sum of the first half of the digits equals the sum of the digits in the second half.

So this is for a programming problem and I've got it down to approximately $10^n$ operations. However for a sample size of $0 < n < 500$ this is far too many operations and the question leads me to believe that there is a simple formula for this.

From brute force calculation:

n = 1
10
n = 2
670
n = 3
4816030 ...

So I've abstracted it to: finding how many ways the digits from 0 - 9 can be put together to form a given sum (from 0 -> 9*n) this gives me a $10^n$ however this is still too large. (fyi you need to square this number)

I've observed that in this abstracted version of the question the subsums are constant for n = 1, increase for n = 2, fibonacci numbers for n = 3 with the general rule being if you keep taking the difference of the differences of the sums that the previous one forms the next one (this changes slightly towards the center: the difference of differences doubles). And this trend seems to hold true for all the numbers that I tested.

I think that it might be related to $^nC_r$ or similar but I don't have the maths to change it from something like pascal's triangle to something that I can work with.

• Question: Do you count, say "0990" as an example when $n=2$? It's gonna be much harder if you don't. – Thomas Andrews Jan 27 '16 at 20:56
• @ThomasAndrews Given he says the answer is $10$ when $n=1$ means he must be including $00$ as a two digit number. – Gregory Grant Jan 27 '16 at 21:04
• @ThomasAndrews yes it is counted – Cjen1 Jan 27 '16 at 21:06
• The value you have for $n=3$ is actually the value for $n=4$. The value for $n=3$ is $55252$. – Thomas Andrews Jan 28 '16 at 0:05

Let $f(n,s)$ denote the number of $n$-digit sequences with digit sum $s$. To cover the leading zero problem, let $g(n,s)$ denote the number of $n$-digit sequences with digit sum $s$ and leading digit non-zero. Then $f(n+1,s)=\sum_{d=0}^9f(n,s-d)$, with $f(n,s)=0$ for $s<0$ (or $s>9n$) understood, which allows a quick recursive calculation in $O(n^2)$ time and $O(n)$ space complexity. Furthermore, we simply have $g(n,s)=f(n,s)-f(n-1,s)$. Now the count you really want is $$\sum_{s=0}^\infty g(n,s)f(n,s).$$ But of course we need not consider infinitely many $s$. Instead, we need only sum $$\sum_{s=1}^{9n} g(n,s)f(n,s).$$

Edit: From the comments it seems that leading zeroes are allowed. In that case, simply replace $g$ by $f$ in the above.

You can do it in order $n^2$ operations. If $n=100$, the sum of $100$ digits can range from $0$ to $900$ You need to compute how many ways there are to add up to each of those sums. For $n=1$,you have one way to make each number $0$ through $9$. For $n=2$ you can compute the number of ways to make $k$ by summing over the number of ways to make each of $k-9, k-8, \dots k$ out of one digit. Then for $n=3$ you can compute the number of ways to make $k$ by summing over the number of ways to make $k$ by summing over the number of ways to make each of $k-9, k-8, \dots k$ out of two digits. You will end up with an array with numbers in entries $0$ through $900$. Each of $0$ and $900$ will be $1$. $1$ and $899$ will be $100$. Can you see why? The ones in the middle will be quite large-you need arbitrary precision integers to solve this. Then to get the number of $200$ digit numbers, you sum the squares of the entries. This is because for a number where both the first half and last half sum to $899$ you have $100$ choices for the first half and $100$ choices for the last half, giving $100^2$ total possibilities.

I looked this up at the OEIS where I found this OEIS entry.

We clearly have by inspection that the desired answer is

$$[z^0] (1+z+z^2+\cdots+z^9)^n (1+1/z+1/z^2+\cdots+1/z^9)^n \\= [z^0]\frac{1}{z^{9n}} (1+z+z^2+\cdots+z^9)^{2n}$$

or

$$[z^{9n}] (1+z+z^2+\cdots+z^9)^{2n} = [z^{9n}] \left(\frac{1-z^{10}}{1-z}\right)^{2n}.$$

Extracting coefficients from this we get

$$[z^{9n}] \frac{1}{(1-z)^{2n}} \sum_{q=0}^{2n} {2n\choose q} (-1)^q z^{10q} \\ [z^{9n}] \frac{1}{(1-z)^{2n}} \sum_{q=0}^{\lfloor 9n/10\rfloor} {2n\choose q} (-1)^q z^{10q} \\ = \sum_{q=0}^{\lfloor 9n/10\rfloor} {2n\choose q} (-1)^q {9n-10q+2n-1\choose 2n-1} \\ = \sum_{q=0}^{\lfloor 9n/10\rfloor} {2n\choose q} (-1)^q {11n-10q-1\choose 2n-1}.$$

Note however that the second binomial coefficient is zero when $11n-10q-1\lt 2n-1$ or $9n\lt 10q$ so we may set the upper limit to $n-1$ if desired, producing a match to the OEIS entry e.g.

$$\sum_{q=0}^{n-1} {2n\choose q} (-1)^q {11n-10q-1\choose 2n-1}.$$

The second binomial coefficient starts producing non-zero values again when $11n-10q-1 \lt 0.$

An alternate approach uses generating functions. Let $f(x) = (1+x+x^2+\cdot+x^9)^{n}$. Then we are seeking the constant term of $f(x)f(x^{-1})$.

Letting $x=e^{i\theta}$, we get:

$$f(x)f(x^{-1})=\left(\frac{1-\cos(10\theta)}{1-\cos\theta}\right)^n= \left(\frac{\sin(5x)}{\sin(x/2)}\right)^{2n}$$

The constant term can be computed as:

$$\frac{1}{2\pi}\int_{0}^{2\pi} \left(\frac{\sin(5x)}{\sin(x/2)}\right)^{2n}\,dx$$

While that might seem insane, you can actually use the graph of $\frac{\sin(5x)}{\sin(x/2)}$ to get upper and lower bounds for this integral.

• I believe you mean the Central Limit Theorem, not the Law of Large Numbers, but this is the first thing that came to mind for me as well. – Michael Lugo Jan 27 '16 at 21:44
• Yep, that is what I mean, thanks. @MichaelLugo One reason I didn't proceed further is that I don't actually know these theorems, only know of them. :) – Thomas Andrews Jan 27 '16 at 21:45


# Proof of the Hockey-Stick Identity: $\sum\limits_{t=0}^n \binom tk = \binom{n+1}{k+1}$

After reading this question, the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$

What's the name of this identity? Is it the identity of the Pascal's triangle modified.

How can we prove it? I tried by induction, but without success. Can we also prove it algebraically?

Thanks for your help.

EDIT 01 : This identity is known as the hockey-stick identity because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed.

• It is sometimes called the "hockey stick". – user940 Oct 21 '15 at 15:24
• There is another cute graphical illustration on the plane of $\binom{n}{k}$ – Eli Korvigo Oct 21 '15 at 16:54
• It's pretty straightforward from the picture. Just switch the $1$ at the top of the stick with the $1$ directly below, then repeatedly replace adjacent numbers with the number in the cell below. This can be translated into a formal proof with words and symbols, but an animation or series of pictures is much more effective. – user2357112 Oct 22 '15 at 3:24
• See also this question. Some post which are linked there might be of interest, too. – Martin Sleziak Jan 18 '16 at 15:05

This is purely algebraic. First of all, since $$\dbinom{t}{k} =0$$ when $$k>t$$ we can rewrite the identity in question as $$\binom{n+1}{k+1} = \sum_{t=0}^{n} \binom{t}{k}=\sum_{t=k}^{n} \binom{t}{k}$$

Recall that (by the Pascal's Triangle), $$\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k}$$

Hence $$\binom{t+1}{k+1} = \binom{t}{k} + \binom{t}{k+1} \implies \binom{t}{k} = \binom{t+1}{k+1} - \binom{t}{k+1}$$

Let's get this summed by $$t$$: $$\sum_{t=k}^{n} \binom{t}{k} = \sum_{t=k}^{n} \binom{t+1}{k+1} - \sum_{t=k}^{n} \binom{t}{k+1}$$

Let's factor out the last member of the first sum and the first member of the second sum: $$\sum _{t=k}^{n} \binom{t}{k} =\left( \sum_{t=k}^{n-1} \binom{t+1}{k+1} + \binom{n+1}{k+1} \right) -\left( \sum_{t=k+1}^{n} \binom{t}{k+1} + \binom{k}{k+1} \right)$$

Obviously $$\dbinom{k}{k+1} = 0$$, hence we get $$\sum _{t=k}^{n} \binom{t}{k} =\binom{n+1}{k+1} +\sum_{t=k}^{n-1} \binom{t+1}{k+1} -\sum_{t=k+1}^{n} \binom{t}{k+1}$$

Let's introduce $$t'=t-1$$, then if $$t=k+1 \dots n, t'=k \dots n-1$$, hence $$\sum_{t=k}^{n} \binom{t}{k} = \binom{n+1}{k+1} +\sum_{t=k}^{n-1} \binom{t+1}{k+1} -\sum_{t'=k}^{n-1} \binom{t'+1}{k+1}$$

The latter two arguments eliminate each other and you get the desired formulation $$\binom{n+1}{k+1} = \sum_{t=k}^{n} \binom{t}{k} = \sum_{t=0}^{n} \binom{t}{k}$$

• Beautiful proof. p.-s. you can use the LaTeX command \binom{n}{k} to display $\binom{n}{k}$. – hlapointe Oct 21 '15 at 16:26
• @hlapointe thank you. Sure, I forgot there was a special command for binomial. – Eli Korvigo Oct 21 '15 at 16:32

Imagine the first $$n + 1$$ numbers, written in order on a piece of paper. The right hand side asks in how many ways you can pick $$k+1$$ of them. In how many ways can you do this?

You first pick a highest number, which you circle. Call it $$s$$. Next, you still have to pick $$k$$ numbers, each less than $$s$$, and there are $$\binom{s - 1}{k}$$ ways to do this.

Since $$s$$ is ranging from $$1$$ to $$n+1$$, $$t:= s-1$$ is ranging from $$0$$ to $$n$$ as desired.

We can use the well known identity $$1+x+\dots+x^n = \frac{x^{n+1}-1}{x-1}.$$ After substitution $x=1+t$ this becomes $$1+(1+t)+\dots+(1+t)^n=\frac{(1+t)^{n+1}-1}t.$$ Both sides of these equations are polynomials in $t$. (Notice that the RHS simplifies to $\sum_{j=1}^{n+1}\binom {n+1}j t^{j-1}$.)

If we compare coefficient of $t^{k}$ on the LHS and the RHS we see that $$\binom 0k + \binom 1k + \dots + \binom nk = \binom{n+1}{k+1}.$$

This proof is basically the same as the proof using generating functions, which was posted in other answers. However, I think it is phrased a bit differently. (And if it is formulated this way, even somebody who has never heard of generating functions can follow the proof.)

\begin{align} \sum_{t=\color{blue}0}^n \binom{t}{k} =\sum_{t=\color{blue}k}^n\binom tk&= \sum_{t=k}^n\left[ \binom {t+1}{k+1}-\binom {t}{k+1}\right]\\ &=\sum_{t=\color{orange}k}^\color{orange}n\binom {\color{orange}{t+1}}{k+1}-\sum_{t=k}^n\binom t{k+1}\\ &=\sum_{t=\color{orange}{k+1}}^{\color{orange}{n+1}}\binom {\color{orange}{t}}{k+1}-\sum_{t=k}^n\binom t{k+1}\\ &=\binom{n+1}{k+1}-\underbrace{\binom k{k+1}}_0&&\text{by telescoping}\\ &=\binom{n+1}{k+1}\quad\blacksquare\\ \end{align}

You can use induction on $n$, observing that

$$\sum_{t=0}^{n+1} \binom{t}{k} = \sum_{t=0}^{n} \binom{t}{k} + \binom{n+1}{k} = \binom{n+1}{k+1} + \binom{n+1}{k} = \binom{n+2}{k+1}$$

• How can you say that $\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}$ in your proof. – hlapointe Oct 21 '15 at 15:13
• That's the inductive hypothesis. – Michael Biro Oct 21 '15 at 15:14
• Ok. Can we prove it algebraically? – hlapointe Oct 21 '15 at 15:15
• What's the first step!? Because if I take $n=1$, the hypothesis seem to be incorrect. – hlapointe Oct 21 '15 at 15:21
• @hlapointe One choice of base case for every fixed $k$ is that $\sum_{t=0}^{k} \binom{t}{k} = \binom{k}{k} = 1 = \binom{k+1}{k+1}$. – Michael Biro Oct 21 '15 at 16:28

The RHS is the number of $k+1$ subsets of $\{1,2,...,n+1\}$. Group them according to the largest element in the subset. Sum up all the cases. Get the LHS.

Another technique is to use snake oil. Call your sum:

\begin{align} S_k &= \sum_{0 \le t \le n} \binom{t}{k} \end{align}

Define the generating function:

\begin{align} S(z) &= \sum_{k \ge 0} S_k z^k \\ &= \sum_{k \ge 0} z^k \sum_{0 \le t \le n} \binom{t}{k} \\ &= \sum_{0 \le t \le n} \sum_{k \ge 0} \binom{t}{k} z^k \\ &= \sum_{0 \le t \le n} (1 + z)^t \\ &= \frac{(1 + z)^{n + 1} - 1}{(1 + z) - 1} \\ &= z^{-1} \left( (1 + z)^{n + 1} - 1 \right) \end{align}

So we are interested in the coefficient of $z^k$ of this:

\begin{align} [z^k] z^{-1} \left( (1 + z)^{n + 1} - 1 \right) &= [z^{k + 1}] \left( (1 + z)^{n + 1} - 1 \right) \\ &= \binom{n + 1}{k + 1} \end{align}

We can use the integral representation of the binomial coefficient $$\dbinom{t}{k}=\frac{1}{2\pi i}\oint_{\left|z\right|=1}\frac{\left(1+z\right)^{t}}{z^{k+1}}dz\tag{1}$$ and get $$\sum_{t=0}^{n}\dbinom{t}{k}=\frac{1}{2\pi i}\oint_{\left|z\right|=1}\frac{\sum_{k=0}^{n}\left(1+z\right)^{t}}{z^{k+1}}dz$$ $$=\frac{1}{2\pi i}\oint_{\left|z\right|=1}\frac{\left(z+1\right)^{n+1}}{z^{k+2}}dz-\frac{1}{2\pi i}\oint_{\left|z\right|=1}\frac{1}{z^{k+2}}dz$$ and so usign again $(1)$ we have $$\sum_{t=0}^{n}\dbinom{t}{k}=\dbinom{n+1}{k+1}-0=\color{red}{\dbinom{n+1}{k+1}.}$$

• It is so nice and weird. +1 – Behrouz Maleki Jul 5 '16 at 10:27
• +1. Nice work. You must subtract $\displaystyle{\delta_{k,-1}}$ in order to take account of the case $\displaystyle{k = -1}$. When $\displaystyle{k = -1}$, the LHS is equal to $\displaystyle{0}$ and your RHS is equal to $\displaystyle{1}$. With the $\displaystyle{\delta_{k,-1}}$ you'll get $\displaystyle{1 - 1 = 0}$. – Felix Marin Jul 6 '16 at 21:50

In this answer, I prove the identity $$\binom{-n}{k}=(-1)^k\binom{n+k-1}{k}\tag{1}$$ Here is a generalization of the identity in question, proven using the Vandermonde Identity \begin{align} \sum_{m=0}^M\binom{m+k}{k}\binom{M-m}{n} &=\sum_{m=0}^M\binom{m+k}{m}\binom{M-m}{M-m-n}\tag{2}\\ &=\sum_{m=0}^M(-1)^m\binom{-k-1}{m}(-1)^{M-m-n}\binom{-n-1}{M-m-n}\tag{3}\\ &=(-1)^{M-n}\sum_{m=0}^M\binom{-k-1}{m}\binom{-n-1}{M-m-n}\tag{4}\\ &=(-1)^{M-n}\binom{-k-n-2}{M-n}\tag{5}\\ &=\binom{M+k+1}{M-n}\tag{6}\\ &=\binom{M+k+1}{n+k+1}\tag{7} \end{align} Explanation:
$(2)$: $\binom{n}{k}=\binom{n}{n-k}$
$(3)$: apply $(1)$ to each binomial coefficient
$(4)$: combine the powers of $-1$ which can then be pulled out front
$(5)$: apply Vandermonde
$(6)$: apply $(1)$
$(7)$: $\binom{n}{k}=\binom{n}{n-k}$

To get the identity in the question, set $n=0$.

• @FoF: I have added a link here and answered your other question. Thanks for mentioning the difficulty. – robjohn Dec 7 '13 at 12:33
• @FoF: That is the Vandermonde Identity that I mentioned at the beginning. – robjohn Dec 8 '13 at 18:56
• @FoF: I added an explanation for each line. – robjohn Dec 9 '13 at 2:20
• I answered my own question about $(5, 6$) here. – NaN Dec 10 '13 at 8:54
• @FoF: Ah. That is why I added the Explanation when I saw difficulty in following the argument. – robjohn Dec 11 '13 at 7:46

You remember that: $$(1+x)^m = \sum_k \binom{m}{k} x^k$$ So the sum $$\sum_{m=0}^M \binom{m+k}{k}$$ is the coefficient of $x^k$ in: $$\sum_{m=0}^M (1+x)^{m+k}$$ Yes? So now use the geometric series formula given: $$\sum_{m=0}^M (1+x)^{m+k} = -\frac{(1+x)^k}{x} \left( 1 - (1+x)^{M+1} \right)$$ And now you want to know what is coefficient of $x^k$ in there. You got it from here.

Recall that for $k\in\Bbb N$ we have the generating function

$$\sum_{n\ge 0}\binom{n+k}kx^n=\frac1{(1-x)^{k+1}}\;.$$

The identity in the question can therefore be rewritten as

$$\left(\sum_{n\ge 0}\binom{n+k}kx^n\right)\left(\sum_{n\ge 0}x^n\right)=\sum_{n\ge 0}\binom{n+k+1}{k+1}x^n\;.$$

The coefficient of $x^n$ in the product on the left is

$$\sum_{i=0}^n\binom{i+k}k\cdot1=\sum_{i=0}^n\binom{i+k}k\;,$$

and the $n$-th term of the discrete convolution of the sequences $\left\langle\binom{n+k}k:n\in\Bbb N\right\rangle$ and $\langle 1,1,1,\dots\rangle$. And at this point you’re practically done.

• Is there a typo in the second equation (first sum)? I believe $k$ should be indexed. – AlanH May 27 '13 at 6:20
• @Alan: No, the sum is over $n$; $k$ is fixed throughout. – Brian M. Scott May 27 '13 at 7:19
• In my text, I have an identity $\sum_{r\geq 0} \binom{r + n}{r} x^r = 1/(1-x)^{n+1}$ This may be the cause of my confusion, but is this identity correct and is it equivalent to the one you used? – AlanH May 27 '13 at 8:22
• @Alan: Sure: your $r$ is my $n$, and your $n$ is my $k$. – Brian M. Scott May 27 '13 at 8:28
• @Alan: $\binom{r+n}r=\binom{r+n}n$; now do the translation. (Sorry: I didn’t notice before that you’d used the symmetrically opposite binomial coefficient.) – Brian M. Scott May 27 '13 at 19:19

A standard technique to prove such identities $\sum_{i=0}^Mf(i)=F(M)$, involving on one hand a sum where only the upper bound $M$ is variable and on the other hand an explicit expression in terms of$~M$, is to use induction on$~M$. It amounts to showing that $f(M)=F(M)-F(M-1)$ (and that $F(0)=f(0)$). This is similar to using the fundamental theorem of calculus in showing that $\int_0^{x_0}f(x)\mathrm dx=F(x_0)$ by establishing $f(x)=F'(x)$ (and $F(0)=0$).

So here you need to check (apart from the obvious starting case $M=0$) that $\binom{M+k}k=\binom{M+k+1}{k+1}-\binom{M+k}{k+1}$. This is just in instance of Pascal's recurrence for binomial coefficients.

$$\mbox{Note that}\quad \sum_{m = 0}^{M}{m + k \choose k} = \sum_{m = k}^{M + k}{m \choose k} = a_{M + k} - a_{k - 1}\quad\mbox{where}\quad a_{n} \equiv \sum_{m = 0}^{n}{m \choose k}\tag{1}$$

Then, \begin{align} \color{#f00}{a_{n}} & \equiv \sum_{m = 0}^{n}{m \choose k} = \sum_{m = 0}^{n}\ \overbrace{% \oint_{\verts{z} = 1}{\pars{1 + z}^{m} \over z^{k + 1}}\,{\dd z \over 2\pi\ic}} ^{\ds{m \choose k}}\ =\ \oint_{\verts{z} = 1}{1 \over z^{k + 1}}\sum_{m = 0}^{n}\pars{1 + z}^{m} \,{\dd z \over 2\pi\ic} \\[3mm] & = \oint_{\verts{z} = 1}{1 \over z^{k + 1}}\, {\pars{1 + z}^{n + 1} - 1 \over \pars{1 + z} - 1}\,{\dd z \over 2\pi\ic}\ =\ \underbrace{\oint_{\verts{z} = 1}{\pars{1 + z}^{n + 1} \over z^{k + 2}} \,{\dd z \over 2\pi\ic}}_{\ds{n + 1 \choose k + 1}}\ -\ \underbrace{\oint_{\verts{z} = 1}{1 \over z^{k + 2}}\,{\dd z \over 2\pi\ic}} _{\ds{\delta_{k + 2,1}}} \\[8mm] \imp\ \color{#f00}{a_{n}} & = \fbox{$\ds{\quad% {n + 1 \choose k + 1} - \delta_{k,-1}\quad}$} \end{align}
\begin{align} \mbox{With}\ \pars{1}\,,\quad \color{#f00}{\sum_{m = 0}^{M}{m + k \choose k}} & = \bracks{{M + k + 1 \choose k + 1} - \delta_{k,-1}} - \bracks{{k \choose k + 1} - \delta_{k,-1}} \\[3mm] & = {M + k + 1 \choose k + 1} - {k \choose k + 1} \end{align} Thanks to $\ds{@robjohn}$ user who pointed out the following feature: $${k \choose k + 1} = {-k + k + 1 - 1 \choose k + 1}\pars{-1}^{k + 1} = -\pars{-1}^{k}{0 \choose k + 1} = \delta_{k,-1}$$ such that $$\begin{array}{|c|}\hline\mbox{}\\ \ds{\quad\color{#f00}{\sum_{m = 0}^{M}{m + k \choose k}} = \color{#f00}{{M + k + 1 \choose k + 1} - \delta_{k,-1}}\quad} \\ \mbox{}\\ \hline \end{array}$$

• Since $k=-1$ is covered in the first part, it should be noted that since $\binom{-1}{0}=1$, $$\binom{k}{k+1}-\delta_{k,-1}=0$$ therefore the final answer seems it should be $$\binom{M+k+1}{k+1}-\delta_{k,-1}$$ – robjohn Jul 25 '16 at 13:00
• @robjohn Thanks. I'm checking everything right now. – Felix Marin Jul 25 '16 at 21:48
• @robjohn Thanks. Fixed. – Felix Marin Jul 25 '16 at 22:09

We can prove this by counting in two ways.

Let $$S$$ be the set of all $$(k+1)$$-element subsets of $$[n+1]$$. By definition, $$|S|=\binom{n+1}{k+1}$$.

Let $$S_i$$ be the set of all $$(k+1)$$-element subsets of $$[n+1]$$ such that the largest element is $$i+1$$. Picking $$k+1$$ elements from $$[n+1]$$ such that the largest element is $$i+1$$ is a two-step-process.

(Step 1) Pick $$i+1$$. The number of way(s) to do this is $$\binom{1}{1}$$.

(Step 2) Pick the $$k$$ elements from the the remaining $$i$$ elements. The number of way(s) to do this is $$\binom{i}{k}$$.

Therefore, $$|S_i|=\binom{1}{1}\binom{i}{k}=\binom{i}{k}$$. Since we can see that $$S_k, S_{k+1}, S_{k+2}, \dots, S_n$$ partition $$S$$, we have that $$\begin{gather*} \sum_{i=k}^n|S_i|=|S|\\ \sum_{i=k}^n\binom{i}{k}=\binom{n+1}{k+1} \end{gather*}$$ Since we know that if $$i < k$$, then $$\binom{i}{k}=0$$, we can say that $$\sum_{i=k}^n\binom{i}{k}=\sum_{i=0}^n\binom{i}{k}$$. Therefore, we have $$\begin{gather*} \sum_{i=0}^n \binom{i}{k} = \binom{n+1}{k+1} \end{gather*}$$


# Thread: Divided triangle, proportion question

1. ## Divided triangle, proportion question

Hi Forum!
Here's a question:

Nine lines parallel to the base divide the other sides into 10 equal segments and the area in 10 distinct parts. If the area of the larger of these parts is 38, then the area of the original triangle is?

Now,we can consider the remaining 9 parts of the triangle as 9/10 of it.
But, here comes the part that I don't understand.
The area can be considered as 81/100 to the entire triangle.

I'm confused with the usage of the area here. I does makes a lot of sense,
but since we are in a triangle (the remaining 9/10 will be a triangle too) the area isn't supposed to be bh1/2?

This is kind of confusing to apply. Can someone help?
Why 81/100?

2. ## Re: Divided triangle, proportion question

Originally Posted by Zellator
Hi Forum!
Here's a question:

Nine lines parallel to the base divide the other sides into 10 equal segments and the area in 10 distinct parts. If the area of the larger of these parts is 38, then the area of the original triangle is?

Now,we can consider the remaining 9 parts of the triangle as 9/10 of it.
But, here comes the part that I don't understand.
The area can be considered as 81/100 to the entire triangle.

I'm confused with the usage of the area here. I does makes a lot of sense,
but since we are in a triangle (the remaining 9/10 will be a triangle too) the area isn't supposed to be bh1/2?

This is kind of confusing to apply. Can someone help?
Why 81/100?
1. Draw a sketch!

2. By proportion you'll get:

$\displaystyle \dfrac bB = \dfrac9{10}~\implies~b=\frac9{10} \cdot B$

$\displaystyle \dfrac hH = \dfrac9{10}~\implies~h=\frac9{10} \cdot H$

3. The area of the original triangle is calculated by:

$\displaystyle A_o = \frac12 \cdot B \cdot H$

The area of the smaller triangle is calculated by:

$\displaystyle A_s = \frac12 \cdot b \cdot h = \frac12 \cdot \frac9{10} \cdot B \cdot \frac9{10} \cdot H = \frac{81}{100} \cdot A_o$

3. ## Re: Divided triangle, proportion question

Originally Posted by earboth
1. Draw a sketch!

2. By proportion you'll get:

$\displaystyle \dfrac bB = \dfrac9{10}~\implies~b=\frac9{10} \cdot B$

$\displaystyle \dfrac hH = \dfrac9{10}~\implies~h=\frac9{10} \cdot H$

3. The area of the original triangle is calculated by:

$\displaystyle A_o = \frac12 \cdot B \cdot H$

The area of the smaller triangle is calculated by:

$\displaystyle A_s = \frac12 \cdot b \cdot h = \frac12 \cdot \frac9{10} \cdot B \cdot \frac9{10} \cdot H = \frac{81}{100} \cdot A_o$
Hi earboth!
Thanks for the graph! You really exceed in Geometry!
Thanks for the easy to understand explanation, I get it now!
Using this is possible to calculate the area of the smaller triangle, and then the original triangle.
Great! Thanks again!

All the best!

4. ## Re: Divided triangle, proportion question

Hi Zellator,
Does the given area of 38 sq units refer to the larger (largest?) of the 10 parts or to the larger of two parts?

5. ## Re: Divided triangle, proportion question

Originally Posted by bjhopper
Hi Zellator,
Does the given area of 38 sq units refer to the larger (largest?) of the 10 parts or to the larger of two parts?
Hi bjhopper how are you?
The area given is of the largest portion of the divided triangle, looking at the graph of earboth, the portion underneath the red triangle.


# Is this a simple answer to the classic problem "A certain city has 10 bus routes..."

A certain city has 10 bus routes. Is it possible to arrange the routes and the bus stops so that if one route is closed, it is still possible to get from anyone stop to any other (possibly changing along the way), but if any two routes are closed, there are at least two stops such that it is impossible to get from one to the other?

Given the solution above, why did the authors feel compelled to answer: Yes. Consider 10 straight lines in the plane, no 2 are parallel & no 3 are concurrent. Let lines be bus routes & let points of intersection be stops. We get from anyone stop to any other (if the stops lie on 1 line, w/o changing; & if not, then with just 1 change). If we discard 1 line, it's still possible to get from anyone stop to any other, changing buses at most once. However, if we discard 2 lines, then 1 stop-their point of intersection-will have no bus routes passing thru it, & it'll be impossible to get from this stop to any other.

Source: A. M. Yaglom and l. M. Yaglom CHALLENGING MATHEMATICAL PROBLEMS WITH ELEMENTARY SOLUTIONS Volume II Problems From Various Branches of Mathematics Translated by James McCawley, Jr. Revised and edited by Basil Gordon DOVER PUBLICATIONS, INC. NEW YORK

• Yes, the answer is correct. Jun 9, 2019 at 6:12
• My guess, Joe, is that when they wrote "changing", they meant "changing once". Jun 9, 2019 at 13:04
• Your answer is correct and fine. It is possible the authors just didn't think of this solution and thus put their solution into the book. Everybody overlooks something every now and then. Jun 9, 2019 at 15:30
• My solution fails to meet the requirement, "If we discard 1 line, it's still possible to get from anyone stop to any other, changing buses at most once." Jun 10, 2019 at 0:55
• Gerry, your interpretation of the wording is what makes the problem sufficiently complex. Thanks. Jun 10, 2019 at 0:58

Let’s go back to the roots.

I guess this is a problem 101 at p.53 from a book “Non-elementary problems in elemntary presentation” by A.M. Yaglom & A.M. Yaglom (“Неэлементарные задачи в элементарном изложении” by Акива Моисеевич и Исаак Моисеевич Яглом), Moskow, State publishing house of technical and theoretical literature, 1954.

It is the same problem which you quoted and your solution fits for it.

Also author’s solution is the same which your quoted.

I can explain the situation as follows. The problem is contained in a subsection devoted to arrangements of points and planes and the authors say that this topic was developed in XIX century into a big science, called projective geometry. The questions, considered in problems 101–107 belong to relatively narrow topic of projective geometry, namely, to so-called configuration theory, which has a big importance in modern mathematics. This explains the solution, but it is still surprising how your simple solution was missed.

But I guess that this problem probably was taken from Moskow mathematical competition from 1950 (9-10 forms, second round, problem 4):

Можно ли провести в городе $$10$$ автобусных маршрутов и установить на них остановки так, что какие бы $$8$$ маршрутов ни были взяты, найдётся остановка, не лежащая ни на одном из них, а любые $$9$$ маршрутов проходят через все остановки.

(Given a city, can we arrange $$10$$ bus routes and set bus stops on them such that for each 8 routes there is a bus stop not belonging to any of the routes, but each $$9$$ routes contain all stops).

The proposed solution is the same as Yagloms’:

Проведём $$10$$ попарно пересекающихся прямых, никакие три из которых не пересекаются в одной точке. Пусть маршруты проходят по этим прямым, а остановками служат точки пересечения прямых. Любые $$9$$ маршрутов проходят через все остановки, поскольку через каждую остановку, лежащую на оставшейся прямой, проходит одна из $$9$$ прямых, соответствующих этим маршрутам. Любые $$8$$ маршрутов не проходят через остановку, которая является точкой пересечения оставшихся двух маршрутов.

But although this problem looks similar to Yagloms’, its essence is different! It asks not about connectivity of a graph with removed edges, but about incidence requirements. The geometric solution satisfies them, whereas the cyclic graph doesn’t.


# Problem abstraction

A standard deck of $$52$$ cards has $$26$$ red cards: it has $$13$$ hearts, $$13$$ diamonds, as well as $$26$$ black cards ($$13$$ spades, as well as $$13$$ clubs). Let us draw $$5$$ cards from the deck at once, and return those cards to the deck afterward.

What is the expected number of draws before we see all $$26$$ red cards?

# Use case

Let us say that there is a set of $$N = 100$$ cards in a game. $$M = 30$$ cards are of rare rarity and $$N - M = 70$$ cards are of common rarity. We buy booster packs of size $$= 10$$. The question is: how many booster packs need to be bought to collect all $$M = 30$$ cards?

# Attempted solution

I have managed to calculate the approximate number of booster packs necessary to get $$M = 30$$ rare cards by calculating the expectation of the above hypergeometric distribution ($$\mu$$) and then calculating $$M/\mu$$. However, this is not the correct solution since it does not take into account the possibility of collecting duplicates.

Regarding the Coupon collector's problem, I'm not sure if it is applicable since we always draw a single coupon, whereas in my use case a booster pack contains more than a single card.

# Simulations

## Problem Abstraction

$$10^6$$ trials were conducted, AVG: $$38.947$$, STDEV: $$12.3653$$ draws

## Use case

$$10^6$$ trials were conducted, AVG: $$38.535$$, STDEV: $$11.962$$ draws

• Related: coupon collector's problem – jvdhooft Jan 31 at 10:18
• @james - thank you for the feedback, I have edited my question to provide additional context. – user3223162 Jan 31 at 11:23
• close to $\frac25\cdot26H_{26}=40.085965$ draws. – robjohn Jan 31 at 15:31
• Could you please explain how you got to the number? – user3223162 Jan 31 at 21:19

Here is a solution of the "problem abstraction" by way of the Principle of Inclusion / Exclusion (PIE).

Let $$T$$ be the number of the first draw in which we have seen all the red cards. We would like to find $$P(T>k)$$ for some $$k>0$$, i.e. the probability that we have not seen all $$26$$ red cards in $$k$$ draws. To that end, let's say a sequence of $$k$$ draws has "Property $$i$$" if red card $$i$$ has not been drawn, for $$i = 1,2,3,\dots,26$$. Let $$S_j$$ be the sum of the probabilities of all the sequences with $$j$$ of the properties, for $$j = 1,2,3,\dots,26$$. For $$S_j$$, there are $$\binom{26}{j}$$ ways to select the $$j$$ cards which are missing. The probability that those cards are missing in a single draw is $$\binom{52-j}{5} / \binom{52}{5}$$, so the probability that the cards are missing in all $$k$$ draws is $$[\binom{52-j}{5} / \binom{52}{5}]^k$$. Therefore $$S_j = \binom{26}{j} \left( \frac{\binom{52-j}{5}}{ \binom{52}{5}} \right) ^k$$ By PIE, the probability of a sequence of draws with at least one of the properties, i.e. a sequence with at least one red card not seen, is $$P(T>k) = \sum_{j=1}^{26} (-1)^{j+1} S_j$$ so \begin{align} E(T) &= \sum_{k=0}^{\infty} P(T>k) \\ &= \sum_{k=0}^{\infty} \sum_{j=1}^{26} (-1)^{j+1} S_j \\ &= \sum_{k=0}^{\infty} \sum_{j=1}^{26} (-1)^{j+1} \binom{26}{j} \left( \frac{\binom{52-j}{5}}{ \binom{52}{5}} \right) ^k \\ &= \sum_{j=1}^{26} (-1)^{j+1} \binom{26}{j} \sum_{k=0}^{\infty} \left( \frac{\binom{52-j}{5}}{ \binom{52}{5}} \right) ^k \\ &= \sum_{j=1}^{26} (-1)^{j+1} \binom{26}{j} \frac{1}{1- \binom{52-j}{5}/ \binom{52}{5}} \\ &= 38.9133 \end{align}

The following Monte Carlo simulation of $$10^6$$ trials in the R language is consistent with the result above. The average number of draws of 5-card hands necessary to see all 26 red cards was 38.973, with a 95% confidence interval of 38.91305 to 38.96158. The analytical result 38.9133 falls in the confidence interval, although just barely.

> # ndraws: return the number of draws of 5-card hands required
> # to see all red cards at least once
> # We consider the red cards to be the cards numbered 1-26.
> ndraws <- function() {
+   seen <- rep(0, 52)
+   n <- 0
+   while (TRUE) {
+     n <- n+1
+     hand <- sample(1:52, 5)
+     seen[hand] <- 1
+     if (sum(seen[1:26]) >= 26)
+       return (n)
+   }
+ }
> nreps <- 1e6
> set.seed(1234)  # for reproducibility
> t <- replicate(nreps, ndraws())
> t.test(t)

One Sample t-test

data:  t
t = 3145.3, df = 1e+06, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
38.91305 38.96158
sample estimates:
mean of x
38.93731

• Thank you for your answer! After some digging, in a paper The Coupon Subset Collection Problem by Adler, Ilan and Ross, Sheldon M I have found equation 7 that solves the issue, and link this question as well. What keeps me confused is that the expectation depends only on the number of distinct balls in the set and the size of the drawn subset, but not on the size of the entire set. Am I misunderstanding something? – user3223162 Feb 4 at 11:11
• @user3223162 I haven't read the paper you refer to, but in the question you link to, the assumption is that the urn contains one each of $n$ distinct balls, so the number of distinct balls is the same as the number of balls in the urn. – awkward Feb 4 at 12:56
• In that case, that equation does not solve my issue. Furthermore, simulations I ran disagree with your attempt. Still, I appreciate the effort – user3223162 Feb 4 at 15:46
• @user3223162 There must be something amiss, then, because my simulation agrees with the analytical result I posted. I have added the simulation to the solution, above. – awkward Feb 4 at 20:20
• You are correct, my tests contained an error and after correction confirm your results. I have ran the formula alongside with some simulations and the results correspond. For now, I am marking this as solved, I will try and confirm my findings in some existing literature on the subject. Thanks! – user3223162 Feb 5 at 12:59


# Question about Asymptotic Notation

I am doing a question on asymptotic notation. I have two functions $$f(n)$$ and $$g(n)$$, where $$f(n) = (\log_2n)^2$$ and $$g(n) = \log_2n^{\log_2n} + 2\log_2n$$. I have to determine whether $$f(n)$$ is $$O(g(n))$$, $$\Omega(g(n))$$, or $$\Theta(g(n))$$.

My approach to figuring this out is to determine whether $$g(n)$$ grows faster than $$f(n)$$ or if $$f(n)$$ grows faster than $$g(n)$$. To do this, I am trying to prove whether $$2\log_2n \leq (log_2n)^2$$ for all $$n \geq c$$, where $$c$$ is a constant. I want to prove this because if it is true, then it can be said that $$f(n)$$ grows faster than $$g(n)$$ for all $$n \geq c$$ (where $$c$$ is a constant). I know that I would also have to prove whether $$\log_2n^{\log_2n} \leq (log_2n)^2$$ in order to say that $$f(n)$$ grows faster than $$g(n)$$ for all $$n \geq c$$.

So far I have:

$$\log_2n \leq (log_2n)^2$$ $$2\log_2n \leq 2(log_2n)^2$$

However, I am not sure where to go from here in trying to prove whether $$2\log_2n \leq (log_2n)^2$$. Dividing both sides of the inequality by 2 will not achieve anything.

Am I taking the right approach for solving this question, or is there a better way to determine the asymptotic complexity of $$f(n)$$? Any insights are appreciated.

• Hint: Instead of dividing by $2$, divide by $\log n$. The resulting inequality holds for $n$ sufficiently large. – Michael Burr Feb 28 at 9:37

We have that $$f(n) = (\log_2 n)^2$$ and $$g(n) =\log_2 n^{\log_2 n} + 2\log_2 n = (\log_2 n)^2 + 2\log_2 n$$ This last equality is derived by using the logarithm law that $$\log(a^b) = b\log(a)$$.

Question 1. Is $$f$$ asymptotically bounded below by $$g$$? That is, does there exist an $$N_1$$ and a $$k_1 > 0$$ such that $$f(n)\geq k_1 \cdot g(n)$$

for all $$n\geq N_1$$?

Answer 1. We have that $$(\log_2 n)^2 \geq k_1 \cdot \left((\log_2 n)^2 + 2\log_2 n\right)$$

Set $$k_1 = 1/2$$, then $$(\log_2 n)^2 \geq \frac12 (\log_2 n)^2 + \log_2 n$$

By subtracting $$(1/2) (\log_2 n)^2$$, we get $$\frac12 (\log_2 n)^2 \geq \log_2 n$$ Dividing by $$\log_2 n$$ we get $$\frac12 \log_2 n \geq 1$$ which is true for all $$n\geq 4 = N_1$$. Hence, $$f$$ is asymptotically bounded below by $$g$$.

Question 2. Is $$f$$ asymptotically bounded above by $$g$$? That is, does there exist an $$N_2$$ and a $$k_2 > 0$$ such that $$f(n) \leq k_2\cdot g(n)$$ for all $$n\geq N_2$$?

Answer 2. We have that $$(\log_2 n)^2 \leq k_2 \cdot \left((\log_2 n)^2 + 2\log_2 n\right)$$

Set $$k_2 = 1$$, then $$(\log_2 n)^2 \leq (\log_2 n)^2 + 2\log_2 n$$

Subtract $$(\log_2 n)^2$$, then $$0\leq 2\log_2 n$$ which is true for all $$n\geq 1 = N_2$$. Hence, $$f$$ is asymptotically bounded above by $$g$$.

Conclusion. We conclude that $$f$$ is both bounded below and above asymptotically by $$g$$. Specifically, to be more precise, this is true with constants $$1/2$$ and $$1$$ and for $$N = \max(N_1,N_2) = 4$$. This means that $$\frac12\cdot g(n) \leq f(n) \leq 1\cdot g(n)$$ for all $$n\geq 4$$.

In asymptotic notation, this means that $$f(n)$$ is $$\Theta (g(n))$$.

• Would it be the case that you wouldn't be able to prove that f is asymptotically bounded below or above by g if you can't simplify one of the terms in the inequality to a constant? Since in both of your cases, you reduced one of the terms in the inequality to a constant. – ceno980 Feb 28 at 12:05
• No, it doesn't have to be the case that one side is reduced to a constant. What you need to do is to solve the inequality. For example, $$12\sqrt{n} \leq e^n$$ has a solution (around $3.041$, so for whole numbers rounded up $n\geq 4$). You don't even have to solve inequality in any precise manner. You just need to show that it holds for sufficiently large $n$. – Eff Feb 28 at 12:17


Finding the height of a ball with a geometric series

Homework Statement

A ball is dropped from one yard and come backs up $\dfrac{2}{3}$ of the way up and then back down. It comes back and $\dfrac{4}{9}$ of the way. It continues this such that the sum of the vertical distance traveled by the ball is is given by the series $1+2\cdot\dfrac{2}{3}+2\cdot\dfrac{4}{9}+2\cdot\dfrac{8}{27}+\cdot \cdot \cdot=1+2(\dfrac{2}{3}+\dfrac{4}{9}+\dfrac{8}{27}+\cdot\cdot\cdot(\dfrac{2}{3})^n$). Find the height of the tenth rebound and the distance traveled by the ball after it touches the ground for the tenth time.

Homework Equations

$S_n=\dfrac{a(1-r^{n})}{1-r}$

The Attempt at a Solution

I know that the height of the tenth rebound is simply the tenth term in the sequence so $h=s_{10}=(\dfrac{2}{3})^{10}\approx0.0173$ yards. Now I thought that the vertical distance would be $1+2\cdot\dfrac{\frac{2}{3}(1-(\frac{2}{3})^{10})}{1-\frac{2}{3}}\approx1.96$ yards using the formula for a geometric series $\dfrac{a(1-r^{n})}{1-r}$. However, the book tells me that the answer should be $6\cdot(\dfrac{2}{3})^{10}\approx0.104$ yards. Now on the chance that I did misinterpret the book and the author meant the vertical distance the ball traveled the tenth time it hits the ground, shouldn't it be $2\cdot\dfrac{2}{3}^{10}$?

Related Calculus and Beyond Homework Help News on Phys.org
HallsofIvy
Your series starts with $1= (2/3)^0$, with n= 0, not 1. The "10th" term is n= 9, not 10.
Your series starts with $1= (2/3)^0$, with n= 0, not 1. The "10th" term is n= 9, not 10.
I guess I should've stated that the textbook focuses on the series in the parenthesis because the answer for the height is indeed $(\dfrac{2}{3})^{10}$