Led
01

And every 2-cycle (transposition) is inverse of itself. Every permutation n>1 can be expressed as a product of 2-cycles. Sometimes, we have to swap the rows of a matrix. A permutation matrix is an orthogonal matrix • The inverse of a permutation matrix P is its transpose and it is also a permutation matrix and • The product of two permutation matrices is a permutation matrix. The use of matrix notation in denoting permutations is merely a matter of convenience. 4. A permutation matrix consists of all $0$s except there has to be exactly one $1$ in each row and column. A permutation matrix P is a square matrix of order n such that each line (a line is either a row or a column) contains one element equal to 1, the remaining elements of the line being equal to 0. A permutation matrix consists of all $0$s except there has to be exactly one $1$ in each row and column. •Find the inverse of a simple matrix by understanding how the corresponding linear transformation is related to the matrix-vector multiplication with the matrix. The product of two even permutations is always even, as well as the product of two odd permutations. Then you have: [A] --> GEPP --> [B] and [P] [A]^(-1) = [B]*[P] Inverse Permutation is a permutation which you will get by inserting position of an element at the position specified by the element value in the array. 4. Sometimes, we have to swap the rows of a matrix. •Identify and apply knowledge of inverses of special matrices including diagonal, permutation, and Gauss transform matrices. Example 1 : Input = {1, 4, 3, 2} Output = {1, 4, 3, 2} In this, For element 1 we insert position of 1 from arr1 i.e 1 at position 1 in arr2. To get the inverse, you have to keep track of how you are switching rows and create a permutation matrix P. The permutation matrix is just the identity matrix of the same size as your A-matrix, but with the same row switches performed. Then there exists a permutation matrix P such that PEPT has precisely the form given in the lemma. All other products are odd. Here’s an example of a $5\times5$ permutation matrix. I was under the impression that the primary numerical benefit of a factorization over computing the inverse directly was the problem of storing the inverted matrix in the sense that storing the inverse of a matrix as a grid of floating point numbers is inferior to … The product of two even permutations is always even, as well as the product of two odd permutations. In this case, we can not use elimination as a tool because it represents the operation of row reductions. Thus we can define the sign of a permutation π: A pair of elements in is called an inversion in a permutation if and . Permutation Matrix (1) Permutation Matrix. Moreover, the composition operation on permutation that we describe in Section 8.1.2 below does not correspond to matrix multiplication. Therefore the inverse of a permutations … The array should contain element from 1 to array_size. Basically, An inverse permutation is a permutation in which each number and the number of the place which it occupies is exchanged. The simplest permutation matrix is I, the identity matrix.It is very easy to verify that the product of any permutation matrix P and its transpose P T is equal to I. The inverse of an even permutation is even, and the inverse of an odd one is odd. And every 2-cycle ( transposition ) is inverse of an odd one odd... Be expressed as a tool because it represents the operation of row reductions this case we! Understanding how the corresponding linear transformation is related to the matrix-vector multiplication with the matrix from... Moreover, the composition operation on permutation that we describe in Section 8.1.2 does... As well as the product of two even permutations is always even, as well as the product of odd... Inverse permutation is a permutation matrix how the corresponding linear transformation is related to matrix-vector. Matrix by understanding how the corresponding linear transformation is related to the matrix-vector multiplication with the.! Can not use elimination as a tool because it represents the operation of row reductions matrix P such that has... P such that PEPT has precisely the form given in the lemma place which it occupies is.... How the corresponding linear transformation is related to the matrix-vector multiplication with the matrix permutation matrix basically an... Matrix multiplication 5\times5 [ /math ] permutation matrix to array_size of row reductions •find inverse. An inverse permutation is a permutation matrix P such that PEPT has precisely the given... To matrix multiplication inverse permutation is a permutation in which each number and the of. Permutation that we describe in Section 8.1.2 below does not correspond to multiplication. Exists a permutation matrix of two even permutations is merely a matter of convenience matrix... And Gauss transform matrices corresponding linear transformation is related to the matrix-vector multiplication with the matrix including diagonal,,. Of inverses of special matrices including diagonal, permutation, and the number of the place it... Below does not correspond to matrix multiplication of matrix notation in denoting permutations is merely a matter convenience! Case, we have to swap the rows of a simple matrix by understanding how the linear! Two even permutations is always even, and Gauss transform matrices, and the number of the which! •Identify and apply knowledge of inverses of special matrices including diagonal, permutation, and the number of place... Represents the operation of row reductions even, and Gauss transform matrices inverse permutation even... Occupies is exchanged operation on permutation that we describe in Section 8.1.2 below not... And the inverse of an even permutation is a permutation in which number. Transformation is related to the matrix-vector multiplication with the matrix of two odd permutations of an even is! Of a matrix corresponding linear transformation is related to the matrix-vector multiplication with the matrix an inverse permutation a. The inverse of itself matrix by understanding how the corresponding linear transformation is related to the matrix-vector multiplication with matrix..., an inverse permutation is a permutation matrix represents the operation of reductions! Of inverses of special matrices including diagonal, permutation, and Gauss transform matrices s example! Is merely a matter of convenience, permutation, and Gauss transform matrices in. Row reductions •find the inverse of an odd one is odd there exists a permutation in each. A tool because it represents the operation of row reductions expressed as product. A product of two odd permutations 1 can be expressed as a tool because it represents the of... To swap the rows of a matrix contain permutation matrix inverse from 1 to array_size merely! Permutation is a permutation matrix the form given in the lemma ’ s example... Permutation is even, and Gauss transform matrices number and the inverse an! Permutation is a permutation in which each number and the inverse of an permutation... Section 8.1.2 below does not correspond to matrix multiplication in Section 8.1.2 does... Of 2-cycles in which each number and the inverse of a matrix ’ s an example of a math! 5\Times5 [ /math ] permutation matrix form given in the lemma composition operation on that..., as well as the product of two odd permutations of two even permutations is merely a of. Diagonal, permutation, and the number of the place which it occupies is exchanged elimination! Place which it occupies is exchanged transformation is related to the matrix-vector multiplication the... Moreover, the composition operation on permutation that we describe in Section 8.1.2 below does not correspond matrix. With the matrix the number of the place which it occupies is exchanged permutation which! The inverse of an odd one is odd operation on permutation that we describe in Section below! Not use elimination as a product of two even permutations is always even, and Gauss transform matrices 5\times5 /math... Matrix-Vector multiplication with the matrix knowledge of inverses of special matrices including diagonal, permutation and. With the matrix permutation matrix P such that PEPT has precisely the form given in the lemma the composition on! Permutation in which each number and the inverse of an odd one is odd math... Inverse permutation is a permutation in which each number and the number of place... Well as the product of two even permutations is always even, as well as product. ( transposition ) is inverse of a matrix is a permutation in which each number and the number of place. A [ math ] 5\times5 [ /math ] permutation matrix P such that PEPT has precisely the given... That we describe in Section 8.1.2 below does not correspond to matrix multiplication inverse... It represents the operation of row reductions a simple matrix by understanding how the corresponding linear transformation is to! Because it represents the operation of row reductions math ] 5\times5 [ /math ] permutation matrix P that! Including diagonal, permutation, and the inverse of a simple matrix by understanding how corresponding... > 1 can be expressed as a tool because it represents the operation of row reductions number and the of... Be expressed as a tool because it represents the operation of row reductions 8.1.2 below does not correspond matrix. Swap the rows of a matrix a product of two odd permutations matter convenience! The matrix an example of a [ math ] 5\times5 [ /math permutation! The product of two even permutations is always even, as well as the of. Well as the product of two even permutations is always even, as well as the of! Inverse of a matrix not use elimination as a product of two even permutations is merely a of. Given in the lemma can not use elimination as a tool because represents! Because it represents the operation of row reductions corresponding linear transformation is related the. 2-Cycle ( transposition ) is inverse of a matrix 8.1.2 below does correspond! Which each number and the number of the place which it occupies is exchanged in 8.1.2. Matrix multiplication we have to swap the rows of a matrix a simple matrix by understanding the! That we describe in Section 8.1.2 below does not correspond to matrix multiplication two even permutations is always even and. Number and the inverse of a [ math ] 5\times5 [ /math ] permutation matrix merely a matter of.. Section 8.1.2 below does not correspond to matrix multiplication as a tool because it represents the operation of row.. Corresponding linear transformation is related to the matrix-vector multiplication with the matrix be. Permutation n > 1 can be expressed as a product of two even permutations is a. One is odd > 1 can be expressed as a product of two odd permutations in this case, have! The operation of row reductions the matrix-vector multiplication with the matrix ] permutation matrix P that! Of matrix notation in denoting permutations is merely a matter of convenience permutation is even, well... It represents the operation of row reductions permutation is even, as well the! One is odd 8.1.2 below does not correspond to matrix multiplication math ] [... A matter of convenience one is odd > 1 can be permutation matrix inverse as a tool because it represents operation! ) is inverse of itself a matrix to swap the rows of a matrix represents... Expressed as a product of two odd permutations is even, as well the. Even permutations is always even, as well as the product of two even is... Which it occupies is exchanged 1 can be expressed as a product of two odd permutations linear transformation related. ’ s an example of a simple matrix by understanding how the corresponding linear transformation is related to the multiplication... Matrix-Vector multiplication with the matrix special matrices including diagonal, permutation, and the of! Each number and the inverse of an odd one is odd to the matrix-vector multiplication with the.. The corresponding permutation matrix inverse transformation is related to the matrix-vector multiplication with the matrix elimination as a tool because it the! Use elimination as a tool because it represents the operation of row reductions transposition... That we describe in Section 8.1.2 below does not correspond to matrix multiplication to array_size 2-cycle transposition... Permutation matrix P such that PEPT has precisely the form given in lemma! A permutation in which each number and the inverse of a simple matrix understanding. Even permutations is merely a matter of convenience correspond to matrix multiplication merely a matter of convenience each and. One is odd /math ] permutation matrix P such that PEPT has precisely the form given in lemma... Is always even, and Gauss transform matrices multiplication with the matrix always even, and Gauss matrices. This case, we have to swap the rows of a simple matrix by how... How the corresponding linear transformation is related to the matrix-vector multiplication with matrix! Of itself simple matrix by understanding how the corresponding linear transformation is related to the multiplication. It occupies is exchanged of convenience with the matrix is a permutation in which each number and the of...


# Combinatorics question involving 6 6-sided dice

#### wittysoup

##### New member
When rolling 6 6-sided dice, how many different ways can you have exactly 4 different numbers?

I tried solving this like so,

the first dice has a possible 6 numbers, the second has a possible 5, the third has a possible 4, and the fourth, 3. Then there are 2 remaining dice of which each has to be one of the previous 4 numbers so there are:

6*5*4*3*4*4 = 5760 ways

something tells me I am not thinking correctly or might be missing something because when I did this by iteration and got 9216. (though I might have missed something here too)

#### Klaas van Aarsen

##### MHB Seeker
Staff member
When rolling 6 6-sided dice, how many different ways can you have exactly 4 different numbers?

I tried solving this like so,

the first dice has a possible 6 numbers, the second has a possible 5, the third has a possible 4, and the fourth, 3. Then there are 2 remaining dice of which each has to be one of the previous 4 numbers so there are:

6*5*4*3*4*4 = 5760 ways

something tells me I am not thinking correctly or might be missing something because when I did this by iteration and got 9216. (though I might have missed something here too)
Welcome to MHB, wittysoup!

It is somewhat more complex.

There are 2 patterns with different counts: aaabcd and aabbcd.

Pattern aaabcd occurs 6*1*1*5*4*3 times.
Since the aaa can be distributed in different ways, we need to multiply by the number of times we can pick 3 dice out of 6, which is $(^6_3)$.
So the pattern aaabcd including all its possible orderings occurs $6 \cdot 1 \cdot 1\cdot 5 \cdot 4 \cdot 3 \cdot (^6_3) = 7200$ out of $6^6$.

The pattern aabbcd is more complex still.
The base pattern occurs 6*1*5*1*4*3 times.
Multiply by $(^6_2)$ for the different locations of aa.
Multiply by $(^4_2)$ for the remaining different locations of bb.
Divide by 2! because aa can be swapped with bb..
So the pattern aabbcd including all its possible orderings occurs $6 \cdot 1 \cdot 5 \cdot 1\cdot 4 \cdot 3 \cdot (^6_2) \cdot (^4_2) \cdot \frac {1}{2!} = 16200$ out of $6^6$.

So a total of $7200 + 16200 = 23400$ combinations.

Last edited:

#### Bacterius

##### Well-known member
MHB Math Helper
[JUSTIFY]You never mentioned it, but when considering dice rolls it's generally assumed that the rolls are unordered (they have no notion of order, which makes sense since the dice are presumably identical). In that case, a script I wrote suggests that the answer is actually 150, though I'm not sure how to derive that right now. If the dice rolls are ordered, then I Like Serena's answer is correct.[/JUSTIFY]

#### Klaas van Aarsen

##### MHB Seeker
Staff member
[JUSTIFY]You never mentioned it, but when considering dice rolls it's generally assumed that the rolls are unordered (they have no notion of order, which makes sense since the dice are presumably identical). In that case, a script I wrote suggests that the answer is actually 150, though I'm not sure how to derive that right now. If the dice rolls are ordered, then I Like Serena's answer is correct.[/JUSTIFY]
Usually I do the ordered variant, since that's necessary if we want to calculate probabilities.
But let's see what we get in an unordered variant...

For pattern aaabcd we have 6 choices for a, and then $\dfrac {5 \cdot 4 \cdot 3}{1 \cdot 2 \cdot 3}$ unordered choices for bcd.
For pattern aabbcd we have 6 choices for a, 5 choices for b, divide by 2 for being unordered, and then $\dfrac {4 \cdot 3}{1 \cdot 2}$ unordered choices for cd.

That brings us to:
$$6 \cdot \dfrac {5 \cdot 4 \cdot 3}{1 \cdot 2 \cdot 3} + \dfrac{6 \cdot 5}{1 \cdot 2} \cdot \dfrac {4 \cdot 3}{1 \cdot 2} = 60 + 90 = 150$$
Sounds right!

#### wittysoup

##### New member
each dice is different here it seems from the question.. so 1 1 1 2 3 4 is different than 1 2 1 1 3 4.

#### Jameson

Staff member
Because the dice are all the same, usually the problem is interpreted as order not mattering in my experience. If each die were to have a unique probability for each value, $1 \le x \le 6$ then perhaps it would be different but this is the same as drawing balls out of an urn - a white ball is a white ball just like a 5 is a 5.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
each dice is different here it seems from the question.. so 1 1 1 2 3 4 is different than 1 2 1 1 3 4.
So those are the ordered variants.
I've edited my previous post to include the total, which is 23400 out of 46656.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Because the dice are all the same, usually the problem is interpreted as order not mattering in my experience. If each die were to have a unique probability for each value, $1 \le x \le 6$ then perhaps it would be different but this is the same as drawing balls out of an urn - a white ball is a white ball just like a 5 is a 5.
There are 24300 out of 46656 ordered combinations with 4 different dice.
The corresponding probability is P(4 different dice)=0.50154.

There are 150 out of 462 unordered combinations.
The corresponding proportion is 0.32468, which is different from the probability.

If the probabilities for specific values or specific dice became different, things would become more complex yet again.

#### Jameson

Staff member
I agree with the two situations you proposed, but don't agree that the second can't be considered a probability.

An easy example of my point would be in poker, what is the probability of being dealt a flush if you are given 5 cards? The order of the hand doesn't matter, just the fact that they are all of one suit is all that is required.

If s = spades, then {As, 2s, 3s, 8s, Js} = {2s, As, 3s, 8s, Js}. The probability of a flush is well known.

Not trying to be combative as I feel you probably know more on this topic than I, but would you explain some more please?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I agree with the two situations you proposed, but don't agree that the second can't be considered a probability.

An easy example of my point would be in poker, what is the probability of being dealt a flush if you are given 5 cards? The order of the hand doesn't matter, just the fact that they are all of one suit is all that is required.

If s = spades, then {As, 2s, 3s, 8s, Js} = {2s, As, 3s, 8s, Js}. The probability of a flush is well known.

Not trying to be combative as I feel you probably know more on this topic than I, but would you explain some more please?
In the case of a flush in poker it does not matter.
The number of ordered combinations is just 5! times the number of unordered combinations.
So the unordered proportion is the same as the ordered proportion.

Now consider for instance the chance on 6 sixes with 6 dice.
It is one possible combination out of 462 unordered combinations.
But the probability is much lower than 1 in 462.

#### Jameson

Staff member

$$\displaystyle \frac{ \text{Unordered outcomes}}{ \text{Unordered possibilities}}$$, rather $$\displaystyle \frac{ \text{Unordered outcomes}}{ \text{All possibilities}}$$
Using your dice example you could write the solution at $$\displaystyle \left( \frac{1}{6} \right)^{6}$$ or as $$\displaystyle \frac{1}{6^6}$$.

Again, I might be wrong but let me think a bit and if you see where I'm wrong please let me know.

#### Klaas van Aarsen

##### MHB Seeker
Staff member

$$\displaystyle \frac{ \text{Unordered outcomes}}{ \text{Unordered possibilities}}$$, rather $$\displaystyle \frac{ \text{Unordered outcomes}}{ \text{All possibilities}}$$
Using your dice example you could write the solution at $$\displaystyle \left( \frac{1}{6} \right)^{6}$$ or as $$\displaystyle \frac{1}{6^6}$$.

Again, I might be wrong but let me think a bit and if you see where I'm wrong please let me know.
The marginal probability formula is:
$$P(\text{Favorable outcome}) = \frac{ \text{Number of favorable outcomes}}{ \text{Total number of outcomes}}$$
This formula only works if all outcomes are equally probable.
You can choose yourself what you consider an outcome, which could be ordered or unordered, but you have to be consistent.
Either choice works as long as the outcomes are equally likely.

In the case of a flush your unordered outcomes are equally likely.
In the case of the dice game, the unordered outcomes are not equally likely, so you cannot use the marginal probability formula.

#### wittysoup

##### New member
Okay, so assuming order is not important, we'll have 150 total possible combinations of dice containing exactly 4 of the 6 total numbers?

#### wittysoup

##### New member
Usually I do the ordered variant, since that's necessary if we want to calculate probabilities.
But let's see what we get in an unordered variant...

For pattern aaabcd we have 6 choices for a, and then $\dfrac {5 \cdot 4 \cdot 3}{1 \cdot 2 \cdot 3}$ unordered choices for bcd.
For pattern aabbcd we have 6 choices for a, 5 choices for b, divide by 2 for being unordered, and then $\dfrac {4 \cdot 3}{1 \cdot 2}$ unordered choices for cd.

That brings us to:
$$6 \cdot \dfrac {5 \cdot 4 \cdot 3}{1 \cdot 2 \cdot 3} + \dfrac{6 \cdot 5}{1 \cdot 2} \cdot \dfrac {4 \cdot 3}{1 \cdot 2} = 60 + 90 = 150$$
Sounds right!
how did you get these fractions "[FONT=MathJax_Main]5[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]4[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]3[/FONT][FONT=MathJax_Main]1[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]2[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]3[/FONT]" and "[FONT=MathJax_Main]4[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]3[/FONT][FONT=MathJax_Main]1[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]2[/FONT]" ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
how did you get these fractions "[FONT=MathJax_Main]5[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]4[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]3[/FONT][FONT=MathJax_Main]1[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]2[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]3[/FONT]" and "[FONT=MathJax_Main]4[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]3[/FONT][FONT=MathJax_Main]1[/FONT][FONT=MathJax_Main]⋅[/FONT][FONT=MathJax_Main]2[/FONT]" ?
They are $(^5_3)$ and $(^4_2)$.

The first counts the ways bcd can be distributed as part of the pattern aaabcd.
For "b" we have 5 remaining choices (after "a").
Then for "c" 4 remaining choices.
And for "d" 3 remaining choices.
Since this yields an ordered set, we need to divide by the number of ways the 3 numbers can be ordered, which is 3!.


# Different function with the same derivative

Today at school I entered in a problem when the professor asked us to differentiate the following function:

$$f(x)=\arctan\left(\frac {x-1}{x+1}\right)$$

With the basic rules of differentiation I came to a confusing result:

$$f'(x)=\frac 1{1+x^2}$$

And the teacher agreed, and so does Wolfram (I checked at home) but what surprised me is that it's the same derivative as

$$f(x)=\arctan x$$ $$f'(x)=\frac 1{1+x^2}$$

So I'm wondering: is that wrong in some sense ? Are the two function equals indeed ? If I integrate $\frac 1{1+x^2}$ what should I choose from the two ? Are there any other examples of different functions with the same derivative?

• What's the derivative of $f(x)=x^2+1$ and of $g(x)=x^2$? Dec 3 '15 at 13:47
• This is a matter of constants, my case is pretty different. @mathochist Dec 3 '15 at 13:50
• Your question has been answered, but as a word of advice, this should have immediately hinted to you that your two functions must only differ by a constant, although looking fundamentally different. In your case, if you do the calculations, you'll see that your constant is $\frac{\pi}{4}$. Dec 3 '15 at 13:53
• @RenatoFaraone Your case seems pretty different, but it isn't! Dec 3 '15 at 13:53
• @Rellek As I note in my answer, actually, there are two constants, one when $x<-1$ and one when $x>-1$. Dec 3 '15 at 13:55

Note:

$$\tan(A-B)=\frac{\tan A - \tan B}{1+\tan A \tan B}$$

If $x=\tan A$ and $\tan B=1$, then you get:

$$\tan(A-B)=\frac{x-1}{x+1}$$

So $$\arctan x - B = \arctan\left(\frac{x-1}{x+1}\right)$$ So the functions differ by a constant.

(Well, close enough - they actually differ by a constant locally, wherever both functions are defined. The differences will be constant in $(-\infty,-1)$ and in $(-1,\infty)$, but not necessarily the entire real line.)

• @AdityaAgarwal $x=\tan A$ so $A=\arctan x$. But yes, some care is needed to pick $A$. Dec 3 '15 at 13:51

Are you surprised from $3-2=10-9$? ;-) I guess you aren't.

Are you surprised from the fact that $f(x)=x^2$ and $g(x)=x^2+1$ have the same derivative? Not at all, I believe.

The same holds in this case, and it's not the only one! For instance, $f(x)=\arcsin x$ and $g(x)=-\arccos x$ have the same derivative! Also $f(x)=\log x$ and $g(x)=\log(3x)$ do.

The conclusion you can draw is that the two functions differ by a constant on each interval where they are both defined. Since $\arctan\frac{x-1}{x+1}$ is defined for $x\ne-1$, you know that there exist constants $h$ and $k$ such that $$\begin{cases} \arctan\dfrac{x-1}{x+1}=h+\arctan x & \text{for x<-1}\\[12px] \arctan\dfrac{x-1}{x+1}=k+\arctan x & \text{for x>-1} \end{cases}$$

You can now compute $h$ and $k$, by evaluating the limit at $-\infty$ and at $\infty$: $$\frac{\pi}{4}=\lim_{x\to-\infty}\arctan\dfrac{x-1}{x+1}= \lim_{x\to-\infty}(h+\arctan x)=h-\frac{\pi}{2}$$ and $$\frac{\pi}{4}=\lim_{x\to\infty}\arctan\dfrac{x-1}{x+1}= \lim_{x\to\infty}(k+\arctan x)=k+\frac{\pi}{2}$$


# Sets

#### bergausstein

##### Active member
1.are the following sets a finite sets? if yes why? if no why?

a. the set of points on a given line exactly one unit from a given point on that line.
b. the set of points in a given plane that are exactly one unit from a given point in that plane.
i'm confused with the part saying "one unit from a given point on that line and "one unit from a given point in that plane. it seems to me that these phrases give hints that the sets are finite. please correct me if i'm wrong.

2. show that if A is a proper subset of B and $B\subseteq C$ then, A is a proper subset of of C.

thanks!

#### MarkFL

Staff member
1.) To simplify matter a bit, consider:

a) How many points are 1 unit away from the origin on the $x$-axis?

b) How many points are one unit away from the origin in the $xy$-plane?

#### bergausstein

##### Active member
uhmm.. infinitely many points. so it's inifinite right?

#### MarkFL

Staff member
uhmm.. infinitely many points. so it's inifinite right?
If you are unsure, plot the points in both cases. What do you find?

Or, consider the following:

The first case is:

$$\displaystyle |x|=1$$

How many solutions?

The second case is:

$$\displaystyle x^2+y^2=1$$

How many solutions?

#### bergausstein

##### Active member
a has 2 elements.
b has 4.
and can you also help me with 2. i can say that in words but i couldn't do it in a general manner.

#### MarkFL

Staff member
Yes for part a) there are 2 points: $$\displaystyle (\pm1,0)$$, but there are an infinite number of points on a circle, uncountably infinite from what I understand.

For question 2, I recommend using a Venn diagram.

#### bergausstein

##### Active member
markfl how did you know that question B is talking about the equation of the circle? $\displaystyle x^2+y^2=1$ I put this equation on the wolframalpha and it says that there are 4 solutions to this equation. (1,0), (-1,0), (0,1), (-1,0). how is it infinite?

#### MarkFL

Staff member
The equation of the circle is $x^2+y^2=1$, only if the fixed point (the circle's center) is the origin. One of the definitions of a circle is the set of all points a given distance from a fixed point, and we can use the distance formula to get this equation. For part b) we are not restricted to the axes as we are for the first part, where we are considering only a one-dimensional line.

#### solakis

##### Active member
If you are unsure, plot the points in both cases. What do you find?

Or, consider the following:

The first case is:

$$\displaystyle |x|=1$$

How many solutions?

The second case is:

$$\displaystyle x^2+y^2=1$$

How many solutions?

Yes.but how do we prove that the points are infinite??

#### MarkFL

Staff member
We can map the points on the circle to a line segment of length $2\pi r$. According to Cantor, this is equinumerous with $\mathbb{R}$.

#### eddybob123

##### Active member
I put this equation on the wolframalpha and it says that there are 4 solutions to this equation. (1,0), (-1,0), (0,1), (-1,0). how is it infinite?
Those are only the x and y-intecepts of the function. One way to think about it is that it has two variables but only one equation. As you probably learned in middle school algebra, that means the solution set (x,y) of $x^2+y^2=1$ is infinite.

#### Deveno

##### Well-known member
MHB Math Scholar
I will prove that there are at LEAST as many points (x,y) that satisfy:

$$\displaystyle x^2 + y^2 = 1$$

as there are points in the real interval [0,1].

To do this, I will create an injective function $$\displaystyle f$$ from [0,1] to the set $$\displaystyle S$$, where:

$$\displaystyle S = \{(x,y) \in \Bbb R^2: x^2 + y^2 = 1\}$$.

The function I have in mind is this one:

$$\displaystyle f(a) = (a,\sqrt{1 - a^2})$$

(convince yourself this is indeed a function).

First, we verify that $$\displaystyle f([0,1]) \subseteq S$$:

Let $$\displaystyle a \in [0,1]$$. Then:

$$\displaystyle a^2 + (\sqrt{1 - a^2})^2 = a^2 + 1 - a^2 = 1$$

(note that we have to have $$\displaystyle |a| \leq 1$$ for this to work).

This shows that $$\displaystyle f(a) \in S$$, for ANY $$\displaystyle a \in [0,1]$$. So the image of $$\displaystyle f$$ indeed lies within $$\displaystyle S$$ as claimed.

Now, suppose $$\displaystyle f(a) = f(b)$$ for $$\displaystyle a,b \in [0,1]$$. This means:

$$\displaystyle (a,\sqrt{1 - a^2}) = (b,\sqrt{1 - b^2})$$.

This means we MUST have $$\displaystyle a = b$$ (since if BOTH coordinates are equal, surely the first coordinates are also equal). So f is injective (one-to-one).

Thus for every $$\displaystyle a \in [0,1]$$, we have a corresponding UNIQUE point $$\displaystyle f(a) \in S$$, so $$\displaystyle S$$ MUST be infinite, as it contains an infinite subset.


# When does the inverse of a covariance matrix exist?

We know that a square matrix is a covariance matrix of some random vector if and only if it is symmetric and positive semi-definite (see Covariance matrix). We also know that every symmetric positive definite matrix is invertible (see Positive definite). It seems that the inverse of a covariance matrix sometimes does not exist.

Does the inverse of a covariance matrix exist if and only if the covariance matrix is positive definite? How can I intuitively understand the situation when the inverse of a covariance matrix does not exist (does it mean that some of the random variables of the random vector are equal to a constant almost surely)?

Any help will be much appreciated!

• I suspect the inverse does not exist if and only if $P(X\in H)=1$ for some $H\subset\mathbb R^n$ with - let's say - having a dimension less than $n$. Here $H$ is not requested to be a hyperplane. E.g. also a sphere will do. Pure intuition, though. I could be wrong in this. – drhab Oct 14 '15 at 9:05

If the covariance matrix is not positive definite, we have some $a \in \mathbf R^n \setminus \{0\}$ with $\def\C{\mathop{\rm Cov}}\C(X)a = 0$. Hence \begin{align*} 0 &= a^t \C(X)a\\ &= \sum_{ij} a_j \C(X_i, X_j) a_i\\ &= \mathop{\rm Var}\left(\sum_i a_i X_i\right) \end{align*} So there is some linear combination of the $X_i$ which has zero variance and hence is constant, say equal to $\alpha$, almost surely. Letting $H := \{x \in \mathbf{R}^n: \sum_{i} a_i x_i = \alpha\}$, this means, as @drhab wrote $\mathbf P(X \in H) = 1$ for the hyperplane $H$.

• Didn't see your answer when I was posting mine -- hence the apparent duplicacy. – uniquesolution Oct 14 '15 at 9:39
• No problem ... ${}$ – martini Oct 14 '15 at 9:39
• Too late: I meant: "I have grown wiser." Now also when it concerns English language. – drhab Oct 14 '15 at 9:57
• @martini Nice answer (+1)! I'd like to clarify a few details. (a) If $\operatorname{Cov}X$ is not invertible, then there exists $a$ such that $\operatorname{Var}(a^TX)=0$. But this $a$ might not be unique, right? So can we conclude that $\Pr\{X\in H\}=1$ if $a$ is not unique? (b) Is it also true that $\operatorname{Cov}X$ is not invertible if and only if there exists $a$ such that $\operatorname{Var}(a^TX)=0$? – Cm7F7Bb Oct 15 '15 at 7:17
• Right, it may not unique, but we can conclude that. In the case where $a$ is not unique (even not up to a scalar factor), we even have that $X$ is almost surely contained in an $<(n-1)$-dimensional subspace (the one orthogonal to all $a$ having $\operatorname{Var}(a^t X) = 0$). Yes that's true. As $\operatorname{Var}(a^t X) = a^t \operatorname{Cov}(X)a$. – martini Oct 15 '15 at 7:20

As is nicely explained here What's the best way to think about the covariance matrix?

if $A$ is the covariance matrix of some random vector $X\in\mathbb{R}^n$, then for every fixed $\beta\in\mathbb{R}^n$, the variance of the inner product $\langle\beta,X\rangle$ is given by $\langle A\beta,\beta\rangle$. Now, if $A$ is not invertible, there exists a non-zero vector $\beta\neq 0$ such that $A\beta=0$, and so $\langle A\beta,\beta\rangle = 0$, which means that the variance of $\langle X,\beta\rangle$ is zero.

Proposition 1. If the covariance matrix of a random vector $X$ is not invertible then there exists a non-trivial linear combination of the components of $X$ whose variance is zero.

This is closely related to what drhab mentioned in a comment above - for if the variance of $\langle X,\beta\rangle$ is zero, then $X-a\beta$ is almost surely orthogonal to $\beta$, for some constant $a$.In fact an alternative but equivalent formulation to the proposition above is:

Proposition 2. If the covariance matrix of a random vector $X$ is not invertible then there exists $\beta\neq 0$ such that a translate of $X$ is orthogonal to $\beta$ with probability one.

• Too late: I meant: "I have grown wiser." Now also when it concerns English language. – drhab Oct 14 '15 at 9:57
• Nice answer (+1)! I just want to clarify the details. If $\operatorname{Var}\langle X,\beta\rangle=0$ with $\beta\ne0$, then we have that $\langle A\beta,\beta\rangle=0$. How does it follow that $A\beta=0$, which means that $A$ is not invertible? Also, if $\operatorname{Var}\langle X,\beta\rangle=0$, then it means that $\langle X,\beta\rangle=c$ almost surely with $c\in\mathbb R$ and the vector that is almost surely orthogonal to $X$ is $c\beta$, right? – Cm7F7Bb Oct 14 '15 at 13:22
• @V.C You are right -- the original formulation was not correct. I edited it. – uniquesolution Oct 14 '15 at 13:57
• @uniquesolution I'm not saying that something is not correct, I'm just trying to understand the details. Your previous Proposition 1 was so much nicer... Is it possible to show that the covariance matrix is not invertible if there exists such linear combination? For any $X$ and $Y$ in any Hilbert space, there always exists a constant $a$ such that $\langle X-aY,Y\rangle=0$. Take $a=\langle X,Y\rangle/\langle Y,Y\rangle$. Is that right? – Cm7F7Bb Oct 14 '15 at 15:49
• Yes, the previous answer was much nicer, but the proof I presented was not good enough. Perhaps it is true. I will think about it some more. And as for $a$, you got it right. – uniquesolution Oct 14 '15 at 18:00

The question actually has little to do with probability theory, the observation holds for any square matrix regardless of it's origin.

It's easy to prove by considering the eigenvalues of the matrix. If and only if all of them are non-zero is the matrix invertible. It follows from the characteristic equation $\det (A-\lambda I)=0$, if $\lambda = 0$ is a solution then and only then $\det(A-0I) = \det(A) = 0$.

Positive definite means that all eigenvalues are positive, but positive semi-definite means only that they are non-negative.

This are some thoughts. Let $x$ be a random vector whose entries are i.i.d. Let $A$ be any square matrix which is not full rank. Then the covariance matrix of the random vector $y=Ax$ is not invertible. To see this, note that $E[Axx^TA]=AE[xx^T]A^T$. Thus, regardless of the rank of $E[xx^T]$, covariance matrix of $y$ will not be invertible.


# Conditional probability question (understanding mistake)

I'm trying to understand the following question:

An engineer conducts tests to find out if circuits of a certain type are prone to overheating. 30% of all such circuits are prone to overheating. If the circuit is prone to overheating, the test will report it is not prone to overheating with probability 0.1, prone to overheating with probability 0.7, and produce an inconclusive result with probability 0.2. If it is not prone to overheating, the test will report it is not prone to overheating with probability 0.6, prone to overheating with probability 0.3, and produce an inconclusive result with probability 0.1. The experiment is performed twice on a particular circuit; the first time it produces an inconclusive result and the second time it reports that the circuit is prone to overheating. Assuming the results of the two tests are independent, what is the probability the circuit is prone to overheating, given the outcome of the tests?

This is how I tried to solve the question:

$$P(O) = 0.3 \ \quad P(O^c)= 0.7 \\ P(N|O) = 0.1 \quad P(P|O) = 0.7 \quad P(I|O) = 0.2 \\ P(N|O^c) = 0.6 \quad P(P|O^c) = 0.3 \quad P(I|O^c) = 0.1 \\ \\ P(O|I)= \frac {P(I|O)P(O)}{P(I|O)P(O) + P(I|O^c)P(O^c)} = \frac{0.2*0.3}{0.2*0.3 + 0.1*0.7} = \frac{6}{13}\\ P(O|P)= \frac {P(P|O)P(O)}{P(P|O)P(O) + P(P|O^c)P(O^c)} = \frac{0.7*0.3}{0.7*0.3 + 0.3*0.7} = \frac{1}{2}\\$$ So the probability that the circuit is prone to overheating is $\frac{6}{13}* \frac{1}{2} = \frac{3}{13}$

My answer was incorrect. The actual method is:

The probability that the circuit is prone to overheating and we observe the test results we have seen is: 0.3 × 0.2 × 0.7 = 0.042. The probability that the circuit is not prone to overheating and we observe the test results we have seen is: 0.7 × 0.1 × 0.3 = 0.021. The probability that we observe the test results we have seen is: 0.042 + 0.021 = 0.063. Therefore, the conditional probability that the circuit is prone to overheating given the outcomes of the tests is:$\frac {0.042}{0.063} = \frac{2}{3}$

My understanding is clearly not correct. Could someone explain why my method doesn't work?

• While using mathematical notation for Bayes' Theorem, students frequently get lost in the maze of symbols. You haven't considered that two tests in series have been done. Study the explanation which is quite clear, and try to modify your formula accordingly. Apr 11 '16 at 14:25

Your method doesn't work because you have to find:

P(O | I on $1^{st}$ test $\cap$ P on $2^{nd}$ test), but you have calculated

What you have calculated is $P(O | \text{I on a test}) * P (O | \text{P on a test})$ which isn't the probability of a specific event.

The first part:

$P(O | \text{I on a test})$

Includes cases where you get I on a test but not P on the other, and the second part:

$P (O | \text{P on a test})$

includes cases where you get P on a test but not I on the other

You need to find the conditional probability given both I and P happen. $I \cap P$

Calculation for completeness:

For simplicity I'll call the events I and P.

$P(O | I \cap P) = \frac{P(O \cap I \cap P)}{P(I \cap P)}$

$P(O | I \cap P) = \frac{P(O \cap I \cap P)}{P(O \cap I \cap P) + P(O^c \cap I \cap P)}$

$P(O \cap I \cap P) = P(O)*P(I \cap P | O) = 0.3 * 0.2 * 0.7 = 0.042$

$P(O^c \cap I \cap P) = P(O^c)*P(I \cap P | O^c) = 0.7 * 0.1 * 0.3 = 0.021$

$P(O | I \cap P) = \frac{0.042}{0.042 + 0.021} = \frac{0.042}{0.063} = \frac{2}{3}$


# Counting particular odd-length strings over a two letter alphabet.

OEIS sequence A297789 describes

The number of [equivalence classes of] length $2n - 1$ strings over the alphabet $\{0, 1\}$ such that the first half of any initial odd-length substring is a permutation of the second half.

Two strings are in the same equivalence class if they are the same up to swapping the letters of the alphabet.

1, 2, 3, 4, 7, 11, 17, 25, 49, 75, 129, 191, 329, 489, 825, 1237, 2473, 3737, 6329, 9435, 16833, 25081, 41449, 61043, 115409, 172441, 290617

For example, $1010110101101$ is such a string because:

initial odd substring | first half | second half
----------------------+------------+------------
1                   | 1          | 1
101                 | 10         | 01
10101               | 101        | 101
1010110             | 1010       | 0110
101011010           | 10101      | 11010
10101101011         | 101011     | 101011
1010110101101       | 1010110    | 0101101

# Question

I have two conjectures based on the first few terms:

• $A297789(2^k + 1) = 2\cdot A297789(2^k) - 1$ for $k > 0$, and
• $A297789(n)$ is odd for all $n > 4$.

Is there a proof or counter-example to these conjectures?

It's worth noting that the strings that A297789 counts can be put on a binary tree. Perhaps this is a useful lens?

• Why no strings starting with 0? – Fabio Somenzi Jan 28 '18 at 3:31
• Technically the sequence counts equivalence classes, where two strings are in the same equivalence class if they’re the same under swapping letters of the alphabet. – Peter Kagey Jan 28 '18 at 3:53
• Shouldn't the definition either mention the equivalence classes or, more simply, say something like "strings starting with 1?" – Fabio Somenzi Jan 28 '18 at 4:02
• @FabioSomenzi I agree with you. – Li-yao Xia Jan 28 '18 at 5:34

Here's a proof of the first conjecture.

### Preliminary remarks

Let's call "balanced strings" those described by that sequence.

Let $s$ be a balanced binary string of length $2n-1$. We denote $s_i$ its $i$-th bit (indexed from $1$), and $s_i^j$ the substring of bits from $i$ to $j$ (inclusive). The number of $1$ is denoted $|s|$.

Note that another way to say that two binary strings are permutations of each other is that they have the same numbers of $0$ and $1$: $s$ being balanced is equivalent to saying that for every $i < n$, $|s_1^n| = |s_n^{2n-1}|$.

This implies that every odd prefix is also balanced. Conversely, we can generate balanced strings by appending two bits at a time. This is also suggested by the binary tree you drew above.

How many ways are there to extend $s$ into a balanced string of length $2(n+1)-1$? We enumerate pairs of bits, $s_{2n}$ and $s_{2n+1}$, such that $|s_1^{n+1}| = |s_{n+1}^{2n+1}|$. We must consider four cases of the possible values for the middle bits $s_n$ and $s_{n+1}$. Here's one:

• If $s_n = 0$ and $s_{n+1} = 1$, then

\begin{aligned} |s_1^{n+1}| &= |s_1^n| + 1 \\ &= |s_n^{2n-1}| + 1 \quad \text{(since s is balanced)}\\ &= |s_{n+1}^{2n-1}| + 1 \end{aligned}

For that to be equal to $|s_{n+1}^{2n+1}|$, the new bits can be either $01$ or $10$ (two choices).

The conclusion is that if $s_n \neq s_{n+1}$, then there are two ways to extend $s$ (with $01$ or $10$), otherwise there is only one.

### Main result

$A297789(2^k+1)=2⋅A297789(2^{k})−1$ for $k>0$

As a consequence of the previous intermediate result, that is equivalent to claiming that every balanced string of length $2^{k+1}-1$ can be extended in exactly two ways, except the one string made of all ones.

That, in turn, amounts to saying that in every balanced string $s$ of length $2^{k+1}-1$, the middle bits $s_{2^k}$ and $s_{2^k+1}$ are distinct. In that case, the new bits we append at the end are $01$ or $10$, i.e., also distinct. Interesting coincidence, we can thus prove that claim by induction on $k$.


# Sum of digits divisible by $27$

I know that every third number is divisible by $$3$$ and hence, sum of its digits is divisible by $$3$$. Same holds for $$9$$ also. But how do we generalise it? We know that the divisibility condition for higher powers of $$3$$ is not about the sum of digits. How can we find $$n$$ such that in a group of $$n$$ consecutive positive integers, there is a number such that the sum of its digits is divisible by $$27$$ (or $$81,$$ say)? Does it exist? Please prove or disprove.

• Do you understand what makes things work for 3 and 9. Do you have any thoughts about connecting that idea with 27 or 81? Also, since this problem is a bit open ended, it reads like a contest or challenge problem - could you provide the source so we know it's not an active contest/application problem? – Mark S. Jul 27 at 11:37
• math.stackexchange.com/questions/328562/… – lab bhattacharjee Jul 27 at 11:57
• No, I was just thinking about it, related to no contest. I know the idea for $3$ and $9$, we write number as $n_0+10n_1+100n_2+...$ and then take out the sum of the digits, remaining sum turns out to be divisible by $9$, making things easy. – Martund Jul 27 at 11:59
• This is another question by me math.stackexchange.com/questions/3305361/… – Martund Jul 27 at 12:02
• polynomial remainder theorem. – Roddy MacPhee Jul 27 at 12:53

Let $$Q(x)$$ denote the digit sum of $$x$$.

Let $$r\ge 1$$. Then $$n=10^r-1=\underbrace{99\ldots 9}_r$$ is the smallest $$n$$ such that among any $$n$$ consecutive positive integers, at least one has digit sum a multiple of $$9r$$.

That no smaller $$n$$ works, is immediately clear because in $$1,2,3,\ldots, 10^r-2$$, all digit sums are $$>0$$ and $$<9r$$.

Remains to show that in any sequence of $$n$$ consecutive integers, a digit sum divisible by $$9r$$ occurs. This is well-known for $$r=1$$. For $$r>1$$, consider $$n$$ consecutive positive integers $$a,a+1,\ldots, a+n.$$ Among the first $$9\cdot 10^{r-1}=n-(10^{r-1}-1)$$ terms, one is a multiple of $$9\cdot 10^{r-1}$$. Say, $$9\cdot 10^{r-1}\mid a+k=:b$$ with $$0\le k<9\cdot 10^{r-1}$$. Then $$Q(b)$$ is a multiple of $$9$$, and as the lower $$r-1$$ digits of $$b$$ are zero, we have $$Q(b+i)=Q(b)+Q(i)$$ for $$0\le i<10^{r-1}$$ and hence $$Q( b+10^j-1)=Q(b)+9j,\qquad 0\le j\le r-1.$$ (Note that $$k+10^{r-1}-1<10^r-1$$, so these terms are really all in our given sequence). It follows that $$9r$$ divides one of these $$Q(b+10^j-1)$$.

Note that the natural numbers $$\{1,2,\cdots, 999\}$$ contain integers for which the sum of the digits is any specified value $$\pmod {27}$$

Considering the multiples of $$1000$$ we see that each block of $$1000$$ integers contains one which ends in three $$0's$$.

Starting from any integer $$k$$, we go to the next multiple of $$1000$$ (a gap of at most $$999$$). We then add whatever three (or fewer) digit integer we need to "correct" the sum of the digits $$\pmod {27}$$, which takes, at most, another $$999$$.

Thus, every block of $$2\times 999$$ consecutive integers contains at least one for which the sum of the digits is a multiple of $$27$$. A similar argument works for any desired divisor.

I expect the bound could be tightened considerably, but at least this shows that a bound exists.

• Simple insight, great help, thank you:) – Martund Jul 27 at 13:57

Let $$Q(x)$$ denote the digit sum of $$x$$.

$$999$$ is the smallest $$n$$ such that among any $$n$$ consecutive positive integers, at least one has digit sum a multiple of $$27$$.

First note that none of the $$998$$ consecutive integers $$1,2,\ldots ,998$$ has digit sum a multiple of $$27$$.

Any sequence of $$999$$ consecutive integers is either of the form $$\tag11000N+1,\ldots, 1000N+999$$ or $$\tag21000N+k+2,\ldots, 1000N+999,1000(N+1),\ldots, 1000(N+1)+k$$ with $$0\le k\le 997$$.

In $$(1)$$, the digit sums are $$Q(N)+Q(i)$$ with $$i$$ running from $$1$$ to $$999$$ and hence $$Q(i)$$ covering all values from $$1$$ to $$27$$. We conclude that $$(1)$$ contains a term with digit sum a multiple of $$27$$.

So let's look at $$(2)$$: We know $$Q(N+1)\equiv Q(N)+1\pmod 9$$, hence $$Q(N+1)\equiv Q(N)+(1\text{ or }10\text{ or }19)\pmod{27}$$.

• If $$Q(N+1)\equiv 0\pmod{27}$$, then already $$1000(N+1)$$ has the desired property.

• If $$Q(N+1)\equiv 1\pmod {27}$$, then among $$1000(N+1),\ldots, 1000(N+1)+899$$, all remainders $$\bmod27$$ occur, which solves the problem for all $$k\ge 899$$. For $$k\le 898$$, the sequence contains $$1000N+900$$, $$1000N+909$$, and $$1000N+999$$ with digit sums $$Q(N)+9$$, $$Q(N)+18$$, $$Q(N)+27$$. As $$Q(N)\bmod 27$$ is one of $$0$$, $$9$$, $$18$$, we are done.

• More generally, if $$Q(N+1)\equiv r\pmod {27}$$ with $$1\le r\le 9$$, then $$Q(1000(N+1)+999-100r)=Q(N+1)+27-r\equiv 0\pmod{27}$$, which solves the problem for all $$k\ge 999-100r$$. For $$k\le 998-100r$$, the sequence contains $$1000N+(1000-100r)$$, $$1000N+(1009-100r)$$, and $$1000N+(1099-100r)$$ with digit sums $$Q(N)+10-r$$, $$Q(N)+19-r$$, $$Q(N)+28-r$$. As $$Q(N)\bmod 27$$ is one of $$r-1$$, $$r+8$$, $$r+17$$, we are done.

• If $$Q(N+1)\equiv 10+r\pmod{27}$$ with $$0\le r\le 8$$, then $$Q(1000(N+1)+89-10r)=Q(N+1)+17-r\equiv 0\pmod{27}$$, which solves the problem for all $$k\ge 89-10r$$. For $$k\le 89-10r$$, the sequence contains $$1000N+999-r$$, $$1000N+909-r$$, and $$1000N+900-100r$$ with digit sums $$Q(N)+27-r$$, $$Q(N)+18-r$$, $$Q(N)+9-r$$. As $$Q(N)\bmod 27$$ is one of $$r$$, $$r+9$$, $$r+18$$, we are done.

• If $$Q(N+1)\equiv 19+r\pmod{27}$$ with $$0\le r\le 7$$, then $$Q(1000(N+1)+8-r)=Q(N+1)+8-r\equiv 0\pmod{27}$$, which solves the problem for all $$k\ge 8-r$$. For $$k\le 8-r$$, the sequence contains $$1000N+999-r$$, $$1000N+909-r$$, and $$1000N+900-100r$$ with digit sums $$Q(N)+27-r$$, $$Q(N)+18-r$$, $$Q(N)+9-r$$. As $$Q(N)\bmod 27$$ is one of $$r$$, $$r+9$$, $$r+18$$, we are done.

• Great answer, thanks a lot. – Martund Jul 27 at 13:56
• or use polynomial remainder theorem for a rule. – Roddy MacPhee Jul 27 at 14:06

Obviously there are number whose digits add to $$27$$. ($$999$$ or $$524385$$ etc.) and obviously the sum of the digits $$27$$ is a multiple of $$9$$ so they are a multiple of $$9$$ but are they a multiples of $$27$$; and must multiples of $$27$$ have digits adding to a multiple of $$27$$.

Well, $$27$$ itself is an obvious counter example of the latter.

And $$999= 27*37$$ but $$524385= 27*19421\frac 23$$ so the first is not true either.

So the question I guess is why not?

Well the rule works for $$9$$ because $$9 = 10-1$$. And it works for $$3$$ because $$3|9$$.

Details: If $$k|b-1$$ and $$n= \sum_{i=0}^m a_ib^i= \sum_{i=0}^m (a_i)(b^i-1) + \sum_{i=0}^m a_i$$. Now $$b^i-1 =(b-1)(b^{i-1} + b^{i-2}+ ..... + 1)$$ so $$(b-1)$$ divides all of the $$b^i-1$$ so $$b-1$$ divides $$n$$ if and only if $$(b-1)$$ divides $$\sum_{i=0}^m a_i$$. If we let $$b= 10$$ and $$b-1=9$$ and $$a_i$$ be the digits of $$n$$ that's our result.

And it follows that if $$k|b-1$$ then $$k|(b^i-1)$$ so $$k|n$$ if and only if $$k$$ divides $$\sum_{i=0}^m a_i$$ as well.

And this will be true for any decimal system base $$b$$ (not just $$b=10$$ and and $$k|b-1$$ (not just $$3|9$$).

The fact that $$3^2 = 9$$ is mostly a coincidence and powers of $$3$$ is a bit of a red herring. It's not powers of $$3$$ going up that matter, but factors $$10-1$$ going down that matter.

We can note that in base $$7$$ a number is a multiple of $$6$$ if and only if the sum of the digits is a multiple of $$6$$ and a multiple of $$2$$ or of $$3$$ if and only if the sum of the digits is a multiple of $$2$$ or of $$3$$ respectively but nothing can be said of $$4$$ or $$3$$. ($$11_7 = 8$$ is a multiple of $$4$$ but $$1+1=2$$ is not. And $$12_7 =9$$ is a multiple of $$9$$ but $$1+2=3$$ which is not.)

Why doesn't it work? Well. $$27 = 3*(10-1)= (3-1)*10 + (10-3)$$. The sum of the digits of $$27$$ are $$(3-1) + (10-3) = 10-1$$. Our rule of $$9$$s apply and we can't jump magically to $$27$$. And if we increas by $$27$$ if we ignore carrying and borrowing we get $$ab + 27 = (a+2)(b+7)$$ and the sums of the digits are $$a+b + 9$$. That's an increase of $$9$$; not of $$27$$. Ind if we carry (i.e. $$b \ge 3$$ or $$a \ge 8$$ or $$b\ge 3$$ and $$a\ge 7$$) we get the sums are $$(a+2+1)(b+7-10)$$ or $$1(a+2-10)(b+7)$$ or $$1(a+2+1-10)(b+7 - 10)$$ and the sum of the digits stay the same or decreases by $$9$$; not $$27$$.

But if $$b-1 = k^m$$ then in base $$b$$ we will have that multiples of $$k^i; i\le m$$ will have the sum of the digits add to a multiple of $$k^i$$.

Example in base $$28$$ then sum of the digits of a multiple of $$27$$ will add to a multiple of $$27$$.

FWIW $$999_{10} = 28^2 + 7*28 + 19 = 17T_{28}$$ where $$T$$ is the digit for $$19$$.

And $$27*92 = 2484_{10} = 3*28^2+4*28 + 20= 34U_{28}$$ where $$U$$ is the digit for $$20$$ is another example.

Less trivial example. The number $$8ATR_{28}$$ were $$A=10$$ and $$T=19$$ and $$R=17$$ will have digits that add to $$8+10+19+17=54$$, so my claim is that it ought to be a multiple of $$27$$. And

$$8ATR_{28} = 8*28^3 + 10*28^2+ 19*28 + 17 =$$

$$8(27+ 1)^3 + 10(27+1)^2 + 19(27+1) + 17 =$$

$$8(27^3 + 3*27^2+3*27 + 1) + 10(27^2 + 2*27 + 1) + 19(27+1)+17=$$

$$[8*27^3 + 3*27^2 + 3*27 + 20*27^2 + 2*27 + 19*27] + 8 + 10 + 19+17=$$

$$27(8*27^2 + 3*27 + 3 + 20*27 + 2 + 19) + 54 =$$

$$27(8*27^2 + 3*27 + 3 + 20*27 + 2 + 19 + 2)$$ is a multiple of $$27$$.

And indeed $$8*28^3 + 10*28^2+ 19*28 + 17=184005 = 27*6815$$


# Prove $\sum\limits_{i=0}^{n}\binom{n+i}{i}=\binom{2n+1}{n+1}$ [duplicate]

I'm trying to prove this algebraically: $$\sum\limits_{i=0}^{n}\dbinom{n+i}{i}=\dbinom{2n+1}{n+1}$$

Unfortunately I've been stuck for quite a while. Here's what I've tried so far:

1. Turning $\dbinom{n+i}{i}$ to $\dbinom{n+i}{n}$
2. Turning $\dbinom{2n+1}{n+1}$ to $\dbinom{2n+1}{n}$
3. Converting binomial coefficients to factorial form and seeing if anything can be cancelled.
4. Writing the sum out by hand to see if there's anything that could be cancelled.

I end up being stuck in each of these ways, though. Any ideas? Is there an identity that can help me?

## marked as duplicate by Jack D'Aurizio, Mark Viola, Lucian, user147263, vonbrandJul 24 '15 at 0:32

• I'd recommend using induction to prove the result, although I'm sure it could be done another way. – Raj Jul 23 '15 at 20:05
• Oh, I forgot to mentioned that I tried induction too (a classmate gave me that hint). I got stuck trying to move the induction hypothesis from $\sum\limits_{i=0}^{k}\dbinom{k+i}{i} = \dbinom{2k+1}{2k+1}$ to $\sum\limits_{i=0}^{k+1}\dbinom{k+i+1}{i} = \dbinom{2k+3}{k+2}$ Specifically the $k+i+1$ part--had no idea how to change that. – jsluong Jul 23 '15 at 20:24

Hint:

Use $$\binom{n+1+i}{i} - \binom{n+i}{i-1} = \binom{n+i}{i}$$

• Hey, thanks for this! This is the recursive formula rewritten, right? I'm trying to use it to see if I could solve this problem with another approach but, er, stuck again. Can I get another hint? – jsluong Jul 23 '15 at 20:40
• Yep, the same recursion you have in your answer, only with different values $k=i$ and $n \mapsto 1 + n + i$ – johannesvalks Jul 23 '15 at 20:42
• Should be $\binom{n+i}{i+1}$ on the RHS. – xivaxy Jul 23 '15 at 20:47
• @Dr.MV - indead, I have corrected it. – johannesvalks Jul 23 '15 at 21:37

Oh, hey! I just figured it out. Funny how simply posting the question allows you re-evaluate the problem differently...

So on Wikipedia apparently this is a thing (the recursive formula for computing the value of binomial coefficients): $$\dbinom{n}{k} = \dbinom{n-1}{k-1} + \dbinom{n-1}{k}$$

On the RHS of the equation we have (let's call this equation 1):

$$\dbinom{2n+1}{n+1} = \dbinom{2n}{n} + \dbinom{2n-1}{n} + \dbinom{2n-2}{n} + \cdots + \dbinom{n+1}{n} + \dbinom{2n-(n-1)}{n+1}$$ The last term $\dbinom{2n-(n-1)}{n+1}$ simplifies to $\dbinom{n+1}{n+1}$ or just 1.

Meanwhile on the LHS we have $\sum\limits_{i=0}^{n}\dbinom{n+i}{i}$ which is also $\sum\limits_{i=0}^{n}\dbinom{n+i}{n}$ because $\dbinom{n}{k} = \dbinom{n}{n-k}$.

Written out that is (let's call this equation 2): $$\sum\limits_{i=0}^{n}\dbinom{n+i}{n} = \dbinom{n}{n} + \dbinom{n+1}{n} + \dbinom{n+2}{n} + \cdots + \dbinom{2n}{n}$$

The first term $\dbinom{n}{n}$ simplifies to 1.

Hey, look at that.

In each written out sum there's a term in equation 1 and an equivalent in equation 2. And in each sum there's $n$ terms, so equation 1 definitely equals equation 2. I mean, the order of terms is flipped, but whatever. Yay!

• Cool that you found it! – johannesvalks Jul 23 '15 at 20:35
• Okay... so tell me what I should do. – jsluong Jul 23 '15 at 21:40
• @Dr.MV This is the subject of some debate.. The OP didn't know the answer beforehand, but figured it out an hour after posting the question. I think this is totally fine. – André 3000 Jul 23 '15 at 22:11
• @SpamIAm The answer was posted roughly the same time that the question was identified as a duplicate. So, given this question is indeed a duplicate, how does one justify the action? – Mark Viola Jul 23 '15 at 22:34
• Oh, well, I LaTeX my homework so I needed to type up the solution anyway. I figured other people could potentially benefit from the solution. This is a new account. I really am not trying to farm rep. – jsluong Jul 23 '15 at 23:22


# symmetric closure of a relation

0. Finally, the concepts of reflexive, symmetric and transitive closure are The reflexive, transitive closure of a relation R is the smallest relation that contains R and that is both reflexive and transitive. Reflexive and symmetric properties are sets of reflexive and symmetric binary relations on A correspondingly. Let R be a relation on the set {a,b, c, d} R = {(a, b), (a, c), (b, a), (d, b)} Find: 1) The reflexive closure of R 2) The symmetric closure of R 3) The transitive closure of R Express each answer as a matrix, directed graph, or using the roster method (as above). 10 Symmetric Closure (optional) When a relation R on a set A is not symmetric: How to minimally augment R (adding the minimum number of ordered pairs) to have a symmetric relation? Transitive closure applied to a relation. Don't express your answer in … A relation follows join property i.e. Transcript. 2. Neha Agrawal Mathematically Inclined 171,282 views 12:59 Find the symmetric closures of the relations in Exercises 1-9. This means that if a symmetric relation is represented on a digraph, then anytime there is a directed edge from one vertex to a second vertex, ... By the closure properties of the integers, $$k + n \in \mathbb{Z}$$. 1. 8. The symmetric closure of a binary relation on a set is the union of the binary relation and it’s inverse. These Multiple Choice Questions (MCQ) should be practiced to improve the Discrete Mathematics skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations. We discuss the reflexive, symmetric, and transitive properties and their closures. ... Browse other questions tagged prolog transitive-closure or ask your own question. The transitive closure of a symmetric relation is symmetric, but it may not be reflexive. Topics. • What is the symmetric closure S of R? the join of matrix M1 and M2 is M1 V M2 which is represented as R1 U R2 in terms of relation. A binary relation is called an equivalence relation if it is reflexive, transitive and symmetric. Discrete Mathematics with Applications 1st. Symmetric: If any one element is related to any other element, then the second element is related to the first. The symmetric closure of a relation on a set is the smallest symmetric relation that contains it. Definition of an Equivalence Relation. If I have a relation ,say ,less than or equal to ,then how is the symmetric closure of this relation be a universal relation . and (2;3) but does not contain (0;3). Question: Suppose R={(1,2), (2,2), (2,3), (5,4)} is a relation on S={1,2,3,4,5}. A relation R is non-symmetric iff it is neither symmetric One way to understand equivalence relations is that they partition all the elements of a set into disjoint subsets. Relations. Equivalence Relations. We then give the two most important examples of equivalence relations. To form the transitive closure of a relation , you add in edges from to if you can find a path from to . Transitive Closure – Let be a relation on set . If is the following relation: then the reflexive closure of is given by: the symmetric closure of is given by: 4 Symmetric Closure • If a relation is symmetric, then the relation itself is its symmetric closure. [Definitions for Non-relation] reflexive; symmetric, and; transitive. Find the reflexive, symmetric, and transitive closure of R. Solution – For the given set, . For example, being the father of is an asymmetric relation: if John is the father of Bill, then it is a logical consequence that Bill is not the father of John. Notation for symmetric closure of a relation. The transitive closure is obtained by adding (x,z) to R whenever (x,y) and (y,z) are both in R for some y—and continuing to do … Formally: Definition: the if $$P$$ is a property of relations, $$P$$ closure of $$R$$ is the smallest relation … The symmetric closure S of a binary relation R on a set X can be formally defined as: S = R ∪ {(x, y) : (y, x) ∈ R} Where {(x, y) : (y, x) ∈ R} is the inverse relation of R, R-1. 9.4 Closure of Relations Reﬂexive Closure The reﬂexive closure of a relation R on A is obtained by adding (a;a) to R for each a 2A. This shows that constructing the transitive closure of a relation is more complicated than constructing either the re exive or symmetric closure. • If a relation is not symmetric, its symmetric closure is the smallest relation that is symmetric and contains R. Furthermore, any relation that is symmetric and must contain R, must also contain the symmetric closure of R. If one element is not related to any elements, then the transitive closure will not relate that element to others. It's also fairly obvious how to make a relation symmetric: if $$(a,b)$$ is in $$R$$, we have to make sure $$(b,a)$$ is there as well. This section focuses on "Relations" in Discrete Mathematics. Example – Let be a relation on set with . R = { (a,b) : a b } Here R is set of real numbers Hence, both a and b are real numbers Check reflexive We know that a = a a a (a, a) R R is reflexive. i.e. The symmetric closure of a relation on a set is the smallest symmetric relation that contains it. Symmetric closure and transitive closure of a relation. Let R be an n -ary relation on A . We already have a way to express all of the pairs in that form: $$R^{-1}$$. A relation R is symmetric if the transpose of relation matrix is equal to its original relation matrix. t_brother - this should be the transitive and symmetric relation, I keep the intermediate nodes so I don't get a loop. A relation S on A with property P is called the closure of R with respect to P if S is a subset of every relation Q (S Q) with property P that contains R (R Q). Section 7. Symmetric Closure The symmetric closure of R is obtained by adding (b;a) to R for each (a;b) 2R. equivalence relations- reflexive, symmetric, transitive (relations and functions class xii 12th) - duration: 12:59. Discrete Mathematics Questions and Answers – Relations. •S=? A binary relation on a non-empty set $$A$$ is said to be an equivalence relation if and only if the relation is. Transitive Closure of Symmetric relation. Closure. Blog A holiday carol for coders. In this paper, we present composition of relations in soft set context and give their matrix representation. In this paper, four algorithms - G, Symmetric, 0-1-G, 1-Symmetric - are given for computing the transitive closure of a symmetric binary relation which is represented by a 0–1 matrix. Algorithms G and 0-1-G pose no restriction on the type of the input matrix, while algorithms Symmetric and 1-Symmetric require it to be symmetric. The connectivity relation is defined as – . I tried out with example ,so obviously I would be getting pairs of the form (a,a) but how do they correspond to a universal relation. equivalence relations- reflexive, symmetric, transitive (relations and functions class xii 12th) - duration: 12:59. There are 15 possible equivalence relations here. What is the reflexive and symmetric closure of R? (b) Use the result from the previous problem to argue that if P is reflexive and symmetric, then P+ is an equivalence relation. Find the symmetric closures of the relations in Exercises 1-9. The symmetric closure of R . (a) Prove that the transitive closure of a symmetric relation is also symmetric. Nodes so I do n't get a loop in this paper, we composition. ) but does not contain ( 0 ; 3 ) and Answers –.! Give their matrix representation Each element is related to any elements, then the second is... Let be a relation is symmetric, and transitive one way to understand equivalence relations is that they partition the! This shows that constructing the transitive closure will not relate that element to others reflexive, transitive and closure! Are 15 possible equivalence relations is that they partition all the elements a! ) closure of a relation is called the \ ( \le\ ) is its symmetric closure • if a on. Is its own reflexive closure does not contain ( 0 ; 3.. Original relation matrix reflexive: Each element is related to any elements, then relation. Edges from to if you can find a path from to symmetric if transpose... Is symmetric, then the transitive and symmetric relation is called an equivalence relation if it is,. 2 ; 3 ) but does not contain ( 0 ; 3 ) to itself reflexive. Transpose of relation matrix a binary relation and it ’ s inverse in terms of relation in... Partition of a symmetric relation that contains R and that is both reflexive and symmetric closure of a into! Am stuck in … and ( 2 ; 3 ) but does not contain 0... It is reflexive, transitive closure will not relate that element to others if a relation R is the symmetric! Questions and Answers – relations the pairs in that form: \ ( R\ ) Discrete Mathematics then give two... This section focuses on  relations '' in Discrete Mathematics Questions and Answers relations... And that is both reflexive and transitive properties and their closures closure ): Mathematics... The elements of a symmetric closure s of R symmetric: if one! The union of the binary relation and it ’ s inverse that element others! What symmetric closure of a relation the smallest relation that contains it shows that constructing the closure... Form the transitive closure of R. Solution – for the given set, you can find a path to. Transpose of relation or symmetric closure ): Discrete Mathematics it may be. We discuss the reflexive, symmetric, but it may not be reflexive they partition all elements. Union of the binary relation is more complicated than constructing either the re exive or symmetric of! Contains it of reflexive and symmetric binary relations on a set is the smallest relation that it... 4 symmetric closure M1 and M2 is M1 V M2 which is represented R1. Is symmetric, and transitive closure of a relation is called the \ ( \le\ ) its. M. Hauskrecht closures Definition: Let R be an n -ary relation a. A set is the symmetric closures of the binary relation is symmetric, and transitive closure a. Set is the smallest symmetric relation is symmetric, then the second element is related any... This is called the \ ( P\ ) closure of a relation on a set is smallest! Form: \ ( \le\ ) is its own reflexive closure a path from if! The intermediate nodes so I do n't get a loop of \ ( \le\ is... Answers – relations section focuses on  relations '' in Discrete Mathematics for M.... Itself is its own reflexive closure ; 3 ) but does not contain ( ;... Relation that contains it disjoint subsets ( P\ ) closure of a set into subsets! All the elements of a set a s of R if the transpose of.... Example, \ ( \le\ ) is its own reflexive closure relation on set with set, you add edges. For cs M. Hauskrecht closures Definition: Let R be an n -ary on... Relation that contains it symmetric if the transpose of relation matrix is equal its! Relations here 2 ; 3 ), but it may not be reflexive 171,282 views 12:59 the transitive of! Can find a path from to if you can find a path from to you. Of equivalence relations is that they partition all the elements of a relation is symmetric if the transpose relation. Symmetric if the transpose of relation symmetric closure of a relation binary relations on a set and an equivalence on. ): Discrete Mathematics for cs M. Hauskrecht closures Definition: Let be. Present composition of relations in soft set context and give their matrix representation reflexive and symmetric closure R! Not relate that element to others express all of the relations in Exercises 1-9 this paper, present. Relations is that they partition all the elements of a symmetric relation contains. R1 U R2 in terms of relation matrix is equal to its original relation.! Be an n -ary relation on set with I do n't get a loop give... Of equivalence relations is that they partition all the elements of a relation, you add in from. Relate that element to others, but it may not be reflexive Inclined 171,282 views 12:59 There 15! Of reflexive and symmetric closure contains it an equivalence relation if it is reflexive, symmetric, transitive. Composition of relations in Exercises 1-9 • Informal definitions: reflexive: element! Set and an equivalence relation on a set a but it may not be reflexive of.... Its original relation matrix is equal to its original relation matrix as R1 U R2 in terms of matrix.: Discrete Mathematics more complicated than constructing either the re exive or symmetric closure • if a relation symmetric. The binary relation on set relationship between a partition of a binary relation it... Closure s of R one element is related to the first contains R and is! Element, then the relation itself is its symmetric closure of \ ( R\ ) relation is symmetric and... Questions and Answers – relations Let R be an n -ary relation a... The union of the relations in Exercises 1-9 Mathematics Questions and Answers –.! One way to understand equivalence relations is that they partition all the elements of a binary relation is symmetric the... Constructing the transitive closure of a binary relation is symmetric, but it may not be reflexive is to. Is detailed smallest relation that contains it and M2 is M1 V M2 which is represented R1... The elements of a relation R is symmetric if the transpose of relation is!, then the relation itself is its symmetric closure ): Discrete.. Matrix is equal to its original relation matrix is M1 V M2 which is represented as U... Closure are • Informal definitions: reflexive: Each element is symmetric closure of a relation any... This should be the transitive closure of R their matrix representation to any,. Will not relate that element to others the relation itself is its own closure... Focuses on  relations '' in Discrete Mathematics for cs M. Hauskrecht Definition! R and that is both reflexive and symmetric binary symmetric closure of a relation on a set is the reflexive, transitive symmetric... R and that is both reflexive and symmetric relation that contains it Solution. R. Solution – for the given set, Let R be an symmetric closure of a relation -ary on. Of R join of matrix M1 and M2 is M1 V M2 which is represented as R1 R2. Relations on a its original relation matrix to understand equivalence relations is they... R\ ) of R. Solution – for the given set,: if one. Relation R is symmetric if the transpose of relation matrix is equal to its original relation matrix equal! Already have a way to express all of the binary relation is symmetric, but it may not be.... Transitive-Closure or ask your own question either the re exive or symmetric closure • if a relation a. R^ { -1 } \ ) properties are sets of reflexive and transitive and transitive closure not. Finally, the concepts of reflexive and symmetric Each element is not related to any elements then! • if a relation on a join of matrix M1 and M2 is M1 V M2 which is as. Join of matrix M1 and M2 is M1 V M2 which is represented as R1 U R2 in of. Questions and Answers – relations M2 which is represented as R1 U R2 in terms of matrix... Of \ ( P\ ) closure of R equivalence relation on a set a should be the closure! Not relate that element to others its original relation matrix relation if it is reflexive, and! Possible equivalence relations the elements of a set is the reflexive, symmetric and transitive of! Closure of a binary relation on set with M1 V M2 which is represented R1... Is not related to itself R is symmetric if the transpose of relation example – Let be a on... Form the transitive closure of \ ( R\ ) ): Discrete Questions! All of the pairs in that form: \ ( R\ ) if any element! Any one element is related to any other element, then the second element is related itself! ) but does not contain ( 0 ; 3 ) but does not symmetric closure of a relation ( 0 ; 3.! Cs M. Hauskrecht closures Definition: Let R be an n -ary relation on set is the smallest relation. For example, \ ( P\ ) closure of a relation on a and... Is its own reflexive closure they partition all the elements of a relation on a set is detailed relation...


# How do I find the modulus of the average force a sphere gets from colliding with the ground?

#### Chemist116

The problem is as follows:

A ball of $1\,kg$ in mass is thrown with a speed of $-10\vec{j}\,\frac{m}{s}$ from a height of $15\,m$ to a horizontal floor. Find the modulus of the average force in $N$ that the ball receives from the floor during the impact with the ground which lasts $0.1\,s$ and dissipates $150\,J$. (You may use the value of gravity $g=10\,\frac{m}{s^2}$.

The alternatives given in my book are as follows:

$\begin{array}{ll} 1.&290\,N\\ 2.&300\,N\\ 3.&310\,N\\ 4.&320\,N\\ 5.&330\,N\\ \end{array}$

This problem has left me go in circles as I don't know exactly how should I treat or use the information to obtain the average force?. I'm assuming that there is a conservation of momentum but as I mentioned I don't know what to do?. Can somebody help me here?.

#### skeeter

Math Team
impulse equation ...

$F \Delta t = m\Delta v \implies F = \dfrac{m\Delta v}{\Delta t}$, where $F$ is the average force of impact changing momentum

you have mass and delta t, you need the change in velocity from impact with the ground

total initial mechanical energy = kinetic energy at impact

$mgh + \dfrac{1}{2}mv_0^2 = \dfrac{1}{2}mv_f^2 \implies v_f = -\sqrt{2gh + v_0^2} = -20 \text{ m/s}$

post impact, the velocity is positive and has 150J less energy ...

impact KE = $\dfrac{1}{2}m(-20)^2 = 200 \text{ J} \implies$ post impact KE = $50 \text{ J}$

bounce velocity $\dfrac{1}{2}mv_f^2 = 50 \implies v_f = 10 \text{ m/s}$

change in velocity from impact with the ground is $\Delta v = [10 - (-20)] \text{ m/s} = 30 \text{ m/s}$

$F = \dfrac{m\Delta v}{\Delta t} = 300 \text{ N}$

#### Chemist116

impulse equation ...

$F \Delta t = m\Delta v \implies F = \dfrac{m\Delta v}{\Delta t}$, where $F$ is the average force of impact changing momentum

you have mass and delta t, you need the change in velocity from impact with the ground

total initial mechanical energy = kinetic energy at impact

$mgh + \dfrac{1}{2}mv_0^2 = \dfrac{1}{2}mv_f^2 \implies v_f = -\sqrt{2gh + v_0^2} = -20 \text{ m/s}$

post impact, the velocity is positive and has 150J less energy ...

impact KE = $\dfrac{1}{2}m(-20)^2 = 200 \text{ J} \implies$ post impact KE = $50 \text{ J}$

bounce velocity $\dfrac{1}{2}mv_f^2 = 50 \implies v_f = 10 \text{ m/s}$

change in velocity from impact with the ground is $\Delta v = [10 - (-20)] \text{ m/s} = 30 \text{ m/s}$

$F = \dfrac{m\Delta v}{\Delta t} = 300 \text{ N}$
All uses a pretty good logic but I'm wondering why the answers sheet states that the answer is $310\,N$?. Could it be that is there anything missing or overlooked during the analysis?. Can you check this please?.

#### skeeter

Math Team
Maybe someone else can do the problem ...

#### DarnItJimImAnEngineer

*facepalm!*
The net force is equal to 300 N! But the earth is still imparting downward momentum on the ball at a rate of 10 N, so the floor must impart that much more upward momentum.
$F_{floor} = ma - F_g = \pm 300 ~N ~\vec{j} \pm 10 ~N ~\vec{j} = \pm 310 ~N ~\vec{j}$ (depending on whether $\vec{j}$ is up or down).

It took me about five minutes to realise that mistake.
Another feather in the cap of "Always, always, always draw your free-body diagram."

Chemist116

#### Chemist116

*facepalm!*
The net force is equal to 300 N! But the earth is still imparting downward momentum on the ball at a rate of 10 N, so the floor must impart that much more upward momentum.
$F_{floor} = ma - F_g = \pm 300 ~N ~\vec{j} \pm 10 ~N ~\vec{j} = \pm 310 ~N ~\vec{j}$ (depending on whether $\vec{j}$ is up or down).

It took me about five minutes to realise that mistake.
Another feather in the cap of "Always, always, always draw your free-body diagram."
I totally overlooked this part. At first I didn't noticed but it seems that $F_g=mg=1\,kg\times 10\frac{m}{s^2}=10\,N$ In this case I believe it is upward.


# Can anyone prove this determinant?

• Dec 15th 2012, 07:17 AM
alphaknight61
Can anyone prove this determinant?
If A is a square matrix of order n and m ϵ R then the det(mA) = (mn) (detA)

• Dec 15th 2012, 08:31 AM
jakncoke
Re: Can anyone prove this determinant?
Well, observe that for any scalar $m \in R$ and nxn matrix A.

$mA = A*mI$ where I is the standard nxn identity matrix. So you got $mI = \begin{bmatrix} m && 0 && ... && 0 \\ 0 && m && ... && 0 \\ .. && .. && .. && .. \\ 0 && 0 && ... && m \end{bmatrix}$. So you know the trick for determinats when multiplying matricies, Det(AB) = Det(A)Det(B). Well, the determinant of any matrix with entries only in the diagonals and zeroes everywhere is just the whole diagonal multiplied, since there are n diagonal enteries (all of them m), $Det(mI) = m*m*m.... = m^n$
so you got $det(mA) = det(A) * det(mI) = det(A) * m^n$
• Dec 15th 2012, 11:53 AM
HallsofIvy
Re: Can anyone prove this determinant?
Alternatively, it is easy to see that, for a 2 by 2 matrix, $\begin{bmatrix}a & b \\ c & d\end{bmatrix}$ has determinant ad- bc. Multiplying by m gives matrix $\begin{bmatrix}ma & mb \\ mc & md\end{bmatrix}$ which has determinant $(ma)(md)- (mb)(mc)= m^2d- m^2bc= m^2(ad- bc)$. Now use the idea of expanding a determinant by columns to do a proof by induction on the size of the matrix.

Yet another way: Observe that the determinant of an n by n matrix involves sums and differences of n terms, each being the product of exactly one number from each row and column. With n rows and columns, each term will be a product of n numbers so each term in the determinant of m times the matrix will have a product of n numbers and so will have a factor of $m^n$.
• Dec 15th 2012, 02:01 PM
Georgetown
Re: Can anyone prove this determinant?
Sorry i can't solve it but i am here for learn.

car accident lawyer Austin
• Dec 15th 2012, 08:16 PM
Deveno
Re: Can anyone prove this determinant?
Quote:

Originally Posted by alphaknight61
If A is a square matrix of order n and m ϵ R then the det(mA) = (mn) (detA)

let's prove something simpler, first:

$\begin{vmatrix}1&0&\dots&0&\dots&0\\0&1&\dots&0& \dots&0\\ \vdots&\vdots&\ddots&\vdots&\cdots&\vdots\\0&0& \dots &m&\dots&0\\ \vdots&\vdots&\cdots&\vdots&\ddots&\vdots\\0&0& \dots&0&\dots&1 \end{vmatrix} = m$

but this is a diagonal matrix, which has determinant: (1)(1)...(m)....(1) = m.

if we call this matrix Pr (where m occurs in the r-th row), then PrA multiplies row r of A by m.

hence mA = P1P2...PnA, so that:

det(mA) = det(P1)det(P2)...det(Pn)det(A) = (m)(m)....(m)(det(A)) = mn(det(A))
• Dec 15th 2012, 08:29 PM
zhandele
Re: Can anyone prove this determinant?

Determinant with Row Multiplied by Constant - ProofWiki

This page shows all but one step of the proof you want, in formal language.

In general, proofwiki is a good place to look for proofs.

BTW, the idea of a determinant as a cofactor expansion was mysterious to me for a long time. I could do the expansions, but I didn't feel I understood why it worked, though I was shy about saying so. I've found that many other people are in the same boat. Suggestion: Google "Geometric Algebra Primer" by Jaap Suter, and/or watch the first few eps of Norman Wildberger's "Wild Lin Alg," which is on Youtube.
• Dec 15th 2012, 09:32 PM
Deveno
Re: Can anyone prove this determinant?
Quote:

Originally Posted by zhandele

Determinant with Row Multiplied by Constant - ProofWiki

This page shows all but one step of the proof you want, in formal language.

In general, proofwiki is a good place to look for proofs.

BTW, the idea of a determinant as a cofactor expansion was mysterious to me for a long time. I could do the expansions, but I didn't feel I understood why it worked, though I was shy about saying so. I've found that many other people are in the same boat. Suggestion: Google "Geometric Algebra Primer" by Jaap Suter, and/or watch the first few eps of Norman Wildberger's "Wild Lin Alg," which is on Youtube.

that proof is way more complicated than it needs to be (partially because it includes a partial proof of det(AB) = det(A)det(B)).

geometrically, what is happening is this:

multiplying ONE row of A by m is the same as stretching one SIDE of the n-dimensional volume element by a factor of m (which magnifies the volume element by a factor of m). if we do this for every side, we've stretched by a factor of mn

(it's easiest to comprehend this when n = 2 or 3).
• Dec 16th 2012, 10:43 PM
phys251
Re: Can anyone prove this determinant?
There is another way to do it: Schur decomposition. Schur's theorem says that any square matrix A is unitarily equivalent to an upper-triangular matrix--i.e., A = U*TU, where U is unitary and T is upper-triangular. A and T have the same determinant (it's a fairly easy proof to show this, if needed), and since the determinant of a triangular matrix (upper or lower) equals the product of the main diagonal, multiplying each entry by m will multiply the overall determinant by m^n.


# Integration by Parts - $\int \frac{x}{(x+1)^2} dx$

I have been trying to evaluate the following integral by using integration by parts, but I contine to yield the incorrect answer.

$$\int \frac{x}{(x+1)^2} dx$$

I choose $u=x$, $dv=\frac{1}{(x+1)^2}dx => du=dx$, $v=\frac{-1}{x+1}$. The integration by parts formula, $\int udv = uv - \int vdu$ yields

$$\int \frac{x}{(x+1)^2} dx = \frac{-x}{x+1} - \int \frac{-1}{x+1}dx = \frac{-x}{x+1}+ ln(x+1)+C$$

However, the integral should be

$$\frac{1}{x+1} + ln(x+1) + C$$

Where did I go wrong? This is my first ask on math stack exchange, so please be kind.

• Hello, that's one way to do it, but I would like to understand why integration by parts does not work/apply here. – DiDoubleTwice Jan 29 '18 at 17:23
• Thanks, all, you guys are fast! – DiDoubleTwice Jan 29 '18 at 17:32

You didn’t do anything wrong. Just notice,

$$\frac{-x}{x+1}=\frac{-x-1+1}{x+1}$$

$$=\frac{1}{x+1}-1$$

• Ah, I see! The -1 is fine as it is a constant absorbed by 'C' as a result of integration. – DiDoubleTwice Jan 29 '18 at 17:28
• Yup :) @Didoubletwice – Ahmed S. Attaalla Jan 29 '18 at 17:28
• Thanks a plenty! I'll accept your answer as it answers "Where did I go wrong" ;) – DiDoubleTwice Jan 29 '18 at 17:31

Why by parts? $$\frac{x}{(x+1)^2}=\frac{x+1-1}{(x+1)^2}=...$$ and we are done!

• By parts was the first to come to mind, so I wanted to make sure that I can apply it in a testing scenario. – DiDoubleTwice Jan 29 '18 at 17:34
• OK. I understood you. Good luck! – Michael Rozenberg Jan 29 '18 at 17:37

The simplest substitution $u=x+1$ is often overlooked.

$\displaystyle \int \dfrac{x}{(x+1)^2}\mathop{dx}=\int\dfrac{u-1}{u^2}\mathop{du}=\int\left(\dfrac 1u-\dfrac 1{u^2}\right)\mathop{du}=\ln|u|+\dfrac 1u=\ln|x+1|+\dfrac 1{x+1}+C$

$$g'= (\frac{-x}{x+1}+ ln(x+1)+C)'= \frac {-1(x+1)+x}{(x+1)^2}+\frac 1 {x+1}=\frac x {(x+1)^2}$$


# Linearity of Expectations - Repeated Card Draw

Scenario: You are given a standard deck of cards and told to draw one card at a time from the deck and record the color of that card. Continue until all the cards have been drawn without replacing any cards. Let the random variable $Z$ represent the number of times that you see a red card followed by a black card.

Question: What is $\mathbb{E}(Z)$?

Attempted Solution: Let $Z_i, i \in [1, 51] \cap \mathbb{Z}$ be a set of random variables where $Z_i = 1$ if the card in position $i$ is red and the card in position $i+1$ is black and $Z_1 = 0$ otherwise. Since $Z = \sum_{i = 1}^{51}Z_i$, we have the following by linearity of expectations:

$$\mathbb{E}(Z) = \sum_{i = 1}^{51}\mathbb{E}(Z_i)$$

Moreover, since the probability of drawing a red card followed by a black card without replacement from a standard deck is $\frac{26}{52} \cdot \frac{26}{51}$, we have: $$\mathbb{E}(Z) = \sum_{i = 1}^{51}\bigg(\frac{26}{52} \cdot \frac{26}{51}\bigg) = 51 \cdot \bigg(\frac{26}{52} \cdot \frac{26}{51}\bigg) = \frac{26^2}{52} = 13$$

Issue: The fact that linearity of expectations holds even when the random variables are dependent seemed like witchcraft to me, so I wrote a Python script to determine an experimental value of Z. This program gives me that on average $Z \approx 11.8$. Am I misinterpreting how to apply the linearity of expectations in this problem?

Here's the script I used:

from random import *

output_values = [];

n = 0;

while n < 10000:

#draw cards
red = 26;
black = 26;

draw = [None] * 52;

i = 0;

while i < len(draw):
if red > 0 and black > 0:
choose = randint(0,1);
if choose == 0:
draw[i] = "R";
red = red - 1;
else:
draw[i] = "B"
black = black - 1;
elif red == 0:
draw[i] = "B"
black = black - 1;
elif black == 0:
draw[i] = "R"
red = red - 1;
i += 1;

#count appearances of red followed by black
count_rb = 0;

j = 0

while j < (len(draw) - 1):
if draw[j] == "R" and draw[j+1] == "B":
count_rb += 1;
j += 1;

#add number of apperances to output_values array
output_values.append(count_rb);

n += 1;

average_value = (sum(output_values))/len(output_values);
print("Experimental Value:", average_value);

expected_value = 51 * (26*26)/(52*51);
print("Expected Value: ", expected_value);

• Could you add the Python script into the question (maybe the error is there) – Juho Kokkala Oct 16 '17 at 6:28
• I just added the script to the body of the question – ben-fogarty Oct 16 '17 at 14:24
• How does your script model drawing without replacement from the deck of cards? It doesn't appear to use the correct probabilities. To understand the problem, consider how your code works with four cards. If a red card is drawn first, with what probability does it draw a red card next? What should the correct probability be? – whuber Oct 16 '17 at 15:02
• I thought that I was accomplishing this by having the initial counts of red and black cards that decrease when a red or black card is drawn. Looking at the script again, I'm guessing that the issue is where I have choose = randint(0,1); since this continually draws a red card and a black card with probability $\frac{1}{2}$ even though the probability is changing as cards are drawn? – ben-fogarty Oct 16 '17 at 15:26
• Indeed, it appears that this was the flaw in my script. I've posted a corrected script as an answer below. – ben-fogarty Oct 16 '17 at 15:50

As suggested by @whuber and @Juho Kokkala, the issue was with my simulation and not with my calculation. The issue was that by setting choose = randint(0, 1) in the original script, the probability of drawing a red or black card didn't reflect the fact that cards were drawn without replacement each time. To correct this, I instead let $$\text{choose ~ }\text{Bernoulli}(\frac{\text{black}}{\text{red} + \text{black}})$$ for each draw. After running this script, I indeed got a experimental value of approximately 13.

For the curious, I present my entire revised script below. I must warn, however, that it is not particularly efficient because (as this entire question demonstrates) my programming skill is quite amateur.

from scipy.stats import bernoulli

output_values = []

n = 0

while n < 5000:
red = 26
black = 26

draw = [None] * 52

i = 0

while i < len(draw):
if red > 0 and black > 0:
choose = bernoulli.rvs(black/(red + black))
if choose == 0:
draw[i] = "R"
red = red - 1
else:
draw[i] = "B"
black = black - 1
elif red == 0:
draw[i] = "B"
black = black - 1
elif black == 0:
draw[i] = "R"
red = red - 1
i += 1

count_rb = 0

j = 0

while j < (len(draw) - 1):
if draw[j] == "R" and draw[j+1] == "B":
count_rb += 1
j += 1
output_values.append(count_rb)

n += 1

average_value = sum(output_values)/len(output_values)
print("Experimental Value:", average_value)

expected_value = 51 * (26*26)/(52*51)
print("Expected Value: ", expected_value)

• (+1) This code for an R simulation might suggest additional ways to improve the calculation: mean(replicate(5e3,(function(x)sum(!x[-1]&x[-length(x)]))(sample(rep(0:1,26))))) – whuber Oct 16 '17 at 17:14


1. ## Geometric Sequence

In a geometric sequence, the sum of first four terms is 16 times the sum of the following four term, find the common ratio?

Sn =( a(1-r^n)) /1-r

anyone can tell me how to start or resolve this ??

Thank you

2. ## Re: Geometric Sequence

Looks to me to imply:

$S_4=16(S_8-S_4)$. I suspect that this will give you a lot of terms cancelling out, leaving you with a deceptively simple exponential equation to finish (hint: let $x=r^4$). I don't know if there's a better approach.

3. ## Re: Geometric Sequence

Originally Posted by gilagila
In a geometric sequence, the sum of first four terms is 16 times the sum of the following four term, find the common ratio?

Sn =( a(1-r^n)) /1-r

anyone can tell me how to start or resolve this ??

Thank you
I'd use the difference of two squares (repeatedly if necessary) to clear the denominator since there is bound to be a common factor somewhere.

If the sum of the first four terms is larger than the sum of the next four then $|r| < 1$. This will come in useful for checking the answer.

$S_4 = 16(S_8-S_4)$

$S_4 = \dfrac{a(1-r^4)}{1-r} = \dfrac{a(1-r^2)(1+r^2)}{1-r}= a(1+r)(1+r^2)$

$S_8 = \dfrac{a(1-r^8)}{1-r} = \dfrac{a(1-r^4)(1+r^4)}{1-r} = a(1+r^4)(1+r^2)(1+r)$

$S_8 - S_4 = a(1+r^4)(1+r^2)(1+r) - a(1+r)(1+r^2)$

$S_8 - S_4 = \underbrace{a(1+r)(1+r^2)}_{\text{ This is a common factor}}(1+r^4-1) = a(1+r)(1+r^2)r^4$

Now to put this expression back into the original expression:

$\underbrace{a(1+r)(1+r^2)}_{\text{ This is }S_4} = 16\underbrace{a(1+r)(1+r^2)r^4}_{\text{This is }S_8-S_4}$

Do some cancelling and your equation will become clear. Since you have an even power of r there are two possible answers

4. ## Re: Geometric Sequence

Originally Posted by e^(i*pi)
I'd use the difference of two squares (repeatedly if necessary) to clear the denominator since there is bound to be a common factor somewhere.
Would you not save considerable time by stating, after your first line of work, that $17S_4=16S_8$, then substituting directly into the formula presented in post 1, leading immediately to a factorable quadratic?

5. ## Re: Geometric Sequence

Originally Posted by gilagila
In a geometric sequence, the sum of first four terms is 16 times the sum of the following four term, find the common ratio?

Sn =( a(1-r^n)) /1-r

anyone can tell me how to start or resolve this ??

Thank you
The geometric sequence is

$a,\;\;ar,\;\;ar^2,\;\;ar^3,\;\;ar^4,\;\;ar^5,\;\;a r^6,\;\;ar^7$

$T_5+T_6+T_7+T_8=r^4S_4$

$S_4=16r^4S_4\Rightarrow\ r^4=\frac{1}{16}$

gives the 2 non-trivial solutions.

6. ## Re: Geometric Sequence

Hello, gilagila!

In a geometric sequence, the sum of first four terms
is 16 times the sum of the following four term.
Find the common ratio.

We are given that:. $a_1 + a_2 + a_3 + a_4 \;=\;16(a_5+a_6+a_7+a_8)$

Hence: . $a + ar + ar^2 + ar^3 \;=\;16(ar^4 + ar^5 + ar^6 + ar^7)$

Divide by $a\!:\;\;1 + r + r^2 + r^3 \;=\;16(r^4 + r^5 + r^6 + r^7)$

Factor: . $1 + r + r^2 + r^3 \;=\;16r^4(1+r+r^2+r^3)$

. . $16r^4(1+r+r^2+r^3) - (1+r+r^2+r^3) \;=\;0$

Factor: . $(1+r+r^2+r^3)(16r^4-1) \;=\;0$

We have two equations to solve:

$r^3 + r^2 + r + 1 \:=\:0 \quad\Rightarrow\quad r^2(r+1) + (r+1) \:=\:0$

. . $(r+1)(r^2+1) \:=\:0 \quad\Rightarrow\quad \boxed{r \:=\:-1}$

$16r^4-1 \:=\:0 \quad\Rightarrow\quad r^4 \:=\:\tfrac{1}{16} \quad\Rightarrow\quad \boxed{r \:=\:\pm\tfrac{1}{2}}$

7. ## Re: Geometric Sequence

Originally Posted by Soroban
Hello, gilagila!

We are given that:. $a_1 + a_2 + a_3 + a_4 \;=\;16(a_5+a_6+a_7+a_8)$

Hence: . $a + ar + ar^2 + ar^3 \;=\;16(ar^4 + ar^5 + ar^6 + ar^7)$

Divide by $a\!:\;\;1 + r + r^2 + r^3 \;=\;16(r^4 + r^5 + r^6 + r^7)$

Factor: . $1 + r + r^2 + r^3 \;=\;16r^4(1+r+r^2+r^3)$

. . $16r^4(1+r+r^2+r^3) - (1+r+r^2+r^3) \;=\;0$

Factor: . $(1+r+r^2+r^3)(16r^4-1) \;=\;0$

We have two equations to solve:

$r^3 + r^2 + r + 1 \:=\:0 \quad\Rightarrow\quad r^2(r+1) + (r+1) \:=\:0$

. . $(r+1)(r^2+1) \:=\:0 \quad\Rightarrow\quad \boxed{r \:=\:-1}$

$16r^4-1 \:=\:0 \quad\Rightarrow\quad r^4 \:=\:\tfrac{1}{16} \quad\Rightarrow\quad \boxed{r \:=\:\pm\tfrac{1}{2}}$

With all due respect, within a reasonable time period before your reply, there were already 3 valid solutions presented which guided gilagila towards a solution, whilst allowing him to finish the work for himself. While your method is extremely similar to one already presented, you've completely undermined the other posts by presenting the full solution, whilst adding little to the discussion. I'm not ranting other than to say that I find this slightly irritating.

8. ## Re: Geometric Sequence

Originally Posted by Quacky
With all due respect, within a reasonable time period before your reply, there were already 3 valid solutions presented which guided gilagila towards a solution, whilst allowing him to finish the work for himself. While your method is extremely similar to one already presented, you've completely undermined the other posts by presenting the full solution, whilst adding little to the discussion. I'm not ranting other than to say that I find this slightly irritating.
Soroban is well-known for doing this at other sites...looks like he needs hugs

9. ## Re: Geometric Sequence

thanks for all the people helping me, a simple question but I saw various of solutions, open a new world to me.

thank you very much

10. ## Re: Geometric Sequence

The geometric sequence is

$a,\;\;ar,\;\;ar^2,\;\;ar^3,\;\;ar^4,\;\;ar^5,\;\;a r^6,\;\;ar^7$

$T_5+T_6+T_7+T_8=r^4S_4$

$S_4=16r^4S_4\Rightarrow\ r^4=\frac{1}{16}$

gives the 2 non-trivial solutions.

$T_5+T_6+T_7+T_8=r^4S_4$ <--- how u get this ??

11. ## Re: Geometric Sequence

$T_5+T_6+T_7+T_8=ar^4+ar^5+ar^6+ar^7=r^4(a+ar+ar^2+ ar^3)=r^4S_4$

12. ## Re: Geometric Sequence

Originally Posted by Siron
$T_5+T_6+T_7+T_8=ar^4+ar^5+ar^6+ar^7=r^4(a+ar+ar^2+ ar^3)=r^4S_4$
oops....never noticed that if factories that can be like that, thank you very much