text
stringlengths
1
2.12k
source
dict
Does that help? Thanks for the above effort you have put in to explain that, but it's far too advanced for a quadratic that I was trying to understand, where my coursework advises the type to be simple quadratics. So in my example, x(x - 3) = 0 this is one solution, and x = 3 is the second solution. I think the whole point of my thread was to explain that no matter what anyone does to multiply out brackets as above, you just can't prove that x = 0 unless you are already told that? so even if you apply ax2 + bx + c = 0 you can say that x2 + 3x = 0 You know that b = 3, and the conclusion is 0, so no maths involved you just have to see that x2 = 0 and 3 (x) must be 3(0) = 0 I can't see how it could ever be proven using algebra? Kind regards Casio #### Sudharaka ##### Well-known member MHB Math Helper Thanks for the above effort you have put in to explain that, but it's far too advanced for a quadratic that I was trying to understand, where my coursework advises the type to be simple quadratics. So in my example, x(x - 3) = 0 this is one solution, and x = 3 is the second solution. I think the whole point of my thread was to explain that no matter what anyone does to multiply out brackets as above, you just can't prove that x = 0 unless you are already told that? so even if you apply ax2 + bx + c = 0 you can say that x2 + 3x = 0 You know that b = 3, and the conclusion is 0, so no maths involved you just have to see that x2 = 0 and 3 (x) must be 3(0) = 0 I can't see how it could ever be proven using algebra? Kind regards Casio Hi Casio, Suppose you have a general quadratic equation of the form, $$ax^2+bx+c=0\mbox{ where }a\neq 0$$. Then, $ax^2+bx+c=0$ $\Rightarrow a\left(x^2+\frac{b}{a}x+\frac{c}{a}\right)=0$ Since $$a\neq 0$$ we have, $x^2+\frac{b}{a}x+\frac{c}{a}=0$ $\Rightarrow \left(x+\frac{b}{2a}\right)^2-\frac{b^2}{4a^2}+\frac{c}{a}=0$ $\Rightarrow \left(x+\frac{b}{2a}\right)^2=\frac{b^2-4ac}{4a^2}$
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429156022934, "lm_q1q2_score": 0.8486521079697523, "lm_q2_score": 0.8615382076534742, "openwebmath_perplexity": 356.01625523466294, "openwebmath_score": 0.7397609949111938, "tags": null, "url": "https://mathhelpboards.com/threads/quadratic-equations.1874/" }
$\Rightarrow \left(x+\frac{b}{2a}\right)^2=\frac{b^2-4ac}{4a^2}$ $\Rightarrow x+\frac{b}{2a}=\pm\frac{\sqrt{b^2-4ac}}{2a}$ $\Rightarrow x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$ So the roots of a quadratic equation is given by, $x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$ In your case you have, $$a=1,\,b=-3\mbox{ and }c=0$$. Therefore the roots are, $x=\frac{-(-3)\pm\sqrt{(-3)^2-(2\times 1\times 0)}}{2\times 1}$ $\Rightarrow x=3\mbox{ or }x=0$ Hope this clarifies things for you. Kind Regards, Sudharaka. #### QuestForInsight ##### Member Thanks for the above effort you have put in to explain that, but it's far too advanced for a quadratic that I was trying to understand, where my coursework advises the type to be simple quadratics. So in my example, x(x - 3) = 0 this is one solution, and x = 3 is the second solution. I think the whole point of my thread was to explain that no matter what anyone does to multiply out brackets as above, you just can't prove that x = 0 unless you are already told that? so even if you apply ax2 + bx + c = 0 you can say that x2 + 3x = 0 You know that b = 3, and the conclusion is 0, so no maths involved you just have to see that x2 = 0 and 3 (x) must be 3(0) = 0 I can't see how it could ever be proven using algebra? Kind regards Casio I think you are bit confused here. You're asked to solve x(x-3) = 0. Think about it this way: when do you get 0 from the product of two numbers? When at least one of them is zero! Here you have a product of x and x-3 -- that's x(x-3). You're told that it's zero. It can only be so if x = 0 or x-3 = 0; that's, if x = 0 or x = 3. The fact that $p\times q = 0$ implies that either $p = 0$ or $q = 0$ is something that you should have already been comfortable with. That's probably what you're missing.
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429156022934, "lm_q1q2_score": 0.8486521079697523, "lm_q2_score": 0.8615382076534742, "openwebmath_perplexity": 356.01625523466294, "openwebmath_score": 0.7397609949111938, "tags": null, "url": "https://mathhelpboards.com/threads/quadratic-equations.1874/" }
# Dynamic dice game, how to reasonably estimate answer by hand without laboriously calculating Here's a question from my probability textbook: A casino comes up with a fancy dice game. It allows you to roll a dice as many times as you want unless a $$6$$ appears. After each roll, if $$1$$ appears, you will win $$\1$$; if $$2$$ appears, you will win $$\2$$; $$\ldots$$; if $$5$$ appears, you win $$\5$$, but if $$6$$ appears all the money you have won in the game is lost and the game stops. After each roll, if the dice number is $$1$$-$$5$$, you can decide whether to keep the money or keep on rolling. How much are you willing to pay to play the game (if you are risk neutral)? It's been asked before on MSE multiple times: When to stop rolling a die in a game where 6 loses everything Dynamic dice game: optimal price to enter A dynamic dice game Here's the answer to the question in my book:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429112114063, "lm_q1q2_score": 0.8486521076887837, "lm_q2_score": 0.861538211208597, "openwebmath_perplexity": 212.33596392188355, "openwebmath_score": 0.7685871720314026, "tags": null, "url": "https://math.stackexchange.com/questions/4495528/dynamic-dice-game-how-to-reasonably-estimate-answer-by-hand-without-laboriously/4497026" }
A dynamic dice game Here's the answer to the question in my book: Assuming that we have accumulated $$n$$ dollars, the decision to have another roll or not depends on the expected profit versus expected loss. If we decide to have an extra roll, our expected payoff will become$${1\over6}(n + 1) + {1\over6}(n + 2) + {1\over6}(n + 3) + {1\over6}(n + 4) + {1\over6}(n + 5) + {1\over6} \times 0 = {5\over6}n + 2.5.$$We have another roll if the expected payoff $${5\over6}n + 2.5 > n$$, which means that we should keep rolling if the money is no more than $$\14$$. Considering that we will stop rolling when $$n \ge 15$$, the maximum payoff of the game is $$\19$$ (the dice rolls a $$5$$ after reaching the state $$n = 14$$). We then have the following: $$f(19) = 19$$, $$f(18) = 18$$, $$f(17) = 17$$, $$f(16) = 16$$, and $$f(15) = 15$$. When $$n \le 14$$, we will keep on rolling, so $$E[f(n) \mid n \le 14] = {1\over6} \sum_{i = 1}^5 E[f(n + i)]$$. Using this equation, we can calculate the value for $$E[f(n)]$$ recursively for all $$n = 14, 13, \ldots, 0$$. After laboriously calculating or writing a program, we get $$E[f(0)] = 6.15$$, and so we are willing to pay at most $$\6.15$$ for this game. However, I'm wondering if there's a quick way by hand to get a reasonable/"good enough" estimate for $$E[f(0)]$$ without having to do multiple "average-five-numbers-and-repeat" as the book suggests. Is there?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429112114063, "lm_q1q2_score": 0.8486521076887837, "lm_q2_score": 0.861538211208597, "openwebmath_perplexity": 212.33596392188355, "openwebmath_score": 0.7685871720314026, "tags": null, "url": "https://math.stackexchange.com/questions/4495528/dynamic-dice-game-how-to-reasonably-estimate-answer-by-hand-without-laboriously/4497026" }
You can estimate it as follows: There are two possibilities - Either you roll a six, or you don't. If you don't, the expected gain is $$\frac{1+2+3+4+5}{5}=3$$ (Note that this is the expected gain GIVEN that you didn't roll a $$6$$). Now suppose that no matter what number you get from $$1$$ to $$5$$ you gain $$\3$$. As stated in the solution you provided, you should keep rolling until you have $$\ge 15$$, so in this case you roll exactly $$5$$ times. If you are successful with all five rolls, you gain $$\15$$, but if you rolled a $$6$$ in any one of these rolls you gain $$\0$$. So the estimate is $$15*\left(\frac{5}{6}\right)^5=6.03$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429112114063, "lm_q1q2_score": 0.8486521076887837, "lm_q2_score": 0.861538211208597, "openwebmath_perplexity": 212.33596392188355, "openwebmath_score": 0.7685871720314026, "tags": null, "url": "https://math.stackexchange.com/questions/4495528/dynamic-dice-game-how-to-reasonably-estimate-answer-by-hand-without-laboriously/4497026" }
So the estimate is $$15*\left(\frac{5}{6}\right)^5=6.03$$. • Thanks @ItsMe. (1) But isn't the expected gain $(1 + 2 + 3 + 4 + 5)/6 = 2.5$, and not $(1 + 2 + 3 + 4 + 5)/6 = 3$? (2) Assuming we get an estimate, how do we know if it's greater or lesser than the actual value of $\$6.15$? Jul 21 at 2:18 • I've added some detail to the answer - that is the expected gain given you didn't roll a six (hence there are only 5 options). Now I'm not sure how to determine whether this estimate is more or less without knowing the actual value, but some intuition is that in the estimate the maximum payoff is 15 whereas in the actual problem you could get up to 19, suggesting that the estimate may be lower than the actual value. Jul 21 at 4:23 • Here's a way to argue why$6.03$is an under-estimate, i.e. the modified game is worth less: the intuition is that variance in payoff helps you. There is some threshold, and you keep rolling until you meet it. Say you are close. If you roll a big payoff, you exceed the threshold by a lot (and stop), whereas if you roll a small payoff, you might stay below threshold and simply keep playing. So the variance increases the average amount by which you exceed the threshold when you stop. Jul 23 at 5:38 • Consider an even higher variance game where$1$pays$15$, and$2,3,4,5$pays nothing. This game has even higher variance, and is worth$0$(if you roll$6$before$1$) or$15$(otherwise), for an average of$7.5\$. Jul 23 at 5:39
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429112114063, "lm_q1q2_score": 0.8486521076887837, "lm_q2_score": 0.861538211208597, "openwebmath_perplexity": 212.33596392188355, "openwebmath_score": 0.7685871720314026, "tags": null, "url": "https://math.stackexchange.com/questions/4495528/dynamic-dice-game-how-to-reasonably-estimate-answer-by-hand-without-laboriously/4497026" }
# Range of $x$ given $|x^2-a|<b$ ## Exercise: Using signs of inequality alone (not using signs of absolute value) specify the values of $x$ which satisfy the following relations. Discuss all cases. $$|x^2-a|<b$$ ## Solution: $LHS \geq 0$, so: $|x^2-a|<b \text{ when } b > 0 \tag{0}$ $-b<x^2-a<b \text{ when } b > 0 \tag{1}$ $a-b<x^2<a+b \text{ when } b > 0 \tag{2}$ $a-b<x^2 \text{ when } b > 0 \tag{2.1}$ $x^2<a+b \text{ when } b > 0 \tag{2.2}$ $0 \leq a-b<x^2 \text{ when } b > 0 \tag{2.1.1}$ $a-b < x^2 \text{ when } 0 < b \leq a \tag{2.1.2}$ $\sqrt{a-b} < |x| \text{ when } 0 <b \leq a \tag{2.1.3}$ $\sqrt{a-b} < x \text{, } x < -\sqrt{a-b} \text{, when } 0 < b \leq a \tag{2.1.4}$ $|x|<\sqrt{a+b} \text{ when } a \geq -b, b > 0 \tag{2.2.1}$ $-\sqrt{a+b}<x<\sqrt{a+b} \text{ when } a \geq -b, b > 0 \tag{2.2.2}$ Formulation 1 $$\sqrt{a-b} < x \text{, } x < -\sqrt{a-b} \text{, when } b \leq a$$ $$\text{and}$$ $$-\sqrt{a+b}<x<\sqrt{a+b}$$ $$\text{all when } a > -b, b > 0$$ Formulation 2 $$-\sqrt{a+b}<x<-\sqrt{a-b}, \sqrt{a-b}<x<\sqrt{a+b} \text{, when } b\leq a$$ $$-\sqrt{a+b}<x<\sqrt{a+b} \text{ when } b > a$$ $$\text{all when } a > -b, b > 0$$ ## Request: Is my answer correct? If not, where in my solution did I go wrong? Update: I just noticed (graphically) that $b > 0$ for there to be a range of $x$. Where do I prove (algebraically ) that this is so? Another Update: Ignore the previous update. Thanks to @JeanMarie comment, I realized that this isn't necessarily so. Yet Another Update: Ignore the previous update, and pay attention to the first. Thanks to @dxiv comment, I realized that this is necessarily so. An Update Once Again: I've updated my attempt with the input given my @dxiv and @JeanMarie. How is it now?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429156022933, "lm_q1q2_score": 0.8486521062187781, "lm_q2_score": 0.8615382058759129, "openwebmath_perplexity": 491.002589416722, "openwebmath_score": 0.9009371399879456, "tags": null, "url": "https://math.stackexchange.com/questions/2057870/range-of-x-given-x2-ab" }
• You have to consider that all expressions that you introduce make sense. For example, you can use $\sqrt{a+b}$ iff $a+b \geq 0$. – Jean Marie Dec 14 '16 at 0:21 • @JeanMarie -- Oh, yes. I didn't notice that. If I put that into consideration, my requirement that $b > 0$ will be covered automagically, correct? – Fine Man Dec 14 '16 at 0:24 • If $b \le 0$ there are no solutions since $|x| \ge 0$ for $\forall x$ so $|x^2-a| \lt b \le 0$ is impossible. – dxiv Dec 14 '16 at 0:27 • @dxiv -- So, this is a proof has no relation to what JeanMarie mentioned, correct? – Fine Man Dec 14 '16 at 0:31 • It is a necessary condition for any solutions to exist, and it is independent of the other conditions on $a$. – dxiv Dec 14 '16 at 0:33 $$|x^2-a|<b$$ The LHS side is non-negative, so there are no solutions if $\,b \le 0 \;\;\;(1)\,$. For $b \gt 0$ the inequality can be rewritten as: $$-b \lt x^2 - a \lt b \quad \iff \quad \begin{cases} x^2 \lt a+b \\ x^2 \gt a-b \end{cases}$$ • $(x^2 \lt a+b)\,$  Since $x^2 \ge 0$ there are no solutions if $a+b \le 0 \;\;\;(2)\,$. Otherwise for $a+b \gt 0$ the inequality is equivalent to $-\sqrt{a+b} \lt x \lt \sqrt{a+b}\;\;\;(3)$. • $(x^2 \gt a-b)$  If $a-b \lt 0$ then the inequality holds for $\forall x\;\;\;(4)\,$. Otherwise for $a-b \ge 0$ the inequality is equivalent to $x \lt -\sqrt{a-b}\,$ or $\,x \gt \sqrt{a-b}\;\;\;(5)\,$. To combine $(1)\cdots(5)$ into one final answer, note that $\sqrt{a+b} \ge \sqrt{a-b} \ge 0$ when $a \ge b \ge 0$. • From $(1)+(2)\,$: if $b \le 0$ or $a \le -b$ then there are no solutions i.e. $x \in \emptyset$. • Otherwise ($b \gt 0$ and $a \gt -b$) if $a \lt b$ from $(3)+(4)$: $x \in (-\sqrt{a+b}, \sqrt{a+b})$. • Otherwise ($a \ge b \gt 0$) from $(3)+(5)$: $x \in (-\sqrt{a+b}, -\sqrt{a-b}) \cup (\sqrt{a-b}, \sqrt{a+b})$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429156022933, "lm_q1q2_score": 0.8486521062187781, "lm_q2_score": 0.8615382058759129, "openwebmath_perplexity": 491.002589416722, "openwebmath_score": 0.9009371399879456, "tags": null, "url": "https://math.stackexchange.com/questions/2057870/range-of-x-given-x2-ab" }
• Thank! This is a fairly elegant and complete solution. Every time I try solving this type of problem, I end up with an incomplete mess. Any suggestions on keeping solutions complete and concise? – Fine Man Dec 14 '16 at 4:51 • @SirJony Thanks. That's the kind of messy problem which invites messy solutions (as often happens in real world problems, unfortunately). Don't know there is a universal recipe, but it generally helps to eliminate the most obvious cases, first, so as to leave fewer subcases to consider in full detail. And, of course, keep good tabs on the progress and assumptions at each step. – dxiv Dec 14 '16 at 4:56 • I meant "thanks", not you to thank me. Oops. Sorry. :) I guess I was hoping for a universal recipe (as if Wolfram|Alpha were to solve it), but I'll have to stay satisfied with your tips and tricks. Again, thanks! – Fine Man Dec 14 '16 at 5:03 I advise you to have a graphical view of the situation as depicted below with $f(x)=|x^2-a|$ (green curve) and $g(x)=b$ (black horizontal line), looking for values of $x$ such that $$|x^2-a|<b \ \ \ \ \iff \ \ \ \ f(x)<g(x).$$ (graphics obtained with Geogebra, with sliders for values of $a$ and $b$). This figure allows to consider the different cases according to resp. values of $a$ and $b$, by "sweeping" the horizontal line along the curve, and looking for cases where the line is above the curve. For example, for the displayed case ($b=3 \leq a=4$), the line is above the curve for $-\sqrt{7}<x<-1$ and for $1<x<\sqrt{7}.$ (case of two disjoint validity intervals), with $\sqrt{7}=\sqrt{a+b}$ and $1=\sqrt{a-b}$. Were $b>a$, it is visible that there would be a single validity interval. And of course, if $b<0$, no solution exist. • Is my graphical presentation understandable ? – Jean Marie Dec 14 '16 at 7:41
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429156022933, "lm_q1q2_score": 0.8486521062187781, "lm_q2_score": 0.8615382058759129, "openwebmath_perplexity": 491.002589416722, "openwebmath_score": 0.9009371399879456, "tags": null, "url": "https://math.stackexchange.com/questions/2057870/range-of-x-given-x2-ab" }
# Minkowski sum of two disks An open disk with radius $r$ centered at $\mathbf{p}$ is $D(\mathbf{p}, r)=\{\mathbf{q} \mid d(\mathbf p, \mathbf q) < r\}$, and the Minkowski sum of two sets $A$ and $B$ is $A \oplus B=\{\mathbf p + \mathbf q \mid \mathbf p \in A, \mathbf q \in B \}$. How can you show that $D(\mathbf{a}, r_a) \oplus D(\mathbf{b}, r_b) = D(\mathbf{a} + \mathbf{b}, r_a + r_b)$? Attempt: \begin{align} D(\mathbf{a}, r_a) \oplus D(\mathbf{b}, r_b) &= \{\mathbf p + \mathbf q \mid \mathbf p \in D(\mathbf{a}, r_a), \mathbf q \in D(\mathbf{b}, r_b) \} \\&= \{\mathbf p + \mathbf q \mid \mathbf p \in \{\mathbf{x} \mid d(\mathbf a, \mathbf x) < r_a\}, \mathbf q \in \{\mathbf{y} \mid d(\mathbf b, \mathbf y) < r_b\} \\&= \{\mathbf p + \mathbf q \mid d(\mathbf a, \mathbf p) < r_a, d(\mathbf b, \mathbf q) < r_b \} \end{align} And here I got stuck. As best as I can tell, now I would need to prove that $$d(\mathbf a, \mathbf p) < r_a, d(\mathbf b, \mathbf q) < r_b \iff d(\mathbf a + \mathbf b, \mathbf p + \mathbf q) < r_a + r_b$$ but this seems false to me. I tried adding the two inequalities together, but that doesn't seem to give me that condition unless $\mathbf a - \mathbf p$ and $\mathbf b - \mathbf q$ are parallel. First, notice that $D(p,r)= \{ p+ u \mid u \in D(0,r) \}$, hence $$D(a,r_a)+D(b,r_b)= \{ a+b+u+v \mid u \in D(0,r_a), v \in D(0,r_b)\}.$$ Therefore, it is sufficient to show that $D(0,r_a)+D(0,r_b)=D(0,r_a+r_b)$. But $$\|u+v\| \leq \|u \| + \|v\| <r_a+r_b, \ \text{if} \ u \in D(0,r_a) \ \text{and} \ v \in D(0,r_b),$$ so $D(0,r_a)+D(0,r_b) \subset D(0,r_a+r_b)$. Then, $$D(0,r_a+r_b)= \{ (r_a+r_b)u \mid u \in D(0,1) \}= \{\underset{\in D(0,r_a)}{\underbrace{r_au}} + \underset{\in D(0,r_b)}{\underbrace{r_bu}} \mid u \in D(0,1)\},$$ so $D(0,r_a+r_b) \subset D(0,r_a)+D(0,r_b)$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429120895837, "lm_q1q2_score": 0.8486521049434187, "lm_q2_score": 0.8615382076534742, "openwebmath_perplexity": 166.411757797398, "openwebmath_score": 0.9988127946853638, "tags": null, "url": "https://math.stackexchange.com/questions/444845/minkowski-sum-of-two-disks/444850" }
so $D(0,r_a+r_b) \subset D(0,r_a)+D(0,r_b)$. • Thanks. I don't suppose it is to possible to generalize this proof to metric spaces, rather than just normed vector spaces? I've had a go at it, but I didn't get very far. – Electro Jul 16 '13 at 13:10 • Minkowski sum is not defined in any metric space, a structure of vector space is needed. – Seirios Jul 16 '13 at 13:15 • Whoops, I meant vector space equipped with a metric. – Electro Jul 16 '13 at 13:18 • You can easily find a counterexample using SNCF metric: en.wikipedia.org/wiki/Metric_space#Examples_of_metric_spaces – Seirios Jul 16 '13 at 19:50 To show $A = B$ it is usually the easiest to split into two parts $A \subseteq B$ and $A \supseteq B$. First, if $p \in D(a,r_a)$ and $q \in D(b,r_b)$ then $p + q \in D(a+b, r_a+r_b)$. This is simple using the triangle inequality: $$|(p+q)-(a+b)| < |p-a| + |q-b|.$$ Secondly, if $u \in D(a+b, r_a + r_b)$, then we need to find a point $v$ such that $v \in D(a,r_a)$ and $u-v \in D(b,r_b)$. A good candidate is to split the distance between $u$ and $a+b$ in ratio $r_a : r_b$, that is (the $-b$ is to adjust for the center of the disk) $$v = \frac{r_a\cdot u + r_b \cdot (a+b)}{r_a + r_b}-b.$$ Now, $$|v-a| = \left|\frac{r_a\cdot u + r_b \cdot (a+b)}{r_a + r_b}-b-a\right| = r_a\frac{|u-(a+b)|}{r_a+r_b}\leq r_a$$ and $$|(u-v)-b| = \left|\frac{r_b\cdot u -r_b\cdot(a+b)}{r_a + r_b}+b-b\right| = r_b\frac{|u-(a+b)|}{r_a+r_b}\leq r_b.$$ I hope this helps ;-) I would take the following route. Hopefully it is more intuitive. It is clear that $$D(b, r_b)\oplus D(0, r_0)=D(b, r_b+r_0)$$ and that $$a+D(b, r)=D(a+b, r).$$ (Here $a+ \text{"some set"}$ denotes translation). So we write $$D(a, r_a)=a+D(0, r_a).$$ Therefore $$\begin{split} D(a, r_a)\oplus D(b, r_b) &= [a+D(0, r_a)]\oplus D(b, r_b) \\ &=a+[D(0, r_a)\oplus D(b, r_b)]\\ &=a+ D(b, r_a+r_b) \\ &= D(a+b, r_a+r_b). \end{split}$$ How about using triangular inequality ? $$d(u,w) \leq d(u,v) + d(v, w)$$ Hint: use $a+(b-q)$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429120895837, "lm_q1q2_score": 0.8486521049434187, "lm_q2_score": 0.8615382076534742, "openwebmath_perplexity": 166.411757797398, "openwebmath_score": 0.9988127946853638, "tags": null, "url": "https://math.stackexchange.com/questions/444845/minkowski-sum-of-two-disks/444850" }
How about using triangular inequality ? $$d(u,w) \leq d(u,v) + d(v, w)$$ Hint: use $a+(b-q)$. $D(\mathbf{a},r_a)\oplus D(\mathbf{b},r_b)=\{\mathbf{p}+\mathbf{q}|d(\mathbf{a},\mathbf{p})<r_a,d(\mathbf{b},\mathbf{q})<r_b\}$ $D(\mathbf{a}+\mathbf{b},r_a+r_b)=\{\mathbf{s}|d(\mathbf{a}+\mathbf{b},\mathbf{s})<r_a+r_b\}$ $\forall \mathbf{p} \in D(\mathbf{a},r_a) \forall \mathbf{q}\in D(\mathbf{b},r_b) \exists \mathbf{s}=\mathbf{p}+\mathbf{q} \in D(\mathbf{a}+\mathbf{b},r_a+r_b)$ $d(\mathbf{a},\mathbf{p})<r_a, d(\mathbf{b},\mathbf{q})<r_b \Rightarrow d(\mathbf{a+b},\mathbf{p+q})=d(\mathbf{a+b-q},\mathbf{p}) \leq d(\mathbf{a},\mathbf{p})+d(\mathbf{a},\mathbf{a+b-q})=d(\mathbf{a},\mathbf{p})+d(\mathbf{q},\mathbf{b})<r_a+r_b$ $\forall \mathbf{s} \in D(\mathbf{a}+\mathbf{b},r_a+r_b) \exists \mathbf{p}\in D(\mathbf{a},r_a), \mathbf{q}\in D(\mathbf{b},r_b), \mathbf{s=p+q}$ $\mathbf{p}=\mathbf{a}+(\mathbf{s-(a+b)}) r_a/(r_a+r_b)$, $\mathbf{q}=\mathbf{b}+(\mathbf{s-(a+b)}) r_b/(r_a+r_b)$ • If you could add some words that would be nice. – user1337 Jul 16 '13 at 10:20
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429120895837, "lm_q1q2_score": 0.8486521049434187, "lm_q2_score": 0.8615382076534742, "openwebmath_perplexity": 166.411757797398, "openwebmath_score": 0.9988127946853638, "tags": null, "url": "https://math.stackexchange.com/questions/444845/minkowski-sum-of-two-disks/444850" }
# Proof a graph is bipartite if and only if it contains no odd cycles How can we prove that a graph is bipartite if and only if all of its cycles have even order? Also, does this theorem have a common name? I found it in a maths Olympiad toolbox. One direction is very easy: if $$G$$ is bipartite with vertex sets $$V_1$$ and $$V_2$$, every step along a walk takes you either from $$V_1$$ to $$V_2$$ or from $$V_2$$ to $$V_1$$. To end up where you started, therefore, you must take an even number of steps. Conversely, suppose that every cycle of $$G$$ is even. Let $$v_0$$ be any vertex. For each vertex $$v$$ in the same component $$C_0$$ as $$v_0$$ let $$d(v)$$ be the length of the shortest path from $$v_0$$ to $$v$$. Color red every vertex in $$C_0$$ whose distance from $$v_0$$ is even, and color the other vertices of $$C_0$$ blue. Do the same for each component of $$G$$. Check that if $$G$$ had any edge between two red vertices or between two blue vertices, it would have an odd cycle. Thus, $$G$$ is bipartite, the red vertices and the blue vertices being the two parts.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429142850274, "lm_q1q2_score": 0.848652103332929, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 211.26135912943144, "openwebmath_score": 0.8696354627609253, "tags": null, "url": "https://math.stackexchange.com/questions/311665/proof-a-graph-is-bipartite-if-and-only-if-it-contains-no-odd-cycles/3422887" }
• @YOUSEFY: That’s the direction that I proved in the first paragraph. And I gave direct proofs for both directions. – Brian M. Scott Oct 19 '16 at 9:43 • @YOUSEFY: No, I mean the first paragraph. What you proved in your comment is that if $G$ has an odd cycle, then $G$ is not bipartite, which is the contrapositive of (and logically equivalent to) the statement that if $G$ is bipartite, then it has no odd cycle. What I proved in the second paragraph is that if $G$ does not have an odd cycle, then $G$ is bipartite. This is the converse of what you proved. – Brian M. Scott Oct 19 '16 at 15:34 • @sourav: If you start at a vertex in $V_1$ and take a walk of length $3$, say, your first step goes to a vertex in $V_2$, your second to a vertex in $V_1$, and your third to a vertex in $V_2$; since you started in $V_1$ and are now in $V_2$, you can’t possibly have returned to your starting vertex. The same thing happens for any odd number of steps. – Brian M. Scott Nov 1 '16 at 16:31 • @sourav: You’re welcome. – Brian M. Scott Nov 1 '16 at 16:37 • @sourav: No, the graph is not bipartite. Being bipartite has nothing to do with how many components the graph has. A graph is bipartite if the vertices can be partitioned into two sets, say $V_1$ and $V_2$, such that every edge is between a vertex in $V_1$ and a vertex in $V_2$, i.e., so that there are no edges between vertices in $V_1$ and no edges between vertices in $V_2$. – Brian M. Scott Nov 1 '16 at 18:45 does this theorem have a common name? It is sometimes called König's Theorem (1936), for example in lecture notes here. However, this name is ambiguous.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429142850274, "lm_q1q2_score": 0.848652103332929, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 211.26135912943144, "openwebmath_score": 0.8696354627609253, "tags": null, "url": "https://math.stackexchange.com/questions/311665/proof-a-graph-is-bipartite-if-and-only-if-it-contains-no-odd-cycles/3422887" }
However, this name is ambiguous. • I expanded your answer a bit, as it drew some low-quality flags. – user147263 Jul 1 '15 at 17:45 • I don't agree with you. in the textbook of Diestel, he mentiond König's theorem in page 30, and he mentiond the question of this site in page 14. he didn't say at all any similiarities between the two. Also, König's talks about general case of r-paritite so if what you're saying is true, then the theorem is just a special case of general case. Right now, I don't have any name for it except it is a proposition (means something that mathematicains do find it interesting but it doesn't come becasue they're thinking on it so much) – YOUSEFY Oct 18 '16 at 17:15 The following is an expanded version of Brian's answer. Brian's answer is almost perfect, except that there may be a gap between "if G had any edge between two red vertices or between two blue vertices" and "it would have an odd cycle", which is not that obvious, at least to me(since we can only conclude that there exists a closed walk of odd numbers of edges). We first prove a lemma stating that if there is an odd closed walk in a graph, then there is an odd closed cycle. Lemma 1 If there is an odd closed walk in a graph, then there is an odd closed cycyle.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429142850274, "lm_q1q2_score": 0.848652103332929, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 211.26135912943144, "openwebmath_score": 0.8696354627609253, "tags": null, "url": "https://math.stackexchange.com/questions/311665/proof-a-graph-is-bipartite-if-and-only-if-it-contains-no-odd-cycles/3422887" }
Lemma 1 If there is an odd closed walk in a graph, then there is an odd closed cycyle. Proof$$\;$$ We induct on the number of edges $$k$$ of the odd closed walk. The base case $$k=1$$, when the closed walk is a loop, holds trivially. Assume that, for some positive integer $$r > 1$$, Lemma 1 is true for all odd numbers $$k\le2r-1$$. Let $$W=(w_1, \dots, w_{2r+1}, w_1)$$ be a closed walk of $$2r+1$$ edges. If all vertices in $$W$$ is different except for $$w_1$$, then we have a cycle of length $$2r+1$$. If there exists two identical vertices $$w_i=w_j$$ for $$1, then $$W$$ can be written as $$(w_1, \dots,w_i, \dots, w_j,\dots, w_1)$$. Thus, we now have two closed walks $$W_1=(w_i,w_{i+1} \dots, w_j)$$ and $$(w_j,w_{j+1} \dots, w_i)$$. The summation of the length of $$W_1$$ and $$W_2$$ equals to the length of $$W$$. Since $$W$$ is of odd length, one of $$W_1$$ and $$W_2$$ must be of odd length $$\le 2r-1$$. By our assumption, there must be a an odd cycle in $$W_1$$ or $$W_2$$, and thus in $$W$$, which completes our induction. $$\square$$ Theorem 1 If there is no odd cycles in a graph, then the graph is bipartite. Proof$$\;$$ Suppose there is no odd cycles in graph $$G=(V,E)$$. It is also assumed that, without loss of generality, $$G$$ is connected. Then $$V$$ can be partitioned into $$(A,B)$$, where $$A=\{v\in V|\text{the shortest path between v and v_0 is of even length}\}$$ $$B=\{v\in V|\text{the shortest path between v and v_0 is of odd length}\}$$ Next we prove that there is no edge between any two vertices in $$A$$ or $$B$$. Suppose for contradiction that there exists an edge $$(x,y)\in E$$ such that $$x,y \in A$$ or $$x,y \in B$$ . Then the shortest path from $$x$$ to $$v_0$$, the shortest path from $$y$$ to $$v_0$$, together with edge $$(x,y)$$, form a closed walk: $$(v_0, \dots,x,y, \dots,v_0)$$, which is of odd length. By lemma 1, $$G$$ contains an odd cycle, which is a contradiction. Therefore, $$G$$ is a bipartite graph between $$A$$ and $$B$$ $$\square$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429142850274, "lm_q1q2_score": 0.848652103332929, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 211.26135912943144, "openwebmath_score": 0.8696354627609253, "tags": null, "url": "https://math.stackexchange.com/questions/311665/proof-a-graph-is-bipartite-if-and-only-if-it-contains-no-odd-cycles/3422887" }
• Is it not sufficient to note that two vertices $u,w$ in the same set of the bipartition cannot share an edge as $d(v_0,u) = d(v_0,w) \pm 1$?. Say $u$ is closer to $v_0$ than $w$. Then one shortest path from $v$ to $w$ is the one passing through $w$. But then the distances to $w$ and $u$ have different parity and so they aren't in the same set. – PhysMath May 4 '20 at 4:11 (By contradiction) (->) Suppose n is odd. Let X={ui such that i is odd} and Y={ui such that i is even} as the bipartition formed in the graph. Consider cycle C=u1 u2 u3 u4...un u1 as the cycle in G. If u1 is odd, un can not be odd because there will be no bipartite formed. Therefore, n should be even. One relatively simple way is to break the if and only if into its two parts: • Prove that if a graph $G$ is bipartite then it has no odd cycles, and • If $G$ has only even cycles, then you can partition the vertices into two independent sets. I don't think this is a named theorem, it's too simple. • The handshaking Lemma is even simpler – SK19 May 8 '19 at 1:11
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429142850274, "lm_q1q2_score": 0.848652103332929, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 211.26135912943144, "openwebmath_score": 0.8696354627609253, "tags": null, "url": "https://math.stackexchange.com/questions/311665/proof-a-graph-is-bipartite-if-and-only-if-it-contains-no-odd-cycles/3422887" }
# How do I solve a congruence system that doesn't satisfies the Chinese Remainder Theorem? I have the following system $x \equiv 2 (mod 4)$ $x \equiv 2 (mod 6)$ $x \equiv 2 (mod 7)$ And I can't apply the Chinese remainder Theorem. I tried applying the Chinese remainder Theorem to the last 2 congruences, which gave me that the set of solutions of that 2 congruences is $2 + 42 \cdot \beta$ with $\beta$ belonging to $\Bbb Z$. Then I solved the set of solutions of the first congruence, which is $6 + 4 \cdot \alpha$ with $\alpha$ belonging to $\Bbb Z$. A common solution would be the one that satisfies $2 + 42 \cdot \beta = 6 + 4 \cdot \alpha$, equivalently, the one that satisfies $42 \cdot \beta + 4 \cdot \alpha = 4$, and this (because of Bezout Identity) have solution only if $mcd(42,4)=4$ which is not true. So this would mean this system have no solution, which is incorrect (I think). Then, what can I do?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429120895838, "lm_q1q2_score": 0.8486521014414704, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 312.5417043291537, "openwebmath_score": 0.8281407356262207, "tags": null, "url": "https://math.stackexchange.com/questions/2417938/how-do-i-solve-a-congruence-system-that-doesnt-satisfies-the-chinese-remainder" }
Then, what can I do? • $x=2$ is a solution (so solutions exist). – lulu Sep 5 '17 at 17:08 • In general, the first two should be resolved $\pmod {12}$. They are compatible (as it happens) and you can easily deduce that $x\equiv 2 \pmod {12}$ Once you have that, the problem is straight forward. In principle, though you could have had a conflict between the first two. – lulu Sep 5 '17 at 17:11 • @lulu Could you explain me why does the solutions of the first two congruences can be achieved just by combining them into the same congruence $(mod 12)$ ? – puradrogasincortar Sep 5 '17 at 17:20 • $x\equiv 2 \pmod 6$ is the same as the pair $x \equiv 0 \pmod 2$ and $x\equiv 2 \pmod 3$. Now the first congruence is redundant here (as we already know $x\equiv 2 \pmod 4$. Thus I really just have to solve $x\equiv 2 \pmod 4$ and $x\equiv 2 \pmod 3$. That's a standard CRT problem. – lulu Sep 5 '17 at 17:25 • Just to be clear, you could have had a conflict. If, say, I replace your second line with $x\equiv 1 \pmod 6$ then the first line would say $x$ was even but the second would say it was odd, so there would be no solutions. – lulu Sep 5 '17 at 17:26 First of all you have that the solution of the first relations are given by $4\alpha + 2$. Then this will give you the relation: $$2 + 4\alpha = 2 + 42\beta \iff 42 \beta = 4 \alpha \iff 21 \beta = 2 \alpha$$ And certainly this one have solution. In fact the Bezout Lemma says that $xa + by = m$ has a solution iff $\operatorname{gcd}(x,y) \mid m$. It doesn't have to be equal.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429120895838, "lm_q1q2_score": 0.8486521014414704, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 312.5417043291537, "openwebmath_score": 0.8281407356262207, "tags": null, "url": "https://math.stackexchange.com/questions/2417938/how-do-i-solve-a-congruence-system-that-doesnt-satisfies-the-chinese-remainder" }
• The congruences come from this exercise: A mother have 3 daughters of 20, 22 and 23 years old. They want to leave home when the mother achieves an age such that the remainder of the age divided by each of the daughters years when the little one was 4 is 2. The questions are: -At what age do the daughters leave? -What's the mother age in that moment? By using what you say, how the solution of the system can give me the answers? – puradrogasincortar Sep 5 '17 at 17:31 • Find the smallest solution for either $\alpha$ or $\beta$. That should be 21 or 2, respectively. Then plug in the general form of the solution to get that the mother's age should be 86 – Stefan4024 Sep 5 '17 at 18:25 In a system of congruences $x\equiv a_i\pmod {n_i}$, the Chinese theorem applies when all $n_i$ are relatively prime. When this is not the case, there is an additional condition to know if there are solutions, which is : $\forall (i,j)\mid a_i\equiv a_j\pmod{\gcd(n_i,n_j)}$ In that case, the solutions are to be computed modulo the LCM of all $n_i$. Here since all $a_i$ are equal the criterion is trivially met and $2$ is a trivial solution $x\equiv 2\pmod{\operatorname{lcm}(4,6,7)}\equiv 2\pmod {84}$ In general to solve such system you have to find $n'_i$ such that $\begin{cases} n'_i\mid n_i\\ \operatorname{lcm}\limits_{i=1..N}(n'_i)=\operatorname{lcm}\limits_{i=1..N}(n_i)\\ \gcd(n'_i,n'_j)=1\end{cases}$ Here we have $n_1=4,n_2=6,n_3=7$ whose LCM is $84$. The equivalent system while be $n'_1=4,n'_2=3,n'_3=7$ with the same LCM. The remainders are then recomputed with these new $n'_i\quad:\ x\equiv a_i\pmod{n'_i}$ $\begin{cases} x\equiv 2\pmod{4}\\ x\equiv 2\pmod{6}\\ x\equiv 2\pmod{7} \end{cases} \implies \begin{cases} x\equiv 2\pmod{4}\\ x\equiv 2\pmod{3}\\ x\equiv 2\pmod{7} \end{cases}$ Now we can apply Chinese theorem and $x\equiv 2\pmod{84}$ as previously.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429120895838, "lm_q1q2_score": 0.8486521014414704, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 312.5417043291537, "openwebmath_score": 0.8281407356262207, "tags": null, "url": "https://math.stackexchange.com/questions/2417938/how-do-i-solve-a-congruence-system-that-doesnt-satisfies-the-chinese-remainder" }
Now we can apply Chinese theorem and $x\equiv 2\pmod{84}$ as previously. • $2 \pmod{4}$ would imply $2 \pmod{84}$ – user1329514 Sep 5 '17 at 17:41 • 6 is not 2 mod 84. – zwim Sep 5 '17 at 17:44 • $LCM(4,6,7) = 2^2 * 3 * 7 = 84$ ... $\{ 2 \pmod {42} \} \cap \{ 2 \pmod{4} \} = \{ 2 \pmod{84} \}$ – user1329514 Sep 5 '17 at 23:59 • lol, silly me, I didn't even noticed my lcm was wrong. corrected. – zwim Sep 6 '17 at 0:03 Hint $\,\ 4,6,7\mid x\!-\!2\iff {\rm lcm}(4,6,7)\mid x\!-\!2$ For more see here on CCRT = Constant case optimization of CRT = Chinese Remainder Theorem.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429120895838, "lm_q1q2_score": 0.8486521014414704, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 312.5417043291537, "openwebmath_score": 0.8281407356262207, "tags": null, "url": "https://math.stackexchange.com/questions/2417938/how-do-i-solve-a-congruence-system-that-doesnt-satisfies-the-chinese-remainder" }
+0 # how far did a person fall if they fell for 3 minutes and 22 seconds 0 257 3 how far did a person fall if they fell for 3 minutes and 22 seconds Guest Aug 7, 2017 #1 +178 +1 Assuming the gravitational acceleration is $$9.8m/s^2$$ in your question. 3 minutes and 22 seconds = 202 seconds The distance fallen is proportional to one half the square of time times the acceleration: $$Δx=\frac{1}{2}at^2$$ Plug $$a=9.8m/s^2$$ and $$t=202 s$$ $$Δx=\frac{1}{2}9.8\left(202\right)^2$$ $$=4.9(40804)$$ $$=199939.6 m ≈ 200 km$$ (Fun fact: You can fall for over 12 minutes from the solar system's highest cliff- The Verona Rupes on Miranda) Jeffes02  Aug 8, 2017 #2 +2 0 But you can never assume you need to know the vlocity and the rate of witch you are falling BruinBoy40  Aug 8, 2017 #3 +178 0 That is correct, but I would have to assume so since he didn't mention about it by anyway in his question. :P Jeffes02  Aug 8, 2017 ### New Privacy Policy We use cookies to personalise content and advertisements and to analyse access to our website. Furthermore, our partners for online advertising receive information about your use of our website. For more information: our cookie policy and privacy policy.
{ "domain": "0calc.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429103332288, "lm_q1q2_score": 0.8486520999283034, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 2712.1379439733414, "openwebmath_score": 0.3768661618232727, "tags": null, "url": "https://web2.0calc.com/questions/how-far-did-a-person-fall-if-they-fell-for-3-minutes" }
# Logical implication and valid arguments question The following is a valid argument: $[[p \lor (q\lor r)]\land \neg q] \rightarrow (p\lor r)$. Determine the rows of the table crucial for assessing the validity of the argument and which rows can be ignored. $$\begin{array}{c|c|c|c|c|c|c|c} p & q & r & \neg q & q\lor r & p\lor(q\lor r) & [[p \lor (q\lor r)]\land \neg q] & p\lor r \\ \hline 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 0 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 0 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 0 & 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & \underbrace{0}_{\text{premise 2}} & 1 & \underbrace{1}_{\text{premise 1}} & 0 & \underbrace{1}_{\text{conclusion}} \\ \end{array}$$ So rows 2, 5, and 6 are crucial for assessing the validity of the argument, since we have the premises and conclusion $1$ in these rows. Following this exercise are some questions I have, as the text I'm using doesn't really cover these details. 1. $[[p \lor (q\lor r)]\land \neg q] \rightarrow (p\lor r)$ is also a tautology. Is it necessary that an implication of the form $$(p_{1}\land p_{2} \land \dots \land p_{n})\rightarrow q$$ to be a tautology in order to be a valid argument -- is this correct? 2. So in this exercise, only rows 2,5, and 6 assessed the validity of the argument. So for the other rows, the argument is invalid. But how can the exercise state $[[p \lor (q\lor r)]\land \neg q] \rightarrow (p\lor r)$ as a valid statement? Doesn't it depends on the values of the premises and conclusion being 1? 3. What does it take for premises to logically imply a conclusion? Must it be that the implication be a tautology? or must it be that the rows by which the premises and conclusion be 1? Thank you very much in advance! :)
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9353465170505205, "lm_q1q2_score": 0.8486513261270305, "lm_q2_score": 0.907312221360624, "openwebmath_perplexity": 193.17050939139443, "openwebmath_score": 0.8227189183235168, "tags": null, "url": "https://math.stackexchange.com/questions/1169766/logical-implication-and-valid-arguments-question" }
Thank you very much in advance! :) • Did you type the 'argument' verbatim? I ask because $[[p \lor (q\lor r)]\land \neg q] \rightarrow (p\lor r)$ is not what one would call an argument, but a statement. And judging by your use of premise 1 and 2, I'd assume the argument is $p\lor q\lor r, \neg q\models p\lor r$. – Git Gud Mar 1 '15 at 1:22 • @GitGud Yes, sorry I edited it now. – user144809 Mar 1 '15 at 1:24 • You didn't replace all the instances of 'argument', still not sure what you're asking. – Git Gud Mar 1 '15 at 1:28 • @GitGud I copied 'argument' verbatim. It's the word used in Grimaldi's Discrete and Combinatorial mathematics. I'm confused as to when premises logically imply a conclusion -- is it when the implication is a tautology? or is it for when the rows are 1's in their premises and conclusion? – user144809 Mar 1 '15 at 1:35 • @H_T I was having trouble believing the book refers to $((p \lor (q\lor r))\land \neg q) \rightarrow (p\lor r)$, but I was able to find a few pages of the book online and this seems to be the case. This is a huge abuse, $((p \lor (q\lor r))\land \neg q) \rightarrow (p\lor r)$ is a statement, it's not argument. – Git Gud Mar 1 '15 at 1:54 I agree with the above comment; we have to say that the question must be rephrased as : show that : "if $p∨(q∨r)$ and $¬q$, therefore $(p∨r)$" is a valid argument. But as you say in 1) : $\varphi_1, \varphi_2,\ldots,\varphi_n \vDash \psi$ iff $\vDash \varphi_1 \land \varphi_2 \land \ldots \land \varphi_n \to \psi$. Thus, the "procedure" of truth-table verification used to establish the validity [i.e. "tautologuesness"] of the conditional it is enough to show the validity of the corersponding argument. For 2), the definition of valid argument is "formalized" with the relation of logical consequence that, for propositional logic is :
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9353465170505205, "lm_q1q2_score": 0.8486513261270305, "lm_q2_score": 0.907312221360624, "openwebmath_perplexity": 193.17050939139443, "openwebmath_score": 0.8227189183235168, "tags": null, "url": "https://math.stackexchange.com/questions/1169766/logical-implication-and-valid-arguments-question" }
$\Sigma$ tautologically implies $\tau$ (written : $\Sigma \vDash \tau$) iff every truth assignment for the sentence symbols in $\Sigma$ and $τ$ that satisfies every member of $\Sigma$ also satisfies $τ$. Here the set of premises $\Sigma$ is : $\{ p∨(q∨r), ¬q \}$, while the conclusion $\tau$ is $(p∨r)$ and the truth table show that in all rows where both premises are true, also the conclusion is. Thus, the conclusion is tautologically implied by the premises, i.e. the argument is valid.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9353465170505205, "lm_q1q2_score": 0.8486513261270305, "lm_q2_score": 0.907312221360624, "openwebmath_perplexity": 193.17050939139443, "openwebmath_score": 0.8227189183235168, "tags": null, "url": "https://math.stackexchange.com/questions/1169766/logical-implication-and-valid-arguments-question" }
Each number can be represented as the sum of the two numbers directly above it. Pascal’s Triangle: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 . Pascal's triangle is an infinite numerical triangle of numbers. Pascal's triangle (mod 2) turns out to be equivalent to the Sierpiński sieve (Wolfram 1984; Crandall and Pomerance 2001; Borwein and Bailey 2003, pp. 46-47). The Pascal’s triangle is a graphical device used to predict the ratio of heights of lines in a split NMR peak. In Pascal's words (and with a reference to his arrangement), In every arithmetical triangle each cell is equal to the sum of all the cells of the preceding row from its column to … Given a non-negative integer N, the task is to find the N th row of Pascal’s Triangle.. Pascal’s triangle, in algebra, a triangular arrangement of numbers that gives the coefficients in the expansion of any binomial expression, such as (x + y) n.It is named for the 17th-century French mathematician Blaise Pascal, but it is far older.Chinese mathematician Jia Xian devised a triangular representation for the coefficients in the 11th century. It's constructed iteratively – the top element is a single one. One of the most interesting Number Patterns is Pascal's Triangle (named after Blaise Pascal, a famous French Mathematician and Philosopher). Below is an interesting solution. Pascal's Triangle. Go to Pascals triangle to row 11, entry 3. So we know the answer is . To print pascal triangle in Java Programming, you have to use three for loops and start printing pascal triangle as shown in the following example. There is a nice calculator on this page that you can play with in order to see the Pascal's triangle for up to 99 rows. Pascal's Triangle Generator. The program code for printing Pascal’s Triangle is a very famous problems in C language. Pascal's triangle is a triangular array constructed by summing adjacent elements in preceding rows. We have already discussed different ways to find the factorial of a number. Just specify how many
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
We have already discussed different ways to find the factorial of a number. Just specify how many rows of Pascal's Triangle you need and you'll automatically get that many binomial coefficients. Change number of rows with slider 'row'. The triangle is also called Yang Hui’s triangle in China as the Chinese mathematician Yang Hui discovered it much earlier in 1261. 11/3 = 11.10.9/3.2.1 = 165. Pascal's triangle contains the values of the binomial coefficient. Let f(n) be the base-10 logarithm of the product of the elements of the nth row in Pascal's triangle. Prime Factorization Calculator. Math Example Problems with Pascal Triangle. Still, he is best known for his contributions to the Pascal triangle. So, let us take the row in the above pascal triangle which is corresponding to 4 … Note: The row index starts from 0. The Pascal triangle yields interesting patterns and relationships. The first 7 numbers in Fibonacci’s Sequence: 1, 1, 2, 3, 5, 8, 13, … found in Pascal’s Triangle Secret #6: The Sierpinski Triangle. That’s why it has fascinated mathematicians across the world, for hundreds of years. Pascal Triangle in Java | Pascal triangle is a triangular array of binomial coefficients. 12.1 Pascal's Triangle An algebra problem such as expanding (x + 2) 5 to a polynomial of degree 5 can be a daunting one.It would usually be done in one of three ways. Guy (1990) gives several other unexpected properties of Pascal's triangle. Pascal’s triangle can be created using a very simple pattern, but it is filled with surprising patterns and properties. Compute answers using Wolfram's breakthrough technology & knowledgebase, relied on by millions of students & professionals. With the complexity and functional values of utilizing Pascal’s triangle, you might surmise that there are tools available to utilize the triangle effectively on a scientific or graphing calculator.. To be sure, such functionality has been included – once you know how to get there. Also, check out this colorful
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
such functionality has been included – once you know how to get there. Also, check out this colorful … In (a + b) 4, the exponent is '4'. Press button, get Pascal's Triangle. We will discuss two ways to code it. In 1964, it was sold for US$3.25. Pascal's Triangle can be displayed as such: The triangle can be used to calculate the coefficients of the expansion of by taking the exponent and adding . In this post, I have presented 2 different source codes in C program for Pascal’s triangle, one utilizing function and the other without using function. Books on Blaise Pascal. One Variable Statistics Calculator. Approach: The idea is to store the Pascal’s triangle in a matrix then the value of n C r will be the value of the cell at n th row and r th column. The same triangle was also in the book “Precious Mirror of the Four Elements” by another Chinese mathematician Chu-Shih-Chieh in 1303. Sieve of Eratosthenes Player. He also came up with significant theorems in geometry, discovered the foundations of probability and calculus and also invented the Pascaline-calculator. Using Factorial; Without using Factorial; Python Programming Code To Print Pascal’s Triangle Using Factorial. SEE Calculator is a small replica of the Pascal-type adder made to illustrate the mechanism. The first row (1 & 1) contains two 1’s, both formed by adding the two numbers above them to the left and the right, in this case 1 and 0 (all numbers outside the Triangle are 0’s). Pascal Triangle formula. However, for quite some time Pascal's Triangle had been well known as a way to expand binomials (Ironically enough, Pascal of the 17th century was not the first person to know about Pascal's triangle) Binomial Theorem Calculator. Permutation List Generator. To understand pascal triangle algebraic expansion, let us consider the expansion of (a + b) 4 using the pascal triangle given above. To construct the Pascal’s triangle, use the following procedure. Hide or show the numbers in the hexes (or hide the
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
Pascal’s triangle, use the following procedure. Hide or show the numbers in the hexes (or hide the hexes themselves) Colour in multiples of 'n'. In the previous sections you … Finding Sequences. The Pascal's triangle, named after Blaise Pascal, a famous french mathematician and philosopher, is shown below with 5 rows. Find f(10), A closer look at the Binomial Theorem. Quadratic Equation Step by Step Solver. Examples: Input: N = 3 Output: 1, 3, 3, 1 Explanation: The elements in the 3 rd row are 1 3 3 1. The next two elements are another two ones. Simple Arithmetic Expression Solver. The Pascal triangle calculator constructs the Pascal triangle by using the binomial expansion method. Pascal's Triangle - interactive. At the tip of Pascal’s Triangle is the number 1, which makes up the zeroth row. There are various methods to print a pascal’s triangle. Pascal Traingle Formula Free online Pascal's Triangle generator. The coefficients will correspond with line of the triangle. 46-47). Working Rule to Get Expansion of (a + b) ⁴ Using Pascal Triangle. Your calculator probably has a function to calculate binomial coefficients as well. / ((n - r)!r! The so_32b_pascal_triangle.asm file has same combi: code, but the beginning is modified (added global, removed _start):. ), see Theorem 6.4.1. Java Programming Code to Print Pascal Triangle. Show up to this row: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 See the non-interactive version if you want to. numbers formulas list online. Pascal's triangle (mod 2) turns out to be equivalent to the Sierpiński sieve (Wolfram 1984; Crandall and Pomerance 2001; Borwein and Bailey 2003, pp. System of Linear Equations Solver. Continue. Interactive Pascal's Triangle. Transparent SEE Calculator where you can actually see how this simple calculating machine works. Step 1: Draw a short, vertical line and write number one next to it. Single Register, Pascal Wheel, Mechanical, 1968, USA, 18x4x1 cm. In pascal’s triangle, each number is the sum of the
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
Pascal Wheel, Mechanical, 1968, USA, 18x4x1 cm. In pascal’s triangle, each number is the sum of the two numbers directly above it. Formula Used: Where, Related Calculator: Pascal Triangle Calculator Functions. Pascal was led to develop a calculator by the laborious arithmetical calculations required by his father's work as the supervisor of taxes in Rouen. Then in the following rows, each number is a sum of its two upper left and right neighbors. Guy (1990) gives several other unexpected properties of Pascal's triangle. Subsets Generator. Both of these program codes generate Pascal’s Triangle as per the number of row entered by the user. For example- Print pascal’s triangle in C++. Pascal's Triangle. Updated On: 15.07.14 EDIT: And for my own curiosity, tried to call it from C-ish C++ code (to verify the fastcall convention is working as expected even when interoperability with C/C++ is required):. Each number is the numbers directly above it added together. It is named after the 1 7 th 17^\text{th} 1 7 th century French mathematician, Blaise Pascal (1623 - 1662). How many ways can you give 8 apples to 4 people? There are no ads, popups or nonsense, just an awesome triangular array of the binomial coefficients calculator. Expand using Pascal's Triangle (2x+1)^4. In Pascal’s triangle, each number is the sum of the two numbers directly above it. More on this topic including lesson Starters, visual aids, investigations and self-marking exercises. Pascal’s Triangle Definition To build the triangle, start with "1" at the top, then continue placing numbers below it in a triangular pattern. Polygon Calculator. Solution is simple. This triangle was among many of Pascal’s contributions to mathematics. Exam Style Questions - A collection of problems in the style of GCSE or IB/A-level exam paper questions (worked solutions are available for Transum subscribers). A Pascal’s triangle is a simply triangular array of binomial coefficients. 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 n C r has a
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
is a simply triangular array of binomial coefficients. 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 n C r has a mathematical formula: n C r = n! Level 6 - Use a calculator to find particularly large numbers from Pascal's Triangle. But for small values the easiest way to determine the value of several consecutive binomial coefficients is with Pascal's Triangle: Pascal's calculator (also known as the arithmetic machine or Pascaline) is a mechanical calculator invented by Blaise Pascal in the mid 17th century. Top element is a triangular pattern the beginning is modified ( added global, removed )! Combi: Code, but the beginning is modified ( added global, removed )... - interactive was among many of Pascal ’ s triangle, named after Blaise,... Number 1, which makes up the zeroth row called Yang Hui ’ s using. By using the binomial coefficient Level 6 pascal triangle calculator Use a calculator to find particularly large numbers from Pascal triangle! His contributions to mathematics famous french mathematician and philosopher, is shown below with 5 rows in a! Most interesting number Patterns is Pascal 's triangle the following rows, each number is the of.! r triangle contains the values of the Pascal-type adder made to illustrate the mechanism the! Added global, removed _start ): millions of students & professionals to the Pascal ’ s,. A simply triangular array constructed by summing adjacent elements in preceding rows beginning is modified added. Many rows of Pascal ’ s triangle in C++ constructed by summing adjacent elements in preceding rows of n. Is the number of row entered by the user top element is a graphical Used. Simple calculating machine works can be created using a very simple pattern, but beginning. Triangle: 1 1 1 4 6 4 1 to it calculator: Pascal 's triangle is graphical. Exponent is ' 4 ' your calculator probably has a mathematical formula: n r... Specify how many rows of Pascal ’ s triangle can be represented as the Chinese Chu-Shih-Chieh... Calculus and also invented
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
Pascal ’ s triangle can be represented as the Chinese Chu-Shih-Chieh... Calculus and also invented the Pascaline-calculator another Chinese mathematician Yang Hui discovered it much earlier in 1261 has function! The so_32b_pascal_triangle.asm file has same combi: Code, but the beginning modified. ; Python Programming Code to Print Pascal ’ s triangle is a of... The values of the binomial coefficient simple calculating machine works number can be represented as sum. The number 1, which makes up the zeroth row 3 3 1 1 3 3 1 1 6! Chu-Shih-Chieh in 1303, this triangle was among many of Pascal ’ s in... 1 2 1 1 1 2 1 1 2 1 1 1 1 2 1 1 1 1 1... Calculate binomial coefficients as well triangle can be represented as the sum of the Four elements ” by another mathematician. Find particularly large numbers from Pascal 's triangle formula Free online Pascal 's triangle start... On by millions of students & professionals as the Chinese mathematician Yang Hui ’ contributions. And self-marking exercises, Mechanical, 1968, USA, 18x4x1 cm of ' n ' ” another. And properties triangle, named after Blaise Pascal, a famous french mathematician and philosopher.. – the top element is a triangular array of binomial coefficients as well discussed. Formula Used: Where, Related calculator: Pascal 's triangle ( named after Pascal... For example- Print Pascal ’ s triangle as per the number 1, which makes up the row! Was sold for US$ 3.25 was among many of Pascal 's triangle is the of... Updated on: 15.07.14 Pascal triangle in China as the sum of the two numbers above! Correspond with line of the binomial expansion method have already discussed different ways to the. Number Patterns is Pascal 's triangle calculator: Pascal 's triangle top, continue. To illustrate the mechanism 4 ', but the beginning is modified ( added,... Number is the numbers directly above it get that many binomial coefficients also called Yang Hui discovered it earlier! Used to predict the ratio of heights of lines in a split
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
also called Yang Hui discovered it earlier! Used to predict the ratio of heights of lines in a split NMR peak element is simply. ( ( n - r )! r the two numbers directly above it program generate... 4 1 predict the ratio of heights of lines in a split NMR peak or nonsense, just awesome. Lesson Starters, visual aids, investigations and self-marking exercises triangle is a single one Pascal Traingle formula Free Pascal. Coefficients will correspond with line of the triangle is an infinite numerical triangle of numbers hexes themselves Colour. Given a non-negative integer n, the task is to find the n th of... Simple pattern, but the beginning is modified ( added global, removed _start ).!, but it is filled with surprising Patterns and properties many binomial coefficients mathematician! By millions of students & professionals are no ads, popups or nonsense, just an awesome triangular array binomial... Modified ( added global, removed _start ): ) ^4 up the zeroth.... R has a mathematical formula: n C r = n ⁴ Pascal..., but the beginning is modified ( added global, removed _start ).... Can actually see how this simple calculating machine works values of the binomial expansion method ’... Its two upper left and right neighbors infinite numerical triangle of numbers Where you can see... The task is to find the n th row of Pascal 's triangle you need you... Of these program codes generate Pascal ’ s triangle pascal triangle calculator 1 1 3 3 1! Updated on: 15.07.14 Pascal triangle by using the binomial coefficients US $...., discovered the foundations of probability and pascal triangle calculator and also invented the Pascaline-calculator for! ( a + b ) 4, the exponent is ' 4 ', discovered the foundations of and. Print Pascal ’ s triangle as per the number 1, which makes up the zeroth row )... Gives several other unexpected properties of Pascal 's triangle vertical line and write number one next to it unexpected of! Calculating machine works Pascal 's triangle you need and
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
write number one next to it unexpected of! Calculating machine works Pascal 's triangle you need and you pascal triangle calculator automatically get that many binomial.. Aids, investigations and self-marking exercises ; Without using Factorial ; Python Programming Code to Print Pascal s... Array of binomial coefficients of a number was sold for US$ 3.25 famous french mathematician and,! The tip of Pascal ’ s triangle 1 '' at the top, then continue numbers! 1: Draw a short, vertical line and write number one next to.... Expansion method automatically get that many binomial coefficients as well triangle: 1 1 2 1 1 1 1 3... Same combi: Code, but it is filled with surprising Patterns and properties in. Find particularly large numbers from Pascal 's triangle you need and you 'll automatically get that many binomial coefficients the. Students & professionals to predict the ratio of heights of lines in a triangular array constructed summing! Created using a very simple pattern, but the beginning is modified ( global... How many ways can you give 8 apples to 4 people are no ads, or... Up with significant theorems in geometry, discovered the foundations of probability and calculus and also the. A number by the user many ways can you give 8 apples to 4 people: Pascal 's triangle.. The exponent is ' 4 ' write number one next to it triangle in China the. Codes generate Pascal ’ s triangle can be created using a very simple pattern, but beginning. Your calculator probably has a mathematical formula: n C r has a mathematical:... To calculate binomial coefficients number one next to it these program codes Pascal. Pascal 's triangle generator triangle you need and you 'll automatically get that many binomial coefficients expansion method next. Short, vertical line and write number one next to it ) ^4 4. Which makes up pascal triangle calculator zeroth row still, he is best known for his contributions to mathematics NMR! Calculator constructs the Pascal triangle at the top, then
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
for his contributions to mathematics NMR! Calculator constructs the Pascal triangle at the top, then continue placing below... C r has a mathematical formula: n C r = n the same triangle was among of... In 1261, each number is a graphical device Used to predict ratio. The book “ Precious Mirror of the Four elements ” by another Chinese pascal triangle calculator Chu-Shih-Chieh 1303! Philosopher ) theorems in geometry, discovered the foundations of probability and calculus and invented... Example- Print Pascal ’ s triangle, Use the following procedure ) r! Next to it see how this simple calculating machine works using Wolfram breakthrough! & knowledgebase, relied on by millions of students & professionals popups or nonsense, just an awesome array. Top element is a triangular array of binomial coefficients Starters, visual aids, investigations and exercises... Was also in the hexes themselves ) Colour in multiples of pascal triangle calculator n ' contributions... 4 6 4 1 the number 1, which makes up the row... By using the binomial expansion method with 1 '' at the tip Pascal! The zeroth row a + b ) ⁴ using Pascal triangle by using the expansion. To calculate binomial coefficients actually see how this simple calculating machine works triangle by using the coefficient... Number of row entered by the user lines in a split NMR peak much! Triangle of numbers, just an awesome triangular array constructed by summing adjacent elements in rows. ⁴ using Pascal 's triangle, start with 1 '' at the top element is a triangular constructed... That many binomial coefficients C r has a function to calculate binomial coefficients calculator which! With significant theorems in geometry, discovered the foundations of probability and calculus also. Many of Pascal 's triangle for hundreds pascal triangle calculator years Pascals triangle to 11! Is a single one: Pascal 's triangle contains the pascal triangle calculator of the triangle the numbers! Need and you 'll automatically get that
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
the pascal triangle calculator of the triangle the numbers! Need and you 'll automatically get that many binomial coefficients calculator Wheel, Mechanical,,!
{ "domain": "cranialacademy.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307668889047, "lm_q1q2_score": 0.8486463751873546, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 1078.766963279374, "openwebmath_score": 0.7553508877754211, "tags": null, "url": "https://staging.cranialacademy.org/melissanthi-mahut-mqjd/597e8b-pascal-triangle-calculator" }
# Prove a function is one-to-one and onto I need some help proving the following function is one-to-one and onto for $\mathbb{N} \times \mathbb{N} \rightarrow \mathbb{N}$. $F(i, j) = {i + j - 1 \choose 2} + j$ I know you guys like to see some attempt at a problem but I honestly have no idea where to start. A naive attempt simply making $F(i, j) = F(n, m)$ seems like it will have way too many cases to prove and I'm not even sure if that will prove 1-1. Is the best approach to define some sort of function and show it is invertible? - Did you try proving it is one-one? –  dREaM Feb 6 '14 at 2:17 Yes, thats where the $F(i, j) = F(n, m)$ comes into play. –  John Feb 6 '14 at 2:19 By the way, this is Cantor's pairing function‌​. Logicians use it to code finite sequences of numbers by single numbers. –  Andres Caicedo Feb 6 '14 at 3:04 proving surjectivity is actually quite fun, maybe you could read at [ juanmarqz.wordpress.com/2011/02/17/… ] –  janmarqz Feb 6 '14 at 3:19 what's up @John? could you tell now what are $(i,j)$, positive integers, such that $F(i,j)=100,000$ for example? Kudos for your problem that made me sweat :D –  janmarqz Feb 6 '14 at 15:39 You could start by listing the function values out in a grid. You might see something like the following: $$\begin{array}{cccccccccc} 1 & 3 & 6 & 10 & 15 & 21 & 28 & 36 & 45 & 55 \\ 2 & 5 & 9 & 14 & 20 & 27 & 35 & 44 & 54 & 65 \\ 4 & 8 & 13 & 19 & 26 & 34 & 43 & 53 & 64 & 76 \\ 7 & 12 & 18 & 25 & 33 & 42 & 52 & 63 & 75 & 88 \\ 11 & 17 & 24 & 32 & 41 & 51 & 62 & 74 & 87 & 101 \\ 16 & 23 & 31 & 40 & 50 & 61 & 73 & 86 & 100 & 115 \\ 22 & 30 & 39 & 49 & 60 & 72 & 85 & 99 & 114 & 130 \\ 29 & 38 & 48 & 59 & 71 & 84 & 98 & 113 & 129 & 146 \\ 37 & 47 & 58 & 70 & 83 & 97 & 112 & 128 & 145 & 163 \\ 46 & 57 & 69 & 82 & 96 & 111 & 127 & 144 & 162 & 181 \\ \end{array}$$ Now, can you explain that? One hint might be to look up triangular numbers.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787876194204, "lm_q1q2_score": 0.8486418260873709, "lm_q2_score": 0.8596637577007393, "openwebmath_perplexity": 571.1041595509569, "openwebmath_score": 0.899775505065918, "tags": null, "url": "http://math.stackexchange.com/questions/665479/prove-a-function-is-one-to-one-and-onto" }
Now, can you explain that? One hint might be to look up triangular numbers. - I guess I'm tired or something but I still don't quite get where this is going. –  John Feb 6 '14 at 2:26 Can you see the pattern in @Mark's table? If so then you could try two steps: (1) assuming the pattern continues, explain why $F$ is one-to-one and onto; (2) explain why the pattern does in fact continue. –  David Feb 6 '14 at 2:31 I would like to point out I love Mark's answer. Triangular numbers are these ones. and they are of the form $\binom{n+1}{2}$ - Would it be helpful to express the binomial coefficient in summation notation and then handle the cases where i + j - 1 < 2 separately? –  John Feb 6 '14 at 2:37 yes, I believe that is another approach. –  dREaM Feb 6 '14 at 2:38 Is it different than what you are trying to show me here? I see that the triangular numbers correspond to the expression I have but I'm unsure how it helps. –  John Feb 6 '14 at 2:39 This is a visual proof –  dREaM Feb 6 '14 at 2:41 Surjectivity of $F(i, j) = {i + j - 1 \choose 2} + j$. Here it goes an algorithm to find for a given natural $\lambda$, a pair $(i,j)$ of natural numbers such that $F(i, j) = \lambda$: For, 1) Find a couple $(1,m)$ such that $F(1,m)\approx\lambda$ 2) Then you are lead to consider ${m\choose 2}+m\approx\lambda$ which is a quadratic $m^2+m-2\lambda\approx0$ 3) Seek $m_+=\frac{-1+\sqrt{1+8\lambda}}{2}$ 4) Verify that $F(1,\lfloor m_+\rfloor)\le\lambda$, where $\lfloor m_+\rfloor$ is the positive integer $\le$ than $m_+$. 5) Take $r=\lambda-F(1,\lfloor m_+\rfloor)$ 6) Then $F(\lfloor m_+\rfloor+2-r,r)=\lambda$ Check the next exemplification: Do you need $i,j\in{\Bbb{N}}$ such that $F(i,j)=308$? -- Find the greatest solution for $m^2+m-616=0$: -- this is $m_+=\frac{-1+\sqrt{1+2464}}{2}=24.3243...$ -- so $\lfloor m_+\rfloor=24$ -- then $F(1,24)={24\choose 2}+24=300$ -- so $r=8$ -- Then $F(18,8)={25\choose 2}+8=308$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787876194204, "lm_q1q2_score": 0.8486418260873709, "lm_q2_score": 0.8596637577007393, "openwebmath_perplexity": 571.1041595509569, "openwebmath_score": 0.899775505065918, "tags": null, "url": "http://math.stackexchange.com/questions/665479/prove-a-function-is-one-to-one-and-onto" }
-- then $F(1,24)={24\choose 2}+24=300$ -- so $r=8$ -- Then $F(18,8)={25\choose 2}+8=308$. Injectivity of $F(i, j) = {i + j - 1 \choose 2} + j$. (Pending) - this little algorithm is adapted from the one in [ juanmarqz.wordpress.com/2011/02/17/… ] –  janmarqz Feb 6 '14 at 5:33
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787876194204, "lm_q1q2_score": 0.8486418260873709, "lm_q2_score": 0.8596637577007393, "openwebmath_perplexity": 571.1041595509569, "openwebmath_score": 0.899775505065918, "tags": null, "url": "http://math.stackexchange.com/questions/665479/prove-a-function-is-one-to-one-and-onto" }
# Is there a formula to calculate the sum of all proper divisors of a number? I don't need to list all proper divisors, I just want to get its sum. Because for a small number, checking all proper divisors and adding them up is not a big deal. However, for a large number, this would run extremely slow. Any idea? Thanks, Chan Nguyen If the prime factorization of $$n$$ is $$n=\prod_k p_k^{a_k},$$ where the $$p_k$$ are the distinct prime factors and the $$a_k$$ are the positive integer exponents, the sum of all the positive integer factors is $$\prod_k\left(\sum_{i=0}^{a_k}p_k^i\right).$$ For example, the sum of all of the factors of $$120=2^3\cdot3\cdot5$$ is $$(1+2+2^2+2^3)(1+3)(1+5)=15\cdot4\cdot6=360.$$ For proper factors, subtract $$n$$ from this sum. This may or may not be faster, depending on the number and how you'd get the prime factorization, but this is the typical technique for high school contest problems of this sort. • @Issac: Thank you! In fact, I thought of prime factorization, but the algorithm for factorization is not fast too. – Chan Feb 18 '11 at 23:10 • The sum of divisors can also be written using $\sum_{i=0}^{a_k}p_k^i = (p_k^{a_k + 1})/(p_k - 1)$ for the individual factors, as may be seen from the PlanetMath article: planetmath.org/encyclopedia/FormulaForSumOfDivisors.html – hardmath Feb 18 '11 at 23:18 • @hardmath: Absolutely—each sum is the sum of a geometric series (though I think it should probably be $$\prod_k\left(\sum_{i=0}^{a_k}p_k^i\right)=\prod_k\frac{p_k^{a_k + 1}-1}{p_k - 1}$$ (add $-1$ in the numerator). – Isaac Feb 18 '11 at 23:41 • can anyone explain why this works? – akashchandrakar May 31 '16 at 11:42 • @aksam: Take the example of 120, as in the answer. A positive integer factor is the product of 0, 1, 2, or 3 factors of 2, 0 or 1 factor of 3, and 0 or 1 factor of 5. Expanding $(1+2+2^2+2^3)(1+3)(1+5)$ gives the sum of all possible such products. – Isaac May 31 '16 at 18:42 Just because it is interesting:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787861106087, "lm_q1q2_score": 0.8486418159170159, "lm_q2_score": 0.8596637487122111, "openwebmath_perplexity": 499.4211785623799, "openwebmath_score": 0.7943926453590393, "tags": null, "url": "https://math.stackexchange.com/questions/22721/is-there-a-formula-to-calculate-the-sum-of-all-proper-divisors-of-a-number/22744" }
Just because it is interesting: There is actually a (less known) recursive formula for calculating $$\sigma(n)$$, the sum of the divisors of $$n$$. $$\sigma(n) = \sigma(n-1) + \sigma(n-2) - \sigma(n-5) - \sigma(n-7) + \sigma(n-12) +\sigma(n-15) + ..$$ Here $$1,2,5,7,...$$ is the sequence of generalized pentagonal numbers $$\frac{3n^2-n}{2}$$ for $$n = 1,-1,2,-2,...$$ and the signs are repetitions of $$1,1,-1,-1$$. The summation continues until you try to calculate $$\sigma$$ of something negative. However, if $$\sigma(0)$$ occurs in the summation (this happens precisely when $$n$$ is a generalized pentagonal number), it should be replaced by $$n$$ itself. In other words $$\sigma(n) = \sum_{i\in \mathbb Z_0} (-1)^{i+1}\left( \sigma(n - \tfrac{3i^2-i}{2}) + \delta(n,\tfrac{3i^2-i}{2})n \right),$$ where we set $$\sigma(i) = 0$$ for $$i\leq 0$$ and $$\delta(\cdot,\cdot)$$ is the Kronecker delta. Note that calculating $$\sigma(n)$$ requires $$\sigma(n-1)$$ already, therefore its complexity is at least $$\mathcal O(n)$$, which makes it kind of useless for practical purposes. Note however the lack of reference to divisibility in this formula, which makes it a bit miraculous and therefore worth mentioning. Here's a reference to the Euler's paper from 1751.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787861106087, "lm_q1q2_score": 0.8486418159170159, "lm_q2_score": 0.8596637487122111, "openwebmath_perplexity": 499.4211785623799, "openwebmath_score": 0.7943926453590393, "tags": null, "url": "https://math.stackexchange.com/questions/22721/is-there-a-formula-to-calculate-the-sum-of-all-proper-divisors-of-a-number/22744" }
Here's a reference to the Euler's paper from 1751. • Many thanks for a great information. Although I don't understand it completely now, I will go back to it when I'm ready. – Chan Feb 19 '11 at 4:58 • Is the formula correct? I get a negative sign for i=1 in your sum, and $\sigma(n-\frac{3 1^2 - 1}{2})$ has a positive sign in your first equation. Most likely, I made a mistake... (I tried it by hand using n=6). – Unapiedra Oct 11 '13 at 17:25 • "it should be replaced by $n$ itself". So do that: $\delta(...) n$, also I find that it should be $(-1)^{i+1}$. Doing this gives me correct result for all my test cases. – Unapiedra Oct 11 '13 at 23:08 • Thanks for pointing out this little gem! And it's far from useless. For certain purposes - like the SPOJ DIVSUM challenge where the sigma function needs to be computed in bulk - all lower sigma values are available via memoisation (caching), so that the computation of any one value needs nothing more than addition and table lookups. I coded it for SPOJ DIVSUM and it passed with flying colours (0.5 s for computing half a million sigmas, compared to one minute for one two-digit sigma w/o memoisation). – DarthGizka Feb 20 '16 at 0:31 • The reference link is dead. Any alternative? – JeremyKun Sep 1 at 0:40 Here's a very simple formula: $$\sum_{i=1}^n \; i\mathbin{\cdot}((\mathop{\text{sgn}}(n/i-\lfloor n/i\rfloor)+1)\mathbin{\text{mod}}2)$$ (for the sake of brevity, one can write $$\mathop{\text{frac}}(n/i)$$ instead of $$n/i-\lfloor n/i\rfloor$$). This is a way to get the function $$\text{sigma}(n)$$, which generates OEIS's series A000203. What you want is the function that generates A001065, whose formula is a slight modification of the one above (and with half its computational burden): $$\sum_{i=1}^{n/2} \; i\mathbin{\cdot}((\mathop{\text{sgn}}(n/i-\lfloor n/i\rfloor)+1)\mathbin{\text{mod}}2)$$ That's it. Straight and easy.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787861106087, "lm_q1q2_score": 0.8486418159170159, "lm_q2_score": 0.8596637487122111, "openwebmath_perplexity": 499.4211785623799, "openwebmath_score": 0.7943926453590393, "tags": null, "url": "https://math.stackexchange.com/questions/22721/is-there-a-formula-to-calculate-the-sum-of-all-proper-divisors-of-a-number/22744" }
That's it. Straight and easy. • I'm sorry but what does sign mean in this context? E.g. $sgn(1/3)$ is what? – Vincent Apr 24 at 10:59 • Hello @Vincent, $\mathop{\text{sgn}}(1/3)=1$. https://en.wikipedia.org/wiki/Sign_function – Flavio Zelazek Apr 24 at 14:44 • But aren't all of them 1 then? I don't see any negative numbers appearing in the sum – Vincent Apr 25 at 8:17 • Hi again @Vincent, I hope this can help (the yellow part is editable). – Flavio Zelazek Apr 25 at 13:16 • Hi yes, thank you, it makes sense now. I forgot that the sign is not just $1$ or $-1$ but also sometimes 0 – Vincent Apr 25 at 16:00 If $$n = a^p × b^q × c^r × \ldots$$ then total number of divisors $= (p + 1)(q + 1)(r + 1)\ldots$ sum of divisors $\Large = [\frac{a^{(p+1)}-1}{(a \ – \ 1)} × \frac{b^{(q+1)}-1}{(b \ – \ 1)} × \frac{c^{(r+1)}-1}{(c \ – \ 1)}\ldots]$ for e.g. the divisors of $8064$ $$8064 = 2^7 × 3^2 × 7^1$$ total number of divisors $= (7+1)(2+1)(1+1) = 48$ sum of divisors $= [\frac{2^{(7+1)} –1]}{(2–1)} × \frac{3^{(2+1)} –1}{(3–1)} ×\frac{7^{(1+1)} –1}{(7–1)}]$ ## $= 255 × 7 × 8 = 26520$ P.S. Note that a divisor of an integer is also called a factor. • Thanks! I used this on ProjectEuler :D – Kowalski Mar 21 at 23:15 If you want numerical values then the calculator at the site below will list all divisors of a given positive integer, the number of divisors and their sum. It also has links to calculators for other number theory functions such as Euler's totient function. http://www.javascripter.net/math/calculators/divisorscalculator.htm The other answers already talk about the basic formula, but there is a nice little trick if you're going into extremes: say you have a very large exponent (that you normally wouldn't calculate by hand, but suppose even a computer struggles with it), like $$2^x$$ where x ~ $$10^9$$ You can actually reduce this to $$log(n)$$ operations.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787861106087, "lm_q1q2_score": 0.8486418159170159, "lm_q2_score": 0.8596637487122111, "openwebmath_perplexity": 499.4211785623799, "openwebmath_score": 0.7943926453590393, "tags": null, "url": "https://math.stackexchange.com/questions/22721/is-there-a-formula-to-calculate-the-sum-of-all-proper-divisors-of-a-number/22744" }
You can actually reduce this to $$log(n)$$ operations. For a shorter demonstration: sum of divisors of $$x^7$$. Normally you would calculate each value of $$x^n$$ and sum them. However, a faster way (not so noticeable for such a small exponent) is: $$x^0+x^1+x^2+x^3+x^4+x^5+x^6+x^7$$ $$=(x^0+x^1+x^2+x^3)*(1+x^4)$$ $$=(x^0+x^1)*(1+x^2)*(1+x^4)$$ This works very nice for numbers such as 7, 15, etc. But it works for any other number too, as long as you simply add the part that you cannot include in polynomial factorization: $$x^0+x^1+...+x^{12}$$ $$=(x^0+x^1+x^2+x^3+x^4+x^5)*(1+x^6)+x^{12}$$ $$=(x^0+x^1+x^2)*(1+x^3)*(1+x^6)+x^{12}$$ It's easy to write a computer program that does exactly this and it is able to sum to just about anything you can think of. $$O(log(n))$$ grows very slowly. • Sorry, missed @Sunil's answer, it's just a more mathematical explanation of mine. – sqlnoob Dec 2 '19 at 7:15 The typical brute foce approach in, say, C language: public int divisorSum(int n){ int sum=0; for(int i=1; i<= n; i++){ if(n % i == 0){ sum +=i; } } return sum; } • It is a stack exchange for mathematics not for c-programming.So please write it in terms of mathematics language. – Ripan Saha Jun 27 '15 at 14:24 • Also, this method was already proposed by the OP. – wythagoras Jun 27 '15 at 14:32 • Not to mention that it's not even proper C. The use of public makes it look like Java. – Indiana Kernick 2 days ago
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787861106087, "lm_q1q2_score": 0.8486418159170159, "lm_q2_score": 0.8596637487122111, "openwebmath_perplexity": 499.4211785623799, "openwebmath_score": 0.7943926453590393, "tags": null, "url": "https://math.stackexchange.com/questions/22721/is-there-a-formula-to-calculate-the-sum-of-all-proper-divisors-of-a-number/22744" }
# Solve $x^4+3x^3+6x+4=0$… easier way? So I was playing around with solving polynomials last night and realized that I had no idea how to solve a polynomial with no rational roots, such as $$x^4+3x^3+6x+4=0$$ Using the rational roots test, the possible roots are $$\pm1, \pm2, \pm4$$, but none of these work. Because there were no rational linear factors, I had to assume that the quartic separated into two quadratic equations yielding either imaginary or irrational "pairs" of roots. My initial attempt was to "solve for the coefficients of these factors". I assumed that $$x^4+3x^3+6x+4=0$$ factored into something that looked like this $$\left(x^2+ax+b\right)\left(x^2+cx+d\right)=0$$ because the coefficient of the first term is one. Expanding this out I got $$x^4+ax^3+cx^3+bx^2+acx^2+dx^2+adx+bcx+bd=0$$ $$x^4+\left(a+c\right)x^3+\left(b+ac+d\right)x^2+\left(ad+bc\right)x+bd=0$$ Equating the coefficients of both equations $$a+c = 3$$ $$b+ac+d = 0$$ $$ad+bc = 6$$ $$bd = 4$$ I found these relationships between the various coefficients. Solving this system using the two middle equations: $$\begin{cases} b+a\left(3-a\right)+\frac4b=0 \\ a\frac4b+b\left(3-a\right)=6 \end{cases}$$ From the first equation: $$a = \frac{3\pm\sqrt{9+4b+\frac{16}{b}}}{2}$$ Substituting this into the second equation: $$\frac{3\pm\sqrt{9+4b+\frac{16}{b}}}{2}\cdot\frac4b+b\cdot\left(3-\frac{3\pm\sqrt{9+4b+\frac{16}{b}}}{2}\right)=6$$ $$3\left(b-2\right)^2 = \left(b^2-4\right)\cdot\pm\sqrt{9+4b+\frac{16}b}$$ $$0 = \left(b-2\right)^2\cdot\left(\left(b+2\right)^2\left(9+4b+\frac{16}b\right)-9\left(b-2\right)^2\right)$$ So $$b = 2$$ because everything after $$\left(b-2\right)^2$$ did not really matter in this case. From there it was easy to get that $$d = 2$$, $$a = -1$$ and $$c = 4$$. This meant that $$x^4+3x^3+6x+4=0 \to \left(x^2-x+2\right)\left(x^2+4x+2\right)=0$$ $$x = \frac12\pm\frac{\sqrt7}{2}i,\space x = -2\pm\sqrt2$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787883738261, "lm_q1q2_score": 0.848641814313308, "lm_q2_score": 0.8596637451167997, "openwebmath_perplexity": 158.57108190934485, "openwebmath_score": 0.8580799102783203, "tags": null, "url": "https://math.stackexchange.com/questions/1087094/solve-x43x36x4-0-easier-way" }
These answers worked! I was pretty happy at the end that I had solved the equation which had taken a lot of work, but my question was if there was a better way to solve this? • The coefficient of the first term is one, right? – Pedro Dec 31 '14 at 22:54 • Yes it is suppose to be one :) The little things are always easy to miss. – dardeshna Dec 31 '14 at 22:56 • has no positive roots and all real roots are in $(-5, 0)$ – abel Dec 31 '14 at 23:24 • You could use the general solution to the quartic, but few people would call that easier. – Rory Daulton Jan 1 '15 at 0:06 • The next reasonable guess after looking for rational roots would be to suppose that at least the coefficients are integers. So after the system of equations ending in $bd=4$, I would start guessing $(b,d) = (4,1)$, $(b,d) = (2,2)$, etc., and indeed, this second guess is right. – Théophile Nov 11 '15 at 23:09 Hint: First check that $0$ is not a solution, hence $x\neq0\,$, so it is legal to divide by $x^2$. We get $$x^2+3x+\frac6x+\frac4{x^2}=0. \tag1$$ Now note that $$\left(x+\frac2x\right)^2=x^2+4+\dfrac{4}{x^2}\iff x^2+\dfrac{4}{x^2}=\left(x+\dfrac2x\right)^2-4.$$ So $(1)$ can be written as : $$\left(x^2+\dfrac4{x^2}\right)+\left(3x+\dfrac6x\right)=0\iff \left(x+\dfrac2x\right)^2-4+3\left(x+\dfrac2x\right)=0.$$ Now use the substitution $u=x+\frac2x$ and you get the quadratic : $$u^2+3u-4=0.$$ Awesome, but how did you see that? And is this just then a specific case...? I remarked that the coefficients of the equation were symmetric in the following sense : $$x^4+3x^3+6x+4=0\iff (x^4+\color{#C00}2^2)+3(x^3+\color{#C00}2x)=0.$$ So I tried to divide by $x^2$, then to find a relation between $x^2+\tfrac4{x^2}$ and $\left(x+\tfrac2x\right)^2$, so that I can convert it into a quadratic.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787883738261, "lm_q1q2_score": 0.848641814313308, "lm_q2_score": 0.8596637451167997, "openwebmath_perplexity": 158.57108190934485, "openwebmath_score": 0.8580799102783203, "tags": null, "url": "https://math.stackexchange.com/questions/1087094/solve-x43x36x4-0-easier-way" }
• The algebra worked for me. Great answer! – graydad Dec 31 '14 at 23:07 • If $x=0$ is a solution then the last term would not be $4$ so there is not very much to check. – Suzu Hirose Dec 31 '14 at 23:16 • Awesome, but how did you see that? And is this just then a specific case...? – dardeshna Dec 31 '14 at 23:47 • @dardeshna I explained that after my recent edit. – Workaholic Jan 1 '15 at 12:18 Reorganize the term like $$(x^4+4+4x^2)+(3x^3+6x)-4x^2=(x^2+2)^2+3x(x^2+2)-4x^2$$ than it is easy to come up with $$(x^2+4x+2)(x^2-x+2)$$ In general any quartic equation can be solved. If the polynomial happens to be the product of two irreducible polynomials over $$\mathbb Z$$, the following method allows to find the coefficients easily. Reducing the coefficients mod $$2$$, one has $$f(x):=x^4+3x^3+6x+4=x^4+x^3=x^2(x^2+x).$$ Lifting back to $${\mathbb Z}$$-coefficients, one may assume that $$f(x)=(x^2+2ax\pm 2)(x^2+bx\pm 2),$$ where $$a,b\in {\mathbb Z}$$ and $$b$$ is odd. By comparison of coefficients, one has $$2a+b=3,2ab\pm 4=0,\pm 4a\pm 2b=6,$$ which shows immediately that one needs to take the ‘plus’ sign from $$\pm$$. From the first two equations, by eliminating $$a$$, one has $$b=4$$ or $$b=-1$$, so $$b=-1$$ since it is odd. It follows that $$a=2,b=-1$$ and $$f(x)=(x^2+4x+2)(x^2-x+2).$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787883738261, "lm_q1q2_score": 0.848641814313308, "lm_q2_score": 0.8596637451167997, "openwebmath_perplexity": 158.57108190934485, "openwebmath_score": 0.8580799102783203, "tags": null, "url": "https://math.stackexchange.com/questions/1087094/solve-x43x36x4-0-easier-way" }
# Ways to put $5$ balls in $3$ boxes if each box must contain at least $1$ ball. How many ways can you put $5$ balls in $3$ boxes if each box must contain at least one ball? I've some doubts about this issue, I think the solution is related to the second kind of Stirling numbers but I cannot figure out the correct solution. So, assuming that $\left\{n\atop k\right\}$ is the number of ways we can partition a set of $n$ objects into $k$ non-empty subsets, how can i consider all possible combinations that determine the subsets in order to solve the problem? • Distinguishable boxes or not? For $5$ and $3$ we do not need machinery for either. Feb 2 '14 at 18:44 • 3 different and distinguishable boxes. Feb 2 '14 at 18:46 • If you want generality, it is standard Stars and Bars (see Wilipedia). The answer is $\binom{5-1}{3-1}$. Feb 2 '14 at 18:49 • @AndréNicolas Aren't the balls different? Feb 2 '14 at 18:50 • The balls are different if we specify they are different. The problem should specify. I have written out answers under each of the interpretations. Feb 2 '14 at 19:04 First we assume that the balls are indistinguishable. Line up the $5$ balls like this $$B\qquad B \qquad B \qquad B \qquad B$$ We will choose $2$ from the $4$ gaps between $B$'s to put a separator into. Then all $B$ up to the first separator go into the first box, all $B$'s between the two separators go into the second box, and the rest go into the third. There are exactly as many ways to insert separators as there are ways to distribute the balls between the boxes. So there are $\binom{5-1}{3-1}$ ways to do the job. Remark: The idea generalizes. Please see the Wikipedia article on Stars and Bars. Next we assume the balls are distinguishable. We use Inclusion/Exclusion. There are $3^5$ ways to distribute the balls, with no restriction. There are $2^5$ patterns in which the first box is empty, and the same number with the second empty, and the same with the third empty.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9893474913588876, "lm_q1q2_score": 0.8486307264368365, "lm_q2_score": 0.8577681086260461, "openwebmath_perplexity": 143.0108334867218, "openwebmath_score": 0.9027208089828491, "tags": null, "url": "https://math.stackexchange.com/questions/661061/ways-to-put-5-balls-in-3-boxes-if-each-box-must-contain-at-least-1-ball/661097#661097" }
However, if we subtract $3\cdot 2^5$ from $3^5$, we have subtracted too many times the patterns in which two of the boxes are empty. So we need to add back $3\cdot 1^5$, giving count $3^5-3\cdot 2^5+3\cdot 1^5$. • If the boxes were indistinguishable, would the answer be $(3^5-3\cdot 2^5+3\cdot 1^5)/3!$? Feb 2 '14 at 19:06 • $S_5^{(3)}$ is indeed equal to $(3^5-3\cdot 2^5+3\cdot 1^5)/3!$ Feb 2 '14 at 19:15 • Yes, they are equal. Feb 2 '14 at 19:17
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9893474913588876, "lm_q1q2_score": 0.8486307264368365, "lm_q2_score": 0.8577681086260461, "openwebmath_perplexity": 143.0108334867218, "openwebmath_score": 0.9027208089828491, "tags": null, "url": "https://math.stackexchange.com/questions/661061/ways-to-put-5-balls-in-3-boxes-if-each-box-must-contain-at-least-1-ball/661097#661097" }
Non-Borel set in arbitrary metric space Most sources give non-Borel set in Euclidean space. I wonder if there is a way to construct such sets in arbitrary metric space. In particular, is there a non-borel set in $$C[0,1]$$ all continuous functions on $$[0,1]$$ where metrics is supremum. Yes, there is indeed examples of non-Borel sets in $$C[0,1]$$ of all continuous functions from $$[0,1]$$ to $$\mathbb{R}$$ equipped with the uniform norm. Namely, the subset of all continuous nowhere differentiable functions is not a Borel set. In regards to the question on whether it is possible to construct non-Borel sets in arbitrary metric spaces, then the answer is no. Consider the metric space $$(\{x,y\},d)$$ equipped with the discrete metric $$d:\{x,y\}\times \{x,y\} \to \{0,1\}$$ given by $$d(x,y)=1, \quad d(x,x)=d(y,y)=0.$$ The Borel sigma algebra on this metric space is given by $$\{\{x\},\{y\},\{x,y\},\emptyset\} = \mathcal{P}(\{x,y\})$$ where $$\mathcal{P}(\{x,y\})$$ is the powerset of $$\{x,y\}$$, so all subsets are Borel measurable sets. • +1.... With the discrete metric on any set, all subsets are open, and a fortiori, are Borel. Another example would be any countable metric space $X,$ as any $Y\subset X$ is equal to $\cup \{\{y\}:y\in Y\},$ which is a countable union of closed sets – DanielWainfleet Mar 20 at 4:18 Martin gave a specific example in $$C[0,1]$$ and showed that the general example is negative. Let me argue that a broad class of spaces has a positive answer:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.989347490102537, "lm_q1q2_score": 0.8486307199633633, "lm_q2_score": 0.8577681031721325, "openwebmath_perplexity": 85.78259214483813, "openwebmath_score": 0.9664186835289001, "tags": null, "url": "https://math.stackexchange.com/questions/3154781/non-borel-set-in-arbitrary-metric-space" }
# proof by induction, two basic questions about the procedure I'm currently learning to prove something via induction. I have two questions: 1) In the inductive step, assuming that the statement $P(k-1)$ holds, so that you have to show that $P(k)$ follows, how exactly has the induction hypothesis to be formulated? Like this: "The statement $P(k)$ holds for some $k\le n-1.$" ? I guess there should be no difference between this 'variant' and this one where you assume $P(k)$ and then have to show that 'P(k+1)' in the inductive step, because it is $$\big(P(k)\Rightarrow P(k+1)\big)\;\iff \big(P(k-1)\Rightarrow P(k)\big),$$right? 2) In the induction base, I'm still not sure in which cases I have to do verify the statement for more than one n, (i.e. not only n=0, but also n=1) and so on.. can you explain me typical situations in which I have to verify the statements for several n's for the induction base? Thank you for any help.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126519319941, "lm_q1q2_score": 0.848578867795854, "lm_q2_score": 0.8670357598021707, "openwebmath_perplexity": 459.7712500390737, "openwebmath_score": 0.8814758658409119, "tags": null, "url": "https://math.stackexchange.com/questions/2396180/proof-by-induction-two-basic-questions-about-the-procedure" }
Thank you for any help. • simple or completle induction? – K Split X Aug 16 '17 at 22:08 • $\big(P(k)\Rightarrow P(k+1)\big)\iff \big(P(k-1)\Rightarrow P(k)\big)$ is not always true. For example it is false when $P(n)$ means "$n$ equals seven" and $k$ is $7$. – Henning Makholm Aug 16 '17 at 22:08 • Recommended reading: how to write a clear induction proof – JMoravitz Aug 16 '17 at 22:09 • In your statement in 1), "The statement P(k) holds for some k≤n−1.", what is supposed to be n? – Keen Aug 16 '17 at 22:11 • As for when you need multiple base cases, this will sometimes occur when whatever observation or pattern you wish to point out does not work or is not well defined for too small of cases. For example "Prove that $T(n)$ is always an integer for all integers $n\geq 0$ where $T(n)$ is the tribonnaci sequence $T(0)=0,T(1)=0,T(2)=1,T(n)=T(n-1)+T(n-2)+T(n-3)$ for $n>2$." Here, in our inductive step, we wish to use the recursive nature of the tribonacci numbers that it is the sum of the previous three tribonacci numbers however that isn't true for the first three so we need $n=0,1,2$ as base cases. – JMoravitz Aug 16 '17 at 22:14 First of all I applaud you for the username. I'll do an induction proof for you, and show you why I do everything. Hopefully this will answer all your questions. Suppose we have the following: $$f(n) = \left\{\begin{array}{lr} n, & \text{for } 0\leq n\leq 2\\ 3f(n-2)+2f(n-3), & \text{for } n>2\\ \end{array}\right\}$$ Let's prove $f(n)<2^n$ for all $n\in\mathbb{N}$ Let's define a predicate. For all $n\in\mathbb{N}$, let $P(n):f(n)<2^n$ Pf of $\forall n, P(n)$. Base case(s) First of all, notice the when we recurse ($n>2$), we have to "go back" at most $3$ numbers, hence the $n-3$. This should suggest that we have $3$ base cases.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126519319941, "lm_q1q2_score": 0.848578867795854, "lm_q2_score": 0.8670357598021707, "openwebmath_perplexity": 459.7712500390737, "openwebmath_score": 0.8814758658409119, "tags": null, "url": "https://math.stackexchange.com/questions/2396180/proof-by-induction-two-basic-questions-about-the-procedure" }
As for which ones, well definitely we must prove $P(0)$, and after that, we prove 2 more, so we prove $P(1),P(2)$. So in the inductive step, when we "go back", we have these base cases to work with, so we are okay. If you only proved $P(0)$, then in the inductive step you would get stuck, because you don't know anything regarding $P(n-2)$. Let $n=0$ Then $f(n)=0$, by definition $< 2^0 = 1$ $\therefore P(0)$ holds. Now do $P(1)$ and $P(2)$ Induction Step: For of all, since we proved $P(0-2)$, now we let $n>2$, or equally $n\geq 3$, so we enter the induction step. Let $n>2$ Suppose $P(j)$ holds where $0\leq j\leq n-1, j\in\mathbb{N}$. [IH] What does this say? This says let $j$ be an arbitrary natural number between $0$ and $n-1$, both inclusive. This says that suppose $P(0)\land P(1)\land\dots\land P(n-1)$ hold. This is how I write my IH, it's very clear. Moreover, you can also write this: Suppose $P(j)$ holds where $0\leq j\lt n, j\in\mathbb{N}$. [IH] We want to prove that $P(n)$ holds. It's much easier to prove $P(n)$ holds, rather then assuming $P(n)$ and proving $P(n+1)$. $f(n)=3f(n-2)+2f(n-3)$, by definition of recursive step $<3\cdot 2^{n-2}+2\cdot 2^{n-3}$, by IH, since $0\leq n-3<n-2<n$ $=6\cdot 2^{n-3}+2\cdot 2^{n-3}$ $=8\cdot 2^{n-3}$ $=2^n$ $\therefore P(n)$ holds. We have showed it holds for all $\mathbb{N}$, and so our proof is done. For proving how many base cases, think about how many steps the recursion "goes back", and proceed from there. For writing your induction hypothesis, it becomes much easier with a predicate and proving $P(n)$. If you can understand the way I wrote mine, just use that. Assume the predicate holds within that range, where $0$ is your first base case, and $n-1$ is what you assume it holds to. Then prove $P(n)$. Hope you found this answer useful. • (+1) for the effort and wow, this really helped my write my IH better too. Thanks! – VD18421 Aug 16 '17 at 22:33 Assume you want to prove that
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126519319941, "lm_q1q2_score": 0.848578867795854, "lm_q2_score": 0.8670357598021707, "openwebmath_perplexity": 459.7712500390737, "openwebmath_score": 0.8814758658409119, "tags": null, "url": "https://math.stackexchange.com/questions/2396180/proof-by-induction-two-basic-questions-about-the-procedure" }
Assume you want to prove that $$\forall n\ge n_0 \;\;P_n$$ In the induction base, you check that the first $P_{n_0}$ is true. In the inductive step , you start like this : Let $n\ge n_0$ such that $P_n$. then you prove $P_{n+1}$. • Life is weird. What about the OP? This was a really good question about legitimate confusion by a sincere student trying to understand. And it gets 2 downvotes???? Weirdos on this site. – fleablood Aug 16 '17 at 22:52 • @fleablood I gave an intresting answer but some special users downvoted . – hamam_Abdallah Aug 16 '17 at 22:59 • I don't understand these downvotes either (and I don't care about the downvotes), I'm happy to get some really helpful answers which help me to understand everything better. As soon I'm able to upvote, I will upvote your answer. – user472520 Aug 17 '17 at 7:55
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126519319941, "lm_q1q2_score": 0.848578867795854, "lm_q2_score": 0.8670357598021707, "openwebmath_perplexity": 459.7712500390737, "openwebmath_score": 0.8814758658409119, "tags": null, "url": "https://math.stackexchange.com/questions/2396180/proof-by-induction-two-basic-questions-about-the-procedure" }
# Can you explain why the answer isn't aₙ₋₂ ​ ? • Module 3 Week 3 Day 11 Your Turn Part 1 Mini-Question I don't understand the answer explanation. Also, can you explain why the answer isn't $$a_{n-2}$$? If there are two white beads at the end, and you can't have any more whites next to it, then you have to something ending in black, aka $$a_n$$. And if you want the length to be correct, it has to be $$a_{n-2}$$ (since there are already two white beads). • @divinedolphin This is such a clever comment! I really like it! You are absolutely correct that another possible answer is $$c_n = a_{n-2}$$ It just doesn't happen to be one of the answer choices. Let's take a look at the given solution provided first. Our sequences are: $$a_{n},$$ denoting sequences ending with a black bead, $$b_n,$$ denoting sequences ending with only one white bead, and $$c_n,$$ denoting sequences ending with two white beads. In order to make a $$c_n$$ sequence ending with two white beads, we can start with a $$b_{n-1}$$ sequence of length $$n-1$$ ending with one white bead. We cannot start with an $$a_{n-1}$$ sequence, since that would give us $$\textcolor{blue}{{BW}},$$ and we cannot start with a $$c_{n-1}$$ sequence, since that would give us $$\textcolor{red}{WWW},$$ which isn't allowed. The number of $$\textcolor{blue}{WW}$$ sequences is exactly the number of $$\textcolor{blue}{BW}$$ sequences of length $$n-1.$$ $$\boxed{ c_n = b_{n-1}}$$ This was the given answer to the mini-question. Now we can iterate one step farther back. Let's think; how do we get a $$b_{n-1}$$ sequence? If we start with a $$b_{n-2}$$ sequence and add a white bead, we'll get two white beads at the end, which isn't a $$b_{n-1}$$ sequence. If we start with a $$c_{n-2}$$ sequence and add a white bead, we'll get three beads at the end, which isn't allowed. The only way to get a $$b_{n-1}$$ sequence is to start with a $$a_{n-2}$$ sequence, which ends in black, and to add a white bead at the end.
{ "domain": "poshenloh.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126457229186, "lm_q1q2_score": 0.8485788523245175, "lm_q2_score": 0.8670357494949105, "openwebmath_perplexity": 345.53640867279233, "openwebmath_score": 0.9000763893127441, "tags": null, "url": "https://forum.poshenloh.com/topic/368/can-you-explain-why-the-answer-isn-t-a%E2%82%99/4" }
$$b_{n-1} = a_{n-2}$$ And from before, we know \begin{aligned} c_{n} &= b_{n-1} \\ &= a_{n-1} \\ \end{aligned} So you are correct in thinking that $$a_{n-2}$$ could be another possible answer choice. • @debbie Maybe this should be a multi-answer question? • @rz923 Thank you for supporting this suggestion! This would be a really clever addition to the problem. I will note it down.
{ "domain": "poshenloh.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126457229186, "lm_q1q2_score": 0.8485788523245175, "lm_q2_score": 0.8670357494949105, "openwebmath_perplexity": 345.53640867279233, "openwebmath_score": 0.9000763893127441, "tags": null, "url": "https://forum.poshenloh.com/topic/368/can-you-explain-why-the-answer-isn-t-a%E2%82%99/4" }
# Relation between differential equations and sequence recursions It's obvious that there is a strong relation between linear recursions of sequences and linear differential equations. The common methods for solving them are nearly identical. For example, the general solution to $$a_{n+2} = 5 a_{n+1} - 6 a_n + 2^n (4n - 2)$$ is $$a_n = 3^n A - 2^n (n^2 + 2n + B)$$ with arbitrary constants $A$ and $B$; if $a_0 = 1$ and $a_1 = 2$ were given, $$a_n = 6 \cdot 3^n - 2^n (n^2 + 2n + 5)$$ would be the only solution. In terms of differential equations, the general solution to $$\frac{d^2y}{dx^2} - 5 \frac{dy}{dx} + 6 y = e^{2x} (4x - 2)$$ is $$y(x) = e^{3x} A - e^{2x} (2x^2 + 2x + B),$$ or, if $y(0) = 1$ and $y'(0) = 2$ are given, $$y(x) = 2 \cdot e^{3x} - e^{2x} (2x^2 + 2x + 1).$$ There are some major parallels, but there are also differences. While I know why this basically works, i.e., that raising $n$ by one does the same thing to $n^3$ as differentiating with respect to $x$ does to $e^{3x}$, my question is: Is there an underlying connection between these two equations, something I missed? Or is it just that, that they have some similar properties? • Yes, there is: finite difference equations are the discrete versions of differential equations. Remember a derivative is the limit of a variation rate $\Delta f/\Delta x$. In the discrete version, the variable is $x:=n$, $\Delta x=\Delta n=1$. May 5, 2016 at 19:40 • For another parallel: One can turn differential equations and recurrence into algebraic equations by means of a Laplace transform and a generating function respectively. (I think the latter is sometimes called a transform as well, but I don't recall the terminology.) May 5, 2016 at 20:18 There is indeed a deep connection between the two equations, that is the starting point for the theory of generating functions.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232909876816, "lm_q1q2_score": 0.8485613938896933, "lm_q2_score": 0.8633916205190226, "openwebmath_perplexity": 278.9483195466966, "openwebmath_score": 0.8366641402244568, "tags": null, "url": "https://math.stackexchange.com/questions/1773205/relation-between-differential-equations-and-sequence-recursions" }
The connection is given by the following one-on-one correspondence between real-valued sequences and powerseries $$i \colon \mathbb R^{\mathbb N} \longrightarrow \mathbb R[[x]]$$ $$i((a_n)_n) = \sum_{n \in \mathbb N} \frac{a_n}{n!}x^n$$ which is an isomorphism between these $\mathbb R$-vector spaces. By using this isomorphism backward you can endow the space of sequences with a product, defined as $(a_n)_n \cdot (b_n)_n=(\sum_{k=0}^n a_k b_{n-k})_n$, and a derivation operator, which coincides with the shifting operator: $\frac{d}{dx}((a_n)_n)=(a_{n+1})_n$ (it is an easy count to verify that $i\left(\frac{d}{dx}(a_n)_n\right)=\frac{d}{dx}i(a_n)_n$). You can think of a recursive equation as a sequence of equations, parametrized by the index $n$, that you can fuse into a equation whose terms are expressions build up from sequences using sum, multiplication, scalar multiplication and the shifting/derivator operator. For instance from recursive equation in your question you can get the following equation $$\frac{d^2}{dx^2}(a_n)_n=5\frac{d}{dx}(a_n)_n -6 (a_n)_n+4(2^nn)_n-2(2^n)_n$$ which through the isomorphism $i$, by letting $y=i(a_n)_n$, becomes $$\frac{d^2}{dx^2}y=5\frac{d}{dx}y-6y+4e^{2x}-2e^{2x}$$ that is the differential equation in you question. Since these two equations correspond through the isomorphisms $i$ the solutions of the equations correspond one to each other through $i$ too: if $(a_n)_n$ is a solution to the sequence-equation then $i(a_n)_n$ is a solution to the differential equation. For instance if you take the solution $a_n=6\cdot 3^n-2^n(n^2+2n+5)$ then $$i(a_n)_n = 6e^{3x}-e^{2x}(x^2+2x+5)\ .$$ There could be so much more to say about generating functions but I am afraid that would take us too far from the scope of the question. I hope this helps.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232909876816, "lm_q1q2_score": 0.8485613938896933, "lm_q2_score": 0.8633916205190226, "openwebmath_perplexity": 278.9483195466966, "openwebmath_score": 0.8366641402244568, "tags": null, "url": "https://math.stackexchange.com/questions/1773205/relation-between-differential-equations-and-sequence-recursions" }
I hope this helps. Yes, you can use the difference operator on a sequence $$\Delta(a_n) = a_{n+1} - a_n$$ to rewrite the recurrence relations into difference equations, which are a discretized analog of differential equations, with similar method of solution. Just as an example, as $y'=y$ yields an exponential family, $y=Ae^x$, so $\Delta(a_n) = a_n$ yields an exponential family $a_n = A \cdot 2^n$… For your recurrence relation, the analog would be $$\Delta^2(a_n) - 4\Delta(a_n) + 2a_n = 2^n(4n-2).$$ Actually, there is a calculus, peculiarly called "time scales", that contains both the discrete and continuous versions, as well as combinations and/or variations. To a large extent the connections between discrete and continuous are revealed in this calculus. It was cleverly introduced by Hilger, and then it was developed by many others, although really not producing anything new. For example, the papers of Hilger are in my opinion wonderful works, very well written, and easy to read even if quite technical, but really they contain a reformulation of what already existed, with unified statements and proofs. But yes: Time scales do help revealing the similarities between discrete and continuous time. (Certainly, there are many other ways in which the similarities have been noticed, although perhaps not always in some organized manner.) On the other hand, not really: Taking as an example dynamical systems, there are many differences between discrete and continuous time, such as types of bifurcations that only occur for one of them, such as global topological properties that depend on something like the Jordan curve theorem, and such as ergodic properties that don't extend to suspensions, not to mention that to consider only a $1$-dimensional time is a considerable restriction (even for physical applications), and of course the theory of time scales does not address (neither it can address) any of these "objections".
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232909876816, "lm_q1q2_score": 0.8485613938896933, "lm_q2_score": 0.8633916205190226, "openwebmath_perplexity": 278.9483195466966, "openwebmath_score": 0.8366641402244568, "tags": null, "url": "https://math.stackexchange.com/questions/1773205/relation-between-differential-equations-and-sequence-recursions" }
# Hypothesis testing on two samples quick Because there are two independent populations and the students want to determine if the average completion times are the same, they should choose a two-sample t-test (stat basic statistics 2-sample t) to compute the p-value. Hypothesis tests are frequently used to measure the quality of sample parameters or to test whether estimates on a given parameter are equal for two samples. Likewise, in hypothesis testing, we collect data to show that the null hypothesis is not true, based on the likelihood of selecting a sample mean from a population (the likelihood is the criterion. Hypothesis test for difference of means practice: hypothesis testing in experiments difference of sample means distribution there's a only a 5% chance of having a difference between the means of these two samples to have a difference of more than 102 there's only a 5% chance of that. The two independent samples t-test enables one to determine whether sample means for two groups differ more than a p-value for the two-sample t test may be interpreted as follows: p-value: then one would perform hypothesis testing using the specified value. Overview: statistical hypothesis testing is a method of making decisions about a population based on sample data we can compute how likely it is to find specific sample data if the sample was drawn randomly from the hypothesized population. Hypothesis testing is a common method of drawing inferences about a population based on statistical evidence from a sample as an example, suppose someone says that at a certain time in the state of massachusetts the average price of a gallon of regular unleaded gas was \$115. The third step would involve performing the independent two-sample t-test which helps us to either accept or reject the null hypothesis if the null hypothesis is rejected, it means that two buildings were significantly different in terms of number of hours of hard work.
{ "domain": "paperfolder.info", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232930001333, "lm_q1q2_score": 0.8485613869904695, "lm_q2_score": 0.8633916117313211, "openwebmath_perplexity": 403.94451879827704, "openwebmath_score": 0.6745493412017822, "tags": null, "url": "http://vftermpaperurpa.paperfolder.info/hypothesis-testing-on-two-samples-quick.html" }
This page contains two hypothesis testing examples for one sample z-tests one sample hypothesis testing examples: #2 a principal at a certain school claims that the students in his school are above average intelligence. Yes, 10 steps does seem like a lot but there's a reason for each one, to make sure you consciously make a decision along the way some of the steps are very quick and easy. The t-test for paired samples more about the t-test for two dependent samples so you can understand in a better way the results delivered by the solver: a t-test for two paired samples is a hypothesis test that attempts to make a claim about the population means ($$\mu_1$$ and $$\mu_2$$. The z-test for two proportions has two non-overlaping hypotheses, the null and the alternative hypothesis the null hypothesis is a statement about the population parameter which indicates no effect, and the alternative hypothesis is the complementary hypothesis to the null hypothesis. Hypothesis testing is a vital process in inferential statistics where the goal is to use sample data to draw conclusions about an entire population in the testing process, you use significance levels and p-values to determine whether the test results are statistically significant. In the two independent samples application with a continuous outcome, the parameter of interest in the test of hypothesis is the difference in population means, μ 1-μ 2 the null hypothesis is always that there is no difference between groups with respect to means, ie. ## Hypothesis testing on two samples quick
{ "domain": "paperfolder.info", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232930001333, "lm_q1q2_score": 0.8485613869904695, "lm_q2_score": 0.8633916117313211, "openwebmath_perplexity": 403.94451879827704, "openwebmath_score": 0.6745493412017822, "tags": null, "url": "http://vftermpaperurpa.paperfolder.info/hypothesis-testing-on-two-samples-quick.html" }
## Hypothesis testing on two samples quick Statistical hypothesis testing is a key technique of both frequentist inference and bayesian inference, although the two types of inference have notable differences statistical hypothesis tests define a procedure that controls (fixes) the probability of incorrectly deciding that a default position ( null hypothesis ) is incorrect. Means of independent samples-sigmas unknown & assumed unequal (student t-test) this video covers hypothesis tests of the means of two samples where you make no assumptions at all - all you have to work with are the means and standard deviations of your samples. Chapter 9: hypothesis testing - two samples here we see how to use the ti 83/84 to conduct hypothesis tests about mean di erences, di erences in means, and di erences in proportions between two samples. Hypothesis testing begins with the drawing of a sample and calculating its characteristics (aka, “statistics”) a statistical test (a specific form of a hypothesis test) is an inferential pro. There are many examples of hypothesis for example, people who get flu shots are less likely to get the flu this is called a two-sided hypothesis test since you are only interested if the mean is not equal to 5 the normal distribution was used to demonstrate how hypothesis testing is done. Hypothesis testing asks the question: are two or more sets of data the same, different or related statistically types of hypothesis tests variable data 1 sample 2 samples 2 + samples test of variances f-test: normal data levenes test: non- proportion test two-sample proportion test chi-square test.
{ "domain": "paperfolder.info", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232930001333, "lm_q1q2_score": 0.8485613869904695, "lm_q2_score": 0.8633916117313211, "openwebmath_perplexity": 403.94451879827704, "openwebmath_score": 0.6745493412017822, "tags": null, "url": "http://vftermpaperurpa.paperfolder.info/hypothesis-testing-on-two-samples-quick.html" }
Two-sample hypothesis testing is statistical analysis designed to test if there is a difference between two means from two different populations for example, a two-sample hypothesis could be used to test if there is a difference in the mean salary between male and female doctors in the new york city area. In this lesson the student will gain practice solving problems involving hypothesis testing in statistics in these problems we perform the hypothesis test between two population means with large. The two-sample t procedures are more robust than the one-sample methods, especially when the distributions are not symmetric if the two sample sizes are equal and the two distributions have similar shapes, it can be accurate down to sample sizes as small as n 1 = n 2 = 5. Hypothesis testing on two samples quick Rated 4/5 based on 18 review 2018.
{ "domain": "paperfolder.info", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232930001333, "lm_q1q2_score": 0.8485613869904695, "lm_q2_score": 0.8633916117313211, "openwebmath_perplexity": 403.94451879827704, "openwebmath_score": 0.6745493412017822, "tags": null, "url": "http://vftermpaperurpa.paperfolder.info/hypothesis-testing-on-two-samples-quick.html" }
Which ordinals can be embedded into an ordered field? Let $F$ be an ordered field. What is the least ordinal $\alpha$ such that there is no order-embedding of $\alpha$ into any bounded interval of $F$? • This depends entirely on the field. What kind of an answer are you looking for? Mar 4 '16 at 16:11 • I wonder if the answer, in general, can be specified in terms of certain properties of the ordered field, like its cofinality. Mar 4 '16 at 16:15 • The issue of "bounded" seems moot, since if an ordinal $\beta$ embeds into a field at all, then it embeds into a bounded interval, by first translating to the positives and then composing with $x\mapsto -\frac 1x$. Mar 4 '16 at 18:10 • As Joel David Hamkins said, this ordinal is not bounded by any function of cofinality. One can also prove that this ordinal is regular so it is a cardinal. I wonder if it can be that $2^{\alpha} < |F|$? Mar 6 '16 at 13:32 • @nombre It can’t be, because of the Erdős–Rado theorem; this is mentioned in my answer. Mar 10 '16 at 18:18 This parameter of a field does not equal any its common cardinal characteristic that I could think of, though it is related in several ways. Let me first introduce some notation. Assume $F$ is an ordered field. As noted in the comments, if an ordinal embeds in $F$, it embeds in every interval $(a,b)$ of $F$, so we can simply put $$o(F)=\min\{\alpha\in\mathrm{Ord}:\alpha\text{ does not embed in }F\}.$$ As also noted in the comments, $o(F)$ is a regular uncountable cardinal. We can further consider: • cardinality $|F|$ • density $d(F)$ (= least cardinality of a dense subset), which also equals the weight of $F$ as an ordered topological space, and the cellularity of $F$ (maximal number of disjoint open intervals); these three invariants coincide for any bi-ordered group • cofinality $\def\cf\mathit{cf}\cf(F)$ These parameters satisfy $$\cf(F)\le d(F)\le|F|\le2^{d(F)}.$$
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.982823294509472, "lm_q1q2_score": 0.8485613865662682, "lm_q2_score": 0.8633916099737806, "openwebmath_perplexity": 211.77768083560613, "openwebmath_score": 0.9205182194709778, "tags": null, "url": "https://mathoverflow.net/questions/232777/which-ordinals-can-be-embedded-into-an-ordered-field" }
These parameters satisfy $$\cf(F)\le d(F)\le|F|\le2^{d(F)}.$$ Clearly, $\cf(F)$ embeds in $F$. On the other hand, an embedding of $\alpha$ in $F$ gives a family of $|\alpha|$ disjoint open intervals, thus $$\tag{1}\cf(F)^+\le o(F)\le d(F)^+.$$ The Erdős–Rado theorem $(2^\kappa)^+\to(\kappa^+)^2_2$ implies that a linear order of size larger than $2^\kappa$ contains a well-ordered or inverse well-ordered subset of size $\kappa^+$, thus $$\tag{2}|F|\le2^{o(F)^-},$$ where $o(F)^-=\kappa$ if $o(F)=\kappa^+$ is a successor cardinal, and $o(F)^-=o(F)$ otherwise. Even better, let $D(F)$ be the Dedekind–MacNeille completion of $F$ (i.e., the set of Dedekind cuts of $F$, ordered by inclusion). The Erdős–Rado argument applies to $D(F)$, even though it is not a field. Since $F$ is dense in $D(F)$, any ordinal that embeds in $D(F)$ also embeds in $F$. Thus, $$|D(F)|\le2^{o(F)^-}.$$ This appears to be essentially all one can say. Some examples: • $o(F)$ can be as large as permitted by (1). As explained in Joel’s answer, for any $\kappa$ and regular $\lambda\le\kappa$, there is a field $F$ of cofinality $\lambda$ such that $\kappa$ embeds in $F$; by taking its subfield generated by a copy of $\kappa$ and a cofinal sequence, we can assume $|F|=\kappa$, thus $$\cf(F)=\lambda, \qquad |F|=d(F)=\kappa, \qquad o(F)=\kappa^+.$$ • $o(F)$ can be as small as permitted by (2). Let $\kappa$ be a cardinal such that $\kappa=2^{<\kappa}$ (i.e., $\kappa=\lambda^+=2^\lambda$, or $\kappa$ is strong limit). By Corollary 2 in https://mathoverflow.net/a/188628, there is a field $F$ of size $|F|=2^\kappa$ with a dense subfield of size $\kappa$; by construction, we can also ensure $\kappa$ embeds in $F$. This makes $$d(F)=\kappa,\qquad o(F)=\kappa^+,\qquad |F|=2^\kappa.$$ Now, let $K$ be the rational function field $K=F(x)$, where $x>F$. Then $$\cf(K)=\omega,\qquad o(K)=\kappa^+,\qquad |K|=d(K)=2^\kappa,$$ using the following easily shown property:
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.982823294509472, "lm_q1q2_score": 0.8485613865662682, "lm_q2_score": 0.8633916099737806, "openwebmath_perplexity": 211.77768083560613, "openwebmath_score": 0.9205182194709778, "tags": null, "url": "https://mathoverflow.net/questions/232777/which-ordinals-can-be-embedded-into-an-ordered-field" }
using the following easily shown property: Lemma: If $F$ is an ordered field, the rational function field $F(x)$ with $x>F$ satisfies $\cf(F(x))=\omega$, $|F(x)|=d(F(x))=|F|$, and $o(F(x))=o(F)$. • Thanks for this very instructive answer. I didn't know the Erdös-Rado theorem. Mar 10 '16 at 18:36 • This was quite helpful! Thanks Emil Mar 11 '16 at 0:12 Let me address merely the suggestion the OP makes in the comment: whether this ordinal can be specified from the cofinality of the field. The answer is no, because any ordered field $F$ can be elementarily extended to a field with cofinality $\omega$, or indeed, to a field with any given regular cofinality. To have cofinality $\delta$, simply extend $\delta$ many times, making sure to put a new element on top each time, taking unions at limit stages. $$F\prec F_1\prec F_2\prec\dots\prec F_\alpha\prec\dots\prec F_\delta$$ The resulting field will have the same cofinality as $\delta$, because the sequence of those points newly added on top at each stage will be cofinal in $F_\delta$. Since the initial field $F$ could have had very large embedded ordinals, which will still embed into the resulting field $F_\delta$, this shows that there are fields with very large embedded ordinals, as large as desired, which nevertheless have cofinality $\omega$, or any desired cofinality. • For a striking illustration of Joel’s observation, let $\mathbf{No}$ be the ordered field of surreal numbers, $a$ be an indeterminate where $a>\mathbf{No}$ and $\mathbf{No}(a)$ be the ordered simple transcendental extension of $\mathbf{No}$ generated by $a$ and $\mathbf{No}$. Although $\mathbf{No}(a)$ has cofinality $\omega$, it contains the entire class of ordinals. This ordered field, which is constructible in NBG, is discussed in the author’s JSL (2001: Proposition 3, p. 1240) for reasons unrelated to the question at hand. Mar 4 '16 at 18:53
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.982823294509472, "lm_q1q2_score": 0.8485613865662682, "lm_q2_score": 0.8633916099737806, "openwebmath_perplexity": 211.77768083560613, "openwebmath_score": 0.9205182194709778, "tags": null, "url": "https://mathoverflow.net/questions/232777/which-ordinals-can-be-embedded-into-an-ordered-field" }
# Math Help - Dice Pair Matching 1. ## Dice Pair Matching 4 players roll a die. They score 1 point if there is a matching pair. What are the probabilities of getting the possible scores. For example: for the case where 2 people get ”1”, and the other two roll a ”3” and a ”4” respectively, then the team’s score would be 1. Similarly, for the case that 3 people throw a ”5” and the other one does not, the score would be 3, since there are 3 different pairs of players that have the same number. Proposed solution: Imagine players as slots to fill with possibilities of rolling dice. Score 0: All 4 players roll different numbers. So 6*5*4*3 = 360 ways of getting score 0. Score 1: 2 Players roll the same, other 2 are different from each other and the matching pair. So 6*1*5*4 = 120 ways of getting score 0. Score 2: 2 pairs of players match. So 6*1*5*1 = 30 ways. The ones are the corresponding matches to the preceding rolls. Score 3: 3 matches and 1 different so 6*1*1*5 = 30 ways again. The 4th person can have any one of the 5 choices left over. Score 4: All roll the same number so. 6*1*1*1 = 6 ways of getting score 4. My problem is these all add up to 546, whereas I would imagine they'd have to add up to $1296 = 6^4$ possibilities. Any suggestions? 2. Let’s look at the case score 2. That could happen if the players roll $\boxed{2}\boxed{2}\;\boxed{6}\boxed{6}$. But that can happen is $\frac{4!}{2^2}$ ways. Moreover, there are ${6 \choose 2}$ ways to have two different pairs. It seems to me that have under-counted this case. If I have miss-read the problem please say why. 3. Hello, utopiaNow! You're not considering WHO gets the pairs, etc. Four players roll a die. They score 1 point if there is a matching pair. What are the probabilities of getting the possible scores? For example: 2 people get ”1”, and the other two roll a ”3” and a ”4” resp., then the score would be 1. Similarly, that 3 people throw a ”5” and the other one does not, the score would be 3.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613839396022, "lm_q2_score": 0.8633916134888614, "openwebmath_perplexity": 1668.3018781768037, "openwebmath_score": 0.8180426955223083, "tags": null, "url": "http://mathhelpforum.com/advanced-statistics/79990-dice-pair-matching.html" }
Score 0 Four different numbers: $abcd$ Number of ways: . $6\cdot5\cdot4\cdot3 \:=\:{\color{blue}360}$ Score 1 A pair and two singles: $aabc$ There are: . ${4\choose2} = 6$ distributions . . . $\{aabc, abac, abca, baac, baca, bcaa\}$ Number of ways: . $6\cdot(6\cdot5\cdot4) \:=\:{\color{blue}720}$ Score 2 Two pairs: $aabb$ There are 3 distributions. . . If the four players are $A,B,C,D$, they can be paired in 3 ways: . . . . $\{AB,\,CD\},\;\{AC,\,BD\},\:\{AD,\,BC\}$ Number of ways: . $3\cdot(6\cdot5) \;=\;{\color{blue}90}$ Score 3 A triple and a single: $aaab$ There are 4 choices of who gets the triple. Number of ways: . $4\cdot(6\cdot5) \;=\;{\color{blue}120}$ Score 4 A quadruple: $aaaa$ The only choice is the value of the quadruple. Number of ways: . ${\color{blue}6}$ Check: . $360 + 720 + 90 + 120 + 6 \;=\;{\bf1296}$ 4. Originally Posted by Soroban Hello, utopiaNow! You're not considering WHO gets the pairs, etc. Score 0 Four different numbers: $abcd$ Number of ways: . $6\cdot5\cdot4\cdot3 \:=\:{\color{blue}360}$ Score 1 A pair and two singles: $aabc$ There are: . ${4\choose2} = 6$ distributions . . . $\{aabc, abac, abca, baac, baca, bcaa\}$ Number of ways: . $6\cdot(6\cdot5\cdot4) \:=\:{\color{blue}720}$ Score 2 Two pairs: $aabb$ There are 3 distributions. . . If the four players are $A,B,C,D$, they can be paired in 3 ways: . . . . $\{AB,\,CD\},\;\{AC,\,BD\},\:\{AD,\,BC\}$ Number of ways: . $3\cdot(6\cdot5) \;=\;{\color{blue}90}$ Score 3 A triple and a single: $aaab$ There are 4 choices of who gets the triple. Number of ways: . $4\cdot(6\cdot5) \;=\;{\color{blue}120}$ Score 4 A quadruple: $aaaa$ The only choice is the value of the quadruple. Number of ways: . ${\color{blue}6}$ Check: . $360 + 720 + 90 + 120 + 6 \;=\;{\bf1296}$ Ah, yes that's it. Thanks Soroban for your help and explanation.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613839396022, "lm_q2_score": 0.8633916134888614, "openwebmath_perplexity": 1668.3018781768037, "openwebmath_score": 0.8180426955223083, "tags": null, "url": "http://mathhelpforum.com/advanced-statistics/79990-dice-pair-matching.html" }
odeToVectorField Reduce order of differential equations to first-order Support for character vector or string inputs will be removed in a future release. Instead, use syms to declare variables, and replace inputs such as odeToVectorField('D2y = x') with syms y(x), odeToVectorField(diff(y,x,2) == x). Description example V = odeToVectorField(eqn1,...,eqnN) converts higher-order differential equations eqn1,...,eqnN to a system of first-order differential equations, returned as a symbolic vector. example [V,S] = odeToVectorField(eqn1,...,eqnN) converts eqn1,...,eqnN and returns two symbolic vectors. The first vector V is the same as the output of the previous syntax. The second vector S shows the substitutions made to obtain V. Examples collapse all Define a second-order differential equation: $\frac{{\mathit{d}}^{2}\mathit{y}}{{\mathit{dt}}^{2}}+{\mathit{y}}^{2}\mathit{t}=3\mathit{t}.$ Convert the second-order differential equation to a system of first-order differential equations. syms y(t) eqn = diff(y,2) + y^2*t == 3*t; V = odeToVectorField(eqn) V = $\left(\begin{array}{c}{Y}_{2}\\ 3 t-t {{Y}_{1}}^{2}\end{array}\right)$ The elements of V represent the system of first-order differential equations, where V[i] = ${{Y}_{i}}^{\prime }$ and ${Y}_{1}=y$. Here, the output V represents these equations: $\frac{\mathit{d}{\mathit{Y}}_{1}}{\mathit{dt}}={\mathit{Y}}_{2}$ $\frac{{\mathit{dY}}_{2}}{\mathit{dt}}=3\mathit{t}-\mathit{t}{\mathit{Y}}_{1}^{2}.$ For details on the relation between the input and output, see Algorithms. When reducing the order of differential equations, return the substitutions that odeToVectorField makes by specifying a second output argument. syms f(t) g(t) eqn1 = diff(g) == g-f; eqn2 = diff(f,2) == g+f; eqns = [eqn1 eqn2]; [V,S] = odeToVectorField(eqns) V = $\left(\begin{array}{c}{Y}_{2}\\ {Y}_{1}+{Y}_{3}\\ {Y}_{3}-{Y}_{1}\end{array}\right)$ S = $\left(\begin{array}{c}f\\ \mathrm{Df}\\ g\end{array}\right)$
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232924970204, "lm_q1q2_score": 0.848561381374031, "lm_q2_score": 0.8633916064586998, "openwebmath_perplexity": 1733.3213692547977, "openwebmath_score": 0.6988626718521118, "tags": null, "url": "https://kr.mathworks.com/help/symbolic/odetovectorfield.html" }
S = $\left(\begin{array}{c}f\\ \mathrm{Df}\\ g\end{array}\right)$ The elements of V represent the system of first-order differential equations, where V[i] = ${{Y}_{i}}^{\prime }$. The output S shows the substitutions being made, S[1] = ${Y}_{1}=f$, S[2] = ${Y}_{2}$ = diff(f), and S[3] = ${Y}_{3}=g$. Solve a higher-order differential equation numerically by reducing the order of the equation, generating a MATLAB® function handle, and then finding the numerical solution using the ode45 function. Convert the following second-order differential equation to a system of first-order differential equations by using odeToVectorField. $\frac{{\mathit{d}}^{2}\mathit{y}}{\mathit{d}{\mathit{t}}^{2}}=\left(1-{\mathit{y}}^{2}\right)\frac{\mathit{dy}}{\mathit{dt}}-\mathit{y}.$ syms y(t) eqn = diff(y,2) == (1-y^2)*diff(y)-y; V = odeToVectorField(eqn) V = $\left(\begin{array}{c}{Y}_{2}\\ -\left({{Y}_{1}}^{2}-1\right) {Y}_{2}-{Y}_{1}\end{array}\right)$ Generate a MATLAB function handle from V by using matlabFunction. M = matlabFunction(V,'vars',{'t','Y'}) M = function_handle with value: @(t,Y)[Y(2);-(Y(1).^2-1.0).*Y(2)-Y(1)] Specify the solution interval to be [0 20] and the initial conditions to be ${y}^{\prime }\left(0\right)=2$ and ${y}^{\prime \prime }\left(0\right)=0$. Solve the system of first-order differential equations by using ode45. interval = [0 20]; yInit = [2 0]; ySol = ode45(M,interval,yInit); Next, plot the solution $y\left(t\right)$ within the interval $t$ = [0 20]. Generate the values of t by using linspace. Evaluate the solution for $y\left(t\right)$, which is the first index in ySol, by calling the deval function with an index of 1. Plot the solution using plot. tValues = linspace(0,20,100); yValues = deval(ySol,tValues,1); plot(tValues,yValues) Convert the second-order differential equation ${y}^{\prime \prime }\left(x\right)=x$ with the initial condition $y\left(0\right)=a$ to a first-order system.
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232924970204, "lm_q1q2_score": 0.848561381374031, "lm_q2_score": 0.8633916064586998, "openwebmath_perplexity": 1733.3213692547977, "openwebmath_score": 0.6988626718521118, "tags": null, "url": "https://kr.mathworks.com/help/symbolic/odetovectorfield.html" }
syms y(x) a eqn = diff(y,x,2) == x; cond = y(0) == a; V = odeToVectorField(eqn,cond) V = $\left(\begin{array}{c}{Y}_{2}\\ x\end{array}\right)$ Input Arguments collapse all Higher-order differential equations, specified as a symbolic differential equation or an array of symbolic differential equations. Use the == operator to create an equation. Use the diff function to indicate differentiation. For example, represent d2y(t)/dt2 = t y(t) by entering the following command. syms y(t) eqn = diff(y,2) == t*y; Output Arguments collapse all First-order differential equations, returned as a symbolic expression or a vector of symbolic expressions. Each element of this vector is the right side of the first-order differential equation Y[i]′ = V[i]. Substitutions in first-order equations, returned as a vector of symbolic expressions. The elements of the vector represent the substitutions, such that S(1) = Y[1], S(2) = Y[2],…. Tips • To solve the resulting system of first-order differential equations, generate a MATLAB® function handle using matlabFunction with V as an input. Then, use the generated MATLAB function handle as an input for the MATLAB numerical solver ode23 or ode45. • odeToVectorField can convert only quasi-linear differential equations. That is, the highest-order derivatives must appear linearly. For example, odeToVectorField can convert y*y″(t) = –t2 because it can be rewritten as y″(t) = –t2/y. However, it cannot convert y″(t)2 = –t2 or sin(y″(t)) = –t2. Algorithms To convert an nth-order differential equation ${a}_{n}\left(t\right){y}^{\left(n\right)}+{a}_{n-1}\left(t\right){y}^{\left(n-1\right)}+\dots +{a}_{1}\left(t\right){y}^{\prime }+{a}_{0}\left(t\right)y+r\left(t\right)=0$ into a system of first-order differential equations, odetovectorfield makes these substitutions. $\begin{array}{l}{Y}_{1}=y\\ {Y}_{2}={y}^{\prime }\\ {Y}_{3}={y}^{″}\\ \dots \\ {Y}_{n-1}={y}^{\left(n-2\right)}\\ {Y}_{n}={y}^{\left(n-1\right)}\end{array}$
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232924970204, "lm_q1q2_score": 0.848561381374031, "lm_q2_score": 0.8633916064586998, "openwebmath_perplexity": 1733.3213692547977, "openwebmath_score": 0.6988626718521118, "tags": null, "url": "https://kr.mathworks.com/help/symbolic/odetovectorfield.html" }
Using the new variables, it rewrites the equation as a system of n first-order differential equations: $\begin{array}{l}{Y}_{1}{}^{\prime }={y}^{\prime }={Y}_{2}\\ {Y}_{2}{}^{\prime }={y}^{″}={Y}_{3}\\ \dots \\ {Y}_{n-1}{}^{\prime }={y}^{\left(n-1\right)}={Y}_{n}\\ {Y}_{n}{}^{\prime }=-\frac{{a}_{n-1}\left(t\right)}{{a}_{n}\left(t\right)}{Y}_{n}-\frac{{a}_{n-2}\left(t\right)}{{a}_{n}\left(t\right)}{Y}_{n-1}-...-\frac{{a}_{1}\left(t\right)}{{a}_{n}\left(t\right)}{Y}_{2}-\frac{{a}_{0}\left(t\right)}{{a}_{n}\left(t\right)}{Y}_{1}+\frac{r\left(t\right)}{{a}_{n}\left(t\right)}\end{array}$ odeToVectorField returns the right sides of these equations as the elements of vector V and the substitutions made as the second output S. Compatibility Considerations expand all Warns starting in R2019b
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232924970204, "lm_q1q2_score": 0.848561381374031, "lm_q2_score": 0.8633916064586998, "openwebmath_perplexity": 1733.3213692547977, "openwebmath_score": 0.6988626718521118, "tags": null, "url": "https://kr.mathworks.com/help/symbolic/odetovectorfield.html" }
# How to find the index of a square matrix in Mathematica quickly? Let $A$ be an $n\times n$ complex matrix. The smallest nonnegative integer $k$ such that $\mathrm{rank}(A^{k+1})=\mathrm{rank}(A^{k})$, is the index fo $A$ and denoted by $\mathrm{Ind}(A)$. I would like to compute $\mathrm{Ind}(A)$ quickly in Mathematica (I am using V8). Let us as a very simple example consider $$A=\left(\begin{array}{rrrrrr} 1 & -1 & 0 & 0 & 0 & 0 \\ -1 & 1 & 0 & 0 & 0 & 0 \\ -1 & -1 & 1 & -1 & 0 & 0 \\ -1 & -1 & -1 & 1 & 0 & 0 \\ -1 & -1 & -1 & 0 & 2 & -1 \\ -1 & -1 & 0 & -1 & -1 & 2 \end{array}\right)$$ then it is clear that $\mathrm{Ind}(A)=2$. For computing this in Mathematica, I used Solve[MatrixRank[MatrixPower[A, k + 1]] == MatrixRank[MatrixPower[A, k]] && k > 0, k, Integers] But unfortunately, I cannot get the result. I will be grateful if anyone could design a way to compute $\mathrm{Ind}(A)$ for random matrices of the size $n\times n=200\times 200$ in Mathematica.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
• Hmmm, can't you just compute MatrixRank[MatrixPower[A, k + 1] for incresing k and just compare the previous two entries. Sorry don't have time for a full answer now... – Ajasja Apr 24 '13 at 12:32 • In theory, one could look carefully at the Jordan block that goes with the eigenvalue of zero. In practice this will not scale very well, and the numeric methods involving MatrixRank in responses below should be better. – Daniel Lichtblau Apr 24 '13 at 14:00 • @whuber (part 2) JordanDecomposition is not a good thing to try on non-exact input. I was never strongly in favor of extending it to approximate number input. To this day we find and fix bugs from that functionality. I'm not sure if we gained any advantage from having it. – Daniel Lichtblau Apr 24 '13 at 15:33 • @whuber Okay, I think I see the issue. I'll post what might be a viable workaround. – Daniel Lichtblau Apr 24 '13 at 16:14 • Dear J.M., I must compute the index for both types of matrices. Specially for inexact matrices. It would also be nice if an algorithm could produce $k$, $A^k$ and $A^{k+1}$ at the end of its run for all types of matrices. – Fazlollah Apr 25 '13 at 18:38 The idea behind the Jordan normal form does the trick, even though JordanDecomposition does not. (Incidentally, this suggests there may be a more reliable, stable algorithm to obtain Jordan decompositions than is implemented in Mathematica...) The resulting solution is very short, efficient, and numerically stable when applied to floating-point matrices. The following begins with a brief explanation of how it works, followed by several examples to show it actually does work. Let's consider how any matrix can have an index exceeding $1$. Because the rank of $A^2$ is less than that of $A$, the nullspace of $A$ must be non-trivial. If the rank of $A^3$ further decreases, it must be because there is a sequence of vectors mapped by $A$, $v_2 \to v_1 \to 0$, with $v_1 \ne 0$. The index is the maximal length of such a sequence.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
This provides a numerically stable, relatively quick way to compute the index. Beginning with computation of the nullspace $N_0$, find all vectors mapped by $A$ into the nullspace. In other words, find a basis for the solutions to $A x \in N_0.$ As far as I can tell, Mathematica does not have a direct method to do this, so let's reduce it to one it does have. NullSpace will provide a basis $e_1, \ldots, e_k$ of $N_0$. At the next step we seek a basis for the set of solutions $$A x - \lambda_1 e_1 - \ldots - \lambda_k e_k = 0$$ This means the augmented vector $(x_1, x_2, \ldots, x_n; -\lambda_1, \ldots, -\lambda_k)$ lies in the nullspace of the matrix formed by augmenting $A$ with the columns $e_1, \ldots, e_k$. Among the solutions of this equation will be the original nullspace. Iterating this procedure creates a flag of vector spaces $N_0 \subset N_1 \subset \cdots \subset N_i = N_{i+1} = \cdots$; $i+1$ is then the index. Provided we use a numerically stable procedure like LinearSolve or NullSpace, we can expect this algorithm to work even for large floating-point matrices. First I will provide an implementation and then illustrate it with several examples. To help us study what's going on, this version returns a "generalized index" consisting of a sequence of bases of the flag: it gives far more information about the structure of $A$ than just its index, but obviously its index is easily derivable from the output: it is just its length. You should be able to recognize the iteration in NestWhileList, the augmentation of $A$ via Join, and the computation of nullspaces with NullSpace (including the initial nullspace, which is why this command appears twice). index[a_] := With[{k = NullSpace[a]}, If[k == {}, {}, NestWhileList[ NullSpace[Join[a, Transpose[#[[All, 1 ;; Length@a]]], 2]] &, k, Length[#1] != Length[#2] &, 2, Length@a, -1]]];
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
The test for termination is when the dimensions of the solutions stabilize (as computed by applying Length to their bases). Because termination occurs when $\dim(N_i) = \dim(N_{i+1})$, the final -1 in the NestWhileList command throws away the superfluous basis for $N_{i+1}$. (Edit A special test has to be made for nonsingular matrices, for then Transpose fails when the nullspace is empty.) To test this solution on large-ish matrices, let's generate some with known indexes. A good way to do this is to start with a bunch of Jordan blocks of zero eigenvalue: the index is one more than the longest contiguous string of superdiagonal ones (as is easily checked). Conjugating this by some random matrix (which is almost surely invertible) creates a non-sparse matrix for testing. n = 30; p = SparseArray[{Band[{1, 1}] -> 0, Band[{1, 2}] -> 1}, {n, n}]; j = Floor[n/3]; p[[j, j + 1]] = 0; q = Rationalize[RandomReal[{0, 1}, {n, n}], 10^-2]; a = Inverse[q] .p . q; ArrayPlot[p] This is a plot of the Jordan normal form of $a$. A direct calculation of its index will determine the ranks of the matrix powers. Because this matrix is designed to have an index of $20$, we can hard-code this into the check: (ranks = MatrixRank[MatrixPower[a, #]] & /@ Range[20] ) // AbsoluteTiming $\{7.1404084,\{28,26,24,22,20,18,16,14,12,10,9,8,7,6,5,4,3,2,1,0\}\}$ After seven seconds, we find that indeed the index is exactly $20$: $A^{19} \ne 0$ but $A^{20} = A^{21} = \cdots = 0$. Of course, the corresponding numerical (floating point) calculation is far faster--but it gets the wrong answer: (nRanks = MatrixRank[MatrixPower[N@a, #]] & /@ Range[Length@a] ) // AbsoluteTiming $\{0.0100006,\{28,26,24,22,20,18,16,14,12,11,9,9,8,7,7,8,8,8,7,30,28,30,28,30,28,30,28,30,28,30\}\}$ Problems crop up around the $12^\text{th}$ power. This is evident in a plot of the two tests: ListPlot[{ranks, nRanks}, PlotStyle -> PointSize[0.015], AxesLabel -> {"Power", "Rank"}]
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
ListPlot[{ranks, nRanks}, PlotStyle -> PointSize[0.015], AxesLabel -> {"Power", "Rank"}] Clearly the numerical calculations are producing garbage well before the correct index is reached. I don't dare apply index to a itself: when using exact arithmetic, it's too slow! But let's see how it performs on the floating point version of a: n = index[N@a]; // AbsoluteTiming $\{0.0100006,\text{Null}\}$ It's as fast as the numerical brute-force rank-of-matrix-powers solution was. What about accuracy? Length@n $20$ It gets the right answer! But perhaps this was only luck? Let's check by restricting $A$ to the flag returned by index: n0 = Reverse@(Last@n)[[All, 1 ;; Length[a]]]; u = Transpose[PseudoInverse[n0]] . a. Transpose[n0]; $u$ is just $A$ restricted to $N_{20}$, expressed in a different basis. Here are portraits of its powers through the $20^\text{th}$: GraphicsGrid[{(MatrixPower[u, #]//Chop//ArrayPlot) & /@ Range@Length@n}, ImageSize -> 1000] Up until the very end, the powers are nonzero, then finally the $20^\text{th}$ power is the zero matrix: this demonstrates the index of $A$ was at least $20$. As another example, set $n=120$ in the previous one. My trials produce the generalized index (that is, the entire flag of $80$ subvectorspaces) in one-half to one second and consistently calculate the correct index of $80$. (I haven't tested with $n$ any larger than $120$ because it starts taking a long time just to create $a$.) Finally, let's apply this solution to the matrix of the question: a = {{1, -1, 0, 0, 0, 0}, {-1, 1, 0, 0, 0, 0}, {-1, -1, 1, -1, 0, 0}, {-1, -1, -1, 1, 0, 0}, {-1, -1, -1, 0, 2, -1}, {-1, -1, 0, -1, -1, 2}}; MatrixForm /@ index[a] $$\left\{\left( \begin{array}{cccccc} 0 & 0 & 1 & 1 & 1 & 1 \end{array} \right),\left( \begin{array}{ccccccc} 1 & 1 & 0 & 0 & 0 & 0 & 2 \\ 0 & 0 & 1 & 1 & 1 & 1 & 0 \end{array} \right)\right\}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
The first element of the list is a basis of the nullspace of $A$, which is one-dimensional. The second element is a basis of the nullspace of an augmented version of $A$. We are interested only in the first six entries in each row. They form a basis for $N_1$. They include (at the bottom) the previous basis for $N_0$. As one last check, let's verify that $A$ sends the second basis into the span of the first: a . Transpose@(Last@index[a])[[All, 1 ;; 6]] // Transpose // MatrixForm $$\left( \begin{array}{cccccc} 0 & 0 & -2 & -2 & -2 & -2 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{array} \right)$$ Sure enough, the second basis vector is killed (it was in the nullspace) and the first is sent to a multiple ($-2$) of the second. This detailed additional information about precisely how $A$ achieves its index is potentially useful in applications.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
• Overkill for the problem at hand but as the first to upvote this I will say it has an aesthetic appeal as well as independent interest. Could perhaps be adapted to a Jordan decomposition algorithm, for example, since finding those nontrivial block eigenspaces is the hard part. – Daniel Lichtblau Apr 25 '13 at 13:36 • Excellent idea. Can you check that why your technique cannot produce the result for a simple matrix in floating points arithmetic as follows: $n=100; a = RandomReal[{}, {n, n}]$. I faced with some errors such as "Transpose::nmtx: "The first two levels of the one-dimensional list {} cannot be transposed."". – Fazlollah Apr 25 '13 at 16:28 • Thanks: I tacitly assumed $A$ is singular; if not, the index is $0$. I will add a test for this. However, the expression RandomReal[,n,n] is not even syntactically correct. The message you got indicates you created a vector rather than a matrix. An expression that will give you an actual $n$ by $n$ matrix would be RandomReal[{0,1},{n,n}]. For almost all such random matrices the index is $0$, so they don't make a very good test. Besides, you don't know in advance what the index is! Test instead with the code I provide, which produces exact matrices of known index. – whuber Apr 25 '13 at 17:39 Try this: Length@NestWhileList[A.# &, A, MatrixRank[#] != MatrixRank[#2] &, 2] - 1 This'll keep multiplying $A$ together and checking the matrix rank at each step.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
This'll keep multiplying $A$ together and checking the matrix rank at each step. • f@x is a shorthand for f[x] and # and & are used in writing pure functions. The rest should be easy to find in the documentation. – Szabolcs Apr 24 '13 at 12:37 • Since MatrixRank is relatively costly (compared to Dot) this could be improved by caching the rank of of the matrix between steps. – Mr.Wizard Apr 24 '13 at 12:42 • @Mr.Wizard Yes, there's often a tradeoff between simplicity and performance. Why don't you post the faster solution? – Szabolcs Apr 24 '13 at 12:43 • @Szabolcs try testing your code with A={{1, 1, -1, 2}, {-1, 1, 0, 0}, {0, 1, -1, 2}, {1, 2, -1, 0}}. In my machine the kernel keeps on running.... – PlatoManiac Apr 24 '13 at 12:57 • I think the code is not working well, Mr. Wizard is right down here. For a random matrix, it sould give 0 while produces 5 as the $Ind(A)$. – Fazlollah Apr 24 '13 at 13:25 Here is the bad type of example mentioned in comments by @whuber. SeedRandom[1111]; n = 3; p = SparseArray[{Band[{1, 1}] -> 0, Band[{1, 2}] -> 1}, {n, n}]; q = Rationalize[RandomReal[{0, 1}, {n, n}], 10^-3]; a = Inverse[q].p.q; na = N[a]; MatrixRank[MatrixPower[na, #]] & /@ Range[Length@na] (* Out[318]= {2, 1, 3} *) To see the source of trouble we'll have a look at singular values. svlist = Map[SingularValueList[#, Tolerance -> 10^(-6)] &, FoldList[Dot, na, Table[na, {n - 1}]]] 9* Out[319]= {{13.1845622926, 1.63446803072}, {21.5497455662}, {2.03322204001*10^-14, 2.76424896137*10^-15, 1.86215833311*10^-16}} *) Notice that the tolerance setting does nothing for that last list (in this example it does nothing for the others either, but that need not be the case in general). The reason is that all of them are small, and none are a factor of 10^6 or more smaller than the largest.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
What we want in this situation is to have also an absolute threshold for removing them, as Tolerance only uses a relative threshold. Chop can do this. I will illustrate with a larger example. SeedRandom[1111]; n = 100; p = SparseArray[{Band[{1, 1}] -> 0, Band[{1, 2}] -> 1}, {n, n}]; q = Rationalize[RandomReal[{0, 1}, {n, n}], 10^-3]; a = Inverse[q].p.q; na = N[a]; Timing[ svlist = Map[SingularValueList[#, Tolerance -> 10^(-6)] &, FoldList[Dot, na, Table[na, {n - 1}]]];] (* Out[340]= {0.180000, Null} *) Map[Length, Chop[svlist, 10^(-6)] /. 0 :> Sequence[]] (* Out[341]= {99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, \ 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, \ 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, \ 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, \ 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, \ 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0} *) The upshot is you might want to experiment with setting Tolerance, and postprocessing using Chop, on SingularValueList[] of these powers. I believe this is correct but I'm running out of time to check it or develop it further. I believe Szabolcs intented to write != where he wrote ==, but there is still the matter from starting with power zero. Update #3: f1 = {#, MatrixRank@#} &; f2[m_][{_, {a2_, r2_}, n_}] := {{a2, r2}, f1[m.a2], n + 1} f3[m_] := NestWhile[f2[m], {{-1, -1}, f1 @ MatrixPower[m, 0], -1}, #[[1, 2]] != #[[2, 2]] &] Use: A = {{1, -1, 0, 0, 0, 0}, {-1, 1, 0, 0, 0, 0}, {-1, -1, 1, -1, 0, 0}, {-1, -1, -1, 1, 0, 0}, {-1, -1, -1, 0, 2, -1}, {-1, -1, 0, -1, -1, 2}}; f3[A] Output is in the form: {{matrix1, rank1}, {matrix2, rank2}, power} You can use Part to extract whatever you need.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
• I think Mr. Wizard answer needs some revision. I mean the answers are not the same. For instance, check the following sample examples: Clear["Global*"] SeedRandom[1234]; n = 500; A = RandomReal[{}, {n, n}]; Length@NestWhileList[A.# &, A, MatrixRank[#] == MatrixRank[#2] &, 2] // AbsoluteTiming Length@NestWhileList[{A.#[[1]], MatrixRank@#[[1]]} &, {A, -1}, #[[2]] == #2[[2]] &, 2] // AbsoluteTiming – Fazlollah Apr 24 '13 at 12:56 • @FazlollahSoleymani Sorry, let me see if I can fix that. – Mr.Wizard Apr 24 '13 at 13:00 • @FazlollahSoleymani I don't know that I understand the question. Can you confirm that the output of Szabolcs's code is in fact the result that you want? – Mr.Wizard Apr 24 '13 at 13:07 • @FazlollahSoleymani please take for example SeedRandom[12345]; A = RandomReal[{}, {500, 500}]; then Table[MatrixRank[MatrixPower[A, i]], {i, 0, 5}] is {500, 500, 500, 500, 500, 494} -- wouldn't the index be either zero or one? Szabolcs's code yields five. – Mr.Wizard Apr 24 '13 at 13:11 • @FazlollahSoleymani I think my updated answer now agrees with the first one, but I still don't think I understand the question. If the Rank of both A^1 and A^2 is 500, why isn't the answer one? – Mr.Wizard Apr 24 '13 at 13:17 We can exploit the fact that one can compute the index of a matrix from its minimal polynomial, so a good method is contingent on finding an efficient method for generating a matrix's minimal polynomial. Here, I present a not too fast method, but this can be sped up with a better algorithm for the minimal polynomial (e.g. by computing it directly from JordanDecomposition[]): MatrixMinimalPolynomial[a_?MatrixQ, x_] := Module[{qu, a0, mnm}, a0 = IdentityMatrix[Length[a]]; mnm = {Flatten[a0]}; While[Length[qu] == 0, a0 = a0.a; AppendTo[mnm, Flatten[a0]]; qu = NullSpace[Transpose[mnm]]]; Fold[(#1 x + #2) &, 0, Reverse[First[qu]]]]
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
MatrixIndex[a_?MatrixQ] /; TrueQ[Det[a] != 0] := 0; MatrixIndex[a_?MatrixQ] := First[Cases[FactorSquareFreeList[ MatrixMinimalPolynomial[a, \[FormalX]]], {\[FormalX], k_Integer} :> k]] Using OP's example: MatrixIndex[{{1, -1, 0, 0, 0, 0}, {-1, 1, 0, 0, 0, 0}, {-1, -1, 1, -1, 0, 0}, {-1, -1, -1, 1, 0, 0}, {-1, -1, -1, 0, 2, -1}, {-1, -1, 0, -1, -1, 2}}] 2 `
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8485613735754924, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 727.8552952130527, "openwebmath_score": 0.40167033672332764, "tags": null, "url": "https://mathematica.stackexchange.com/questions/23955/how-to-find-the-index-of-a-square-matrix-in-mathematica-quickly" }
# Precise definition of “weaker” and “stronger”? If I say that $A$ is stronger than $B$, do I mean that $A \Rightarrow B$, or that $B \Rightarrow A$? (Or something else?) I feel like I have seen both usages in literature, which is confusing. Thoughts based on intuition: $A \Rightarrow B$ means $A$ is a special case of $B$ -- $B$ is more general. This would seem to imply that $B$ is "stronger". (Example: $n$ is an integer implies $n$ is a real number.) $A \Rightarrow B$ also means that whenever $A$ holds, $B$ must hold. This would seem to imply that $A$ is "stronger". • A stronger theorem is one which has a weaker hypothesis and/or a stronger conclusion. – GEdgar Jul 25 '11 at 17:54 • In your example "n is an integer implies n is a real number", you are thinking of the predicates involved. The integers are a proper subset of the real numbers. That might be the source of your confusion. When logicians talk about A being stronger than B, they're talking about A and B as distinct statements without regard to the predicates they contain, as Asaf explains. – MikeC Jul 25 '11 at 18:25 • Thanks for the explanations. So when I say "A is stronger than B", precisely what can A and B be? Only theorems? Logical sentences? – usul Jul 25 '11 at 21:41 • Let me also share the following Google Buzz that Terence Tao wrote which addresses some of these issues. – Willie Wong Jul 25 '11 at 23:11 • @bo1024: It means $A$ implies more sentences, then $B$. This is equivalent to $A \Rightarrow B$ because $\Rightarrow$ is a preorder. – beroal Jul 26 '11 at 20:36 If $A\Rightarrow B$, then for every $C$, if $B\Rightarrow C$ we have that $A\Rightarrow C$. Therefore $A$ implies at least the same propositions that $B$ implies. We have two options from here: 1. $B\Rightarrow A$, in which case $A$ is equivalent to $B$, and they imply the same things. 2. $B\nRightarrow A)$, that is $B$ does not imply $A$. We have if so that $A$ is stronger than $B$ since $A\implies A$, but $B$ does not.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692318706085, "lm_q1q2_score": 0.8485563884702474, "lm_q2_score": 0.8688267847293731, "openwebmath_perplexity": 335.370699344321, "openwebmath_score": 0.8419349193572998, "tags": null, "url": "https://math.stackexchange.com/questions/53708/precise-definition-of-weaker-and-stronger/53727" }
In essence "$A$ is stronger than $B$" is when $\{C\mid B\Rightarrow C\}\subsetneq\{C\mid A\Rightarrow C\}$, and equivalent is when the sets are equal. • I am being somewhat inaccurate for didactic reasons, and I am not mentioning any underlying theory which may be required for some of the implications. – Asaf Karagila Jul 25 '11 at 17:47 • Could you add an example or two? – Samy Bencherif Dec 28 '17 at 4:44 • Take the language of equality. The empty theory is weaker than the theory stating that there are at least two different elements. – Asaf Karagila Dec 28 '17 at 6:26 Let's make the simplifying assumption that $\lnot(B \implies A)$. Then $A \implies B$ can be informally expressed as "$A$ is (strictly) stronger than $B$." It is certainly possible that in this situation, at some time, someone has instead written "$B$ is stronger than $A$." Stuff happens. We all have written $x<y$ when we meant $y<x$. And interchange of "necessary condition" and "sufficient condition" happens so (relatively) often that it may be best to avoid these terms. But "$A$ is stronger than $B$" has only one correct interpretation in terms of the direction of the implication (with disagreement, possibly, in the case of equivalence.) However, suppose that we have proved theorem $X$, $\:$(a) under the assumption $A$, and $\:$(b) under the assumption $B$. Then the result (b) is considered to be a stronger result than the result (a). That is perfectly consistent with the ordinary meaning of "stronger," since $$(B \implies X) \implies (A\implies X).$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692318706085, "lm_q1q2_score": 0.8485563884702474, "lm_q2_score": 0.8688267847293731, "openwebmath_perplexity": 335.370699344321, "openwebmath_score": 0.8419349193572998, "tags": null, "url": "https://math.stackexchange.com/questions/53708/precise-definition-of-weaker-and-stronger/53727" }
# Homework Help: Mathematical induction question 1. Dec 22, 2011 ### pc2-brazil 1. The problem statement, all variables and given/known data Suppose a and b are real numbers with 0 < b < a. Show that, if n is a positive integer, then $$a^n - b^n \leq na^{n-1}(a-b)$$ 2. Relevant equations 3. The attempt at a solution I'm trying to show this by induction. Let P(n) be the proposition that $a^n - b^n \leq na^{n-1}(a-b)$ I've already verified that P(1) is true, which completes the basis step. Inductive step: I must show that, if P(k), then P(k+1). So, I first assume that this is true for an arbitrary k: $a^k - b^k \leq ka^{k-1}(a-b)$ Then, I must show that, if P(k) is true, it follows that $a^{k+1} - b^{k+1} \leq (k+1)a^k(a-b)$. This is where I'm having trouble. I'm trying to find that $a^{k+1} - b^{k+1}$ is less than or equal to an expression involving $a^k - b^k$, so that I can use the expression for P(k) to derive an inequality for $a^{k+1} - b^{k+1}$. I've tried several ways, like trying to rewrite $a^{k+1} - b^{k+1}$ as $aa^k - bb^{k}$ and then writing that $aa^k - bb^k \geq aa^k - ab^k = a(a^k - b^k)$ (since a > b), but this doesn't help, because I'm looking for something that $a^{k+1} - b^{k+1}$ is less than or equal to, not greater than or equal to. 2. Dec 22, 2011 ### Dansuer EDIT: nevermind. i though i had it but i did not Last edited: Dec 22, 2011 3. Dec 22, 2011 ### Deveno if b < a, then a = b + c for some positive number c. $$(b+c)^n - b^n \leq n(b+c)^{n-1}c$$ now expand the powers of b+c with the binomial formula. 4. Dec 22, 2011 ### SammyS Staff Emeritus It can be instructive to see how the inequality works for the first few values of n. This isn't good enough for a proof, but it may give you some ideas for the proof. For n=2: $\displaystyle a^2-b^2\ \ ?\,\leq\,? \ \ 2a^1(a-b)$ Factor the left side. $\displaystyle (a-b)(a+b)\ \ ?\,\leq\,? \ \ 2a(a-b)$ Of course, (a+b) < 2a because a < b .
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692311915195, "lm_q1q2_score": 0.8485563862216201, "lm_q2_score": 0.8688267830311354, "openwebmath_perplexity": 473.8872596781109, "openwebmath_score": 0.8195372819900513, "tags": null, "url": "https://www.physicsforums.com/threads/mathematical-induction-question.562103/" }
$\displaystyle (a-b)(a+b)\ \ ?\,\leq\,? \ \ 2a(a-b)$ Of course, (a+b) < 2a because a < b . So, this case doesn't appear to need induction.​ For n=3: We have a somewhat similar result with the difference of cubes giving a3-b3 = (a-b)(a2+ab+b2). Then the inequality holds if a2+ab+b2 ≤ 3a2, and this is true for a < b. Again, this doesn't require induction.​ For general n: Did you know that $\displaystyle a^n-b^n=(a-b)(a^{n-1}+a^{n-2}b+a^{n-3}b^{2}+\dots+a^{((n-1)-k)}\,b^{k}+\dots +a^{2}b^{n+3}+a\,b^{n-2}+b^{n-1})\,?$ Each of the n terms in the last factor is less than or equal to an-1. For instance: $\displaystyle a^{12}-b^{12}=(a-b)(a^{11}+a^{10}b+a^{9}b^{2}+\dots+a^{5}\,b^{6}+ \dots +a^{2}b^{9}+a\,b^{10}+b^{11})$​ 5. Dec 23, 2011 ### Curious3141 Building on Sammy's post, you might find it easier to put x = b/a, where 0<x<1 Use polynomial long division to see that for positive integral n, $$(1-x^n) = (1-x)(1+x+x^2+...x^{n-1})$$ Alternatively you can just multiply the terms on the RHS, cancel out lots of adjacent terms and end up with the LHS. This is one of the polynomial identities which it's really good to know. Now, $$1+x+x^2+...x^{n-1}$$ has n terms, each of which is less than or equal to 1. Hence the whole sum is less than or equal to n. So, $$a^n - b^n = a^n(1 - x^n) = a^n(1-x)(1+x+x^2+...+x^{n-1}) = a(1-x).a^{n-1}.(1+x+x^2+...+x^{n-1}) = (a-b).a^{n-1}.(1+x+x^2+...+x^{n-1}) \leq (a-b).n.a^{n-1}$$ and you're done. Last edited: Dec 23, 2011 6. Dec 28, 2011 ### pc2-brazil Very interesting idea. I knew that result for an - bn, but I didn't think of using it. This leads directly to the desired result, not requiring induction.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692311915195, "lm_q1q2_score": 0.8485563862216201, "lm_q2_score": 0.8688267830311354, "openwebmath_perplexity": 473.8872596781109, "openwebmath_score": 0.8195372819900513, "tags": null, "url": "https://www.physicsforums.com/threads/mathematical-induction-question.562103/" }
# Notation for summation while skipping elements Suppose I have a summation like so: $\sum_{i =0}^n l^i$ Except I don't want to compute for all $0 \leq i \leq n$. I just want to compute it for the arithmetic sequence: $1, 3, 5, 7, 9...$ How do I write this in the summation notation? Use $2i+1$ instead of $i$ in the expression to be summed.$$\sum_{i=0}^k l^{2i+1}$$ Where $2k+1=n$ • It depends on the context. $$\sum_{\text{i odd}}l^i$$ is used in some places. $$\sum_{i \in A}l^i \quad (A = \{1, 3, 5, \ldots \})$$ is also used. The important thing is to be clear. Often this is most easily achieved using words rather than flooding your mathematics with esoteric notation. Apr 13, 2015 at 15:30 Like this: $$\sum^n_{i=0}_\text{i is odd} \text{or just} \sum^n_{i=0}_\text{odd}$$ And in general you'd just replace "i is odd" with whatever criteria you have. Or you could mention it outside the sum. As in, immediately after the sum write "where $i$ is odd" or "where $i \in \{x \in \Bbb N\ |\ x = 2k \wedge k \in \Bbb N\}$".
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692339078752, "lm_q1q2_score": 0.8485563802885798, "lm_q2_score": 0.8688267745399466, "openwebmath_perplexity": 515.716270835032, "openwebmath_score": 0.9773932695388794, "tags": null, "url": "https://math.stackexchange.com/questions/954733/notation-for-summation-while-skipping-elements" }
# Matrix representation of function composition Am I on the right path here? 1. Homework Statement i. Prove that ##T_{a}## and ##T_{b}## are linear transformations. ii. Compose the two linear transformations and show the matrix that represents that composition. 2. The attempt at a solution i. Prove that ##T_{a}## and ##T_{b}## are linear transformations. i. ##T_{a} \begin{bmatrix}x \\ y\end{bmatrix} = \begin{bmatrix}-x \\ x+y\end{bmatrix}## ##x =\begin{bmatrix}-1\\1\end{bmatrix}+y\begin{bmatrix}0\\1 \end{bmatrix}## ##\begin{bmatrix}-1 & 0 \\ 1 & 1 \end{bmatrix}\begin{bmatrix}x \\ y \end{bmatrix}## ##T_{a}## = Linear transformation. ##T_{b} \begin{bmatrix}x \\ y \end{bmatrix} = \begin{bmatrix}x+y \\ x -y \end{bmatrix}## ##x \begin{bmatrix}1\\1 \end{bmatrix} + y \begin{bmatrix}1\\-1 \end{bmatrix} = \begin{bmatrix}1 & 1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix}x\\y \end{bmatrix}## ##T_{b}## = Linear transformation. ii. Compose the two linear transformations and show the matrix that represents that composition. ##T_{a} {\circ} T_{b} = \left[T_{a}\right]\left[T_{e}\right] = \begin{bmatrix}-1 & 0 \\ 1 & 1 \end{bmatrix} \begin{bmatrix}1 & 1 \\ 1 & -1 \end{bmatrix}## ##= \begin{bmatrix}-1 & -1 \\ 2 & 0 \end{bmatrix}## andrewkirk Homework Helper Gold Member That looks correct. However, from the way the question is written, they expect you to not just produce the matrix but also state the the transformation in the same form as that in which the original two were given, ie this form $$T_{a} \begin{bmatrix}x \\ y\end{bmatrix} = \begin{bmatrix}-x \\ x+y\end{bmatrix}$$ Sociomath That looks correct. However, from the way the question is written, they expect you to not just produce the matrix but also state the the transformation in the same form as that in which the original two were given, ie this form $$T_{a} \begin{bmatrix}x \\ y\end{bmatrix} = \begin{bmatrix}-x \\ x+y\end{bmatrix}$$
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692264378963, "lm_q1q2_score": 0.848556370481229, "lm_q2_score": 0.868826771143471, "openwebmath_perplexity": 1205.2473905911895, "openwebmath_score": 1.0000094175338745, "tags": null, "url": "https://www.physicsforums.com/threads/matrix-representation-of-function-composition.871089/" }
##\left[T_{a}\right]\left[T_{b}\right] = \begin{bmatrix}-1 & -1 \\ 2 & 0 \end{bmatrix} \begin{bmatrix} x\\y \end{bmatrix} = \begin{bmatrix}-x -y\\ 2x \end{bmatrix}## andrewkirk $$(T_a\circ T_b)\begin{bmatrix} x\\y \end{bmatrix} = \begin{bmatrix}-x -y\\ 2x \end{bmatrix}$$
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692264378963, "lm_q1q2_score": 0.848556370481229, "lm_q2_score": 0.868826771143471, "openwebmath_perplexity": 1205.2473905911895, "openwebmath_score": 1.0000094175338745, "tags": null, "url": "https://www.physicsforums.com/threads/matrix-representation-of-function-composition.871089/" }
# Finding the upper and lower limit of the following sequence. $\{s_n\}$ is defined by $$s_1 = 0; s_{2m}=\frac{s_{2m-1}}{2}; s_{2m+1}= {1\over 2} + s_{2m}$$ The following is what I tried to do. The sequence is $$\{0,0,\frac{1}{2},\frac{1}{4},\frac{3}{4},\frac{3}{8},\frac{7}{8},\frac{7}{16},\cdots \}$$ So the even terms $\{E_i\} = 1 - 2^{-i}$ and the odd terms $\{O_k\} = \frac{1}{2} - 2^{-k}$ and each of them has a limit of $1$ and $\frac{1}{2}$, respectively. So, the upper limit is $1$ and the lower limit is $1\over 2$, am I right ? Does this also mean that $\{s_n\}$ has no limits ? Is my denotation $$\lim_{n \to \infty} \sup(s_n)=1 ,\lim_{n \to \infty} \inf(s_n)={1 \over 2}$$ correct ? • Looks right to me! – Peter Košinár May 31 '13 at 23:26 • Answers to your questions in order: yes, yes and yes. (but it is "notation", not "denotation") – DonAntonio May 31 '13 at 23:39 ## 1 Answer Shouldn't it be $E_i = \frac{1}{2} - 2^{-i}$ and $O_i = 1 - 2^{1-i}$? That way $E_i = 0, \frac{1}{4}, \frac{3}{8}...$ and $E_i = 0, \frac{1}{2}, \frac{3}{4}...$, which seems to be what you want. Your conclusion looks fine, but you might want to derive the even and odd terms more rigorously. For example, the even terms $E_i$ are defined recursively by $E_{i+1} = s_{2i+2} = \frac{s_{2i+1}}{2} = \frac{E_1 + \frac{1}{2}}{2}$, and $\frac{1}{2} - 2^{-i}$ also satisfies this recursion relation. $E_1 = 0$, and $\frac{1}{2} - 2^{-1} = 0$, hence they have the same first term. By induction the two sequences are the same. If we partition a sequence into a finite number of subsequences then the upper and lower limit of the sequence are equal to the maximum upper limit and minimum lower limit of the subsequences; in this case you're partitioning into even and odd terms. $\{s_n\}$ has a limit iff the upper and lower limits are the same (this is proved in most analysis books), so in this case $\{s_n\}$ has no limits.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692257588072, "lm_q1q2_score": 0.8485563615981346, "lm_q2_score": 0.8688267626522814, "openwebmath_perplexity": 182.9959125188135, "openwebmath_score": 0.9532849788665771, "tags": null, "url": "https://math.stackexchange.com/questions/408095/finding-the-upper-and-lower-limit-of-the-following-sequence" }
• Thank you. Unfortunately my book (Rudin) says "it's obvious that $\{s_n\}$ has a limit iff the upper and lower limits are the same" so it never stuck to me. – hyg17 Jun 1 '13 at 0:50
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692257588072, "lm_q1q2_score": 0.8485563615981346, "lm_q2_score": 0.8688267626522814, "openwebmath_perplexity": 182.9959125188135, "openwebmath_score": 0.9532849788665771, "tags": null, "url": "https://math.stackexchange.com/questions/408095/finding-the-upper-and-lower-limit-of-the-following-sequence" }
# How to typeset and evaluate $u \big|_a^b$ Sometimes I need to evaluate an expression at the end points. e.g. the right hand side of $\int_a^bf(x)\textrm{d}x=F(x)\big|_a^b$. $F(x)$ could be complicated so I can't just substitute the values by hand. I currently do it this way: (m[a]-m[b] /. m[x_] -> u) But this introduces a new variable m and doesn't look very elegant. I'm looking for a built-in notation and/or a function for this purpose. • How about defining a function r[u_, a_, b_] := u[b] - u[a] and applying it to replace rule u[x] /. u[x] -> r[u, a, b]. It will yield: -u[a] + u[b] or for different function u[x] /. u[x] -> r[F, a, b] it will yield -F[a] + F[b] – Wojciech Artichowicz Dec 3 '15 at 11:18 • @WojciechArtichowicz: Actually I don't have FUNCTION F[x], it's just an EXPRESSION u. I would want some function like diff[u,{x,a,b}] more. – Shou Ya Dec 3 '15 at 11:47 • Could you provide an actual simple example of such expression? – Wojciech Artichowicz Dec 3 '15 at 11:52 • First@Differences[expr /. {{x->a}, {x->b}}]? Or (expr /. x->b) - (expr /. x->a}? – Michael E2 Dec 3 '15 at 12:08 diff = Function[{expr}, Subtract @@ (expr /. {{#1 -> #3}, {#1 -> #2}})] & longComplexExpr[x] // diff[x, 1, 3] (* - longComplexExpr[1] + longComplexExpr[3] *) So for integrals: Integrate[x^2, x] // diff[x, 1, 3] (* 26/3 *) Integrate[x^2, {x, 1, 3}] (* 26/3 *) I've had a play to try and get a slightly more stylistic solution by creating a new template for the form you want and then assigning it an InputAlias, following closely the work here. The code below will allow you to access the template by simply typing escbarEvalesc. It will then evaluate the function at the limits and take the difference, as defined in the BarEvaluate function: Some limitations are:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9407897509188344, "lm_q1q2_score": 0.848517720560089, "lm_q2_score": 0.9019206679615432, "openwebmath_perplexity": 9318.807736510767, "openwebmath_score": 0.30846792459487915, "tags": null, "url": "https://mathematica.stackexchange.com/questions/101070/how-to-typeset-and-evaluate-u-big-ab" }
Some limitations are: 1. I've been a little hacky in trying to get a longer vertical bar, maybe someone can come up with a better way of producing it? (On my system I can get a proper LaTex one through the MaTeX package). 2. You might need to adapt it for cases when your function F takes more than just the single parameter. Code: SetAttributes[BarEvaluate, HoldAll] BarEvaluate[f_, limits_] := f[limits[[1]]] - f[limits[[2]]] BarEvaluate /: MakeBoxes[BarEvaluate[f_, {a_, b_}], TraditionalForm] := TemplateBox[{ToBoxes[f], ToBoxes[a], ToBoxes[b]}, "conditionalProduct", DisplayFunction :> (RowBox[{#, SubsuperscriptBox[ StyleBox["\[VerticalSeparator]", "Subsubtitle"], InterpretationFunction :> (RowBox[{"BarEvaluate", "[", RowBox[{#, ",", "{", #2, ",", #3, "}"}], "]"}] &)] aliases = Options[EvaluationNotebook[], InputAliases]; newAliases = Join[InputAliases /. aliases, {"barEval" -> TemplateBox[{"\[SelectionPlaceholder]", "\[Placeholder]", "\[Placeholder]"}, "barEvaluate", DisplayFunction :> (RowBox[{#, SubsuperscriptBox[ StyleBox["\[VerticalSeparator]", "Subsubtitle"], InterpretationFunction :> (RowBox[{"BarEvaluate", "[", RowBox[{#, ",", "{", #2, ",", #3, "}"}], "]"}] &)]}]; SetOptions[EvaluationNotebook[], InputAliases -> newAliases]; • Very useful answer for much broader cases than here. I wish I knew how to search for stuff like that without knowing the keyword InputAliases +1 ofc – LLlAMnYP Dec 3 '15 at 14:44 Here is another version that should typeset and evaluate the way you want. The first step is to use a symbol that supports vertical spanning, and looks like a bar. There are several such symbols, |, \[VerticalSeparator], \[VerticalLine], \[VerticalLine], \[RightBracketingBar] and perhaps some others. I think \[VerticalLine] works best, so I will use that symbol. Next, one needs to restrict the spanning, so that only the selected portion influences the spanning. So, the basic plan is to use the boxes:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9407897509188344, "lm_q1q2_score": 0.848517720560089, "lm_q2_score": 0.9019206679615432, "openwebmath_perplexity": 9318.807736510767, "openwebmath_score": 0.30846792459487915, "tags": null, "url": "https://mathematica.stackexchange.com/questions/101070/how-to-typeset-and-evaluate-u-big-ab" }
RawBoxes @ SubsuperscriptBox[ RowBox[{"\[SelectionPlaceholder]", "\[VerticalLine]"}], "\[Placeholder]", "\[Placeholder]" ] An example: RawBoxes @ SubsuperscriptBox[ RowBox[{FractionBox[SuperscriptBox["x","2"],"3"],"\[VerticalLine]"}], "1", "2" ] By including the bar inside of a SubsuperscriptBox, the spanning will only consider whatever is placed inside \[SelectionPlaceholder]. For example: RawBoxes @ RowBox[{ FractionBox[SuperscriptBox["x","3"],"4"], "+", SubsuperscriptBox[RowBox[{"x","\[VerticalLine]"}],"1","2"] }] You will notice that the min size of the bar and the spacing is a bit off, so the following version should look better (I also turned off the SpanSymmetric option): CellPrint @ Cell[ BoxData @ SubsuperscriptBox[ RowBox[{ FractionBox[SuperscriptBox["x","2"],"3"], StyleBox["\[VerticalLine]", SpanSymmetric->False, SpanMinSize->1.5 ] }], RowBox[{"\[MediumSpace]", "1"}], RowBox[{"\[MediumSpace]", "2"}] ], "Input" ] This produces a box structure that should look the way you want. Now, to make it evaluatable, let's define an EvaluatedAt function: EvaluatedAt[expr_, Automatic, min_, max_] := EvaluatedAt[ expr, Replace[ReduceFreeVariables[expr], {{v_,___}->v, _->None}], min, max ] EvaluatedAt[expr_, x_, min_, max_] := (expr /. x->max) - (expr /. x->min) A couple examples: EvaluatedAt[1/x^2, x, 1, 2] EvaluatedAt[1/x, Automatic, 1, 2] -3/4 -1/2 In the second example with Automatic, EvaluatedAt looks for the first free variable in expr and then does the desired arithmetic. Now, we are ready to create an input alias that both typesets as desired, and evaluates as desired: CurrentValue[EvaluationNotebook[], {InputAliases,"at"}] = TemplateBox[ {"\[SelectionPlaceholder]", "Automatic", "\[Placeholder]", "\[Placeholder]"}, "EvaluatedAt", DisplayFunction->( SubsuperscriptBox[ RowBox[{ #1, StyleBox[ "\[VerticalLine]", SpanMinSize->1.5, SpanSymmetric->False ] }], RowBox[{"\[MediumSpace]", #3}], RowBox[{"\[MediumSpace]", #4}] ]& ) ];
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9407897509188344, "lm_q1q2_score": 0.848517720560089, "lm_q2_score": 0.9019206679615432, "openwebmath_perplexity": 9318.807736510767, "openwebmath_score": 0.30846792459487915, "tags": null, "url": "https://mathematica.stackexchange.com/questions/101070/how-to-typeset-and-evaluate-u-big-ab" }
And, here's another version where you specify the variable to be replaced: CurrentValue[EvaluationNotebook[], {InputAliases,"at2"}] = TemplateBox[ {"\[SelectionPlaceholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, "EvaluatedAt", DisplayFunction->( SubsuperscriptBox[ RowBox[{ #1, StyleBox[ "\[VerticalLine]", SpanMinSize->1.5, SpanSymmetric->False ] }], RowBox[{"\[MediumSpace]", #2, "=", #3}], RowBox[{"\[MediumSpace]", #4}] ]& ) ]; And here is an animation showing both in action: Finally, all the necessary code in one code block: EvaluatedAt[expr_, Automatic, min_, max_] := EvaluatedAt[ expr, Replace[ReduceFreeVariables[expr], {{v_,___}->v, _->None}], min, max ] EvaluatedAt[expr_, x_, min_, max_] := (expr /. x->max) - (expr /. x->min) CurrentValue[EvaluationNotebook[], {InputAliases,"at"}] = TemplateBox[ {"\[SelectionPlaceholder]", "Automatic", "\[Placeholder]", "\[Placeholder]"}, "EvaluatedAt", DisplayFunction->( SubsuperscriptBox[ RowBox[{ #1, StyleBox[ "\[VerticalLine]", SpanMinSize->1.5, SpanSymmetric->False ] }], RowBox[{"\[MediumSpace]", #3}], RowBox[{"\[MediumSpace]", #4}] ]& ) ]; CurrentValue[EvaluationNotebook[], {InputAliases,"at2"}] = TemplateBox[ {"\[SelectionPlaceholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, "EvaluatedAt", DisplayFunction->( SubsuperscriptBox[ RowBox[{ #1, StyleBox[ "\[VerticalLine]", SpanMinSize->1.5, SpanSymmetric->False ] }], RowBox[{"\[MediumSpace]", #2, "=", #3}], RowBox[{"\[MediumSpace]", #4}] ]& ) ]; diff = {x, a, b} \[Function] expr \[Function] #2 - # & @@ (Function @@ {x, expr}) /@ {a, b} The usage of diff is the same as that in LLlAMnYP's answer.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9407897509188344, "lm_q1q2_score": 0.848517720560089, "lm_q2_score": 0.9019206679615432, "openwebmath_perplexity": 9318.807736510767, "openwebmath_score": 0.30846792459487915, "tags": null, "url": "https://mathematica.stackexchange.com/questions/101070/how-to-typeset-and-evaluate-u-big-ab" }
Is there a largest open interval for an open set (not necessarily bounded)? If $$G$$ is an open subset of $$R$$, and if $$x\in G$$, show that there exists a largest open interval $$I_x$$ containing $$x$$ s.t $$I_x$$ is the subset of $$G$$. My idea: Let $$x\in (a_x,b_x)$$ where $$a_x=\inf\{a and $$b_x=\sup\{b>x|(x,b)\subset G \}$$. Let $$I_x=(a_x,b_x)$$. I want to show $$a_x$$, $$b_x$$ can not belong to G, hence $$I_x$$ is the largest interval. Assume $$a_x\in G$$, this contradicts the fact that $$a_x$$ was $$\inf$$. so $$a_x$$ is not in $$G$$. Likewise for $$b_x$$. I think if it was said that $$G$$ is bounded, I could confidently use the proof idea above. But it is NOT. So what if G is unbounded? Then I may not have finite $$a_x$$ and $$b_x$$. Or do I need to be worried about this at all? You could change your approach to defining $$a_x$$ and $$b_x$$ ever so slightly, to make your proof correct. • If the set $$\{a is bounded below, then let $$a_x$$ be the infimum of that set. Otherwise let $$a_x = -\infty$$. • If the set $$\{b>x \mid (x,b)\subset G \}$$ is bounded above, then let $$b_x$$ be the supremum of that set. Otherwise let $$b_x = +\infty$$. Now you should go through the remainder of your proof and check carefully for any changes that are required by having changed the definitions of $$a_x$$ and $$b_x$$. • Thank you very much. – BesMath Mar 14 at 16:39 • Not that I disagree with this solution, but just in order to not mislead the OP, in this case $a_x$ and $b_x$, when they are equal to $\infty$ or $-\infty$, are not real values anymore. Indeed they become just symbols helping to define the interval. – almaus Mar 14 at 16:39 Every open set in $$\mathbf{R}$$ can be written as a countable union of pairwise disjoint open intervals. So we get $$G=\bigcup_{i=1}^{\infty}I_i$$ Let $$x \in G \implies \exists! n\in\mathbf{N}$$ so that $$x\in I_n$$ Now you can check that this interval will be your maximal interval containing $$x$$ that's contained in $$G$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561676667173, "lm_q1q2_score": 0.8485116221382908, "lm_q2_score": 0.8757869851639066, "openwebmath_perplexity": 132.71256990049162, "openwebmath_score": 0.9172261953353882, "tags": null, "url": "https://math.stackexchange.com/questions/3580858/is-there-a-largest-open-interval-for-an-open-set-not-necessarily-bounded" }
• You are using a bazooka theorem here... harder to show that than the original problem. – almaus Mar 14 at 16:18 • @almaus I agree but it's good to see different ways to prove things – guy3141 Mar 14 at 16:19 You can just say that as $$G$$ is open, it means that there exists an open interval included in $$G$$ around each of its points, thus there exists at least $$a_0$$ and $$b_0$$ such that $$x \in (a_0, b_0) \subset G$$. And then you can consider the set of all the intervals in $$G$$ including $$x$$, and take the biggest. • That is exactly where I have a problem with. since G is open for each element x in G, there are point less and greater that x, so no sup or inf has a place of meaning here. so how to make the largest interval? I am really confused. – BesMath Mar 14 at 16:27 • You need not be afraid of infinites here, as $(b, \infty)$ or $(-\infty, a)$ are perfectly valid open intervals of $\mathbb{R}$. – almaus Mar 14 at 16:29 • So just make two cases (for each boundary): when there exists an upper (resp. lower) bound, and when there is not. In the case there is not, that just means that your upper (resp. lower) boundary is $\infty$ (resp $-\infty$). – almaus Mar 14 at 16:32 Your proof is fine when situated in the appropriate framework. Although it might not be accepted in the context of a class, I think the best way to handle this problem is to use the extended real line $$\bar{\mathbb R} = \mathbb R \cup \{-\infty,\infty\}$$ where we can order this set in the obvious way and define infimum and supremum from the order - and likewise, can define open intervals as usual, with the observation that $$(-\infty,x)$$ are honest intervals in this view that coincide with the usual definitions. The importance of this change is that every set has a supremum and infimum in the extended reals - so you do not need to worry about boundedness at all.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561676667173, "lm_q1q2_score": 0.8485116221382908, "lm_q2_score": 0.8757869851639066, "openwebmath_perplexity": 132.71256990049162, "openwebmath_score": 0.9172261953353882, "tags": null, "url": "https://math.stackexchange.com/questions/3580858/is-there-a-largest-open-interval-for-an-open-set-not-necessarily-bounded" }
Basically, with this change of context, you just say that you have some subset of $$\mathbb R$$ and let $$a_x$$ and $$b_x$$ be the infimum and supremum of that set in $$\bar{\mathbb R}$$, and then just finish your argument exactly as you did - except that you might, for completeness, observe that if $$a_x$$ and $$b_x$$ are real, they are not in the set for the reasons you observe, and if they are not, they are not in the set because the set is a subset of $$\mathbb R$$. One often finds that analysis questions such as this one are much clearer if you work with $$\pm \infty$$ within the domain of mathematics, rather than, as is common, saying that every expression involving $$\infty$$ is specially defined and requires casework - because often the extended reals unify the theory with no need for extra work.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561676667173, "lm_q1q2_score": 0.8485116221382908, "lm_q2_score": 0.8757869851639066, "openwebmath_perplexity": 132.71256990049162, "openwebmath_score": 0.9172261953353882, "tags": null, "url": "https://math.stackexchange.com/questions/3580858/is-there-a-largest-open-interval-for-an-open-set-not-necessarily-bounded" }
# highest product of the numbers that sum to $100$ what is the highest product of the numbers that sum to 100 for example $100 = 1+1+1+1+1+1+1+\ldots+1$ the product of these is just $1^{100} = 1$ $100 = 99 + 1$ the product of these is $99\times 1$ the numbers have to be positive integers do the numbers all have to be the same - for example I think it is $2^{50}$ • $3\cdot3$ by itself is "better" than $2\cdot2\cdot2$ because it yields $9$ instead of $8$, while both options "consume" $6$ out of the sum. So there's got to be something better than $2^{50}$. Oct 9, 2014 at 18:20 • $3^{33}\times 1>2^{50}$ Oct 9, 2014 at 18:21 • Best one I found is $3^{32}\cdot4$. Oct 9, 2014 at 18:24 • is there a method for this rather than just trial and error Oct 9, 2014 at 18:30 • @Hamou: to get multidigit exponents, put them in braces, so 2^{50} gives $2^{50}$ instead of $2^50$ This works lots of places in $\LaTeX$ Oct 9, 2014 at 19:17 The arithmetic-geometric-mean equation says that $\sum_{i=1}^{n}{\frac{a_i}{n}}\geq\sqrt[n]{\prod_{i=1}^n{a_i}}$. If you enter your condition on the left side and look at different values for $n$, you might find a solution. Edit: This method works well to guess a solution, which is that most of your numbers will be $3$, and by trying that we can find $3^{32}\cdot 2^2$. Now we can go about proving that this indeed the maximum: Assume that any $a_k$ of your numbers is greater than $4$. We could then substitute this number by $\frac{a_k}{2}+\frac{a_k}{2}$, which have a product larger than $a_k$, since $\frac{a_k}{2}^2\geq a_k \Leftrightarrow a_k\geq 4$. (If $a_k$ is odd, we can do the same thing with two numbers with difference $1$.) From this we can conclude that there can be no numbers greater than $3$ in your sum. Also, there can be no $1$s, for obvious reasons.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561685659695, "lm_q1q2_score": 0.8485116166437418, "lm_q2_score": 0.8757869786798664, "openwebmath_perplexity": 199.1670835288233, "openwebmath_score": 0.8595943450927734, "tags": null, "url": "https://math.stackexchange.com/questions/965550/highest-product-of-the-numbers-that-sum-to-100" }