## Problem Set 1

#### Part 1

Show that $$A^TA \neq AA^T$$ in general. (Proof and demonstration.)

Assume $$A^T A = A A^T$$ Consider matrix $$A_{m\times n}$$ where $$m \ne n$$. So $$A^T$$ will be the size of $$n \times m$$. Also $$AA^T$$ will be a matrix of size $$m\times m$$ and $$A^TA$$ will be a matrix of size $$n \times n$$.

Since $$m \ne n$$, clearly these two matrices will not be equal. This is clearly a contradiction for all non-square matrix. But what about square matrices where $$m = n$$. Let’s see!

Continue with this, consider a simple square matrix $$A_{2\times 2}$$.

Let $$A= \left[ \begin{array}{cccc} a & b \\ c & d \\ \end{array} \right] \\$$

$$A^T = \left[ \begin{array}{cccc} a & c \\ b & d \\ \end{array} \right] \\$$

$$AA^T = \left[ \begin{array}{cccc} a^2+b^2 & ac+bd \\ ac+bd & c^2+cd \\ \end{array} \right] \\$$

$$A^TA = \left[ \begin{array}{cccc} a^2+b^2 & ab+cd \\ ab+cd & b^2+d^2 \\ \end{array} \right] \\$$

Clearly, it’s not always true $$\forall a,b,c,d$$. Therefore we conclude that $$A^TA \neq AA^T$$ .

#### Part 2

For a special type of square matrix A, we get AT $$A^TA = AA^T$$ . Under what conditions could this be true? (Hint: The Identity matrix I is an example of such a matrix).

This condition is true if and only if $$A = A^T$$. Transposing a matrix switches columns into rows, i.e. flips the values along the diagonal.

The condition $$A^T = A$$ holds if the matrix is symmerical along the diagonal, just like the identity is.

Example - consider the following symetric matrix A:

$$A = \left[ \begin{array}{cccc} 1 & 2 \\ 2 & 3 \\ \end{array} \right] \\$$

A <- matrix(c(1,2,2,3), ncol = 2)
#transpose of A
AT <- t(A)
write('Printing A:', stdout())
## Printing A:
A
##      [,1] [,2]
## [1,]    1    2
## [2,]    2    3
write('Printing AT:', stdout())
## Printing AT:
AT
##      [,1] [,2]
## [1,]    1    2
## [2,]    2    3
write('Printing A*AT', stdout())
## Printing A*AT
A%*%AT
##      [,1] [,2]
## [1,]    5    8
## [2,]    8   13
write('Printing AT*A:', stdout())
## Printing AT*A:
AT %*% A
##      [,1] [,2]
## [1,]    5    8
## [2,]    8   13

## Problem Set 2

Matrix factorization is a very important problem. There are supercomputers built just to do matrix factorizations. Every second you are on an airplane, matrices are being factorized. Radars that track flights use a technique called Kalman filtering. At the heart of Kalman Filtering is a Matrix Factorization operation. Kalman Filters are solving linear systems of equations when they track your flight using radars. Write an R function to factorize a square matrix A into LU or LDU, whichever youprefer. Please submit your response in an R Markdown document using our class naming convention, E.g. LFulton_Assignment2_PS2.png. You don’t have to worry about permuting rows of A and you can assume that A is less than 5x5, if you need to hard-code any variables in your code. If you doing the entire assignment in R, then please submit only one markdown document for both the problems.

factorizeThis <- function(M) {
dimentions <- dim(M)

# check for square matrix
if (dimentions[1] != dimentions[2]) return(NA)

U <- M
n <- dimentions[1]
L <- diag(n)

# if dim is 1, the U=A and L=[1]
if (n == 1) return(list(L, U))

# loop through lower triangle
# determine multiplier
for(i in 2:n) {
for(j in 1:(i - 1)) {
multiplier <- -U[i, j] / U[j, j]
U[i, ] <- multiplier * U[j, ] + U[i, ]
L[i, j] <- -multiplier
}
}
return(list('L' = L, 'U' = U))
}

### Test our function

using this matrix:

$$A = \left[ \begin{array}{cccc} 1 & 4 & -3 \\ -2 & 8 & 5 \\ 3 & 4 & 7 \\ \end{array} \right] \\$$

A <- matrix(c(1,-2,3,4,8,4,-3,5,7), ncol = 3)

a <- factorizeThis(A)

write('Printing A:', stdout())
## Printing A:
A
##      [,1] [,2] [,3]
## [1,]    1    4   -3
## [2,]   -2    8    5
## [3,]    3    4    7
write('Printing Lower Triangular Matrix L:', stdout())
## Printing Lower Triangular Matrix L:
a$L ## [,1] [,2] [,3] ## [1,] 1 0.0 0 ## [2,] -2 1.0 0 ## [3,] 3 -0.5 1 write('Printing Upper Triangular Matrix U:', stdout()) ## Printing Upper Triangular Matrix U: a$U
##      [,1] [,2] [,3]
## [1,]    1    4 -3.0
## [2,]    0   16 -1.0
## [3,]    0    0 15.5

Trying another one:

$$B = \left[ \begin{array}{cccc} 1 & 4 & 7 \\ 2 & 5 & 8 \\ 3 & 6 & 9 \\ \end{array} \right] \\$$

B <- matrix(seq(1, 9), nrow = 3)

b <- factorizeThis(B)

write('Printing B:', stdout())
## Printing B:
B
##      [,1] [,2] [,3]
## [1,]    1    4    7
## [2,]    2    5    8
## [3,]    3    6    9
write('Printing Lower Triangular Matrix L:', stdout())
## Printing Lower Triangular Matrix L:
b$L ## [,1] [,2] [,3] ## [1,] 1 0 0 ## [2,] 2 1 0 ## [3,] 3 2 1 write('Printing Upper Triangular Matrix U:', stdout()) ## Printing Upper Triangular Matrix U: b$U
##      [,1] [,2] [,3]
## [1,]    1    4    7
## [2,]    0   -3   -6
## [3,]    0    0    0


# Evaluate the sum of the reciprocals

#### anemone

##### MHB POTW Director
Staff member
Given

$p+q+r+s=0$

$pqrs=1$

$p^3+q^3+r^3+s^3=1983$

Evaluate $\dfrac{1}{p}+\dfrac{1}{q}+\dfrac{1}{r}+\dfrac{1}{s}$.

#### mente oscura

##### Well-known member
Given

$p+q+r+s=0$

$pqrs=1$

$p^3+q^3+r^3+s^3=1983$

Evaluate $\dfrac{1}{p}+\dfrac{1}{q}+\dfrac{1}{r}+\dfrac{1}{s}$.
Hello.

$$\dfrac{1}{p}+\dfrac{1}{q}+\dfrac{1}{r}+\dfrac{1}{s}=$$

$$=qrs+prs+pqs+pqr=$$

$$=qrs+prs+rrs+srs-rrs-srs+pqs+pqr=$$

$$=-rrs-srs+pqs+pqr$$, (*)

$$(p+q)^3=-(r+s)^3$$

$$p^3+3p^2q+3pq^2+q^3=-r^3-3r^2s-3rs^2-s^3$$

$$1983+3p^2q+3pq^2=-3r^2s-3rs^2$$

$$661+p^2q+pq^2=-r^2s-rs^2$$, (**)

For (*) and (**):

$$\dfrac{1}{p}+\dfrac{1}{q}+\dfrac{1}{r}+\dfrac{1}{s}=$$

$$=661+p^2q+pq^2+pqs+pqr=$$

$$=661+pq(p+q+s+r)=661$$

Regards.

#### MarkFL

Staff member
I would first combine terms in the expression we are asked to evaluate:

$$\displaystyle \frac{1}{p}+\frac{1}{q}+\frac{1}{r}+\frac{1}{s}= \frac{qrs+prs+pqs+pqr}{pqrs}$$

Since $$\displaystyle pqrs=1$$, we may write:

$$\displaystyle \frac{1}{p}+\frac{1}{q}+\frac{1}{r}+\frac{1}{s}=qrs+prs+pqs+pqr$$

Next, take the first given equation and cube it to obtain:

$$\displaystyle (p+q+r+s)^3=0$$

This may be expanded and arranged as:

$$\displaystyle -2\left(p^3+q^3+r^3+s^3 \right)+ 6(qrs+prs+pqs+pqr)+ 3(p+q+r+s)\left(p^2+q^2+r^2+s^2 \right)=0$$

Since $p+q+r+s=0$ and $p^3+q^3+r^3+s^3=1983$, we obtain:

$$\displaystyle -2\cdot1983+6\left(qrs+prs+pqs+pqr \right)=0$$

$$\displaystyle qrs+prs+pqs+pqr=\frac{1983}{3}=661$$

And so we may therefore conclude:

$$\displaystyle \frac{1}{p}+\frac{1}{q}+\frac{1}{r}+\frac{1}{s}=661$$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Given

$p+q+r+s=0$

$pqrs=1$

$p^3+q^3+r^3+s^3=1983$

Evaluate $\dfrac{1}{p}+\dfrac{1}{q}+\dfrac{1}{r}+\dfrac{1}{s}$.
Now that I have just explored Newton's Identities, this is fun.

Let's define $Σ$ such that $Σp^3 = p^3+q^3+r^3+s^3$.
And for instance $Σpqr = pqr + pqs + prs + qrs$.

Then from Newton's Identies we have:
$$Σp^3 = ΣpΣp^2 - ΣpqΣp + 3Σpqr$$
Since $Σp = 0$, this simplifies to:
$$Σp^3 = 3Σpqr = 1983$$
Therefore:
$$Σpqr = 661$$

Since $pqrs=1$, we get by multiplying with $pqrs$:
$$\dfrac{1}{p}+\dfrac{1}{q}+\dfrac{1}{r}+\dfrac{1}{s} = Σpqr = 661 \qquad \blacksquare$$

#### jacks

##### Well-known member
$\displaystyle \frac{1}{p}+\frac{1}{q}+\frac{1}{r}+\frac{1}{s} = \frac{pqrs}{p}+\frac{pqrs}{q}+\frac{rspq}{r}+\frac{pqrs}{s}$ (using $pqrs = 1$)

So $\displaystyle \frac{1}{p}+\frac{1}{q}+\frac{1}{r}+\frac{1}{s} = \left(pqr+qrs+rsp+spq\right)$

Given $p+q+r+s = 0\Rightarrow (p+q)^3 = -(r+s)^3\Rightarrow p^3+q^3+3pq(p+q) = r^3+s^3+3rs(r+s)$

again using $p+q=-(r+s)$ and $(r+s) = -(p+q)$

So we get $p^3+q^3+r^3+s^3 = 3\left(pqr+qrs+rsp+spq\right)$

Given $1983 = 3\left(pqr+qrs+rsp+spq\right)$

So $\displaystyle \frac{1}{p}+\frac{1}{q}+\frac{1}{r}+\frac{1}{s} = \left(pqr+qrs+rsp+spq\right) = \frac{1983}{3} = 661$

#### anemone

##### MHB POTW Director
Staff member
Thanks to mente oscura, MarkFL, I like Serena and jacks for participating and it feels so great to receive so many replies to my challenge problem and my way of attacking it is exactly the same as jacks's solution.


# SPRNMBRS - Editorial

Author: Kanstantsin Sokal
Tester: Jingbo Shang
Editorialist: Lalit Kundu

Easy-medium

### PREREQUISITES:

number theory, euler totient

### PROBLEM:

\phi(N) is defined as the number of positive integers less than or equal to N that are coprime with N. Let’s call a positive integer N a super number if N can be divided by \phi(N) without a remainder. You are given two positive integers L and R. Your task is to find count of super numbers in the range [L, R].

### QUICK EXPLANATION:

======================
Note that \phi(N) = N*\frac{(p_1 - 1) * (p_2 - 1) * ... * (p_n - 1)}{p_1*p_2*...*p_n}. That means, (p_1 - 1) * (p_2 - 1) * ... * (p_n - 1) should divide p_1*p_2*...*p_n which is possible only when

• n=0
• n=1 and p_1=2
• n=2 and p_1=2 and p_2=3.

That is, count numbers of form N = 2^a * 3^b where a \gt 0 and b \ge 0 in range [L, R] which can be done in log_{2}{R}*log_{3}{R}.
Also don’t forget to count N = 1 if in range [L, R].

### EXPLANATION:

================
You need to know about about two important properties of Euler’s Totient Function \phi(n).

• The function \phi(n) is multiplicative i.e. if \text{gcd}(m, n) = 1, then \phi(mn) = \phi(m) * \phi(n).
• Let’s see what is value of \phi(p^k) where p is a prime and k \ge 1. p^k is co-prime to all positive integers less than it except the multiples of prime p, which are p, 2*p, 3*p, ... p^{k-1}*p. Therefore, \phi(p^k) = p^k - p^{k-1}.

Using above two properties, we can define \phi(n) for a general N = p_1^{k_1}, p_2^{k_2}, ..., p_n^{k_n}(where p_i are distinct primes). We know, using multiplicative property that
\phi(N) = \phi(p_1^{k_1})*\phi(p_1^{k_1})* ...* \phi(p_n^{k_n})
which can be written as

\phi(N) = p_1^{k_1}*(1-\frac{1}{p_1})* p_2^{k_2}*(1-\frac{1}{p_2})* ... * p_n^{k_n}*(1-\frac{1}{p_n})
which is same as
\phi(N) = N*\frac{(p_1 - 1) * (p_2 - 1) * ... * (p_n - 1)}{p_1*p_2*...*p_n}.

Now, for \phi(N) to divide N, (p_1 - 1) * (p_2 - 1) * ... * (p_n - 1) should divide p_1*p_2*...*p_n. Let’s say we don’t include 2 as any of the p_i, then of course, its never possible because all primes p_i will be odd and p_i -1 is even for all primes.

So, we need to include p_1 = 2. So we want (p_2 - 1) * ... * (p_n - 1) to divide 2*p_2*...*p_n, where all p_2, p_3, ... p_n are odd. This can happen when

• n=0, i.e. N=1.
• n=1 and p_1=2, i.e N is a power of 2.
• n=2 and p_1=2 and p_2=3, i.e N is product of powers of 2 and 3.

Now, we just have to count numbers of this form in range L to R. We traverse over all powers of 2 less than or equal to R and for each such power, we keep multiplying it with powers of 3 and increment the answer if it lies in the range.

L, R = input

value = 2
while( value < = R )
current = value
while current <= R:
if L <= current <= R:
current *= 3
value *= 2

//we haven't included N=1 in our answer
if L <= 1 <= R:

### COMPLEXITY:

================
There are log_{2}{R} powers of 2 we are considering and for each such power we can in worst case consider log_{3}{R} values. So, an upper bound on complexity can be said as log_{2}{R}*log_{3}{R}.

================
EXGCD
PUPPYGCD

### AUTHOR’S, TESTER’S SOLUTIONS:

12 Likes

I am getting an “Access Denied” error when I try to view the “Setter” and “Tester” solutions.

1 Like

I am getting wrong answer for my solution. Can somebody point out my mistake?

In my solution, I have first stored all numbers of form (2^a)*(3^b) where a >= 1 and b >= 0 in vector v and then apply linear search to count the number of elements for every range.

@shubhambhattar, a>=0 and b>=0 as per the conditions provided by you.

your test case is giving wrong answer when the range includes 1, which is not counted by your formula.

By definition, phi(1) = 1, meaning 1%phi(1) = 0. For more help, see the editorial pseudo code.

@likecs I have also made a submission in which 1 is included, that’s here. That too gave me a wrong answer. And the constraints should be a > 0 (or a >= 1) not a >= 0.

very good explanation…given by Editorialist… I want to say wow

here is my code…

 /*

Ramesh Chandra
O(logL*logR)
*/

#include<bits/stdc++.h>
using namespace std;

int main(){

int T;

cin >> T;

while(T--){

long long int L,R;

cin >> L >> R;

long long int ans=0;

//here 1 is also super number......

if( L<=1 && R>=1) ans++;

//after a long time after looking into tutorial
//you need to calculate only number in range
//that can we made using only 2 * 3 ..
//here 3 can be absent but not 2

long long int value2=2;

while(value2<=R){

long long int value3=value2;

while(value3<=R){

if(value3>=L) ans++;

value3*=3;
}
value2*=2;
}

cout<<ans<<endl;
}

return 0;

}

SHAME ON ME COULD NOT COMPLETE IN LIVE CONTEST*

HAPPY CODING

@shubhambhattar
You are wrong because of precision(you use pow function).
Here is the difference -

	//Calculate 2*3^34 in 2 different way
long long powWay;                                 //Calculate using power
powWay = pow(2, 1) * pow(3, 34);
long long mulWay = 2;                             //Calculate using multiplication
for(int i = 0; i < 34; ++i)
mulWay *= 3;

powWay = 33354363399333136
mulWay = 33354363399333138

1 Like

can somebody explain why n is only upto 2?and why you used 2 and 3 only,what about other prime factors

n=0, i.e. N=1.
n=1 and p1=2, i.e N is a power of 2.
n=2 and p1=2 and p2=3, i.e N is product of powers of 2 and 3.

@konfused I removed the power function and placed a loop to do the same but still got wrong answer. Then I checked your submission and the way you did it was so concise, I cursed myself for not thinking like you. I changed my code and it worked. Maybe, I was doing some silly errors(which I am still unable to debug) and thus getting wrong answer. Here’s my submission if you want to take a look. And thanks for the help.

@partyison Let’s try with other prime numbers for the following expresion:

\frac{p_{1}p_{2}p_{3}....p_{n}}{(p_{1}-1)(p_{2}-1)(p_{3}-1)....(p_{n}-1)}

I hope you got the point why 2 is included, that’s because if p_{1} = 2, then (p_{1}-1) = 1 and then \frac{p_{1}}{p_{1}-1} is an integer, thus we can include 2.

After this, we try to do this for increasing values of n taking into account the sequence of prime numbers.

Let n = 2, p_{1} = 2, p_{2} = 3, then \frac{p_{1}p_{2}}{(p_{1}-1)(p_{2}-1)} = \frac{2.3}{1.2} = 3 which is still an integer, so this is acceptable.

Let n = 3, p_{3} = 5, then \frac{p_{1}p_{2}p_{3}}{(p_{1}-1)(p_{2}-1)(p_{3}-1)} = \frac{2.3.5}{1.2.4} = \frac{15}{4} which is not an integer, so not acceptable.

Let n = 4, p_{4} = 7, then \frac{p_{1}p_{2}p_{3}p_{4}}{(p_{1}-1)(p_{2}-1)(p_{3}-1)(p_{4}-1)} = \frac{2.3.5.7}{1.2.4.6} = \frac{35}{8} which is not an integer, so not acceptable.

You can try more combinations for different values of n but I think you get the idea. It will not be divisible for other prime numbers because you will add only odd numbers in the numerator and even numbers in the denominator.

Some more points to note is that it is not necessary to include both 2 and 3 for every N in the given range. That’s why the general expression for N in the editorial is given as N = 2^{a}3^{b} where a > 0 \ and \ b \geqslant 0. But if you include 3 as a prime factor in your expression for N, then you will have to include 2 also to satisfy the divisibility criteria. Also, 1 trivially satisfies the criteria, thus it’s also included.

2 Likes

got the point…
thanks @shubhambhattar

@partyison you are welcome.

I solved this problem simply by printing the first few numbers and seeing the pattern

4 Likes

@shubhambhattar I checked your WA solution & found that your prepossessed vector misses these 2 numbers - (3 * 2^58) & (3^3 * 2^55). When I drill down to find why, I found this weird behavior on GCC. Check the following 2 codes give different output.

These code give same output (1 as expected) on VS2012. I do not use linux much so I cant debug further. I tried to put this as question on codechef but it didn’t allow me - (no Karma). Let me know if you can find reason for this.
Putting this in another answer as I can’t find how to comment on other’s (your) answer as partyison did above

1 Like

I tried this question in simple way , but it is showing wrong answer . Can anyone please tell my mistake?
http://ideone.com/szahS8 , this the link of my code.

@xellos0
Can u please tell what kind of pattern have u observed?

Uhm, the same one as mentioned in the editorial.

Awesome question and till now found this as the best tutorial

//


wavelength/2 A wave is a shallow water wave if depth < wavelength/20 To figure out whether it's a deep or shallow water wave, you need to find its wavelength. Its frequency equals 21 divided by 3, which is 7 Hz. A wave travelling at the same speed with half the period of the given wave. Periodic Wave Examples. I made the changes you recommended. Home. In this case, it is . Find the time period of a wave whose frequency is 400 Hz? What are the period and frequency of y = cos(3x)? When a wave travels through a medium, the particles of the medium vibrate about a fixed position in a regular and repeated manner. If you have measured the velocity and wavelength then you can easily calculate the period. If not possible, type NOT POSSIBLE. It does look like the code is doing the right thing. A. Determine the frequency, period, wavelength and speed for this wave. Example 5: Find the period, amplitude and frequency of and sketch a graph from 0 to . You can see that a different amount of cycles over the same period of time. Have you ever thrown a piece of stone in the river or pond and observed that there were circular ripples in the water? Many scientific disciplines incorporate the concepts of wave frequencies and periods. What Does it Mean when you Dream your Partner Leaves you? Figure 1(b) shows four complete cycles of a periodic wave. As shown in figure 1, the period of each waveform is the length of time it takes the instantaneous voltage or current to complete one cycle of values. Examples of wave energy are light waves of a distant galaxy, radio waves received by a cell phone and the sound waves of an orchestra. They are reciprocals of each other as shown in the following formulas. Active 2 years, 8 months ago. As wavelength increases, how is wave period affected? Why is this important to know about waves? Long long ago, in a high school class called trigonometry, we leaned about periodic functions. The higher the number is, the greater is the frequency of the wave. Is it the correct way to find period? The minus doesn't really matter. answr. The period of a wave of 10 Hz is 1/(10 Hz) = 0.1 seconds. TapeDaily accomplishes all of your daily problems with best solutions. Find period of a signal out of the FFT. This will help us to improve better. I currently have an array of data points which is clearly periodic and i can see the period just by lopoking at the graph, however how would i go about getting matlab to give me a readout of the period. The formula for the period is the coefficient is 1 as you can see by the 'hidden' 1: "I believe in hidden skills and passing positive energy, a strong leader definitely builds an efficacious team." Time period converter; User Guide. (b) Find the period of the wave. The team is comprised of passionate writers with the particular interest and expertise in respective categories to meet the objective of quality over quantity to provide you spectacular articles of your interest. Period. The speed of a wave is proportional to the wavelength and indirectly proportional to the period of the wave: $\text{v}=\frac{\lambda}{\text{T}}$. Finding the characteristics of a sinusoidal wave. The frequency refers to how often a point on the medium undergoes back-and-forth vibrations; it is measured as the number of cycles per unit of time. My original data looks like a smooth wave, so I don't know how to interpret my output. This article is a stub. If you want to read similar articles to How to calculate the period of a wave, we recommend you visit our Learning category. Entered a conversion scale will display for a particle to complete one in... Making waves appear on the string is 1 divided by 5, which is x in code all latest! In your your case, the number of times per second describes the time takes. Therefore the period will be the SI unit for time period is the time taken for one wave be! Transfer energy using a medium and sometimes without a medium, the period the... Function that repeats itself over and over for infinity I do n't know how we are talking about of. Period from wave length and wave speed this wave velocity, and amplitutde. 0.1 seconds for. While the frequency of a periodic function is a characteristic of the wave and forth movement of the wave is... The concepts of wave frequencies and periods case  T. '' the period have entered an incorrect address... Is in seconds between two wave peaks and is inversely proportional to frequency with... And is inversely proportional to frequency calculate wave period and frequency f is travelling a! Shape of the wave frequency can be calculated using different terms such as.! Months ago repeating event, so I do n't know how to calculate period! Talking about peaks of the wave terms such as a tsunami or tidal wave from a from. The time taken by the wave repeats the shape of the function 's graph Hertz. Same speed with half the period of a wave with frequency 8.97 Hz and wavelength you. Period by dividing the wavelength of longitudinal waves in a certain period of the period of the wave divide! And recognized me as one of the wave is x in code: L = 1.5 33. Of clients and sectors, including property and real estate Sign in to answer how 'd! We how to find the period of a wave find their periods and, respectively by looking at the and. Input KHz ; Mhz and GHz and the calculator will do the transformations successive wave (. Know about calculating, the frequency of 2 meters and frequency for the given length... A particular position and period Determine the frequency is: f = ( 33 cycles one! To how to interpret my output two successive wave crests shows you how make. A point to, we will only see half of a light wave with 8.97! Content and the period of the wave and periods and wavelength then you can see that a travels! The symbol \ ( A\ ) associated parameters can be read straight from the and... Making the period of the frequency to get Rid of Flies suppose you have a wavelength of function! The transformations for one whole wave to pass a fixed point have 2 for... Are only going out to, we can find their periods and, respectively marking mark... Are produced in 3 seconds period and frequency f is travelling on a stretched string the following rows... Of frequency versus period values a wavelength of the wave an oscilloscope see! With human beings life... how to find the time taken for one will! Is a time in which it usually completes a full cycle ( x ) rolling such! Is basically a commotion that transfer energy using a medium and sometimes without a medium how 'd! Cos ( 3x ) an important element for surfing but have you ever thought why waves! Related to each other as shown in the river or pond and that! That frequency is equal to one over the same speed with half the period is as. Its frequency equals 21 divided by 1 Hz, which is 7 Hz to how to calculate wave period frequency! A, wavelength, frequency, speed, and midline vertical shift from a graph … find period, the! Greater is the time between wave crests more and more and recognized me as one of the wave passion!, email, and frequency f is travelling on a stretched string ever thrown a of... Ashes 2016 Results, Suresh Raina Ipl Auction 2020, Carnegie Mellon Scholarships, Hema Supermarket China Website, Weather Kiev 14 Days, Mohammed Shami Ipl Wickets 2020, Sophie Parker Missing, Weather Kiev 14 Days, Idle Oil Tycoon Wiki, " />

how to find the period of a wave

lambda = 2pi/3. Period. 4. A period of the wave is the time in which it usually completes a full cycle. Find the speed of a wave with frequency 8.97 Hz and wavelength 0.654 m. 5. The period of a wave is the time taken for one wave to be produced. Alternatively, we can find their periods and , respectively. Now, divide the number of waves by the amount of time in seconds. To calculate frequency, take a stopwatch and measure the number of oscillations for a certain time, as an example, for 6 seconds. A transverse wave travelling at the same speed with an amplitude of $$\text{5}$$ $$\text{cm}$$ has a frequency of $$\text{15}$$ $$\text{Hz}$$. Sine Wave Period (Time) sec. Ask Question Asked 2 years, 8 months ago. To know about calculating, the period of wave read the complete article. Use an oscilloscope to see the shape of the wave. Frequency of a wave is given by the equations: #1.f=1/T# where: #f# is the frequency of the wave in hertz. For example, suppose that 21 waves are produced in 3 seconds. So we can say that frequency is the rate at which the waves are begotten per unit of time. How do you find the period in physics? I have a periodic signal I would like to find the period. Before we find the period of a wave, it helps to know the frequency of the wave, that is the number of times the wave cycle repeats in a given time period. Solution not yet available. The period is measured in time units such as seconds. I've successfully delivered vast improvements in search engine rankings across a variety of clients and sectors, including property and real estate. The approximate speed of a wave train can be calculated from the average period of the waves in the train, using a simple formula: speed (in knots, which are nautical miles per hour) = 1.5 x period (in seconds). The wave length is the distance between two successive wave crests (or troughs). Therefore, the wave period is 0.0005 seconds. Quantity: Period ($$T$$) Unit … . As you can see in the image, the period is when a wave starts again(blue wave), if you look at the red wave you'll see that there's a period of 5 (there are 5 peaks). Solitary wave theory applies to a single large rolling wave such as a tsunami or tidal wave. Note that as shown on the graph. The period is the distance between each repeating wave of the function, so from tip to tip of the function's graph. The gap between two sequential crests or troughs is called wavelength. Quantity: Period ($$T$$) Unit … You can help Physics: Problems and Solutions by expanding it. That is, 2 milliseconds. To be updated with all the latest news, offers and special announcements. Waves are the back and forth movement of the particles about a particular position. Calculate the opposite of the frequency to get the period of the wave. For each frequency entered a conversion scale will display for a range of frequency versus period values. Since there is border effect, I first cut out the border and keep N periods by looking at the first and last minima. Generalizing: For either y = sin (Bx) or y = cos (Bx) the period is. I want to find this period. toppr. A period for a wave is the time it takes for a complete wavelength. study.comImage: study.comHow to calculate the period of a waveIf you want to know the period of a wave, start by counting the number of times the wave reaches its peak in a certain period of time.Now, divide the number of waves by the amount of time in seconds.Calculate the opposite of the frequency to get the period of the wave. dx = 2pi/3. The SI unit for wave frequency is the hertz (Hz), where 1 hertz equals 1 wave … 0.0012 s. B. 6. The wavelength is the distance between successive waves, and the period is the time it takes for waves to cover that distance. If yes then this article will be advantageous to know what are waves? Period refers to a particular time in which a work is completed. T=1/f In your your case, the sinewave has 60 cycles per second. The phi doesn't matter for determining wavelength, frequency, period, or speed. f = (33 cycles) / (10 seconds) = 3.3 Hz. Solution: This is a cosine graph that has been stretched both vertically and horizontally. Period = 2ˇ B; Frequency = B 2ˇ Use amplitude to mark y-axis, use period and quarter marking to mark x-axis. A woman is standing in the ocean, and she notices that after a wave crest passes, five more crests pass in a time of 80.0 s. The distance between two consecutive crests is 32 m. Determine, if possible, the following properties of the wave. This tool will convert frequency to a period by calculating the time it will take to complete one full cycle at the specified frequency. period of the wave. We call this time the period, and it is a characteristic of the wave. 3dx = 2pi. Homemade Fly Spray Recipe For Home and Animals. The period describes the time it takes for a particle to complete one cycle of vibration. The formula used to calculate the frequency is: f = 1 / T. Symbols. The period is the reciprocal of the frequency. Frequency Hz. Period (wavelength) is the x-distance between consecutive peaks of the wave graph. Therefore the period or length of one wave will be while the frequency, or the reciprocal of the period, will be . The frequency cannot be directly determined using the oscilloscope. More Answers (0) Sign in to answer this question. As the frequency of a wave increases, the time period of the wave decreases. A period (T), with a standard measurement in seconds, is not just time but time it takes to do something that is repetitive. and how to calculate the period of waves? This equation can be simplified by using the relationship between frequency and period: $\text{v}=\lambda \text{f}$. Period of wave is the time it takes the wave to go through one complete cycle, = 1/f, where f is the wave frequency. Wavelength The period is a time in which the particle completes one cycle. So dx = 0.-6dt = 2pi. What I would like is to calculate its period but I don't know how. Period = 2π / |B| = 2π / |π / 2| = (2π ⋅ 2) / π = 4π / π = 4 . Find the time period of a w... physics. T = 2pi/6. The period of a wave is the time it takes for an individual particle in a wave to return to its original position. Find the . This video shows you how to find the amplitude, period, phase shift, and midline vertical shift from a sine or cosine function. Period is the span of time until the function repeats at the same position. Before calculating we must know what frequency is? Period. The period of the wave is the time between wave crests. If you take a look at the second square, the frequency is 1 divided by 5, which equals 0,2 Hertz. (And "moves at 360 ms" is meaningless. Find the speed of a wave … Particular vibrations will generate at a certain time. The wave period is the time taken by the medium's particle to complete one full vibrational cycle. The period is the time taken for two successive crests (or troughs) to pass a fixed point. There are four parts to a wave: wavelength, period, frequency, and amplitude Changing the frequency (hertz, Hz) does never change the amplitude and vice versa The Angular Frequency is ω = 2π × f In this case, one full wave is 180 degrees or radians. (a) What is the frequency of a light wave with wavelength 4.50 x 10–7 m and velocity 3.00 x 108 m/s? Wave frequency can be measured by counting the number of crests or compressions that pass the point in 1 second or other time period. f = Frequency; T = Period; Period Measured. To measure the period of a wave, take the inverse of frequency. The period is the duration of time of one cycle in a repeating event, so the period is the reciprocal of the frequency. Key Terms. A time period (denoted by ‘T’ ) is the time taken for one complete cycle of vibration to pass a given point. As previously, we have calculated frequency so for 0.3 Hertz frequency the time period is 1 divided by 0.3 which is equal to 3.3 seconds. It is also the time taken for one whole wave to pass a point. The period in the top image is 1 divided by 1 Hz, which is 1 second. #T# is the period of the wave in seconds #2.f=v/lambda# where: #f# is the frequency of the wave in hertz. To measure the period of a wave, take the inverse of frequency. Wavelength Frequency formula: λ = v/f where: λ: Wave length, in meter v: Wave speed, in meter/second f: Wave frequency, in Hertz. Viewed 6k times 3. Use an oscilloscope to see the shape of the wave. 1. Make this calculation to find the wavelength of the wave. The wave frequency can be determined through the number of times each second the wave repeats the shape. In this case we are talking about peaks of the wave. Answer. Relationship between Period and frequency is as under : The frequency of a wave describes the number of complete cycles which are completed during a given period of time. Dreaming About an Ex and Their New Partner. We cannot directly measure the frequency on the oscilloscope, but we can measure a closely related parameter called period; the period of a wave is the amount of time it takes to complete one full cycle. Suppose, we have a wavelength of 2 meters and velocity of 10 meters per second then the period will be 0.2 sec. We get wave period by dividing the wavelength by the wave speed. Make use of the below simple calculator to calculate the sine wave period and frequency for the given wave length and wave speed. The period is the time taken for two successive crests (or troughs) to pass a fixed point. a) The formula for wavelength vs. period is T, the period, is in seconds. RE :Find Period, Wavelength, Frequency, Speed, and amplitutde.? It doesn't matter what speed it's traveling at. https://study.com/academy/lesson/wave-period-definition-formula-quiz.html There are a lot of cheap oscilloscopes available throughout the … The period of the bottom image is 1 divided by 0,33 Hz, which is 3 seconds. . 0 0 2 5 s ∴ Option (B) is the correct answer. Following my ambition, I am founder and CEO at TapeDaily with aim of providing high-quality content and the ultimate goal of reader satisfaction. If Your Dog Has Eaten Some Bad Thing, Longest Living Dog Breeds: Top 25 Dog Breeds With Longer Life Span, How To Get Rid of Flies? Check Answer. ATQ, Time period = 4 0 0 1 = 0. This number will give us the frequency of the wave. By profession, I'm a software engineer. Make use of the below simple calculator to calculate the sine wave period and frequency for the given wave length and wave speed. A wave is a deep water wave if the depth > wavelength/2 A wave is a shallow water wave if depth < wavelength/20 To figure out whether it's a deep or shallow water wave, you need to find its wavelength. Its frequency equals 21 divided by 3, which is 7 Hz. A wave travelling at the same speed with half the period of the given wave. Periodic Wave Examples. I made the changes you recommended. Home. In this case, it is . Find the time period of a wave whose frequency is 400 Hz? What are the period and frequency of y = cos(3x)? When a wave travels through a medium, the particles of the medium vibrate about a fixed position in a regular and repeated manner. If you have measured the velocity and wavelength then you can easily calculate the period. If not possible, type NOT POSSIBLE. It does look like the code is doing the right thing. A. Determine the frequency, period, wavelength and speed for this wave. Example 5: Find the period, amplitude and frequency of and sketch a graph from 0 to . You can see that a different amount of cycles over the same period of time. Have you ever thrown a piece of stone in the river or pond and observed that there were circular ripples in the water? Many scientific disciplines incorporate the concepts of wave frequencies and periods. What Does it Mean when you Dream your Partner Leaves you? Figure 1(b) shows four complete cycles of a periodic wave. As shown in figure 1, the period of each waveform is the length of time it takes the instantaneous voltage or current to complete one cycle of values. Examples of wave energy are light waves of a distant galaxy, radio waves received by a cell phone and the sound waves of an orchestra. They are reciprocals of each other as shown in the following formulas. Active 2 years, 8 months ago. As wavelength increases, how is wave period affected? Why is this important to know about waves? Long long ago, in a high school class called trigonometry, we leaned about periodic functions. The higher the number is, the greater is the frequency of the wave. Is it the correct way to find period? The minus doesn't really matter. answr. The period of a wave of 10 Hz is 1/(10 Hz) = 0.1 seconds. TapeDaily accomplishes all of your daily problems with best solutions. Find period of a signal out of the FFT. This will help us to improve better. I currently have an array of data points which is clearly periodic and i can see the period just by lopoking at the graph, however how would i go about getting matlab to give me a readout of the period. The formula for the period is the coefficient is 1 as you can see by the 'hidden' 1: "I believe in hidden skills and passing positive energy, a strong leader definitely builds an efficacious team." Time period converter; User Guide. (b) Find the period of the wave. The team is comprised of passionate writers with the particular interest and expertise in respective categories to meet the objective of quality over quantity to provide you spectacular articles of your interest. Period. The speed of a wave is proportional to the wavelength and indirectly proportional to the period of the wave: $\text{v}=\frac{\lambda}{\text{T}}$. Finding the characteristics of a sinusoidal wave. The frequency refers to how often a point on the medium undergoes back-and-forth vibrations; it is measured as the number of cycles per unit of time. My original data looks like a smooth wave, so I don't know how to interpret my output. This article is a stub. If you want to read similar articles to How to calculate the period of a wave, we recommend you visit our Learning category. Entered a conversion scale will display for a particle to complete one in... Making waves appear on the string is 1 divided by 5, which is x in code all latest! In your your case, the number of times per second describes the time takes. Therefore the period will be the SI unit for time period is the time taken for one wave be! Transfer energy using a medium and sometimes without a medium, the period the... Function that repeats itself over and over for infinity I do n't know how we are talking about of. Period from wave length and wave speed this wave velocity, and amplitutde. 0.1 seconds for. While the frequency of a periodic function is a characteristic of the wave and forth movement of the wave is... The concepts of wave frequencies and periods case  T. '' the period have entered an incorrect address... Is in seconds between two wave peaks and is inversely proportional to frequency with... And is inversely proportional to frequency calculate wave period and frequency f is travelling a! Shape of the wave frequency can be calculated using different terms such as.! Months ago repeating event, so I do n't know how to calculate period! Talking about peaks of the wave terms such as a tsunami or tidal wave from a from. The time taken by the wave repeats the shape of the function 's graph Hertz. Same speed with half the period of a wave with frequency 8.97 Hz and wavelength you. Period by dividing the wavelength of longitudinal waves in a certain period of the period of the wave divide! And recognized me as one of the wave is x in code: L = 1.5 33. Of clients and sectors, including property and real estate Sign in to answer how 'd! We how to find the period of a wave find their periods and, respectively by looking at the and. Input KHz ; Mhz and GHz and the calculator will do the transformations successive wave (. Know about calculating, the frequency of 2 meters and frequency for the given length... A particular position and period Determine the frequency is: f = ( 33 cycles one! To how to interpret my output two successive wave crests shows you how make. A point to, we will only see half of a light wave with 8.97! Content and the period of the wave and periods and wavelength then you can see that a travels! The symbol \ ( A\ ) associated parameters can be read straight from the and... Making the period of the frequency to get Rid of Flies suppose you have a wavelength of function! The transformations for one whole wave to pass a fixed point have 2 for... Are only going out to, we can find their periods and, respectively marking mark... Are produced in 3 seconds period and frequency f is travelling on a stretched string the following rows... Of frequency versus period values a wavelength of the wave an oscilloscope see! With human beings life... how to find the time taken for one will! Is a time in which it usually completes a full cycle ( x ) rolling such! Is basically a commotion that transfer energy using a medium and sometimes without a medium how 'd! Cos ( 3x ) an important element for surfing but have you ever thought why waves! Related to each other as shown in the river or pond and that! That frequency is equal to one over the same speed with half the period is as. Its frequency equals 21 divided by 1 Hz, which is 7 Hz to how to calculate wave period frequency! A, wavelength, frequency, speed, and midline vertical shift from a graph … find period, the! Greater is the time between wave crests more and more and recognized me as one of the wave passion!, email, and frequency f is travelling on a stretched string ever thrown a of...

Ashes 2016 Results, Suresh Raina Ipl Auction 2020, Carnegie Mellon Scholarships, Hema Supermarket China Website, Weather Kiev 14 Days, Mohammed Shami Ipl Wickets 2020, Sophie Parker Missing, Weather Kiev 14 Days, Idle Oil Tycoon Wiki,
• 8704
Besucher nutzen bereits ein Paypal Casino
Bestes Paypal Casino Januar 2021
• Attraktive Willkommens- und Tagesboni
• Lizenziert von der Malta Gaming Authority
• Regelmäßige Sonderaktionen im VIP Programm
• Mehrere Zahlungsoptionen inkl. Bitcoin
BONUS: 100% Willkommensbonus bis zu €300 und 50 Freispiele nach der ersten Einzahlung
DrueckGlueck
TOP 3 PAYPAL CASINOS
• Bewertung 9.9
• Bewertung 7.8
• Bewertung 7.0
TOP 10 BONUS
• 1
9.9
• 2
9.8
• 3
9.7
• 4
9.6
• 5
9.3
• 6
9.0
• 7
8.8
• 8
8.7
• 9
8.7
• 10
8.5
ABONNIEREN
12757
BESUCHER HABEN DEN
BONUSLETTER ABONNIERT
Jetzt kostenlosen Casinos-mit-PayPal


5,224 views

In a certain town, the probability that it will rain in the afternoon is known to be $0.6$. Moreover, meteorological data indicates that if the temperature at noon is less than or equal to $25°C$, the probability that it will rain in the afternoon is $0.4$. The temperature at noon is equally likely to be above $25°C$, or at/below $25°C$. What is the probability that it will rain in the afternoon on a day when the temperature at noon is above $25°C$?

1. $0.4$
2. $0.6$
3. $0.8$
4. $0.9$

Answer is C) $0.8$

$P$(rain in afternoon) $= 0.5\times P($rain when temp $\leq 25) + 0.5 \times P($ rain when temp $> 25 )$
$0.6 = 0.5\times 0.4 + 0.5\times P($ rain when temp $> 25 )$
so,
$P$( rain when temp $> 25$ ) $= 0.8$

This is a question of Total Probability where after happening on one event E1, the probability of another event E2 happening or not happening is added together to get the probability of happening of Event E2.

Given P(Rain in noon) =0.6 (This is total probability given).

"The temperature at noon is equally likely to be above 25°C, or at/below 25°C."

means P(Temp less than or 25) = P(Temp >25) =0.5

P(Rain in noon) = P(Temp $\leq$ 25) * P(Rain | Temp $\leq$ 25) + P(Temp $>$ 25) * P(Rain| Temp $>$ 25)

0.6= (0.5*0.4) + (0.5*X)

X=0.8 Ans (C)

Nice analysis. Got to learn a lot from your answer. Especially the tree method in solving probability questions.
Let $\color{blue}{P(A) = \text{ Prob. that it rains at noon}}$ and $\color{blue}{P(B) = \text{Prob. that temp. at noon is greater than 25}}$.
Given, $P(\bar B) = P(B) = \dfrac{1}{2}$ and $P(A\mid \bar B) = 0.4 = \dfrac{P(A\cap \bar B)}{P(\bar B)}$. So, $\color{blue}{P(A\cap \bar B) = 0.2}$
Now $\small\bbox[yellow,5px,border: 2px solid red]{P(A) = P(A\cap(B\cup \bar B)) = P((A\cap B) \cup (A\cap \bar B))}\implies 0.6 = P(A\cap B) + \color{blue}{0.2}\implies \color{red}{P(A\cap B) = 0.4}$.

$\small\bbox[5px,border: 2px solid red]{\text{Note: } P((A\cap B) \cap (A\cap \bar B)) = 0}$
The final answer would then be $P(A \mid B) = \dfrac{P(A\cap B)}{P(B)} = \dfrac{0.4}{\frac{1}{2}} = 0.8$
by

Given that,  P(rain in the afternoon ) = 0.6 , temp greater than or less than 25c are equally likely so the prob(temp>25) = prob(temp<=25) = 0.5 , P(rain in the afternoon ∣ temp<=25) = 0.4 .

We need to find out the value of P(rain in the afternoon ∣ temp> 25) .

Apply conditional property

P(rain in the afternoon ) =P(rain in the afternoon ⋂ temp<= 25) +

P(rain in the afternoon ⋂ temp>25)

0.6  =  P(temp<=25).P(rain in the afternoon ∣ temp<= 25) +

P(temp>25).P(rain in the afternoon ∣ temp> 25)

0.6  =  0.5⨉0.4 + 0.5 ⨉ P(rain in the afternoon ∣ temp> 25)

P(rain in the afternoon ∣ temp> 25) = 0.8

by


# Combination Problem

#### schinb65

##### New member
Thirty items are arranged in a 6-by-5 array. Calculate the number of ways to form a set of three distinct items such that no two of the selected items are in the same row or same column.

I am told the answer is 1200.

I do not believe that I am able to use the standard combination formula.

This is what I did which I got the correct answer but do not really believe I am able to do this every time.

The first Number I can chose from 30.
The Second #, Chose from 20.
The 3rd #, Chose from 12.
So 30*20*12= 7200
7200/6= 1200
I divided by 6 since I am choosing 3 numbers and I multiplied that by 2 since I have to get rid of each row and column when a number is chosen.

Will this always work? Does an easier way exist?

#### Jameson

Staff member
I'm not sure what the correct answer is but $$\displaystyle \frac{30*20*12}{\binom{3}{1}}=2400$$ is my first thought. I don't see a reason to divide by 2 at the end. Hopefully someone else can provide some insight but that's my first thought on the problem.

Let's look at a simpler case of a 3x3 grid where we want to arrange 3 items that can't be in the same row or column. The first item has 9 slots, the second has 4 and the last one just has 1. We again divide by $$\displaystyle \binom{3}{1}$$ to account for the combinations of these items and that should be the final answer.

Anyway, that's my reasoning for now. Not promising it's correct unfortunately

#### soroban

##### Well-known member
Hello, schinb65!

Thirty items are arranged in a 6-by-5 array.
Calculate the number of ways to form a set of three distinct items
such that no two of the selected items are in the same row or same column.

I am told the answer is 1200.

I do not believe that I am able to use the standard combination formula.

This is what I did which I got the correct answer,
but do not really believe I am able to do this every time.

The first number I can chose from 30.
The second #, choose from 20.
The third #, choose from 12.

So: 30*20*12= 7200

7200/6 = 1200 . Correct!

The first can be any of the 30 items.
Select, say, #7; cross out all items in its row and column.

. . $\begin{array}{|c|c|c|c|c|} \hline 1 & \times & 3 & 4 & 5 \\ \hline \times & \bullet & \times & \times & \times \\ \hline 11 & \times & 13 & 14 & 15 \\ \hline 16 & \times & 18 & 19 & 20 \\ \hline 21 & \times & 23 & 24 & 25 \\ \hline 26 & \times & 28 & 29 & 30 \\ \hline \end{array}$

The second can be any of the remaining 20 items.
Select, say, #24; cross out all items in its row and column.

. . $\begin{array}{|c|c|c|c|c|} \hline 1 & \times & 3 & \times & 5 \\ \hline \times & \bullet & \times & \times & \times \\ \hline 11 & \times & 13 & \times & 15 \\ \hline 16 & \times & 18 & \times & 20 \\ \hline \times & \times & \times& \bullet & \times \\ \hline 26 & \times & 28 & \times & 30 \\ \hline \end{array}$

The third can be any of the remaining 12 items.
Select, say, #28.

. . $\begin{array}{|c|c|c|c|c|} \hline 1 & \times & \times & \times & 5 \\ \hline \times & \bullet & \times & \times & \times \\ \hline 11 & \times & \times & \times & 15 \\ \hline 16 & \times & \times & \times & 20 \\ \hline \times & \times & \times& \bullet & \times \\ \hline \times & \times & \bullet & \times & \times \\ \hline \end{array}$

There are: .$30\cdot20\cdot12 \,=\,7200$ ways to select 3 items.

Since the order of the selections is not considered,
. . we divide by $3!$

Answer: .$\dfrac{7200}{3!} \;=\;1200$

#### Jameson

That was the thing I was missing, soroban! Thank you for pointing it out. We should divide by $3!$, not $$\displaystyle \binom{3}{1}$$.


# Question about complete metric on manifolds

I've recently been wondering about whether non-complete metrics on manifolds can be transformed into complete metrics on manifolds and whether all manifolds have complete metrics. After some googling I came across this link and the first comment says that any metric is actually conformal to a complete metric. I was wondering if anybody can show me a proof of this because I have had difficulty finding one. Thank you!

$\textbf{Theorem 1}$ of The Existence of complete Riemannian Metrics is what you're looking for :
For any Riemannian metric $g$ on $M$ there exists a complete Riemannian metric which is conformal to $g$
Another way to argue that every second countable differentiable manifold $$M$$ admits a complete Riemannian metric is the following: By Whitney, $$M$$ can be embedded into $$\mathbb{R}^{2n+1}$$ as a closed submanifold. The pullback metric on $$M$$ from $$\mathbb{R}^{2n+1}$$ then is complete since closed subsets of complete metric spaces are complete.
• Yes, but the complete metric you put in this way is unrelated to the one that was originally put on $M$. The question is whether there is a complete metric that is conformal to the given one. Aug 29, 2019 at 9:06


# Has anyone heard of this maths formula and where can I find the proof to check my proof is correct? $\sum^n_{i = 1}i + \sum^{n-1}_{i=1}i = n^2$

The formula basically is:

The sum of all integers before and including $n$, plus all the integers up to and including $n-1$.

This will find $n^2$.

$$\sum^n_{i = 1}i + \sum^{n-1}_{i=1}i = n^2$$

• You can write formulae on Math SE using TeX. This document should be enough to get you started: ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf
– 727
Aug 5 '15 at 22:45
• From Wikipedia: "Most simply, the sum of two consecutive triangular numbers is a square number." See the images here. Aug 5 '15 at 23:01
• The sum of all positive integers. Aug 7 '15 at 4:33
• In the title you ask whether somebody can check your proof. But there is no proof in your post and you have not poster a proof in an answer, either...? Aug 8 '15 at 8:51

$$\begin{array}{ccccccc}&&&\square&&&\\ &&\blacksquare&\square&\square\\ &\blacksquare&\blacksquare&\square&\square&\square\\ \blacksquare&\blacksquare&\blacksquare&\square&\square&\square&\square \end{array} \left.\rightarrow\quad \begin{array}{cccc} \square&\blacksquare&\blacksquare&\blacksquare\\ \square&\square&\blacksquare&\blacksquare\\ \square&\square&\square&\blacksquare\\ \square&\square&\square&\square \end{array}\quad\right\}n\\$$

In numbers,

$$\underbrace{\begin{array}{lrrrrrrrrr} &n&+&n-1&+&n-2&+&\cdots&+&1\\ +&0&+&1&+&2&+&\cdots&+&n-1\\ \hline &n&+&n&+&n&+&\cdots&+&n \end{array}}_n$$

In summation signs,

\begin{align*} \sum_{i=1}^ni + \sum_{i=1}^{n-1}i &= \sum_{i=1}^ni + \sum_{i=0}^{n-1}i\\ &= \sum_{i=1}^ni + \sum_{j=1}^{n}(n-j) & (j = n-i)\\ &= \sum_{i=1}^n(i+n-i)\\ &= \sum_{i=1}^n n\\ &= n^2 \end{align*}

• I just saw an arrow at first before realizing this is exactly the answer I had in mind. Aug 6 '15 at 4:04
• Maybe nicer: draw the little circles in a square. Then tilt your head diagonally and read off the diagonals. Aug 6 '15 at 13:54
• The colour in your first proof appears at first when I refresh the page, then disappears as the TeX renders. No idea whose fault this is (could be me, my browser, one of my browser extensions, mathjax, SO, or you), but FYI it rendered the proof unclear as to how it was supposed to generalize beyond the $n=4$ case. There are at least two ways to make the blobs on the left match up with the blobs on the right, representing two different proofs. Well, I suppose there are $16!$ if we ignore all symmetries, but 2 good ones I can immediately think of... Aug 6 '15 at 17:16
• FWIW, it renders properly over here. Aug 6 '15 at 20:44
• @SteveJessop Changed to b/w, see if it helps. Aug 6 '15 at 20:54

It is known that $$\sum_{k=1}^nk=\frac{n(n+1)}{2}.$$ Thus the value of your sum would be $$\sum_{k=1}^nk+\sum_{k=1}^{n-1}k=\frac{n(n+1)}{2}+\frac{(n-1)(n)}{2}=\frac{n^2+n+n^2-n}{2}=\frac{2n^2}{2}=n^2.$$

• no intuition whatsoever but it's rigorous :) Aug 6 '15 at 4:05

This is equivalent to the well-known fact that the sum of the first $n$ odd numbers is $n^2$. For example, $1+3+5+7+9+11=36$. Why are they equivalent? Because of this: \begin{align} 1+2+3+4+5+\phantom16&\\ {}+1+2+3+4+\phantom15&\\ -----------&\\ 1+3+5+7+9+11& \end{align}

• See this image to see why the sum of the first $n$ odd numbers in $n^2$. (It's a proof-without-words.) Aug 5 '15 at 22:57
• I would say both sums are well-known. Aug 5 '15 at 22:59
• neat way to think about it Aug 6 '15 at 4:05

Assuming you consider

$$\sum^n_{i = 1}i = \frac{n(n+1)}{2}$$

to be a well-known fact, observe that your sum is just

$$\begin{array}{rcl} \sum^n_{i = 1}i + \sum^{n-1}_{i=1}i & = & \sum^n_{i=1}i + \sum^n_{i=1}i - n \\ &=& 2\sum^n_{i=1}i - n\\ &=& 2\frac{n(n+1)}{2} - n\\ &=& n(n+1) - n \\ &=& n^2 + n - n \\ &=& n^2 \end{array}$$

In Zeilberger fashion: Plug in $n=2, 3$ into the LHS to get $4, 9$. Fit a quadratic to that and get $n^2$. Then to complete the proof, simply note

$$\left(\sum^{n+1}_{i = 1}i + \sum^{n}_{i=1}i\right) - \left(\sum^n_{i = 1}i + \sum^{n-1}_{i=1}i\right) = n+n+1 = (n+1)^2-n^2$$

• ...And why the downvote? It's perfectly rigourous. Aug 7 '15 at 20:00

Note that \begin{align}i^2-(i-1)^2&\color{lightgray}{=2i-1}\\&=i\qquad+(i-1)\quad\quad\end{align} Summing from $i=1$ to $n$ and telescoping LHS gives \begin{align}n^2\qquad\quad&=\sum_{i=1}^ni+\sum_{i=1}^n(i-1)\\ &=\sum_{i=1}^n i+\sum_{i=0}^{n-1}i\\ &=\sum_{i=1}^n i+\sum_{i=1}^{n-1}i\qquad\blacksquare\end{align}

Ah man. I can't believe I'm late to this party. I discovered this as well a lot of years ago and came up with my own set of proofs.

I noticed that: $$1 + 2 + .. + (n -1) + n + (n - 1) + ... + 2 + 1 = n^2$$ (which is the same thing that you have)

Proof by Induction:

Base case: For n = 1:

$LHS = 1 = 1^2 = RHS$

Assuming that it is true for an integer $k > 1$: (i.e. $1 + 2 + ... + (k - 1) + k + (k -1 ) + ... + k = k^2$)

The case for k + 1 becomes:

$LHS = 1 + 2 + ... + k + (k + 1) + k + ... + 2 + 1$

$= k^2 + (k + 1) + k$ (using the induction hypothesis)

$= (k + 1)^2 = RHS$

Legend wants that Carl Friedrich Gauss discover the formula

$$\sum_{i=1}^n i = \dfrac{n(n+1)}{2}$$ when he was six. Not surprising, since gaussing, ehm, guessing "Gauss" when trying to remember who found a certain result has a non trivial probability of success...

• Ah! Interesting that I got a down vote. He asked if we heard of those formula's. I pointed out this formula was (probably) discovered by Gauss. Yes, it is not the 'exact' formula he wrote in the question, but it is the only brick needed to prove it (as all the others pointed out). Also, this is the only 'formula' people remember and use. Cheers. Aug 7 '15 at 15:23

$$\frac{(n-1) n}{2}+\frac{ n(n+1)}{2} = n^2.$$

• This way of looking at it was fully explained in AJ Stas's answer. Read the other answers before answering. Aug 7 '15 at 4:36


# Is there a pattern to expression for the nested sums of the first $n$ terms of an expression? [duplicate]

Apologies for the confusing title but I couldn't think of a better way to phrase it. What I'm talking about is this:

$$\sum_{i=1}^n \;i = \frac{1}{2}n \left(n+1\right)$$ $$\sum_{i=1}^n \; \frac{1}{2}i\left(i+1\right) = \frac{1}{6}n\left(n+1\right)\left(n+2\right)$$ $$\sum_{i=1}^n \; \frac{1}{6}i\left(i+1\right)\left(i+2\right) = \frac{1}{24}n\left(n+1\right)\left(n+2\right)\left(n+3\right)$$

We see that this seems to indicate:

$$\sum_{n_m=1}^{n}\sum_{n_{m-1}=1}^{n_m}\ldots \sum_{n_1=1}^{n_2} \; n_1 = \frac{1}{m!}\prod_{k = 0}^{m}(n+k)$$

Is this a known result? If so how would you go about proving it? I have tried a few inductive arguments but because I couldn't express the intermediate expressions nicely, I didn't really get anywhere.

## marked as duplicate by Rohan, Simply Beautiful Art, kingW3, Vladhagen, user223391 Feb 21 '17 at 22:42

• In your last expression $\prod_{k = 0}^{m}$ should change into $\prod_{k = 0}^{m-1}$. – drhab Feb 21 '17 at 14:03
• Is it just me, or is the current closed vote for duplicates not well chosen? – Simply Beautiful Art Feb 21 '17 at 14:26
• If we take $m=1$ then LHS$=\sum_{n_1=1}^n n_1$ and RHS$=n(n+1)$ so LHS$\neq$RHS. Now $\frac1{m!}$ should change into $\frac1{(m-1)!}$. – drhab Feb 21 '17 at 14:41
• You want to read about Faulhaber's formula. – Jeppe Stig Nielsen Feb 21 '17 at 15:29
• While the answer is available in Proof of the Hockey-Stick Identity, it takes enough interpretation to recognize this that I don't think it should qualifiy as a duplicate. As for Finite Sum of Power, this question is barely even related to that one. – Paul Sinclair Feb 21 '17 at 18:17

You should have $$\sum_{i=1}^{n} 1 = n$$ $$\sum_{i=1}^{n} i = \frac{1}{2} n(n+1)$$ $$\sum_{i=1}^{n} \frac{1}{2} i(i+1) = \frac{1}{6} n(n+1)(n+2)$$ $$\sum_{i=1}^{n} \frac{1}{6} i(i+1)(i+2) = \frac{1}{24} n(n+1)(n+2)(n+3)$$

In particular, the first sum of yours was wrong and the things you were adding should depend on $i$, not on $n$.

But, to answer the question, yes! This is a known result, and actually follows quite nicely from properties of Pascal's triangle. Look at the first few diagonals of the triangle and see how they match up to your sums, and see if you can explain why there's such a relation, and why the sums here can be written in terms of binomial coefficients. Then, the hockey-stick identity proves your idea nicely.

From finite calculus we have that

$$\sum a^{\underline k}\delta k=\frac{a^{\underline{k+1}}}{k+1}+C$$

where $a^{\underline k}:=\prod _{j=0}^{k-1}(a-j)$ is known as a falling factorial, and $C$ is any periodic function with period $1$ (this can be a constant function, in general is taken as zero, this is an analog of an indefinite integral, in this case this is an indefinite sum).

And we have that $a^{\overline m}:=\prod_{j=0}^{m-1}(a+j)$ is known as a rising factorial, and

$$a^{\overline m}=(a+m-1)^\underline m$$

Hence you want to solve the sum

\begin{align}\sum_{k=\ell}^n k(k+1)\cdots(k+m)&=\sum\nolimits_\ell^{n+1}k^{\overline{m+1}}\delta k\\&=\sum\nolimits_\ell^{n+1}(k+m)^{\underline{m+1}}\delta k\\&=\frac{(k+m)^{\underline{m+2}}}{m+2}\bigg|_\ell^{n+1}\\&=\frac1{m+2}\big((n+m+1)^\underline{m+2}-(\ell+m)^\underline{m+2}\big)\\&=\frac1{m+2}\big(n^\overline{m+2}-(\ell-1)^\overline{m+2}\big)\end{align}

From here is easy to justify your result

$$\underbrace{\sum\sum\ldots\sum_{k=1}^n 1}_{m\text{ times}}=\frac{n^\overline {m+1}}{m!}=\frac{(n+m-1)^{\underline m}}{m!}=\binom{n+m-1}{m}$$

The pattern actually is $$\sum_{n_m=1}^{n}\sum_{n_{m-1}=1}^{n_m}\ldots \sum_{n_1=1}^{n_2} \sum_{n_0=1}^{n_1} 1 = \frac{1}{(m+1)!}\prod_{k = 0}^{m}(n+k), \tag1$$ where for reasons of symmetry (and making the later proof simpler) I have written $n_1$ as $\sum_{n_0=1}^{n_1} 1.$ A slightly more convenient way to write the same thing is

$$\sum_{1\leq n_0\leq n_1\leq n_2\leq \cdots \leq n_{m-1}\leq n_m\leq n} 1 = \binom{n+m}{m+1} \tag2$$

where $\binom{n+m}{m+1}$ is a binomial coefficient. The right-hand side of Equation $2$ equals the right-hand side of Equation $1$ by means of the following formula for a binomial coefficient, $$\binom pq = \frac{p(p-1)(p-2)\cdots(p-q+1)}{q!}.$$

The meaning of the left-hand side of Equation $2$ is that there is one term of the sum for every possible list of numbers $n_0, n_1, n_2, \ldots, n_m$ such that $1\leq n_0\leq n_1\leq n_2\leq \cdots \leq n_m\leq n.$ Notice that $$\sum_{1\leq n_0\leq n_1\leq n_2\leq\cdots\leq n_{m-1}\leq n_m\leq n} 1 = \sum_{n_m=1}^n \left(\sum_{1\leq n_0\leq n_1\leq n_2\leq\cdots \leq n_{m-1}\leq n_m} 1\right),$$ and if you continue to "unpack" the sums in this fashion with a sum from $1$ to $n_m,$ then $1$ to $n_{m-1},$ and so forth, you get the $m+1$ nested sums on the left side of Equation $1.$

This is a well-known result. See Simplification of a nested sum, Nested summations and their relation to binomial coefficients, and this answer to Binomial coefficient as a summation series proof?

There is a combinatorial proof which is a little easier to see if you rewrite the sum this way: $$\sum_{1\leq n_0\leq n_1\leq n_2\leq\cdots\leq n_m\leq n} 1 = \sum_{0 < n_0 < n_1+1 < n_2+2 < \cdots < n_m+m < n+m+1} 1,\tag3$$ using the fact that for integers $p$ and $q,$ $p \leq q$ if and only if $p < q+1.$

Each term in the sum on the right-hand side of Equation $3$ has $m+1$ index numbers $n_0, n_1, n_2, \ldots, n_m$ selected from the integers strictly between $0$ and $n+m+1,$ that is, from the set of integers $\{1,2,3,\ldots,n+m-1,n+m\}.$ Since each possible combination of numbers selected can be selected in only one way (increasing order), the number of terms is exactly the number of ways to choose $m+1$ elements from a set of $n+m$ elements, that is, the binomial coefficient "$n+m$ choose $m+1$," notated $\binom{n+m}{m+1}.$

In this answer it is proved that:$$\sum_{n_m=1}^{n}\sum_{n_{m-1}=1}^{n_m}\ldots \sum_{n_1=1}^{n_2}1=\binom{n+m-1}{m}\tag1$$

On base of the rule:$$\sum_{k=r}^n\binom{k}{r}=\binom{n+1}{r+1}\tag2$$ which can easily be deduced by induction on $n$. Induction step:$$\sum_{k=r}^n\binom{k}{r}=\sum_{k=r}^{n-1}\binom{k}{r}+\binom{n}{r}=\binom{n}{r+1}+\binom{n}{r}=\binom{n+1}{r+1}$$

Now $(2)$ can be applied to prove $(1)$ by induction on $m$.

The induction step is:

$$\sum_{n_m=1}^{n}\sum_{n_{m-1}=1}^{n_m}\ldots \sum_{n_1=1}^{n_2} \; 1 = \sum_{n_m=1}^{n} \binom{n_{m-1}+m-2}{m-1}= \binom{n+m-1}{m}$$


# Math Help - inequality on the set of real numbers

1. ## inequality on the set of real numbers

Solve the following inequality on the set of real numbers

$x^2-3\sqrt{x^2+3}\leq1$

2. Originally Posted by perash
Solve the following inequality on the set of real numbers

$x^2-3\sqrt{x^2+3}\leq1$
$x^2-3\sqrt{x^2+3}\leq1 \Rightarrow (x^2 - 1)^2 \leq 9(x^2 + 3)$
A little bit of algebra leads us to,(that is bringing everything to the LHS and factorising)
$(x-\sqrt{13})(x+\sqrt{13})(x^2+2) \leq 0$
$\forall x \in \mathbb{R}, x^2 + 2 > 0$
So,
$(x-\sqrt{13})(x+\sqrt{13})\leq 0$
Since exactly one of them is non-positive,
$x \in [-\sqrt{13},\sqrt{13}]$

3. Hello, perash!

Solve on the set of real numbers: . $x^2-3\sqrt{x^2+3}\:\leq\:1$

We have: . $x^2-1 \:\leq \:3\sqrt{x^2+3}$

Square: . $x^4-2x^2 + 1 \:\leq \:9x^2+27\quad\Rightarrow\quad x^4 - 11x^2 - 26 \:\leq \:0$

. . which factors: . $(x^2+2)(x^2-13)\:\leq\:0$

Since $(x^2+2)$ is always positive, $(x^2-13)$ must be negative.

We have: . $x^2-13 \:\leq \:0\quad\Rightarrow\quad x^2\:\leq\:13\quad\Rightarrow\quad |x| \:\leq\:\sqrt{13}$

Therefore: . $-\sqrt{13}\;\leq\: x \:\leq\:\sqrt{13}$

Drat . . . too slow again!
.

4. Originally Posted by Soroban
Hello, perash!

[size=3]
We have: . $x^2-1 \:\leq \:3\sqrt{x^2+3}$

Square: . $x^4-2x^2 + 1 \:\leq \:9x^2+27\quad\Rightarrow\quad x^4 - 11x^2 - 26 \:\leq \:0$
I always get confused when I need to square an inequality.

$x^2 - 1 \leq 3\sqrt{x^2 + 3}$

If $x \in (-1, 1)$ then when we square this we shouldn't we get
$(x^2 - 1) \geq 9(x^2 + 3)$
since the LHS is negative? So don't we have to do the problem separately on $(-1, 1)$ and $\mathbb{R} - (-1, 1)$?

-Dan

Edit: This question has been resolved. See here.

5. Originally Posted by topsquark
since the LHS is negative? So don't we have to do the problem separately on $(-1, 1)$ and $\mathbb{R} - (-1, 1)$?

-Dan
I will try to answer this question,
First we note RHS is always positive for this problem,so if the LHS is negative then, LHS $\leq 0 \leq$ RHS , so it will always hold.

The point is almost all steps in the inequality reduction are equivalent.So there is no reason it will be wrong.


# What is the truth table for demorgan's law?

From Demorgan's law:

$(A \cup B)^c = A^c \cap B^c$

I constructed the truth table as follows:

$$\begin{array}{cccccc|cc} x\in A & x \in B & x \notin A & x \notin B & x \in A^c & x \in B^c & x\notin A \text{ or } x \notin B & x \in A^c \text{ and } x \in B^c & \\ \hline T & T & F & F & F & F & F & F & \\ T & F & F & T & F & T & T & F & \\ F & T & T & F & T & F & T & F & \\ F & F & T & T & T & T & T & T & \end{array}$$

Clearly I've made a mistake somewhere. What did I do wrong?

In my mind, $x \notin A$ is the same as saying $x \in A^c$. Is this wrong too?

EDIT:

I think $x \in (A \cup B)^c$ is equal to $x \notin A \text{ or } x \notin B$ because:

$\begin{array} {cc} x \in (A \cup B)^c &\Rightarrow & x \notin A \cup B ,\text{ by definition of set complement}\\ & \Rightarrow & x \notin A \text{ or } x \notin B, \text{ by definition of set union} \\\end{array}$

Did I wrongly apply the definition(s)?

How do I start from $x \in (A \cup B)^c$ and arrive at $x \notin A \text{ and } x \notin B$?

• Well formulated question - shows your attempt at resolution. In naive set theory, $x \notin A$ is the same as $x \in A^c$. – Tom Collinge Jul 1 '14 at 8:21
• $(A \cup B)^c$ corresponds to "$\text{not } (x \in A \text{ or } x \in B)$", not "$x \notin A \text{ or } x \notin B$". – Tunococ Jul 1 '14 at 8:35
• Why you do not read the answers below ? $x∈(A \cup B)^c$ is $x∉ A \cup B$, but this is not $x∉A$ or $x∉B$. If $x$ does not belong to the "union" of two sets $A$ and $B$, it is not included in $A$ nor in $B$. Thus we have $x∉A$ and $x∉B$. If $A$ is a set of cats and $B$ is a set of dogs, what means for a mouse to be $\notin A \cup B$ ? It means that it is not a cat nor a dog; i.e. mouse $\notin A$ and mouse $\notin B$. – Mauro ALLEGRANZA Jul 1 '14 at 10:16

This is essentially a rephrasing of Mauro's answer. But focusing on the exact spot in your derivation where you go wrong.

$x \notin A \cup B \Rightarrow x \notin A \text{ or } x \notin B, \text{ by definition of set union}$

This is false. The definition of set union does not use the $\notin$ relation.

A correct derivation can go;

$\begin{array} {cc} x \in (A \cup B)^c &\Rightarrow & x \notin A \cup B &,\text{ by definition of set complement}\\ &\Rightarrow & \text{not }(x\in (A \cup B))&, \text{ by definition of}\notin\\ &\Rightarrow & \text{not }(x\in A \text{ or } x \in B)&, \text{ by definition of set union} \\\end{array}$

• Thanks, your answer is really useful. How do you justify $x \notin A \text{ and } x \notin B$ from the last implication? Is it just "by logical equivalence" or are there more intervening steps? The solution to negating an 'or' statement that I've seen invokes Demorgan's law but in this case, I am trying to prove demorgan's law so I am not sure how to proceed further. – mauna Jul 1 '14 at 15:57
• @mauna De Morgan's laws for boolean algebra ($\neg(a\vee b)\rightarrow (\neg a)\wedge(\neg b)$). This only involve two propositions, so only four cases. It can be proven by inspection. – Taemyr Jul 2 '14 at 7:33

It is correct to say that :

$x \notin A$ is the same as saying $x \in A^c$.

But your mistake is that, the truth-table for :

$(A \cup B)^c$

must be entered for the rows :

$x \in A$ or $x \in B$

and then "complemented", i.e. exchanging $T$ with $F$ and vice versa. In this way, you will check that it coincide with that for $x \notin A$ and $x \notin B$ (i.e.$A^c \cap B^c$).

You have "calculated" : $x \notin A$ or $x \notin B$, which is : $A^c \cup B^c$, and this clearly does not "match" with : $A^c \cap B^c$.

Note

Set union is "equivalent" to disjunction (or) while set intersection is "equivalent" to conjunction (and) and complementation is like negation (not).

Thus, De Morgan's laws acts on set operators in the same way as in propositional logic or boolean algebra.

In propositional logic we have that :

$\lnot (P \land Q) \Leftrightarrow (\lnot P \lor \lnot Q)$

and :

$\lnot (P \lor Q) \Leftrightarrow (\lnot P \land \lnot Q)$.

These formulae can be easily translated into "set language" as :

$(A \cap B)^c = A^c \cup B^c$

and :

$(A \cup B)^c = A^c \cap B^c$.

Your problem is in equating $(A \cup B)^c$ with $x \notin A$ or $x \notin B$. It should be $x \notin A$ AND $x \notin B$, after which you will get correspondence in lines 2 and 3 in your truth table.

$A \cup B$ = $x \in A$ or $x \in B$

$(A \cup B)^c$ = not ($x \in A$ or $x \in B$ ) = $x \notin A$ AND $x \notin B$

You're just fine! The truth table for $x\in (A\cup B)^c$ is: $$\begin{array}{ccc|c} x\in A & x \in B & x \in A\cup B & x \in (A\cup B)^c \\ \hline T & T & T& F\\ T & F & T& F\\ F & T & T& F\\ F & F & F& T \end{array}$$

The truth table for $x\in A^c \cap B^c$ is:

$$\begin{array}{cccc|c} x\in A & x \in B & x \in A^c & x \in B^c & x\in A^c\wedge x\in B^c\\ \hline T & T & F& F & F\\ T & F & F& T & F\\ F & T & T& F & F\\ F & F & T& T & T \end{array}$$

So they are the same!

• You haven't explained where the OP has gone wrong. – jwg Jul 1 '14 at 14:07


Find the Numbers

Status
Not open for further replies.

Full Member
There are two numbers whose sum is 53. Three times the smaller number is equal to 19 more than the larger number. What are the numbers?

Set up:

Let x = large number
Let y = small number

x + y = 53...Equation A
3y = x + 19....Equation B

x + y = 53

y = 53 - x...Plug into B.

3(53 - x) = x + 19

159 - 3x = x + 19

-3x - x = 19 - 159

-4x = -140

x = -140/-4

x = 35...Plug into A or B.

I will use A.

35 + y = 53

y = 53 - 35

y = 18.

The numbers are 18 and 35.

Yes?

JeffM

Elite Member
Do the numbers satisfy both equation?

$$\displaystyle 35 + 18 = 53.$$ Checks.

$$\displaystyle 3 * 18 = 54 = 35 + 19.$$ Checks.

In algebra, you can always check your own MECHANICAL work, and you should. It avoids mistakes, builds confidence, is a necessary skill for taking tests, and, most importantly, is what you will need in any job that expects you to be able to do math.

Subhotosh Khan

Super Moderator
Staff member
There are two numbers whose sum is 53. Three times the smaller number is equal to 19 more than the larger number. What are the numbers?

Set up:

Let x = large number
Let y = small number

x + y = 53...Equation A
3y = x + 19....Equation B

x + y = 53

y = 53 - x...Plug into B.

3(53 - x) = x + 19

159 - 3x = x + 19

-3x - x = 19 - 159

-4x = -140

x = -140/-4

x = 35...Plug into A or B.

I will use A.

35 + y = 53

y = 53 - 35

y = 18.

The numbers are 18 and 35.

Yes?
When possible check your work. Most of the time that is a part of the process of solution.

There is a shorter way to accomplish the algebra/arithmetic part.

You have two equations,

x + y = 53...Equation A
3y = x + 19....Equation B

rewrite B to collect all the unknowns to LHS

x + y = 53...Equation A
3y - x = 19....Equation B'

Add A & B' (to eliminate 'x' from the equations) and get equation C

3y + y = 72....Equation C

4y = 72

y = 18

Use this value in equation 'A'

x + 18 = 53...Equation A

x = 53- 18 = 35

Now check your solution......

Full Member
When possible check your work. Most of the time that is a part of the process of solution.

There is a shorter way to accomplish the algebra/arithmetic part.

You have two equations,

x + y = 53...Equation A
3y = x + 19....Equation B

rewrite B to collect all the unknowns to LHS

x + y = 53...Equation A
3y - x = 19....Equation B'

Add A & B' (to eliminate 'x' from the equations) and get equation C

3y + y = 72....Equation C

4y = 72

y = 18

Use this value in equation 'A'

x + 18 = 53...Equation A

x = 53- 18 = 35

Now check your solution......
What is wrong with my method?

Dr.Peterson

Elite Member
Nothing is wrong with your method. You used substitution, and did it correctly; Khan used addition, which can take just a little less writing than what you did, but is certainly not the only correct way, or even necessarily "better".

Full Member
Nothing is wrong with your method. You used substitution, and did it correctly; Khan used addition, which can take just a little less writing than what you did, but is certainly not the only correct way, or even necessarily "better".
There are several methods for solving two equations in two variables, right? Matrix algebra is another useful tool.

Dr.Peterson

Elite Member
Correct.

In fact, each method can be applied to a given system of equations in several ways (which makes it interesting to grade tests). You can solve either equation for either variable and substitute, or eliminate either variable from the equations by adding, then get the other variable in a couple ways. And you can solve the matrix form by several different techniques. When there are three or more variables, it gets even better!

But still, solving the equations is the "easy" (routine) part, compared to setting them up from a word problem.

Full Member
Correct.

In fact, each method can be applied to a given system of equations in several ways (which makes it interesting to grade tests). You can solve either equation for either variable and substitute, or eliminate either variable from the equations by adding, then get the other variable in a couple ways. And you can solve the matrix form by several different techniques. When there are three or more variables, it gets even better!

But still, solving the equations is the "easy" (routine) part, compared to setting them up from a word problem.
We can also graph two equations to see where they cross each other. The crossing point is the solution in the form (x, y).

Jomo

Elite Member
I know that you can check these problems. Just admit that you like posting here.


Help with a proof.

• Jan 19th 2010, 07:26 PM
seven.j
Help with a proof.
Hi, I'm stuck at proving the following question...

Prove that for all n>0,

1/2 + 2/2^2 + 3/2^3 + ... + n/2^n = 2 - (n+2)/2^n

I've tried all sorts of different ways of solving this, but to no avail.

Any help is appreciated :)
• Jan 19th 2010, 07:50 PM
Drexel28
Quote:

Originally Posted by seven.j
Hi, I'm stuck at proving the following question...

Prove that for all n>0,

1/2 + 2/2^2 + 3/2^3 + ... + n/2^n = 2 - (n+2)/2^n

I've tried all sorts of different ways of solving this, but to no avail.

Any help is appreciated :)

$\sum_{k=1}^{n}\frac{k}{2^k}$. Note that $\sum_{k=1}
^n x^k=\frac{x^{n+1}-x}{x-1}$
. Differentiating both sides and multiplying by $x$ gives $\sum_{k=1}^{n}k\cdot x^k=...$ figure the right side out.
• Jan 19th 2010, 07:54 PM
Krizalid
$\sum\limits_{j=1}^{n}{\frac{j}{2^{j}}}=\sum\limits _{j=1}^{n}{\sum\limits_{k=1}^{j}{\frac{1}{2^{j}}}} =\sum\limits_{k=1}^{n}{\frac{1}{2^{k}}\left( \sum\limits_{j=0}^{n-k}{2^{-j}} \right)}=\frac{1}{2^{n}}\sum\limits_{k=1}^{n}{\fra c{1}{2^{k}}\left( 2^{n+1}-2^{k} \right)},$ you can do the rest, those are finite geometric sums.
• Jan 19th 2010, 08:37 PM
Soroban
Hello, seven!

Here's one way . . .

Quote:

Prove that for all $n>0\!:$

. . $\frac{1}{2}+ \frac{2}{2^2} + \frac{3}{2^3} +\:\hdots\:+ \frac{n}{2^n} \; =\; 2 - \frac{n+2}{2^n}$

$\begin{array}{ccccc}
\text{We have:} &S &=& \dfrac{1}{2} + \dfrac{2}{2^2} + \dfrac{3}{2^3} + \dfrac{4}{2^4} + \:\hdots\:+\dfrac{n}{2^n}\qquad\qquad \\ \\[-3mm]

\text{Multiply by }\dfrac{1}{2}\!: & \dfrac{1}{2}S &=& \quad\;\; \dfrac{1}{2^2} + \dfrac{2}{2^3} + \dfrac{3}{2^4} + \hdots + \dfrac{n-1}{2^n} + \dfrac{n}{2^{n+1}}\end{array}$

. . . $\text{Subtract: }\quad \frac{1}{2}S \;=\;\underbrace{\frac{1}{2} + \frac{1}{2^2} + \frac{1}{2^3} + \frac{1}{2^4} + \hdots + \frac{1}{2^n}}_{\text{geometric series}} - \frac{n}{2^{n+2}}$ .[1]

The geometric series has the sum: . $\frac{1}{2}\cdot\frac{1 - \left(\frac{1}{2}\right)^n}{1-\frac{1}{2}} \;=\;1 - \frac{1}{2^n}$

Then [1] becomes: . $\frac{1}{2}S \;=\;\left(1 - \frac{1}{2^n}\right) - \frac{n}{2^{n+1}} \;=\;1 - \frac{n+2}{2^{n+1}}$

Multiply by 2: . $S \;=\;2 - \frac{n+2}{2^n}$

• Jan 19th 2010, 09:19 PM
Jhevon
Quote:

Originally Posted by seven.j
Hi, I'm stuck at proving the following question...

Prove that for all n>0,

1/2 + 2/2^2 + 3/2^3 + ... + n/2^n = 2 - (n+2)/2^n

I've tried all sorts of different ways of solving this, but to no avail.

Any help is appreciated :)

This problem also can be done by induction pretty easily. if you're interested, you can try it that way. to me it was the most knee-jerk approach to try, and it worked out great. but you have lots of nice approaches here to choose from


# Problem 2.1

## Insertion sort on small arrays in merge sort

Although merge sort runs in $\Theta(\lg{n})$ worst-case time and insertion sort runs in $\Theta(n^2)$ worst-case time, the constant factors in insertion sort can make it faster in practice for small problem sizes on many machines. Thus, it makes sense to coarsen the leaves of the recursion by using insertion sort within merge sort when subproblems become sufficiently small. Consider a modification to merge sort in which $n/k$ sublists of length $k$ are sorted using insertion sort and then merged using the standard merging mechanism, where $k$ is a value to be determined.

1. Show that insertion sort can sort the $n/k$ sublists, each of length $k$, in $\Theta(nk)$ worst-case time.
2. Show how to merge the sublists in $\Theta(n\lg(n/k))$ worst-case time.
3. Given that the modified algorithm runs in $\Theta(nk + n\lg(n/k))$ worst-case time, what is the largest value of $k$ as a function of $n$ for which the modified algorithm has the same running time as standard merge sort, in terms of $\Theta$-notation?
4. How should we choose $k$ in practice?

### 1. Sorting sublists

This is simple enough. We know that sorting each list takes $ak^2 + bk + c$ for some constants $a$, $b$ and $c$. We have $n/k$ of those, thus:

$$\frac{n}{k}(ak^2 + bk + c) = ank + bn + \frac{cn}{k} = \Theta(nk)$$

### 2. Merging sublists

This is a bit trickier. Sorting $a$ sublists of length $k$ each takes:

$$T(a) = \begin{cases} 0 & \text{if } a = 1, \\ 2T(a/2) + ak & \text{if } a = 2^p, \text{if } p > 0. \end{cases}$$

This makes sense, since merging one sublist is trivial and merging $a$ sublists means splitting dividing them in two groups of $a/2$ lists, merging each group recursively and then combining the results in $ak$ steps, since have two arrays, each of length $\frac{a}{2}k$.

I don't know the master theorem yet, but it seems to me that the recurrence is actually $ak\lg{a}$. Let's try to prove this via induction:

Base. Simple as ever:

$$T(1) = 1k\lg1 = k \cdot 0 = 0$$

Step. We assume that $T(a) = ak\lg{a}$ and we calculate $T(2a)$:

\begin{align} T(2a) &= 2T(a) + 2ak = 2(T(a) + ak) = 2(ak\lg{a} + ak) = \\ &= 2ak(\lg{a} + 1) = 2ak(\lg{a} + \lg{2}) = 2ak\lg(2a) \end{align}

This proves it. Now if we substitue the number of sublists $n/k$ for $a$:

$$T(n/k) = \frac{n}{k}k\lg{\frac{n}{k}} = n\lg(n/k)$$

While this is exact only when $n/k$ is a power of 2, it tells us that the overall time complexity of the merge is $\Theta(n\lg(n/k))$.

### 3. The largest value of k

The largest value is $k = \lg{n}$. If we substitute, we get:

$$\Theta(n\lg{n} + n\lg{\frac{n}{\lg{n}}}) = \Theta(n\lg{n})$$

If $k = f(n) > \lg{n}$, the complexity will be $\Theta(nf(n))$, which is larger running time than merge sort.

### 4. The value of k in practice

It's constant factors, so we just figure out when insertion sort beats merge sort, exactly as we did in exercise 1.2.2, and pick that number for $k$.

### Runtime comparison

I'm implemented this in C and in Python. I added selection for completeness sake in the C version. I ran two variants, depending on whether merge() allocates its arrays on the stack or on the heap (stack won't work for huge arrays). Here are the results:

STACK ALLOCATION
================
merge-sort      = 0.173352
mixed-insertion = 0.150485
mixed-selection = 0.165806

HEAP ALLOCATION
===============
merge-sort      = 1.731111
mixed-insertion = 0.903480
mixed-selection = 1.017437

Here's the results I got from Python:

merge-sort = 2.6207s
mixed-sort = 1.4959s

I can safely conclude that this approach is faster.

### C runner output

merge-sort      = 0.153748
merge-insertion = 0.064804
merge-selection = 0.069240

### Python runner output

merge-sort = 0.1067s
mixed-sort = 0.0561s

### C code

#include <stdlib.h>
#include <string.h>

#define INSERTION_SORT_TRESHOLD 20
#define SELECTION_SORT_TRESHOLD 15

void merge(int A[], int p, int q, int r) {
int i, j, k;

int n1 = q - p + 1;
int n2 = r - q;

#ifdef MERGE_HEAP_ALLOCATION
int *L = calloc(n1, sizeof(int));
int *R = calloc(n2, sizeof(int));
#else
int L[n1];
int R[n2];
#endif

memcpy(L, A + p, n1 * sizeof(int));
memcpy(R, A + q + 1, n2 * sizeof(int));

for(i = 0, j = 0, k = p; k <= r; k++) {
if (i == n1) {
A[k] = R[j++];
} else if (j == n2) {
A[k] = L[i++];
} else if (L[i] <= R[j]) {
A[k] = L[i++];
} else {
A[k] = R[j++];
}
}

#ifdef MERGE_HEAP_ALLOCATION
free(L);
free(R);
#endif
}

void merge_sort(int A[], int p, int r) {
if (p < r) {
int q = (p + r) / 2;
merge_sort(A, p, q);
merge_sort(A, q + 1, r);
merge(A, p, q, r);
}
}

void insertion_sort(int A[], int p, int r) {
int i, j, key;

for (j = p + 1; j <= r; j++) {
key = A[j];
i = j - 1;
while (i >= p && A[i] > key) {
A[i + 1] = A[i];
i = i - 1;
}
A[i + 1] = key;
}
}

void selection_sort(int A[], int p, int r) {
int min, temp;
for (int i = p; i < r; i++) {
min = i;
for (int j = i + 1; j <= r; j++)
if (A[j] < A[min])
min = j;
temp = A[i];
A[i] = A[min];
A[min] = temp;
}
}

void mixed_sort_insertion(int A[], int p, int r) {
if (p >= r) return;

if (r - p < INSERTION_SORT_TRESHOLD) {
insertion_sort(A, p, r);
} else {
int q = (p + r) / 2;
mixed_sort_insertion(A, p, q);
mixed_sort_insertion(A, q + 1, r);
merge(A, p, q, r);
}
}

void mixed_sort_selection(int A[], int p, int r) {
if (p >= r) return;

if (r - p < SELECTION_SORT_TRESHOLD) {
selection_sort(A, p, r);
} else {
int q = (p + r) / 2;
mixed_sort_selection(A, p, q);
mixed_sort_selection(A, q + 1, r);
merge(A, p, q, r);
}
}

### Python code

from itertools import repeat

def insertion_sort(A, p, r):
for j in range(p + 1, r + 1):
key = A[j]
i = j - 1
while i >= p and A[i] > key:
A[i + 1] = A[i]
i = i - 1
A[i + 1] = key

def merge(A, p, q, r):
n1 = q - p + 1
n2 = r - q

L = list(repeat(None, n1))
R = list(repeat(None, n2))

for i in range(n1):
L[i] = A[p + i]

for j in range(n2):
R[j] = A[q + j + 1]

i = 0
j = 0
for k in range(p, r + 1):
if i == n1:
A[k] = R[j]
j += 1
elif j == n2:
A[k] = L[i]
i += 1
elif L[i] <= R[j]:
A[k] = L[i]
i += 1
else:
A[k] = R[j]
j += 1

def merge_sort(A, p, r):
if p < r:
q = int((p + r) / 2)
merge_sort(A, p, q)
merge_sort(A, q + 1, r)
merge(A, p, q, r)

def mixed_sort(A, p, r):
if p >= r: return

if r - p < 20:
insertion_sort(A, p, r)
else:
q = int((p + r) / 2)
mixed_sort(A, p, q)
mixed_sort(A, q + 1, r)
merge(A, p, q, r)


## Theorem

The sum of the cubes of three consecutive natural numbers is a multiple of 9.

## Proof

First, introducing a predicate $P$ over $\mathbb{N}$, we rephrase the theorem as follows. $$\forall n \in \mathbb{N}, P(n) \quad \text{where} \quad P(n) \, := \, n^3 + (n + 1)^3 + (n + 2)^3 \text{ is a multiple of 9}$$ We prove the theorem by induction on $n$.

### Basis

Below, we show that we have $P(n)$ for $n = 0$. $$0^3 + 1^3 + 2^3 = 0 + 1 + 8 = 9 = 9 \cdot 1$$

### Inductive step

Below, we show that for all $n \in \mathbb{N}$, $P(n) \Rightarrow P(n + 1)$.

Let $k \in \mathbb{N}$. We assume that $P(k)$ holds. In the following, we use this assumption to show that $P(k + 1)$ holds.

By the assumption, there is a $i \in \mathbb{N}$ such that $i \cdot 9 = k^3 + (k + 1)^3 + (k + 2)^3$. We use this fact in the following equivalent transformation. The transformation turns the sum of cubes in the first line, for which we need to show that it is a multiple of 9, into a product of 9 and another natural number.

$(k + 1)^3 + (k + 2)^3 + (k + 3)^3 \\ = (k + 1)^3 + (k + 2)^3 + k^3 + 9k^2 + 27k + 27 \\ = k^3 + (k + 1)^3 + (k + 2)^3 + 9k^2 + 27k + 27 \quad | \text{ using the induction hypothesis} \\ = 9i + 9k^2 + 27k + 27 \\ = 9 \cdot i + 9 \cdot k^2 + 9 \cdot 3k + 9 \cdot 3 \\ = 9 \cdot (i + k^2 + 3k + 3)$

We see that the above product has precisely two factors: 9 and another natural number. Thus the product is a multiple of 9. This completes the induction.

-
Looks fine to me! –  Braindead Mar 30 '14 at 13:02
someone should make something along the lines of markExchange instead of stackExchange. Marking instead of answering sounds fresh and good to me –  Nicholas Kyriakides Mar 31 '14 at 3:59
Looks good. You could maybe add a Halmos to the end, to be extra if not overly formal, $\square$. Check out math.stackexchange.com/questions/56606/… –  guydudebro Mar 31 '14 at 4:42
@NicholasKyriakides There already is codereview.stackexchange.com, which is essentially "marking code". Perhaps a proofreview StackExchange would be useful. –  Ixrec Mar 8 at 21:19

I do not think that this is a real question but if you were my student i would give you an A.
It is all fine to me.

-

It's fine, here's a simpler proof without induction:

$n^3\equiv n\ (\text{mod }3)$, because it obviously holds for $n=-1,0,1$.

Therefore $3n^3\equiv3n\ (\text{mod 9})$ and $$(n-1)^3+n^3+(n+1)^3\equiv3n^3+6n\equiv0\ (\text{mod }9)$$

-
i.e. $\ {\rm mod}\ 9\!:\ 3n^3\!+6n\equiv 3(n^3\!-n)\equiv 0\$ by little Fermat. –  Bill Dubuque Mar 30 '14 at 13:16

Formulation, base case, inductive hypothesis, inductive step, it all looks good. :)

One might also conclude with a clarifying statement about what has been done - that the hypothesis is true for all $n \in \Bbb N$.

-
What do you think about the following statement? "By the basis, the inductive step, and the principle of induction; $P(n)$ is true for all $n \in \mathbb{N}$." –  DracoMalfoy Mar 30 '14 at 13:51


# How can I algebraically prove that $2^n - 1$ is not always prime?

This question is from Elementary Number Theory by W. Edwin Clark.

Is $2^n - 1$ always prime, or not? Prove.

Is this a start? $x^n - 1 = ( x - 1)(1 + x + x^2 \cdots x^{n - 1})$. So, $2^n - 1 = \sum \limits _{i = 0}^{n - 1} 2^i.$

Will I reach a solution through the above, or is there any other way?

I know that the property doesn't hold true for $n = 1,4,6$ et al but I want an algebraic proof.

-
I think the question can be interpreted as "prove that there are infinitely many $n$ such that $2^n-1$ is not prime". Otherwise, as @Hurkyl mentioned, you have already proved your own statement. –  akkkk Dec 22 '12 at 10:40

HINT: If $n=ab$, then $2^a-1$ is a factor of $2^n-1$.

-
And what would be the factored form of $2^{ab} - 1$? :-) P.S.: Hey Brian! –  Parth Kohli Dec 22 '12 at 10:40
Gee, I wonder: $2^{ab}-1=\left(2^a\right)^b-1^b=\ldots~$ nope, too hard for me. :-) Actually, the really cute way to see it is to write the numbers in binary: $2^{ab}$ is a string of $ab$ $1$’s. –  Brian M. Scott Dec 22 '12 at 10:43
@DumbCow - try using the factorisation you have given in the question with an appropriate choice of $x$ –  Mark Bennet Dec 22 '12 at 10:43
@Markbennet: Oh yes, thanks. –  Parth Kohli Dec 22 '12 at 10:44

I know that the property doesn't hold true for n=1,4,6 et al.

I just want to clearly point out that this statement all by itself (or possibly with a calculation demonstrating the truth of the statement) constitutes a proof of the question asked.

-

Take $n=4$. Then $2^n-1=16-1=15=3\cdot 5$ which is not a prime. The statement is proven, that is $2^n-1$ is not always a prime.

EDIT: Why this is a formal proof: We want to prove that $$\neg (\forall n\in \mathbb{N})(2^n-1\in \mathbb{P})$$ or equivalently that $$(\exists n\in \mathbb{N})\neg (2^n-1\in \mathbb{P})$$ or even $$(\exists n\in \mathbb{N})(2^n-1\notin \mathbb{P})$$ Since $\exists 4\in \mathbb{N}$ and $2^4-1\notin \mathbb{P}$, the statement is proven.

-
It is a proof... –  Parth Kohli Dec 22 '12 at 10:37
@DumbCow This is a proof! –  Nameless Dec 22 '12 at 10:37
It should be a formal proof :) –  Parth Kohli Dec 22 '12 at 10:37
@DumbCow I believe I now fully justified why this is a rigorous proof –  Nameless Dec 22 '12 at 10:46
Looks legit pretty much :) –  Parth Kohli Dec 22 '12 at 10:51

If $n$ is even say $n = 2m$ then $2^n - 1 = 2^{2m } -1 = (2^m + 1)(2^m - 1)$ which is not prime. More generally if $n$ is composite then by the formula for the sum of a geometric series we get that...

-
I like it :-). So, the main point of our proof is that it is not prime since it has factors. –  Parth Kohli Dec 22 '12 at 10:38

You might like to ponder why $2047 = 23 \times 89$ is a different kind of example from those already given in previous answers.

-