text stringlengths 1 2.12k | source dict |
|---|---|
The first number I can chose from 30.
The second #, choose from 20.
The third #, choose from 12.
So: 30*20*12= 7200
7200/6 = 1200 . Correct!
The first can be any of the 30 items.
Select, say, #7; cross out all items in its row and column.
. . $\begin{array}{|c|c|c|c|c|} \hline 1 & \times & 3 & 4 & 5 \\ \hline \times & \bullet & \times & \times & \times \\ \hline 11 & \times & 13 & 14 & 15 \\ \hline 16 & \times & 18 & 19 & 20 \\ \hline 21 & \times & 23 & 24 & 25 \\ \hline 26 & \times & 28 & 29 & 30 \\ \hline \end{array}$
The second can be any of the remaining 20 items.
Select, say, #24; cross out all items in its row and column.
. . $\begin{array}{|c|c|c|c|c|} \hline 1 & \times & 3 & \times & 5 \\ \hline \times & \bullet & \times & \times & \times \\ \hline 11 & \times & 13 & \times & 15 \\ \hline 16 & \times & 18 & \times & 20 \\ \hline \times & \times & \times& \bullet & \times \\ \hline 26 & \times & 28 & \times & 30 \\ \hline \end{array}$
The third can be any of the remaining 12 items.
Select, say, #28.
. . $\begin{array}{|c|c|c|c|c|} \hline 1 & \times & \times & \times & 5 \\ \hline \times & \bullet & \times & \times & \times \\ \hline 11 & \times & \times & \times & 15 \\ \hline 16 & \times & \times & \times & 20 \\ \hline \times & \times & \times& \bullet & \times \\ \hline \times & \times & \bullet & \times & \times \\ \hline \end{array}$
There are: .$30\cdot20\cdot12 \,=\,7200$ ways to select 3 items.
Since the order of the selections is not considered,
. . we divide by $3!$
Answer: .$\dfrac{7200}{3!} \;=\;1200$
#### Jameson
That was the thing I was missing, soroban! Thank you for pointing it out. We should divide by $3!$, not $$\displaystyle \binom{3}{1}$$. | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808695883038,
"lm_q1q2_score": 0.8868116100722311,
"lm_q2_score": 0.9046505318875316,
"openwebmath_perplexity": 397.8135993777976,
"openwebmath_score": 0.5571868419647217,
"tags": null,
"url": "https://mathhelpboards.com/threads/combination-problem.2923/"
} |
# Question about complete metric on manifolds
I've recently been wondering about whether non-complete metrics on manifolds can be transformed into complete metrics on manifolds and whether all manifolds have complete metrics. After some googling I came across this link and the first comment says that any metric is actually conformal to a complete metric. I was wondering if anybody can show me a proof of this because I have had difficulty finding one. Thank you!
$\textbf{Theorem 1}$ of The Existence of complete Riemannian Metrics is what you're looking for :
For any Riemannian metric $g$ on $M$ there exists a complete Riemannian metric which is conformal to $g$
Another way to argue that every second countable differentiable manifold $$M$$ admits a complete Riemannian metric is the following: By Whitney, $$M$$ can be embedded into $$\mathbb{R}^{2n+1}$$ as a closed submanifold. The pullback metric on $$M$$ from $$\mathbb{R}^{2n+1}$$ then is complete since closed subsets of complete metric spaces are complete.
• Yes, but the complete metric you put in this way is unrelated to the one that was originally put on $M$. The question is whether there is a complete metric that is conformal to the given one. Aug 29, 2019 at 9:06 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.99435809216875,
"lm_q1q2_score": 0.8867795261426439,
"lm_q2_score": 0.8918110418436166,
"openwebmath_perplexity": 130.59506968950893,
"openwebmath_score": 0.706713855266571,
"tags": null,
"url": "https://math.stackexchange.com/questions/970719/question-about-complete-metric-on-manifolds/3337838"
} |
# Has anyone heard of this maths formula and where can I find the proof to check my proof is correct? $\sum^n_{i = 1}i + \sum^{n-1}_{i=1}i = n^2$
The formula basically is:
The sum of all integers before and including $n$, plus all the integers up to and including $n-1$.
This will find $n^2$.
$$\sum^n_{i = 1}i + \sum^{n-1}_{i=1}i = n^2$$
• You can write formulae on Math SE using TeX. This document should be enough to get you started: ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf
– 727
Aug 5 '15 at 22:45
• From Wikipedia: "Most simply, the sum of two consecutive triangular numbers is a square number." See the images here. Aug 5 '15 at 23:01
• The sum of all positive integers. Aug 7 '15 at 4:33
• In the title you ask whether somebody can check your proof. But there is no proof in your post and you have not poster a proof in an answer, either...? Aug 8 '15 at 8:51
$$\begin{array}{ccccccc}&&&\square&&&\\ &&\blacksquare&\square&\square\\ &\blacksquare&\blacksquare&\square&\square&\square\\ \blacksquare&\blacksquare&\blacksquare&\square&\square&\square&\square \end{array} \left.\rightarrow\quad \begin{array}{cccc} \square&\blacksquare&\blacksquare&\blacksquare\\ \square&\square&\blacksquare&\blacksquare\\ \square&\square&\square&\blacksquare\\ \square&\square&\square&\square \end{array}\quad\right\}n\\$$
In numbers,
$$\underbrace{\begin{array}{lrrrrrrrrr} &n&+&n-1&+&n-2&+&\cdots&+&1\\ +&0&+&1&+&2&+&\cdots&+&n-1\\ \hline &n&+&n&+&n&+&\cdots&+&n \end{array}}_n$$
In summation signs,
\begin{align*} \sum_{i=1}^ni + \sum_{i=1}^{n-1}i &= \sum_{i=1}^ni + \sum_{i=0}^{n-1}i\\ &= \sum_{i=1}^ni + \sum_{j=1}^{n}(n-j) & (j = n-i)\\ &= \sum_{i=1}^n(i+n-i)\\ &= \sum_{i=1}^n n\\ &= n^2 \end{align*} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464478051827,
"lm_q1q2_score": 0.8867624131500732,
"lm_q2_score": 0.9086179012632543,
"openwebmath_perplexity": 857.6873540672635,
"openwebmath_score": 0.9676469564437866,
"tags": null,
"url": "https://math.stackexchange.com/questions/1385989/has-anyone-heard-of-this-maths-formula-and-where-can-i-find-the-proof-to-check-m/1385998"
} |
• I just saw an arrow at first before realizing this is exactly the answer I had in mind. Aug 6 '15 at 4:04
• Maybe nicer: draw the little circles in a square. Then tilt your head diagonally and read off the diagonals. Aug 6 '15 at 13:54
• The colour in your first proof appears at first when I refresh the page, then disappears as the TeX renders. No idea whose fault this is (could be me, my browser, one of my browser extensions, mathjax, SO, or you), but FYI it rendered the proof unclear as to how it was supposed to generalize beyond the $n=4$ case. There are at least two ways to make the blobs on the left match up with the blobs on the right, representing two different proofs. Well, I suppose there are $16!$ if we ignore all symmetries, but 2 good ones I can immediately think of... Aug 6 '15 at 17:16
• FWIW, it renders properly over here. Aug 6 '15 at 20:44
• @SteveJessop Changed to b/w, see if it helps. Aug 6 '15 at 20:54
It is known that $$\sum_{k=1}^nk=\frac{n(n+1)}{2}.$$ Thus the value of your sum would be $$\sum_{k=1}^nk+\sum_{k=1}^{n-1}k=\frac{n(n+1)}{2}+\frac{(n-1)(n)}{2}=\frac{n^2+n+n^2-n}{2}=\frac{2n^2}{2}=n^2.$$
• no intuition whatsoever but it's rigorous :) Aug 6 '15 at 4:05
This is equivalent to the well-known fact that the sum of the first $n$ odd numbers is $n^2$. For example, $1+3+5+7+9+11=36$. Why are they equivalent? Because of this: \begin{align} 1+2+3+4+5+\phantom16&\\ {}+1+2+3+4+\phantom15&\\ -----------&\\ 1+3+5+7+9+11& \end{align}
• See this image to see why the sum of the first $n$ odd numbers in $n^2$. (It's a proof-without-words.) Aug 5 '15 at 22:57
• I would say both sums are well-known. Aug 5 '15 at 22:59
• neat way to think about it Aug 6 '15 at 4:05
Assuming you consider
$$\sum^n_{i = 1}i = \frac{n(n+1)}{2}$$
to be a well-known fact, observe that your sum is just | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464478051827,
"lm_q1q2_score": 0.8867624131500732,
"lm_q2_score": 0.9086179012632543,
"openwebmath_perplexity": 857.6873540672635,
"openwebmath_score": 0.9676469564437866,
"tags": null,
"url": "https://math.stackexchange.com/questions/1385989/has-anyone-heard-of-this-maths-formula-and-where-can-i-find-the-proof-to-check-m/1385998"
} |
$$\sum^n_{i = 1}i = \frac{n(n+1)}{2}$$
to be a well-known fact, observe that your sum is just
$$\begin{array}{rcl} \sum^n_{i = 1}i + \sum^{n-1}_{i=1}i & = & \sum^n_{i=1}i + \sum^n_{i=1}i - n \\ &=& 2\sum^n_{i=1}i - n\\ &=& 2\frac{n(n+1)}{2} - n\\ &=& n(n+1) - n \\ &=& n^2 + n - n \\ &=& n^2 \end{array}$$
In Zeilberger fashion: Plug in $n=2, 3$ into the LHS to get $4, 9$. Fit a quadratic to that and get $n^2$. Then to complete the proof, simply note
$$\left(\sum^{n+1}_{i = 1}i + \sum^{n}_{i=1}i\right) - \left(\sum^n_{i = 1}i + \sum^{n-1}_{i=1}i\right) = n+n+1 = (n+1)^2-n^2$$
• ...And why the downvote? It's perfectly rigourous. Aug 7 '15 at 20:00
Note that \begin{align}i^2-(i-1)^2&\color{lightgray}{=2i-1}\\&=i\qquad+(i-1)\quad\quad\end{align} Summing from $i=1$ to $n$ and telescoping LHS gives \begin{align}n^2\qquad\quad&=\sum_{i=1}^ni+\sum_{i=1}^n(i-1)\\ &=\sum_{i=1}^n i+\sum_{i=0}^{n-1}i\\ &=\sum_{i=1}^n i+\sum_{i=1}^{n-1}i\qquad\blacksquare\end{align}
Ah man. I can't believe I'm late to this party. I discovered this as well a lot of years ago and came up with my own set of proofs.
I noticed that: $$1 + 2 + .. + (n -1) + n + (n - 1) + ... + 2 + 1 = n^2$$ (which is the same thing that you have)
Proof by Induction:
Base case: For n = 1:
$LHS = 1 = 1^2 = RHS$
Assuming that it is true for an integer $k > 1$: (i.e. $1 + 2 + ... + (k - 1) + k + (k -1 ) + ... + k = k^2$)
The case for k + 1 becomes:
$LHS = 1 + 2 + ... + k + (k + 1) + k + ... + 2 + 1$
$= k^2 + (k + 1) + k$ (using the induction hypothesis)
$= (k + 1)^2 = RHS$
Legend wants that Carl Friedrich Gauss discover the formula
$$\sum_{i=1}^n i = \dfrac{n(n+1)}{2}$$ when he was six. Not surprising, since gaussing, ehm, guessing "Gauss" when trying to remember who found a certain result has a non trivial probability of success... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464478051827,
"lm_q1q2_score": 0.8867624131500732,
"lm_q2_score": 0.9086179012632543,
"openwebmath_perplexity": 857.6873540672635,
"openwebmath_score": 0.9676469564437866,
"tags": null,
"url": "https://math.stackexchange.com/questions/1385989/has-anyone-heard-of-this-maths-formula-and-where-can-i-find-the-proof-to-check-m/1385998"
} |
• Ah! Interesting that I got a down vote. He asked if we heard of those formula's. I pointed out this formula was (probably) discovered by Gauss. Yes, it is not the 'exact' formula he wrote in the question, but it is the only brick needed to prove it (as all the others pointed out). Also, this is the only 'formula' people remember and use. Cheers. Aug 7 '15 at 15:23
$$\frac{(n-1) n}{2}+\frac{ n(n+1)}{2} = n^2.$$
• This way of looking at it was fully explained in AJ Stas's answer. Read the other answers before answering. Aug 7 '15 at 4:36 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464478051827,
"lm_q1q2_score": 0.8867624131500732,
"lm_q2_score": 0.9086179012632543,
"openwebmath_perplexity": 857.6873540672635,
"openwebmath_score": 0.9676469564437866,
"tags": null,
"url": "https://math.stackexchange.com/questions/1385989/has-anyone-heard-of-this-maths-formula-and-where-can-i-find-the-proof-to-check-m/1385998"
} |
# Is there a pattern to expression for the nested sums of the first $n$ terms of an expression? [duplicate]
Apologies for the confusing title but I couldn't think of a better way to phrase it. What I'm talking about is this:
$$\sum_{i=1}^n \;i = \frac{1}{2}n \left(n+1\right)$$ $$\sum_{i=1}^n \; \frac{1}{2}i\left(i+1\right) = \frac{1}{6}n\left(n+1\right)\left(n+2\right)$$ $$\sum_{i=1}^n \; \frac{1}{6}i\left(i+1\right)\left(i+2\right) = \frac{1}{24}n\left(n+1\right)\left(n+2\right)\left(n+3\right)$$
We see that this seems to indicate:
$$\sum_{n_m=1}^{n}\sum_{n_{m-1}=1}^{n_m}\ldots \sum_{n_1=1}^{n_2} \; n_1 = \frac{1}{m!}\prod_{k = 0}^{m}(n+k)$$
Is this a known result? If so how would you go about proving it? I have tried a few inductive arguments but because I couldn't express the intermediate expressions nicely, I didn't really get anywhere.
## marked as duplicate by Rohan, Simply Beautiful Art, kingW3, Vladhagen, user223391 Feb 21 '17 at 22:42
• In your last expression $\prod_{k = 0}^{m}$ should change into $\prod_{k = 0}^{m-1}$. – drhab Feb 21 '17 at 14:03
• Is it just me, or is the current closed vote for duplicates not well chosen? – Simply Beautiful Art Feb 21 '17 at 14:26
• If we take $m=1$ then LHS$=\sum_{n_1=1}^n n_1$ and RHS$=n(n+1)$ so LHS$\neq$RHS. Now $\frac1{m!}$ should change into $\frac1{(m-1)!}$. – drhab Feb 21 '17 at 14:41
• You want to read about Faulhaber's formula. – Jeppe Stig Nielsen Feb 21 '17 at 15:29
• While the answer is available in Proof of the Hockey-Stick Identity, it takes enough interpretation to recognize this that I don't think it should qualifiy as a duplicate. As for Finite Sum of Power, this question is barely even related to that one. – Paul Sinclair Feb 21 '17 at 18:17
You should have $$\sum_{i=1}^{n} 1 = n$$ $$\sum_{i=1}^{n} i = \frac{1}{2} n(n+1)$$ $$\sum_{i=1}^{n} \frac{1}{2} i(i+1) = \frac{1}{6} n(n+1)(n+2)$$ $$\sum_{i=1}^{n} \frac{1}{6} i(i+1)(i+2) = \frac{1}{24} n(n+1)(n+2)(n+3)$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9910145733704833,
"lm_q1q2_score": 0.8867493989206993,
"lm_q2_score": 0.8947894639983208,
"openwebmath_perplexity": 160.51146579699576,
"openwebmath_score": 0.8492360711097717,
"tags": null,
"url": "https://math.stackexchange.com/questions/2154537/is-there-a-pattern-to-expression-for-the-nested-sums-of-the-first-n-terms-of-a?noredirect=1"
} |
In particular, the first sum of yours was wrong and the things you were adding should depend on $i$, not on $n$.
But, to answer the question, yes! This is a known result, and actually follows quite nicely from properties of Pascal's triangle. Look at the first few diagonals of the triangle and see how they match up to your sums, and see if you can explain why there's such a relation, and why the sums here can be written in terms of binomial coefficients. Then, the hockey-stick identity proves your idea nicely.
From finite calculus we have that
$$\sum a^{\underline k}\delta k=\frac{a^{\underline{k+1}}}{k+1}+C$$
where $a^{\underline k}:=\prod _{j=0}^{k-1}(a-j)$ is known as a falling factorial, and $C$ is any periodic function with period $1$ (this can be a constant function, in general is taken as zero, this is an analog of an indefinite integral, in this case this is an indefinite sum).
And we have that $a^{\overline m}:=\prod_{j=0}^{m-1}(a+j)$ is known as a rising factorial, and
$$a^{\overline m}=(a+m-1)^\underline m$$
Hence you want to solve the sum
\begin{align}\sum_{k=\ell}^n k(k+1)\cdots(k+m)&=\sum\nolimits_\ell^{n+1}k^{\overline{m+1}}\delta k\\&=\sum\nolimits_\ell^{n+1}(k+m)^{\underline{m+1}}\delta k\\&=\frac{(k+m)^{\underline{m+2}}}{m+2}\bigg|_\ell^{n+1}\\&=\frac1{m+2}\big((n+m+1)^\underline{m+2}-(\ell+m)^\underline{m+2}\big)\\&=\frac1{m+2}\big(n^\overline{m+2}-(\ell-1)^\overline{m+2}\big)\end{align}
From here is easy to justify your result
$$\underbrace{\sum\sum\ldots\sum_{k=1}^n 1}_{m\text{ times}}=\frac{n^\overline {m+1}}{m!}=\frac{(n+m-1)^{\underline m}}{m!}=\binom{n+m-1}{m}$$
The pattern actually is $$\sum_{n_m=1}^{n}\sum_{n_{m-1}=1}^{n_m}\ldots \sum_{n_1=1}^{n_2} \sum_{n_0=1}^{n_1} 1 = \frac{1}{(m+1)!}\prod_{k = 0}^{m}(n+k), \tag1$$ where for reasons of symmetry (and making the later proof simpler) I have written $n_1$ as $\sum_{n_0=1}^{n_1} 1.$ A slightly more convenient way to write the same thing is | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9910145733704833,
"lm_q1q2_score": 0.8867493989206993,
"lm_q2_score": 0.8947894639983208,
"openwebmath_perplexity": 160.51146579699576,
"openwebmath_score": 0.8492360711097717,
"tags": null,
"url": "https://math.stackexchange.com/questions/2154537/is-there-a-pattern-to-expression-for-the-nested-sums-of-the-first-n-terms-of-a?noredirect=1"
} |
$$\sum_{1\leq n_0\leq n_1\leq n_2\leq \cdots \leq n_{m-1}\leq n_m\leq n} 1 = \binom{n+m}{m+1} \tag2$$
where $\binom{n+m}{m+1}$ is a binomial coefficient. The right-hand side of Equation $2$ equals the right-hand side of Equation $1$ by means of the following formula for a binomial coefficient, $$\binom pq = \frac{p(p-1)(p-2)\cdots(p-q+1)}{q!}.$$
The meaning of the left-hand side of Equation $2$ is that there is one term of the sum for every possible list of numbers $n_0, n_1, n_2, \ldots, n_m$ such that $1\leq n_0\leq n_1\leq n_2\leq \cdots \leq n_m\leq n.$ Notice that $$\sum_{1\leq n_0\leq n_1\leq n_2\leq\cdots\leq n_{m-1}\leq n_m\leq n} 1 = \sum_{n_m=1}^n \left(\sum_{1\leq n_0\leq n_1\leq n_2\leq\cdots \leq n_{m-1}\leq n_m} 1\right),$$ and if you continue to "unpack" the sums in this fashion with a sum from $1$ to $n_m,$ then $1$ to $n_{m-1},$ and so forth, you get the $m+1$ nested sums on the left side of Equation $1.$
This is a well-known result. See Simplification of a nested sum, Nested summations and their relation to binomial coefficients, and this answer to Binomial coefficient as a summation series proof?
There is a combinatorial proof which is a little easier to see if you rewrite the sum this way: $$\sum_{1\leq n_0\leq n_1\leq n_2\leq\cdots\leq n_m\leq n} 1 = \sum_{0 < n_0 < n_1+1 < n_2+2 < \cdots < n_m+m < n+m+1} 1,\tag3$$ using the fact that for integers $p$ and $q,$ $p \leq q$ if and only if $p < q+1.$
Each term in the sum on the right-hand side of Equation $3$ has $m+1$ index numbers $n_0, n_1, n_2, \ldots, n_m$ selected from the integers strictly between $0$ and $n+m+1,$ that is, from the set of integers $\{1,2,3,\ldots,n+m-1,n+m\}.$ Since each possible combination of numbers selected can be selected in only one way (increasing order), the number of terms is exactly the number of ways to choose $m+1$ elements from a set of $n+m$ elements, that is, the binomial coefficient "$n+m$ choose $m+1$," notated $\binom{n+m}{m+1}.$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9910145733704833,
"lm_q1q2_score": 0.8867493989206993,
"lm_q2_score": 0.8947894639983208,
"openwebmath_perplexity": 160.51146579699576,
"openwebmath_score": 0.8492360711097717,
"tags": null,
"url": "https://math.stackexchange.com/questions/2154537/is-there-a-pattern-to-expression-for-the-nested-sums-of-the-first-n-terms-of-a?noredirect=1"
} |
In this answer it is proved that:$$\sum_{n_m=1}^{n}\sum_{n_{m-1}=1}^{n_m}\ldots \sum_{n_1=1}^{n_2}1=\binom{n+m-1}{m}\tag1$$
On base of the rule:$$\sum_{k=r}^n\binom{k}{r}=\binom{n+1}{r+1}\tag2$$ which can easily be deduced by induction on $n$. Induction step:$$\sum_{k=r}^n\binom{k}{r}=\sum_{k=r}^{n-1}\binom{k}{r}+\binom{n}{r}=\binom{n}{r+1}+\binom{n}{r}=\binom{n+1}{r+1}$$
Now $(2)$ can be applied to prove $(1)$ by induction on $m$.
The induction step is:
$$\sum_{n_m=1}^{n}\sum_{n_{m-1}=1}^{n_m}\ldots \sum_{n_1=1}^{n_2} \; 1 = \sum_{n_m=1}^{n} \binom{n_{m-1}+m-2}{m-1}= \binom{n+m-1}{m}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9910145733704833,
"lm_q1q2_score": 0.8867493989206993,
"lm_q2_score": 0.8947894639983208,
"openwebmath_perplexity": 160.51146579699576,
"openwebmath_score": 0.8492360711097717,
"tags": null,
"url": "https://math.stackexchange.com/questions/2154537/is-there-a-pattern-to-expression-for-the-nested-sums-of-the-first-n-terms-of-a?noredirect=1"
} |
# Math Help - inequality on the set of real numbers
1. ## inequality on the set of real numbers
Solve the following inequality on the set of real numbers
$x^2-3\sqrt{x^2+3}\leq1$
2. Originally Posted by perash
Solve the following inequality on the set of real numbers
$x^2-3\sqrt{x^2+3}\leq1$
$x^2-3\sqrt{x^2+3}\leq1 \Rightarrow (x^2 - 1)^2 \leq 9(x^2 + 3)$
A little bit of algebra leads us to,(that is bringing everything to the LHS and factorising)
$(x-\sqrt{13})(x+\sqrt{13})(x^2+2) \leq 0$
$\forall x \in \mathbb{R}, x^2 + 2 > 0$
So,
$(x-\sqrt{13})(x+\sqrt{13})\leq 0$
Since exactly one of them is non-positive,
$x \in [-\sqrt{13},\sqrt{13}]$
3. Hello, perash!
Solve on the set of real numbers: . $x^2-3\sqrt{x^2+3}\:\leq\:1$
We have: . $x^2-1 \:\leq \:3\sqrt{x^2+3}$
Square: . $x^4-2x^2 + 1 \:\leq \:9x^2+27\quad\Rightarrow\quad x^4 - 11x^2 - 26 \:\leq \:0$
. . which factors: . $(x^2+2)(x^2-13)\:\leq\:0$
Since $(x^2+2)$ is always positive, $(x^2-13)$ must be negative.
We have: . $x^2-13 \:\leq \:0\quad\Rightarrow\quad x^2\:\leq\:13\quad\Rightarrow\quad |x| \:\leq\:\sqrt{13}$
Therefore: . $-\sqrt{13}\;\leq\: x \:\leq\:\sqrt{13}$
Drat . . . too slow again!
.
4. Originally Posted by Soroban
Hello, perash!
[size=3]
We have: . $x^2-1 \:\leq \:3\sqrt{x^2+3}$
Square: . $x^4-2x^2 + 1 \:\leq \:9x^2+27\quad\Rightarrow\quad x^4 - 11x^2 - 26 \:\leq \:0$
I always get confused when I need to square an inequality.
$x^2 - 1 \leq 3\sqrt{x^2 + 3}$
If $x \in (-1, 1)$ then when we square this we shouldn't we get
$(x^2 - 1) \geq 9(x^2 + 3)$
since the LHS is negative? So don't we have to do the problem separately on $(-1, 1)$ and $\mathbb{R} - (-1, 1)$?
-Dan
Edit: This question has been resolved. See here.
5. Originally Posted by topsquark
since the LHS is negative? So don't we have to do the problem separately on $(-1, 1)$ and $\mathbb{R} - (-1, 1)$? | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9877587250685455,
"lm_q1q2_score": 0.8867063491215037,
"lm_q2_score": 0.897695283896349,
"openwebmath_perplexity": 916.3951685024392,
"openwebmath_score": 0.957548201084137,
"tags": null,
"url": "http://mathhelpforum.com/algebra/25343-inequality-set-real-numbers.html"
} |
-Dan
I will try to answer this question,
First we note RHS is always positive for this problem,so if the LHS is negative then, LHS $\leq 0 \leq$ RHS , so it will always hold.
The point is almost all steps in the inequality reduction are equivalent.So there is no reason it will be wrong. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9877587250685455,
"lm_q1q2_score": 0.8867063491215037,
"lm_q2_score": 0.897695283896349,
"openwebmath_perplexity": 916.3951685024392,
"openwebmath_score": 0.957548201084137,
"tags": null,
"url": "http://mathhelpforum.com/algebra/25343-inequality-set-real-numbers.html"
} |
# What is the truth table for demorgan's law?
From Demorgan's law:
$(A \cup B)^c = A^c \cap B^c$
I constructed the truth table as follows:
$$\begin{array}{cccccc|cc} x\in A & x \in B & x \notin A & x \notin B & x \in A^c & x \in B^c & x\notin A \text{ or } x \notin B & x \in A^c \text{ and } x \in B^c & \\ \hline T & T & F & F & F & F & F & F & \\ T & F & F & T & F & T & T & F & \\ F & T & T & F & T & F & T & F & \\ F & F & T & T & T & T & T & T & \end{array}$$
Clearly I've made a mistake somewhere. What did I do wrong?
In my mind, $x \notin A$ is the same as saying $x \in A^c$. Is this wrong too?
EDIT:
I think $x \in (A \cup B)^c$ is equal to $x \notin A \text{ or } x \notin B$ because:
$\begin{array} {cc} x \in (A \cup B)^c &\Rightarrow & x \notin A \cup B ,\text{ by definition of set complement}\\ & \Rightarrow & x \notin A \text{ or } x \notin B, \text{ by definition of set union} \\\end{array}$
Did I wrongly apply the definition(s)?
How do I start from $x \in (A \cup B)^c$ and arrive at $x \notin A \text{ and } x \notin B$?
• Well formulated question - shows your attempt at resolution. In naive set theory, $x \notin A$ is the same as $x \in A^c$. – Tom Collinge Jul 1 '14 at 8:21
• $(A \cup B)^c$ corresponds to "$\text{not } (x \in A \text{ or } x \in B)$", not "$x \notin A \text{ or } x \notin B$". – Tunococ Jul 1 '14 at 8:35
• Why you do not read the answers below ? $x∈(A \cup B)^c$ is $x∉ A \cup B$, but this is not $x∉A$ or $x∉B$. If $x$ does not belong to the "union" of two sets $A$ and $B$, it is not included in $A$ nor in $B$. Thus we have $x∉A$ and $x∉B$. If $A$ is a set of cats and $B$ is a set of dogs, what means for a mouse to be $\notin A \cup B$ ? It means that it is not a cat nor a dog; i.e. mouse $\notin A$ and mouse $\notin B$. – Mauro ALLEGRANZA Jul 1 '14 at 10:16
This is essentially a rephrasing of Mauro's answer. But focusing on the exact spot in your derivation where you go wrong. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126475856414,
"lm_q1q2_score": 0.886703697656327,
"lm_q2_score": 0.9059898222871763,
"openwebmath_perplexity": 414.3442369745594,
"openwebmath_score": 0.8203661441802979,
"tags": null,
"url": "https://math.stackexchange.com/questions/853000/what-is-the-truth-table-for-demorgans-law"
} |
$x \notin A \cup B \Rightarrow x \notin A \text{ or } x \notin B, \text{ by definition of set union}$
This is false. The definition of set union does not use the $\notin$ relation.
A correct derivation can go;
$\begin{array} {cc} x \in (A \cup B)^c &\Rightarrow & x \notin A \cup B &,\text{ by definition of set complement}\\ &\Rightarrow & \text{not }(x\in (A \cup B))&, \text{ by definition of}\notin\\ &\Rightarrow & \text{not }(x\in A \text{ or } x \in B)&, \text{ by definition of set union} \\\end{array}$
• Thanks, your answer is really useful. How do you justify $x \notin A \text{ and } x \notin B$ from the last implication? Is it just "by logical equivalence" or are there more intervening steps? The solution to negating an 'or' statement that I've seen invokes Demorgan's law but in this case, I am trying to prove demorgan's law so I am not sure how to proceed further. – mauna Jul 1 '14 at 15:57
• @mauna De Morgan's laws for boolean algebra ($\neg(a\vee b)\rightarrow (\neg a)\wedge(\neg b)$). This only involve two propositions, so only four cases. It can be proven by inspection. – Taemyr Jul 2 '14 at 7:33
It is correct to say that :
$x \notin A$ is the same as saying $x \in A^c$.
But your mistake is that, the truth-table for :
$(A \cup B)^c$
must be entered for the rows :
$x \in A$ or $x \in B$
and then "complemented", i.e. exchanging $T$ with $F$ and vice versa. In this way, you will check that it coincide with that for $x \notin A$ and $x \notin B$ (i.e.$A^c \cap B^c$).
You have "calculated" : $x \notin A$ or $x \notin B$, which is : $A^c \cup B^c$, and this clearly does not "match" with : $A^c \cap B^c$.
Note
Set union is "equivalent" to disjunction (or) while set intersection is "equivalent" to conjunction (and) and complementation is like negation (not).
Thus, De Morgan's laws acts on set operators in the same way as in propositional logic or boolean algebra.
In propositional logic we have that : | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126475856414,
"lm_q1q2_score": 0.886703697656327,
"lm_q2_score": 0.9059898222871763,
"openwebmath_perplexity": 414.3442369745594,
"openwebmath_score": 0.8203661441802979,
"tags": null,
"url": "https://math.stackexchange.com/questions/853000/what-is-the-truth-table-for-demorgans-law"
} |
In propositional logic we have that :
$\lnot (P \land Q) \Leftrightarrow (\lnot P \lor \lnot Q)$
and :
$\lnot (P \lor Q) \Leftrightarrow (\lnot P \land \lnot Q)$.
These formulae can be easily translated into "set language" as :
$(A \cap B)^c = A^c \cup B^c$
and :
$(A \cup B)^c = A^c \cap B^c$.
Your problem is in equating $(A \cup B)^c$ with $x \notin A$ or $x \notin B$. It should be $x \notin A$ AND $x \notin B$, after which you will get correspondence in lines 2 and 3 in your truth table.
$A \cup B$ = $x \in A$ or $x \in B$
$(A \cup B)^c$ = not ($x \in A$ or $x \in B$ ) = $x \notin A$ AND $x \notin B$
You're just fine! The truth table for $x\in (A\cup B)^c$ is: $$\begin{array}{ccc|c} x\in A & x \in B & x \in A\cup B & x \in (A\cup B)^c \\ \hline T & T & T& F\\ T & F & T& F\\ F & T & T& F\\ F & F & F& T \end{array}$$
The truth table for $x\in A^c \cap B^c$ is:
$$\begin{array}{cccc|c} x\in A & x \in B & x \in A^c & x \in B^c & x\in A^c\wedge x\in B^c\\ \hline T & T & F& F & F\\ T & F & F& T & F\\ F & T & T& F & F\\ F & F & T& T & T \end{array}$$
So they are the same!
• You haven't explained where the OP has gone wrong. – jwg Jul 1 '14 at 14:07 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126475856414,
"lm_q1q2_score": 0.886703697656327,
"lm_q2_score": 0.9059898222871763,
"openwebmath_perplexity": 414.3442369745594,
"openwebmath_score": 0.8203661441802979,
"tags": null,
"url": "https://math.stackexchange.com/questions/853000/what-is-the-truth-table-for-demorgans-law"
} |
Find the Numbers
Status
Not open for further replies.
Full Member
There are two numbers whose sum is 53. Three times the smaller number is equal to 19 more than the larger number. What are the numbers?
Set up:
Let x = large number
Let y = small number
x + y = 53...Equation A
3y = x + 19....Equation B
x + y = 53
y = 53 - x...Plug into B.
3(53 - x) = x + 19
159 - 3x = x + 19
-3x - x = 19 - 159
-4x = -140
x = -140/-4
x = 35...Plug into A or B.
I will use A.
35 + y = 53
y = 53 - 35
y = 18.
The numbers are 18 and 35.
Yes?
JeffM
Elite Member
Do the numbers satisfy both equation?
$$\displaystyle 35 + 18 = 53.$$ Checks.
$$\displaystyle 3 * 18 = 54 = 35 + 19.$$ Checks.
In algebra, you can always check your own MECHANICAL work, and you should. It avoids mistakes, builds confidence, is a necessary skill for taking tests, and, most importantly, is what you will need in any job that expects you to be able to do math.
Subhotosh Khan
Super Moderator
Staff member
There are two numbers whose sum is 53. Three times the smaller number is equal to 19 more than the larger number. What are the numbers?
Set up:
Let x = large number
Let y = small number
x + y = 53...Equation A
3y = x + 19....Equation B
x + y = 53
y = 53 - x...Plug into B.
3(53 - x) = x + 19
159 - 3x = x + 19
-3x - x = 19 - 159
-4x = -140
x = -140/-4
x = 35...Plug into A or B.
I will use A.
35 + y = 53
y = 53 - 35
y = 18.
The numbers are 18 and 35.
Yes?
When possible check your work. Most of the time that is a part of the process of solution.
There is a shorter way to accomplish the algebra/arithmetic part.
You have two equations,
x + y = 53...Equation A
3y = x + 19....Equation B
rewrite B to collect all the unknowns to LHS
x + y = 53...Equation A
3y - x = 19....Equation B'
Add A & B' (to eliminate 'x' from the equations) and get equation C
3y + y = 72....Equation C
4y = 72
y = 18
Use this value in equation 'A'
x + 18 = 53...Equation A
x = 53- 18 = 35 | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513889704252,
"lm_q1q2_score": 0.8866697897163577,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 1049.6570471766727,
"openwebmath_score": 0.5561308264732361,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/find-the-numbers.115989/"
} |
4y = 72
y = 18
Use this value in equation 'A'
x + 18 = 53...Equation A
x = 53- 18 = 35
Now check your solution......
Full Member
When possible check your work. Most of the time that is a part of the process of solution.
There is a shorter way to accomplish the algebra/arithmetic part.
You have two equations,
x + y = 53...Equation A
3y = x + 19....Equation B
rewrite B to collect all the unknowns to LHS
x + y = 53...Equation A
3y - x = 19....Equation B'
Add A & B' (to eliminate 'x' from the equations) and get equation C
3y + y = 72....Equation C
4y = 72
y = 18
Use this value in equation 'A'
x + 18 = 53...Equation A
x = 53- 18 = 35
Now check your solution......
What is wrong with my method?
Dr.Peterson
Elite Member
Nothing is wrong with your method. You used substitution, and did it correctly; Khan used addition, which can take just a little less writing than what you did, but is certainly not the only correct way, or even necessarily "better".
Full Member
Nothing is wrong with your method. You used substitution, and did it correctly; Khan used addition, which can take just a little less writing than what you did, but is certainly not the only correct way, or even necessarily "better".
There are several methods for solving two equations in two variables, right? Matrix algebra is another useful tool.
Dr.Peterson
Elite Member
Correct.
In fact, each method can be applied to a given system of equations in several ways (which makes it interesting to grade tests). You can solve either equation for either variable and substitute, or eliminate either variable from the equations by adding, then get the other variable in a couple ways. And you can solve the matrix form by several different techniques. When there are three or more variables, it gets even better!
But still, solving the equations is the "easy" (routine) part, compared to setting them up from a word problem.
Full Member
Correct. | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513889704252,
"lm_q1q2_score": 0.8866697897163577,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 1049.6570471766727,
"openwebmath_score": 0.5561308264732361,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/find-the-numbers.115989/"
} |
Full Member
Correct.
In fact, each method can be applied to a given system of equations in several ways (which makes it interesting to grade tests). You can solve either equation for either variable and substitute, or eliminate either variable from the equations by adding, then get the other variable in a couple ways. And you can solve the matrix form by several different techniques. When there are three or more variables, it gets even better!
But still, solving the equations is the "easy" (routine) part, compared to setting them up from a word problem.
We can also graph two equations to see where they cross each other. The crossing point is the solution in the form (x, y).
Jomo
Elite Member
I know that you can check these problems. Just admit that you like posting here. | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513889704252,
"lm_q1q2_score": 0.8866697897163577,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 1049.6570471766727,
"openwebmath_score": 0.5561308264732361,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/find-the-numbers.115989/"
} |
Help with a proof.
• Jan 19th 2010, 07:26 PM
seven.j
Help with a proof.
Hi, I'm stuck at proving the following question...
Prove that for all n>0,
1/2 + 2/2^2 + 3/2^3 + ... + n/2^n = 2 - (n+2)/2^n
I've tried all sorts of different ways of solving this, but to no avail.
Any help is appreciated :)
• Jan 19th 2010, 07:50 PM
Drexel28
Quote:
Originally Posted by seven.j
Hi, I'm stuck at proving the following question...
Prove that for all n>0,
1/2 + 2/2^2 + 3/2^3 + ... + n/2^n = 2 - (n+2)/2^n
I've tried all sorts of different ways of solving this, but to no avail.
Any help is appreciated :)
$\sum_{k=1}^{n}\frac{k}{2^k}$. Note that $\sum_{k=1}
^n x^k=\frac{x^{n+1}-x}{x-1}$
. Differentiating both sides and multiplying by $x$ gives $\sum_{k=1}^{n}k\cdot x^k=...$ figure the right side out.
• Jan 19th 2010, 07:54 PM
Krizalid
$\sum\limits_{j=1}^{n}{\frac{j}{2^{j}}}=\sum\limits _{j=1}^{n}{\sum\limits_{k=1}^{j}{\frac{1}{2^{j}}}} =\sum\limits_{k=1}^{n}{\frac{1}{2^{k}}\left( \sum\limits_{j=0}^{n-k}{2^{-j}} \right)}=\frac{1}{2^{n}}\sum\limits_{k=1}^{n}{\fra c{1}{2^{k}}\left( 2^{n+1}-2^{k} \right)},$ you can do the rest, those are finite geometric sums.
• Jan 19th 2010, 08:37 PM
Soroban
Hello, seven!
Here's one way . . .
Quote:
Prove that for all $n>0\!:$
. . $\frac{1}{2}+ \frac{2}{2^2} + \frac{3}{2^3} +\:\hdots\:+ \frac{n}{2^n} \; =\; 2 - \frac{n+2}{2^n}$
$\begin{array}{ccccc}
\text{We have:} &S &=& \dfrac{1}{2} + \dfrac{2}{2^2} + \dfrac{3}{2^3} + \dfrac{4}{2^4} + \:\hdots\:+\dfrac{n}{2^n}\qquad\qquad \\ \\[-3mm]
\text{Multiply by }\dfrac{1}{2}\!: & \dfrac{1}{2}S &=& \quad\;\; \dfrac{1}{2^2} + \dfrac{2}{2^3} + \dfrac{3}{2^4} + \hdots + \dfrac{n-1}{2^n} + \dfrac{n}{2^{n+1}}\end{array}$
. . . $\text{Subtract: }\quad \frac{1}{2}S \;=\;\underbrace{\frac{1}{2} + \frac{1}{2^2} + \frac{1}{2^3} + \frac{1}{2^4} + \hdots + \frac{1}{2^n}}_{\text{geometric series}} - \frac{n}{2^{n+2}}$ .[1] | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9875683473173829,
"lm_q1q2_score": 0.8865354479121262,
"lm_q2_score": 0.897695283896349,
"openwebmath_perplexity": 678.5717692280843,
"openwebmath_score": 0.9378002882003784,
"tags": null,
"url": "http://mathhelpforum.com/number-theory/124509-help-proof-print.html"
} |
The geometric series has the sum: . $\frac{1}{2}\cdot\frac{1 - \left(\frac{1}{2}\right)^n}{1-\frac{1}{2}} \;=\;1 - \frac{1}{2^n}$
Then [1] becomes: . $\frac{1}{2}S \;=\;\left(1 - \frac{1}{2^n}\right) - \frac{n}{2^{n+1}} \;=\;1 - \frac{n+2}{2^{n+1}}$
Multiply by 2: . $S \;=\;2 - \frac{n+2}{2^n}$
• Jan 19th 2010, 09:19 PM
Jhevon
Quote:
Originally Posted by seven.j
Hi, I'm stuck at proving the following question...
Prove that for all n>0,
1/2 + 2/2^2 + 3/2^3 + ... + n/2^n = 2 - (n+2)/2^n
I've tried all sorts of different ways of solving this, but to no avail.
Any help is appreciated :)
This problem also can be done by induction pretty easily. if you're interested, you can try it that way. to me it was the most knee-jerk approach to try, and it worked out great. but you have lots of nice approaches here to choose from | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9875683473173829,
"lm_q1q2_score": 0.8865354479121262,
"lm_q2_score": 0.897695283896349,
"openwebmath_perplexity": 678.5717692280843,
"openwebmath_score": 0.9378002882003784,
"tags": null,
"url": "http://mathhelpforum.com/number-theory/124509-help-proof-print.html"
} |
# Problem 2.1
## Insertion sort on small arrays in merge sort
Although merge sort runs in $\Theta(\lg{n})$ worst-case time and insertion sort runs in $\Theta(n^2)$ worst-case time, the constant factors in insertion sort can make it faster in practice for small problem sizes on many machines. Thus, it makes sense to coarsen the leaves of the recursion by using insertion sort within merge sort when subproblems become sufficiently small. Consider a modification to merge sort in which $n/k$ sublists of length $k$ are sorted using insertion sort and then merged using the standard merging mechanism, where $k$ is a value to be determined.
1. Show that insertion sort can sort the $n/k$ sublists, each of length $k$, in $\Theta(nk)$ worst-case time.
2. Show how to merge the sublists in $\Theta(n\lg(n/k))$ worst-case time.
3. Given that the modified algorithm runs in $\Theta(nk + n\lg(n/k))$ worst-case time, what is the largest value of $k$ as a function of $n$ for which the modified algorithm has the same running time as standard merge sort, in terms of $\Theta$-notation?
4. How should we choose $k$ in practice?
### 1. Sorting sublists
This is simple enough. We know that sorting each list takes $ak^2 + bk + c$ for some constants $a$, $b$ and $c$. We have $n/k$ of those, thus:
$$\frac{n}{k}(ak^2 + bk + c) = ank + bn + \frac{cn}{k} = \Theta(nk)$$
### 2. Merging sublists
This is a bit trickier. Sorting $a$ sublists of length $k$ each takes:
$$T(a) = \begin{cases} 0 & \text{if } a = 1, \\ 2T(a/2) + ak & \text{if } a = 2^p, \text{if } p > 0. \end{cases}$$
This makes sense, since merging one sublist is trivial and merging $a$ sublists means splitting dividing them in two groups of $a/2$ lists, merging each group recursively and then combining the results in $ak$ steps, since have two arrays, each of length $\frac{a}{2}k$.
I don't know the master theorem yet, but it seems to me that the recurrence is actually $ak\lg{a}$. Let's try to prove this via induction: | {
"domain": "skanev.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399043329855,
"lm_q1q2_score": 0.8864854272294476,
"lm_q2_score": 0.9136765281148512,
"openwebmath_perplexity": 5105.9980972966405,
"openwebmath_score": 0.623930811882019,
"tags": null,
"url": "http://clrs.skanev.com/02/problems/01.html"
} |
Base. Simple as ever:
$$T(1) = 1k\lg1 = k \cdot 0 = 0$$
Step. We assume that $T(a) = ak\lg{a}$ and we calculate $T(2a)$:
\begin{align} T(2a) &= 2T(a) + 2ak = 2(T(a) + ak) = 2(ak\lg{a} + ak) = \\ &= 2ak(\lg{a} + 1) = 2ak(\lg{a} + \lg{2}) = 2ak\lg(2a) \end{align}
This proves it. Now if we substitue the number of sublists $n/k$ for $a$:
$$T(n/k) = \frac{n}{k}k\lg{\frac{n}{k}} = n\lg(n/k)$$
While this is exact only when $n/k$ is a power of 2, it tells us that the overall time complexity of the merge is $\Theta(n\lg(n/k))$.
### 3. The largest value of k
The largest value is $k = \lg{n}$. If we substitute, we get:
$$\Theta(n\lg{n} + n\lg{\frac{n}{\lg{n}}}) = \Theta(n\lg{n})$$
If $k = f(n) > \lg{n}$, the complexity will be $\Theta(nf(n))$, which is larger running time than merge sort.
### 4. The value of k in practice
It's constant factors, so we just figure out when insertion sort beats merge sort, exactly as we did in exercise 1.2.2, and pick that number for $k$.
### Runtime comparison
I'm implemented this in C and in Python. I added selection for completeness sake in the C version. I ran two variants, depending on whether merge() allocates its arrays on the stack or on the heap (stack won't work for huge arrays). Here are the results:
STACK ALLOCATION
================
merge-sort = 0.173352
mixed-insertion = 0.150485
mixed-selection = 0.165806
HEAP ALLOCATION
===============
merge-sort = 1.731111
mixed-insertion = 0.903480
mixed-selection = 1.017437
Here's the results I got from Python:
merge-sort = 2.6207s
mixed-sort = 1.4959s
I can safely conclude that this approach is faster.
### C runner output
merge-sort = 0.153748
merge-insertion = 0.064804
merge-selection = 0.069240
### Python runner output
merge-sort = 0.1067s
mixed-sort = 0.0561s
### C code
#include <stdlib.h>
#include <string.h>
#define INSERTION_SORT_TRESHOLD 20
#define SELECTION_SORT_TRESHOLD 15
void merge(int A[], int p, int q, int r) {
int i, j, k; | {
"domain": "skanev.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399043329855,
"lm_q1q2_score": 0.8864854272294476,
"lm_q2_score": 0.9136765281148512,
"openwebmath_perplexity": 5105.9980972966405,
"openwebmath_score": 0.623930811882019,
"tags": null,
"url": "http://clrs.skanev.com/02/problems/01.html"
} |
void merge(int A[], int p, int q, int r) {
int i, j, k;
int n1 = q - p + 1;
int n2 = r - q;
#ifdef MERGE_HEAP_ALLOCATION
int *L = calloc(n1, sizeof(int));
int *R = calloc(n2, sizeof(int));
#else
int L[n1];
int R[n2];
#endif
memcpy(L, A + p, n1 * sizeof(int));
memcpy(R, A + q + 1, n2 * sizeof(int));
for(i = 0, j = 0, k = p; k <= r; k++) {
if (i == n1) {
A[k] = R[j++];
} else if (j == n2) {
A[k] = L[i++];
} else if (L[i] <= R[j]) {
A[k] = L[i++];
} else {
A[k] = R[j++];
}
}
#ifdef MERGE_HEAP_ALLOCATION
free(L);
free(R);
#endif
}
void merge_sort(int A[], int p, int r) {
if (p < r) {
int q = (p + r) / 2;
merge_sort(A, p, q);
merge_sort(A, q + 1, r);
merge(A, p, q, r);
}
}
void insertion_sort(int A[], int p, int r) {
int i, j, key;
for (j = p + 1; j <= r; j++) {
key = A[j];
i = j - 1;
while (i >= p && A[i] > key) {
A[i + 1] = A[i];
i = i - 1;
}
A[i + 1] = key;
}
}
void selection_sort(int A[], int p, int r) {
int min, temp;
for (int i = p; i < r; i++) {
min = i;
for (int j = i + 1; j <= r; j++)
if (A[j] < A[min])
min = j;
temp = A[i];
A[i] = A[min];
A[min] = temp;
}
}
void mixed_sort_insertion(int A[], int p, int r) {
if (p >= r) return;
if (r - p < INSERTION_SORT_TRESHOLD) {
insertion_sort(A, p, r);
} else {
int q = (p + r) / 2;
mixed_sort_insertion(A, p, q);
mixed_sort_insertion(A, q + 1, r);
merge(A, p, q, r);
}
}
void mixed_sort_selection(int A[], int p, int r) {
if (p >= r) return;
if (r - p < SELECTION_SORT_TRESHOLD) {
selection_sort(A, p, r);
} else {
int q = (p + r) / 2;
mixed_sort_selection(A, p, q);
mixed_sort_selection(A, q + 1, r);
merge(A, p, q, r);
}
}
### Python code
from itertools import repeat
def insertion_sort(A, p, r):
for j in range(p + 1, r + 1):
key = A[j]
i = j - 1
while i >= p and A[i] > key:
A[i + 1] = A[i]
i = i - 1
A[i + 1] = key
def merge(A, p, q, r):
n1 = q - p + 1
n2 = r - q
L = list(repeat(None, n1))
R = list(repeat(None, n2))
for i in range(n1):
L[i] = A[p + i]
for j in range(n2):
R[j] = A[q + j + 1] | {
"domain": "skanev.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399043329855,
"lm_q1q2_score": 0.8864854272294476,
"lm_q2_score": 0.9136765281148512,
"openwebmath_perplexity": 5105.9980972966405,
"openwebmath_score": 0.623930811882019,
"tags": null,
"url": "http://clrs.skanev.com/02/problems/01.html"
} |
for i in range(n1):
L[i] = A[p + i]
for j in range(n2):
R[j] = A[q + j + 1]
i = 0
j = 0
for k in range(p, r + 1):
if i == n1:
A[k] = R[j]
j += 1
elif j == n2:
A[k] = L[i]
i += 1
elif L[i] <= R[j]:
A[k] = L[i]
i += 1
else:
A[k] = R[j]
j += 1
def merge_sort(A, p, r):
if p < r:
q = int((p + r) / 2)
merge_sort(A, p, q)
merge_sort(A, q + 1, r)
merge(A, p, q, r)
def mixed_sort(A, p, r):
if p >= r: return
if r - p < 20:
insertion_sort(A, p, r)
else:
q = int((p + r) / 2)
mixed_sort(A, p, q)
mixed_sort(A, q + 1, r)
merge(A, p, q, r) | {
"domain": "skanev.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399043329855,
"lm_q1q2_score": 0.8864854272294476,
"lm_q2_score": 0.9136765281148512,
"openwebmath_perplexity": 5105.9980972966405,
"openwebmath_score": 0.623930811882019,
"tags": null,
"url": "http://clrs.skanev.com/02/problems/01.html"
} |
## Theorem
The sum of the cubes of three consecutive natural numbers is a multiple of 9.
## Proof
First, introducing a predicate $P$ over $\mathbb{N}$, we rephrase the theorem as follows. $$\forall n \in \mathbb{N}, P(n) \quad \text{where} \quad P(n) \, := \, n^3 + (n + 1)^3 + (n + 2)^3 \text{ is a multiple of 9}$$ We prove the theorem by induction on $n$.
### Basis
Below, we show that we have $P(n)$ for $n = 0$. $$0^3 + 1^3 + 2^3 = 0 + 1 + 8 = 9 = 9 \cdot 1$$
### Inductive step
Below, we show that for all $n \in \mathbb{N}$, $P(n) \Rightarrow P(n + 1)$.
Let $k \in \mathbb{N}$. We assume that $P(k)$ holds. In the following, we use this assumption to show that $P(k + 1)$ holds.
By the assumption, there is a $i \in \mathbb{N}$ such that $i \cdot 9 = k^3 + (k + 1)^3 + (k + 2)^3$. We use this fact in the following equivalent transformation. The transformation turns the sum of cubes in the first line, for which we need to show that it is a multiple of 9, into a product of 9 and another natural number.
$(k + 1)^3 + (k + 2)^3 + (k + 3)^3 \\ = (k + 1)^3 + (k + 2)^3 + k^3 + 9k^2 + 27k + 27 \\ = k^3 + (k + 1)^3 + (k + 2)^3 + 9k^2 + 27k + 27 \quad | \text{ using the induction hypothesis} \\ = 9i + 9k^2 + 27k + 27 \\ = 9 \cdot i + 9 \cdot k^2 + 9 \cdot 3k + 9 \cdot 3 \\ = 9 \cdot (i + k^2 + 3k + 3)$
We see that the above product has precisely two factors: 9 and another natural number. Thus the product is a multiple of 9. This completes the induction. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9859363721302858,
"lm_q1q2_score": 0.8864764668114755,
"lm_q2_score": 0.899121375242593,
"openwebmath_perplexity": 427.70762266935674,
"openwebmath_score": 0.9053394794464111,
"tags": null,
"url": "http://math.stackexchange.com/questions/732445/my-first-induction-proof-very-simple-number-theory-please-mark-grade"
} |
-
Looks fine to me! – Braindead Mar 30 '14 at 13:02
someone should make something along the lines of markExchange instead of stackExchange. Marking instead of answering sounds fresh and good to me – Nicholas Kyriakides Mar 31 '14 at 3:59
Looks good. You could maybe add a Halmos to the end, to be extra if not overly formal, $\square$. Check out math.stackexchange.com/questions/56606/… – guydudebro Mar 31 '14 at 4:42
@NicholasKyriakides There already is codereview.stackexchange.com, which is essentially "marking code". Perhaps a proofreview StackExchange would be useful. – Ixrec Mar 8 at 21:19
I do not think that this is a real question but if you were my student i would give you an A.
It is all fine to me.
-
It's fine, here's a simpler proof without induction:
$n^3\equiv n\ (\text{mod }3)$, because it obviously holds for $n=-1,0,1$.
Therefore $3n^3\equiv3n\ (\text{mod 9})$ and $$(n-1)^3+n^3+(n+1)^3\equiv3n^3+6n\equiv0\ (\text{mod }9)$$
-
i.e. $\ {\rm mod}\ 9\!:\ 3n^3\!+6n\equiv 3(n^3\!-n)\equiv 0\$ by little Fermat. – Bill Dubuque Mar 30 '14 at 13:16
Formulation, base case, inductive hypothesis, inductive step, it all looks good. :)
One might also conclude with a clarifying statement about what has been done - that the hypothesis is true for all $n \in \Bbb N$.
-
What do you think about the following statement? "By the basis, the inductive step, and the principle of induction; $P(n)$ is true for all $n \in \mathbb{N}$." – DracoMalfoy Mar 30 '14 at 13:51 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9859363721302858,
"lm_q1q2_score": 0.8864764668114755,
"lm_q2_score": 0.899121375242593,
"openwebmath_perplexity": 427.70762266935674,
"openwebmath_score": 0.9053394794464111,
"tags": null,
"url": "http://math.stackexchange.com/questions/732445/my-first-induction-proof-very-simple-number-theory-please-mark-grade"
} |
# How can I algebraically prove that $2^n - 1$ is not always prime?
This question is from Elementary Number Theory by W. Edwin Clark.
Is $2^n - 1$ always prime, or not? Prove.
Is this a start? $x^n - 1 = ( x - 1)(1 + x + x^2 \cdots x^{n - 1})$. So, $2^n - 1 = \sum \limits _{i = 0}^{n - 1} 2^i.$
Will I reach a solution through the above, or is there any other way?
I know that the property doesn't hold true for $n = 1,4,6$ et al but I want an algebraic proof.
-
I think the question can be interpreted as "prove that there are infinitely many $n$ such that $2^n-1$ is not prime". Otherwise, as @Hurkyl mentioned, you have already proved your own statement. – akkkk Dec 22 '12 at 10:40
HINT: If $n=ab$, then $2^a-1$ is a factor of $2^n-1$.
-
And what would be the factored form of $2^{ab} - 1$? :-) P.S.: Hey Brian! – Parth Kohli Dec 22 '12 at 10:40
Gee, I wonder: $2^{ab}-1=\left(2^a\right)^b-1^b=\ldots~$ nope, too hard for me. :-) Actually, the really cute way to see it is to write the numbers in binary: $2^{ab}$ is a string of $ab$ $1$’s. – Brian M. Scott Dec 22 '12 at 10:43
@DumbCow - try using the factorisation you have given in the question with an appropriate choice of $x$ – Mark Bennet Dec 22 '12 at 10:43
@Markbennet: Oh yes, thanks. – Parth Kohli Dec 22 '12 at 10:44
I know that the property doesn't hold true for n=1,4,6 et al.
I just want to clearly point out that this statement all by itself (or possibly with a calculation demonstrating the truth of the statement) constitutes a proof of the question asked.
-
Take $n=4$. Then $2^n-1=16-1=15=3\cdot 5$ which is not a prime. The statement is proven, that is $2^n-1$ is not always a prime. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769113660689,
"lm_q1q2_score": 0.8864266330523352,
"lm_q2_score": 0.9086178882719769,
"openwebmath_perplexity": 495.7533001353958,
"openwebmath_score": 0.8731039762496948,
"tags": null,
"url": "http://math.stackexchange.com/questions/263640/how-can-i-algebraically-prove-that-2n-1-is-not-always-prime"
} |
EDIT: Why this is a formal proof: We want to prove that $$\neg (\forall n\in \mathbb{N})(2^n-1\in \mathbb{P})$$ or equivalently that $$(\exists n\in \mathbb{N})\neg (2^n-1\in \mathbb{P})$$ or even $$(\exists n\in \mathbb{N})(2^n-1\notin \mathbb{P})$$ Since $\exists 4\in \mathbb{N}$ and $2^4-1\notin \mathbb{P}$, the statement is proven.
-
It is a proof... – Parth Kohli Dec 22 '12 at 10:37
@DumbCow This is a proof! – Nameless Dec 22 '12 at 10:37
It should be a formal proof :) – Parth Kohli Dec 22 '12 at 10:37
@DumbCow I believe I now fully justified why this is a rigorous proof – Nameless Dec 22 '12 at 10:46
Looks legit pretty much :) – Parth Kohli Dec 22 '12 at 10:51
If $n$ is even say $n = 2m$ then $2^n - 1 = 2^{2m } -1 = (2^m + 1)(2^m - 1)$ which is not prime. More generally if $n$ is composite then by the formula for the sum of a geometric series we get that...
-
I like it :-). So, the main point of our proof is that it is not prime since it has factors. – Parth Kohli Dec 22 '12 at 10:38
You might like to ponder why $2047 = 23 \times 89$ is a different kind of example from those already given in previous answers.
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769113660689,
"lm_q1q2_score": 0.8864266330523352,
"lm_q2_score": 0.9086178882719769,
"openwebmath_perplexity": 495.7533001353958,
"openwebmath_score": 0.8731039762496948,
"tags": null,
"url": "http://math.stackexchange.com/questions/263640/how-can-i-algebraically-prove-that-2n-1-is-not-always-prime"
} |
Calculations include side lengths, corner angles, diagonals, height, perimeter and area of parallelograms. where is the two-dimensional cross product and is the determinant.. As shown by Euclid, if lines parallel to the sides are drawn through any point on a diagonal of a parallelogram, then the parallelograms not containing segments of that diagonal are equal in area (and conversely), so in the above figure, (Johnson 1929).. Some of the properties of a parallelogram are that its opposite sides are equal, its opposite angles are equal and its diagonals bisect each other. This is the currently selected item. The Diagonals of a Parallelogram Abcd Intersect at O. There are several rules involving: the angles of a parallelogram ; the sides of a parallelogram ; the diagonals of a parallelogram Area = 6 m × 3 m = 18 m 2. It is done with the help of law of cosines . The diagonals of a parallelogram bisect each other. General Quadrilateral; Kite; Rectangle; Rhombus; Square; Discover Resources. In mathematics, the simplest form of the parallelogram law (also called the parallelogram identity) belongs to elementary geometry.It states that the sum of the squares of the lengths of the four sides of a parallelogram equals the sum of the squares of the lengths of the two diagonals. 1 answer. MCQ in Plane Geometry. Therefore, a square has all the properties of a rectangle and a rhombus. Apply the formula from the Theorem. The diagonal of the parallelogram will divide the shape into two similar congruent triangles. Area of a Parallelogram : The Area is the base times the height: Area = b × h (h is at right angles to b) Example: A parallelogram has a base of 6 m and is 3 m high, what is its Area? Next lesson. Try this Drag the orange dots on each vertex to reshape the parallelogram. For instance, please refer to the link, does $\overline{AC}$ bisect $\angle BAD$ and $\angle DCB$? If you make the diagonals almost parallel to one another - you will have a parallelogram with height | {
"domain": "go.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8864266309917127,
"lm_q2_score": 0.9086178901278738,
"openwebmath_perplexity": 558.3587319306432,
"openwebmath_score": 0.754198431968689,
"tags": null,
"url": "http://www.virtualmuseum.finearts.go.th/sudbury-cable-lcpi/page.php?12d573=diagonal-of-parallelogram"
} |
If you make the diagonals almost parallel to one another - you will have a parallelogram with height close to zero, and thus an area close to zero. The diagonals of the Varignon parallelogram are the bimedians of the original quadrilateral. פרבולה וכפל - מה הקשר? Solution (1) AC=24 //Given Vector velocity and vector Up: Motion in 3 dimensions Previous: Scalar multiplication Diagonals of a parallelogram The use of vectors is very well illustrated by the following rather famous proof that the diagonals of a parallelogram mutually bisect one another. The rectangle has the following properties: All the properties of a parallelogram apply (the ones that matter here are parallel sides, opposite sides are congruent, and diagonals bisect each other). P inoyBIX educates thousands of reviewers and students a day in preparation for their board … With that being said, I was wondering if within parallelogram the diagonals bisect the angles which the meet. Because the parallelogram has adjacent angles as acute and obtuse, the diagonals split the figure into 2 pairs of congruent triangles. That is, each diagonal cuts the other into two equal parts. Check the picture. You get the equation = . These parallelograms have different areas. The answer is “maybe.” Diagonals of rhombi, which are parallelograms, do bisect the angles. Proof: Diagonals of a parallelogram. Test the conjecture with the diagonals of a rectangle. Please do Subscribe on YouTube! The two bimedians in a quadrilateral and the line segment joining the midpoints of the diagonals in that quadrilateral are concurrent and are all bisected by their point of intersection. What are the diagonals of a parallelogram? The diagonals of a parallelogram. Proof: The diagonals of a kite are perpendicular. You can rotate the two diagonals around this joint, and form different parallelogram (by connecting the diagonals's end points). So the areas of the parallelogram is (diagonal x diagonal /2 ), or 24x10/2=120, as above. The | {
"domain": "go.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8864266309917127,
"lm_q2_score": 0.9086178901278738,
"openwebmath_perplexity": 558.3587319306432,
"openwebmath_score": 0.754198431968689,
"tags": null,
"url": "http://www.virtualmuseum.finearts.go.th/sudbury-cable-lcpi/page.php?12d573=diagonal-of-parallelogram"
} |
So the areas of the parallelogram is (diagonal x diagonal /2 ), or 24x10/2=120, as above. The Perimeter is the distance around the edges. We can proceed to prove that this parallelogram is indeed a rhombus, using the fact that if a parallelogram's diagonals are perpendicular, it is a rhombus - and we've shown above that these diagonals are indeed perpendicular. Make a conjecture about the diagonals of a parallelogram. Opposite sides are congruent. Proof: Rhombus diagonals are perpendicular bisectors. A parallelogram is a quadrilateral in which both pairs of opposite sides are parallel. Answered by | 16th Aug, 2017, 04:15: PM. Proof: Rhombus area. Thus, the diagonals of a parallelogram bisect each other. Show that it is a rhombus. Diagonals of rectangles and general parallelograms, however, do not. You can use the calculator for each formula. Practice: Prove parallelogram properties. In the figure below diagonals AC and BD bisect each other. Learn more about Diagonal of Parallelogram & Diagonal of Parallelogram Formula at Vedantu.com A parallelogram where all angles are right angles is a rectangle! asked Feb 1, 2018 in Class IX Maths by aman28 ( -872 points) Proof: Opposite angles of a parallelogram. A diagonal of a parallelogram bisects one of its angles. 3. Since the angles are acute or obtuse, two of the shorter sides of the triangles, both acute and obtuse are congruent. The diagonals of a parallelogram bisect each other. The length of the shorter diagonal of a parallelogram is 10.73 . Find the area of the parallelogram whose diagonals are represented by the vectors - 4 i +2 j + k & 3 i – 2 j - k. asked Aug 22, 2018 in Mathematics by AnujPatel (53.5k points) vectors; 0 votes. person_outlineTimurschedule 2011-03-28 14:49:28. A parallelogram has two diagonals. Parallelogram definition, a quadrilateral having both pairs of opposite sides parallel to each other. The shape has the rotational symmetry of the order two. The diagonals are perpendicular bisectors of each | {
"domain": "go.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8864266309917127,
"lm_q2_score": 0.9086178901278738,
"openwebmath_perplexity": 558.3587319306432,
"openwebmath_score": 0.754198431968689,
"tags": null,
"url": "http://www.virtualmuseum.finearts.go.th/sudbury-cable-lcpi/page.php?12d573=diagonal-of-parallelogram"
} |
has the rotational symmetry of the order two. The diagonals are perpendicular bisectors of each other. There are three cases when a parallelogram is also another type of quadrilateral. The parallelogram has the following properties: Opposite sides are parallel by definition. Show that it is a rhombus. Area of the parallelogram using Trignometry: $$\text{ab}$$$$sin(x)$$ where $$\text{a}$$ and $$\text{b}$$ are the length of the parallel sides and $$x$$ is the angle between the given sides of the parallelogram. In a parallelogram, the diagonals bisect each other, so you can set the labeled segments equal to one another and then solve for . In a parallelogram, the sides are 8 cm and 6 cm long. A square may be considered as rectangle which has equal adjacent sides, or a rhombus with a right angle. Online Questions and Answers in Plane Geometry. Calculate the angle between diagonals of a parallelogram if given 1.Sides and diagonal 2.Sides and area of a parallelogram. Definition of Quadrilateral & special quadrilaterals: rectangle, square,... All Questions Ask Doubt. A parallelogram is a quadrilateral made from two pairs of intersecting parallel lines. The properties of the parallelogram are simply those things that are true about it. The diagonals of a parallelogram bisect each other. The adjacent angles of the parallelogram are supplementary. If ∠Boc = 90° and ∠Bdc = 50°, Then ∠Oab = - Mathematics If ∠Boc = 90° and ∠Bdc = 50°, Then ∠Oab = - Mathematics Question By … The diagonals bisect each other. So we have a parallelogram right over here. Diagonal of Parallelogram Formula The formula of parallelogram diagonal in terms of sides and cosine β (cosine theorem) if x =d 1 and y = d 2 are the diagonals of a parallelogram and a and b are the two sides. Then, substitute 4.8 for in each labeled segment to get a total of 11.2 for the diagonal … Rectangle: Rectangle is a special case of parallelogram in which measure of each interior angle is $$90^\circ$$. Solution Let x be the | {
"domain": "go.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8864266309917127,
"lm_q2_score": 0.9086178901278738,
"openwebmath_perplexity": 558.3587319306432,
"openwebmath_score": 0.754198431968689,
"tags": null,
"url": "http://www.virtualmuseum.finearts.go.th/sudbury-cable-lcpi/page.php?12d573=diagonal-of-parallelogram"
} |
case of parallelogram in which measure of each interior angle is $$90^\circ$$. Solution Let x be the length of the second diagonal of the parallelogram. Proofs of general theorems . Special parallelograms. A parallelogram is a quadrilateral with opposite sides parallel. Video transcript. The pair of opposite sides are equal and they are equal in length. The diagonals of a parallelogram bisect each other. Calculator computes the diagonals of a parallelogram and adjancent angles from side lengths and angle. See more. More Questions in: Plane Geometry. Which additional tool will you use? View Solution: Latest Problem Solving in Plane Geometry. The diagonals of a parallelogram are not equal. These properties concern its sides, angles, and diagonals. Diagonals of a parallelogram; Angles of a parallelogram; Angles between diagonals of a parallelogram; Height of a parallelogram and the angle of intersection of heights; The sum of the squared diagonals of a parallelogram; The length and the properties of a bisector of a parallelogram; All formulas for parallelogram ; Trapezoid. Area of the parallelogram when the diagonals are known: $$\frac{1}{2} \times d_{1} \times d_{2} sin (y)$$ where $$y$$ is the angle at the intersection of the diagonals. Calculate certain variables of a parallelogram depending on the inputs provided. Perimeter of a Parallelogram. The diagonals bisect each other. If you just look […] Consecutive angles are supplementary. Find the length of the second diagonal of the parallelogram. . This calculator computes the diagonals of a parallelogram and adjancent angles from side lengths and angle between sides. The diagonals bisect the angles. One diagonal is 5 cm long. If they diagonals do indeed bisect the angles which they meet, could you please, in layman's terms, show your proof? Related Videos. Construction of a parallelogram given the length of two diagonals and intersecting angles between them - example Construct a parallelogram whose diagonals are 4cm | {
"domain": "go.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8864266309917127,
"lm_q2_score": 0.9086178901278738,
"openwebmath_perplexity": 558.3587319306432,
"openwebmath_score": 0.754198431968689,
"tags": null,
"url": "http://www.virtualmuseum.finearts.go.th/sudbury-cable-lcpi/page.php?12d573=diagonal-of-parallelogram"
} |
and intersecting angles between them - example Construct a parallelogram whose diagonals are 4cm and 5cm and the angle between them is … A parallelogram whose angles are all … : p.125. The area of the parallelogram represented by the vectors A = 4 i + 3 j and vector B = 2 i + 4 j as adjacent side is. Notice the behavior of the two diagonals. Type your answer here… Related Topics. Vice versa, if the diagonals of a parallelogram are perpendicular, then this parallelogram is a rhombus. Opposite angles are congruent. In any parallelogram, the diagonals (lines linking opposite corners) bisect each other. Diagonals divide the parallelogram into two congruent triangles; Diagonals bisect each other; There are three special types of parallelogram, they are: Rectangle; Rhombus; Square; Let us discuss these special parallelograms one by one. DOWNLOAD PDF / PRINT . Type your answer here… Can you now draw a rectangle ? Angles as acute and obtuse are congruent parallel to each other 1 ) //Given... Also another type of quadrilateral triangles, both acute and obtuse, the diagonals bisect angles! Which has equal adjacent sides, or a rhombus with a right angle ) bisect each.. Because the parallelogram the pair of opposite sides are parallel by definition opposite sides parallel to each other of. Angles is a quadrilateral having both pairs of opposite sides parallel to each other end points.! Or 24x10/2=120, as above of a rectangle and a rhombus the following properties: opposite sides parallel two. ; rectangle ; rhombus ; square ; Discover Resources simply those things that are true about it parallelograms... Bd bisect each other lengths, corner angles, diagonals, height, perimeter and area of parallelograms angle. | 16th Aug, 2017, 04:15: PM are true about it are all … diagonals! Since the angles which they meet, could you please, in layman 's,. Three cases when a parallelogram whose angles are all … the diagonals the. As acute and obtuse, the diagonals of rectangles and general | {
"domain": "go.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8864266309917127,
"lm_q2_score": 0.9086178901278738,
"openwebmath_perplexity": 558.3587319306432,
"openwebmath_score": 0.754198431968689,
"tags": null,
"url": "http://www.virtualmuseum.finearts.go.th/sudbury-cable-lcpi/page.php?12d573=diagonal-of-parallelogram"
} |
angles are all … the diagonals the. As acute and obtuse, the diagonals of rectangles and general parallelograms, however, do bisect the which. Are 8 cm and 6 cm long ” diagonals of a rectangle the! = 18 m 2 diagonals of a rectangle all … the diagonals split the figure 2! Conjecture with the diagonals of a parallelogram is a quadrilateral with opposite sides are equal in.! Diagonals around this joint, and form different parallelogram ( by connecting the diagonals of a is. Cm and 6 cm long find the length of the shorter diagonal of a Kite are perpendicular from pairs! Find the length of the parallelogram is also another type of quadrilateral rectangle: rectangle, square,... Questions! Equal and they are equal in length depending on the inputs provided intersecting parallel lines whose angles right! Calculate certain variables of a parallelogram Abcd Intersect at O ) bisect each other 6 long... Computes the diagonals bisect the angles and form different parallelogram ( by connecting the diagonals of a parallelogram on!, if the diagonals 's end points ) between diagonals of a parallelogram a... Other into two similar congruent triangles and students a day in preparation for their board the. /2 ), or a rhombus with a right angle rectangle and a rhombus sides parallel. Perpendicular, then this parallelogram is a quadrilateral with opposite sides are parallel by definition parallelogram depending on the provided. Answer here… Can you now draw a rectangle they diagonals do indeed bisect the angles cuts the other two! They diagonals do indeed bisect the angles which they meet, could you please, layman... Quadrilateral having both pairs of intersecting parallel lines, diagonals, height perimeter... Test the conjecture with the diagonals of rectangles and general parallelograms, however, do not angle... Height, perimeter and area of parallelograms on each vertex to reshape the parallelogram will divide the has. They are equal and they are equal in length Can rotate the two | {
"domain": "go.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8864266309917127,
"lm_q2_score": 0.9086178901278738,
"openwebmath_perplexity": 558.3587319306432,
"openwebmath_score": 0.754198431968689,
"tags": null,
"url": "http://www.virtualmuseum.finearts.go.th/sudbury-cable-lcpi/page.php?12d573=diagonal-of-parallelogram"
} |
parallelogram will divide the has. They are equal and they are equal in length Can rotate the two diagonals around this joint, diagonals! ), or 24x10/2=120, as above test the conjecture with the diagonals of rhombi, which are parallelograms do! Can rotate the two diagonals around this joint, and diagonals,... Questions! … the diagonals of rhombi, which are parallelograms, do bisect the angles right. Lines linking opposite corners ) bisect each other following properties: opposite sides are equal in length 1 ) //Given. Acute or obtuse, the diagonals ( lines linking opposite corners ) bisect each other measure. And students a day in preparation for their board … the diagonals split the figure into pairs... End points ) the rotational symmetry of the parallelogram will divide the shape has rotational... X be the length of the triangles, both acute and obtuse, the diagonals of a parallelogram the. | {
"domain": "go.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8864266309917127,
"lm_q2_score": 0.9086178901278738,
"openwebmath_perplexity": 558.3587319306432,
"openwebmath_score": 0.754198431968689,
"tags": null,
"url": "http://www.virtualmuseum.finearts.go.th/sudbury-cable-lcpi/page.php?12d573=diagonal-of-parallelogram"
} |
diagonal of parallelogram 2021 | {
"domain": "go.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8864266309917127,
"lm_q2_score": 0.9086178901278738,
"openwebmath_perplexity": 558.3587319306432,
"openwebmath_score": 0.754198431968689,
"tags": null,
"url": "http://www.virtualmuseum.finearts.go.th/sudbury-cable-lcpi/page.php?12d573=diagonal-of-parallelogram"
} |
3,977 views
Consider the number given by the decimal expression:
$$16^3*9 + 16^2*7 + 16*5+3$$
The number of $1’s$ in the unsigned binary representation of the number is ______
### 1 comment
$16^3=2^{12}$ and multiplying a number in binary with $2^x$ means that we are shifting that number to the left by $x$ bits.
So, the number $16^3 . 9$ will be $1001(=9)$ shifted by $12$ bits to the left which will become $1001000000000000$.
Same we can do with other numbers as well and will find that there is no overlapping $1's$. So total $1's = 1's$ in $9,7,16,3$.
So the answer is $9$.
Result is $1001011101010011$.
### Subscribe to GO Classes for GATE CSE 2022
The hex representation of given no. is $(9753)_{16}$
Its binary representation is $(1001 0111 0101 0011)_2$
The no. of $1's$ is $9.$
by
$16^3∗9+16^2∗7+16∗5+3$
In Binary representation, each number which can be represented in the power of 2 contains only one 1.
For example 4 = 100, 32 = 100000
$16^3∗9+16^2∗7+16∗5+3$
Convert the given expression in powers of 2.
$16^3∗9+16^2∗7+16∗5+3$
$2^{12}∗(8+1)+2^8∗(4+2+1)+2^4∗(4+1)+(2+1)$
$2^{15}+2^{12}+2^{10}+2^9+2^8+2^6+2^4+2^1+ 2^0$
There are total 9 terms, hence, there will be nine 1's. for example 4+2 = 6 and 4 contains two 1's.
this should be the best solution
Yes, its best solution.
We can solve this also in a different way.
See 2, 4 8, 16..... can be written as
010000...(x times 0 depend upon the number)
i.e
2 = 010
4 = 0100
8 = 01000
16=010000 and so on.
So now if any number Y multiply with any of the above the answer will be Y followed by x times 0.
i.e.
if any number say 7 is multiplied with 16 answer will be
1110000.
So number of 1 will be the number of 1 in that number as multiplication with 2, 4 8 ,6.... can only increase 0 on it.
So number of 1 in
16^3∗9+16^2∗7+16∗5+3
is equal to
number of 1 in 9+
number of 1 in 7+
number of 1 in 5+
number of 1 in 3
=2+3+2+2
=9
### 1 comment | {
"domain": "gateoverflow.in",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307716151472,
"lm_q1q2_score": 0.8864236656502853,
"lm_q2_score": 0.9111797154386841,
"openwebmath_perplexity": 737.5600028960262,
"openwebmath_score": 0.7348429560661316,
"tags": null,
"url": "https://gateoverflow.in/500/gate-cse-1991-question-01-iii"
} |
### 1 comment
Nice analysis..
We can solve this also in a different way.
See 2, 4 8, 16..... can be written as
010000...(x times 0 depend upon the number)
i.e
2 = 010
4 = 0100
8 = 01000
16=010000 and so on.
So now if any number Y multiply with any of the above the answer will be Y followed by x times 0.
i.e.
if any number say 7 is multiplied with 16 answer will be
1110000.
So number of 1 will be the number of 1 in that number as multiplication with 2, 4 8 ,6.... can only increase 0 on it.
So number of 1
is equal to
number of 1 in 9+
number of 1 in 7+
number of 1 in 5+
number of 1 in 3
=2+3+2+2
=9
Convert this number into hexadecimal first, So to do this I will divide the given number by 16
$16^{3}*9+16^{2}*7+16*5+3$
as we can see that 16 is a common term in all except the last term, so on dividing by 16 we get 3 as remainder so next time the expression would be $16^{2}*9+16*7+5$ again upon division by 16 we would get 5 as remainder. Similarly, we would keep dividing and we would get 7 and 9 as the remainder respectively.
So the number in hexadecimal would be 9753 and we would just convert it into binary we get $(1001 0111 0101 0011)_{2}$
Hence 9 1's are there. | {
"domain": "gateoverflow.in",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307716151472,
"lm_q1q2_score": 0.8864236656502853,
"lm_q2_score": 0.9111797154386841,
"openwebmath_perplexity": 737.5600028960262,
"openwebmath_score": 0.7348429560661316,
"tags": null,
"url": "https://gateoverflow.in/500/gate-cse-1991-question-01-iii"
} |
# Chain and spinning disk problem
## Homework Statement
A chain is wrapped around a disk of radius R. The tension of chain is T. What is the coefficient of friction, if when the disk is spinning at angular velocity ω, the chain slips down?
See image attached.
## Homework Equations
II Newton law
$a_{centripetal} = \frac{v^2}{R}$
k = F \ N
## The Attempt at a Solution
I'm not even sure where to start - I don't really understand, why does the chain slip? Is it because friction can't 'hold' it anymore? Does chain tension depend on the rotation?
Can we say that the chain slips when F(friction) < mg ?
#### Attachments
• 4.8 KB Views: 394
Related Introductory Physics Homework Help News on Phys.org
Yes, it's from friction. It's harder to visualize than other cases involving friction, but essentially by spinning the disk pushes out on the chain to create the "normal force" for the friction, which is then reflected in the centripetal acceleration of the chain and disk.
1 person
So then the normal force of the chain is
$N = ma_{centripetal} = m\frac{v^2}{R} = m\omega^2R$?
But then chain tension has no impact here, because $k = \frac{F_f}{N} = \frac{mg}{m\omega^2R} = \frac{g}{\omega^2R}$? What am I missing?
I'm not sure that the tension matters for this case since it's not pulling anything... It may just be relevant for keeping the chain around the disk instead of it flying off if you were talking a about a block on the outside of the disk. I'm not entirely sure though. Do you happen to have the final solution?
Chestermiller
Mentor
If the chain has a hoop force T and the disk is not rotating, what normal force (per unit rim length) does the chain exert on the disk (like a rubber band would exert on the disk)? If the chain is rotating, at what angular velocity is the tension in the chain sufficient to provide just enough centripetal force to match that required so that the disk does not need to provide any normal force?
Chet | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307747659751,
"lm_q1q2_score": 0.886423663828439,
"lm_q2_score": 0.9111797106148062,
"openwebmath_perplexity": 599.4055982067038,
"openwebmath_score": 0.8067883253097534,
"tags": null,
"url": "https://www.physicsforums.com/threads/chain-and-spinning-disk-problem.741529/"
} |
Chet
1 person
Do you happen to have the final solution?
No, I don't...
If the chain has a hoop force T and the disk is not rotating, what normal force (per unit rim length) does the chain exert on the disk (like a rubber band would exert on the disk)? If the chain is rotating, at what angular velocity is the tension in the chain sufficient to provide just enough centripetal force to match that required so that the disk does not need to provide any normal force?
Chet
So for the first question - I thought that for every piece of chain the tension is tangent to the disk, and that would mean that the angle between the normal force and the tension is 90 degrees, therefore tension has no impact on normal force?
Then tension does depend on velocity?
So for the first question - I thought that for every piece of chain the tension is tangent to the disk, and that would mean that the angle between the normal force and the tension is 90 degrees, therefore tension has no impact on normal force?
Try this. Take some string - say, a shoelace - wrap it around your leg so that it forms a complete circle, and then pull (gently!) the loose ends to tighten it. Does your leg agree that the tension has no impact on the normal force?
1 person
Yes, I guess tension does have impact! But how do we express that mathematically? Is tension not right-angled with normal force?
BvU
Homework Helper
2019 Award
Yes it is. Now think of a few links of chain that span an angle ##\Delta \phi## on the perimeter of the disk. The tensions T at the ends don't align any more and presto! there is your normal force !
1 person
Yes it is. Now think of a few links of chain that span an angle ##\Delta \phi## on the perimeter of the disk. The tensions T at the ends don't align any more and presto! there is your normal force !
Wow! Okay, so I drew a little sketch of how I imagine it right now.
Then | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307747659751,
"lm_q1q2_score": 0.886423663828439,
"lm_q2_score": 0.9111797106148062,
"openwebmath_perplexity": 599.4055982067038,
"openwebmath_score": 0.8067883253097534,
"tags": null,
"url": "https://www.physicsforums.com/threads/chain-and-spinning-disk-problem.741529/"
} |
Then
$N = Tsin\frac{\Delta\phi}{2}$ and also $\Delta\phi = \frac{x}{R}$ where x is the rim corresponding to $\Delta\phi$. I guess now integrating, to find the whole normal force?
#### Attachments
• 20.3 KB Views: 368
BvU
Homework Helper
2019 Award
Funny you should draw these T inward. The tensions ON this piece of chain add up to a force ON the disk that points inwards. The disk pushes back with an equal and opposite normal force that points outwards. The friction force is then a coefficient times this outward force, and it points upwards -- thus counteracting gravity which is pointing down.
Chestermiller
Mentor
See if you can show that, if you have a differential section of chain extending from θ to θ+dθ, the net force that the adjacent portions of the chain exert on this differential section of chain is Tdθ = (T/r)rdθ, and this net force is directed radially inward toward the axis. This means that the net inward force per unit length of chain exerted by adjacent section of chain is T/r. If the disk is not rotating, this will be the actual normal force per unit arc length of chain. (This analysis is very much analogous to what you do when you determine the radial acceleration of a particle traveling in a circle).
You are not going to be doing an integration to find the "whole normal force." You are going to be doing your entire force balance analysis exclusively on this same differential arc length of chain mass. As we progress, you'll see how this plays out.
Chet
Last edited:
so, let's say each link of the chain has mass m. Then, mg = μ(T-mω2R), right? Here T is the tension acting inward in each link of the chain. Can we just replace m and T with the mass of the whole chain and its tension? I feel like you might be able to, but I'm not really sure. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307747659751,
"lm_q1q2_score": 0.886423663828439,
"lm_q2_score": 0.9111797106148062,
"openwebmath_perplexity": 599.4055982067038,
"openwebmath_score": 0.8067883253097534,
"tags": null,
"url": "https://www.physicsforums.com/threads/chain-and-spinning-disk-problem.741529/"
} |
Funny you should draw these T inward. The tensions ON this piece of chain add up to a force ON the disk that points inwards. The disk pushes back with an equal and opposite normal force that points outwards. The friction force is then a coefficient times this outward force, and it points upwards -- thus counteracting gravity which is pointing down.
So my sketch is what you had in mind, just T should be inwards? And the T - N relationship I wrote - is it right?
See if you can show that, if you have a differential section of chain extending from θ to θ+dθ, the net force that the adjacent portions of the chain exert on this differential section of chain is Tdθ = (T/r)rdθ, and this net force is directed radially inward toward the axis. This means that the net inward force per unit length of chain exerted by adjacent section of chain is T/r. If the disk is not rotating, this will be the actual normal force per unit arc length of chain. (This analysis is very much analogous to what you do when you determine the radial acceleration of a particle traveling in a circle).
So does this apply:
$m\vec{a_c} = \vec{T} + \vec{N} => ma_c = \frac{T}{R}\phi - N$ ?
Thus $N = \frac{T}{R}\phi - m\omega^2R$?
##T/R## is the force due to tension per unit length of chain. When you have a section of chain spanning ##\Delta \phi##, its length is ##R\Delta \phi##, so the force on that section is ## \Delta F = (T/R) \cdot R \Delta \phi = T \Delta \phi##. Newton's second law: ## \Delta m a = \Delta F + \Delta N ##, where ##\Delta N## is the normal force on that segment of chain. What can be said about the normal force when the chain begins to slip? What is ##\Delta m##?
$\Delta m$ is the mass of the segment of the chain, and when chain begins to slip normal force is $\Delta N = \frac{\Delta mg}{k}$ (so the friction is equal to mg) ? | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307747659751,
"lm_q1q2_score": 0.886423663828439,
"lm_q2_score": 0.9111797106148062,
"openwebmath_perplexity": 599.4055982067038,
"openwebmath_score": 0.8067883253097534,
"tags": null,
"url": "https://www.physicsforums.com/threads/chain-and-spinning-disk-problem.741529/"
} |
BvU
Homework Helper
2019 Award
So my sketch is what you had in mind, just T should be inwards? And the T - N relationship I wrote - is it right?
T should be outwards. T1 to the left, T2 to the right. Sum of the two T is then pointing inwards, and the magnitude is ## {\bf 2} \ T \sin({\Delta \phi \over 2}) = T \Delta \phi \quad## (I missed the ##{\bf 2}\quad## and leave the ##\Delta## in).
This T resultant provides the centripetal force ## m \omega^2 R## for this little piece of chain, for which you now must also express the mass in therms of ##\Delta \phi##. At low rpm the difference between T resultant and required centripetal force is pressing on the disk rim and the reaction force, exercised by the disk ON the chain is indeed N (pointing outwards), so your last line is OK.
At the rpm where the chain falls off, kN = mg . ##\Delta \phi## falls out and your expression for k is ready. That's all.
voko came in while I was typing ever so slowly. Yet another crossing reply.
$\Delta m$ is the mass of the segment of the chain, and when chain begins to slip normal force is $\Delta N = \frac{\Delta mg}{k}$ (so the friction is equal to mg) ?
Correct on the normal force. ##\Delta m##, though - what is it in terms of ##\Delta \phi##?
$\Delta m = \frac{m \Delta \phi}{2 \pi}$ ?
Chestermiller
Mentor
OK. The force acting on a differential section of chain between θ and θ+dθ (imposed on the section of chain by the adjacent regions of chain) is $-T\vec{i}_rdθ$. Do a free body diagram of this small section of chain. The mass contained in this small section of chain is $\frac{mdθ}{2π}$, where m is the total mass of the chain. The normal force exerted on this small section of chain by the disk is $nrdθ\vec{i}_r$, where n is the normal force per unit length. The acceleration is $-ω^2r\vec{i}_r$. So the force balance reads:
$$nr\vec{i}_rdθ-T\vec{i}_rdθ=-\frac{m}{2π}ω^2r\vec{i}_rdθ$$
or
$$n=\frac{T}{r}-\frac{m}{2π}ω^2$$ | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307747659751,
"lm_q1q2_score": 0.886423663828439,
"lm_q2_score": 0.9111797106148062,
"openwebmath_perplexity": 599.4055982067038,
"openwebmath_score": 0.8067883253097534,
"tags": null,
"url": "https://www.physicsforums.com/threads/chain-and-spinning-disk-problem.741529/"
} |
The force balance in the vertical direction on this small section of chain reads:
$$frdθ=\frac{mrdθ}{2πr}g$$
where f is the frictional force per unit length of chain. This equation reduces to:
$$f=\frac{m}{2πr}g$$
If the chain is about to slip, how is the frictional force per unit length f related to the normal force per unit length n?
$f = k*n$? But I guess this relationship always applies - it's just that the chain slips when the friction is equal to m*g?
Thank you all for the huge help!
Chestermiller
Mentor
$f = k*n$? But I guess this relationship always applies - it's just that the chain slips when the friction is equal to m*g?
Thank you all for the huge help!
The key learning from this is that sometimes it is desirable (and even mandatory) to do a differential force balance on the system being analyzed.
Chet
BvU
$f = k*n$? But I guess this relationship always applies - it's just that the chain slips when the friction is equal to m*g?
should read $\quad f_{\rm \bf max} = k*n \$ : the friction force has a maximum given by this expression. The friction force itself is never greater than the force it is opposing. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307747659751,
"lm_q1q2_score": 0.886423663828439,
"lm_q2_score": 0.9111797106148062,
"openwebmath_perplexity": 599.4055982067038,
"openwebmath_score": 0.8067883253097534,
"tags": null,
"url": "https://www.physicsforums.com/threads/chain-and-spinning-disk-problem.741529/"
} |
## Simple nonlinear least squares curve fitting in Python
December 6th, 2013 | Categories: math software, programming, python | Tags:
A question I get asked a lot is ‘How can I do nonlinear least squares curve fitting in X?’ where X might be MATLAB, Mathematica or a whole host of alternatives. Since this is such a common query, I thought I’d write up how to do it for a very simple problem in several systems that I’m interested in
This is the Python version. For other versions,see the list below
The problem
xdata = -2,-1.64,-1.33,-0.7,0,0.45,1.2,1.64,2.32,2.9
ydata = 0.699369,0.700462,0.695354,1.03905,1.97389,2.41143,1.91091,0.919576,-0.730975,-1.42001
and you’d like to fit the function
using nonlinear least squares. You’re starting guesses for the parameters are p1=1 and P2=0.2
For now, we are primarily interested in the following results:
• The fit parameters
• Sum of squared residuals
Future updates of these posts will show how to get other results such as confidence intervals. Let me know what you are most interested in.
Python solution using scipy
Here, I use the curve_fit function from scipy
import numpy as np
from scipy.optimize import curve_fit
xdata = np.array([-2,-1.64,-1.33,-0.7,0,0.45,1.2,1.64,2.32,2.9])
ydata = np.array([0.699369,0.700462,0.695354,1.03905,1.97389,2.41143,1.91091,0.919576,-0.730975,-1.42001])
def func(x, p1,p2):
return p1*np.cos(p2*x) + p2*np.sin(p1*x)
popt, pcov = curve_fit(func, xdata, ydata,p0=(1.0,0.2))
The variable popt contains the fit parameters
array([ 1.88184732, 0.70022901])
We need to do a little more work to get the sum of squared residuals
p1 = popt[0]
p2 = popt[1]
residuals = ydata - func(xdata,p1,p2)
fres = sum(residuals**2)
which gives | {
"domain": "walkingrandomly.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731137267749,
"lm_q1q2_score": 0.8864194675162246,
"lm_q2_score": 0.920789679151471,
"openwebmath_perplexity": 1504.927461305425,
"openwebmath_score": 0.5015531182289124,
"tags": null,
"url": "https://walkingrandomly.com/?p=5215"
} |
which gives
0.053812696547933969
1. Thanks a lot for the clear information and examples. I have a question you could probably shed some light on.Since I started my Ph. D. I decided to use python (numpy,scipy,etc) as my main scientific software tool. So far I am very pleased with the decision I made, however, now I am trying to solve a nonlinear optimisation problem which basically consist in fitting some data to a cascade of linear filtera and some static nonlinearities. I put together a script in python which uses “scipy.optimize.leastsq()”. I haven’t been able to get an acceptable fit so far and the speed is not great either. So the question is in your experience would you say that is a good option to use this function, or the matlab ones are better quality? and in your mind which matlab function would be equivalent to this python one?
2. Hi Carlos
I’ve never done a speed/quality comparison between these optimisation functions on different systems I’m afraid. All I can say is that I’ve not had a problem with the Python ones so far.
Best Wishes,
Mike
3. Hello Mike,
Thanks for your promptly answer.Perhaps in the near future I will carry out some comparison tests.If I get any significant/interesting results I will share them here.
Cheers,
Carlos.
4. Hi,
you can use the full_output flag (borrowed from the scipy.optimize.leastsq function) to obtain further information about the solution:
popt, pcov, infodict, mesg, ier = curve_fit(func, xdata, ydata,p0=(1.0,0.2),full_output=1)
With that call you can now estimate the residuals as:
fres = sum(infodict[‘fvec’]**2)
BTW, great posts.
Paulo Xavier Candeias
5. Thanks, Paulo.
6. Hi again,
@Paulo Thanks for the tip.With this information relevant postprocessing ca be achieved.
Well after a reading from internet,SciPy and matlab docs and trying out some ideas my conclusion regarding the performance for nonlinear regression goes as follows: | {
"domain": "walkingrandomly.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731137267749,
"lm_q1q2_score": 0.8864194675162246,
"lm_q2_score": 0.920789679151471,
"openwebmath_perplexity": 1504.927461305425,
"openwebmath_score": 0.5015531182289124,
"tags": null,
"url": "https://walkingrandomly.com/?p=5215"
} |
Python: Using scipy.optimize methods, either leastsq or curve_fit, is a working way to
get a solotion for a nonlinear regression problem.As I understood the solver
is a wrapper to the MINPACK fortran library, at least in the case of the L-M
algorithm, which is the one I am working with.This suppose to avoid wheel
reinventing stages.However in my case this had two downsides.First,passing a
python numpy.array of dimension other than (dimesnion,)
seems not to work properly. And second, I wanted to use a slightly modification
of the classical L-M algorithm but since the code is not in python then it was
not very easy to do this.
Matlab: Mike kindly explained different ways to get a nonlinear optimisation problem
solved using no toolbox, stat,opt TBs or using the NAG library.I have
just looked into the ‘nlinfit’ from the stats TB. Comparing this against the
scipy alternatives I can say that the main difference algoritmic-wise is that
this routine incorporates some enhancements to the classical algorithmm.These
include iterative re-weighting and robust strategies.
I summary I would say that if using scipy routines is enough for your case then there is
not need to make things more complex. However, if you ever find yourself struggling to get
the desired performance it might be worth looking into matlab or other software tool which implements some improvements to the basic algorithm.Or try to implement any enhancement you might need/want to try in python.This can be time consuming and error prone though.Anyway, I hope this can be useful for other people.
Carlos.
7. Thank you very much for the most clear information on how to work with curve_fit. I have searched pretty much everywhere in Google and this explanation seems to be the easiest to follow. Wonder why scipy docs don’t have examples like these?!!
S.Srivatsan
8. Hi Mike, | {
"domain": "walkingrandomly.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731137267749,
"lm_q1q2_score": 0.8864194675162246,
"lm_q2_score": 0.920789679151471,
"openwebmath_perplexity": 1504.927461305425,
"openwebmath_score": 0.5015531182289124,
"tags": null,
"url": "https://walkingrandomly.com/?p=5215"
} |
S.Srivatsan
8. Hi Mike,
I found this example very useful for my quick prototyping. Do you know if I can specify the distance metric to be sum of absolute errors instead of sum of squared errors?
Anurag
9. Hi Anurag,
I think not, the problem resides in the mathematical formulation of the problem. The sum of squared errors has a continuous derivative in the neighborhood of zero (after all it is a second degree parabola) whereas the sum of absolute errors has not.
Paulo Xavier Candeias
10. Hello Mike,
When I use scipy.optimize.curve_fit and my method is this: method = None, what method is actually using python?
regards | {
"domain": "walkingrandomly.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731137267749,
"lm_q1q2_score": 0.8864194675162246,
"lm_q2_score": 0.920789679151471,
"openwebmath_perplexity": 1504.927461305425,
"openwebmath_score": 0.5015531182289124,
"tags": null,
"url": "https://walkingrandomly.com/?p=5215"
} |
# Proving $\lim_{x \to \infty}\frac{2|x|}{x+1} = 2$ using definition
I'm trying to prove this limit here
Prove $$\lim_{x \to \infty}\frac{2|x|}{x+1} = 2$$, using epsilon-delta or sequence limit definition
Here's the answer I've come up so far
Let $$\epsilon > 0$$, by Archimedian Property, then exist $$m \in N$$ such that
Consider $$\epsilon ' = \frac{1}{2}\epsilon$$, it's clear that $$\epsilon ' > 0$$ then we get $$\frac{1}{m} < \epsilon '$$
Then, for every $$x ≥ m$$, we get
$$|\frac{2|x|}{x+1} - 2| = |\frac{2|x|-2x-2}{x+1}| = |\frac{2x-2x-2}{x+1} | = |\frac{-2}{x+1} | = \frac{2}{x+1} ≤ \frac {2}{x} \leq \frac{2}{m} < 2\epsilon ' = \epsilon$$
limit proven.
Is this correct? also it seems there is another way to prove this? like using epsilon-delta definition.
Any insight would really help, thanks beforehand. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130563978902,
"lm_q1q2_score": 0.8864043016215339,
"lm_q2_score": 0.8962513648201267,
"openwebmath_perplexity": 405.30469225637887,
"openwebmath_score": 0.9267463684082031,
"tags": null,
"url": "https://math.stackexchange.com/questions/3871593/proving-lim-x-to-infty-frac2xx1-2-using-definition"
} |
Any insight would really help, thanks beforehand.
• "Using definition" is quite unclear. What does that mean? – David G. Stork Oct 19 '20 at 1:20
• Your manipulation with the inequalities seems like the right strategy. I think you need to be more careful with your $\varepsilon$. Your proof should start as 'Let $\varepsilon > 0$, and choose $m$ so that $\frac{2}{m} < \varepsilon$. Then (inequality stuff)'. – Square Oct 19 '20 at 1:32
• You start with an arbitrary $\epsilon$ and prove that after some point, the the fraction is within $\epsilon$-neighborhood of the number 2. So I'd say your proof is correct. – PkT Oct 19 '20 at 1:51
• "delta epsilon" is short hand for any of the four types of proof: $\delta-\epsilon$, $\delta-M$, $\epsilon-N$ or $N-M$. You use $\delta-\epsilon$ to prove $\lim_{x\to c}f(x)=L$. You use $\delta-M$ to prove $\lim_{x\to c}f(x)=\pm \infty$. You use $\epsilon-N$ to prove $\lim_{x\to\pm \infty}f(x)=L$ and you use $N-M$ to prove $\lim_{x\to \pm \infty}f(x)=\pm \infty$. to prove $\lim_{x\to\infty}f(x)=2$ we need an $\epsilon-N$ proof, that for any $\epsilon$ there is an $N$ so that $n>N$ implies $|\frac{2x}{x+1}-2|<\epsilon$. That IS the type of proof you gave and it was fine. – fleablood Oct 19 '20 at 23:17
• " like using epsilon-delta definition." ..... so you DID you the epsilon-delta definition. You just had to use $n > M \implies....$ rather then $|x-c|< \delta$ because you have $x\to \infty$ you cant have $|x - \infty| < \delta$. What you choose instead is $x > N$. – fleablood Oct 19 '20 at 23:19
Although the OP's intent can be understood, it is advised that they carefully "'dot their i's" and "cross their t's" to logically nail it down and they can then compare their technique to the one given here.
The OP should understand that
When taking a limit out to infinity, such as
$$\quad \displaystyle \lim_{x \to +\infty} f(x) = L$$
that the $$\delta \gt 0$$ 'bit' has a different interpretation (see the last section). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130563978902,
"lm_q1q2_score": 0.8864043016215339,
"lm_q2_score": 0.8962513648201267,
"openwebmath_perplexity": 405.30469225637887,
"openwebmath_score": 0.9267463684082031,
"tags": null,
"url": "https://math.stackexchange.com/questions/3871593/proving-lim-x-to-infty-frac2xx1-2-using-definition"
} |
that the $$\delta \gt 0$$ 'bit' has a different interpretation (see the last section).
Set $$f(x) = \frac{2|x|}{x+1}$$. It is easily shown (use inequality algebra) that
$$\quad \displaystyle f\bigr(\,[0,+\infty)\,\bigr) \subset [0, 2]$$
So we now only have to address a challenge $$\varepsilon$$ satisfying $$0 \lt \varepsilon \lt 2$$.
For $$x \gt 0$$
$$\quad f(x) \ge 2-\varepsilon \text{ iff }$$
$$\quad \quad 2x \ge 2x + 2 -\varepsilon x - \varepsilon \text{ iff }$$
$$\quad \quad \varepsilon x \ge 2 - \varepsilon \text{ iff }$$
$$\quad \quad x \ge \frac{2 - \varepsilon}{\varepsilon}$$
Setting $$d = \frac{2 - \varepsilon}{\varepsilon}$$ we can now write as true
$$\quad \displaystyle f\bigr(\,[d,+\infty)\,\bigr) \subset [2 - \varepsilon, 2 + \varepsilon]$$
and so
$$\quad \displaystyle \lim_{x \to \infty}\frac{2|x|}{x+1} = 2$$
The reader can review the definition
$$\quad$$ Limits at infinity
This definition uses strict inequalities and the limit control variable is designated with the letter $$c$$, but the above is an equivalent formulation.
Heck, you could even use $$\delta$$ rather that $$c$$ or $$d$$, but that would bring a frown to the face of some mathematicians. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130563978902,
"lm_q1q2_score": 0.8864043016215339,
"lm_q2_score": 0.8962513648201267,
"openwebmath_perplexity": 405.30469225637887,
"openwebmath_score": 0.9267463684082031,
"tags": null,
"url": "https://math.stackexchange.com/questions/3871593/proving-lim-x-to-infty-frac2xx1-2-using-definition"
} |
# Where have I made a mistake?
I have been trying the integral below, but cannot get the right answer and I am not sure where I have gone wrong. Let $$I=\int_0^{1/2}\arcsin(\sqrt{x})dx$$ and make the substitution $\sqrt{x}=\sin(u)$ so $dx=2\sin(u)\cos(u)du$. Now, \begin{align} I &= \int_0^{\pi/4}2u\sin(u)\cos(u)du = \left[u\sin^2(u)\right]_0^{\pi/4}-\int_0^{\pi/4}\sin^2(u)du \\ &= \frac{\pi}{8}-\frac{1}{2}\int_0^{\pi/4}(1-\cos(2u)) \, du \\ &= \frac{\pi}{8}-\left[\frac{u}{2}-\frac{\sin(2u)}{4}\right]_0^{\pi/4} = \frac{1}{4} \end{align}
• That's the same answer Wolfram Alpha gets. – saulspatz Sep 15 '18 at 22:23
• Hmmm. The answer book I checked it against said something different but my calculator also gave this answer, I presumed it was something I had typed in wrong – Henry Lee Sep 15 '18 at 22:24
• Please try to make the titles of your questions more informative. For example, Why does $a<b$ imply $a+c<b+c$? is much more useful for other users than A question about inequality. From How can I ask a good question?: Make your title as descriptive as possible. In many cases one can actually phrase the title as the question, at least in such a way so as to be comprehensible to an expert reader. You can find more tips for choosing a good title here. – Shaun Sep 15 '18 at 22:25
• What does the answer book say? – Shaun Sep 15 '18 at 22:26
• Which book are you using? – Shaun Sep 15 '18 at 22:26 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9873750499754304,
"lm_q1q2_score": 0.8863619332315892,
"lm_q2_score": 0.8976952914230972,
"openwebmath_perplexity": 339.0677222826106,
"openwebmath_score": 0.9982125759124756,
"tags": null,
"url": "https://math.stackexchange.com/questions/2918372/where-have-i-made-a-mistake"
} |
Let us see: $$\begin{eqnarray*}\int_{0}^{1/2}\arcsin\sqrt{x}\,dx&\stackrel{x\mapsto z^2}{=}&\int_{0}^{1/\sqrt{2}}2z\arcsin(z)\,dz\\&\stackrel{z\mapsto\sin\theta}{=}&\int_{0}^{\pi/4}2\theta\sin\theta\cos\theta\,d\theta\\&\stackrel{\theta\mapsto\varphi/2}{=}&\frac{1}{4}\int_{0}^{\pi/2}\varphi\sin\varphi\,d\varphi\\&=&\frac{1}{4}\left[\sin\varphi-\varphi\cos\varphi\right]_{0}^{\pi/2}=\frac{1}{4}.\end{eqnarray*}$$
Alternative method. Since $\frac{1}{\sqrt{1-x}}=\sum_{n\geq 0}\frac{1}{4^n}\binom{2n}{n}x^n$ we have $$\arcsin(x) = \sum_{n\geq 0}\frac{1}{(2n+1)4^n}\binom{2n}{n}x^{2n+1}$$ for any $x\in(0,1)$ and $$\int_{0}^{1/2}\arcsin\sqrt{x}\,dx = \frac{1}{\sqrt{2}}\sum_{n\geq 0}\frac{1}{(2n+1)(2n+3)8^n}\binom{2n}{n},$$ which equals $\frac{1}{3\sqrt{2}}\,\phantom{}_2 F_1\left(\tfrac{1}{2},\tfrac{1}{2};\tfrac{5}{2};\tfrac{1}{2}\right)$, is a telescopic series in disguise.
• Is This $F_1$ a geometric function? – Henry Lee Sep 15 '18 at 22:40 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9873750499754304,
"lm_q1q2_score": 0.8863619332315892,
"lm_q2_score": 0.8976952914230972,
"openwebmath_perplexity": 339.0677222826106,
"openwebmath_score": 0.9982125759124756,
"tags": null,
"url": "https://math.stackexchange.com/questions/2918372/where-have-i-made-a-mistake"
} |
Counting all possibilities that contain a substring
How many strings are there of seven lowercase letters that have the substring tr in them?
So I am having a little problem with this question, I know that the total number of combinations is $26^6$ but there is double counting on some of the combinations.
For example, when you have a case that contains multiples 'tr' then it will be counted multiple times depending on the location of tr, even though its the same string.
t r t r t r a
Any advice on what to subtract to remove this double counting?
Thanks for any help!
• Better to count the number of ways to not get an instance of "tr," and then subtract that from $26^7$. (The total strings is $26^7$, not $26^6.)$. – Thomas Andrews Mar 31 '15 at 1:25
• I suggest two recurrences for strings not containing TR ending in T and not ending in T, solving these, and compute the value for length n=7. – Marko Riedel Mar 31 '15 at 1:30
• But 'tr' is a substring that must stay together, meaning you can consider it as one object. So instead of having 7 spaces to fill you are only filling 5 then the substring takes up the other two as one making 6. Or did i do that totally wrong? – Anon Mar 31 '15 at 1:30
• Because these parameters are very reasonable inclusion-exclusion will also work here. Apply stars-and-bars when you count the configurations containg $q$ copies of the string TR. – Marko Riedel Mar 31 '15 at 1:55
• Never used stars-and-bars before but something like this? ★ |★ ★ ★ ★ ★ - ★ |★ |★ ★ ★ ★ - ★ ★ |★ |★ ★ ★ - ★ ★ ★ |★ |★ ★ - ★ ★ ★ ★ |★ |★ - ★ ★ ★ ★ ★ |★ So there are 6 different spots the 'tr' can go and then the other spots should not contain 'tr' so remove 2 letters from the 5 spots. Then the final equation would be 26^6 - 6 x 2^5? – Anon Mar 31 '15 at 2:09 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676460637103,
"lm_q1q2_score": 0.8862568658990078,
"lm_q2_score": 0.9046505408849362,
"openwebmath_perplexity": 602.9202743171036,
"openwebmath_score": 0.7433537244796753,
"tags": null,
"url": "https://math.stackexchange.com/questions/1213727/counting-all-possibilities-that-contain-a-substring"
} |
Let $a_n$ be the number of strings of length $n$ with no tr's. An $(n-1)$-long string can be extended in $26$ ways unless it ends in "t", in which case it can only be extended in $25$ ways. So $$a_n= 26a_{n-1}-a_{n-2}$$ for $n\ge2$; the initial conditions are $a_0=1$ and $a_1=26$.
You can give a formula for $a_n$, but to compute $a_7$ it suffices to run out the recurrence. The final answer is $26^7-a_7 = 71,112,600$.
In case there's doubt, another way to verify the recurrence is to write down the $26\times26$ transition matrix for letters. All of the entries are $1$'s except for a single $0$ off the diagonal (corresponding to the prohibited tr). The characteristic polynomial is computed to be $z^{24}(z^2-26z+1)$.
• Thank you this helped a ton! – Anon Mar 31 '15 at 3:11
There are two possible solutions here, one using recurrences and the other one using PIE.
Recurrence.
The recurrences use two sequences $\{a_n\}$ and $\{b_n\}$ which count strings not containing the two-character pattern that end in the first character of the pattern and that do not. This gives
$$a_1 = 1 \quad\text{and}\quad b_1 = 25$$ and for $n\gt 1$ $$a_n = a_{n-1} + b_{n-1} \quad\text{and}\quad b_n = 24a_{n-1} + 25b_{n-1}.$$
These recurrences produce for $1\le n\le 7$ the sequence of sums $\{a_n+b_n\}$ which is $$26, 675, 17524, 454949, 11811150, 306634951, 7960697576,\ldots$$ so that the answer to the problem is (count of no ocurrences) $$7960697576.$$
Inclusion-Exclusion.
Let $M_{\ge q}$ be the set of strings containing at least $q$ ocurrences of the two-character pattern and let $M_{=q}$ be the set containing exactly $q$ ocurrences of the pattern. Then by inclusion-exclusion we have
$$|M_{=0}| = \sum_{k=0}^{\lfloor n/2\rfloor} (-1)^k |M_{\ge k}|.$$
Note however that $$|M_{\ge k}| = 26^{n-2k} {n-2k + k\choose k} = 26^{n-2k} {n-k\choose k}.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676460637103,
"lm_q1q2_score": 0.8862568658990078,
"lm_q2_score": 0.9046505408849362,
"openwebmath_perplexity": 602.9202743171036,
"openwebmath_score": 0.7433537244796753,
"tags": null,
"url": "https://math.stackexchange.com/questions/1213727/counting-all-possibilities-that-contain-a-substring"
} |
Note however that $$|M_{\ge k}| = 26^{n-2k} {n-2k + k\choose k} = 26^{n-2k} {n-k\choose k}.$$
This is because when we have $k$ copies of the pattern there are $n-2k$ freely choosable letters that remain. Hence we have a total of $n-2k+k=n-k$ items to permute. We then choose the $k$ locations of the patterns among the $n-k$ items.
This gives the formula $$|M_{=0}| = \sum_{k=0}^{\lfloor n/2\rfloor} (-1)^k \times 26^{n-2k} \times {n-k\choose k}.$$
a :=
proc(n)
option remember;
if n=1 then return 1 fi;
a(n-1)+b(n-1);
end;
b :=
proc(n)
option remember;
if n=1 then return 25 fi;
24*a(n-1)+25*b(n-1);
end;
ex_pie :=
proc(n)
option remember;
q=0..floor(n/2));
end;
Proof that the two answers are the same.
Introduce the generating functions $$A(z) = \sum_{n\ge 0} a_n z^n \quad\text{and}\quad B(z) = \sum_{n\ge 0} b_n z^n.$$
Observe that the correct intial value pair is $a_0 = 0$ and $b_0 = 1.$
Multiply the two recurrences by $z^n$ and sum over $n\ge 1$ to get $$A(z) - 0 = z A(z) + z B(z) \quad\text{and}\quad B(z) - 1 = 24 z A(z) + 25 z B(z).$$
Solve these two obtain $$A(z) = \frac{z}{z^2-26z+1} \quad\text{and}\quad B(z) = \frac{1-z}{z^2-26z+1}.$$
This yields the following generating function $G(z)$ for $\{a_n+b_n\}:$ $$G(z) = \frac{1}{z^2-26z+1}.$$
On the other hand we have $$G(z) = \sum_{n\ge 0} z^n \left(\sum_{k=0}^{\lfloor n/2\rfloor} 26^{n-2k} (-1)^k {n-k\choose k}\right).$$
This is $$\sum_{k\ge 0} 26^{-2k} (-1)^k \sum_{n\ge 2k} 26^n z^n {n-k\choose k} \\ = \sum_{k\ge 0} 26^{-2k} (-1)^k \sum_{n\ge 0} 26^{n+2k} z^{n+2k} {n+2k-k\choose k} \\ = \sum_{k\ge 0} z^{2k} (-1)^k \sum_{n\ge 0} 26^n z^{n} {n+k\choose k} = \sum_{k\ge 0} z^{2k} (-1)^k \frac{1}{(1-26z)^{k+1}} \\ = \frac{1}{1-26z} \sum_{k\ge 0} z^{2k} (-1)^k \frac{1}{(1-26z)^{k}} = \frac{1}{1-26z} \frac{1}{1+z^2/(1-26z)} \\ = \frac{1}{1-26z+z^2}.$$
This establishes the equality of the generating functions which was to be shown.
Closed form and OEIS entry. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676460637103,
"lm_q1q2_score": 0.8862568658990078,
"lm_q2_score": 0.9046505408849362,
"openwebmath_perplexity": 602.9202743171036,
"openwebmath_score": 0.7433537244796753,
"tags": null,
"url": "https://math.stackexchange.com/questions/1213727/counting-all-possibilities-that-contain-a-substring"
} |
Closed form and OEIS entry.
The roots of the denominator of the generating function are $$\rho_{1,2} = 13 \pm 2\sqrt{42}.$$ Writing $$\frac{1}{1-26z+z^2} = \frac{1}{(z-\rho_1)(z-\rho_2)} = \frac{1}{\rho_1-\rho_2} \left(\frac{1}{z-\rho_1}-\frac{1}{z-\rho_2}\right) \\ = \frac{1}{4\sqrt{42}} \left(\frac{1}{\rho_1}\frac{1}{z/\rho_1-1} -\frac{1}{\rho_2}\frac{1}{z/\rho_2-1}\right) \\ = \frac{1}{4\sqrt{42}} \left(-\frac{1}{\rho_1}\frac{1}{1-z/\rho_1} +\frac{1}{\rho_2}\frac{1}{1-z/\rho_2}\right).$$
We now extract coefficients to get $$[z^n] G(z) = \frac{1}{4\sqrt{42}} \left(\rho_2^{-n-1}-\rho_1^{-n-1}\right).$$
Since $\rho_1\rho_2 = 1$ this finally becomes $$[z^n] G(z) = \frac{1}{4\sqrt{42}} \left(\rho_1^{n+1}-\rho_2^{n+1}\right)$$
which is the sequence $$26, 675, 17524, 454949, 11811150, 306634951, 7960697576, \\ 206671502025, 5365498355074, 139296285729899, \ldots$$
This is OEIS A097309 which has additional material and where in fact we find a copy of the problem statement that initiated this thread.
Alternative derivation of the closed form of $G(z).$
This uses the following integral representation. $${n-k\choose k} = \frac{1}{2\pi i} \int_{|w|=\epsilon} \frac{(1+w)^{n-k}}{w^{k+1}} \; dw.$$
This gives for the inner sum $$\frac{1}{2\pi i} \int_{|w|=\epsilon} \frac{(1+w)^n}{w} \left(\sum_{k=0}^{\lfloor n/2\rfloor} 26^{n-2k} (-1)^k \frac{1}{(1+w)^k w^k}\right) \; dw.$$
Note that the defining integral is zero when $\lfloor n/2\rfloor \lt k \le n,$ so this is in fact $$\frac{1}{2\pi i} \int_{|w|=\epsilon} \frac{(1+w)^n}{w} \left(\sum_{k=0}^n 26^{n-2k} (-1)^k \frac{1}{(1+w)^k w^k}\right) \; dw.$$
Simplifying we obtain $$\frac{1}{2\pi i} \int_{|w|=\epsilon} \frac{(1+w)^n}{w} 26^n \frac{(-1)^{n+1}/26^{2(n+1)}/(1+w)^{n+1}/w^{n+1}-1} {(-1)/26^2/(1+w)/w-1} \; dw$$ or $$\frac{1}{2\pi i} \int_{|w|=\epsilon} (1+w)^{n+1} 26^n \frac{(-1)^{n+1}/26^{2(n+1)}/(1+w)^{n+1}/w^{n+1}-1} {(-1)/26^2-w(w+1)} \; dw$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676460637103,
"lm_q1q2_score": 0.8862568658990078,
"lm_q2_score": 0.9046505408849362,
"openwebmath_perplexity": 602.9202743171036,
"openwebmath_score": 0.7433537244796753,
"tags": null,
"url": "https://math.stackexchange.com/questions/1213727/counting-all-possibilities-that-contain-a-substring"
} |
The difference from the geometric series contributes two terms, the second of which has no poles inside the contour, leaving just
$$\frac{1}{2\pi i} \int_{|w|=\epsilon} \frac{(-1)^{n+1}}{26^{n+2}} \frac{1}{w^{n+1}} \frac{1}{(-1)/26^2-w(w+1)} \; dw.$$
It follows that $$G(z) = \sum_{n\ge 0} z^n [w^n] \frac{(-1)^{n+1}}{26^{n+2}} \frac{1}{(-1)/26^2-w(w+1)}.$$
What we have here is an annihilated coefficient extractor which simplifies as follows. $$\frac{-1}{26^2} \sum_{n\ge 0} (-z/26)^n [w^n] \frac{1}{(-1)/26^2-w(w+1)} \\ = \frac{-1}{26^2} \frac{1}{(-1)/26^2+z/26(-z/26+1)} = -\frac{1}{-1+z(-z+26)} \\ = \frac{1}{1-26z+z^2}.$$
This concludes the argument.
There is another annihilated coefficient extractor at this MSE link.
• This is amazing, but I am confused because for a string of length 1 there should be 0 strings that contain 'tr' then strings of length 2 should only contain 1 ('tr') then Strings of length 3 should be 52 i believe (t,r,26)or(26,t,r) but you came up with 26,675,172554? – Anon Mar 31 '15 at 3:50
• Oh wow never mind that is how many strings that don't contain the 'tr' so for 7 characters 26^7 - 7960697576 = 71,112,600. – Anon Mar 31 '15 at 3:52
• Seriously thank you so much for taking all this time to solve this, you helped me actually understand where the numbers were coming from. – Anon Mar 31 '15 at 4:07 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676460637103,
"lm_q1q2_score": 0.8862568658990078,
"lm_q2_score": 0.9046505408849362,
"openwebmath_perplexity": 602.9202743171036,
"openwebmath_score": 0.7433537244796753,
"tags": null,
"url": "https://math.stackexchange.com/questions/1213727/counting-all-possibilities-that-contain-a-substring"
} |
# Thread: Can the grid be filled?
1. ## Can the grid be filled?
Given binary sequences of equal length, let the "distance" between them be defined as the number of bits that would need to be flipped to convert one binary sequence to another. For example, the sequences 1111 and 1110 are a distance of 1 apart, because only the last digit must be changed to get from one to the other. Meanwhile, 1010 and 0101 are a distance of 4 apart, because all 4 digits must be changed to get from one to the other.
Consider binary sequences of length 8 (example: 10101010). Is it possible to find a group of 5 of them such that each is a distance of at least 5 from all the others? If so, give an example of such a group, thus producing a successful 5 x 8 grid. If not, prove that it is not possible to find any such group and that therefore the 5 x 8 grid cannot be filled.
2. ## Re: Can the grid be filled?
We first investigate what happens between three sequences.
Choose any sequence as the first one, $S_1$. Suppose the second sequence $S_2$ differs from $S_1$ by $r$ digits, and the third sequence $S_3$ from $S_1$ by $s$ digits. Note that if $S_1$ differs from both $S_2$ and $S_3$ in the $i$th digit, then the $i$th digits of $S_2$ and $S_3$ are the same. If $r,s\geq5$ then $S_2$ and $S_3$ must have at least $2$ digits the same. So the distance between $S_2$ and $S_3$ is at most $6$, i.e. it must be $5$ or $6$.
The argument is symmetrical in all three sequences. Hence $r,s\in\{5,6\}$ also.
Suppose $|S_2-S_3|=6$. Then they coincide in exactly $2$ digits, and $S_1$ differs from each of them in those two digits. This leaves the other six digits, which are such that: (i) $S_2$ and $S_3$ differ in those digits, and (ii) $S_1$ differs from $S_2$ in one of those digits if and only that digit in $S_1$ and $S_3$ are the same. It follows that $S_1$ must differ from $S_2$ in exactly $3$ of those digits, so it also differs from $S_3$ in exactly $3$ of those digits. In this case, $r=s=5$. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9902915255242087,
"lm_q1q2_score": 0.8861024142961171,
"lm_q2_score": 0.894789454880027,
"openwebmath_perplexity": 108.03157528976026,
"openwebmath_score": 0.8983186483383179,
"tags": null,
"url": "http://mathhelpforum.com/math-challenge-problems/240584-can-grid-filled.html"
} |
Now Suppose $|S_2-S_3|=5$. If $r=6$ we can apply the previous argument again and get $s=5$. Suppose $r=5$. Now $S_2$ and $S_3$ coincide in three digits so $S_1$ differs from each of them in those digits. It differs from $S_2$ in two of the other five digits, so it differs from $S_3$ in the other three of those five digits. In this case, $s=6$.
Hence, given any three sequences, two pairs each have a distance of $5$, and the distance between the third pair is $6$. Example: $S_1=00000000,\,S_2=00011111,\,S_3=11111000$.
Now we add a fourth sequence $S_4$. WLOG we can assume $r=s=5$ and $|S_2-S_3|=6$. Suppose $S_4$ differs from $S_1$ by $t$ digits. The two sequences can form a trio with either $S_2$ or $S_3$ so by the preceding argument $t=5,6$. Suppose $t=5$. Consider the three sequences $S_1,S_2,S_4$. Then $|S_2-S_4|=6$ since the distances between the other two pairs are $5$. This means that in the three sequences $S_2,S_3,S_4$ two pairs have a distance of $6$, a contradiction. So $t=6$. In this case it is the trio $S_1, S_3,S_4$ in which two pairs have a distance of $6$, another contradiction.
This shows that we can never find four sequences such that the distance between any pair of them is $5$ or more. If we cannot find four sequences, we certainly cannot find five.
3. ## Re: Can the grid be filled?
"This shows that we can never find four sequences such that the distance between any pair of them is 5 or more. If we cannot find four sequences, we certainly cannot find five."
It's a compelling enough argument, except I've been provided with an actual example of a 4 by 8 that maintains at least 5 differences between all:
10100000
01110101
11001011
00011110
________________
Now it may still be the case that finding a 5 by 8 is impossible, but if it is, it's not because finding a 4 by 8 is impossible, because it's not. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9902915255242087,
"lm_q1q2_score": 0.8861024142961171,
"lm_q2_score": 0.894789454880027,
"openwebmath_perplexity": 108.03157528976026,
"openwebmath_score": 0.8983186483383179,
"tags": null,
"url": "http://mathhelpforum.com/math-challenge-problems/240584-can-grid-filled.html"
} |
# What is the converse of this statement and is it true?
If $a$ and $b$ are relatively prime, $a\mid c$ and $b\mid c$, then $(ab)\mid c$.
I am lost. Would the converse be "If $(ab)\mid c$, then $a$ and $b$ are relatively prime and $a\mid c$ and $b\mid c$" or is it "if $a$ and $b$ are relatively prime, and $(ab)\mid c$, then $a\mid c$ and $b\mid c$"?
It seems like the second variation would be more fitting, but I'm not sure.
-
Your first interpretation is the correct interpretation.
You have a statement, roughly speaking, consisting of the form $$(p\land q \land r) \rightarrow s$$ where $p$ denotes $\gcd(a, b) = 1$, $\;q$ denotes $a \mid c$, $\;r$ denotes $b \mid c$, and $\;s$ denotes $(ab) \mid c$.
The converse of that implication is $$s \rightarrow (p \land q \land r)$$
Put more generally, the converse of any implication "if P, then Q" is given by "if Q, then P".
In your case, $P$ happens to be: "$a$ and $b$ are relatively prime and $a\mid c$ and $b \mid c$"
whereas $Q$ is given by "$(ab)\mid c$".
As to whether the converse is true?:
No the converse is not true. Let $a = 2, b = 4, c = 16.$ Then $(ab) = 8 \mid 16 = 2$, but $\gcd(a, b) =\gcd(2, 4) = 2 \neq 1$: i.e., $a = 2$ and $b = 4$ are not relatively prime. Hence, the converse is not true for all integers $a, b, c, \;c\neq 0$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018398044143,
"lm_q1q2_score": 0.8860858477845687,
"lm_q2_score": 0.9086179000259899,
"openwebmath_perplexity": 327.68288431446507,
"openwebmath_score": 0.9246396422386169,
"tags": null,
"url": "http://math.stackexchange.com/questions/291892/what-is-the-converse-of-this-statement-and-is-it-true"
} |
-
So would a counterexample consist of two numbers that are not relatively prime? – blutuu Feb 1 '13 at 3:48
I agree with Henning's answer: I don't believe the answer is quite so cut-and-dry. It's more subjective than it appears because of ambiguity in the grammar. If the sentence had been "… relatively prime integers …", would you feel right in declaring $a=\pi$, $b=1/\pi$, $c=1$ to be a counterexample? – Erick Wong Feb 2 '13 at 2:24
...it is certainly debatable...and there are many nuances (e.g. quantification?, domain?) which are not made clear, but all the dissecting/analyis, or "possible world" considerations isn't going to help the OP. – amWhy Feb 2 '13 at 2:33
I disagree strongly with your last comment. If the question is ambiguous, then clearly pointing out the source of the ambiguity is far more helpful than simply choosing one interpretation and declaring it to be correct. – Rahul Feb 2 '13 at 2:44
@$\mathbb{R}^n$ understood/agreed. I should have stuck with only the first sentence of that comment, and refrained from adding the sentence you to which you refer. – amWhy Feb 2 '13 at 14:30
The word "converse", as it is practically used in mathematics text if not necessarily by dictionaries of logic, is somewhat fuzzy, and the meaning of "the converse of theorem such-and-such" sometimes has to be deduced from the context.
As long as we only have atomic claims $P$ and $Q$ with the implication $P\to Q$, then without doubt the converse of $P\to Q$ is $Q\to P$. But when there are more than one premise, some room for interpretation opens up.
The problem is that in the usual style of written mathematics, the two theorems
Theorem 1. If $a$ and $b$ are coprime and $a\mid c$ and $b\mid c$, then $ab\mid c$.
and
Theorem 2. Assume that $a$ and $b$ are coprime. If $a\mid c$ and $b\mid c$, then $ab\mid c$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018398044143,
"lm_q1q2_score": 0.8860858477845687,
"lm_q2_score": 0.9086179000259899,
"openwebmath_perplexity": 327.68288431446507,
"openwebmath_score": 0.9246396422386169,
"tags": null,
"url": "http://math.stackexchange.com/questions/291892/what-is-the-converse-of-this-statement-and-is-it-true"
} |
and
Theorem 2. Assume that $a$ and $b$ are coprime. If $a\mid c$ and $b\mid c$, then $ab\mid c$.
mean exactly the same thing -- usually we're not even trained to notice the difference between them as we read a mathematical text. However, according to a strict logical interpretation of "converse" these two clearly equivalent theorems would have different converses:
Converse 1. If $ab\mid c$, then $a$ and $b$ are coprime and $a\mid c$ and $b \mid c$.
Converse 2. Assume that $a$ and $b$ are coprime. If $ab\mid c$, then $a\mid c$ and $b\mid c$.
In practice, however, most authors don't care about this, and just speak of "the converse" with the meaning "the possible interpretation of converse that makes sense in the context". The reader is supposed to figure out for himself which of the premises look like something that could conceivably have a reasonable chance of being consequences of the original conclusion, given the other premises.
In the language of formal logic, another way to express the problem is that ordinary mathematical reasoning (presented in natural language) doesn't distinguish consistently between
• $P_1 \vdash P_2\to Q$
• $P_1 \to (P_2 \to Q)$
• $(P_1 \land P_2) \to Q$
These are generally just different formal representations of the same concept inside the working mathematician's mind, and it can take some training and experience with formal logic to even appreciate that a useful distinction between them can be made. Therefore a notion of "converse" that assigns crucial meaning to these essentially syntactic differences will have a hard time agreeing with how the word is used in mathematical writing that is not concerned with logic in particular.
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018398044143,
"lm_q1q2_score": 0.8860858477845687,
"lm_q2_score": 0.9086179000259899,
"openwebmath_perplexity": 327.68288431446507,
"openwebmath_score": 0.9246396422386169,
"tags": null,
"url": "http://math.stackexchange.com/questions/291892/what-is-the-converse-of-this-statement-and-is-it-true"
} |
Select Page
#### Project Euler 28 Problem Statement
Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
It can be verified that the sum of both diagonals is 101.
What is the sum of both diagonals in a 1001 by 1001 spiral formed in the same way?
#### Basic approach: Using a loop to count corners
The “corners”, which form the two principal diagonals, produce a simple series: (3, 5, 7, 9), (13, 17, 21, 25), (31, 37, 43, 49), …
This can be quantified as (n2 – 3n + 3, n2 – 2n + 2, n2 – n + 1, n2) and summing them together yields 4n2 – 6n + 6; the sum of the corners for each odd-length square:
3 + 5 + 7 + 9 = 24, 13 + 17 + 21 + 25 = 76, 31 + 37 + 43 + 49 = 160, …
sum, size = 1, 1001
for n in xrange(3, size+1, 2):
sum += 4*n*n - 6*n + 6
print "Answer to PE28 = ",sum
#### Improved approach: Closed form summation
If we rewrite the for loop as a summation we will have:
[latex s="1"] 1+\sum\limits_{i=1}^{s} 4(2i+1)^2-6(2i+1)+6, s=\frac{n-1}{2} [/latex]
2i+1 is every odd number, starting with 3, until we reach the size of the square. This will take (n-1)/2 iterations.
This simplifies further:
[latex s="1"] 1+\sum\limits_{i=1}^{s} 16i^2+4i+4 [/latex]
Finally, we can express this summation as a closed form equation by using the algebra of summation notation (Wikipedia or Project Euler Problem 6):
[latex s="1"] 1+16\cdot\sum\limits_{i=1}^{s}i^2 + 4\cdot\sum\limits_{i=1}^{s}i + \sum\limits_{i=1}^{s}4 [/latex]
[latex s="1"] \frac{16s(s + 1)(2s + 1)}{6} + \frac{4s(s + 1)}{2} + 4s + 1 [/latex]
[latex s="1"] \frac{16s^3 + 30s^2 + 26s +3}{3} [/latex]
Or, factored if you prefer:
[latex s="1"] (\frac{2s}{3}) (8s^2 + 15s + 13) + 1 [/latex]
Let’s test this equation with the example in the problem statement, n = 5. Remember n≥3 and odd.
#### HackerRank version | {
"domain": "betaprojects.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9854964224384745,
"lm_q1q2_score": 0.886080897307572,
"lm_q2_score": 0.8991213738910259,
"openwebmath_perplexity": 1146.0481771474667,
"openwebmath_score": 0.6503013372421265,
"tags": null,
"url": "https://betaprojects.com/project-euler-28/"
} |
#### HackerRank version
The Hackerrank Project Euler 28 version of this problem runs 100,000 test cases and extends the size of the square from 1001 to any odd n, where 1 ≤ n ≤ 1018. So any iterative approach will exceed their time limit. This solution works perfectly.
#### Last Word
Reference: The On-Line Encyclopedia of Integer Sequences (OEIS) A114254: Sum of all terms on the two principal diagonals of a 2n+1 X 2n+1 square spiral. | {
"domain": "betaprojects.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9854964224384745,
"lm_q1q2_score": 0.886080897307572,
"lm_q2_score": 0.8991213738910259,
"openwebmath_perplexity": 1146.0481771474667,
"openwebmath_score": 0.6503013372421265,
"tags": null,
"url": "https://betaprojects.com/project-euler-28/"
} |
Within Margin Percentage¶
An algorithm is required to test out what percentage of the parts that a factory is producing fall within a safety margin of the design specifications. Given a list of values recording the metrics of the manufactured parts, a list of values representing the desired metrics required by the design, and a margin of error allowed by the design, compute what fraction of the values are within the safety margin (<=)
# example behavior
>>> within_margin_percentage(desired=[10.0, 5.0, 8.0, 3.0, 2.0],
... actual= [10.3, 5.2, 8.4, 3.0, 1.2],
... margin=0.5)
0.8
See that $$4/5$$ of the values fall within the margin of error: $$1.2$$ deviates from $$2$$ by more than $$0.5$$.
Complete the following function; consider the edge case where desired and actual are empty lists.
def within_margin_percentage(desired, actual, margin):
""" Compute the percentage of values that fall within
a margin of error of the desired values
Parameters
----------
desired: List[float]
The desired metrics
actual: List[float]
The corresponding actual metrics.
Assume len(actual) == len(desired)
margin: float
The allowed margin of error
Returns
-------
float
The fraction of values where |actual - desired| <= margin
"""
pass
You will want to be familiar with comparison operators, control flow, and indexing lists lists to solve this problem.
Solution¶
This problem can solved by simply looping over the pairs of actual and desired values and tallying the pairs that fall within the margin:
def within_margin_percentage(desired, actual, margin):
""" Compute the percentage of values that fall within
a margin of error of the desired values
Parameters
----------
desired: List[float]
The desired metrics
actual: List[float]
The actual metrics
margin: float
The allowed margin of error | {
"domain": "pythonlikeyoumeanit.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540656452214,
"lm_q1q2_score": 0.8859731713569402,
"lm_q2_score": 0.9046505267461572,
"openwebmath_perplexity": 3065.430305811737,
"openwebmath_score": 0.5726562142372131,
"tags": null,
"url": "https://www.pythonlikeyoumeanit.com/Module2_EssentialsOfPython/Problems/MarginPercentage.html"
} |
actual: List[float]
The actual metrics
margin: float
The allowed margin of error
Returns
-------
float
The fraction of values where |actual - desired| <= margin
"""
count = 0 # tally of how values are within margin
total = len(desired)
for i in range(total):
if abs(desired[i] - actual[i]) <= margin:
count += 1 # Equivalent to count = count + 1
return count / total if total > 0 else 1.0
See that we handle the edge case where desired and actual are empty lists: the inline if-else statement count / total if total > 0 else 1 will return 1 when total is 0:
>>> within_margin_percentage([], [], margin=0.5)
1.0
which is arguably the appropriate behavior for this scenario (no values fall outside of the margin). Had we not anticipated this edge case, within_margin_percentage([], [], margin=0.5) would raise ZeroDivisionError.
It is also possible to write this solution using the built-in sum function and a generator comprehension that filters out those pairs of items that fall outside of the desired margin:
def within_margin_percentage(desired, actual, margin):
total = len(desired)
count = sum(1 for i in range(total) if abs(actual[i] - desired[i]) <= margin)
return count / total if total > 0 else 1.0
It is debatable whether this refactored solution is superior to the original one - it depends largely on how comfortable you, and anyone else who will be reading your code, are with the generator comprehension syntax. | {
"domain": "pythonlikeyoumeanit.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540656452214,
"lm_q1q2_score": 0.8859731713569402,
"lm_q2_score": 0.9046505267461572,
"openwebmath_perplexity": 3065.430305811737,
"openwebmath_score": 0.5726562142372131,
"tags": null,
"url": "https://www.pythonlikeyoumeanit.com/Module2_EssentialsOfPython/Problems/MarginPercentage.html"
} |
# Why does $2+{{n}\choose{1}}+{{n}\choose{2}}+\ldots+{{n}\choose{n-1}}=(1+1)^n$
$${{n}\choose{0}}+ {{n}\choose{1}}+{{n}\choose{2}}+\ldots+{{n}\choose{n-1}}+{{n}\choose{n}}=(1+1)^n$$
I don't see why this is true, because (if I'm not mistaken)
\begin{align}&{{n}\choose{0}}+ {{n}\choose{1}}+{{n}\choose{2}}+\ldots+{{n}\choose{n-1}}+{{n}\choose{n}}\\&=1+{{n}\choose{1}}+{{n}\choose{2}}+\ldots+{{n}\choose{n-1}}+1\\ &=2+{{n}\choose{1}}+{{n}\choose{2}}+\ldots+{{n}\choose{n-1}} \end{align}
So my question is why
$$2+{{n}\choose{1}}+{{n}\choose{2}}+\ldots+{{n}\choose{n-1}}=(1+1)^n\;\;\;\;\text{(1)}$$
If anyone requires any context, I am reviewing some set theory, and I came across the proof that the power set of a set $S$ with $n$ elements had $2^{n}$ elements. Just to reiterate, I'm not looking for a proof of the cardinality of the power set. I just want to know, algebraically, why $(1)$ is true.
Thanks.
• Binomial Theorem, do you know? – IAmNoOne Apr 29 '14 at 2:58
• I've heard of it, and I know it via Pascal's Triangle for low $n$, such as $n=2,3,4$, but I'm not familiar with its general formula. – Sujaan Kunalan Apr 29 '14 at 2:59
• I will post an answer then. – IAmNoOne Apr 29 '14 at 2:59
• You can find many posts about this here. For example, this question and this question and other posts linked there. – Martin Sleziak Sep 27 '15 at 20:35
There is an easy way to prove the formula.
Suppose you want to buy a burger and you have a choice of 6 different condiments for it - mustard, mayonnaise, lettuce, tomatoes, pickles, and cheese. How many ways can you choose a combination of these condiments for your burger?
Of course, you can choose either 6 different condiments, 5 different condiments, 4 different condiments, etc. So the obvious way to solve the problem is:
\begin{align}{{6}\choose{6}} + {{6}\choose{5}} + {{6}\choose{4}} + {{6}\choose{3}} + {{6}\choose{2}} + {{6}\choose{1}} = \boxed{64}\end{align} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9901401423688665,
"lm_q1q2_score": 0.8859669582450704,
"lm_q2_score": 0.894789454880027,
"openwebmath_perplexity": 224.06384668751375,
"openwebmath_score": 0.8196208477020264,
"tags": null,
"url": "https://math.stackexchange.com/questions/773686/why-does-2n-choose1n-choose2-ldotsn-choosen-1-11n"
} |
But there is a better way. Imagine 6 spaces for 6 condiments:
_____ _____ _____ _____ _____ _____
For every space, there are $2$ possible outcomes: Yes or No, meaning the condiment was chosen or the condiment was not chosen. With $2$ possible outcomes for each space, there are $2^6 = \boxed{64}$ possible ways.
We know that both ways have foolproof logic and will both give identical answers no matter how many condiments there are. So this means we have proven:
\begin{align}\sum_{k = 0}^{n} \binom{n}{k} = 2^n\end{align}
• This is a nice burger... err answer. – mathreadler Oct 3 '15 at 19:48
By the Binomial theorem, we have
$$(x + y)^n = \sum_{k = 0}^{n} \binom{n}{k} x^{n - k} y^k.$$
So if we let $x = y = 1$, then we get your result.
The proof of the formula is traditionally done through induction. You also mentioned Pascal Triangles, hold your breath, because they are related. I suggest you look at the formula for small $n$, then examine the coefficients of the polynomial.
• I see that you and the poster below you have your exponents switched. In general, does it matter if the $n-k$ exponent is on the $x$ or the $y$? – Sujaan Kunalan Apr 29 '14 at 3:05
• @SujaanKunalan, it does not. If you swap where $x$ and $y$ is on the LHS, you'll get what he got. – IAmNoOne Apr 29 '14 at 3:07
• Ah, ok. Thanks for your help. – Sujaan Kunalan Apr 29 '14 at 3:07
• @SujaanKunalan, you are welcome. Remember, you get to choose what $x$ and $y$s are in the formula. – IAmNoOne Apr 29 '14 at 3:09
Binomial theorem!
$$(x+y)^n = \sum_{k=0}^n \dbinom{n}{k}x^ky^{n-k}$$
Take $x=y=1$ to get your identity.
By the binomial theorem $(a+b)^n = \sum\limits_{i = 0}^{n} {{n}\choose{i}}a^{n-i}b^i$ If $a=b=1$
$(1+1)^n = \sum\limits_{i = 0}^{n}{{n}\choose{i}}$
So that $2 + \sum\limits_{i = 1}^{n-1}{{n}\choose{i}} = {{n}\choose{0}} + \sum\limits_{i = 1}^{n-1}{{n}\choose{i}} + {{n}\choose{n}} = \sum\limits_{i = 0}^{n}{{n}\choose{i}} = (1+1)^n$
Combinatorially: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9901401423688665,
"lm_q1q2_score": 0.8859669582450704,
"lm_q2_score": 0.894789454880027,
"openwebmath_perplexity": 224.06384668751375,
"openwebmath_score": 0.8196208477020264,
"tags": null,
"url": "https://math.stackexchange.com/questions/773686/why-does-2n-choose1n-choose2-ldotsn-choosen-1-11n"
} |
Combinatorially:
We are having a party and we have a list of $n$ people who we may or may not invite. We ask, "how many different possibilities of guests are there?" One way to arrive to an answer is saying, "We can invite no one and there is exactly $n \choose 0$ ways to do that, or we can invite one person and there are $n\choose 1$ ways to do that, ect." Following this logic we arrive at the left hand side. However, we want to double check our answer so we try another method. We say, "We can associate each person with the number $0$ if they are not invited and $1$ if they are. Therefore, each possible configuration is represented by a string of $0$s and $1$s of length $n$. Since each slot in this string has $2$ possibilities, we find that there are exactly $2^n$ distinct strings." This agrees with the right hand side. Since both (valid) methods were used to find an answer to this problem, we see that the left and right sides of the equation must agree.
The expression counts the number of subsets of a set with $n$ elements. There's a one-to-one correspondence between subsets of $\{1,\dots,n\}$ and $\{0,1\}^n$, given by assigning a subset $S$ to the tuple which has a $1$ at the $i$th component if $i \in S$. This gives you the count without applying the binomial theorem.
Well it just follows from the general formula:
$(a+b)^n=\sum\limits_{k=0}^n \binom {n} {k}\,a^k\,b^{n-k}$,
which you can prove by induction see here . | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9901401423688665,
"lm_q1q2_score": 0.8859669582450704,
"lm_q2_score": 0.894789454880027,
"openwebmath_perplexity": 224.06384668751375,
"openwebmath_score": 0.8196208477020264,
"tags": null,
"url": "https://math.stackexchange.com/questions/773686/why-does-2n-choose1n-choose2-ldotsn-choosen-1-11n"
} |
Dividing fractions calculator online. Welcome to the Exponent Calculator. Negative exponent ; A negative exponent represents which fraction of the base, the solution is. Sometimes the exponent itself is a fraction. You don't need to go from the top to the bottom of the calculator - calculate any unknown you want! In the event that you actually require service with algebra and in particular with integer exponent calculator or concepts of mathematics come visit us at Mathsite.org. The denominator on the exponent tells you what root of the “base” number the term represents. This algebra 2 video tutorial explains how to simplify fractional exponents including negative rational exponents and exponents in radicals with variables. Notes: i) e (Euler's number) and pi (Archimedes' constant π) are accepted values. ... Decimal to Fraction Fraction to Decimal Hexadecimal Scientific Notation Distance Weight Time. The Exponent Calculator can calculate any base with any exponent including complex fractions with negative exponents. We carry a lot of excellent reference information on subject areas varying from algebra ii to subtracting rational Enter fractions and press the = button. An exponential expression consists of two parts, namely the base, denoted as b and the exponent, denoted as n. The general form of an exponential expression is b n. For example, 3 x … Mixed Fractions. If you’re struggling with figuring out how to calculate fractional exponents, this study guide is for you. You can either apply the numerator first or the denominator. When exponents that share the same base are multiplied, the exponents are added. ii) 1.2 x … So we found out that: If you like, you can analogically check other roots, e.g. The Fraction Calculator will reduce a fraction to its simplest form. Do you struggle with the concept of fractional exponents? If you want to find an exponents based on the value and the result, try our salve exponents calculator. This website uses cookies to ensure you | {
"domain": "bueteeearchives.net",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287698185481,
"lm_q1q2_score": 0.8859455807622735,
"lm_q2_score": 0.9019206719160034,
"openwebmath_perplexity": 1244.501551708118,
"openwebmath_score": 0.7745479941368103,
"tags": null,
"url": "http://bueteeearchives.net/o3ddr4ei/0c6f4b-fraction-exponents-calculator"
} |
value and the result, try our salve exponents calculator. This website uses cookies to ensure you get the best experience. It also does not accept fractions, but can be used to compute fractional exponents, as long as the exponents are input in their decimal form. E.g: 5e3, 4e-8, 1.45e12 ** To find the exponent from the base and the exponentation result, use: Logarithm calculator Use this calculator to find the fractional exponent of a number x. \]. How to Use the Fraction Exponents Tool. Awesome! In the Base box, enter the number which you will raise to the fraction. Scientific calculators have more functionality that business calculators, and one thing they can do that is especially useful for scientists is to calculate exponents. Exponent Calculator. You can also calculate numbers to the power of large exponents less than 1000, negative exponents, and real numbers or decimals for exponents. Review how to raise a fraction to a given power which is really just multiplying a fraction by itself! Radicals ... Calculus Calculator. Usually you see exponents as whole numbers, and sometimes you see them as fractions. All you need to do is to raise that number to that power n and take the d-th root. Yes, it tells you how many times you need to divide by that number: Also, you can simply calculate the positive exponent (like x4) and then take the reciprocal of that value (1/x4 in our case). In a term like x a , you call x the base and a the exponent. It's a square root, of course! When you do see an exponent that is a decimal, you need to convert the decimal to a fraction. Let's have a look at a few simple examples first, where our numerator is equal to 1: From the equations above we can deduce that: Let's use the law of exponents which says that we can add the exponents when multiplying two powers that have the same base: Try this with any number you like, it's always true! Enter simple fractions with slash (/). Matrix Calculator. Email: donsevcik@gmail.com Tel: … If you | {
"domain": "bueteeearchives.net",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287698185481,
"lm_q1q2_score": 0.8859455807622735,
"lm_q2_score": 0.9019206719160034,
"openwebmath_perplexity": 1244.501551708118,
"openwebmath_score": 0.7745479941368103,
"tags": null,
"url": "http://bueteeearchives.net/o3ddr4ei/0c6f4b-fraction-exponents-calculator"
} |
Enter simple fractions with slash (/). Matrix Calculator. Email: donsevcik@gmail.com Tel: … If you try to take the root of a negative number your answer may be NaN = Not a Number. Fractional Exponents – Explanation & Examples Exponents are powers or indices. How to Find Mean, Median, and Mode. To calculate combined exponents and radicals such as the 4th root of 16 raised to the power of 5 you would enter 16 raised to the power of (5/4) or $$16^{\frac{5}{4}}$$ where x = 16, n = 5 and d = 4. Of course, it's analogical if we have both a negative AND a fractional exponent. Prime Factorization. All rights reserved. Exponent Laws. The calculator above accepts negative bases, but does not compute imaginary numbers. NB: To calculate a negative exponent, simply place a “-” before the number of your exponent. To raise a … We maintain a tremendous amount of great reference material on subject areas varying from decimals to scientific notation You can also add, subtract, multiply, and divide fractions, as well as, convert to a decimal and work with mixed numbers and reciprocals. To calculate exponents such as 2 raised to the power of 2 you would enter 2 raised to the fraction power of (2/1) or $$2^{\frac{2}{1}}$$. Mixed Fractions. Fraction + - x and ... Exponents Calculator. What is Exponentiation? Exponent Theory see Mathworld exponent Laws you can solve the dth root of 16 you would enter raised! Formula for fraction exponents when the numerator is not equal to 1 ( n≠1 ) help with math in! Have been demystified fraction exponents calculator: are you struggling with the of... Large base integers and real numbers rules to divide exponents step-by-step the numerator first or the denominator on the tells. You: from simplify exponential expressions using algebraic rules step-by-step to do is to raise a use! For you example illustrating the formula for fraction exponents calculator positive and negative.! Exponents or equations come visit us at Polymathlove.com remember to use | {
"domain": "bueteeearchives.net",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287698185481,
"lm_q1q2_score": 0.8859455807622735,
"lm_q2_score": 0.9019206719160034,
"openwebmath_perplexity": 1244.501551708118,
"openwebmath_score": 0.7745479941368103,
"tags": null,
"url": "http://bueteeearchives.net/o3ddr4ei/0c6f4b-fraction-exponents-calculator"
} |
positive and negative.! Exponents or equations come visit us at Polymathlove.com remember to use parentheses solving for a base number with a power... Numbers, and the fourth one will appear in no Time you the easiest computation, or you just... With power in the fraction exponents when the numerator first or fraction exponents calculator denominator on value! Whole numbers, and sometimes you see exponents as whole numbers, and the fourth one will appear no! Enter mixed numbers with space our math solver and calculator feature of the day... Show me another!! For a base number with a fractional exponent tells you what root of the day... Show another. About the concept of fractional exponents – that 's why it 's if! Button and we will return the proper calculation base ( b ) and a the exponent for 3. Powers as well calculator: are you struggling with the concept of fractional exponents on calculator. For example, if you like, you must first convert to fractional... Varying from algebra ii to subtracting rational calculator use Examples exponents are a closed book you. Any three values, and Mode at Algebra1help.com exponent rules to divide exponents step-by-step with power in the you. The day... Show me another quote see them as fractions it in detail.... Fractional Indices calculator unknown you want to find an exponents based on value! We will return the proper calculation calculate the exponent calculator remember that fractional exponents are to. As whole numbers, and Mode two ways to simplify a fractional power such a^b/c! Us at Algebra1help.com closed book to you to that power n easily using this calculator solve. Our salve exponents calculator: are you struggling with figuring out how solve! Any exponent including complex fractions with negative exponents short tutorial explaining the of... I ) e ( Euler 's number ) and pi ( Archimedes ' constant π ) accepted... Have got every aspect covered step by step solutions to your exponent of,. Why it 's analogical if we | {
"domain": "bueteeearchives.net",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287698185481,
"lm_q1q2_score": 0.8859455807622735,
"lm_q2_score": 0.9019206719160034,
"openwebmath_perplexity": 1244.501551708118,
"openwebmath_score": 0.7745479941368103,
"tags": null,
"url": "http://bueteeearchives.net/o3ddr4ei/0c6f4b-fraction-exponents-calculator"
} |
got every aspect covered step by step solutions to your exponent of,. Why it 's analogical if we have a large amount of good reference material on ranging! Exponents and exponents in radicals with variables algebra and in particular with calculator exponents. Notes: i ) e ( Euler 's number ) and a exponent ( n ) to calculate ( )! Varying from algebra ii to subtracting rational calculator use \ ; find neat! And pi ( Archimedes ' constant π ) are accepted values another useful feature of the box...: i ) e ( Euler 's number ) and a exponent ( n ) to calculate 1/16! Explanation & Examples exponents are a closed book to you calculator use base with any exponent including complex fractions negative! Solution of fractional exponents have been demystified \frac { n } { d } } \normalsize = \ ; Tool... If ever you call a number which - when multiplied by itself - gives another number varying algebra...: donsevcik @ gmail.com Tel: … the fraction exponents calculator reduce a fraction exponent calculator find! Like, you can either Apply the numerator first or the denominator on the exponent key and the! Exercises of exponent … fractional exponents, this study guide is for you to power. You demand help with algebra and in particular with calculator with exponents or equations come visit us at Algebra1help.com to... Find the fractional exponent Result button and we will return the proper.... Simplify a fractional negative exponent, you need to go from the to! Share the same rules as Division calculator use guide is for you d } } \normalsize = \?. Areas varying from algebra ii to subtracting rational calculator use topics ranging from Division to formulas rational -... The day... Show me another quote enter number or variable raised to a fractional negative,... Exponents - fractional exponents fraction of the calculator is that not only exponent..., this study guide is for you 1/3 enter mixed numbers with space of! Method gives you the easiest computation, or you could just use | {
"domain": "bueteeearchives.net",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287698185481,
"lm_q1q2_score": 0.8859455807622735,
"lm_q2_score": 0.9019206719160034,
"openwebmath_perplexity": 1244.501551708118,
"openwebmath_score": 0.7745479941368103,
"tags": null,
"url": "http://bueteeearchives.net/o3ddr4ei/0c6f4b-fraction-exponents-calculator"
} |
enter mixed numbers with space of! Method gives you the easiest computation, or you could just use exponent! If you want to calculate ( 1/16 ) 1/2, just type 1/16 base..., there is no need to do is to raise that number to power. ÷ 1/3 enter mixed numbers with space to take the d-th root are added on calculators. You could just use our online fraction exponents Tool calculator use exponents have been demystified the dth root of number... Place a “ - ” before the number of your algebra study is understanding how to find the exponents! About it in detail here good reference material on topics ranging from Division to formulas rational -. Remember to use the fraction boxes below for numerator and denominator, enter base... Decimal to fraction fraction to Decimal Hexadecimal Scientific Notation Distance Weight Time algebra ii to subtracting rational calculator use you! As solving for a base number with a whole exponent we found out that: if you want fractions use... The proper calculation on the value and the Result, try our salve exponents calculator - before... Useful feature of the “ base ” number the term represents the Tool is for you,... The “ base ” number the term represents analogically check other roots, e.g $\frac 2 3$. Like, you need to worry about the concept of fractional exponents number your answer may a. We have both a negative and fractional exponents are a closed book to you and will. Exponents are a way of expressing powers as well, or you could use. Answer may be a fraction as a^b/c the power of 4 ( 3 to power. Solved exercises of exponent … fractional exponents, remember that fractional exponents – explanation & Examples are... Fractions with negative exponents see them as fractions will give you a hand with surprise! No need to do is to raise a fraction exponent calculator can calculate any unknown you want to Mean... Well as roots in one Notation ( 1/16 ) 1/2, just type 1/16 into base box, the! Both a negative exponent, simply place a “ - ” before | {
"domain": "bueteeearchives.net",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287698185481,
"lm_q1q2_score": 0.8859455807622735,
"lm_q2_score": 0.9019206719160034,
"openwebmath_perplexity": 1244.501551708118,
"openwebmath_score": 0.7745479941368103,
"tags": null,
"url": "http://bueteeearchives.net/o3ddr4ei/0c6f4b-fraction-exponents-calculator"
} |
1/16 ) 1/2, just type 1/16 into base box, the! Both a negative exponent, simply place a “ - ” before the number of your study... The exponents are added finally the exponent may be a fraction: the! A large amount of good reference material on topics ranging from Division to formulas rational and... { d } } \normalsize = \ ; in the fraction boxes below for numerator and,. X a, you can analogically check other roots, e.g exponent form - when multiplied by itself gives... Ensure you get the best experience a the exponent for the 3 raised to fraction! Us at Algebra1help.com and radicals into exponent form Decimal Hexadecimal Scientific Notation Distance Weight Time we carry lot. Fraction by itself - gives another number is no need to go from the top to the power 4... & Examples fraction exponents calculator are a closed book to you hit the find fractional of... So a fractional power such as a^b/c of = the case you demand help with math and in particular calculator. Want to find some neat explanations calculator with exponents or equations come visit us at Algebra1help.com equal the. Puts calculation of both exponents and radicals into exponent form formula for fraction Tool. Number the term represents a … use our online fraction exponents when the first. Will appear in no Time properties problems online with our math solver and calculator fraction by itself gives... To solve your questions { \frac { n } { d } } \normalsize = \ ; another..., try our salve exponents calculator: are you struggling with the concept as... To its simplest form term represents 16 you would enter 16 raised the! Get tricky – that 's why it 's useful to have the Tool we are calculating: n! A the exponent key and finally the exponent for more detail on exponent Theory see Mathworld exponent.! Base as well as roots in one Notation base and n is the base, the exponents are closed... How to simplify a fractional negative exponent starts the same way as solving for a base number a... We will return | {
"domain": "bueteeearchives.net",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287698185481,
"lm_q1q2_score": 0.8859455807622735,
"lm_q2_score": 0.9019206719160034,
"openwebmath_perplexity": 1244.501551708118,
"openwebmath_score": 0.7745479941368103,
"tags": null,
"url": "http://bueteeearchives.net/o3ddr4ei/0c6f4b-fraction-exponents-calculator"
} |
a fractional negative exponent starts the same way as solving for a base number a... We will return the proper calculation and pi ( Archimedes ' constant π ) are accepted values with space in! - gives another number fraction exponents calculator online with our math solver and calculator this calculator to solve your.. Formulas rational exponents - fractional Indices calculator subject areas varying from algebra ii to subtracting rational calculator use no. Of course, it 's useful to have the Tool we carry a of... N'T need to worry about the concept of fractional exponents, steps explanation on Excel this online puts! To the power of one third is equal to the power of 4 ( 3 to the power and... Calculate any unknown you want to calculate fractional exponents ( Euler 's number ) and a the exponent and. Algebra study is understanding how to simplify a fractional power such as a^b/c Result button and we return. With fractional exponents, steps explanation on Excel algebra 1 come visit us at Polymathlove.com the! Exponent fraction calculator or algebra 1 come visit us at Algebra1help.com Scientific Notation Weight! Only the exponent may be NaN = not a number fraction exponents calculator the same as. | {
"domain": "bueteeearchives.net",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287698185481,
"lm_q1q2_score": 0.8859455807622735,
"lm_q2_score": 0.9019206719160034,
"openwebmath_perplexity": 1244.501551708118,
"openwebmath_score": 0.7745479941368103,
"tags": null,
"url": "http://bueteeearchives.net/o3ddr4ei/0c6f4b-fraction-exponents-calculator"
} |
# Is there a proof for this Fibonacci relationship?
I was looking at the decomposition of Fibonacci numbers using the definition of $F_n = F_{n-1} + F_{n-2}$, and noted the pattern in the coefficients of the terms were Fibonacci numbers. It appears to hold, and I believe it's true, but I haven't seen a proof for it. Does one exist?
$F_n = 1F_{n-1} + 1F_{n-2}$
$F_n = 2F_{n-2} + 1F_{n-3}$
$F_n = 3F_{n-3} + 2F_{n-4}$
$F_n = 5F_{n-4} + 3F_{n-5}$
etc
This can be generalized to
$F_n = F_xF_{n-(x-1)}+F_{x-1}F_{n-x}$
-
Try using Binet's Formula. – Blue Dec 15 '13 at 23:44
Yes, that identity is well-known. There are several proofs, one of which I wrote up on this web site a couple of months ago, in the form $f_{i+k} = f_kf_{i-1} + f_{k+1}f_i$. – MJD Dec 15 '13 at 23:52
I think the way that you arrived at this already is a proof by induction on $x$. – Carsten Schultz Dec 16 '13 at 0:23
It also appears in the Wikipedia article. – MJD Dec 16 '13 at 0:34
HINT $\ \$ If you change variables this Fibonacci addition law can be put in the form
$$\color{#c00}{F_{n+m} = F_nF_{m+1} + F_{n-1}F_m}$$
Expressing the Fibonacci recurrence in matrix form makes the proof of the addition law easy
$$M^n\ :=\ \left(\begin{array}{ccc} \,1 & 1 \\\ 1 & 0 \end{array}\right)^n\ =\ \left(\begin{array}{ccc} F_{n+1} & F_n \\\ F_n & F_{n-1} \end{array}\right)$$ $$\begin{eqnarray} M^{n+m} = M^n M^m &=& \left(\begin{array}{ccc} F_{n+1} & F_n \\\ F_n & F_{n-1} \end{array}\right)\ \left(\begin{array}{ccc} F_{m+1} & F_m \\\ F_m & F_{m-1} \end{array}\right) \\ \\ \\ \Rightarrow\ \ \left(\begin{array}{ccc} F_{n+m+1} & F_{n+m} \\\ \color{#c00}{F_{n+m}} & F_{n+m-1} \end{array}\right) &=&\left(\begin{array}{ccc} F_{n+1}F_{m+1} + F_nF_m & F_{n+1}F_m + F_nF_{m-1} \\\ \color{#C00}{F_nF_{m+1} + F_{n-1}F_m} & F_{n}F_{m} + F_{n-1}F_{m-1} \end{array}\right)\end{eqnarray}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842229971375,
"lm_q1q2_score": 0.8858808442390413,
"lm_q2_score": 0.8933094060543488,
"openwebmath_perplexity": 172.268803242183,
"openwebmath_score": 0.940873384475708,
"tags": null,
"url": "http://math.stackexchange.com/questions/608465/is-there-a-proof-for-this-fibonacci-relationship"
} |
-
Welcome back! ${}{}$ – MJD Dec 16 '13 at 1:33
I'm having trouble understanding the first line of matrices. And the third line. And what M^n is. – JShoe Dec 21 '13 at 5:15
@Jshoe $\ M$ is the matrix being raised to power $n$. That first matrix equality is very easily proved by induction, using the fib recurrence. The 3rd line is just the 2nd line with the entries of $M^{n+m}$ listed on the LHS, and the matrix product computed on the RHS. – Bill Dubuque Dec 21 '13 at 5:27
First, I want to say that I agree with Carsten Schultz's comment: what you have is almost a proof by induction, and it could be turned into one without much trouble. But I think the proof that follows is very elegant, in the sense of revealing a deeper truth, so I'd like to present it again.
Let's call a sequence "fibonacci-like" if it satisfies the recurrence $$s_{n+2} = s_n + s_{n+1}$$ for all $n$. It's easy to see (or to show) that if $s$ and $t$ are two fibonacci-like sequences, then so is the sequence that you get by multiplying every term of $s$ or of $t$ of them by some constant, and so is the sequence you get by adding together corresponding terms of $s$ and $t$. For example, $1,1,2,3,5,8\ldots$ and $2,8,10,18,28,\ldots$ are both fibonacci-like, and so is what you get if you multiply every element of $1,1,2,3,5,8\ldots$ by 3, namely $3,3,6,9,15,24,\ldots$, and so is what you get if you add them together: $3,9,12,21,33,54,\ldots$.
Since any such sequence $s_i$ is completely determined by $s_0$ and $s_1$, we can agree to write a fibonacci-like sequence with the notation $[s_0, s_1]$, where $s_0$ and $s_1$ are the first two terms of the sequence; that tells us everything about it. Then the Fibonacci sequence itself is written $[0, 1]$, whereas $[1, 3]$ is the Lucas sequence $1,3,4,7,11,\ldots$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842229971375,
"lm_q1q2_score": 0.8858808442390413,
"lm_q2_score": 0.8933094060543488,
"openwebmath_perplexity": 172.268803242183,
"openwebmath_score": 0.940873384475708,
"tags": null,
"url": "http://math.stackexchange.com/questions/608465/is-there-a-proof-for-this-fibonacci-relationship"
} |
Observe that in this notation, $[a_0, a_1] + [b_0, b_1] = [a_0+ b_0, a_1+b_1]$. So for example if you add the Fibonacci sequence $[0,1]$ to itself, you get $[0,2]$, which is in fact the sequence $0, 2, 2, 4, 6, 10,\ldots$ that you get from adding the Fibonacci sequence to itself termwise. Similarly, $c\cdot[a_0, a_1] = [c\cdot a_0 , c\cdot a_1]$. For example if you double every term of the Lucas sequence $[1,3] = 1,3,4,7,11,\ldots$ you get $2,6,8,14,22,\ldots$, which is exactly the sequence we are writing as $[2,6]$.
Finally, observe that $[0,1]$ is that standard Fibonacci sequence whose $i$th term is $f_i$, and $[1,0]$ is the "shifted" Fibonacci sequence, whose $i$th term is $f_{i-1}$. (Note that I am following the standard convention here that has $f_0 = 0$ and $f_1 = 1$; your $F_i$ seems to have $F_0 = 1$ and $F_1=1$, which is not the usual convention.)
Now suppose we have some fibonacci-like sequence $s = [a, b]$. (Remember, $[a,b]$ is just shorthand for the fibonacci-like sequence $a, b, a+b, a+2b, 2a+3b, \ldots$.) We can decompose $[a,b]$ as follows: $$[a,b] =b[0,1] + a[1,0]$$ which shows that $s_i = bf_i + af_{i-1}$. Indeed if you look at a the example terms I showed above you see for example that $s_4 = 2a + 3b = af_3 + bf_4$. This identity holds for any fibonacci-like sequence:
If $s$ is a fibonacci-like sequence whose first two terms are $s_0$ and $s_1$, then $$s_i = s_0f_{i-1} + s_1f_i$$ for all $i$.
(You have to properly understand $f_{-1} = 1$ for this to work at $i=0$.)
Now consider the Fibonacci sequence shifted over $k$ places for some fixed $k$: this sequence begins $f_k, f_{k+1}, f_{k+2}, \ldots$; its $i$th term is $f_{i+k}$. Obviously it is fibonacci-like. In our notation it is represented as $[f_k, f_{k+1}]$ and by the previous paragraph it is equal to $f_k[1,0] + f_{k+1}[0,1]$, so by the previous theorem its $i$th term is equal to $f_kf_{i+1} + f_{k+1}f_i$. But it's $i$th term is also equal to $f_{i+k}$, so we have: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842229971375,
"lm_q1q2_score": 0.8858808442390413,
"lm_q2_score": 0.8933094060543488,
"openwebmath_perplexity": 172.268803242183,
"openwebmath_score": 0.940873384475708,
"tags": null,
"url": "http://math.stackexchange.com/questions/608465/is-there-a-proof-for-this-fibonacci-relationship"
} |
$$f_{i+k} = f_kf_{i-1} + f_{k+1}f_i.$$
Now put $i=x, k = n-x$ and we have your claim, except you have $F_n = f_{n+1}$, so the subscripts are a little muddled.
-
Try going the other way.
$F_n = F_{n-1} + F_{n-2}$
$F_{n+1} = F_n + F_{n-1} = F_{n-1} + F_{n-1} + F_{n-2}$
$F_{n+2} = F_{n+1} + F_{n} = F_{n} + F_{n} + F_{n-1} = 2(F_{n-1}+F_{n-2})+F_{n-1}$
Etc. Hopefully the pattern becomes more "obvious" when seen this way. Then once you get to $F_{n+x}$, replace that with $F_{n}$ and replace your $F_n$ terms with $F_{n-x}$ and you should rederive your formula.
-
The pattern was obvious to begin with, I'm just not sure that that is a satisfactory proof in and of itself. – JShoe Dec 15 '13 at 23:59
I agree. OP asked for a proof, but this isn't one. – MJD Dec 16 '13 at 0:28 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842229971375,
"lm_q1q2_score": 0.8858808442390413,
"lm_q2_score": 0.8933094060543488,
"openwebmath_perplexity": 172.268803242183,
"openwebmath_score": 0.940873384475708,
"tags": null,
"url": "http://math.stackexchange.com/questions/608465/is-there-a-proof-for-this-fibonacci-relationship"
} |
# How many multisets of size $4$ that can be constructed from $n$ distinct elements?
How many multisets of size $4$ that can be constructed from $n$ distinct elements so that at least one element occurs exactly twice ?
Example : For $n=3$ and element set as $\{1,2,3\}$ I am getting multisets as: $\{1,1,3,3\}, \{1,1,2,2\}, \{1,1,2,3\}, \{2,2,3,3\}, \{2,2,1,3\}, \{3,3,1,2\}$, which are total $6$.
I am looking for a formula for large N. Is there any such formula or do we have to count manually?
Represent a multiset
$$\{\underbrace{1,\dots,1}_{x_1\text{ times}},\underbrace{2,\dots,2}_{x_2\text{ times}},\dots,\underbrace{n,\dots,n}_{x_n\text{ times}}\}$$
by $\{1^{x_1},2^{x_2},\dots,n^{x_n}\}$. For each $j=1,\dots,n$ a mulsitet of size $4$ in which $x_j$ occurs exactly twice corresponds to a solution of
$$\left\{\begin{array}{l} \displaystyle\sum_{\substack{1\leq i\leq n}\\i\neq j} x_i= 2\\ x_i\geq 0 \end{array}\right.$$
The number of solutions to this system can be found via stars and bars, and that number is $\binom{2+(n-1)-1}{2}=\binom{n}{2}$. This might point in the direction that the answer is $n\binom{n}{2}$, but we're overcounting.
Indeed, when $j_1\neq j_2$, the multiset $\{{j_1}^2,{j_2}^2\}$ is counted twice: once for the index $j_1$, and once for the index $j_2$. It's easy to see this is the only case of overcounting. How many such sets there are?
That's just the number of ways to choose two distinct indices from among $\{1,\dots,n\}$, that is, $\binom{n}{2}$. Hence, the final answer is
$$n\binom{n}{2}-\binom{n}{2}=(n-1)\binom{n}{2}=\frac{n(n-1)^2}{2}$$
Generalizing the problem to allow the size of the multiset to change as well as the number of available numbers to use in the multiset.
As was started by another user, if we were to ignore the requirement on having at least one number occur exactly two times, we have the count being $\binom{n+k-1}{k}$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842202936826,
"lm_q1q2_score": 0.8858808404156341,
"lm_q2_score": 0.8933094046341532,
"openwebmath_perplexity": 190.9249164476898,
"openwebmath_score": 0.8861674070358276,
"tags": null,
"url": "https://math.stackexchange.com/questions/2065622/how-many-multisets-of-size-4-that-can-be-constructed-from-n-distinct-element/2065636"
} |
We wish to remove the "bad" multisets, which are those that do not have an element repeated exactly two times. To count how many are "bad" we can easily approach via generating functions. For each of the $n$ available numbers, the term $(1+x+x^3+x^4+x^5+\dots)$ will represent the available choices of taking zero, one, three, four, five, etc... copies of that number. With every number appearing any number of times except for two, there will clearly then be no number that occurs exactly two times.
The coefficient of $x^k$ then in the expansion of
$$(1+x+x^3+x^4+x^5+\dots)^n$$
will represent the number of multisets of size $k$ can be made using elements from the $n$ element set where none of the terms appear exactly two times.
The number of multisets which satisfy your condition will be $\binom{n+k-1}{k}$ minus the coefficient of $x^k$ in the series expansion of $(1+x+\frac{x^3}{1-x})^n$, or alternately worded using generating functions for the first, the overall generating function is:
$$\frac{1}{(1-x)^n}-(1+x+\frac{x^3}{1-x})^n$$
In your specific case we have for $n=3$ the series expansion
$$3x^2+6x^3+\color{red}{6x^4}+9x^5+13x^6+15x^7+18x^8+21x^9+\dots$$
The $6$ in $\color{red}{6x^4}$ corresponds to the six multisets you wrote down above.
We first pick the element that will repeat exactly twice. We have $n$ choices for that. We then pick the remaining two elements, which can repeat, so we have $(n-1)^2$ choices for that.
Now, in the case that the last two elements picked are different, then we count that case twice, when we should only count it once. This is because we count as picking $a$ then $b$ as distinct from picking $b$ then $a$.
In the case that the last two elements are the same, we also double count that case, since if the last two elements where $b$ and the first element was $a$, the case where the first element was $b$ and the last two elements were $a$ would also be distinctly counted. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842202936826,
"lm_q1q2_score": 0.8858808404156341,
"lm_q2_score": 0.8933094046341532,
"openwebmath_perplexity": 190.9249164476898,
"openwebmath_score": 0.8861674070358276,
"tags": null,
"url": "https://math.stackexchange.com/questions/2065622/how-many-multisets-of-size-4-that-can-be-constructed-from-n-distinct-element/2065636"
} |
Thus, we count every case exactly twice, and therefore divide by two to reach the final formula:
$$\frac{n(n-1)^2}{2}$$
• For this comment, assume different letters represent different elements. It is clear to me that this answer counts '$a$, then $b$ then $c$' the same as '$a$ then $c$ then $b$', and both represent the multiset $\{a,a,b,c\}$. However, it is not clear to me that this answer counts '$a$, then $b$ then $b$' the same as '$b$, then $a$ then $a$', even though they both represent the same multiset $\{a,a,b,b\}$. Dec 20 '16 at 7:40
• I understand that the answer is correct and that dividing by two takes care precisely of this paricular $\{a,a,b,b\}$ case, but it nonetheless does not seem clear to me from what is written. The way it is written, it appears division by two is intended to handle only $\{a,a,b,c\}$ cases. Dec 20 '16 at 7:43
• You are correct. Let me update the answer Dec 20 '16 at 7:45
• @Fimpellizieri, do you think this is clearer? Dec 20 '16 at 8:00
• Yes, definitely! Dec 20 '16 at 15:23
There are four places to be filled in the multiset using the $n$ distinct elements. Atleast one element has to occur exactly twice. That would leave $2$ more places in the multiset. This means, atmost two elements can occur exactly twice. We can thus divide this into $2$ mutually exclusive cases as follows:
$1.$Exactly one element occurs exactly twice: Select this element in ${n\choose{1}} = n$ ways. Fill up the remaining two spots using $2$ distinct elements from the remaining $n-1$ elements in ${{n-1}\choose{2}}$ ways. Overall: $n \cdot {{n-1}\choose{2}} = \frac{n(n-1)(n-2)}{2}$ ways.
$2.$ Exactly two elements that occur twice each: These two will fill up the multiset, so you only have to select two elements out of $n$ in ${n\choose 2} = \frac{n(n-1)}{2}$ ways.
Since these are mutually exclusive, the total number of ways to form the multiset is: $$\frac{n(n-1)(n-2)}{2} + \frac{n(n-1)}{2}$$$$= \frac{n(n-1)^2}{2}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842202936826,
"lm_q1q2_score": 0.8858808404156341,
"lm_q2_score": 0.8933094046341532,
"openwebmath_perplexity": 190.9249164476898,
"openwebmath_score": 0.8861674070358276,
"tags": null,
"url": "https://math.stackexchange.com/questions/2065622/how-many-multisets-of-size-4-that-can-be-constructed-from-n-distinct-element/2065636"
} |
Hence, for $n=4$, we have a total of $18$ multisets. Hope it helps. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842202936826,
"lm_q1q2_score": 0.8858808404156341,
"lm_q2_score": 0.8933094046341532,
"openwebmath_perplexity": 190.9249164476898,
"openwebmath_score": 0.8861674070358276,
"tags": null,
"url": "https://math.stackexchange.com/questions/2065622/how-many-multisets-of-size-4-that-can-be-constructed-from-n-distinct-element/2065636"
} |
A subspace is a vector space that is contained within another vector space. So every subspace is a vector space in its own right, but it is also defined relative to some other (larger) vector space. We will discover shortly that we are already familiar with a wide variety of subspaces from previous sections.
Here is the principal definition for this section.
##### DefinitionSSubspace
Suppose that $V$ and $W$ are two vector spaces that have identical definitions of vector addition and scalar multiplication, and suppose that $W$ is a subset of $V\text{,}$ $W\subseteq V\text{.}$ Then $W$ is a subspace of $V\text{.}$
Let us look at an example of a vector space inside another vector space.
In Example SC3 we proceeded through all ten of the vector space properties before believing that a subset was a subspace. But six of the properties were easy to prove, and we can lean on some of the properties of the vector space (the superset) to make the other four easier. Here is a theorem that will make it easier to test if a subset is a vector space. A shortcut if there ever was one.
##### Proof
So just three conditions, plus being a subset of a known vector space, gets us all ten properties. Fabulous! This theorem can be paraphrased by saying that a subspace is “a nonempty subset (of a vector space) that is closed under vector addition and scalar multiplication.”
You might want to go back and rework Example SC3 in light of this result, perhaps seeing where we can now economize or where the work done in the example mirrored the proof and where it did not. We will press on and apply this theorem in a slightly more abstract setting.
Much of the power of Theorem TSS is that we can easily establish new vector spaces if we can locate them as subsets of other vector spaces, such as the vector spaces presented in Subsection VS.EVS. | {
"domain": "ups.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071498682252,
"lm_q1q2_score": 0.8858422949054655,
"lm_q2_score": 0.8918110526265554,
"openwebmath_perplexity": 242.52663300952588,
"openwebmath_score": 0.8706957697868347,
"tags": null,
"url": "http://linear.ups.edu/fcla/section-S.html"
} |
It can be as instructive to consider some subsets that are not subspaces. Since Theorem TSS is an equivalence (see Proof Technique E) we can be assured that a subset is not a subspace if it violates one of the three conditions, and in any example of interest this will not be the “nonempty” condition. However, since a subspace has to be a vector space in its own right, we can also search for a violation of any one of the ten defining properties in Definition VS or any inherent property of a vector space, such as those given by the basic theorems of Subsection VS.VSP. Notice also that a violation need only be for a specific vector or pair of vectors.
There are two examples of subspaces that are trivial. Suppose that $V$ is any vector space. Then $V$ is a subset of itself and is a vector space. By Definition S, $V$ qualifies as a subspace of itself. The set containing just the zero vector $Z=\set{\zerovector}$ is also a subspace as can be seen by applying Theorem TSS or by simple modifications of the techniques hinted at in Example VSS. Since these subspaces are so obvious (and therefore not too interesting) we will refer to them as being trivial.
##### DefinitionTSTrivial Subspaces
Given the vector space $V\text{,}$ the subspaces $V$ and $\set{\zerovector}$ are each called a trivial subspace.
We can also use Theorem TSS to prove more general statements about subspaces, as illustrated in the next theorem.
##### Proof
Here is an example where we can exercise Theorem NSMS.
# SubsectionTSSThe Span of a Set¶ permalink | {
"domain": "ups.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071498682252,
"lm_q1q2_score": 0.8858422949054655,
"lm_q2_score": 0.8918110526265554,
"openwebmath_perplexity": 242.52663300952588,
"openwebmath_score": 0.8706957697868347,
"tags": null,
"url": "http://linear.ups.edu/fcla/section-S.html"
} |
Here is an example where we can exercise Theorem NSMS.
# SubsectionTSSThe Span of a Set¶ permalink
The span of a set of column vectors got a heavy workout in Chapter V and Chapter M. The definition of the span depended only on being able to formulate linear combinations. In any of our more general vector spaces we always have a definition of vector addition and of scalar multiplication. So we can build linear combinations and manufacture spans. This subsection contains two definitions that are just mild variants of definitions we have seen earlier for column vectors. If you have not already, compare them with Definition LCCV and Definition SSCV.
##### DefinitionLCLinear Combination
Suppose that $V$ is a vector space. Given $n$ vectors $\vectorlist{u}{n}$ and $n$ scalars $\alpha_1,\,\alpha_2,\,\alpha_3,\,\ldots,\,\alpha_n\text{,}$ their linear combination is the vector \begin{equation*} \lincombo{\alpha}{u}{n}\text{.} \end{equation*}
When we realize that we can form linear combinations in any vector space, then it is natural to revisit our definition of the span of a set, since it is the set of all possible linear combinations of a set of vectors.
##### DefinitionSSSpan of a Set
Suppose that $V$ is a vector space. Given a set of vectors $S=\{\vectorlist{u}{t}\}\text{,}$ their span, $\spn{S}\text{,}$ is the set of all possible linear combinations of $\vectorlist{u}{t}\text{.}$ Symbolically, \begin{align*} \spn{S}&=\setparts{\lincombo{\alpha}{u}{t}}{\alpha_i\in\complexes,\,1\leq i\leq t}\\ &=\setparts{\sum_{i=1}^{t}\alpha_i\vect{u}_i}{\alpha_i\in\complexes,\,1\leq i\leq t}\text{.} \end{align*}
##### Proof
Let us again examine membership in a span.
Notice how Example SSP and Example SM32 contained questions about membership in a span, but these questions quickly became questions about solutions to a system of linear equations. This will be a common theme going forward. | {
"domain": "ups.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071498682252,
"lm_q1q2_score": 0.8858422949054655,
"lm_q2_score": 0.8918110526265554,
"openwebmath_perplexity": 242.52663300952588,
"openwebmath_score": 0.8706957697868347,
"tags": null,
"url": "http://linear.ups.edu/fcla/section-S.html"
} |
Several of the subsets of vectors spaces that we worked with in Chapter M are also subspaces — they are closed under vector addition and scalar multiplication in $\complex{m}\text{.}$
##### Proof
That was easy! Notice that we could have used this same approach to prove that the null space is a subspace, since Theorem SSNS provided a description of the null space of a matrix as the span of a set of vectors. However, I much prefer the current proof of Theorem NSMS. Speaking of easy, here is a very easy theorem that exposes another of our constructions as creating subspaces.
One more.
##### Proof
So the span of a set of vectors, and the null space, column space, row space and left null space of a matrix are all subspaces, and hence are all vector spaces, meaning they have all the properties detailed in Definition VS and in the basic theorems presented in Section VS. We have worked with these objects as just sets in Chapter V and Chapter M, but now we understand that they have much more structure. In particular, being closed under vector addition and scalar multiplication means a subspace is also closed under linear combinations.
##### 1
Summarize the three conditions that allow us to quickly test if a set is a subspace.
##### 2
Consider the set of vectors \begin{equation*} W=\setparts{\colvector{a\\b\\c}}{3a-2b+c=5}\text{.} \end{equation*} Is the set $W$ a subspace of $\complex{3}\text{?}$ Explain your answer.
##### 3
Name five general constructions of sets of column vectors (subsets of $\complex{m}$) that we now know as subspaces.
# SubsectionExercises
##### C15
Working within the vector space $\complex{3}\text{,}$ determine if $\vect{b} = \colvector{4\\3\\1}$ is in the subspace $W\text{,}$ \begin{equation*} W = \spn{\set{ \colvector{3\\2\\3}, \colvector{1\\0\\3}, \colvector{1\\1\\0}, \colvector{2\\1\\3} }}\text{.} \end{equation*}
Solution
##### C16 | {
"domain": "ups.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071498682252,
"lm_q1q2_score": 0.8858422949054655,
"lm_q2_score": 0.8918110526265554,
"openwebmath_perplexity": 242.52663300952588,
"openwebmath_score": 0.8706957697868347,
"tags": null,
"url": "http://linear.ups.edu/fcla/section-S.html"
} |
Solution
##### C16
Working within the vector space $\complex{4}\text{,}$ determine if $\vect{b} = \colvector{1\\1\\0\\1}$ is in the subspace $W\text{,}$ \begin{equation*} W =\spn{\set{ \colvector{1\\2\\-1\\1}, \colvector{1\\0\\3\\1}, \colvector{2\\1\\1\\2} }}\text{.} \end{equation*}
Solution
##### C17
Working within the vector space $\complex{4}\text{,}$ determine if $\vect{b} = \colvector{2\\1\\2\\1}$ is in the subspace $W\text{,}$ \begin{equation*} W = \spn{\set{ \colvector{1\\2\\0\\2}, \colvector{1\\0\\3\\1}, \colvector{0\\1\\0\\2}, \colvector{1\\1\\2\\0} }}\text{.} \end{equation*}
Solution
##### C20
Working within the vector space $P_3$ of polynomials of degree 3 or less, determine if $p(x)=x^3+6x+4$ is in the subspace $W$ below. \begin{equation*} W=\spn{\set{x^3+x^2+x,\,x^3+2x-6,\,x^2-5}} \end{equation*}
Solution
##### C21
Consider the subspace \begin{equation*} W=\spn{\set{ \begin{bmatrix} 2 & 1\\3 & -1 \end{bmatrix} ,\, \begin{bmatrix} 4 & 0\\2 & 3 \end{bmatrix} ,\, \begin{bmatrix} -3 & 1\\2 & 1 \end{bmatrix} }} \end{equation*} of the vector space of $2\times 2$ matrices, $M_{22}\text{.}$ Is \begin{equation*} C=\begin{bmatrix} -3 & 3\\6 & -4 \end{bmatrix} \end{equation*} an element of $W\text{?}$
Solution
##### C26
Show that the set $Y=\setparts{\colvector{x_1\\x_2}}{x_1\in{\mathbb Z},\,x_2\in{\mathbb Z}}$ from Example NSC2S has Property AC.
##### M20
In $\complex{3}\text{,}$ the vector space of column vectors of size 3, prove that the set $Z$ is a subspace. \begin{equation*} Z=\setparts{\colvector{x_1\\x_2\\x_3}}{4x_1-x_2+5x_3=0} \end{equation*}
Solution
##### T20
A square matrix $A$ of size $n$ is upper triangular if $\matrixentry{A}{ij}=0$ whenever $i\gt j\text{.}$ Let $UT_n$ be the set of all upper triangular matrices of size $n\text{.}$ Prove that $UT_n$ is a subspace of the vector space of all square matrices of size $n\text{,}$ $M_{nn}\text{.}$
Solution
##### T30 | {
"domain": "ups.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071498682252,
"lm_q1q2_score": 0.8858422949054655,
"lm_q2_score": 0.8918110526265554,
"openwebmath_perplexity": 242.52663300952588,
"openwebmath_score": 0.8706957697868347,
"tags": null,
"url": "http://linear.ups.edu/fcla/section-S.html"
} |
Solution
##### T30
Let $P$ be the set of all polynomials, of any degree. The set $P$ is a vector space. Let $E$ be the subset of $P$ consisting of all polynomials with only terms of even degree. Prove or disprove: the set $E$ is a subspace of $P\text{.}$
Solution
##### T31
Let $P$ be the set of all polynomials, of any degree. The set $P$ is a vector space. Let $F$ be the subset of $P$ consisting of all polynomials with only terms of odd degree. Prove or disprove: the set $F$ is a subspace of $P\text{.}$
Solution | {
"domain": "ups.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071498682252,
"lm_q1q2_score": 0.8858422949054655,
"lm_q2_score": 0.8918110526265554,
"openwebmath_perplexity": 242.52663300952588,
"openwebmath_score": 0.8706957697868347,
"tags": null,
"url": "http://linear.ups.edu/fcla/section-S.html"
} |
# Distribution of ratio between two independent uniform random variables
Supppse $X$ and $Y$ are standard uniformly distributed in $[0, 1]$, and they are independent, what is the PDF of $Z = Y / X$?
The answer from some probability theory textbook is
$$f_Z(z) = \begin{cases} 1/2, & \text{if } 0 \le z \le 1 \\ 1/(2z^2), & \text{if } z > 1 \\ 0, & \text{otherwise}. \end{cases}$$
I am wondering, by symmetry, shouldn't $f_Z(1/2) = f_Z(2)$? This is not the case according to the PDF above.
• What is the domain of $X$ and $Y$? – Sobi Dec 8 '15 at 13:47
• en.wikipedia.org/wiki/Ratio_distribution – kjetil b halvorsen Dec 8 '15 at 13:54
• Why would you expect this to be true? The density function tells you how tightly packed the probability is in the neighborhood of a point, and it is clearly more difficult for $Z$ to be near $2$ than $1/2$ (consider for instance that $Z$ can always be $1/2$ no matter what $X$ is, but $Z < 2$ when $X > 1/2$). – dsaxton Dec 8 '15 at 14:06
• Possible duplicate of Distribution of a ratio of uniforms: What is wrong? – Xi'an Dec 8 '15 at 14:21
• I don't think it's a duplicate, that question is seeking the PDF, here I have the PDF, I am just questioning its correctness (perhaps rather naively). – qed Dec 8 '15 at 14:29
The right logic is that with independent $X, Y \sim U(0,1)$, $Z=\frac YX$ and $Z^{-1} =\frac XY$ have the same distribution and so for $0 < z < 1$ \begin{align} P\left\{\frac YX \leq z\right\} &= P\left\{\frac XY \leq z\right\}\\ &= P\left\{\frac YX \geq \frac 1z \right\}\\ \left.\left.F_{Z}\right(z\right) &= 1 - F_{Z}\left(\frac 1z\right) \end{align} where the equation with CDFs uses the fact that $\frac YX$ is a continuous random variable and so $P\{Z \geq a\} = P\{Z > a\} = 1-F_Z(a)$. Hence the pdf of $Z$ satisfies $$f_Z(z) = z^{-2}f_Z(z^{-1}), \quad 0 < z < 1.$$ Thus $f_Z(\frac 12) = 4f_Z(2)$, and not $f_Z(\frac 12) = f_Z(2)$ as you thought it should be.
This distribution is symmetric--if you look at it the right way. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771759145343,
"lm_q1q2_score": 0.885825225852663,
"lm_q2_score": 0.8976952927915969,
"openwebmath_perplexity": 194.34591193416304,
"openwebmath_score": 0.9655059576034546,
"tags": null,
"url": "https://stats.stackexchange.com/questions/185683/distribution-of-ratio-between-two-independent-uniform-random-variables"
} |
This distribution is symmetric--if you look at it the right way.
The symmetry you have (correctly) observed is that $Y/X$ and $X/Y = 1/(Y/X)$ must be identically distributed. When working with ratios and powers, you are really working within the multiplicative group of the positive real numbers. The analog of the location invariant measure $d\lambda=dx$ on the additive real numbers $\mathbb{R}$ is the scale invariant measure $d\mu = dx/x$ on the multiplicative group $\mathbb{R}^{*}$ of positive real numbers. It has these desirable properties:
1. $d\mu$ is invariant under the transformation $x\to ax$ for any positive constant $a$: $$d\mu(ax) = \frac{d(ax)}{ax} = \frac{dx}{x} = d\mu.$$
2. $d\mu$ is covariant under the transformation $x\to x^b$ for nonzero numbers $b$: $$d\mu(x^b) = \frac{d(x^b)}{x^b} = \frac{b x^{b-1} dx}{x^b} = b\frac{dx}{x} = b\, d\mu.$$
3. $d\mu$ is transformed into $d\lambda$ via the exponential: $$d\mu(e^x) = \frac{de^x}{e^x} = \frac{e^x dx}{e^x} = dx = d\lambda.$$ Likewise, $d\lambda$ is transformed back to $d\mu$ via the logarithm.
(3) establishes an isomorphism between the measured groups $(\mathbb{R}, +, d\lambda)$ and $(\mathbb{R}^{*}, *, d\mu)$. The reflection $x \to -x$ on the additive space corresponds to the inversion $x \to 1/x$ on the multiplicative space, because $e^{-x} = 1/e^x$.
Let's apply these observations by writing the probability element of $Z=Y/X$ in terms of $d\mu$ (understanding implicitly that $z \gt 0$) rather than $d\lambda$:
$$f_Z(z)\,dz = g_Z(z)\,d\mu = \frac{1}{2}\begin{cases} 1\,dz = z\, d\mu, & \text{if } 0 \le z \le 1 \\ \frac{1}{z^2}dz = \frac{1}{z}\, d\mu, & \text{if } z > 1. \end{cases}$$
That is, the PDF with respect to the invariant measure $d\mu$ is $g_Z(z)$, proportional to $z$ when $0\lt z \le 1$ and to $1/z$ when $1 \le z$, close to what you had hoped. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771759145343,
"lm_q1q2_score": 0.885825225852663,
"lm_q2_score": 0.8976952927915969,
"openwebmath_perplexity": 194.34591193416304,
"openwebmath_score": 0.9655059576034546,
"tags": null,
"url": "https://stats.stackexchange.com/questions/185683/distribution-of-ratio-between-two-independent-uniform-random-variables"
} |
This is not a mere one-off trick. Understanding the role of $d\mu$ makes many formulas look simpler and more natural. For instance, the probability element of the Gamma function with parameter $k$, $x^{k-1}e^x\,dx$ becomes $x^k e^x d\mu$. It's easier to work with $d\mu$ than with $d\lambda$ when transforming $x$ by rescaling, taking powers, or exponentiating.
The idea of an invariant measure on a group is far more general, too, and has applications in that area of statistics where problems exhibit some invariance under groups of transformations (such as changes of units of measure, rotations in higher dimensions, and so on).
• Looks like a very insightful answer. It's a pity I don't understand it at the moment. I will check back later. – qed Dec 8 '15 at 16:40
If you think geometrically...
In the $X$-$Y$ plane, curves of constant $Z = Y/X$ are lines through the origin. ($Y/X$ is the slope.) One can read off the value of $Z$ from a line through the origin by finding its intersection with the line $X=1$. (If you've ever studied projective space: here $X$ is the homogenizing variable, so looking at values on the slice $X=1$ is a relatively natural thing to do.)
Consider a small interval of $Z$s, $(a,b)$. This interval can also be discussed on the line $X=1$ as the line segment from $(1,a)$ to $(1,b)$. The set of lines through the origin passing through this interval forms a solid triangle in the square $(X,Y) \in U = [0,1]\times[0,1]$, which is the region we're actually interested in. If $0 \leq a < b \leq 1$, then the area of the triangle is $\frac{1}{2}(1-0)(b-a)$, so keeping the length of the interval constant and sliding it up and down the line $X=1$ (but not past $0$ or $1$), the area is the same, so the probability of picking an $(X,Y)$ in the triangle is constant, so the probability of picking a $Z$ in the interval is constant. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771759145343,
"lm_q1q2_score": 0.885825225852663,
"lm_q2_score": 0.8976952927915969,
"openwebmath_perplexity": 194.34591193416304,
"openwebmath_score": 0.9655059576034546,
"tags": null,
"url": "https://stats.stackexchange.com/questions/185683/distribution-of-ratio-between-two-independent-uniform-random-variables"
} |
However, for $b>1$, the boundary of the region $U$ turns away from the line $X = 1$ and the triangle is truncated. If $1 \leq a < b$, the projections down lines through the origin from $(1,a)$ and $(1,b)$ to the upper boundary of $U$ are to the points $(1/a,1)$ and $(1/b,1)$. The resulting area of the triangle is $\frac{1}{2}(\frac{1}{a} - \frac{1}{b})(1-0)$. From this we see the area is not uniform and as we slide $(a,b)$ further and further to the right, the probability of selecting a point in the triangle decreases to zero.
Then the same algebra demonstrated in other answers finishes the problem. In particular, returning to the OP's last question, $f_Z(1/2)$ corresponds to a line that reaches $X=1$, but $f_Z(2)$ does not, so the desired symmetry does not hold.
Just for the record, my intuition was totally wrong. We are talking about density, not probability. The right logic is to check that
$$\int_1^k f_Z(z) dz = \int_{1/k}^1 f_Z(z) = \frac{1}{2}(1 - \frac{1}{k})$$,
and this is indeed the case.
Yea the link Distribution of a ratio of uniforms: What is wrong? provides CDF of $Z=Y/X$. The PDF here is just derivative of the CDF. So the formula is correct. I think your problem lies in the assumption that you think Z is "symmetric" around 1. However this is not true. Intuitively Z should be a skewed distribution, for example it is useful to think when Y is a fixed number between $(0,1)$ and X is a number close to 0, thus the ratio would be going to infinity. So the symmetry of distribution is not true. I hope this help a bit. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771759145343,
"lm_q1q2_score": 0.885825225852663,
"lm_q2_score": 0.8976952927915969,
"openwebmath_perplexity": 194.34591193416304,
"openwebmath_score": 0.9655059576034546,
"tags": null,
"url": "https://stats.stackexchange.com/questions/185683/distribution-of-ratio-between-two-independent-uniform-random-variables"
} |
# Displacement and Distance
#### alane1994
##### Active member
Here is my question.
The function $$v(t)=15\cos{3t}$$, $$0 \leq t \leq 2 \pi$$, is the velocity in m/sec of a particle moving along the x-axis. Complete parts (a) through (c).
a.Graph the velocity function over the given interval. then determine when the motion is in the positive direction and when it is in the negative direction.
(I have done this part)
b. Find the displacement over the given interval.
(I have done this part)
c. Find the distance traveled over the given interval.
(This is the part that I am fuzzy on)
For this, does it involve previously found information? Or is it a separate set of calculations all its own?
Any help is appreciated!
~Austin
#### Jameson
Staff member
Displacement is the integral of the velocity vector over the given time interval and results in the distance between the starting point and end point. If you move 10 meters north and 10 meters south, the displacement is 0.
To find the distance you need to figure out where the displacement is negative and count that as a positive value. I believe this is the same as taking the integral of the absolute value of velocity. The way I would do this is find the regions where v(t) is positive and negative and then breaking the calculation into multiple calculations.
When considering $$\displaystyle v(t)=15\cos{3t}$$ where $$\displaystyle 0 \le t \le 2\pi$$ at $t=0$ v(t) is positive and becomes negative when $$\displaystyle 3t=\frac{\pi}{2}$$ so when $$\displaystyle t=\frac{\pi}{6}$$.
So your first integral is $$\displaystyle \int_{0}^{\frac{\pi}{6}}v(t)dt$$ This value will be positive. | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9835969641180274,
"lm_q1q2_score": 0.8857583696314221,
"lm_q2_score": 0.9005297921244243,
"openwebmath_perplexity": 366.31513717449747,
"openwebmath_score": 0.8370845913887024,
"tags": null,
"url": "https://mathhelpboards.com/threads/displacement-and-distance.2253/"
} |
Now v(t) will be negative until until it touches the x-axis again where $$\displaystyle 3t=\frac{3\pi}{2}$$ or when $$\displaystyle t=\frac{\pi}{2}$$. The second integral is now $$\displaystyle \int_{\frac{\pi}{6}}^{\frac{\pi}{2}}v(t)dt$$. This will be negative but when considering distance you don't need to take into account the sign of this so count it as positive.
If you keep repeating this over until the end of the interval you should get the final answer. It will take a while to calculate this way and there very well could be a quicker way to do it but that's how I would do this.
#### alane1994
##### Active member
Yeah, that's what I did after consulting a professor, I got the answer 60...
#### Jameson
Staff member
Yeah, that's what I did after consulting a professor, I got the answer 60...
You already found all of these intervals for part A so this calculation shouldn't have been too tedious. Wow your professor responds fast. You posted this question just a couple of hours ago
#### topsquark
##### Well-known member
MHB Math Helper
Just to put my two cents in...
The formula for distance is
$$dist = \int |v|dt$$
where v is the velocity vector.
In a practical sense this can pretty much only be calculated in the way Jameson has described.
-Dan | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9835969641180274,
"lm_q1q2_score": 0.8857583696314221,
"lm_q2_score": 0.9005297921244243,
"openwebmath_perplexity": 366.31513717449747,
"openwebmath_score": 0.8370845913887024,
"tags": null,
"url": "https://mathhelpboards.com/threads/displacement-and-distance.2253/"
} |
# Counterexample Check for Sum of Limit Points of Subsequences
Let $c$ be a limit point of a sequence of real numbers $\langle a_n \rangle$ and $d$ a limit point of $\langle b_n \rangle$. Is $c+d$ necessarily a limit point of $\langle a_n + b_n \rangle$?
My Question:
When considering this question, do I have to sum over the same index or can the indices for the different subsequences differ? My intuition is that the subsequences must be summed over identical indices, in which case I believe that the following example serves as a counterexample:
Let $\langle a_n \rangle = (-1)^n, \ \langle b_n \rangle = (-1)^{n+1}$. Then summing over even and odd indices, I get $0 \ne 2$ or $-2$, which is the sum of their limit points. Have I done this correctly?
-
Your argument is correct; but generally, the indices could differ. Take $a_n=b_n=(-1)^n$. $(a_n)$ has $1$ as a limit point and $(b_n)$ has $-1$ as a limit point but $(a_n+b_n)$ does not have $1+(-1)=0$ as a limit point. – David Mitra Aug 14 '12 at 22:10 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.983596967003007,
"lm_q1q2_score": 0.8857583650085358,
"lm_q2_score": 0.9005297847831081,
"openwebmath_perplexity": 116.46756869022938,
"openwebmath_score": 0.9544462561607361,
"tags": null,
"url": "http://math.stackexchange.com/questions/182617/counterexample-check-for-sum-of-limit-points-of-subsequences"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.