# Probability that the sum of 6 dice rolls is even

Question:

6 unbiased dice are tossed together. What is the probability that the sum of all the dice is an even number?

I think the answer would be 50%, purely by intuition. However, not sure if this is correct. How should I go about solving such a problem?

Notice that whatever the sum of the first 5 rolls, whether the outcome is odd or even is totally determined by the last die. It is even or odd with equal probability, so the probability of an even sum is exactly the same as the probability of an odd sum.

The first 5 dice don't matter.

Statement:

Let $X_1,\ldots,X_n$ be independent, integer-valued random variables, and let some $X_k$ satisfy $P(X_k \mbox{ odd}) = 0.5$. Then $P(\sum X_i \mbox{ odd}) = 0.5$.

Proof:

Without loss of generality let $k=n$, and let $S = \sum_i^{n-1} X_i$. Since $S$ and $X_n$ are independent random variables, $$\begin{eqnarray*} P\left(\sum X_i \mbox{ odd}\right) = P(S + X_n \mbox{ odd}) &=& P(S \mbox{ odd and } X_n \mbox{ even}) + P(S \mbox { even and } X_n \mbox{ odd}) \\ &=& P(S \mbox{ odd})P(X_n \mbox{ even}) + P(S \mbox{ even})P(X_n \mbox{ odd}) \\ &=& P(S \mbox{ odd})P(X_n \mbox{ odd}) + P(S \mbox{ even})P(X_n \mbox{ odd}) \\ &=& \left(P(S \mbox{ odd}) + P(S \mbox{ even})\right)P(X_n \mbox{ odd}) \\ &=& P(X_n \mbox{ odd}) \\ &=& 0.5 \end{eqnarray*}$$

• o.O That's also a nice approach. Will the same apply for a dice with 7 sides? – Gummy bears Sep 26 '15 at 5:18
• @Gummybears no, because then you have inequal probabilities coming from the last die, so the parity of the sum you had before you roll it matters. However, this sort of thinking does apply in a pretty wide variety of cases, and it saves a lot of work when you notice it happening. – Eric Tressler Sep 26 '15 at 5:22
• @Gummybears: sorry, I missed that. However, what is not mentioned is that with an odd number of seven sided dice, there is a higher chance of an odd sum. Whereas with an even number of seven sided dice, there is a higher chance of an even sum. – robjohn Sep 26 '15 at 5:50
• @JoseAntonioDuraOlmos, the first 5 dice matter as much as the last one. They all matter the same here. It is not our neglect of the first 5 dice which leads us to the conclusion that the probability is $1/2$ but it is the symmetry of odd/even tosses. There is a great danger in basing the argument on the neglect, as one might be tempting to write it for the case where all dice are biased. – zhoraster Sep 26 '15 at 8:53
• There is no neglect. If I am presented a box with an unknown number of dices of unknown shapes all of them labeled with integers. I take only one out of the box. The dice has 6 sides, from 1 to 6, and is unbiased. Then I can claim that if I take all the dices, roll them and add their results the sum has a 50% probability of being even. I can claim it without examining the other dices in the box. And the proof of such claim is like the one in this answer. As for the case where all dice are biased, yeah this proof scheme does not work for that, don't fall into those temptations. – Jose Antonio Reinstate Monica Sep 26 '15 at 9:08

The only thing about the numbers rolled that matters is their parity - whether they are even or odd. In order to get an even sum, an even number of the six dice must be even. In order to get an odd sum, an odd number of the six dice must be even.

Using O for odd and E for even, we can list out the possibilities.

Even sum:

• OOOOOO $$\binom{6}{6}=1 \text{ arrangement}$$
• OOOOEE $$\binom{6}{4}=15 \text{ arrangements}$$
• OOEEEE $$\binom{6}{2}=15 \text{ arrangements}$$
• EEEEEE $$\binom{6}{0}=1 \text{ arrangement}$$

This gives a total of $32$ arrangements with even sum.

Since there are $2^6 = 64$ total possibilities, we see that your intuition of $50\%$ is correct.

• Lovely answer. Although slightly lengthy, it is simple to understand. Thank you. – Gummy bears Sep 26 '15 at 5:24
• +1 Good answer. I just have a wording suggestion: instead of saying "to get an even/odd sum, an even/odd number of the six dice must be even", I think wording it in terms of the number of odd dice gives more intuition and can generalize to any number of dice. The number of even dice doesn't really matter, the number of odd dice does. – jadhachem Sep 28 '15 at 5:39

The generating function approach:

$$P(x)=(1+x+x^2+x^3+x^4+x^5)^6=\sum a_i x^i$$

Then $a_i$ counts the number of ways of getting a total of $i+6$ from $6$ dice.

Now, to find the even terms, you can compute $$\frac{P(1)+P(-1)}{2}=\sum_i a_{2i}.$$

But $P(1)=6^6$ and $P(-1)=0$. So $$\frac{P(1)+P(-1)}{2}=\frac{6^6}{2},$$ or exactly half, as you conjectured.

For another example, let $N_{i}$ be the number of ways to roll $6$ dice and getting a value $\equiv i\pmod{5}$. Then it turns out that if $z$ is a primitive $5$th root of unity, then the value can be counted by defining:

$$Q_i(x)=x^{6-i}(1+x+x^2+x^3+x^4+x^5)^6$$ then computing $$N_i=\frac{Q_i(1)+Q_i(z)+Q_i(z^2)+Q_i(z^3)+Q_i(z^4)}{5}$$

This gives the result:

$$N_i =\begin{cases}\frac{6^6+4}{5}&i\equiv 1\pmod 5\\ \frac{6^6-1}{5}&\text{otherwise} \end{cases}$$

More generally, if $N_{n,i}$ is the number of ways to get $\equiv i\pmod 5$ when $n$ dice are rolled, you get:

$$N_{n,i} =\begin{cases}\frac{6^n+4}{5}&i\equiv n\pmod 5\\ \frac{6^n-1}{5}&\text{otherwise} \end{cases}$$

It's this simple because of the fact that $6=5+1$.

If each die has $d$ sides, and you ask what are the number of ways to get a total $\equiv i\pmod {d-1}$, then you get:

$$N_{d,n,i} =\begin{cases}\frac{d^n+{d-2}}{d-1}=\frac{d^n-1}{d-1}+1&i\equiv n\pmod {d-1}\\ \frac{d^n-1}{d-1}&\text{otherwise} \end{cases}$$

• I'm afraid I lost you at the last sentence. – Gummy bears Sep 26 '15 at 5:03
• That's okay, it is an advanced approach, but a useful one for problems like this. If you rolled $n$ dice, each with $7$ sides, you'd get the number of even results is: $$\frac{7^n + (-1)^n}{2}$$ would be even. – Thomas Andrews Sep 26 '15 at 5:09
• Aha..... That's a good approach. However, I'm not sure if I completely get it. Not sure how you used the probability of 1 and $-1$ to calculate the even terms. – Gummy bears Sep 26 '15 at 5:16
• If $i$ is odd, then $a_i\cdot 1^i + a_i(-1)^{i} = 0$. If $i$ is even, then $a_u\cdot 1^i + a_i(-1)^i = 2a_i$. So $P(1)+P(-1)=\sum_{i} 2a_{2i}$, which is twice the value you are looking for. @Gummybears – Thomas Andrews Sep 26 '15 at 5:19
• Aha.... I'm stupid, aren't I? This is perfect! It holds true for any sided dice and for any number of dice. – Gummy bears Sep 26 '15 at 5:23

Using the same logic given by @Eric tessler but writing the maths behind it.

Let $P_x$ = We get an even sum on the roll of x dice and

$1 - P_x$ = We get an odd sum.

So we require $P_6$

Now $P_6 = P_5 \times$ P[even number on the last dice] + $(1 - P_5) \times$ P[odd number on the last dice]

$P_6 = P_5 \times 0.5 + (1-P_5) \times 0.5$

$P_6 = 0.5$

• Exactly what @erictessler is missing - a rigurous proof. One by induction could work for all sorts of dice. – Tibos Sep 26 '15 at 23:22
• More upvotes needed! – Gummy bears Sep 27 '15 at 4:14
• Nicely done! +1 – Zubin Mukerjee Sep 27 '15 at 17:27

A lot of very informative answers but none of them do not explain your intuition, so I'll post mine.

There is a symmetry between all tosses with odd sum and those with even sum: just take the number $k$ on the first die and replace it with $7-k$.

So the numbers of odd tosses and even tosses are equal, therefore, the probability is $1/2$.

• I'm not getting you much.... elaborate please? – curiousbrain Sep 26 '15 at 5:22
• Same here. Please elaborate. – Gummy bears Sep 26 '15 at 5:23
• See the answer by @EricTressler, posted the same time. – zhoraster Sep 26 '15 at 5:24

Your intuition is correct. There could be a proof based on this intuition (using the fact that each die has 50% chance of being even and we're tossing 6 of them) but I'm not so sure.

But there are ways to prove it. For example, the only ways we could get an even sum are if:

1. All 6 dice show even numbers.
2. 4 dice show even and 2 dice show odd.
3. 2 dice show even and 4 dice show odd.
4. All 6 dice show odd.

The probability of cases 1 and 4 is $(\frac{1}{2})^6$ and the probability of cases 2 and 3 is $\binom{6}{2}(\frac{1}{2})^6=15(\frac{1}{2})^6$ (because we need to order the dice which show odd numbers.) Add them up and we get the probability is $$32(\frac{1}{2})^6=\frac{1}{2}.$$

The problem is about fair dice.

Whether the number of dice is 6 (even) or 7 (odd) $Pr = \dfrac12$

The logic is based on parity (odd/even). Since the probability that any particular throw is even or odd is equal at $\dfrac12$

(a) For an even number of dice, if you interchange odd and even throws, the parity remains the same, thus there will always be an equal number of odd and even sums.

EEEEEE OOOOOO even

EEEEEO OOOOOE odd

EEEEOO OOOOEE even

EEEOOO OOOEEE odd

(b) For an odd number of dice, every such interchange changes the parity, but by symmetry, again there will be an equal number of odd and even sums.

EEEEEEE even OOOOOOO odd

EEEEEEO odd OOOOOOE even

EEEEEOO even OOOOOEE odd

EEEEOOO odd OOOOEEE even

All outcomes are equally likely. Half the outcomes will have an odd number of odd dice faces and half of the outcomes will have an even number of odd dice faces. The outcomes with an odd number will have an odd total and the outcomes with an even number of odd face will be even. As there are equal numbers of outcomes for each case the probability for each case is 50%.

Okay so how do we know that half the outcomes will have on odd number of odd faces and half the number will have an even number of even faces? Well,we can make a one to one correspondence between outcomes with an odd number of odd faces to outcomes to an even number of odd faces. If outcome has an even number of odd faces, map it to the exact same outcome but the 6th die is one number higher (let's assume 1 is one number higher than 6). This outcome has an odd number of odd faces. If an outcome has an odd number of odd faces map it the exact same outcome but the 6th die is one number lower. This is a one to one correspondence. So there are an equal number of outcomes with an odd number of odd faces and there are outcomes with an even number of odd faces.

And that's it. Equal number of odd comes as even outcomes, each outcome equally likely, odd outcomes and even outcomes equally likely.

• Oops, Zhoraster beat me to it and did a much clearer and shorter job explaining it. Oh, well. – fleablood Sep 26 '15 at 23:27
• It was asked above about 7 sided die. I don't have enough reputation to comment there, so I'm going to comment here: If a 7-sided die has 4 odd faces and 3 even faces the probability of an even result with n die is 1/2 + (- 1/7)^n. This can be shown by induction by noting that each extra die has a 4/7 chance of changing parity. So if Pn is probability of an even total with n die. Then P(n+1) = Pn*3/7 + (1 - Pn)*4/7. as P1 = 3/7 = 1/2 + (- 1/7), the result follows by induction – fleablood Sep 26 '15 at 23:51


# Show that if $A$ and $B$ are sets, then $A \subseteq B$ if and only if $A \cap B = A$.

I'm working through a real analysis textbook, and it starts out with set theory. The first exercise is

Show that if $A$ and $B$ are sets, then $A \subseteq B$ if and only if $A \cap B = A$.

I think I proved it correctly but I'm not sure. Here's what I did. I proved that if $A \subseteq B$, then $A \cap B = A$ the same way as this answer did (https://math.stackexchange.com/a/446114/93114), but I want to make sure I proved the converse correctly because it seems really easy (yes it's the first problem in the book, but still) and math usually isn't this easy for me, even the basic stuff!

Proof of "If $A \cap B = A$, then $A \subseteq B$."

If $x \in A \cap B$, then $x \in A$ and $x \in B$, but this applies to all $x \in A$ because $A \cap B = A$. So, for any $x \in A$, we know that $x \in B$, so $A \subseteq B$.

Am I on the right track?

• Yes, although you're doing it in a convoluted way. Let $x\in A$; since $A=A\cap B$ we have $x\in B$. – egreg Oct 12 '13 at 22:27
• @egreg So if $x \in A$, then because $A = A \cap B$, we know that $x \in A \cap B$. By definition that implies that $x \in A$ and $x \in B$, which is enough to show that $A \subseteq B$. – M T Oct 12 '13 at 22:28
• @egreg Sorry I replied to your other comment that disappeared, but we're doing it the same way now. – M T Oct 12 '13 at 22:30
• I realized to have misread your argument, so I changed my first comment. – egreg Oct 12 '13 at 22:32

Since you are just starting, I would suggest to be verbose instead of pulling everything in a single sentence.

To prove $A \subseteq B$ iff $A \cap B = A$, you have to

1. show $A \cap B = A$ given $A \subseteq B$. That is to
1. show $A \cap B \subseteq A$.
2. show $A \subseteq A \cap B$.
2. show $A \subseteq B$ given $A \cap B = A$.

Proof:

1.1) It is trivially true. You don't need to be given $A \subseteq B$ for it to be true.

1.2) If $x \in A$, then $x \in B$ since we are given $A \subseteq B$. Then $x \in A$ and $x \in B$ are both true. Therefore, $x \in A \cap B$.

2) From $A \cap B = A$, we know $x \in A$ and $x \in B$ whenever $x \in A$. If $x \in A$, then it must be the case that $x \in B$. Therefore, $A \subseteq B$.

• Thanks for the answer. I think I'm slowly starting to catch the hang of these proofs. – M T Oct 13 '13 at 1:58

Suppose $A\cap B=A$. To prove $A\subseteq B$, suppose $x\in A$. Since $A\cap B=A$, $x\in A\cap B$ and thus $x\in B$. Since $x$ was an arbitrary element of $A$, this holds for all $x$ and thus $A\subseteq B$.

The above proves $A\cap B=A\implies A\subseteq B$. You will then need to prove the reverse implication to establish $A\cap B=A\iff A\subseteq B$.

Here is another way to approach this type of problem: start with the most complex part (here: $\;A \cap B = A\;$), expand the definitions so that you get from the set level to the element level, then simplify using predicate logic, and finally go back to the set level as suggested by the shape of the formula.

In this case, \begin{align} & A \cap B = A \\ \equiv & \;\;\;\;\;\text{"set extensionality, i.e., the definition of $\;=\;$ for sets"} \\ & \langle \forall x :: x \in A \cap B \equiv x \in A \rangle \\ \equiv & \;\;\;\;\;\text{"definition of $\;\cap\;$"} \\ & \langle \forall x :: x \in A \land x \in B \equiv x \in A \rangle \\ \equiv & \;\;\;\;\;\text{"logic: $\;p \equiv p \land q\;$ is one way to write $\;p \Rightarrow q\;$"} \\ & \langle \forall x :: x \in A \Rightarrow x \in B \rangle \\ \equiv & \;\;\;\;\;\text{"definition of $\;\subseteq\;$"} \\ & A \subseteq B \\ \end{align}


# Show that a certain set of positive real numbers must be finite or countable

Let $B$ be a set of positive real numbers with the property that adding together any finite subset of elements from $B$ always gives a sum of $2$ or less. Show that $B$ must be finite or at most countable.

$B$ = {$x \in R:x>0\}$, $x_1,x_2...x_n \in B$ such that $x_1+x_2+...+x_n \le 2$.

Question: for any $a,b$ $(a,b)$~$R$, but $B$ is $(0,+\infty)$ so why $B$ is not uncountable (taking as $a = 0$, and letting $b$->$\infty$)?

And why for $B$ being countable doesn't contradict: for any $a,b$ $(a,b)$~$R$?

P.S. I read Showing a set is finite or countable and understood it.

• It sounds like you are confused about what the question is asking. It is not saying that B is the set of positive real numbers; it is a set of positive real numbers. This means that B is a subset of the set of all positive real numbers. Aug 8 '18 at 17:23
• No. B is some unspecified subset of the positive real numbers such that if you add up a finite number of the elements of B the sum is always less than 2. For example, B could be {0.1, 0.2, 0.5, 1.1} or B could be the infinite set {1, 1/2, 1/4, 1/8, 1/16, ...}. Note that B cannot be {1, 1.4, 1.8} and B cannot be {1, 1/2, 1/3, 1/4, ...} Aug 8 '18 at 17:47
• B does not have to be an interval (0,a). In fact, it cannot be such an interval. Your job is to prove that B must be finite or countable. Intervals are uncountable. Aug 8 '18 at 17:49
• Well, I'm just trying to help clarify the question. I haven't given a solution. I think the hints and discussion below do that for you. But the point is you cannot assume anything about B except: 1. its elements are all positive real numbers and 2. if you take a finite number of elements from B and add them up then you get a sum less than two. Given any such B you have to prove that B is either finite or countable. Aug 8 '18 at 17:59
• Here is a proof that B cannot be the open interval (0,1). If it were then these numbers would be in B: 0.5, 0.51, 0.52, and 0.53. These numbers add up to more than 2. Do you see? You could do something similar to show that B cannot be (0,a) for any positive a. But you have to show more than that. You have to show B is finite or countable. Aug 8 '18 at 18:00

Hint 1: How many elements of $B$ can be in the set $[2,\infty)$?

Hint 2: How many elements of $B$ can be in the set $[1,2)$?

Hint 3: How many elements of $B$ can be in the set $[0.5,1)$?

• At this rate you are going to need countably many hints :) Aug 8 '18 at 17:04
• @ArnaudMortier Can't he give a hint schema? Aug 8 '18 at 17:07
• 1) One $x = 2$, 2) set $x_1=1$ so one for sure, then I don't know how many $x_2,x_3,...x_n$ to choose so that they sum up to $1$. 3) The same, I don't know. Aug 8 '18 at 17:10
• Obviously $B\cap[1,\infty)$ has at most two elements, because if $x,y,z\ge1$ then $x+y+z>2$. Similarly $B\cap[2/n,\infty)$ has at most $n$ elements. (So $B$ is the union of countably many finite sets...) Aug 8 '18 at 17:17
• No, we certainly can't write $B$ as $(0,a)$. If $B=(0,a)$ then there are finite subsets of $B$ with sum larger than $2$. Aug 8 '18 at 18:56

Not only can we show that it's countable, it's not too difficult to construct an enumeration: given an element $b$, just count how many other elements of $B$ are larger. This has to be a finite integer, since if there were an infinite number of elements greater than $b$, then the sum of $n$ such elements would be greater than $nb$, so picking an $n>2/b$ would give a sum greater than 2.

For any $a\in B$, define $B_a\equiv\{b\in B:a<b\}$. The cardinality of $B_a$ must be less than $\lceil2/a\rceil$, otherwise the sum of any $\lceil2/a\rceil$ elements of $B_a$ would exceed 2. That is, $\sum_{i=1}^{\lceil2/a\rceil}x_i>\sum_{i=1}^{\lceil2/a\rceil}a=a\lceil2/a\rceil\ge2$ for any sequence $x_i$ in $B_a$, contradicting the requirements on $B$.

Define the function $f:B\rightarrow\mathbb{N}$ as $f(a)=\left|B_a\right|$.

Homework: If you can show that $f$ is one-to-one then you can conclude that $|B|\le|\mathbb{N}|$. That is, $B$ is either finite or countable.

Credit goes to Acccumulation for the outline of this proof.

• What if $a =$ sup$B$? Then $B_a$ is the empty set. If $B_a \equiv \{b \in B: a \leq b \}$, then the sum of any $\lceil r/a \rceil$ for $r > 2$ elements of $B_a$ would exceed 2. Jul 18 '19 at 23:08


Converse of Uniqueness of Universal Property of Tensor Products?

In Atiyah Macdonald, for a commutative and unital ring $A$ the tensor product of $A$-modules, $M,N$ is defined by the usual universal property:

A pair $(T,g)$ with $T$ an $A$-module and $g$ an $A$-bilinear map $g\colon M \times N \to T$ such that for any $A$-module $P$ with an $A$-bilinear map $f\colon M \times N \to P$ there exists a unique $A$-module homomorphism $h\colon T \to P$ such that $h \circ g = f$.

And then, as usually goes with universal properties:

Moreover, if $(T,g), (T',g')$ are any two pairs satisfying this condition, then there is a unique isomorphism $j \colon T \to T'$ such that $j \circ g = g'$

My question is, in the second highlighted selection, is the converse true? If I have already established the existence of the usual tensor product, $M \otimes_A N$, via quotient of free module, and I encounter some other pair $(T', g')$ and a unique isomorphism $j: T \to T'$ such that $j \circ g = g'$, can I conclude that $T'$ also satisfies the universal property defining the tensor product, thus I can regard both $T$ and $T'$ as the tensor product of this $M$ and $N$?

I believe I proved that I can indeed do this, but I need reassurance because I have overlooked small details with tensor products before, and don't want to make that mistake again. My proof was as follows:

Suppose $(T,g)$ satisfies the universal property and $(T',g')$ is a pair where $T'$ is an $A$-mod and $g'$ an $A$-bilinear map $g' \colon M \times N \to T'$. Suppose $j$ is the unique isomorphism $j\colon T \to T'$ such that $j \circ g = g'$, or $g = j^{-1} \circ g'$. Suppose $P$ is any $A$-mod with an $A$-bilinear map $f\colon M \times N \to P$. We wish to show there exists a unique $A$-module homomorphism $\phi\colon T' \to P$ such that $\phi \circ g' = f$.

Since $(T,g)$ already satisfies the property by hypothesis, we know there exists a unique $A$-module homomorphism $\varphi \colon T \to P$ such that $\varphi \circ g = f$. So define the map $\phi \colon T' \to P$ by $\varphi \circ j^{-1}$. Then $\phi \circ g' = \varphi \circ j^{-1} \circ g' = \varphi \circ g = f$. So the diagram commutes as desired and the map $\phi$ is defined as the composition of two unique maps so is unique as well, thus $(T',g')$ satisfies the universal property.

Sorry that got a little (unnecessarily) complicated, I don't know how to draw diagrams on here, which really makes everything easier. As an aside, I feel like this probably is true and Atiyah & Macdonald didn't mention it in the text because they deemed it trivial.

• I think this is the first time I've ever seen someone use $\phi$ and $\varphi$ as distinct variable names at the same time. – Eric Wofsey Mar 12 '18 at 6:39
• I do it all the time! – Prince M Mar 12 '18 at 15:08

This is correct, although your argument for uniqueness of $\phi$ is not very clear: you chose to define it as a composition with certain maps that are unique, but how do you know you couldn't get a $\phi'$ that works and is not given by those compositions? What you want to say is that if $\phi'$ makes the diagram commute for $(T',g')$, then the map $\varphi'=\phi'\circ j$ would make the diagram commute for $(T,g)$ by just swapping the roles of $(T,g)$ and $(T',g')$ in your argument. Therefore by uniqueness of $\varphi$, $\varphi=\varphi'$, and so $\phi'=\varphi'\circ j^{-1}=\varphi\circ j^{-1}=\phi$.
Intuitively, what's going on here is that the isomorphism $j$ says that $(T,g)$ and $(T',g')$ have exactly the same structure (just the elements of $T$ have to be renamed via $j$ to get $T'$). So any property of $(T,g)$ (which is defined using only the module structure on $T$ together with the map $g$) will also be true of $(T',g')$. In particular, this applies to the universal property of the tensor product.
• Ok, thanks. One last question I had was, I just now wrote the whole argument out to ensure I comprehend the entirety of it and I cannot identify where the uniqueness (w/ respect to commuting diagrams) of the isomorphism j is invoked? I see plainly that this theorem fails if it is not unique, because there will be at least 2 distinct ways to construct the map $/Phi$, but I can’t seem to identify, where in the uniqueness argument, we actually invoke the assumption that j is unique? – Prince M Mar 12 '18 at 22:16
• You don't need uniqueness of $j$, just its existence. If $j$ exists, it turns out to automatically be unique. – Eric Wofsey Mar 12 '18 at 22:17


# the number of arrangements of N players around a round table, where each player can sit on one of 3 contiguous chairs

Consider the fact that each player can either sit on their desired chair or on the neighbouring chair. Two configurations are distinct if at least one person is sitting in another chair. My attempt For example, if there are 4 players sitting around a circular table there can be 9 distinct arrangements.

1. F1,F2,F3,F4
2. F2,F1,F3,F4
3. F2,F1,F4,F3
4. F4,F2,F3,F1
5. F1,F3,F2,F4
6. F1,F2,F4,F3
7. F4,F1,F2,F3
8. F2,F3,F4,F1
9. F4,F3,F2,F1

Now, I am stuck here. How can calculate this and what about larger values of N such as 50?

I tried using vectors and pushing back every element and do the reverse operators and swap elements but I am not sure whether this is correct or not.

• Do you want to enumerate the arrangements or simply get the number? What have you tried? Jan 4, 2021 at 20:34
• Can you credit the source where you originally encountered this task?
– D.W.
Jan 4, 2021 at 20:36
• @D.W. No I cant this is a competetive programming question that was asked in a contest Jan 4, 2021 at 21:59
• Is the contest currently ongoing? When was the deadline for the contest? What prevents you from providing a link and/or reference to the programming contest? Sometimes helping us see the original statement of the question helps us understand what you are asking better. Also, please don't leave clarifications in the comments (such as regarding enumerating vs counting): instead, edit the question to clarify it.
– D.W.
Jan 4, 2021 at 22:08
• Please edit the question to make it clear whether the desired chairs of different players can be the same or not. Jan 6, 2021 at 6:09

Consider the variant of the problem in which the people are arranged in a segment instead of circle and let $$S(n)$$ be the number feasible arrangements for $$n$$ people.

Now lets go back to your original problem, and let's name $$C(n)$$ the number of feasible arrangements of $$n$$ people.

Clearly $$C(0)=C(1)=1$$ and $$C(2)=2$$, so we will henceforth suppose that $$n \ge 3$$.

Let's name the people $$p_1, \dots, p_n$$ where the assigned position of $$p_i$$ is $$i$$. If $$p_1$$ is sitting in position 1 then the number of possible arrangements of $$p_2, \dots, p_n$$ is exactly $$S(n-1)$$. Otherwise, $$p_1$$ is sitting either in position $$2$$ or in position $$n \neq 2$$. We will only consider the former case since the latter one is symmetric. Clearly $$p_2$$ cannot sit in position $$2$$, so he/she must either sit in position $$1$$ or in position $$3$$. If $$p_2$$ is sitting in position $$1$$, then the number of possible arrangements of $$p_3, \dots, p_n$$ is exactly $$S(n-2)$$. Otherwise, $$p_2$$ must be sitting in position $$3$$, which means that $$p_3$$ must be sitting in position $$4$$ (since position $$2$$ and $$3$$ are occupied) and, in general, $$p_i$$ must be sitting in position $$(i \bmod n) + 1$$. Since this completely determines everyone's position, this case only contributes $$1$$ to the total number of configurations.

To summarize, we have that: $$C(n) = S(n-1) + 2(S(n-2)+1) = S(n-1) + 2S(n-2) + 2.$$

We are left with figuring out what $$S(n)$$ is. Clearly $$S(0) = S(1) = 1$$, so we consider $$n \ge 2$$. In this case $$p_1$$ can only sit in position $$1$$ or $$2$$. If $$p_1$$ is sitting in position $$1$$ then there are $$S(n-1)$$ possible arrangements of $$p_2, \dots, p_n$$. If $$p_1$$ is sitting in position $$2$$, then $$p_2$$ must be sitting in position $$1$$ (as it is the only other person that can sit there) and there are $$S(n-2)$$ possible arrangements for $$p_3, \dots, p_n$$. We hence have: $$S(n) = \begin{cases} 1 & \mbox{if } n \in \{0,1\} \\ S(n-1) + S(n-2) & \mbox{otherwise} \end{cases} = \mathcal{F}_{n+1},$$ where $$\mathcal{F}_{i}$$ denotes the $$i$$-th Fibonacci number. Substituting back, we obtain:

$$C(n) = \begin{cases} 1 & \mbox{if } n \in \{0,1\} \\ 2 & \mbox{if } n = 2 \\ \mathcal{F}_n + 2 \mathcal{F}_{n-1} + 2 & \mbox{otherwise} \end{cases}.$$

• we can also say that C(n) = F_(n+1) + F_(n-1) + 2 since C(n) = S(n) + S(n-2) + 2 Jan 6, 2021 at 13:51
• Sure, they are equivalent :) Jan 6, 2021 at 15:23


# Math Help - [HELP!] Surface Integrals

1. ## [SOLVED] Surface Integrals

I don't know how to use the MATH code here...and I'm running out of time for reviewing for finals, so forgive me if it isn't clear for you... >.<

OK...here's my question:

DoubleInt(s) (z+x^2y)dS, S is the part of the cylinder y^2 + z^2 = 1 that lies between the planes x = 0 and x = 3 in the first octant.

I know that maybe...I should use
y = rcos(theta) = cos(theta)
z = rsin(theta) = sin(theta)
x = x
and find r_(theta) x r_(z) = < cos(theta), sin(theta), o> (I'm not sure if this way is the right path...)
and find the magnitude of |r_(theta) x r_(z)| = 1

I don't know what to do next, which formula to use (there were two...) and what boundaries? How can I get the numbers for those boundaries?

Can anyone solve this question for me please? I know the final answer, which is 12.

2. Hi. By definition:

$S=\mathop\int\int\limits_{\hspace{-15pt}S} g(x,y,z)dS=\mathop\int\int\limits_{\hspace{-15pt}R} g(x,y,f(x,y))\sqrt{f_x^2+f_y^2+1} dA$

So you're integrating the function $g(x,y,z)=z+x^2 y$ over the surface $f(x,y)=z=\sqrt{1-y^2}$ between the planes x=0 and x=3 in the first quadrant. That's just the top one-quarter of the cylinder along the x-axis shown in red below. Now, the region in the x-y plane below that part, since the cylinder has a radius of one, would be 0 to 3 in the x-direction and 0 to 1 in the y-direction. Now, turn the crank:

$\int_0^3\int_0^1 (\sqrt{1-y^2}+x^2y)\sqrt{f_x^2+f_y^2+1}dydx$

3. Originally Posted by violet8804
I don't know how to use the MATH code here...and I'm running out of time for reviewing for finals, so forgive me if it isn't clear for you... >.<

OK...here's my question:

DoubleInt(s) (z+x^2y)dS, S is the part of the cylinder y^2 + z^2 = 1 that lies between the planes x = 0 and x = 3 in the first octant.

I know that maybe...I should use
y = rcos(theta) = cos(theta)
z = rsin(theta) = sin(theta)
x = x
and find r_(theta) x r_(z) = < cos(theta), sin(theta), o> (I'm not sure if this way is the right path...)
and find the magnitude of |r_(theta) x r_(z)| = 1

I don't know what to do next, which formula to use (there were two...) and what boundaries? How can I get the numbers for those boundaries?

Can anyone solve this question for me please? I know the final answer, which is 12.

Here's a general concept: if you write the surface as $\vec{r}(u,v)= x(u,v)\vec{i}+ y(u,v)\vec{j}+ z(u,v)\vec{k}$, then the two derivatives, $\vec{r}_u= x_u \vec{i}+ y_u\vec{j}+ z_u\vec{k}$ and $\vec{r}_v= x_v\vec{i}+ y_v\vec{j}+ z_v\vec{k}$ are tangent to the surface and their cross product (called the "fundamental vector product" of the surface), $\vec{r}_u\times\vec{r_v}$, is perpendicular to the surface and its length gives the "differential of surface area": $||\vec{r}_u\times\vec{r}_v||dudv$.

Yes, you can use $y= cos(\theta)$, $z= sin(\theta)$, x= x with $\theta$ and x as parameters u and v. That is, $\vec{r}= x\vec{i}+ cos(\theta)\vec{j}+ sin(\theta)\vec{k}$ so $\vec{r}_x= \vec{i}$ and $\vec{r}_\theta= -sin(\theta)\vec{j}+ cos(\theta)\vec{k}$ so that the "fundamental vector product" is

$\vec{r}_x\times\vec{r}_\theta= -cos(\theta)\vec{i}- sin(\theta)\vec{k}$.

Its length is, of course, 1 so $dV= dxd\theta$. The function to be integrated is $z+ x^2y= sin(\theta)+ x^2cos(\theta)$. In the first octant, both y and z are positive so $\theta$ goes from 0 to $\pi/2$ and, of course, x goes from 0 to 1. The integral is

$\int_{x=0}^1\int_{\theta= 0}^{\pi/2} sin(\theta)+ x^2 cos(\theta) dxd\theta$.

By the way, if you click on a mathematical expression in any post, you can see the LaTex code used.

4. Originally Posted by HallsofIvy
Here's a general concept: if you write the surface as $\vec{r}(u,v)= x(u,v)\vec{i}+ y(u,v)\vec{j}+ z(u,v)\vec{k}$, then the two derivatives, $\vec{r}_u= x_u \vec{i}+ y_u\vec{j}+ z_u\vec{k}$ and $\vec{r}_v= x_v\vec{i}+ y_v\vec{j}+ z_v\vec{k}$ are tangent to the surface and their cross product (called the "fundamental vector product" of the surface), $\vec{r}_u\times\vec{r_v}$, is perpendicular to the surface and its length gives the "differential of surface area": $||\vec{r}_u\times\vec{r}_v||dudv$.

Yes, you can use $y= cos(\theta)$, $z= sin(\theta)$, x= x with $\theta$ and x as parameters u and v. That is, $\vec{r}= x\vec{i}+ cos(\theta)\vec{j}+ sin(\theta)\vec{k}$ so $\vec{r}_x= \vec{i}$ and $\vec{r}_\theta= -sin(\theta)\vec{j}+ cos(\theta)\vec{k}$ so that the "fundamental vector product" is

$\vec{r}_x\times\vec{r}_\theta= -cos(\theta)\vec{i}- sin(\theta)\vec{k}$.

Its length is, of course, 1 so $dV= dxd\theta$. The function to be integrated is $z+ x^2y= sin(\theta)+ x^2cos(\theta)$. In the first octant, both y and z are positive so $\theta$ goes from 0 to $\pi/2$ and, of course, x goes from 0 to 1. The integral is

$\int_{x=0}^1\int_{\theta= 0}^{\pi/2} sin(\theta)+ x^2 cos(\theta) dxd\theta$.

By the way, if you click on a mathematical expression in any post, you can see the LaTex code used.

Thank you!
And, by the way...
Is the (theta) always from 0 to 2*Pi if it's in the 1st octant (after change to polar coordinates)?
Also, can you please teach me when to use which of the two formula, is there a trick to see from the question when to use which formula?
I always get confused which one to use, they are all the homework questions, and i got partial solutions (the library only have the older version of the solution manual...); so, when I do the question myself, and checked from the solution manual, it used a different formula (or different method) to solve the surface integral...I'm so confused T_T


# Prove $\ \forall n \ge 2, \ 2^{n} + 3^{n} < 4^{n}$

Question:

Prove $\ \forall n \ge 2, \ 2^{n} + 3^{n} < 4^{n}$

My attempt:

Base case is trivial.

Suppose $\ n \ge 2$ and $\ 2^{n} + 3^{n} < 4^{n}$

Then,

$2^{n+1} + 3^{n+1} = 2.2^{n} + 3.3^{n} = 2.2^{n} + 2.3^{n} + 3^{n} = 2(2^{n} + 3^{n}) + 3^{n} <2(4^{n}) + 3^{n}$, by I.H.

I am stuck here. how do I show that this expression is $< 4^{n+1}$?

• Hints: Is $3^n<4^n$? Is $3(4^n)<4(4^n)$? – Michael Burr Sep 16 '17 at 20:25
• Another proof could use that the equivalent inequality $(2/4)^n+(3/4)^n<1$ after dividing both sides by $4^n$, where $4^n>0$, holds because it holds for $n=2$ and $(2/4)^n$ and $(3/4)^n$ are both strictly decreasing. – user236182 Sep 16 '17 at 20:32

You can say $$2\cdot 2^n + 3\cdot 3^n < 4\cdot 2^n + 4\cdot 3^n = 4(2^n+3^n) < 4\cdot 4^n = 4^{n+1}.$$
multiplying $$2^n+3^n<4^n$$ by $$4^n$$ we get $$2^n\cdot 2^{2n}+3^n\cdot 2^{2n}<4^{n+1}$$ and we have $$2^n\cdot 2<2^{3n}$$ since $$1<2^{2n-1}$$ for $n\geq 2$ and $$3^n\cdot 3<3^n\cdot 2^{2n}$$ since $$3<2^{2n}$$ therefore we have $$2^{n+1}+3^{n+1}<2^n\cdot 2^{2n}+3^n\cdot 2^{2n}<4^{n+1}$$
Hint:   for $\,0 \lt a \lt 1\,$ the sequence $\,a^n\,$ is decreasing with $\,n\,$ since $\,a^{n+1} = a \cdot a^n \lt 1 \cdot a^n\,$, so:
$$\left(\frac{2}{4}\right)^n+\left(\frac{3}{4}\right)^n \le \left(\frac{2}{4}\right)^2+\left(\frac{3}{4}\right)^2 = \frac{13}{16} \lt 1 \quad\quad\text{for}\;\; \forall n \ge 2$$


# Minimal specification of isometry in terms of norm preservation

Let $V,W$ be $n$-dimensional (real) inner product spaces, and let $T:V \to W$ be a linear map.

Let $v_1,...,v_n$ be a basis of $V$. It is easy to see that if $|T(v)|_W=|v|_V$ for every $v \in \{v_1,...,v_n,v_1+v_2,v_1+v_3,...,v_{n-1}+v_n\}$, then $T$ is an isometry (a proof is provided below).

In other words, after choosing wisely $k(n):=\frac{n(n+1)}{2}$ vectors, it is enough to verify $T$ preserves the norms of these special vectors, in order to conclude it's an isometry.

Question: Is there no way to choose less than $k(n)$ vectors, in such a way that every linear map which preserves their norms is an isometry?

I believe we cannot choose less vectors. I have some "convincing evidence" for the cases $n=1,2,3$ (see below), but I am not sure how to give a rigorous argument.

Note that a "wise choice" of vectors does not have to be of the form of some vectors, and linear combinations of them (I do feel this it the most efficient method, but I don't see how to prove this). Even if we prove that this is the case, than we need to show we cannot do better than to work with only orthonormal bases.

The partial "evidence":

$n=1: k=1$. Obvious

$n=2: k=3$. Take $V=W=\mathbb{R}^n$ with its standard inner product. Then, $T(e_1)=e_1, T(e_2)=\frac{e_1+e_2}{\sqrt 2}$ is a counter example.

$n=3: k=6$. Then any matrix of the form $$\begin{pmatrix} c & s & x \\ -s & c & y \\ 0 & 0 & z \\\end{pmatrix}$$ where $c^2+s^2=1,x^2+y^2+z^2=1, sx+cy=0$ preserves the norms $e_1,e_2,e_1+e_2,e_3,e_2+e_3$ but it's an isometry only if $|z|=1,x=y=0$.

Proof that $k(n)=\frac{n(n+1)}{2}$ vectors are enough:

Noting that $$\langle u,v \rangle = \frac{1}{2}(|u+v|^2 - |u|^2 - |v|^2) ,$$ we obtain

$$\langle Tv_i,Tv_j \rangle = \frac{1}{2}(|Tv_i+Tv_j|^2 - |Tv_i|^2 - |Tv_j|^2) = \frac{1}{2}(|T(v_i+v_j)|^2 - |v_i|^2 - |v_j|^2)$$ $$= \frac{1}{2}(|v_i+v_j|^2 - |v_i|^2 - |v_j|^2) = \langle v_i,v_j \rangle,$$

thus $T$ is an isometry.

• I think there is not a way to choose less. Since it must preserve the scalar product and then all products $<v_i,v_j>$ of the basis must be preserved. By symmetry they are exactly the number you proposed. – Harnak Dec 25 '16 at 11:02
• @Harnak, please make your comment into an answer, I'd like to +1 it. – Andreas Caranti Dec 25 '16 at 11:09
• @Harnak I am not sure I am convinced by your argument. Can you please elaborate? (I also think there is no way to choose less). – Asaf Shachar Dec 25 '16 at 11:13

Let $f:\mathbb R^n\to V$ and $g:W\to\mathbb R^n$ be any two linear isometries. Then $T$ is an isometry if and only if $g\circ T\circ f$ is an isometry. So, we may assume without loss of generality that $V=W=\mathbb R^n$ equipped with the Euclidean inner product.

Let $v_1,\ldots,v_k\in\mathbb R^n$ be $k<\frac12n(n+1)$ arbitrarily chosen vectors. It suffices to exhibit the existence of a non-isometric linear transformation $T$ on $\mathbb R^n$ that preserves the norm of each $v_j$. Consider the system of homogeneous linear equations $$v_j^\top Av_j=0,\quad j=1,\ldots,k,\tag{1}$$ where the $n^2$ entries of $A\in M_n(\mathbb R)$ are unknown. Since the subspace of all $n\times n$ skew-symmetric matrices has dimension $\frac12n(n-1)<n^2-k$, the system $(1)$ must admit a nontrivial solution $A$ that is not skew-symmetric. However, if $A$ is a solution, so is $A+A^\top$. Therefore, $(1)$ admits a nontrivial symmetric solution $A$.

Let $P=I+\varepsilon A$, where $\varepsilon>0$ is sufficiently small. Then $P$ is positive definite. Define $Tx=\sqrt{P}x$. Then $T$ is not an isometry because $\sqrt{P}$ is not real orthogonal. However, for each $j$ we have $$\|Tv_j\|^2=v_j^\top Pv_j=v_j^\top(I+\varepsilon A)v_j=v_j^\top v_j=\|v_j\|^2.$$

• Wow! your solution is great and provides exactly what I was interested in, thanks. By the way, I am curious how did you think about using symmetric matrices. (I guess you started from considering perturbations of the identity, but then noticed that if you do not take a square root, the constraint you get is a quadratic equation, not linear, hence the necessity to consider roots...). – Asaf Shachar Dec 28 '16 at 12:53
• @AsafShachar Once you recognise that the problem boils down to finding a positive semidefinite matrix $P\ne I$ such that $v_j^\top Pv_j=v_j^\top v_j$ for each $j$, it's natural to consider symmetric matrices, because $I-P$ is symmetric. – user1551 Dec 28 '16 at 13:27
• I agree, but it was not immediate for me to consider the "square root" trick. (i.e I thought of starting with $Tx=Px$ where $P=I+\epsilon A$, but then the equation on $P$ is quadratic...). Anyway, your explanation is very reasonable, thanks again. – Asaf Shachar Dec 28 '16 at 16:52

I'll try to elaborate on my idea in the comment. Preserving the scalar product means that the two symmetric bilinear forms must coincide: $$(x,y) \mapsto \langle x,y \rangle$$ $$(x,y) \mapsto \langle Tx,Ty \rangle$$ This is equivalent to saying that their matrices must coincide. But a symmetric matrix has $\frac{n(n+1)}{2}$ degrees of freedom.
This means, once we've chosen the basis in $V$ we must choose the products $\langle v_i,v_j \rangle$ for $i \geq j$.

• Is it enough? Yes, because we've chosen the coefficients of the matrix relative to its canonic basis (here I'm taking about the basis of matrices which have $1$ in one component and $0$ in the others, but only for $i \geq j$ since the matrix is symmetric).
• Can we take less? No, because the symmetric matrices space has dimension $\frac{n(n+1)}{2}$ as we've said.

How does this relate to our question? Choosing a basis for $V$ and then such products is equivalent to choosing the list of vectors you proposed (along with their norms).
(I.e. Choosing a bilinear form is equivalent to choosing the quadratic forum associated to it, which in the case of a scalar product is the norm)

• Thanks for your elaborate answer. However, I must say I am not entirely convinced by your argument. Indeed, I am also thinking that we cannot choose less vectors, and your observation that a (symmetric) bilinear form is determined by $\frac{n(n+1)}{2}$ vectors is also appealing and looks connected to this issue somehow. In spite all of that I am still not convinced. Suppose we know $\langle v_i,v_j \rangle = \langle Tv_i,Tv_j \rangle$ for all $i \le j$ except for a single pair $(i^*,j^*)$... – Asaf Shachar Dec 26 '16 at 15:34
• I would like to see a more explicit demonstration for how to build such a map $T$ which is not an isometry, i.e does not satisfy $\langle v_i,v_j \rangle = \langle Tv_i,Tv_j \rangle$ for $(i,j)=(i^*,j^*)$. I am not sure this follows so clearly from your "heuristic" argument. – Asaf Shachar Dec 26 '16 at 15:34
• So, you want to prove that there exists a map $T$ that preserves all those couples except for one? – Harnak Dec 26 '16 at 16:49
• Yes, for a start. My intention in the question was to show that no matter how cleverly you choose $k < \frac{n(n+1)}{2}$ vectors, and require they will be mapped to vectors of the same norm, you will be able to do this with a map which is not an isometry. However, in some sense this will only show the scheme of choosing basis vectors (and certain linear combinations of them) cannot be successful with less vectors, we also need to show we cannot do better by any choice. – Asaf Shachar Dec 26 '16 at 19:50


D

#### What is the probability of this problem?

63 viewed last edited 2 years ago
Anshul Malik
1

A and B roll a dice each. A wins if his dice number is greater than B. B wins if his dice number is greater than or equal to A.

If A gets a 1, then B will win for sure. So B makes up a rule that A will play the same game again if A rolls a 1 in the first throw. The winner of the second game (if it reaches that stage) will be the final winner even if A rolls a 1 again.

What is the probability that A will win this game?

Mahesh Godavarti
3

I think the problem statement can be worded better for easier understanding. However, I think I got it.

Probability of A winning = 1 - Probability of B winning.

Probability of B winning =

Probability of B throwing an equal or greater than when A throws a number greater than 1 in the first throw +

Probability that A throws a 1 in the first throw X Probability of B getting an equal or higher number in the second throw than A =

\frac{1}{6 } \times (\frac{5}{6} + \frac{4}{6} + \frac{3}{6} + \frac{2}{6} + \frac{1}{6}) + \frac{1}{6} \times \frac{1}{6} \times (\frac{6}{6} + \frac{5}{6} + \frac{4}{6} + \frac{3}{6} + \frac{2}{6} + \frac{1}{6}) =

\frac{1}{6} \times \frac{1}{6} \times 5 \times 6 \times \frac{1}{2} + \frac{1}{6} \times \frac{1}{6} \times \frac{1}{6} \times 6 \times 7 \times 1/2 = 1/6 \times 1/6 \times 1/2 \times (30 + 7) = \frac{37}{72}

Therefore, probability of A winning = 35/72.

Earlier, if B had not changed the rule then the probability of B winning would be

1/6 \times (6/6 + 5/6 + 4/6 + 3/6 + 2/6 + 1/6) = 1/6 \times 1/6 \times 6 \times 7 \times 1/2 = 7/12 .

And the probability of A winning would be 5/12.

Essentially, B leveled the playing field a little bit by changing the rules of the game.

Vivekanand Vellanki
0
It would be good to explain how the probability of B throwing a number greater than or equal to A is determined.
Anshul Malik
0
But the cases in which A rolls a 1 in the first roll should not be counted as sample cases right? Also, the probability that the game is decided in the first roll is 5/6? If I'm understanding conditional probability correctly, then this should also be factored in right?
Mahesh Godavarti
0
I just swt up the sample space and added up all the cases that end up in B's victory. You could set it up as a conditional as well, with A rolling a 1 or not rolling a 1. Or the game finishing in one throw or finishing in two throws, you will get the same answer. In fact, I will set it up and show you that it is the same. Look for my second answer.
Mahesh Godavarti
0

Let's do it another way. Let's condition it first on the event that the game will finish in one throw or two throws.

Then P(B wins) = P(one throw) P(B wins | one throw) + P(two throws) P(B wins | two throws).

P(one throw) = P(A throws a number other than 1) = 5/6

P(two throws) = P(A throws a 1) = 1/6.

P(B wins | one throw) = P(A throws a 2 | A threw a number from 2 to 5) X P(B throws 2 or higher) + P(A throws a 3 | A threw a number from 2 to 5) X P(B throws 3 or higher) + and so on till A throws a 6 = 1/5 * 5/6 + 1/5 * 4/6 + 1/5 * 3/6 + 1/5 *2/6 + 1/5 * 1/6.

Therefore, P(one throw) P (B wins | one throw) = 5/6 * [1/5 * 5/6 + 1/5 * 4/6 + 1/5 *3/6 + 1/5 *2/6 + 1/5 * 1/6 ] = 1/6 * 5/6 + 1/6 *4/6 + 1/6 * 3/6 + 1/6 * 2/6 + 1/6 *1/6 = 1/6 * [5/6 + 4/6 + 3/6 + 2/6 + 1/6].

P(B wins | two throws) = P(A throws a 1 in the second throw | A threw a number from 2 to 5 in the first throw) X P(B throws 1 or higher in the second throw) + P(A throws a 2 in the second throw | A threw a number from 2 to 5 in the first throw) X P(B throws 2 or higher in the second throw) + and so on till A throws a 6 in the second throw

Since, the throws are independent what A throws in the second is independent of what is thrown in the first. Therefore, the above expression is the same as:

P(B wins | two throws) = P(A throws a 1 in the second throw) X P(B throws 1 or higher in the second throw) + P(A throws a 2 in the second throw) X P(B throws 2 or higher in the second throw) + and so on till A throws a 6 in the second throw = 1/6 * 6/6 + 1/6 *5/6 + 1/6 * 4/6 + 1/6 * 3/6 + 1/6 * 2/6 + 1/6 * 1/6

Therefore, P (two throws) P(B wins | two throws) = 1/6 * [1/6 * 6/6 + 1/6 *5/6 + 1/6 * 4/6 + 1/6 * 3/6 + 1/6 * 2/6 + 1/6 * 1/6] = 1/6 * 1/6 * [6/6 + 5/6 + 4/6 + 3/6 + 2/6 + 1/6]

Therefore, P(B wins) = 1/6 * [5/6 + 4/6 + 3/6 + 2/6 + 1/6] + 1/6 * 1/6 * [6/6 + 5/6 + 4/6 + 3/6 + 2/6 + 1/6].

Which is the same as what we had in the other answer.


# Using induction, prove that $\sum_{k=1}^n\frac 1 {(2k-1)(2k+1)}= \frac 12-\frac 1 {4n+2}$ when $n$ is in $\mathbb{N}$

I can prove the base case and get that $1/3=1/3$, but i can't get any further with the $n+1$ case. Can someone help me?

I was told to conjecture a formula for the sum $$\frac{1}{3} + \frac{1}{{3 \cdot 5}} + \cdots + \frac{1}{{\left( {2n - 1} \right)\left( {2n + 1} \right)}}$$ I thought I figured out that this sum was equal to $$\frac{1}{2} { - \frac{1}{{4n + 2}}}$$ but I'm starting to think I'm wrong about that. After we have the formula, we were told to prove our conjecture using induction.

-
I really can't understand what is the identity the you want to prove. Could you try to typeset it (better if in LaTeX), with all the necessary parentheses, please? –  Andrea Orta Sep 18 '12 at 18:25
Are you sure you have the right expression? For $n = 2$ you get: $\frac{1}{2 \cdot 6} = \frac{1}{2} - \frac{1}{10}$ which is clearly untrue. –  Feanor Sep 18 '12 at 18:25
If $n=1$ you are dividing by $0$. Also please check your parentheses: one extra left on the left side, it is not clear whether $(2n+2)$ should be in the numerator, and you must mean $1/(4n+2)$, not $(1/4)n+2$ or $1/(4n)+2$ on the right. \frac is your friend in this regard. –  Ross Millikan Sep 18 '12 at 18:25
Also, unless there was supposed to be some sum involved, there is no need for induction. Just multiply everything out so as to get rid of fractions ;) –  Feanor Sep 18 '12 at 18:27
Based on your added comment, you want the left to be $\sum_{i=1}^n \frac 1{2i-1}\frac 1{2i+1}=\frac 12 - \frac 1{4n+2}$. Note the $1$'s, not $2$'s and the sum on the left. –  Ross Millikan Sep 18 '12 at 18:37

Hint $\$ The sum telescopes since for $\rm\:f(k) = 1/(4k-2)\:$ we have

$$\rm f(k+1)-f(k)\ =\ \frac{1}{4k+2} - \frac{1}{4k-2}\ =\ -\frac{1}{(2k-1)(2k+1)}$$

so an inductive proof is a special case of the inductive proof of the closed form for a telescopic sum:

$$\rm\sum_{k=1}^n f(k\!+\!1)-f(k) = - f(1) + \color{#C00}{f(2) - f(2) + \cdots + f(n)-f(n)} + f(n\!+\!1)\, =\, f(n\!+\!1)-f(1)$$

But it is easy to turn the above ellipses into a rigorous inductive proof. Then your problem is simply a corollary of this general telescopy lemma, for the special value of $\rm\:f(k)\:$ given above.

The advantage of proving it this way is that - with no extra effort - you now have a general lemma that works to prove (by induction!) all summation identities of this form. Note that even though the induction has been abstracted out into a proof of a more general telescopy lemma, a proof invoking the telescopy lemma still counts as a proof by induction. The induction simply has been encapsulated in the proof of the lemma, which need not be repeated inline every time it is invoked. DivideAbstract and conquer - once you've seen one telescopic induction proof you've seen them all!

You can find more examples and further discussion in my prior posts on telescopy.

-
@Peter Telescopy can be viewed as a form of induction specifically tailored for computing certain sums and products. –  Bill Dubuque Sep 18 '12 at 19:00
Yes, I was just being silly, Bill! –  Pedro Tamaroff Sep 18 '12 at 19:03

What you want to prove, apparently, is that

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

As you say, the base case, $n=1$ is true. Suppose true for $n$, and analyze $n+1$. We get

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

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

By the inductive hypothesis, this is, $$\frac 1 2 - \frac 1 {2(2n+1)}+\frac{1}{(2(n+1)-1)(2(n+1)+1)}=\frac 1 2 - \frac 1 {2(2(n+1)+1)}$$

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

Multiply through ${(2n + 1)(2n + 3)}$ to get

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

In the end, you get

$$- 2n - 3 + 2 = - 2n - 1$$ $$- 2n -1 = - 2n - 1$$

which is true, so the inductive step is complete, and the theorem is proven.

-

Hint: This is a telescoping series. Note that $\frac 1{2i-1}\frac 1{2i+1}=\frac 12 \left(\frac 1{2i-1}-\frac 1{2i+1}\right)$ so neighboring terms cancel.

-
While this is the easiest approach, is not solving the problem the way the problem asks ;) –  N. S. Sep 18 '12 at 18:43
@N.S.: I think it is a step toward the induction. –  Ross Millikan Sep 18 '12 at 18:45
@RossMilikan he already guessed the right result, so he has a very easy induction problem, where he doesn't really need telescoping. –  N. S. Sep 18 '12 at 18:49
@N.S. Telescopy does use induction - it's simply encapsulated (as a lemma) in the general closed form for a telescopic sum (whose inductive proof is easier in the abstract than in any specific case). So the natural way to prove this is to prove by induction the closed form for a telescopic sum, then specialize it to the case at hand - see my answer. Then, later, one can reuse the telescopy lemma to quickly tackle all such problems. –  Bill Dubuque Sep 18 '12 at 19:09
@BillDubuque True, and this is the easiest way for us... But the problem asks the student to conjecture a closed formula, and prove it by induction. If you telescope it, you already get the answer... Is like the problem of calculating $\int_0^1 x^2 dx$... We typically expect the students to solve it the easy way, but if the Question explicitly asks to evaluate it using a Riemann sum, the easy solution is not good anymore... –  N. S. Sep 18 '12 at 20:53
show 1 more comment

Saw this type of problem before.

You need to find a closed for for

$$\frac{1}{1 \cdot 3} + \frac{1}{3 \cdot 5}+...+\frac{1}{(2n-1)(1n+2)}$$

and then prove it by induction.

Your guess looks right, now you can do the induction:

$$\frac{1}{1 \cdot 3} + \frac{1}{3 \cdot 5}+...+\frac{1}{(2n-1)(1n+2)} =\frac{1}{2}-\frac{1}{2n+1} \,.$$

Alternately, you can use partial fraction decomposition to find a simple formula for $$\frac{1}{(2k-1)(2k+1)} \,,$$ and then get a telescopic sum. There is no need to prove this partial fraction decomposition by induction, and this approach is not really a direct induction proof.

-


# When does the two cars meet

At 10:30 am car $A$ starts from point $A$ towards point $B$ at the speed of $65$ km/hr, at the same time another car left from point $B$ towards point $A$ at the speed of $70$ km/hr, the total distance between two points is $810$ km, at what time does these two cars meet ?

This is what I have tried,

$t_1 = \frac{810}{65} \,$ km/hr $= 12.46 \,$hr
$t_2 = \frac{810}{70} \,$ km/hr $= 11.57\,$ hr
$t_1-t_2 = 0.89 \,$ hr
$t_1-t_2 = 0.89\cdot 60 = 53.4 \,$ minutes

but this couldn't be the answer because how could these two cars could meet after $53.4$ minutes ?

@Joe, when they start they are 810km apart; after 1 hour the person leaving from point A would have traveled 65km, so if the other person had not left from point B, then the distance between them would be 810-65=745km. But the other person also helps close the distance between them by traveling 70km in the 1st hour from point B towards A, so the distance between them is 810-(65+75)=810-135=675km. So they are effectively subtracting 135km worth of distance per hour from the original distance between them.

So the 1st question you needed to answer was how much distance do they cover together per hour (we just did that), now the next question to answer is how long it takes to cover 810km in total distance at their effective speed.

• it means that if they are covering 135km each our then they would be meet together in 135xP = 810km right ? Where P is the number of hours they will meet after. like 810km/135km/hr = hr6 so, 10:30AM + 6Hours = 4:30PM right ? – Joe Jan 19 '15 at 18:52
• Yes, this is exactly right. – Acemanhattan Jan 19 '15 at 18:56
• But that's what the question was asking. When will they meet. If they were asking when will each cover 810km you would divide 810 by the slower train's speed. – turkeyhundt Jan 19 '15 at 19:00
• Suppose for a second that they each did travel 810km, where would they each end up? Wouldn't they have just traded places with the person who started at A being at B and the person who started at B being at A? In order for that to happen, at some point they would have had to pass each other along the way, and when they passed each other neither would have traveled 810km individually, but the distance between them would be zero. – Acemanhattan Jan 19 '15 at 19:02
• Thanks a lot for great explanation. =) – Joe Jan 19 '15 at 19:03

Hint: Think about how much closer the cars get each hour.

They are approaching each other at an effective speed of 135 km/hr...

• but at what time does these two cars meet ? would that be 135/2 ? – Joe Jan 19 '15 at 18:27
• like 135/2 = 67.5 and then 810/67.5 = 12 ? – Joe Jan 19 '15 at 18:29
• no. it would be how long it would take to travel 810km at a rate of 135km/hr. Because every hour, they get 135km closer to each other. – turkeyhundt Jan 19 '15 at 18:50
• it means that if they are covering 135km each our then they would be meet together in 135xP = 810km right ? Where P is the number of hours they will meet after. like 810km/135km/hr = hr6 so, 10:30AM + 6Hours = 4:30PM right ? – Joe Jan 19 '15 at 18:54
• Yes. very good. – turkeyhundt Jan 19 '15 at 18:59

Hint: The total distance between the two cars is initially $810~\text{km}$. Thus, in order to meet, the combined distance they travel is $810~\text{km}$. Since they are travelling toward each other, they get $65~\text{km} + 70~\text{km} = 135~\text{km}$ closer to each other each hour.

• so then I have two divide 135 by 2 and then divide the answer by 810, like this, 135/2 = 67.5 then 810/67.5 = 12hours right ? so they will meet at 10:30 pm right ? – Joe Jan 19 '15 at 18:48
• No. What you did is compute the time it would take for the average distance travelled by the cars to be $810~\text{km}$, by which time they would have long passed each other. The cars get $135~\text{km}$ closer to each other each hour. You want to reduce the distance between them, which is initially $810~\text{km}$, to $0~\text{km}$. – N. F. Taussig Jan 19 '15 at 18:51
• it means that if they are covering 135km each our then they would be meet together in 135xP = 810km right ? Where P is the number of hours they will meet after. like 810km/135km/hr = hr6 so, 10:30AM + 6Hours = 4:30PM right ? – Joe Jan 19 '15 at 18:53
• That is correct. – N. F. Taussig Jan 19 '15 at 18:54
• They do not have to cover $810~\text{km}$ individually. After six hours, the slower car has travelled $$65~\frac{\text{km}}{\text{h}} \cdot 6~\text{h} = 390~\text{km}$$ so it is now $810~\text{km} - 390~\text{km} = 420~\text{km}$ from where the faster car began. Since the faster car has travelled $$70~\frac{\text{km}}{\text{h}} \cdot 6~\text{h} = 420~\text{km}$$ toward the slower car, they meet at 4:30 pm. Draw a picture. – N. F. Taussig Jan 19 '15 at 19:03


Lucas numbers and fibonacci

This is a question straight from the Applied Combinatorics book.

Suppose that chairs are arranged in a circle. Let $L_n$ count the number of subsets of $n$ chairs which don't contain consecutive chairs. show that $$L_{n+1} = F_n + F_{n+2}.$$

What is meant here? Could some one explain this to me?

• Do you need a proof, or do you have difficulties to understand the statement ? Feb 26, 2015 at 10:35
• What confuses me is that the number of chairs is not given. Feb 26, 2015 at 10:37
• Proof and explanation please. I don't understand what is meant by the question. Feb 26, 2015 at 10:56

If $n$ chairs are arranged in a circle, let $a_n$ be the number of subsets of the chairs that don’t contain consecutive chairs. (I’ll call these good subsets.) Clearly $a_0=1$, $a_1=2$, $a_2=3$, and $a_3=4$, since the empty subset satisfies the condition.

Now suppose that $n\ge 4$, and number the chairs from $1$ to $n$ around the circle. Temporarily remove chair $n$; the circle of remaining chairs has $a_{n-1}$ good subsets, none of which contains both chair $1$ and chair $n-1$. Of course none of these contains chair $n$, either. Moreover, every good subset of the $n$ chairs that does not contain chair $n$ and contains at most one of chairs $1$ and $n-1$ is counted here, so there are $a_{n-1}$ such subsets.

Now we’ll count the good subsets that contain either contain chair $n$ or contain both chair $1$ and chair $n-1$. Start by removing chairs $n-1$ and $n$; the remaining circle has $a_{n-2}$ good subsets. Let $S$ be one of these good subsets. If chair $1$ is in $S$, form $S'$ by adding chair $n-1$ to $S$; if chair $1$ is not in $S$, form $S'$ by adding chair $n$ to $S$. It’s not hard to check that in each case $S'$ is a good subset of the ring of $n$ chairs, and that every such subset that contains either chair $n$ or both of chairs $1$ and $n-1$ is obtained in this way. (It’s here that we need to have $n\ge 4$: in order to form $S'$ this way when chair $1$ is in $S$, we need to know that $n-1>2$.)

This argument shows that the sequence $\langle a_n:n\in\Bbb N\rangle$ satisfies the recurrence

$$a_n=a_{n-1}+a_{n-2}\tag{0}$$

for $n\ge 4$. By inspection $a_2=3=2+1=F_3+F_1$ and $a_3=4=3+1=F_4+F_2$, so a straightforward induction shows that $$a_n=F_{n+1}+F_{n-1}\tag{1}$$ for $n\ge 2$:

\begin{align*} a_{n+1}&=a_n+a_{n-1}\\ &=\left(F_{n+1}+F_{n-1}\right)+\left(F_n+F_{n-2}\right)&\text{induction hypothesis}\\ &=\left(F_{n+1}+F_n\right)+\left(F_{n-1}+F_{n-2}\right)\\ &=F_{n+2}+F_n\;. \end{align*}

Apart from the fact that I used $a_n$ instead of $L_n$ for the number of good subsets of a ring of $n$ chairs, $(1)$ is exactly relationship that you were to prove.

Nothing in the wording of the question or the original tagging indicates that $L_n$ is supposed to be the $n$-th Lucas number: $L_n$ is explicitly defined to be the number of good subsets of a ring of $n$ chairs. (The tag was added by Martin Sleziak.) The choice of the notation $L_n$ for my $a_n$ in the problem statement was very likely motivated by the fact that $a_n$ is the $n$-th Lucas number, $L_n$, for $n>1$. This follows immediately from the fact that the sequence $\langle L_n:n\in\Bbb Z^+\rangle$ of Lucas numbers by definition satisfies the same recurrence $(0)$ as the sequence $\langle a_n:n\in\Bbb N\rangle$, with $L_1=1$ and $L_2=3=a_2$: $L_3=4=a_3$, and the recurrence then ensures that $a_n=L_n$ for all $n\ge 2$.

• Thanks for the clear explaination! Mar 1, 2015 at 11:41
• @Discreteballoons: My pleasure! Mar 1, 2015 at 11:55

The Lucas numbers are defined recursively by \begin{align*} L_1 & = 1\\ L_2 & = 3\\ L_n & = L_{n - 1} + L_{n - 2}, n \geq 3 \end{align*} The first few terms of the Lucas sequence are $\{1, 3, 4, 7, 11, 18, 29, 47, 76, 123, \ldots\}$.

The Fibonacci numbers are defined recursively by \begin{align*} F_1 & = 1\\ F_2 & = 1\\ F_n & = F_{n - 1} + F_{n - 2}, n \geq 3 \end{align*} The first few terms of the Fibonacci sequence are $\{1, 1, 2, 3, 5, 8, 13, 21, 34, 55, \ldots\}$.

We can prove the assertion that $L_{n + 1} = F_n + F_{n + 2}$ by induction on $n$. Let $P(n)$ be the statement that $L_{n + 1} = F_n + F_{n + 2}$.

If $n = 1$, then $L_2 = L_{1 + 1} = 3 = 1 + 2 = F_1 + F_3$. Thus, $P(1)$ holds.

IF $n = 2$, then $L_3 = L_{2 + 1} = 4 = 1 + 3 = F_2 + F_4$. Thus, $P(2)$ holds.

Assume $L_{m + 1} = F_m + F_{m + 2}$ for each $n \leq m$, where $m \geq 2$. Let $n = m + 1$. Then \begin{align*} L_{m + 2} & = L_{m + 1} + L_{m} && \text{by definition of the Lucas sequence}\\ & = F_{m} + F_{m + 2} + F_{m - 1} + F_{m + 1} && \text{by the induction hypothesis}\\ & = F_{m} + F_{m - 1} + F_{m + 2} + F_{m + 1}\\ & = F_{m + 1} + F_{m + 3} && \text{by definition of the Fibonacci sequence} \end{align*} so $P(m) \Rightarrow P(m + 1)$. Hence, $P(n)$ holds for each positive integer $n$.

Let $a_m$ denote the number of subsets of $m$ chairs in which no two chairs are consecutive. We will consider the first few cases, where the chairs are numbered from $1$ to $m$.

\begin{align*} & m = 1: \emptyset, \color{blue}{\{1\}}\\ & m = 2: \color{red}{\emptyset, \{1\}}, \color{blue}{\{2\}}\\ & m = 3: \color{red}{\emptyset, \{1\}, \{2\}}, \color{blue}{\{3\}}\\ & m = 4: \color{red}{\emptyset, \{1\}, \{2\}, \{3\}}, \color{blue}{\{4\}}, \color{green}{\{1, 3\}}, \color{blue}{\{2, 4\}}\\ & m = 5: \color{red}{\emptyset, \{1\}, \{2\}, \{3\}, \{4\}}, \color{blue}{\{5\}} \color{red}{\{1, 3\}}, \color{green}{\{1, 4\}}, \color{red}{\{2, 4\}}, \color{blue}{\{2, 5\}, \{3, 5\}}\\ & m = 6: \color{red}{\emptyset, \{1\}, \{2\}, \{3\}, \{4\}, \{5\}}, \color{blue}{\{6\}}, \color{red}{\{1, 3\}, \{1, 4\}}, \color{green}{\{1, 5\}}, \color{red}{\{2, 4\}, \{2, 5\}}, \color{blue}{\{2, 6\}}, \color{red}{\{3, 5\}}, \color{blue}{\{3, 6\}, \{4, 6\}}, \color{green}{\{1, 3, 5\}}, \color{blue}{\{2, 4, 6\}}\\ \end{align*}

Based on these examples, we see that \begin{align*} a_1 & = 2\\ a_2 & = 3\\ a_3 & = 4\\ a_4 & = 7\\ a_5 & = 11\\ a_6 & = 18 \end{align*} Thus, the assertion that $a_1 = L_1$ is false. However, it appears that $a_m = L_m$ if $m > 1$.

Let $m = n + 1$ for $n \geq 1$.

I have used three colors to highlight the subsets of $m = n + 1$ chairs that do not contain consecutive chairs. Subsets marked in blue contain chair $n + 1$. Subsets marked in red in row $n + 1$ are those subsets that appeared in row $n$. Subsets marked in green contain both $1$ and $n$.

Observe that the elements in blue in row $n + 1$ are formed by taking the union of elements in row $n - 1$ that do not contain $1$ with the set $\{n + 1\}$, while the elements in green are formed by taking the union of elements in row $n - 1$ that do contain $1$ with the set $\{n\}$. Hence, the total number of elements in row $n + 1$ that are either blue or green is $L_{n - 1}$. The number of elements in row $n + 1$ that are red is the number of elements in row $n$, which is $L_n$. Hence, for each $n \geq 1$, \begin{align*} L_{n + 1} & = L_n + L_{n - 1}\\ & = F_{n - 1} + F_{n + 1} + F_{n - 2} + F_n\\ & = F_{n - 1} + F_{n - 2} + F_{n + 1} + F_n\\ & = F_{n} + F_{n + 2} \end{align*} We can see that the assertion is false when $n = 0$ since the empty set in row $n + 1 = m = 1$ is not a member of one of the three types of highlighted sets.

While I did not use this observation in my proof, it appears that for $n \geq 1$ that the number of sets containing $n + 1$ in row $n + 1$ is $F_n$, while the number of sets containing $1$ and $n$ in row $n + 1$ is $F_{n - 2}$ (where we define $F_0 = F_2 - F_1 = 0$ and $F_{-1} = F_1 - F_0 = 1 - 0 = 1$).

Are you sure of the formulation of your problem? I am wondering if the good one would not be: "Suppose that $n$ chairs are arranged in a circle. Let $L_n$ count the number of subsets of $k \geq 1$ chairs which don't contain consecutive chairs, show that..."

• Please see this tutorial on how to format mathematics on this site. Feb 26, 2015 at 12:46
• I have just checked it, thank you. Feb 26, 2015 at 13:50


# Calculating the surface area of revolution for parametric equation.

I solved a problem using a method that's completely different from the mark scheme and I got the right answer, but I'm unsure whether or not it's just some coincidence. Here's the question:

The curve $C$ has parametric equations $$x=t^2, y=\frac{1}{4}t^4-\ln{t}$$ for $1\leq t\leq 2$. Find the are of the surface generated when $C$ is rotated $2\pi$ radians about the y-axis.

Here's what I did ( not very rigorous):

I thought cutting the curve with horizontal cuts should do the trick. So I just evaluated $2\pi\int _{t=1}^2xdy$ since $dy=(t^3-\frac{1}{t})dt$ it's just $$2\pi\int_1^2(t^5-t)dt$$ which is fairly easy to find.

Here's what's in the mark scheme:

$x'=2t$ and $y'=t^3-\frac{1}{t}$

$(\frac{ds}{dt})^2=x'^2+y'^2=(t^3-\frac{1}{t})^2$

$S=\int 2\pi x ds=2\pi\int_1^2(t^5-t)dt$

My understanding is that both answers slice $C$ differently and so maybe this was just some coincidence. I can't prove that both methods are equivalent though. So if someone can give me an idea as to why they are that'd be great. Also, it seems to me that the method I used was way easier, is there a place where it's better to use that other method?

• If you examine the mark scheme's computation, you'll find a difference of sign with what's in your post: $x' = 2t$ and $y' = (t^{3} - \frac{1}{t})$, so $$\left(\frac{ds}{dt}\right)^{2} = x'(t)^{2} + y'(t)^{2} = \left(t^{3} + \tfrac{1}{t}\right)^{2},$$ n.b., not $\left(t^{3} - \tfrac{1}{t}\right)^{2}$, which would be equal to $y'(t)^{2}$ itself. If the mark scheme really has a minus sign on the right, that's an error.


People who code: we want your input. Take the Survey

# Tag Info

## Hot answers tagged nonlinear-equations

19

There are two issues that you are likely to be encountering. Ill-conditioning First, the problem is ill-conditioned, but if you only provide a residual, Newton-Krylov is throwing away half your significant digits by finite differencing the residual to get the action of the Jacobian: $$J[x] y \approx \frac{F(x+\epsilon y) - F(x)}{\epsilon}$$ If you ...

12

Short answer If you only want second order accuracy and no embedded error estimation, chances are that you'll be happy with Strang splitting: half-step of reaction, full step of diffusion, half step of reaction. Long answer Reaction-diffusion, even with linear reaction, is famous for demonstrating splitting error. Indeed, it can be much worse, including "...

11

This is the stochastic root-finding problem, as in The stochastic root-finding problem: Overview, solutions, and open questions.

11

Is the shooting method the only general numerical method for solving BVP of nonlinear ODE(s)? No. Most other methods consist of three parts: Discretization. This may be done with finite differences, finite volumes, finite elements (Galerkin or collocation), spectral methods, and so forth. This reduces the problem from an infinite-dimensional one to a ...

9

If you can stand to use complex arithmetic, simultaneous iteration methods might be preferable for computing all the roots of your polynomial. The simplest simultaneous iteration method, the (Weierstrass-)Durand-Kerner method, is effectively equivalent to applying Newton-Raphson to the Vieta relations relating the coefficients and roots of a polynomial, ...

9

I assume, that you have conducted a space discretization, so that you are about solving the (vector-valued) ODE $$\dot u_h(t) = F_h(t,u_h(t)), \text{ on [0,T] }, u_h(0) = \alpha.$$ via a numerical scheme $\Phi$ that advances the approximation $u_h^n$ at the current time instance $t=t^n$ to the next value $u_h^{n+1}$ at $t=t^{n+1}:=t^n+\tau$. Then your ...

8

You can solve this numerically in Python without symbolic computation. from __future__ import print_function, division import numpy as np from numpy import exp from scipy.integrate import quad from scipy.optimize import root def f1(a1, a2, x): return exp(a1 * x + a2 * x * x * x) / (1 + x * x) def f2(a1, a2, x): return exp(a1 * x + a2 * x * x * x) *...

8

PDEs are a form of dynamical system where there is another continuous variable. Usually this is space, so you're looking at how things over time and space instead of just over time. Here's an example of generalizing an ODE to a PDE. Take your ODE model of chemical reactions which models the concentration of certain chemicals over time. Now generalize the ...

8

Julia has a whole ecosystem for generating sparsity patterns and doing sparse automatic differentiation in a way that mixes with scientific computing and machine learning (or scientific machine learning). Tools like SparseDiffTools.jl, ModelingToolkit.jl, and SparsityDetection.jl will do things like: Automatically find sparsity patterns from code Generate ...

7

To answer your questions in order: Any implicit method for solving an ordinary differential equation involves solving a system of nonlinear equations. You can do this through variants of Newton's method, successive substitution, full approximation scheme, or any other approach that solves systems of nonlinear equations. (The caveat is, of course, depending ...

7

What you describe as your time discretization is called the Crank-Nicolson scheme. For nonlinear differential equations it leads, as you have observed, to a nonlinear algebraic system that needs to be solved at each time step. The typical approach is to solve it with a Newton method -- in your case, that requires to solve a nonlinear system in 5 variables. ...

7

As pointed out by David Ketcheson, one method is to use the companion matrix and find its eigenvalues (this is what Matlab does for the roots function). However, if you want to code everything by yourself, you can try to use the Sturm sequences, which you use as a first step to find an interval with only one zero. Then, you can apply one standard methods ...

7

For your example equation, taking the average approach, the local consistency error $$\frac{1}{h^2}[u(x-h) - 2 u(x) + u(x+h)]-f(\frac{1}{2}[u(x-h)+u(x+h)]) = \frac{1}{2}f_uu_{xx}h^2 + hot.$$ will be of order $2$ (instead of order $3$). ($hot.$ means higher order terms) Therefore, if your overall approximation is of order $1$, e.g. if you use upwind ...

7

This is somehow unexpected, but my recent experience with solving a system of nonlinear equations is that treating them as the right hand side of a system of ordinary equations and then evolve the system with an ODE solver can be considerably faster than with the usual Newton-Raphson iteration. It sounds like you're doing some sort of pseudotransient ...

7

The issues you're running into now are not a failing of Newton-Raphson, but a question of coupling. You're doing iterated sequential coupling -- solving each equation sequentially and then iterating until (hopeful) convergence. No solver choice in place of NR is going to fix this lack of convergence, as long as you are doing iterated sequential coupling. ...

7

It's a bit easier to see if you write your equation in the a semi-discretised system of the form $u^{\prime}(t) = F(u(t))$ and with the application of the $\theta$-method and approximating $u^{\prime}(t) \approx (w^{n+1} - w^{n})/\tau$ this gives, $$w^{n+1} - w^{n} - (1-\theta) \tau F(w^n) - \theta\tau F(w^{n+1}) = 0$$ with unknown vector $w^{n+1}$ and ...

7

$s_k$ is the "approximate Newton" search direction. So in essence, when they say Choose $s_k$ such that $\|F(x_k)+F'(x_k)s_k\| \le \eta_k \|F(x_k)\|$ they are saying: Solve the Newton system $F'(x_k)s_k = - F(x_k)$ inexactly for $s_k$ until the norm of the residual $F(x_k)+F'(x_k)s_k$ is smaller than the norm of the right hand side $-F(x_k)$ by a ...

6

If you need Jacobian matrix information for a numerical method, you should calculate the Jacobian matrix of the discretized form of the equations, since that will be consistent with the discretized equations you are solving.

6

You should rather think of what you will need in the following step, which is probably the numerical time integration of the semi-discrete equations. If you are going to use a (semi) explicit time stepping scheme, all you need is a function that for a given $\phi_0$ assembles the vector $\langle (\nabla \phi_0)^2, v \rangle$, where $v$ are your test ...

6

$K u$ equals the internal forces only in the linear case. The tangent stiffness matrix, $K$, in a nonlinear problem is normally used in a Newton-Raphson algorithm to calculate updates to the displacement vector as follows: $$K \Delta u = f - f_{internal}$$ $$u_{i+1} = u_i + \Delta u$$ The vector of internal forces, $f_{internal}$ must be calculated from ...

6

If you change variables to optimize for the residual of the linear part, then the Hessian will be a low-rank update to the identity. Then L-BFGS would work very well. Specifically, your problem takes the form $$\min_x \frac{1}{2}\|Ax-b\|^2 + \frac{\mu}{2}\|g(x)\|^2$$ where $Ax=b$ is the linear PDE and $g$ is the nonlinear part, and $\mu$ is a tradeoff ...

6

The reason is that GMRES can only be used for solving linear equations, i.e. equations of the form $Ax=b$, where $A$ is some matrix and $x,b$ are vectors. What GMRES does, essentially, is it approximates multiplication by the matrix $A^{-1}$ using a matrix polynomial of $A$. In this case (I assume) $f(y^{n+1},t)$ is not necessarily linear in the vector $y^{... 6 Two systematic ways of smoothing a function$h$would be: 1. Join the piecewise smooth parts of your function using Hermite interpolation so that the derivatives are matched to your satisfaction. 2. Convolve your function$h(x)$with a heat kernel of the form$f(x) = \frac{\exp\left\{-\frac{x^2}{2 \sigma^2}\right\}}{\sqrt{2 \pi \sigma^2}}$so that instead ... 5 That's actually very easy to do in Dolfin: from dolfin import * # define mesh, function space (piecewise linear) mesh = UnitSquareMesh(64,64) V = FunctionSpace(mesh,'CG',1) # inhomogeneous boundary conditions (otherwise the solution is trivial) bc = DirichletBC(V, Constant(1.0), lambda x,on_boundary: on_boundary) # define bi(non)linear form # note that ... 5 Your observed quadratic convergence indicates that the Jacobian is likely correct. Have you looked at the solutions for your under-resolved configurations? Galerkin optimality uses the operator norm, which contains only the symmetric part, thus the solution of the discrete system could be quite different from the projection of the exact solution. This ... 5 As it looks to me your formulation of the discrete system is incomplete. You need to state your equation at each (grid?) point associated with$n$put back the summation over$l$(grid) points in your last equation assign a time index$i+1$or$i$to your$c_l$s In this way, you get a nonlinear (if you take$c_l^{n+1}$) or linear (if you take$c_l^{n}$) ... 5 A common strategy is to employ a damping strategy, i.e., to compute$\vec{w}^{\ast} = F \left( \vec{w}^{(n)} \right)$and then set$\vec{w}^{(n+1)} = \alpha \vec{w}^{(\ast)} + (1-\alpha)\vec{w}^{(n)}$where$\alpha\in[0,1]$. You typically choose$\alpha$in such a way that it minimizes$\|[\alpha \vec{w}^{(\ast)} + (1-\alpha)\vec{w}^{(n)}] - F(\alpha \vec{w}^...

5

Certified homotopy continuation methods are used both for finding roots and for proving that they indeed exist (inside a certain interval). A quick web search turned out this paper: Reliable homotopy continuation by Joris van der Hoeven.

5

No it is not. There is also multiple shooting collocation finite differences fixed point iterations and probably some more.

5

Since $\phi$ is a scalar between $0$ and $1$, the easiest method for finding a root is bisection. If you cannot calculate the expectation of the nonlinear function $$f_\phi(\theta) = \left(\phi r_z +(1-\phi)(r_k+\theta)\right)^{1-\gamma}(r_k+\theta-r_z)$$ in terms of $\phi$ analytically, you can use quadrature to approximate. For the first variant, this ...

Only top voted, non community-wiki answers of a minimum length are eligible


GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 15 Dec 2018, 21:55

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

## Events & Promotions

###### Events & Promotions in December
PrevNext
SuMoTuWeThFrSa
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
Open Detailed Calendar
• ### $450 Tuition Credit & Official CAT Packs FREE December 15, 2018 December 15, 2018 10:00 PM PST 11:00 PM PST Get the complete Official GMAT Exam Pack collection worth$100 with the 3 Month Pack ($299) • ### FREE Quant Workshop by e-GMAT! December 16, 2018 December 16, 2018 07:00 AM PST 09:00 AM PST Get personalized insights on how to achieve your Target Quant Score. # Is 3^(a^2/b) < 1?  new topic post reply Question banks Downloads My Bookmarks Reviews Important topics Author Message TAGS: ### Hide Tags Manager Joined: 27 Apr 2012 Posts: 57 Location: United States GMAT Date: 06-11-2013 GPA: 3.5 WE: Marketing (Consumer Products) Is 3^(a^2/b) < 1? [#permalink] ### Show Tags 21 Jun 2012, 00:59 1 15 00:00 Difficulty: 95% (hard) Question Stats: 32% (00:58) correct 68% (01:01) wrong based on 378 sessions ### HideShow timer Statistics Is 3^(a^2/b) < 1? (1) a<0 (2) b<0 Hi, request your help to please understand the fundamental concept behind this question. ##### Most Helpful Expert Reply Math Expert Joined: 02 Sep 2009 Posts: 51218 Re: Is 3^(a^2/b) < 1? [#permalink] ### Show Tags 21 Jun 2012, 01:17 7 6 Is 3^(a^2/b) < 1? Notice that $$3^{\frac{a^2}{b}} < 1$$ to hold true, the power of 3 must be less than 0. So, the question basically asks whether $$\frac{a^2}{b}<0$$. This will happen if $$a\neq{0}$$ AND $$b<0$$ (if $$a=0$$ then $$\frac{a^2}{b}=0$$). (1) a<0. The first condition is satisfied ($$a\neq{0}$$) but we don't know about the second one. Not sufficient. (2) b<0. The second condition is satisfied ($$b<0$$) but we don't know about the first one (again if $$a=0$$ then $$\frac{a^2}{b}=0$$). Not sufficient. (1)+(2) Both condition are satisfied. Sufficient. Answer: C. For more on number theory and exponents check: math-number-theory-88376.html DS questions on exponents: search.php?search_id=tag&tag_id=39 PS questions on exponents: search.php?search_id=tag&tag_id=60 Tough and tricky DS exponents and roots questions with detailed solutions: tough-and-tricky-exponents-and-roots-questions-125967.html Tough and tricky PS exponents and roots questions with detailed solutions: tough-and-tricky-exponents-and-roots-questions-125956.html Hope it helps. _________________ ##### General Discussion Manager Joined: 27 Apr 2012 Posts: 57 Location: United States GMAT Date: 06-11-2013 GPA: 3.5 WE: Marketing (Consumer Products) Re: Is 3^(a^2/b) < 1? [#permalink] ### Show Tags 21 Jun 2012, 02:10 This is great.Thanks a ton! Math Expert Joined: 02 Sep 2009 Posts: 51218 Re: Is 3^(a^2/b) < 1? [#permalink] ### Show Tags 25 Jun 2013, 03:47 Bumping for review and further discussion*. Get a kudos point for an alternative solution! *New project from GMAT Club!!! Check HERE Theory on Exponents: math-number-theory-88376.html All DS Exponents questions to practice: search.php?search_id=tag&tag_id=39 All PS Exponents questions to practice: search.php?search_id=tag&tag_id=60 Tough and tricky DS exponents and roots questions with detailed solutions: tough-and-tricky-exponents-and-roots-questions-125967.html Tough and tricky PS exponents and roots questions with detailed solutions: tough-and-tricky-exponents-and-roots-questions-125956.html _________________ Math Revolution GMAT Instructor Joined: 16 Aug 2015 Posts: 6639 GMAT 1: 760 Q51 V42 GPA: 3.82 Re: Is 3^(a^2/b) < 1? [#permalink] ### Show Tags 27 Jan 2016, 17:46 Forget conventional ways of solving math questions. In DS, Variable approach is the easiest and quickest way to find the answer without actually solving the problem. Remember equal number of variables and independent equations ensures a solution. Is 3^(a^2/b) < 1? (1) a<0 (2) b<0 When you modify the original condition and the question, they become 3^(a^2/b) < 1? --> 3^(a^2/b) < 3^0? --> a^2/b>0?. Multiply b^2 on the both equations(since b^2 is positive, even if it’s multiplied, the sign of inequality doesn’t change.) and it becomes a^2(b)>0?. There are 2 variables(a,b), which should match with the number of equations. So you need 2 equations. For 1) 1 equation, for 2) 1 equation, which is likely to make C the answer. When 1) & 2), since a<0, it can’t be 0. Divide the both equations with a^2, they become a^2(b)<0?-->b<0?. Since 2) is b<0, it is yes and sufficient. Therefore, the answer is C.  For cases where we need 2 more equations, such as original conditions with “2 variables”, or “3 variables and 1 equation”, or “4 variables and 2 equations”, we have 1 equation each in both 1) and 2). Therefore, there is 70% chance that C is the answer, while E has 25% chance. These two are the majority. In case of common mistake type 3,4, the answer may be from A, B or D but there is only 5% chance. Since C is most likely to be the answer using 1) and 2) separately according to DS definition (It saves us time). Obviously there may be cases where the answer is A, B, D or E. _________________ MathRevolution: Finish GMAT Quant Section with 10 minutes to spare The one-and-only World’s First Variable Approach for DS and IVY Approach for PS with ease, speed and accuracy. "Only$99 for 3 month Online Course"
"Free Resources-30 day online access & Diagnostic Test"
"Unlimited Access to over 120 free video lessons - try it yourself"

Intern
Joined: 09 Apr 2018
Posts: 12

### Show Tags

25 Oct 2018, 05:33
Bunuel wrote:
Is 3^(a^2/b) < 1?

Notice that $$3^{\frac{a^2}{b}} < 1$$ to hold true, the power of 3 must be less than 0. So, the question basically asks whether $$\frac{a^2}{b}<0$$. This will happen if $$a\neq{0}$$ AND $$b<0$$ (if $$a=0$$ then $$\frac{a^2}{b}=0$$).

(1) a<0. The first condition is satisfied ($$a\neq{0}$$) but we don't know about the second one. Not sufficient.

(2) b<0. The second condition is satisfied ($$b<0$$) but we don't know about the first one (again if $$a=0$$ then $$\frac{a^2}{b}=0$$). Not sufficient.

(1)+(2) Both condition are satisfied. Sufficient.

For more on number theory and exponents check: http://gmatclub.com/forum/math-number-theory-88376.html

DS questions on exponents: http://gmatclub.com/forum/search.php?se ... &tag_id=39
PS questions on exponents: http://gmatclub.com/forum/search.php?se ... &tag_id=60

Tough and tricky DS exponents and roots questions with detailed solutions: http://gmatclub.com/forum/tough-and-tri ... 25967.html
Tough and tricky PS exponents and roots questions with detailed solutions: http://gmatclub.com/forum/tough-and-tri ... 25956.html

Hope it helps.

Bunuel ...if a=-1 and b=-9 then we get 3 as our answer and if a=-1 and b=-2 in that case we get .66
Should the answer not be E.
Math Expert
Joined: 02 Sep 2009
Posts: 51218
Re: Is 3^(a^2/b) < 1?  [#permalink]

### Show Tags

25 Oct 2018, 06:17
angarg wrote:
Bunuel wrote:
Is 3^(a^2/b) < 1?

Notice that $$3^{\frac{a^2}{b}} < 1$$ to hold true, the power of 3 must be less than 0. So, the question basically asks whether $$\frac{a^2}{b}<0$$. This will happen if $$a\neq{0}$$ AND $$b<0$$ (if $$a=0$$ then $$\frac{a^2}{b}=0$$).

(1) a<0. The first condition is satisfied ($$a\neq{0}$$) but we don't know about the second one. Not sufficient.

(2) b<0. The second condition is satisfied ($$b<0$$) but we don't know about the first one (again if $$a=0$$ then $$\frac{a^2}{b}=0$$). Not sufficient.

(1)+(2) Both condition are satisfied. Sufficient.

For more on number theory and exponents check: http://gmatclub.com/forum/math-number-theory-88376.html

DS questions on exponents: http://gmatclub.com/forum/search.php?se ... &tag_id=39
PS questions on exponents: http://gmatclub.com/forum/search.php?se ... &tag_id=60

Tough and tricky DS exponents and roots questions with detailed solutions: http://gmatclub.com/forum/tough-and-tri ... 25967.html
Tough and tricky PS exponents and roots questions with detailed solutions: http://gmatclub.com/forum/tough-and-tri ... 25956.html

Hope it helps.

Bunuel ...if a=-1 and b=-9 then we get 3 as our answer and if a=-1 and b=-2 in that case we get .66
Should the answer not be E.

If a=-1 and b=-9, then 3^(1/(-9)) = ~0.9.
_________________
Re: Is 3^(a^2/b) < 1? &nbs [#permalink] 25 Oct 2018, 06:17
Display posts from previous: Sort by