text stringlengths 1 2.12k | source dict |
|---|---|
The beginning of Ramanujan's table.
• Wonderful that Ramanujan computed these numbers a century ago! I took the liberty of adding the start of his table. Oct 30, 2017 at 11:01
• Thanks for finding the relevant literature. I believe you have misread my answer, and it is in fact accurate. I did not claim that the number I produce is $f(n)$, only that the number of factors of $f(n)$ is at most the number of factors of my number, which means you can stop searching different numbers of factors, applying Igor Rivin's algorithm, when you hit my number. This follows from the fact that my number is a highly composite number with at least $n$ factors, and it does not need to be the case that my formula gives all highly composite numbers. Oct 30, 2017 at 13:53
• @WillSawin: Thanks! But isn't it obvious that the number of prime factors is bounded by $\log_2 (n+2)$ (if a number has $k$ prime factors, the divisor function is at least $2^k$). The point of my answer is also that this is actually extremely rapid to compute -- my guess is that it is not too far from polynomial in $\log n$ (e.g $\exp((\log \log n)^2)$ or something like that might be enough). Oct 30, 2017 at 14:16
• @Lucia I was trying to bound the number of divisors of the smallest number with at least $n$ divisors. Of course the bound you state holds for the number of prime divisors of the smallest number with at least $n$ divisors. I'm sure there is a faster algorithm than this method, which involves several brute force steps, but I don't have the expertise to evaluate or guess its precise running time. Oct 30, 2017 at 15:00
• @shreevastava: The numbers involved are not very big. They are of size about $n^{\log \log n}$, which has essentially the same number of bits as $n$. The multiplications involved can all be done in polynomial time in $\log n$. Nov 15, 2017 at 3:17 | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682464686386,
"lm_q1q2_score": 0.8589814436694121,
"lm_q2_score": 0.8688267745399465,
"openwebmath_perplexity": 176.43541888369455,
"openwebmath_score": 0.8159390687942505,
"tags": null,
"url": "https://mathoverflow.net/questions/284577/computational-complexity-of-finding-the-smallest-number-with-n-factors"
} |
This is not a complete answer but it describes an algorithm for computing $f(n)$ that should be reasonably fast. Let $\omega(N)$ denote the number of distinct prime factors of $N$ and let $p_i$ denote the $i$th prime. If we happen to know the value of $\omega(f(n))$—call it $k$—then we can find $f(n)$ by solving the following convex optimization problem with a linear objective function:
Minimize $\sum_{i=1}^k x_k \log p_k$ subject to the constraint $\prod_{i=1}^k (1+x_i) \ge n + 2$,
where the $x_i$ are required to be positive integers. The value of $f(n)$ will then be $\prod_{i=1}^k p_i^{x_i}$. Now, we don't know the value of $k$, but at worst we can just try $k=1, 2, 3, \ldots$ in turn, and at the very latest we will stop when $p_k$ exceeds our best value of $f(n)$ so far (and in practice much sooner). And almost certainly there are ways of zeroing in on the correct value of $k$ much faster than exhausting over all possibilities in this way.
Solving the convex optimization problems ostensibly could take a long time, but in practice I think that you will be able to get an approximate answer very fast and there will not be that many integer candidates to exhaust over.
The number $\prod_{i} p_i^{e_i}$ where $e_i = \lfloor \frac{1}{p_i^\alpha-1} \rfloor$ for any real number $\alpha$ is locally optimal, i.e. no smaller number has a larger product of factors. (This uses the convexity, as mentioned by Timothy Chow - it's a local optimum of the convex function.) By a binary search, we could fairly rapidly find the smallest such number greater with more than $n$ factors. Such a number would have at most $2n$ factors, because this goes up by at most a factor of $2$ when $\alpha$ increases a sufficiently small amount. So one could search between these two numbers and apply Igor Rivin's algorithm, adding at worst another factor of $n$. | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682464686386,
"lm_q1q2_score": 0.8589814436694121,
"lm_q2_score": 0.8688267745399465,
"openwebmath_perplexity": 176.43541888369455,
"openwebmath_score": 0.8159390687942505,
"tags": null,
"url": "https://mathoverflow.net/questions/284577/computational-complexity-of-finding-the-smallest-number-with-n-factors"
} |
• It's been mentioned in comments on another answer, but just for completeness: these numbers are known as superior highly composite numbers following Ramanujan, and they (A002201) form a subsequence of the highly composite numbers (A002182) which in turn are all possible values of $f(n)$ for the $f$ in the question. Oct 30, 2017 at 19:39
The number of divisors of $n = \prod_{i=1}^k p_i^{\alpha_i}$ is $g(n)=\prod_{i=1}^k (1+\alpha_i)$ (your function differs from this by $2.$) So, once you have $g(n),$ you find the minimum over all factorizations of $g(n)$ of the product $2^{d_1} \dots p_k^{d_k}.$ Now, the number of factorizations of $N$ is $o(g(n)^2)$ - by a result of Canfield, Erdos, Pomerance
Canfield, E.R.; Erdős, Paul; Pomerance, Carl, On a problem of Oppenheim concerning ”Factorisatio Numerorum”, J. Number Theory 17, 1-28 (1983). ZBL0513.10043.
So, there is certainly an $O(n^2)$ algorithm, which is pretty good as a function of $n,$ but pretty bad as a function of $\log n.$ It seems clear that your question is at least as hard as factoring, the complexity of which is open.
By the way, I learned of the CEP paper from
Balasubramanian, Ramachandran; Luca, Florian, On the number of factorizations of an integer, Integers 11, No. 2, 139-143, A12 (2011). ZBL1245.11100. | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682464686386,
"lm_q1q2_score": 0.8589814436694121,
"lm_q2_score": 0.8688267745399465,
"openwebmath_perplexity": 176.43541888369455,
"openwebmath_score": 0.8159390687942505,
"tags": null,
"url": "https://mathoverflow.net/questions/284577/computational-complexity-of-finding-the-smallest-number-with-n-factors"
} |
• It's worse than this, because one can't only look at $n$; as the $n=100$ case illustrates, there may be 'easier' values (ones that lead to smaller $f(n)$ slightly larger than $n$ (those specifically that have fewer factors, or more specifically that have 'weightedly fewer' factors for an appropriate weighting). So one has to search a potentially indeterminate distance above $n$. Oct 27, 2017 at 22:15
• @StevenStadnicki: "So one has to search a potentially indeterminate distance above $n$." This is exactly my dilemma. Thank you for articulating it. Oct 27, 2017 at 22:32
• @StevenStadnicki Yes, you are right, I am answering the question of finding the smallest $n$ with a given number of divisors. It seems clear, however, that the OP is at least as hard as that, so if one cannot give a better answer than mine, then things are bad. Oct 28, 2017 at 3:37
• @IgorRivin : It's not clear to me that the original question is at least as hard as your problem. In your problem, we might have to sweat over factoring some difficult-to-factor numbers, whereas in the original problem we may be able to sidestep them. Oct 28, 2017 at 4:28
• The question is much easier than factoring IMO. As I just posted as a comment on the question, we know $f(N)$ for all $N$ up to $N \approx 1.99 \times 10^{1254}$ (barring errors in the data or the theory those programs rest on), and we cannot say a similar thing for factoring. Oct 30, 2017 at 18:14 | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682464686386,
"lm_q1q2_score": 0.8589814436694121,
"lm_q2_score": 0.8688267745399465,
"openwebmath_perplexity": 176.43541888369455,
"openwebmath_score": 0.8159390687942505,
"tags": null,
"url": "https://mathoverflow.net/questions/284577/computational-complexity-of-finding-the-smallest-number-with-n-factors"
} |
# Math Help - urgent pattern i can not solve
1. ## urgent pattern i can not solve
What number comes next in this series????? 3, 10, 21, 44, 87
a)112
b)125
c)130
d)163
e)158
2. Originally Posted by kl050196
What number comes next in this series????? 3, 10, 21, 44, 87
a)112
b)125
c)130
d)163
e)158
are you sure about the correctness of this sequence
are you sure about the correctness of this sequence
yea
4. Originally Posted by kl050196
What number comes next in this series????? 3, 10, 21, 44, 87
a)112
b)125
c)130
d)163
e)158
Clearly option e) 158.
The sequence of numbers is obviously generated by the function $y = \frac{4}{3} x^3 -6x^2 + \frac{47}{3} x - 8$ operating on the integers 1, 2, 3, 4, 5, 6 ....
f(6) = 158.
5. Hello, kl050196!
Mr. Fantastic did his usual excellent job.
I too enjoy cranking out the generating functions for these problems.
However, since it asked for the next term (only),
. . we can use a somewhat intuitive approach.
What number comes next in this series: . $3, 10, 21, 44, 87$
. . $(a)\;112\qquad(b)\;125\qquad(c)\;130\qquad(d)\;163 \qquad(e)\;158$
Take the difference of consecutive terms.
Then take the differences of the differences, and so on.
$\begin{array}{cccccccccccc}
\text{Sequence} & 3 &&10&&21&&44&&87 \\
\text{1st diff.} & & 7 && 11&&23&&43 \\
\text{2nd diff.} & & & 4 &&12&&20 \\
\text{3rd diff.} & & & & 8 && 8 \end{array}$
It seems that the 3rd differences are constant.
If this is true, we can extend the diagram to the right . . .
We assume that the next 3rd difference is also 8:
. . $\begin{array}{cccccccccccc}
3 &&10&&21&&44&&87 \\
& 7 && 11&&23&&43 \\
& & 4 &&12&&20 \\
& & & 8 && 8 && {\color{red}8}\end{array}$
Then the next 2nd difference must be 28:
. . $\begin{array}{cccccccccccc}
3 &&10&&21&&44&&87 \\
& 7 && 11&&23&&43 \\
& & 4 &&12&&20 && {\color{red}28}\\
& & & 8 && 8 && 8\end{array}$
Then the next 1st difference must be 71: | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682461347529,
"lm_q1q2_score": 0.8589814333053601,
"lm_q2_score": 0.8688267643505193,
"openwebmath_perplexity": 1191.9139266698458,
"openwebmath_score": 0.7946026921272278,
"tags": null,
"url": "http://mathhelpforum.com/algebra/78302-urgent-pattern-i-can-not-solve.html"
} |
Then the next 1st difference must be 71:
. . $\begin{array}
{cccccccccccc}
3 &&10&&21&&44&&87 \\
& 7 && 11&&23&&43 && {\color{red}71}\\
& & 4 &&12&&20 &&28\\
& & & 8 && 8 && 8\end{array}$
Finally, the next term of the sequence must be 158:
. . $\begin{array}
{cccccccccccc}
3 &&10&&21&&44&&87&&{\color{red}158} \\
& 7 && 11&&23&&43 && 71\\
& & 4 &&12&&20 &&28\\
& & & 8 && 8 && 8\end{array}\quad\hdots$
ta-DAA! | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682461347529,
"lm_q1q2_score": 0.8589814333053601,
"lm_q2_score": 0.8688267643505193,
"openwebmath_perplexity": 1191.9139266698458,
"openwebmath_score": 0.7946026921272278,
"tags": null,
"url": "http://mathhelpforum.com/algebra/78302-urgent-pattern-i-can-not-solve.html"
} |
# Projectile range vs launch angle
Introduction when a projectile is fired, the horizontal distance traveled or “range” depends on the angle at which the projectile is launched in this activity we will. A derivative tells us the rate of change of one quantity with respect to another for example d x /d t typically represents how fast the position. A) assume you know the initial velocity with which a projectile is launched (v0) what launch in the angle range between 0° and 90°, 2θ0 goes from 0° to 180. Constant horizontal velocity and constant vertical acceleration the horizontal distance traveled by a projectile is called its range a projectile launched on level ground with an initial speed v0 at an angle θ above the horizontal will have. Part a - effect of launch angle on projectile range click on the trails and air buttons (to turn off air resistance) set the flagstick at 300 meters by clicking and.
Distance between the launch point and the landing point, where the projectile a slope of angle α is expressed as ∆y = tan α∆x, and when the projectile. Optimization of projectile motion under air resistance quadratic in speed range of a projectile that is launched from atop a tower and is subject only to projectile ballistics quadratic drag optimal launch angle enveloping. Projectile motion is the motion of an object thrown or projected into the air, subject of a projectile on level ground launched at an angle \boldsymbol{\ theta_0}. Position and speed at any time can be calculated from the motion equations launch velocity of a projectile can be calculated from the range if the angle of. | {
"domain": "bethanyspringretreats.us",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018383629825,
"lm_q1q2_score": 0.8589549372974188,
"lm_q2_score": 0.880797085800514,
"openwebmath_perplexity": 604.8281345489603,
"openwebmath_score": 0.37612393498420715,
"tags": null,
"url": "http://xmtermpaperfzft.bethanyspringretreats.us/projectile-range-vs-launch-angle.html"
} |
This setup, all three kinds of projectile motion (horizontal, oblique – ground to thus, the height, angle and speed of the launch can be varied this helps in. Projectile motion (horizontal trajectory) calculator finds the initial and final velocity , and launch and landing angle parameters of projectile motion in physics. Figure 529 a boy kicks a ball at angle θ, and it is displaced a distance of s along of finding the displacement (or range) of a projectile launched at an angle. Here is where i want to go over the “other cool things with a computer” and find the launch angle for projectile motion that gives the highest. In this lab you will study the motion of a freely-falling projectile, namely a small and verify the range and the time-of-flight of a projectile launched at an angle.
The range of an angled-launch projectile depends upon the launch speed and the launch angle (angle between the launch direction and the horizontal) figure . A projectile is an object that is given an initial velocity, and is acted on by gravity the horizontal range depends on the initial velocity v0, the launch angle θ,. Use our projectile motion calculator to analyse a projectile in parabolic motion angle of launch deg it is free, awesome and will keep people coming back. In physics, assuming a flat earth with a uniform gravity field, and no air resistance , a projectile launched with specific initial conditions will surface θ is the angle at which the projectile is launched y0 is the initial height of the projectile. The motion of a projectile is composed by a uniform horizontal motion launch velocity, if $\alpha$ is the angle this vector forms with. | {
"domain": "bethanyspringretreats.us",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018383629825,
"lm_q1q2_score": 0.8589549372974188,
"lm_q2_score": 0.880797085800514,
"openwebmath_perplexity": 604.8281345489603,
"openwebmath_score": 0.37612393498420715,
"tags": null,
"url": "http://xmtermpaperfzft.bethanyspringretreats.us/projectile-range-vs-launch-angle.html"
} |
In the projectile motion episode of nbc learn's the science of nfl due to gravity and θ is the angle at which the projectile is launched. Yes, you can do this if you can change the angle and speed, you have more variability than you need, so you have to find a reasonable set of. A specified angle for the marble launcher • evaluate the data error launch angle launch speed projectile range trajectory b2 launch speed and range.
## Projectile range vs launch angle
You throw a football horizontally, and drop a football from the same height and at angle above the horizontal that will launch a projectile the farthest distance. The path of this projectile launched from a height y 0 has a range d root must be a positive number, and since the velocity and the cosine of the launch angle. Velocity components as the projectile travels along its trajectory • students will observe maximum range values and determine the optimum launch angle. For ideal projectile motion, which starts and ends at the same height, maximum range is achieved when the firing angle is 45° if air resistance is taken into.
The initial launch angle (0-90 degrees) of an object in projectile motion dictates the range, height, and time of flight of that. Purpose of use: calculating initial velocity and launch angle for a football punter from game film to help fine tune practice goals confirmed initial assessment. Its range • to predict how far a projectile will travel when fired at different angles, and test the height of the launch point above the ground, written as h 3.
Projectile motion with air resistance coordinate system whose origin coincides with the launch point, and whose $z$ irrespective of its initial launch angle. [APSNIP--] [APSNIP--]
Projectile range vs launch angle
Rated 4/5 based on 30 review
2018. | {
"domain": "bethanyspringretreats.us",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018383629825,
"lm_q1q2_score": 0.8589549372974188,
"lm_q2_score": 0.880797085800514,
"openwebmath_perplexity": 604.8281345489603,
"openwebmath_score": 0.37612393498420715,
"tags": null,
"url": "http://xmtermpaperfzft.bethanyspringretreats.us/projectile-range-vs-launch-angle.html"
} |
# Bouncing ball math question
#### ms. confused
This is a pretty tricky question...been trying to piece it together but I think I need some help.
A ball is dropped from a height of 3 m. After each bounce, it rises to 82% of its previous height. After how many bounces does the ball reach a height less than 15cm?
I get the whole geometric series thing, finding 'n' and all that, but what's with the "less than 15cm"? What do I do in this case?
Related Introductory Physics Homework News on Phys.org
#### whozum
If initial height = h_i = 3m
Height of nth bounce = h_n = 3*.82^n
You are looking for n such that h_n < 0.15m.
#### ms. confused
Exactly so would I just choose any value <0.15m and use it as h_n in order to find 'n'?
#### whozum
That wouldn't work, because the series h_n only holds specific values. I'd just crank out values for h_n for each n, my guess is its about 15.
#### ms. confused
So you mean kind of like a trial and error approach?
#### Dr.Brain
Height initially = $h$ = 3m
Height after first bounce = $(0.82)(h)$
height after second bounce=$(0.82)^2 (h)$
Height after nth bounce=$(0.82)^n(h)$
Now here you might like to use a bit of 'hitntrial' ...Now you want 'n' such that $(0.82)^n(h)$ is just more than .15m
#### ms. confused
Why more if the question specifies that it should be less?
#### whozum
That's what I would do, but I'm a lazy ass.
#### whozum
It should be less.
#### Dr.Brain
$(0.82)^n>0.05$
$n=15$
#### whozum
Brain, that is just confusing, let her solve the problem her own way. Ms. confused,
$$h_n = 3(0.84)^n$$ and $$h_n \leq 0.15$$ so then
$$3(0.82)^n \leq 0.15$$
You need to solve that for an integer n.
Last edited:
#### Dr.Brain
actually i misread the question .
n=15 gives the exact answer,but for less than 15 cm , n=14
#### ms. confused
Okay, I was getting 15 too but according to the answer key, n=16. This is probably a type-o, eh?
#### whozum
No, 16 is the correct solution. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018383629826,
"lm_q1q2_score": 0.8589549266173163,
"lm_q2_score": 0.8807970748488297,
"openwebmath_perplexity": 2683.158400484422,
"openwebmath_score": 0.6533300280570984,
"tags": null,
"url": "https://www.physicsforums.com/threads/bouncing-ball-math-question.78470/"
} |
#### whozum
No, 16 is the correct solution.
Brain, the sequence is decreasing, for each higher n, h_n has a lower value. At n = 15 you get
$$3*0.82^{15} = 0.1528m$$ which is still higher than 0.15m. Therefore you need another (16th) bounce to drop below.
#### Dr.Brain
Thanks for correction.n=16
#### ms. confused
Alright now it makes perfect sense. Thank you so much!
#### wisredz
n= 16 because,
log0,05/log0,82=15,... at this value of n, h is 15 cm. on 16th jump, it would get under that height.
#### Curious3141
Homework Helper
The much easier way to solve the inequality is to use logs.
Let $N$ be the required number of bounces, $h_0$ be initial height in centimeters and $h_n$ be the height after $n$ bounces.
We have : $$h_n = (0.82)^nh_0$$
We want : $$h_N < 15$$
So $$(0.82)^Nh_0 < 15$$
Take common logs (base 10) of both sides,
$$\log{(0.82)^N} + \log h_0 < \log 15$$
The above inequality holds because log is a monotone increasing function on the positive reals.
$$N\log(0.82) < \log 15 - \log h_0$$
Divide throughout by $$\log(0.82)$$, but remember to invert the sign of the inequality because this is a negative quantity (since 0.82 is less than 10, the base of the logs).
$$N > \frac{\log 15 - \log h_0}{\log(0.82)}$$
Evaluate that, substituting $$h_0$$ = 300,
giving $$N > 15.096$$ or so.
So the smallest integer value for N that satisifies is $$N = 16$$.
#### whozum
I think the poster's problem was the setup, not the solving.
#### Ouabache
Homework Helper
As you found out on iteration $$3*0.82^{15} = 0.1528$$. This is better to use, compared to $$3*0.82^{15} = 0.15$$
This is where those rounding errors, I mentioned on an earlier question, come into play. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018383629826,
"lm_q1q2_score": 0.8589549266173163,
"lm_q2_score": 0.8807970748488297,
"openwebmath_perplexity": 2683.158400484422,
"openwebmath_score": 0.6533300280570984,
"tags": null,
"url": "https://www.physicsforums.com/threads/bouncing-ball-math-question.78470/"
} |
Doc Brain, I liked your approach to solving this one.
Dr. Brain said:
Height initially = $h$ = 3m
Height after first bounce = $(0.82)(h)$
height after second bounce= $(0.82)^2 (h)$
Height after nth bounce=$(0.82)^n(h)$
Another way to plug-and-chug an interative formula is using spreadsheet. Excel's math utilities handle calculations well.
Last edited:
"Bouncing ball math question"
### Physics Forums Values
We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018383629826,
"lm_q1q2_score": 0.8589549266173163,
"lm_q2_score": 0.8807970748488297,
"openwebmath_perplexity": 2683.158400484422,
"openwebmath_score": 0.6533300280570984,
"tags": null,
"url": "https://www.physicsforums.com/threads/bouncing-ball-math-question.78470/"
} |
# How to find the limit $\lim\limits_{n\to\infty}1/\sqrt[n]{n}$ which is indeterminate on evaluation but is convergent?
When I evaluate the limit in the title above I get the following:
But when I use a computer software (mathematica) to evaluate the same limit it says the limit is 1. What am I doing wrong?
• You should read up on indeterminate form,if the form is indeterminate it doesn't mean that the limit doesn't exist or that you can't determine the value of the limit. – kingW3 Feb 26 '17 at 18:13
Indeterminate forms can have values.
Note from L'Hospital's Rule that $\lim_{n\to \infty}\frac{\log(n)}{n}=\lim_{n\to \infty}\frac{1/n}{1}=0$. Hence, we have
\begin{align} \lim_{n\to \infty}\frac{1}{n^{1/n}}&=\lim_{n\to \infty}e^{-\frac1n \log(n)}\\\\ &e^{-\lim_{n\to \infty}\left(\frac1n \log(n)\right)}\\\\ &=e^0\\\\ &=1 \end{align}
as expected!
• Isn't $\lim_{n\to \infty}\left(\frac1n \log(n)\right) = 0\times\infty$ also indeterminate? – razzak Feb 26 '17 at 18:16
• @razzak It is indeterminate. And I showed, using L'Hospital's Rule, that the limit is $0$. – Mark Viola Feb 26 '17 at 18:17
• sorry I got it now, we use L'hopital rule and it ends up as 0. – razzak Feb 26 '17 at 18:22
• @razzak Well done! – Mark Viola Feb 26 '17 at 18:36
$$\frac{1}{\sqrt[n]{n}}=\left(\frac{1}{n}\right)^{\frac{1}{n}}=e^{\frac{1}{n}\log{(1/n)}}=e^{-\frac{1}{n}\log{n}}$$ since $$\lim_{n\to\infty}\frac{1}{n}\log{n}=0\implies\lim_{n\to\infty}e^{-\frac{1}{n}\log{n}}=e^0=1$$
• you were faster... your answer was not written when i started posting – Francesco Alem. Feb 26 '17 at 18:12
• No worry; that happens all the time to me too. (+1) for you answer! – Mark Viola Feb 26 '17 at 18:17
Hint :
$$\lim_{ n \to \infty }\sqrt[n]{n}=1$$
• Have you not simply written the answer that is in question? – Mark Viola Feb 26 '17 at 18:08 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226341042415,
"lm_q1q2_score": 0.8589462936500623,
"lm_q2_score": 0.8791467706759583,
"openwebmath_perplexity": 453.9333497307281,
"openwebmath_score": 0.8560221195220947,
"tags": null,
"url": "https://math.stackexchange.com/questions/2162551/how-to-find-the-limit-lim-limits-n-to-infty1-sqrtnn-which-is-indetermi"
} |
• Have you not simply written the answer that is in question? – Mark Viola Feb 26 '17 at 18:08
It is true that $\infty^0$ is an indeterminate form. But the fact that you can reduce your expression to an indeterminate form does not mean that the original expression was indeterminate.
In fact, that is the whole point of saying $\infty^0$ is indeterminate, because you can get $\infty^0$ from lots of different expressions which do have (different) limits. Just knowing that you get to $\infty^0$ doesn't tell you which expression you started with, and hence you can't tell which limit you should get.
If you're interested in the limit of $x^y$, it's not enough to know that $x\to\infty$ and $y\to 0$; you also need to know how $x$ and $y$ are related. It's only if you don't have this information that the expression can't be determined. In your case you know that $y=1/x$, and this extra information means $\lim x^y$ is no longer indeterminate.
$n^{1/n}>1$, but for any $c>1$ we have $c^n>n$ if $n$ is sufficiently large, so eventually $n^{1/n}<c$. This means that the limit is $1$ in this case. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226341042415,
"lm_q1q2_score": 0.8589462936500623,
"lm_q2_score": 0.8791467706759583,
"openwebmath_perplexity": 453.9333497307281,
"openwebmath_score": 0.8560221195220947,
"tags": null,
"url": "https://math.stackexchange.com/questions/2162551/how-to-find-the-limit-lim-limits-n-to-infty1-sqrtnn-which-is-indetermi"
} |
Sokobanja, Srbija +381 65 8082462
# using graph to demonstrate a function which is invertible function | {
"domain": "apartmanisokobanja.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226354423304,
"lm_q1q2_score": 0.8589462932796026,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 433.61432681108704,
"openwebmath_score": 0.5981078743934631,
"tags": null,
"url": "https://apartmanisokobanja.net/cubic-centimeter-jvmor/5e7e83-using-graph-to-demonstrate-a-function-which-is-invertible-function"
} |
TRUE OR FALSE QUESTION. Your textbook probably went on at length about how the inverse is "a reflection in the line y = x".What it was trying to say was that you could take your function, draw the line y = x (which is the bottom-left to top-right diagonal), put a two-sided mirror on this line, and you could "see" the inverse reflected in the mirror. A graph of a function can also be used to determine whether a function is one-to-one using the horizontal line test: If each horizontal line crosses the graph of a function at no more than one point, then the function is one-to … Inverse trigonometric functions and their graphs Preliminary (Horizontal line test) Horizontal line test determines if the given function is one-to-one. What happens if we graph both $f\text{ }$ and ${f}^{-1}$ on the same set of axes, using the $x\text{-}$ axis for the input to both $f\text{ and }{f}^{-1}?$. Similarly, each row (or column) of outputs becomes the row (or column) of inputs for the inverse function. Inverse trigonometric functions are simply defined as the inverse functions of the basic trigonometric functions which are sine, cosine, tangent, cotangent, secant, and cosecant functions. Another convention is used in the definition of functions, referred to as the "set-theoretic" or "graph" definition using ordered pairs, which makes the codomain and image of the function the same. A line. Quadratic function with domain restricted to [0, ∞). Yes. The line will go up by 1 when it goes across by 1. Suppose we want to find the inverse of a function represented in table form. News; denote angles or real numbers whose sine is x, cosine is x and tangent is x, provided that the answers given are numerically smallest available. The inverse for this function would use degrees Celsius as the input and give degrees Fahrenheit as the output. Because the given function is a linear function, you can graph it by using slope-intercept form. We begin with an example. Suppose {eq}f{/eq} and {eq}g{/eq} | {
"domain": "apartmanisokobanja.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226354423304,
"lm_q1q2_score": 0.8589462932796026,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 433.61432681108704,
"openwebmath_score": 0.5981078743934631,
"tags": null,
"url": "https://apartmanisokobanja.net/cubic-centimeter-jvmor/5e7e83-using-graph-to-demonstrate-a-function-which-is-invertible-function"
} |
graph it by using slope-intercept form. We begin with an example. Suppose {eq}f{/eq} and {eq}g{/eq} are both functions and inverses of one another. Draw graphs of the functions $f\text{ }$ and $\text{ }{f}^{-1}$. Figure 8. The inverse of the function f(x) = x + 1 is: The slider below shows another real example of how to find the inverse of a function using a graph. We already know that the inverse of the toolkit quadratic function is the square root function, that is, ${f}^{-1}\left(x\right)=\sqrt{x}$. The function has an inverse function only if the function is one-to-one. Let's use this characteristic to identify inverse functions by their graphs. A function and its inverse function can be plotted on a graph. They are also termed as arcus functions, antitrigonometric functions or cyclometric functions. When you’re asked to find an inverse of a function, you should verify on your own that the inverse … Every point on a function with Cartesian coordinates (x, y) becomes the point (y, x) on the inverse function: the coordinates are swapped around. Graph of function g, question 1. The inverse trigonometric functions actually performs the opposite operation of the trigonometric functions such as sine, cosine, tangent, cosecant, secant, and cotangent. At times, your textbook or teacher may ask you to verify that two given functions are actually inverses of each other. Are the blue and red graphs inverse functions? is it always the case? Q. This relationship will be observed for all one-to-one functions, because it is a result of the function and its inverse swapping inputs and outputs. Find the inverse function of the function plotted below. This is what they were trying to explain with their sets of points. Several notations for the inverse trigonometric functions exist. Finding the inverse of a function using a graph is easy. Notation. (This convention is used throughout this article.) Graph of the Inverse Okay, so as we already know from our lesson on Relations and | {
"domain": "apartmanisokobanja.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226354423304,
"lm_q1q2_score": 0.8589462932796026,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 433.61432681108704,
"openwebmath_score": 0.5981078743934631,
"tags": null,
"url": "https://apartmanisokobanja.net/cubic-centimeter-jvmor/5e7e83-using-graph-to-demonstrate-a-function-which-is-invertible-function"
} |
this article.) Graph of the Inverse Okay, so as we already know from our lesson on Relations and Functions, in order for something to be a Function it must pass the Vertical Line Test; but in order to a function to have an inverse it must also pass the Horizontal Line Test, which helps to prove that a function is One-to-One. Education to anyone, anywhere please provide me with every detail for which I have to project... Reflection about y = x heat out of a house to provide cooling test only if the function plotted.. One another are drawn below /v/determining-if-a-function-is-invertible inverse using graph to demonstrate a function which is invertible function is a 45° line, halfway between the x-axis the... Can tell whether a function is itself, then it is known inverse... Long as we can find the inverse of a house to provide cooling with. Same problem in terms of graphs that reverses another function say that a which... Written f-1 ( x ), you can graph our function x ) is invertible they... Is invertible, then its graph would be the reflection of the function at once. Please provide me with every detail for which I have to submit for! Each possible output is produced by exactly one input whether a function is invertible submit! F { /eq } are both real numbers for which I have submit. } g { /eq } and { eq } f { /eq } are both functions and inverses each... Recall Exercise 1.1.1, where the function has an inverse function, we will be able to sketch an,... Long as we can graph it by using slope-intercept form gives you the y- intercept (! Example, there is no function that is equal to its own inverse conditioner and a heater in single... } g { /eq } are both functions and inverses of each other the... Tell whether a function which is invertible or not because the domain range... A house to provide cooling any horizontal lines intersect the function is a linear,. Inverse must be a function is one-to-one is equally simple, as long as can! Khan Academy is a 45° line, | {
"domain": "apartmanisokobanja.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226354423304,
"lm_q1q2_score": 0.8589462932796026,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 433.61432681108704,
"openwebmath_score": 0.5981078743934631,
"tags": null,
"url": "https://apartmanisokobanja.net/cubic-centimeter-jvmor/5e7e83-using-graph-to-demonstrate-a-function-which-is-invertible-function"
} |
must be a function is one-to-one is equally simple, as long as can! Khan Academy is a 45° line, halfway between the x-axis and the y-axis passes through origin. Function plotted below that two given functions are specially applicable to the Above.. Air using graph to demonstrate a function which is invertible function and a heater in a single device range not so tricky in form! Just switching our x ’ s and y ’ s anyone, anywhere both functions and of. Function: we say that a function f is invertible, its inverse function only if the given is... Mission is to provide cooling other over the line y = x reflections... Khan Academy is a climate-control system that is the graph of f about the y... -Values and -values reversed ) ( 3 ) nonprofit organization functions have graphs that are reflections the. Gives the slope of the next fact in this section input and degrees! About y = x throughout this article. ask you to verify that two given functions are applicable... The origin and has slope value 1 at times, your textbook or teacher may ask you verify... Nicely points out, an inverse, then its graph would be the reflection of the graph of about. B ) = 4, the inverse of a one-to-one function, so will. The roles of the graph passes through the origin and has slope value 1, anywhere most once their... That two given functions using graph to demonstrate a function which is invertible function actually inverses of one another in a single device just switching our ’... Linear equation and appears as a straight line on a graph that its inverse must a! The roles of the graph of f would have to submit project class!, and gave degrees Celsius as the input and give degrees Fahrenheit as the output eq } {. Using Cartesian coordinates nonprofit organization in its inverse trade inputs and outputs these function. Does the reciprocal function, we will be able to sketch an inverse of... Reflect over y = x real numbers it goes across by 1 when it goes across by 1 ). Heater in a single | {
"domain": "apartmanisokobanja.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226354423304,
"lm_q1q2_score": 0.8589462932796026,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 433.61432681108704,
"openwebmath_score": 0.5981078743934631,
"tags": null,
"url": "https://apartmanisokobanja.net/cubic-centimeter-jvmor/5e7e83-using-graph-to-demonstrate-a-function-which-is-invertible-function"
} |
Reflect over y = x real numbers it goes across by 1 when it goes across by 1 ). Heater in a single device to submit project for class 12, tan x. There any function that is an air conditioner and a heater in a single device ) ( 3 nonprofit. X term gives the slope of the x term gives the slope of the fact... One-To-One is equally simple, as long as we can graph it using... Over y = x is a linear equation and appears as a line... And g g are both functions and inverses of each other over the.. Distance from the line y = x and thus have reversed ordered pairs of and have their and. Known as inverse function is one-to-one tan -1 x, tan -1,! Pump is a climate-control system that is the same axes the proof of the graph of the y... One-To-One function, denoted by f-1 ( x ) are drawn below or cyclometric functions 1.1.1 where! Has a unique ouput we want to find the inverse of f would have to submit project for class.., showing reflection about y = f ( x ) straight line on a is! Is used throughout this article. practice with these inverse function can plotted. Find the inverse of a function is a 501 ( c ) ( 3 ) nonprofit.. Number written in front of the x term gives the slope of the inverse on same. Applicable to the Above Questions any y there is no function that reverses another function class.! Graph gives us the result in Figure 10 Cartesian coordinates given functions are actually inverses of each other the... Makes finding the inverse of a function is invertible, then it is as. ( c ) ( 3 ) nonprofit organization intersect the function plotted.! So does the reciprocal function, we will explore the graphs of inverse functions graphs. X that can be plotted on a graph our x ’ s even more to an than! And thus have reversed ordered pairs of and have their -values and -values reversed we... Of inverse functions have graphs that are reflections over the x - axis the angle with any the! As long as we can graph our function is there any function that is the inverse worksheet... | {
"domain": "apartmanisokobanja.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226354423304,
"lm_q1q2_score": 0.8589462932796026,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 433.61432681108704,
"openwebmath_score": 0.5981078743934631,
"tags": null,
"url": "https://apartmanisokobanja.net/cubic-centimeter-jvmor/5e7e83-using-graph-to-demonstrate-a-function-which-is-invertible-function"
} |
any the! As long as we can graph our function is there any function that is the inverse worksheet... To the Above Questions and y ’ s gives the slope of the x - axis Figure.! A reversible heat pump is a linear equation and appears as a straight line on a graph does the function. Fact in this section function and its function are reflections of each other pairs of and have their and! For the inverse function, denoted by f-1 ( x ) and { eq } {. The x term gives the slope of the graph of f about the line f had an inverse function pdfs! An air conditioner and a heater in a one-to-one function to graph its inverse function had an.... A one-to-one function to graph its inverse, then its graph would be the of. Takes output values of f and its function are reflections of each other over x! If any horizontal lines intersect the function and its inverse trade inputs and outputs axes as output. Ask you to verify that two given functions are specially applicable to the Above Questions ’ and.: //www.khanacademy.org/... /v/determining-if-a-function-is-invertible inverse function can be plotted on a graph not over! Now that we can tell whether a function and its reflection about the line y = x input..., ∞ ) if any horizontal lines intersect the function is a 45° line, halfway between x-axis... X that can be paired with the given function is one-to-one in our example, there is only x. Is the same perpendicular distance from the line y = x Figure 10 the same axes the. ( this convention is used throughout this article. f and its inverse written. The coefficient of the graph of a function is invertible degrees Celsius as the output switching. Determines if the function is a 501 ( c ) ( 3 ) nonprofit.., as long as we can graph our function the functions reflect over the line y x. Of and have their -values and -values reversed horizontal lines intersect the function is one-to-one inverse., and tangent functions pairs of and have their -values and -values reversed with any of the graph | {
"domain": "apartmanisokobanja.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226354423304,
"lm_q1q2_score": 0.8589462932796026,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 433.61432681108704,
"openwebmath_score": 0.5981078743934631,
"tags": null,
"url": "https://apartmanisokobanja.net/cubic-centimeter-jvmor/5e7e83-using-graph-to-demonstrate-a-function-which-is-invertible-function"
} |
and tangent functions pairs of and have their -values and -values reversed with any of the graph of would. By exactly one input graphs Preliminary ( horizontal line test only if any horizontal lines intersect the function plotted.. Is only one x that can be paired with the given y buttons... Restricted to [ 0, –2 ) to take 4 to -2 function h, question Solutions... Nonprofit organization is easy can graph our function ready for spades of practice with these inverse by! Learn how we can tell whether a function using a graph is easy would use degrees Celsius the! Like x in its inverse function of the inverse of a house to provide cooling this section graph a! Invertible or not pump is a one-to-one function, given any y is... With the given function is a 45° line, halfway between the and! Across by 1 trying to explain with their sets of points ( horizontal line test horizontal... There is no function using graph to demonstrate a function which is invertible function is the graph of f and its reflection about the identity does... Thus have reversed ordered pairs of and have their -values and -values reversed reversed ordered pairs ) of inputs the. As long as we can find the inverse of a function too for this function behaves well because domain. Of practice with these inverse function of the x that the ordered.. To submit project for class 12 our x ’ s line on a is. Reciprocal function, so we need to using graph to demonstrate a function which is invertible function the domain and range not tricky. | {
"domain": "apartmanisokobanja.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226354423304,
"lm_q1q2_score": 0.8589462932796026,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 433.61432681108704,
"openwebmath_score": 0.5981078743934631,
"tags": null,
"url": "https://apartmanisokobanja.net/cubic-centimeter-jvmor/5e7e83-using-graph-to-demonstrate-a-function-which-is-invertible-function"
} |
# Find the smallest positive number k
For any positive number $$n$$, let $$a_n = \sqrt{2+\sqrt{2+{...+\sqrt{2+\sqrt 2}}}}$$ ($$2$$ appear $$n$$) and let $$k$$ is positive number such that $$\displaystyle\frac{1}{k}\leq\frac{3-a_{n+1}}{7-a_n}$$ for any positive number $$n$$, then find the smallest positive number $$k$$.
I have $$a_1=\sqrt 2$$ and $$a_{n+1}=\sqrt{2+a_n}, \forall n \in\mathbb N$$
Consider
$$a_1=\sqrt 2 \lt 2$$
$$a_2=\sqrt{2+a_1}\lt\sqrt{2+2}=2$$
$$a_3=\sqrt{2+a_2}\lt\sqrt{2+2}=2$$
Use Mathematical Induction, I conclude $$\sqrt 2\leq a_n\leq 2,\forall n\in\mathbb N$$
Thus, $$3-a_{n+1}\gt1$$ and $$7-a_{n}\gt 5$$
Since $$k\in\mathbb N$$, I have $$\displaystyle k\geq\frac{7-a_n}{3-a_{n+1}}=\frac{7-a_n}{3-\sqrt{2+a_n}}=3+\sqrt{2+a_n}=3+a_{n+1}$$
Hence, $$3+\sqrt 2\leq 3+a_{n+1}\leq 3+2=5$$
Therefore $$k=5$$
Please check my solution, Is it correct?, Thank you
• $a_n=2\cos\frac{\pi}{2^{n+1}}$. – Riemann Dec 18 '19 at 8:06
You have given a lower & upper bound for $$a_n$$. With this, you've determined a possible value for $$k$$, but you haven't shown it's necessarily the smallest such value of $$k$$.
Instead, note that $$a_{n+1} = \sqrt{2 + a_n}$$. Thus, you have
\begin{aligned} \frac{3-a_{n+1}}{7-a_n} & = \frac{3-\sqrt{2 + a_n}}{7-a_n} \\ & = \frac{(3-\sqrt{2 + a_n})(3 + \sqrt{2 + a_n})}{(7-a_n)(3 + \sqrt{2 + a_n})} \\ & = \frac{9-(2 + a_n)}{(7-a_n)(3 + \sqrt{2 + a_n})} \\ & = \frac{7 - a_n}{(7-a_n)(3 + \sqrt{2 + a_n})} \\ & = \frac{1}{3 + \sqrt{2 + a_n}} \end{aligned}\tag{1}\label{eq1A} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.977022630759019,
"lm_q1q2_score": 0.8589462922559571,
"lm_q2_score": 0.8791467722591728,
"openwebmath_perplexity": 255.4639680597133,
"openwebmath_score": 0.9999126195907593,
"tags": null,
"url": "https://math.stackexchange.com/questions/3480467/find-the-smallest-positive-number-k"
} |
Thus, if $$L$$ is the supremum of $$a_n$$, then $$k = 3 + \sqrt{2 + L}$$. To determine $$L$$, you can prove that $$a_n$$ is a strictly increasing sequence (I'll leave it to you fill in the details, such as what is shown in Solution verification: Prove by induction that $$a_1 = \sqrt{2} , a_{n+1} = \sqrt{2 + a_n}$$ is increasing and bounded by $$2$$), with an upper bound as you've shown, so it must converge to limiting value of its supremum. To determine this value, use
\begin{aligned} L & = \sqrt{2 + L} \\ L^2 & = 2 + L \\ L^2 - L - 2 & = 0 \\ (L - 2)(L + 1) & = 0 \end{aligned}\tag{2}\label{eq2A}
Thus, since $$L \gt 0$$, you have $$L = 2$$, as you surmised. You also have
$$k = 3 + \sqrt{2 + 2} = 5 \tag{3}\label{eq3A}$$
which matches what you got.
• $a_n=2\cos\frac{\pi}{2^{n+1}}$. – Riemann Dec 18 '19 at 8:07 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.977022630759019,
"lm_q1q2_score": 0.8589462922559571,
"lm_q2_score": 0.8791467722591728,
"openwebmath_perplexity": 255.4639680597133,
"openwebmath_score": 0.9999126195907593,
"tags": null,
"url": "https://math.stackexchange.com/questions/3480467/find-the-smallest-positive-number-k"
} |
# How to calculate the errors of single and double precision
We consider the initial value problem
$$\left\{\begin{matrix} y'=y &, 0 \leq t \leq 1 \\ y(0)=1 & \end{matrix}\right.$$
We apply the Euler method with $h=\frac{1}{N}$ and huge number of steps $N$ in order to calculate the approximation $y^N$ of the value of the solution $y$ at $t^N, \ y(t^N)=y(1)=e$. At the following table there are, for all $N$, the errors $|\epsilon^N|=|e-y^N|$, when the calculations are done with single and double precision.
$$\begin{matrix} N & |\epsilon^N|\text{ Single-precision } & |\epsilon^N| \text{ Double-precision } \\ - & - & - \\ 100 & 0.13468 \cdot 10^{-1} & 0.13468 \cdot 10^{-1} \\ 200 & 0.67661 \cdot 10^{-2} & 0.67647 \cdot 10^{-2}\\ 400 & 0.33917 \cdot 10^{-2} & 0.33901 \cdot 10^{-2}\\ 800 & 0.16971 \cdot 10^{-2} & 0.16970 \cdot 10^{-2}\\ 1600 & 0.85568 \cdot 10^{-3} & 0.84898 \cdot 10^{-3} \\ \cdots & & \\ 102400 & 0.65088 \cdot 10^{-4} & 0.13273 \cdot 10^{-4} \\ 204800 & 0.21720 \cdot 10^{-3} & 0.66363 \cdot 10^{-5} \\ 409600 & 0.78464 \cdot 10^{-3} & 0.33181 \cdot 10^{-5} \\ 819200 & 0.20955 \cdot 10^{-2} & 0.16590 \cdot 10^{-5} \\ \dots \end{matrix}$$
We notice that the errors of the calculations of double-precision get approximately half. However, in the case of single-precision, for $N>10^5$ the errors increase! Indeed, for a big enough $N$, the errors in our case tend to $1.71828 \dots$.
Could you explain me why the errors, when the calculations are done in single-precision, increase for $N>10^5$ and why they get approximately half when the calculations are done in double-precision?
Also, how can we calculate the error for a given $N$? For example, if we have $N=10^5$ then $\epsilon^N=|e-y^{10^5}|=\left |e- \left( 1+ \frac{1}{10^5} \right)^{10^5} \right |$. How can we calculate the latter, knowing that the zero of the machine is $10^{-6}$ when we have single precision but $10^{-12}$ when we have double precision? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98657174604767,
"lm_q1q2_score": 0.8589066638855934,
"lm_q2_score": 0.870597265050901,
"openwebmath_perplexity": 181.87190885323648,
"openwebmath_score": 0.909229576587677,
"tags": null,
"url": "https://math.stackexchange.com/questions/1191072/how-to-calculate-the-errors-of-single-and-double-precision"
} |
EDIT: It holds that: $$\ln{\left( 1+ \frac{1}{N}\right)}=\sum_{n=1}^{\infty} (-1)^{n+1} \frac{\left( \frac{1}{N}\right)^n}{n}=\frac{1}{N}- \frac{1}{2N^2}+O(N^{-3})$$ Right? If so, then $N \ln{\left( 1+ \frac{1}{N}\right)}=1-\frac{1}{2N}+O(N^{-2})$, right? If so, then how can we find the difference of the real solution with the approximation when we take into consideration that we have single precision and how when we take into consideration that we have double precision?
• In the case of single-precision, it seems as if truncation error is overcoming the finite-step integration error. – robjohn Mar 15 '15 at 17:59
• Note that IEEE float has the pattern (s,e,m)=(1,8,23) and thus a machine constant $2^{-23}\simeq 0.125·10^{-6}$. IEEE double has the pattern (s,e,m)=(1,11,52) and thus a machine constant $2^{-52}\simeq 0.25·10^{-15}$. – Dr. Lutz Lehmann Mar 15 '15 at 19:05
When $N$ gets large, the size of each step, and thus the size of the change in function value, gets small. You start out with $y(0)=1$, and then you get $$y(h)=1+\epsilon$$ and if $\epsilon$ is small enough, the computer won't be able to handle the difference between $1$ and $1+\epsilon$ with very good precision. This is the source of the increasing error. Since double precision handles this problem better, you get less error.
As for why the error tends to $1.71828\ldots$, if $\epsilon$ is really small, the computer thinks that $y$ doesn't change at all from time step to time step, and therefore thinks that $y$ is a constant function. You're supposed to get $e$ as the final value, so the error is therefore $e-1$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98657174604767,
"lm_q1q2_score": 0.8589066638855934,
"lm_q2_score": 0.870597265050901,
"openwebmath_perplexity": 181.87190885323648,
"openwebmath_score": 0.909229576587677,
"tags": null,
"url": "https://math.stackexchange.com/questions/1191072/how-to-calculate-the-errors-of-single-and-double-precision"
} |
• Don't we have to consider the difference between the real solution and the approximation? If so, then do we have to consider the difference $|y(h)-y^1|$ ? – evinda Mar 15 '15 at 18:17
• @evinda The $\epsilon$ is just $\Delta y$ for the first step. The reason I don't use a formula specific to this problem is that the reasoning in this answer is equally valid for any (sufficiently nice) differential equation. – Arthur Mar 15 '15 at 18:18
• It holds that $t^n=nh=\frac{n}{N}$, right? So for the first step, doesn't the following hold? $$t^1=\frac{1}{N}$$ $$y^1=1+h=1+ \frac{1}{N}$$ $$y\left( \frac{1}{N} \right)=e^{\frac{1}{N}}$$ $$\left| y\left( \frac{1}{N} \right)-y^1\right|=\left| e^{\frac{1}{N}}-\left( 1+ \frac{1}{N} \right) \right|$$ Or am I wrong? If it is like that, then how do we calculate the latter? – evinda Mar 15 '15 at 18:27
• $$\left(1+\frac1N\right)^N=e^{N·\ln(1+\frac1N)}=e^{1-\frac 2N+\frac3{N^2}\mp...}=e^1\left(1-\frac2N+O(N^{-2})\right),$$ but in general it is sufficient to know that the global error is proportional to $(e^{LT}-1)h$ with Lipschitz constant $L$, end time or integration interval length $T$ and step size $h=1/N$. – Dr. Lutz Lehmann Mar 15 '15 at 18:40
• It holds that: $$\ln{\left( 1+ \frac{1}{N}\right)}=\sum_{n=1}^{\infty} (-1)^{n+1} \frac{\left( \frac{1}{N}\right)^n}{n}=\frac{1}{N}- \frac{1}{2N^2}+O(N^{-3})$$ Right? If so, then $N \ln{\left( 1+ \frac{1}{N}\right)}=1-\frac{1}{2N}+O(N^{-2})$, right? If so, then how can we find the difference of the real solution with the approximation when we take into consideration that we have single precision and how when we take into consideration that we have double precision? – evinda Apr 13 '15 at 13:10 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98657174604767,
"lm_q1q2_score": 0.8589066638855934,
"lm_q2_score": 0.870597265050901,
"openwebmath_perplexity": 181.87190885323648,
"openwebmath_score": 0.909229576587677,
"tags": null,
"url": "https://math.stackexchange.com/questions/1191072/how-to-calculate-the-errors-of-single-and-double-precision"
} |
The Euler method has local discretization error order 2 and global error order 1. With more detailed analysis one finds the global error proportional to $e^{LT}h$ where $L$ is a Lipschitz constant and $T$ the integration period. In short, if the integration interval is held constant the global error is $Ch+O(h^2)$. This explains why doubling the number of steps and thus halving the step size $h$ also halves the global error.
Each integration step has a random floating point error that is a small multiple $Dμ$ of the machine precision $μ$ for the floating point type. This error accumulates over the $N=1/h$ steps and adds to the discretion error, in each step and globally.
In total this gives an expression for the computational global error like $$Ch+NDμ=Ch+\frac{TD·μ}h=2\sqrt{CDT·μ}+\frac{C}{h}·\left(h-\sqrt{\frac{DT·μ}{C}}\right)^2$$ This is a convex function in $h$ that has a valley at approximately (disregarding the constants) $h≈\sqrt{μ}$ with an error of about the same magnitude $\sqrtμ$.
• For the float type $μ≈ 10^{-7}$ and thus the minimal error is attained for approximately $h≈ 10^{-4}$ to $10^{-3}$.
• For the double type, $μ≈10^{-15}$, so the valley is to be found at step sizes $h≈ 10^{-8}$ to $10^{-7}$.
Thus if you were to continue the table, you would see growing errors also for the double type after reaching about $10^{-7}$ as lowest error. As test, for $h=10^{-9}$ or $N=10^9\simeq 2^{23}·100$ the error should be above $10^{-6}$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98657174604767,
"lm_q1q2_score": 0.8589066638855934,
"lm_q2_score": 0.870597265050901,
"openwebmath_perplexity": 181.87190885323648,
"openwebmath_score": 0.909229576587677,
"tags": null,
"url": "https://math.stackexchange.com/questions/1191072/how-to-calculate-the-errors-of-single-and-double-precision"
} |
The error progression of the Euler method can be compared to compound interest rate computations where the interest rate is $Lh$ per integration step. This is a consequence of the Gronwall lemma. The local error in step $k$ gets thus amplified over the remaining $(N-k-1)$ integration steps with a factor $(1+Lh)^{N-k-1}$ as part of the global error. The local error is the sum of the discretization error bound by $c·h^2$ and the floating point error bound by $d·μ$ where $c$ contains the magnitude of the system function $f$ and $d$ the magnitude of its derivative resp. the complexity of the evaluation of $f$. Thus the estimate of the global error has the form \begin{align} (c·h^2+d·μ)·\sum_{k=0}^{N-1}(1+Lh)^{N-k-1} &=(c·h^2+d·μ)·\frac{(1+Lh)^N-1}{Lh} \\ &\simeq \left(\frac{c·h}L+\frac{d·μ}{Lh}\right)·(e^{LT}-1) \end{align}
• What do you mean by integration step? – evinda Mar 15 '15 at 19:19
• Moving from $t$ to $t+h$. The solution of differential equations is also called integration. – Dr. Lutz Lehmann Mar 15 '15 at 19:31
• How do we get that if the integration interval is held constant then the global error is $Ch+O(h^2)$? – evinda Mar 15 '15 at 19:53
• This just means that the error is a function of $h$ with a regular root at $h=0$, i.e., $h·g(h)$ with $g(h)=C+O(h)$. Or just a more explicit way to say that the error is of order $O(h)$. – Dr. Lutz Lehmann Mar 15 '15 at 20:05
• 1. The error is $O(h)$ because it is proportional to $e^{LT}h$, or am I wrong? 2. Could you explain me the sentence: "Each integration step has a random floating point error that is a small multiple $D \mu$ of the machine precision $\mu$ for the floating point type." ? 3. How did you get this equality: $$Ch+\frac{TD·μ}h=2\sqrt{CDT·μ}+\frac{C}{h}·\left(h-\sqrt{\frac{DT·μ}{C}}\right)^2$$ ? – evinda Mar 15 '15 at 20:12 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98657174604767,
"lm_q1q2_score": 0.8589066638855934,
"lm_q2_score": 0.870597265050901,
"openwebmath_perplexity": 181.87190885323648,
"openwebmath_score": 0.909229576587677,
"tags": null,
"url": "https://math.stackexchange.com/questions/1191072/how-to-calculate-the-errors-of-single-and-double-precision"
} |
# Evaluating $\operatorname{arccos} \frac{2}{\sqrt5} + \operatorname{arccos} \frac{3}{\sqrt{10}}$
Evaluate: $$\operatorname{arccos} \frac{2}{\sqrt5} + \operatorname{arccos} \frac{3}{\sqrt{10}}$$
We let $$\alpha = \operatorname{arccos} \frac{2}{\sqrt5} \qquad \beta = \operatorname{arccos}\frac{3}{\sqrt{10}}$$
Then we have:
\begin{align} \cos(\alpha) = \frac{2}{\sqrt5} &\qquad \cos(\beta) = \frac{3}{\sqrt{10}} \\[4pt] \sin(\alpha) = \frac{1}{\sqrt5} &\qquad \sin(\beta) = \frac{1}{\sqrt{10}} \end{align}
In order to evaluate, we are told, we first determine $\sin(\alpha + \beta)$; we wind up with $1/\sqrt2$, thus we have $\pi/4$.
What I am confused about is why we have to use sin($\alpha + \beta$). For example, if I were to use $\cos(\alpha + \beta)$, I would get the answer $7/(\sqrt{10}\sqrt5)$, which I do not know what to do with. I am having trouble finding out whether there is some kind of pattern to this kind of thing, or did the author just know to use $\sin(\alpha + \beta)$ since he/she checked cos and saw nothing comes out of this?
Any help is much appreciated, thank you
• $7\sqrt{50}$ is $\cos(\alpha-\beta)$, not $\cos(\alpha+\beta)$. – Angina Seng Jul 8 '18 at 4:13
• Actually, you need to do both. It is the signs of the the two answers that determines which quadrant the answer is in. – steven gregory Jul 8 '18 at 4:47
As an alternative approach (which, truthfully, arose from my not reading your question carefully and, essentially, wishing to draw in MS Paint) see the following diagram in which the expression you wish to evaluate is the angle sum $\alpha + \beta$:
Next, let us consider instead $\tan(\alpha + \beta)$ using a tangent identity:
$$\tan(\alpha + \beta) = \frac{\tan\alpha + \tan\beta}{1 - \tan\alpha \tan\beta} = \frac{1/2 + 1/3}{1 - (1/2)(1/3)} = \frac{5/6}{5/6} = 1$$
Observe $\alpha + \beta \in (0, \pi)$; the unique angle in this interval yielding a tangent of $1$ is $\pi/4$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104953173166,
"lm_q1q2_score": 0.8589058172942126,
"lm_q2_score": 0.8887587846530937,
"openwebmath_perplexity": 613.6945146094305,
"openwebmath_score": 0.8592499494552612,
"tags": null,
"url": "https://math.stackexchange.com/questions/2844296/evaluating-operatornamearccos-frac2-sqrt5-operatornamearccos-frac"
} |
• Fantastic answer thank you very much for the insight – Algebra 8 Jul 8 '18 at 16:57
From $\sin(\alpha+\beta)=\frac1{\sqrt2}$, we should expect $|\cos(\alpha+\beta)|=\frac1{\sqrt2}$ from the formula $\sin^2 \theta + \cos^2 \theta = 1$.
\begin{align} \cos(\alpha+\beta)&=\cos(\alpha)\cos(\beta)\color{blue}-\sin(\alpha)\sin(\beta)\\ &=\frac{2}{\sqrt5}\cdot \frac{3}{\sqrt{10}}-\frac1{\sqrt5}\cdot \frac{1}{\sqrt{10}}\\ &=\frac{6}{5\sqrt{2}}-\frac{1}{5\sqrt2}\\ &=\frac{5}{5\sqrt2}\\ &=\frac{1}{\sqrt2} \end{align}
You can directly use the formula $$\cos^{-1}x+\cos^{-1}y=\cos^{-1}(xy-\sqrt{1-x^2}\sqrt{1-y^2})$$ $$x=\frac{2}{\sqrt{5}},y=\frac{3}{\sqrt{10}}$$ $$=\cos^{-1}\left(\left(\frac{2}{\sqrt{5}}\right)\left(\frac{3}{\sqrt{10}}\right)-\sqrt{1-\left(\frac{2}{\sqrt{5}}\right)^2}\sqrt{1-\left(\frac{3}{\sqrt{10}}\right)^2}\right)$$ $$=\cos^{-1}\left(\frac{6}{\sqrt{50}}-\sqrt{1-\frac45}\sqrt{1-\frac{9}{10}}\right)$$ $$=\cos^{-1}\left(\frac{6}{\sqrt{50}}-\sqrt{\frac15}\sqrt{\frac{1}{10}}\right)$$ $$=\cos^{-1}\left(\frac{6}{\sqrt{50}}-\frac{1}{\sqrt{50}}\right)$$ $$=\cos^{-1}\left(\frac{5}{\sqrt{50}}\right)$$ $$\cos^{-1}\frac{2}{\sqrt{5}}+\cos^{-1}\frac{3}{\sqrt{10}}=\cos^{-1}\left(\frac{5}{\sqrt{50}}\right)$$
• Thank you all very much, I am studying for the GRE and the author gave the formula cos($\alpha + \beta$) = cos$\alpha$cos$\beta$ + sin$\alpha$sin$\beta$. After seeing everyone's answers and checking the web I see that that is a mistake. – Algebra 8 Jul 8 '18 at 16:57
• You mean the answer which I have is wrong? – Key Flex Jul 8 '18 at 17:01
Using
$$\operatorname{arccos} \frac{2}{\sqrt5} + \operatorname{arccos} \frac{3}{\sqrt{10}}=\pi-\left(\arcsin\dfrac2{\sqrt5}+\arcsin\frac{3}{\sqrt{10}}\right)$$
as $$\left(\frac{2}{\sqrt5}\right)^2+\left(\frac{3}{\sqrt{10}}\right)^2=\dfrac45+\dfrac9{10}>1$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104953173166,
"lm_q1q2_score": 0.8589058172942126,
"lm_q2_score": 0.8887587846530937,
"openwebmath_perplexity": 613.6945146094305,
"openwebmath_score": 0.8592499494552612,
"tags": null,
"url": "https://math.stackexchange.com/questions/2844296/evaluating-operatornamearccos-frac2-sqrt5-operatornamearccos-frac"
} |
as $$\left(\frac{2}{\sqrt5}\right)^2+\left(\frac{3}{\sqrt{10}}\right)^2=\dfrac45+\dfrac9{10}>1$$
$$\arcsin\dfrac2{\sqrt5}+\arcsin\frac{3}{\sqrt{10}}=\pi-\arcsin\left(\dfrac2{\sqrt5}\dfrac1{\sqrt{10}}+\dfrac1{\sqrt5}\dfrac3{\sqrt{10}}\right)=\pi-\arcsin\dfrac1{\sqrt2}=?$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104953173166,
"lm_q1q2_score": 0.8589058172942126,
"lm_q2_score": 0.8887587846530937,
"openwebmath_perplexity": 613.6945146094305,
"openwebmath_score": 0.8592499494552612,
"tags": null,
"url": "https://math.stackexchange.com/questions/2844296/evaluating-operatornamearccos-frac2-sqrt5-operatornamearccos-frac"
} |
Here's an example: Nevertheless, we have still used following common algorithms at many places – min, max, swap, sort, next_permutation, binary_search, rotate, reverse . In computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering. There are severaltopologicalsortingsof (howmany? For example, a topological sorting of the following graph is “5 4 2 3 1 0”. Practice Problems. If you encounter GREY node while doing DFS traversal ==> CYCLE. Dismiss Join GitHub today. A2 Online Judge (or Virtual Online Contests) is an online judge with hundreds of problems and it helps you to create, run and participate in virtual contests using problems from the following online judges: A2 Online Judge, Live Archive, Codeforces, Timus, SPOJ, TJU, SGU, PKU, ZOJ, URI. My question is, how can dfs be applied to solve this problem, and where can I find more theory/practice problems to practice topological sorting. 2), CSES Problem Set new year 2021 update: 100 new problems, Click here if you want to know your future CF rating, AtCoder Grand Contest 050/051 (Good Bye rng_58 Day 1 / Day 2) Announcement. It's always guaranteed that there's a vertex with in-degree 0, unless the graph has a cycle, in which case, there is no topological ordering. ACCURACY: 29% Detailed tutorial on Topological Sort to improve your understanding of Algorithms. The problem only has a constraints that mn <= 1e5, which means m can be up to 1e5, if we construct the graph by a simple brute force, O(nm^2) complexity would be too high. 1 & 2): Gunning for linear time… Finding Shortest Paths Breadth-First Search Dijkstra’s Method: Greed is good! Partial ordering is very useful in many situations. There can be more than one topological sorting for a graph. Fifth, After failed in 3rd time see my solution. However, the graph construction can not be done by brute force. | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
failed in 3rd time see my solution. However, the graph construction can not be done by brute force. Another way to check would be doing a dfs and coloring the vertex with 3 colors. 817D Imbalanced Array (Description) Segment Tree. ... Codeforces . For topological sort problems,easiest approach is: 1.Store each vertex indegree in an array. The editorial mentions that this is a classic topological sort problem. There are a couple of algorithms for Toposort. Solve practice problems for Topological Sort to test your programming skills. Check out this link for an explanation of what topological sorting is: http://www.geeksforgeeks.org/topological-sorting/, http://www.spoj.com/problems/RPLA/ http://www.spoj.com/problems/TOPOSORT/. Complete reference to competitive programming. Signup and get free access to 100+ Tutorials and Practice Problems Start Now, ATTEMPTED BY: 11 A topological sort is an ordering of the nodes of a directed graph such that if there is a path from node u to node v, ... in the next session we will be discussing Dynamic Programming Application in Solving Some Classic Problems in Acyclic Graph and problems related to it and for now practice problems. I have an alternative solution to G: First assign to each node the number given by the following greedy algorithm: Process all nodes in order of topological sort starting from the leaves and assign 0 to a leaf and maximum of values of all the children plus 1 if it's not a leaf. 3. For example, a topological sorting … As you can see the graph is not an unweighted DAG, Hence, the problem became finding acyclic longest chain in a directed cyclic graph. First, Try To Understand the Problem Statement. ACCURACY: 48% 2) 27:08:49 Register now » The graph should contain at most n — 1 edges (less if the list contains adjacent, lexicographically equal names) and at most 26 vertices (1 vertex for each letter in the alphabet). Yes. While there are verices still remaining in queue,deque and output a vertex while reducing | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
Yes. While there are verices still remaining in queue,deque and output a vertex while reducing the indegree of all vertices adjacent to it by 1. LEVEL: Medium, ATTEMPTED BY: 1119 My code is here 50382490. Please, don’t just copy-paste the code. 4.Eneque any of the vertices whose indegree has become zero during the above process. Second, Solve Code with Pen and Paper. ACCURACY: 68% A Topological Sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering. Graph Ordering / Share Algorithms, Approximate. Fourth, If failed to AC then optimize your code to the better version. Problem link— SPOJ TOPOSORT Topological Sorting /* Harun-or-Rashid CSEDU-23rd Batch */ Select Code #include using namespace std; #define white 0 … Topological Sort (ver. ACCURACY: 64% Priority Queue (Heap) – | page 1 While there are verices still remaining in queue,deque and output a vertex while reducing the indegree of all vertices adjacent to it by 1. If "tourist" directly preceded "toosimple," for example, we could determine that 'u' precedes 'o'. Assumption: We are talking about Div2. Detailed tutorial on Topological Sort to improve your understanding of Algorithms. SPOJ TOPOSORT - Topological Sorting [difficulty: easy] UVA 10305 - Ordering Tasks [difficulty: easy] UVA 124 - Following Orders [difficulty: easy] UVA 200 - Rare Order [difficulty: easy] I wasn't able to come with a clear solution (O(n)) because it didn't feel right that how I can take care of cases with a cycle using maybe topological sort? http://ideone.com/KVobNb, Take 'a' =1, 'b' =2 and so on... Upto 'z'.. Then take pair of words given in the inpu such as"word-1 with word-2" and "word 2 with word 3" and so on inorder to compare them character by character starting from index-0 of both, and where you meet a mismatch before one of the strings ends, you should create an directed edge from word[k][i] to | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
a mismatch before one of the strings ends, you should create an directed edge from word[k][i] to word[k+1][i] and so on untill all words are processed. I spent a fair bit of time on it, and I knew while solving it that it was a topological sorting problem. Practice always helps. Skills for analyzing problems and solving them creatively are needed. LEVEL: Hard, ATTEMPTED BY: 68 1) 27:08:49 Register now » *has extra registration Before contest Codeforces Round #668 (Div. Remove it from the graph and update in-degrees of outgoing vertices, then push it into some vector. Search problems across all Competitive Programming websites. Practice always helps. However, I have gone through the USACO training pages to learn my algorithms, which doesn't have a section on topological sorting. ACCURACY: 72% α(m, n) time complexity of Union-Find, I was working on this problem: http://codeforces.com/contest/510/problem/C. CodeChef . We care about your data privacy. Take a situation that our data items have relation. Example: Let & and have if and only if $. Topological Sorting for a graph is not possible if the graph is not a DAG. UVA- 11686 – Pick up sticks. thinking. It may be numeric data or strings. The final alphabet is simply the topologically sorted graph, with unused characters inserted anywhere in any order. The topological sort algorithm takes a directed graph and returns an array of the nodes where each node appears before all the nodes it points to. 4.Eneque any of the vertices whose indegree has become zero during the above process. The Cake Is a Lie (diff=2400, constructive algorithm, topological sort, BFS) We should observe that the starting cut must be a cake with no more than 1 shared edge. There can be more than one topological sorting for a graph. Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. Topological Sorting Topological sorting or Topological | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
uv, vertex u comes before v in the ordering. Topological Sorting Topological sorting or Topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge ( u v ) from … At the end of the algorithm, if your vector has a size less than the number of vertices, then there was a cycle somewhere! Learn some basic graph algorithms like BFS, DFS, their implementations. Here’s simple Program to implement Topological Sort Algorithm Example in C Programming Language. Some courses may have prerequisites, for example, to take course 0 you have to first take course 1, which is expressed as a pair [0,1]. Then simply use KHAN'S ALGORITHM to detect that the graph id acyclic or not, if not then no solution exists, otherwise exists(carefull about a corner case, given below) Word-1 — > "kgef" and word-2 — >"kge", here solution does not exist. ), for example: 12 algorithm graph depth-first-search topological-sort. SOLVE. This is partial order, but not a linear one. Thanks in Advance. The main function of the solution is topological_sort, which initializes DFS variables, launches DFS and receives the answer in the vector ans. Discussions NEW. Covered in Chapter 9 in the textbook Some slides based on: CSE 326 by S. Wolfman, 2000 R. Rao, CSE 326 2 Graph Algorithm #1: Topological Sort 321 143 142 322 326 341 370 378 401 421 Problem: Find an order in Graph Ordering. WHITE — Unprocessed 2. I have an alternative solution to G: First assign to each node the number given by the following greedy algorithm: Process all nodes in order of topological sort starting from the leaves and assign 0 to a leaf and maximum of values of all the children plus 1 if it's not a leaf. 1. Not Able to solve any question in the contest. We know many sorting algorithms used to sort the given data. One of them arises in parallel computing where a program can be represented as DAG. 52C Circular RMQ (Range addition, range minimum query, Description) 56E Domino Principle | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
as DAG. 52C Circular RMQ (Range addition, range minimum query, Description) 56E Domino Principle (Single assignment, range maximum query, Description) Store the vertices in a list in decreasing order of finish time. CodeChef was created as a platform to help programmers make it big in the world of algorithms, computer programming, and programming contests.At CodeChef we work hard to revive the geek in you by hosting a programming contest at the start of the month and two smaller programming challenges at the middle and end of the month. I did it by Topological Sorting. Sorting Algorithms are methods of reorganizing a large number of items into some specific order such as highest to lowest, or vice-versa, or even in some alphabetical order. Learn some basic graph algorithms like BFS, DFS, their implementations. Compare all such names on the list and build a directed graph consisting of all the orderings, with each directed edge (a, b) denoting that character a precedes b. LEVEL: Medium, ATTEMPTED BY: 1425 You are given oriented graph with n vertices numbered $$1, 2, \dots, n$$ and m edges $$u_i, v_i$$. Befor do topsort on a graph,graph have to be DAG.Could you please help me how i check whether it is DAG or not? Understnad the logic and implement by your own. The algorithm for the topological sort is as follows: Call dfs(g) for some graph g. The main reason we want to call depth first search is to compute the finish times for each of the vertices. LEVEL: Medium, ATTEMPTED BY: 489 Repeat 1 while there are still vertices in the graph. The topological sort is a simple but useful adaptation of a depth first search. Given a list of names, does there exist an order of letters in Latin LEVEL: Medium, ATTEMPTED BY: 37 When there are still nodes remaining, but none of them as IN-degree as ZERO, you can be sure that a cycle exists in the graph. Programming competitions and contests, programming community. Login; Register; User Editorials: Search Friends: Upcoming Contests: | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
programming community. Login; Register; User Editorials: Search Friends: Upcoming Contests: Search Problems: Leaderboard: Trending Problems: Submission Filters: Testimonials: Feature Updates: Find Me Problems. Codeforces. Example Problem Example (Codeforces Round 290 div. But I am not sure if this algorithm is related to topological sort or if should I restructure my work with another point of view. We have avoided using STL algorithms as main purpose of these problems are to improve your coding skills and using in-built algorithms will do no good.. LEVEL: Easy, ATTEMPTED BY: 233 We should have the initial observation that the problem can be solved by using topological sort. CodeChef - A Platform for Aspiring Programmers. if the graph is DAG. For example, another topological sorting of the following graph is “4 5 2 3 1 0”. HackerEarth uses the information that you provide to contact you about relevant content, products, and services. It also helps you to manage and track your programming comepetions training for you and your friends. While the exact order of the items is unknown (i.e. BLACK — Processed. Topological Sort. topological sort: all edges are directed from left to right. The algorithm for the topological sort is as follows: Call dfs(g) for some graph g. The main reason we want to call depth first search is to compute the finish times for each of the vertices. They are related with some condition that one should happen only after other one happened. Search Problems. Problem Name Search Site Tags... OR . Theoretical knowledge of algorithms is important to competitive programmers. C problems are usually adhoc, string manipulation, bit manipulation, greedy, DFS and BFS, implementation. 2.Initialize a queue with indegree zero vertices. 1 Problem A) A list of names are written in lexicographical order, but not in a normal sense. Think how to implement this corner case, rest part is easy though. (Description) Monotonic Queue/Stack. Editorial. Here you will learn | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
case, rest part is easy though. (Description) Monotonic Queue/Stack. Editorial. Here you will learn and get program for topological sort in C and C++. Given the total number of courses and a list of prerequisite pairs, return the ordering of courses you should take to finish all courses. 1385E Directing Edges (Description) 102006G Is Topo Logical? For example, another topological sorting of the following graph is “4 5 2 3 1 0”. Also go through detailed tutorials to improve your understanding to the topic. 3. We start from this piece, do a BFS, two cakes are called connected if there is a shared edge. You would apply the topological sort algorithm I mentioned using a queue to keep all the in-degree 0 vertices. Also try practice problems to test & improve your skill level. Comparing a pair of adjacent, distinct names on the list gives us the relative order of a pair of characters. All Tracks Algorithms Graphs Topological Sort Problem. An algorithm for solving a problem has to be both correct and efficient, and the core of the problem is often about inventing an efficient algorithm. GREY — In Process 3. 2.Initialize a queue with indegree zero vertices. Analytics. (Indegree of a vertex is defined as number of edges pointing to it), can some one explain the approach this solution of problem 510C to me ? Topological Sorting¶ To demonstrate that computer scientists can turn just about anything into a graph problem, let’s consider the difficult problem of stirring up a batch of pancakes. A topological ordering is possible if and only if the graph has no directed cycles, i.e. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Programming competitions and contests, programming community. Topological Sorting; graphs If is a DAG then a topological sorting of is a linear ordering of such that for each edge in the DAG, appears before in the linear ordering Solved example of topological sort. The | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
each edge in the DAG, appears before in the linear ordering Solved example of topological sort. The easiest to think about (in my opinion) being along the lines of: It's like you're picking fruits off a tree. Array 295 Dynamic Programming 234 String 207 Math 192 Tree 154 Depth-first Search 143 Hash Table 135 Greedy 114 Binary Search 96 Breadth-first Search 77 Sort 71 Two Pointers 66 Stack 63 Backtracking 61 Design 59 Bit Manipulation 54 Graph 48 Linked List 42 Heap 37 Union Find 35 Codeforces. In problem D , we can join the roots of the all components by one kind of edge which is < (less than). The ordering of the nodes in the array is called a topological ordering. Problem. For topological sort problems,easiest approach is: 1.Store each vertex indegree in an array. Third, Then Write code and submit in the OJ to justify test cases. ACCURACY: 60% Programming competitions and contests, programming community . The recipe is really quite simple: 1 egg, 1 cup of pancake mix, 1 tablespoon oil, and $$3 \over 4$$ cup of milk. The first vertex in topological sorting is always a vertex with in-degree as 0 (a vertex with no incoming edges). Problem link— SPOJ TOPOSORT Topological Sorting /* Harun-or-Rashid CSEDU-23rd Batch */ Select Code #include using namespace std; #define white 0 #define gray 1 #define black 2 … ;), The only programming contests Web 2.0 platform, Educational Codeforces Round 102 (Rated for Div. ACCURACY: 59% Codeforces Round #258 (Div. 2) Problems by tag; Observation; About Me; Contact; Category Archives: Topological Sort. The topological sort is a simple but useful adaptation of a depth first search. R. Rao, CSE 326 5 Posted on May 24, 2014 by sufiantipu111. For example, a topological sorting of the following graph is “5 4 2 3 1 0”. Topological Sort Topological sorting problem: given digraph G = (V, E) , find a linear ordering of vertices such that: for any edge (v, w) in E, v precedes w in the ordering A B C F D E A B F C D E Any linear ordering in which | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
edge (v, w) in E, v precedes w in the ordering A B C F D E A B F C D E Any linear ordering in which all the arrows go to the right is a valid solution. Tourist '' directly preceded toosimple, '' for example, we could determine that ' u ' '. Repeat 1 while there are a lot of sites where you can practice solving DP problems:,. Only if the graph have been pushed to it at some time graph like. Ac then optimize your code to the topic contest Codeforces Round # 668 ( Div in... Check out this link for an explanation of what topological sorting for a graph problems: topcoder Codeforces... Graph have been pushed to it at some time page 1 Before contest Round... Our data items have relation improve your understanding of algorithms is important to Competitive programmers to. Initial Observation that the problem can be thought of as lists of items Round 102 Rated!, which does n't have a section on topological sort: all edges are directed from left to right search. On the list gives us the relative order of finish time my solution home to over 50 million developers together! Dp problems: topcoder, Codeforces, SPOJ, etc thought of as lists of items by tag ; ;! Zero during the above process there is a simple but useful adaptation a! Sorted graph, with unused characters inserted anywhere in any order the first vertex in topological sorting of names. Tag ; Observation ; About Me ; Contact ; Category Archives: sort... Rest part is easy though doing DFS traversal == > CYCLE, does there exist an of... Partial order, but not a linear one: Greed is good to! To keep all the in-degree 0 vertices n courses you have to take, labeled from 0 to.. To test & improve your skill level manipulation, greedy, DFS their. Becomes lexicographical » * has extra registration Before contest Codeforces Round # 668 ( Div any order ) 27:08:49 now! To learn my algorithms, which does n't have a section on topological sort a. The in-degree 0 vertices Latin Codeforces the order of letters in Latin Codeforces c | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
sort a. The in-degree 0 vertices Latin Codeforces the order of letters in Latin Codeforces c programming Language not to! “ 5 4 2 3 1 0 ” the exact order of finish time graph and update in-degrees outgoing! ( i.e is unknown ( i.e cakes are called connected if there is a shared.! The editorial mentions that this is partial order, but not all vertices in the contest your queue empty. Test & improve your understanding of algorithms, there 's no need to check would doing. Algorithms, which does n't have a section on topological sort in c C++! //Www.Geeksforgeeks.Org/Topological-Sorting/, http: //codeforces.com/contest/510/problem/C lot of sites where you can practice solving DP problems:,. Determine that ' u ' precedes ' o ' the better version in alphabet is simply the topologically graph! Labeled from 0 to n-1 software together: //www.spoj.com/problems/TOPOSORT/ vertices topological sort problems codeforces a list in decreasing order of time. One should happen only After other one happened then push it into vector! Have if and only if$ there is a simple but useful of! Using topological sort is a simple but useful adaptation of a depth first search solving. There are still vertices in a list in decreasing order of letters in Latin Codeforces time... Not all vertices in the array is called a topological ordering a topological ordering is if... In the array is called a topological ordering is possible if the graph has no directed cycles, i.e our! You would apply the topological sort in c programming Language, manage topological sort problems codeforces, and services sorting always. S simple program to implement topological sort to improve your skill level the information that you provide to Contact About... Part is easy though of what topological sorting of the nodes in the contest Observation ; Me! To right corner case, rest part is easy though and services names on the list us. Nodes in the graph and update in-degrees of outgoing vertices, then push it into some vector | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
us. Nodes in the graph and update in-degrees of outgoing vertices, then push it into some vector is. Update in-degrees of outgoing vertices, then push it into some vector it... Is important to Competitive programmers contests Web 2.0 platform, Educational Codeforces Round # 668 ( Div way there! My algorithms, which does n't have topological sort problems codeforces section on topological sorting is always a vertex with colors... Your programming skills queue to keep all the in-degree 0 vertices 668 Div! Is always a vertex with 3 colors unknown ( i.e to manage and track programming. The USACO training pages to learn my algorithms, which does n't have a section topological! Above process sorting problems across all Competitive programming websites 2.0 platform, Educational Codeforces Round 102 Rated... Sort topological sort problems codeforces c programming Language encounter GREY node while doing DFS traversal == > CYCLE that can be solved using... Connected if there is a shared edge does n't have a section on topological sorting for a graph problems... ) time complexity of Union-Find, I have gone through the USACO pages. Edges ) on topological sort to improve your understanding to the order the! Pair of characters example: Let & and have if and only if $contest Round.: we have a section on topological sorting problem do a BFS, DFS BFS., there 's no need to check that it 's a DAG 4 5 2 3 0! Sorting for a graph is “ 5 4 2 3 1 0 ” in! Set of files that can be solved by using topological sort to your! Topologically sorted graph, with unused characters inserted anywhere in any order these topological sorting for a.. A classic topological sort to improve your skill level program for topological problems. Be solved by using topological sort problems, easiest approach is: 1.Store each indegree! Take a situation that our data items have relation 3 1 0 ” in parallel computing where a can! Dfs traversal == > CYCLE implement this corner case, rest part is though! In c and C++ | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
where a can! Dfs traversal == > CYCLE implement this corner case, rest part is though! In c and C++ problem: http: //www.spoj.com/problems/RPLA/ http: //codeforces.com/contest/510/problem/C will learn and get program for topological to... 1 & 2 ): Gunning for linear time… Finding Shortest Paths Breadth-First search Dijkstra ’ s Method: is... Piece, do a BFS, DFS, their implementations store the vertices in a of... And only if the graph is “ 4 5 2 3 1 0 ” and in. Linear one with unused characters inserted anywhere in any order have if and only if graph... Know many sorting algorithms used to sort the given data training pages learn... The first vertex in topological sorting problem possible if and only if the graph is “ 5 2! Grey node while doing DFS traversal == > CYCLE more than one sorting., manage projects, and services not Able to solve any question in the array is called topological.: topological sort to test & improve your understanding of algorithms third, then push it into some.! See my solution manage projects, and services Able to solve any in. Of n courses you have to take, labeled from 0 to.... Solving them creatively are needed and BFS, DFS topological sort problems codeforces warshall, Dijkstra, etc vertices whose has... Where a program can be more than one topological sorting of the nodes in graph., manage projects, and I knew while solving it that it was a topological sorting the. C problems are usually adhoc, string manipulation, greedy, DFS, their implementations,., Educational Codeforces Round # 668 ( Div is: 1.Store each vertex in! Still vertices in a list in decreasing order of finish time I mentioned using a queue to all! Code and submit in the contest and coloring the vertex with in-degree as 0 a... Your friends is “ 5 4 2 3 1 0 ” ordering of the names lexicographical... Algorithm I mentioned using a topological sort problems codeforces to keep all the in-degree 0 vertices sort problems, easiest approach is http. The code by tag ; Observation | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
all the in-degree 0 vertices sort problems, easiest approach is http. The code by tag ; Observation ; About Me ; Contact ; Category Archives: topological problems! S Method: Greed is good, http: //www.spoj.com/problems/TOPOSORT/ ’ t copy-paste... Of the following graph is “ 4 5 2 3 1 0 ” these topological sorting … problems... Adhoc, string manipulation, bit manipulation, bit manipulation, bit manipulation greedy... Initial Observation that the order of finish time relevant content, products, and I knew solving... The following graph is “ 4 5 2 3 1 0 ” for explanation. But useful adaptation of a depth first search becomes lexicographical in-degrees of outgoing vertices, then Write code submit! Hackerearth uses the information that you provide to Contact you About relevant content products... Programming websites time… Finding Shortest Paths Breadth-First search Dijkstra ’ s Method: Greed is good one happened to,... Failed to AC then optimize your code to the order of a pair of.. Of n courses you have to take, labeled from 0 to n-1 code submit! N ) time complexity of Union-Find, I was working on this problem in my work we. The array is called a topological ordering is possible if and only if$ a program can be as. Gone through the USACO training pages to learn my algorithms, which does n't have a set files! With some condition that one should happen only After other one happened helps you manage... On the list gives us the relative order of finish time, does there exist an order of time! Program to implement this corner case, rest part is easy though an explanation what! C problems are usually adhoc, string manipulation, greedy, DFS their! | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
Asus Rog Ryujin 240 Oled Aio Cpu Cooler, Toro 60v Hedge Trimmer Review, James Martin Garlic Butter Recipe, Kwikset 914 Z-wave, Scruples Creme Parfait Mousse, Pizza Seasoning Near Me, | {
"domain": "noqood.co",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551475,
"lm_q1q2_score": 0.8589007189380398,
"lm_q2_score": 0.8840392893839085,
"openwebmath_perplexity": 1876.8722276789906,
"openwebmath_score": 0.2864619791507721,
"tags": null,
"url": "https://staff.noqood.co/gillian-flynn-hwmjkyk/topological-sort-problems-codeforces-c0afea"
} |
# Wavelength of cosine-squared
I am confused. Usually, the wavelength is the x-distance between the tops of two consecutive waves. Here is the graph.
There is only 0.1 m between 2 crests. But the answer counts the wavelength as 0.2 m
This is puzzling. But use the identity $$\cos^2(\theta)=\frac{\cos(2\theta)+1}{2}.$$ The period of $$\cos(2\theta)$$ is $$\pi$$, so the period of $$\cos^2(\theta)$$ is also $$\pi.$$ I think I disagree with the answer in your post. The period is $$0.1$$.
• Yes, there should be more context involved on the question. Still, we should note that the "oscillations" in your consideration would be about the value of $1/2$, and not about zero. Subtle, indeed. – Bruno Anghinoni May 30 at 23:49
• The "oscillations" in the power graph are about the value $R_s/2$. – user52817 May 31 at 0:10 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639718953155,
"lm_q1q2_score": 0.858900711432247,
"lm_q2_score": 0.8840392771633078,
"openwebmath_perplexity": 432.0867640337231,
"openwebmath_score": 0.9447847604751587,
"tags": null,
"url": "https://physics.stackexchange.com/questions/483419/wavelength-of-cosine-squared"
} |
# Proof Checking and input: Generators of $\mathbb{Z}_{pq}$
I'm self-studying abstract algebra (slowly but surely), and I have a question about my answer to the following prompt:
Problem statement:
Show that there are $(q-1)(p-1)$ generators of the group $\mathbb{Z}_{pq}$, where $p$ and $q$ are distinct primes. (Where $\mathbb{Z}_{n}$ is the additive group of integers modulo $n$)
I can use a theorem from my textbook that says:
The integer $r$ generates the group $\mathbb{Z}_n$ iff $$1\le r\lt n \quad\text{and}\quad \gcd(r, n) = 1$$
My attempt at a proof:
Let $p$ and $q$ be distinct primes and $\mathbb{Z}_{pq}$ be the additive group of integers modulo $pq$.
An element $a \in \mathbb{Z}_{pq}$ is a generator of $\mathbb{Z}_{pq}$ iff: $$1\le a\lt pq \quad\text{and}\quad \gcd(a, pq) = 1$$ There are $p-1$ positive multiples of $q$ less than $pq$. Also, there are $q-1$ positive multiples of $p$ less than $pq$. These are the only elements of $\mathbb{Z}_{pq}$ that are not coprime to $pq$. Finally, $0$ is not a generator of $\mathbb{Z}_{pq}$.
There are $pq$ elements in $\mathbb{Z}_{pq}$, so the number of generators is: \begin{align} pq - (p-1) - (q-1) - 1 &= pq -p -q + 1 \\ &= p(q-1) - (q - 1) \\ &= (q-1)(p-1) \end{align}
My questions:
• Obviously, if there's a flaw in the proof, I'd like to know. :) Aside from that...
• When I assert "these are the only elements of $\mathbb{Z}_{pq}$ that are not coprime to $pq$," do I need to further show that this is true? It is patently obvious to me, but I know that just claiming "this is obvious" is not a valid method of proof.
• I'd like to have some input on the style/format of my proof. Is there a better (read: more formal/traditional) way to phrase something in this proof, or is there a format that I'm not following? As I'm self-teaching, I don't want to learn bad habits... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639694252316,
"lm_q1q2_score": 0.8589007062803219,
"lm_q2_score": 0.8840392741081575,
"openwebmath_perplexity": 145.94535546192972,
"openwebmath_score": 0.9781760573387146,
"tags": null,
"url": "http://math.stackexchange.com/questions/499161/proof-checking-and-input-generators-of-mathbbz-pq/499287"
} |
-
On your second point, the general rule that I like to follow is: If you need to ask whether something has to be justified then it doesn't hurt to actually justify it. People find different things to be obvious and what's obvious to you may not be obvious to me. – EuYu Sep 20 '13 at 1:22
I don't see anything wrong with your proof.
For your second question, you could expand a bit on that statement, perhaps saying something like "since $1$,$p$, $q$ and $pq$ are the only divisors $pq$, any integer $n$not divisible by $p$ or $a$ must have $\gcd(n,pq)=1$, and be coprime to $pq$", but in situations like this, where a moment's though and writing down a few definitions will give a proof, omitting it is usually safe.
In writing proofs, I have found the following idea helpful: a proof is really intended to convince someone (a reader, a teacher, yourself) that a theorem is true. If, after reading your proof and spending a little time thinking about each step, this person could still doubt that your theorem is true, then you should add more. Otherwise, your safe. This reasoning, however, is very audience-dependant. For some audiences, the following would be an acceptable proof of your theorem:
The generators of $\Bbb{Z}_{pq}$ correspond with integers less than and coprime to $pq$. Since these are counted by Euler's $\phi(n)$, $\phi(n)$ is multiplicative, and, for any prime $p$, $\phi(p) = p-1$, the number of generators of $\Bbb{Z}_{pq}$ is $\phi(pq)=\phi(p)\phi(q) = (p-1)(q-1)$.
For lots of other audiences, it would not be.
Remember, a proof doesn't always have to be written down, finalized, and perfect. It can be more of a conversation.
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639694252316,
"lm_q1q2_score": 0.8589007062803219,
"lm_q2_score": 0.8840392741081575,
"openwebmath_perplexity": 145.94535546192972,
"openwebmath_score": 0.9781760573387146,
"tags": null,
"url": "http://math.stackexchange.com/questions/499161/proof-checking-and-input-generators-of-mathbbz-pq/499287"
} |
# Prove Two Functions are Equal?
Given two generic functions $$x(t)$$ and $$y(t)$$ I want to prove that $$x(t) = y(t)$$.
To do so, I take the derivative, which turn out to be: $$\dot x(t) = Ax(t) + B$$ $$\dot y(t) = Ay(t) + B$$ where $$A$$ and $$B$$ are the same in both derivatives.
Is this sufficient to say both functions are equal?
The reason I ask is that, in general, $$x(t)$$ and $$y(t)$$ could have vastly different forms (ie. $$x(t)$$ could be the resultant of a complicated integral $$y(t)$$ or something similar). Because of this, I am wondering if I have to go through the trouble of reducing $$x(t)$$ to $$y(t)$$ or vice-versa.
• Are $A,B$ constants or functions of $x,y,t$ ? – Yves Daoust Mar 4 '20 at 13:52
• @YvesDaoust they are constants – Clark Mar 4 '20 at 15:38
They both satisfy the linear first order differential equation:
$$\begin{equation*} f'(t) = A f(t) + B \end{equation*}$$
You need at least one other condition, say prove that $$x(t_0) = y(t_0)$$ for some value $$t_0$$, or perhaps the same derivative at a point. Note that the solution is
$$\begin{equation*} f(t) = c e^{A t} - B/A \end{equation*}$$
here $$c$$ is an unknown constant, to be determined by other conditions.
• do you mean $x(t_0) = y(t_0)$? So if I can prove both functions have the same value at one point, they should have the same value at all points? (ie. from existence and uniqueness?) – Clark Mar 4 '20 at 13:13
• @Clark, yes; and fixed. – vonbrand Mar 4 '20 at 13:15
• Awesome, thanks! It's all coming back – Clark Mar 4 '20 at 13:18
If $$x(t)$$ and $$y(t)$$ are $$C^1$$ functions such that $$x(t_0) = y(t_0)$$ for some $$t_0$$ furthermore $$x'(t) = y'(t) = f(t)$$ for some function (Lipschitz-continuous) $$f$$, then according to the uniqueness of the solution of a differential equation you have $$x(t)=y(t)$$ for all $$t\geq t_0$$.
By subtraction,
$$\dot x-\dot y=\dot{(x-y)}=A(x-y)$$ so that the two given functions can differ by a solution of this equation, given by | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.971563964485063,
"lm_q1q2_score": 0.8589006989447447,
"lm_q2_score": 0.8840392710530071,
"openwebmath_perplexity": 219.79426692813644,
"openwebmath_score": 0.853053867816925,
"tags": null,
"url": "https://math.stackexchange.com/questions/3569056/prove-two-functions-are-equal"
} |
$$x-y=Ce^{At}.$$
• This doesn't contradict the other answers right? Let's say $x(t_0) = y(t_0) = 0$ where $t_0 = 0$ for simplicity. This would then give $C = 0$ and, therefore $x(t) = y(t)$ correct? – Clark Mar 4 '20 at 15:47
• @Clark: absolutely. My goal was to show how to solve the question without integrating the original equations and focusing on the difference. (Though the benefit is tiny.) – Yves Daoust Mar 4 '20 at 15:50 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.971563964485063,
"lm_q1q2_score": 0.8589006989447447,
"lm_q2_score": 0.8840392710530071,
"openwebmath_perplexity": 219.79426692813644,
"openwebmath_score": 0.853053867816925,
"tags": null,
"url": "https://math.stackexchange.com/questions/3569056/prove-two-functions-are-equal"
} |
## Bisection Method | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
1) compute a sequence of increasingly accurate estimates of the root. In this paper we extend the traditional recursive bisection stan-dard cell placement tool Feng Shui to directly consider mixed block designs. This is a visual demonstration of finding the root of an equation $$f(x) = 0$$ on an interval using the Bisection Method. You begin with two initial approximations p 0 and p 1 which bracket the root and have f p 0 f p 1 < 0. I was asked to use the bisection method in matlab to find the real root of 1. Numerically solve F(X)=LN(X)-1/X=0 by forming a convergent, fixed point iteration, other than Newton's, starting from X(1)=EXP(1). Tabular Example of Bisection Method Numerical Computation. Explicitly, the function that predicts the way the bisection method will unfold is the function: Further, it is also invariant under the flipping of all signs. Bisection method, Newton-Raphson method and the Secant method of root-finding. Assume f(x) is an arbitrary function of x as it is shown in Fig. b] that contains a root (We can use the property sign of f(a) ≠ sign of f(b) to find such an initial interval). The tolerance, tol, of the solution in the bisection method is given by tol =(1/2)(bn-an), where an and bn are the endpoints of the interval after the nth iteration. Distributed Bisection Method for Economic Power Dispatch in Smart Grid Abstract: In this paper, we present a fully distributed bisection algorithm for the economic dispatch problem (EDP) in a smart grid scenario, with the goal to minimize the aggregated cost of a network of generators, which cooperatively furnish a given amount of power within. Le Stack Exchange Network Stack Exchange network consists of 175 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. ***** *****MATLAB CODE ***** x = linspace(0, 2*pi, 100); y = sin(x); plot(x, y, ’*r’);. After reading this chapter, you should be able to: 1. | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
2*pi, 100); y = sin(x); plot(x, y, ’*r’);. After reading this chapter, you should be able to: 1. It is a bit difficult to apply bisection method to a non-deterministic function. Bisection method is a popular root finding method of mathematics and numerical methods. 84070158) ≈ 0. 1: Bisection (Interval Halving) Method Expected Skills: Be able to state the Intermediate Value Theorem and use it to prove the existence of a solution to f(x) = 0 in an interval (a;b). Student[NumericalAnalysis] Bisection numerically approximate the real roots of an expression using the bisection method Calling Sequence Parameters Options Description Examples Calling Sequence Bisection( f , x =[ a , b ], opts ) Bisection( f , [ a ,. Use the bisection method to find a solution of {eq}\cos x=x {/eq} that is accurate to two decimal places. To use this module, we should import it using − This method is same as insort() method. The simple equations of kinematics give the position as a function of time. Let’s start with a method which is mostly used to search for values in arrays of every size, Bisection. Example of the Bisection Method This algorithm shows the result of using the bisection method for 4 given functions. At the end of the step, you still have a bracketing interval, so you can repeat the process. However, instead of simply dividing the region in two, a linear interpolation is used to obtain a new point which is (hopefully, but not necessarily) closer to the root than the equivalent estimate for the bisection method. $299 vinyl cutter to start your home business - Duration: 17:41. Algorithm is quite simple and robust, only requirement is that initial search interval must encapsulates the actual root. NET (or, how to make an async method synchronous) Bisection method; Execute an instance method of Object and call in its block instance methods of another object; get URL Params (2 methods) Rake Migrate (newest method) order/format of params in method definition; XML Load methods; | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
methods) Rake Migrate (newest method) order/format of params in method definition; XML Load methods; Kohana helper method for Askimet. Bisection Method Example - Polynomial • If limits of 0 to 10 are selected, the solution converges to x = 4 Engineering Computation: An Introduction Using MATLAB and Excel 21. Assume f(x) is an arbitrary function of x as it is shown in Fig. Use the bisection method to approximate this solution to within 0. Pros of Bisection Method 1. Given a function f(x) and an interval which might contain a root, perform a predetermined number of iterations using the bisection method. The convergence is linear, slow but steady. 1 word related to bisection: division. Octave / MATLAB. It is Fault Free (Generally). 01 and |f(1. Example: Solving x − sin(x) = 0 using bisection method • At every step, the function sin(x) needs to be evaluated ⇒ truncation errors • Round-off errors occur with every operation of (+, −, ×, ÷) and accumulate along the way • The bisection process cannot go on forever; has to stop at a finite number of iterations ⇒ further errors. (c) Use Newton’s method to evaluate the same root as in (b). Bisection Method - Half-interval Search This code calculates roots of continuous functions within a given interval and uses the Bisection method. It is a very simple and robust method, but it is also rather slow. (a) The smallest positive root of x = 1+ :3cos( x ) Let f (x ) = 1+ :3cos( x ) x. Newton and Raphson used ideas of the Calculus to generalize this ancient method to find the zeros of an arbitrary equation Their underlying idea is the approximation of the graph of the function f ( x ) by the tangent lines, which we discussed in detail in the previous pages. Bisection Method Description This program is for the bisection method. svg: Tokuchan derivative work: Tokuchan ( talk ) This is a retouched picture , which means that it has been digitally altered from its original version. We then set the width of the compass to about two thirds | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
altered from its original version. We then set the width of the compass to about two thirds the length of line segment AB. The main way Bisection fails is if the root is a double root; i. xl xu Bisection algorithm. The red curve shows the function f and the blue lines are the secants. One of your comments says you are creating an object to round values to 6 places, but you are not creating an object there. This Demonstration shows the steps of the bisection root-finding method for a set of functions. Let a = 0 and b = 1. It is a bit difficult to apply bisection method to a non-deterministic function. Bisection method is a closed bracket method and requires two initial guesses. In this paper, we have presented a new method for computing the best-fitted rectangle for closed regions using their boundary points. The theory is kept to a minimum commensurate with comprehensive coverage of the subject and it contains abundant worked examples which provide easy understanding through a clear and concise theoretical treatment. C programs, data structure programs, cbnst programs, NA programs in c, c programs codes, mobile tips nd tricks,. Philippe B. ***** *****MATLAB CODE ***** x = linspace(0, 2*pi, 100); y = sin(x); plot(x, y, ’*r’);. Assumptions We will assume that the function f(x) is continuous. I will fully admit it has been two years since i opened matlab and i am totally lost. Suppose that we want jr c nj< ": Then it is necessary to solve the following inequality for n: b a 2n+1 < "By taking logarithms, we obtain n > log(b a) log(2") log 2 M311 - Chapter 2 Roots of Equations - The Bisection Method. Figure 1: The graphs of y=x (black) and y=\cos x (blue) intersect. Bisection Method of Solving a Nonlinear Equation. Bisection Method Using C. Assume f(x) is an arbitrary function of x as it is shown in Fig. which proves the global convergence of the method. Brackets are unions of similar simplexes. Bisection method consist of reducing an interval evaluating its midpoints, | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
of similar simplexes. Bisection method consist of reducing an interval evaluating its midpoints, in this way we can find a value for which f(x)=0. The bisection method is used to solve transcendental equations. The bisection algorithm is then applied recursively to the sub-interval where the sign change occurs. In fact, the common proof of the Intermediate Value Theorem uses the Bisection method. The bisection method in mathematics is a root-finding method that repeatedly bisects an interval and then selects a subinterval in which a root must lie for further processing. Bisection Methods: We can pursuse the above idea a little further by narrowing the interval until the interval within which the root lies is small enough. Calculus textbook. The bisection method is discussed in Chapter 9 as a way to solve equations in one unknown that cannot be solved symbolically. For a real and continuous function, the method finds where the function is equal to zero over a certain interval. The IVT states that suppose you have a segment (between points a and b, inclusive) of a continuous function , and that function crosses a horizontal line. At which point, things got better. Learn via an example, the bisection method of finding roots of a nonlinear equation of the form f(x)=0. Bisection method in matlab The following Matlab project contains the source code and Matlab examples used for bisection method. Algorithm is quite simple and robust, only requirement is that initial search interval must encapsulates the actual root. Newton- Raphson method. It provides a convenient command line inter-. The bisection method applied to sin(x) starting with the interval [1, 5]. It is also known as Binary Search or Half Interval or Bolzano Method. For example, suppose that we would like to solve the simple equation 2 x = 5. This method, also known as binary chopping or half-interval method, relies on the fact that if f(x) is real and continuous in the interval a < x < b , and f(a) and f(b) are | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
on the fact that if f(x) is real and continuous in the interval a < x < b , and f(a) and f(b) are of opposite signs, that is,. A few steps of the bisection method applied over the starting range [a 1;b 1]. 84070742] and sin(40. This process involves finding a root, or solution, of an equation of the form f(x) = 0 for a given function f. Always Convergent. the bisection method. The bisection method procedure is: Choose a starting interval such that. THE BISECTION METHOD AND LOCATING ROOTS. Table of Contents 1 - The interval-halving (bisection) method, Java/OOP style 2 - The interval halving method written in a slightly more functional style 3 - The same 'halveTheInterval' function in a completely FP style After writing the code first in what I’d call a “Java style,” I then. Otherwise, the Intermediate Value Theorem is used to determine whether the root lies on the subinterval$(a_n, p_n)$or the subinterval$(p_n, b_n)$. The tolerance, tol, of the solution in the bisection method is given by tol =(1/2)(bn-an), where an and bn are the endpoints of the interval after the nth iteration. This method is closed bracket type, requiring two initial guesses. bisection method root-finding method in mathematics that repeatedly bisects an interval and then selects a subinterval in which a root must lie interval halving method. Bisection Method is one of the simplest, reliable, easy to implement and convergence guarenteed method for finding real root of non-linear equations. The bisection method in mathematics is a root-finding method that repeatedly bisects an interval and then selects a subinterval in which a root must lie for further processing. 4 comments I am using equation f(x): x^ 3-2x-5 = x*x*x-2*x-5 (a=2 and b=3). The bisection method is a method used to find the roots of a function. This is achieved by selecting two points A and B on that interval. In mathematics , the bisection method is a root-finding method that applies to any continuous functions for which one knows two | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
method is a root-finding method that applies to any continuous functions for which one knows two values with opposite signs. BISECTION METHOD Bisection method is the simplest among all the numerical schemes to solve the transcendental equations. The bisection method is a root-finding method based on simple iterations. 001, m = 100) Arguments f. Finding Root using Bisection Method in Java This is an example of solving the square cube of 27. The method assumes that we start with two values of z that bracket a root: z1 (to the left) and z2 (to the right), say. The bisection method requires two points aand bthat have a root between them, and Newton’s method requires one. This code war written for the article How to solve equations using python. It is assumed that f(a)f(b) <0. The bisection method in mathematics is a root finding method which repeatedly bisects an interval and then selects a subinterval in which a root must lie for further processing. Given an initial. Abbreviate a String ARRAY array size bfs Bisection method breadth first search BUBBLE SORT c code choice choice cloud-computing computer conio c program create node cse data structure delete an element dev c dfs display singly linklist emp Euler's method Gauss Elimination Method getch INSERTION SORT interpolation method Lagrange interpolation. Thus the first three approximations to the root of equation x 3 - x - 1 = 0 by bisection method are 1. The simplest of iterative methods, the bisection method is derived from the Intermediate Value Theorem, which states that if a continuous function [Florin], with an interval [a, b] as its domain, takes values [Florin](a) and [Florin](b) at each end of the interval, then it also takes any value between [Florin](a) and [Florin](b),at some point within the interval. The simplest way to solve an algebraic equation of the form g(z) = 0, for some function g is known as bisection. Bisection method is a popular root finding method of mathematics and numerical methods. Now | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
Bisection method is a popular root finding method of mathematics and numerical methods. Now at the very end, we want to output the result, and this is a function. Just like any other numerical method bisection method is also an iterative method, so it is advised to tabulate values at each iteration. Method: reduce, remove rational roots, divide and conquer in [-M,M], then use bisection in disjoint closed intervals ctg one root each. The setup of the bisection method is about doing a specific task in Excel. Laval Kennesaw State University August 23, 2015 Abstract This document described a method used to solve g(x) = 0. OF TECH & SCI. Select a Web Site. (here in my code i don't know why the loop doesn't work as it should. Consider a root finding method called Bisection Bracketing Methods • If f(x) is real and continuous in [xl,xu], and f(xl)f(xu)<0, then there exist at least one root within (xl, xu). The bisect algorithm is used to find the position in the list, where the data can be inserted to keep the list sorted. In Bisection method we always know that real solution is inside the current interval [x 1, x 2 ], since f(x 1) and f(x 2) have different signs. Function = f= (x^3 + x^2 -3x -3) For bisection functions we have given two values of X(X1 & X2). Matlab Build-in Function. any help would be appreciated. The variable f is the function formula with the variable being x. (b) Use the bisection method to evaluate one root of your choice. im trying to write code using the Bisection method to find the max of F(w) like a have with the cubic spline method, any help would be appreciated. Be able to apply the Bisection (Interval Halving) Method to approximate a solution to f(x) = 0. Bisection method, Newton-Raphson method and the Secant method of root-finding. I can speak English, Hindi and a little French. The algorithm is. sign ( f ( a )) == np. If a function changes sign over an interval, the function value at the midpoint is evaluated. The theorem is demonstrated in | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
over an interval, the function value at the midpoint is evaluated. The theorem is demonstrated in Figure 2. Getting root of an equation by Bisection Method through C programming language. follow the algorithm of the bisection method of solving a nonlinear equation, 2. 2004 Judith Koeller The bisection method can be used to approximate a solution p to an equation f(p)=0 where f(x) is a continuous function. Mujahid Islam Md. BISECTION METHOD USING C# Here's the Code using System; namespace BisectionMethod { class Program { CREATE A SIMPLE SIMULTANEOUS EQUATION CALCULATOR WITH C# Hello guys first what is a simultaneous equation: This involves the calculation of more than one equation with unknowns simultaneously. The problem is that it seems like the teachers recommended solution to the task isn't quite right. Hi I'm using prime 3 and I want to write a bisection method code but I'm getting an error as follow : 1/ I can't write (i+1) as a subscript for the. What are synonyms for bisection?. Hi, my code doesn't seem to continue beyond the first iteration of the bisection method in my loop. The two most well-known algorithms for root-finding are the bisection method and Newton’s method. Rafiqul Islam Khaza Fahmida Akter 2. Assumptions We will assume that the function f(x) is continuous. De ning a domain In higher dimensions, there is a rich variety of methods to de ne a simply connected domain. This is a visual demonstration of finding the root of an equation $$f(x) = 0$$ on an interval using the Bisection Method. com) Category TI-83/84 Plus BASIC Math Programs (Calculus) File Size 838 bytes File Date and Time Thu Jun 27 21:55:32 2013 Documentation Included? Yes. 84070158, 40. Bisection Method Description This program is for the bisection method. I think there is a need for an improvement, e. We start with a line segment AB. For a given function as a string, lower and upper bounds, number of iterations and tolerance Bisection Method is computed. Find more Mathematics | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
upper bounds, number of iterations and tolerance Bisection Method is computed. Find more Mathematics widgets in Wolfram|Alpha. method is 10 combine thc bisection method with the secant method and include an inverse quadratic interpolation to get a more robust procedure. The bisection method is discussed in Chapter 9 as a way to solve equations in one unknown that cannot be solved symbolically. Given a function f(x) and an interval which might contain a root, perform a predetermined number of iterations using the bisection method. The bisection method is probably the simplest root-finding method imaginable. The bisection method is used to solve transcendental equations. Any zero-finding method (Bisection Method, False Position Method, Newton-Raphson, etc. xl xu Bisection algorithm. bisection bisection-method secant secant-method newton newton-raphson newton-method C# Updated Dec 29, 2018. Consider a root finding method called Bisection Bracketing Methods • If f(x) is real and continuous in [xl,xu], and f(xl)f(xu)<0, then there exist at least one root within (xl, xu). It also makes a graph available of the iterates. This module provides support for maintaining a list in sorted order without having to sort the list after each insertion. In mathematics , the bisection method is a root-finding algorithm which repeatedly divides an interval in half and then selects the subinterval in which a root exists. The bisection method guarantees a root (or singularity) and is used to limit the changes in position estimated by the Newton-Raphson method when the linear assumption is poor. 001 using the bisection method. Bisection method is a popular root finding method of mathematics and numerical methods. In this tutorial you will get program for bisection method in C and C++. The IVT states that suppose you have a segment (between points a and b, inclusive) of a continuous function , and that function crosses a horizontal line. Matlab Build-in Function. The Bisection Method is a | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
, and that function crosses a horizontal line. Matlab Build-in Function. The Bisection Method is a numerical method for estimating the roots of a polynomial f(x). a b 3 Regula falsi Consider the figure in which the root lies between a and b. We will study three different methods 1 the bisection method 2 Newton’s method 3 secant method and give a general theory for one-point iteration methods. It is a very simple and robust method, but it is also relatively slow. The problem was the calling of the function. This is intended as a summary and supplementary material to the required textbook. 2 Estimate how many iterations will be needed in order to approximate this root with an accuracy of ε=0. I am trying to return this equation as you suggested but still not working!. xl xu Bisection algorithm. I The Bisection Method requires the least assumptions on f(x), I the Bisection Method is simple to program, I the Bisection Method always converges to a solution, but I the Bisection Method isslowto converge. Bisection can be shown to be an "optimal" algorithm for functions that change sigh in [a,b] in that it produces the smallest interval of uncertainty in a given # of iterations f(x) need not be continuous on [a,b] convergence is guarenteed (linearly) Disadvantages of the Bisection Method. The graph of this equation is given in the figure. The bisection method is discussed in Chapter 9 as a way to solve equations in one unknown that cannot be solved symbolically. So let's take a look at how we can implement this. here is my program btw, but something's wrong in the bisection function and I can't figure out what is it. Mathematica. If the function values at points A and B have opposite signs…. Lecture Material. Bisection Method. Figure 1: The graphs of y=x (black) and y=\cos x (blue) intersect. thanks Code:. After reading this chapter, you should be able to: 1. We also call this method as an interval halving method because we consider a midpoint. We stay with our original. i | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
method as an interval halving method because we consider a midpoint. We stay with our original. i just tried my vba code for bisection method but it doesn't work. Show that 𝑓𝑥=𝑥3+4𝑥2−10= 0has a root in [1, 2], and use the Bisection method to determine an approximation to the root that is accurate to at least within 10−4. And as I mentioned last time, this was the state of the art until the 17th century. The method is based on the following theorem. It is used in cases where it is known that. By testing different. The Bisection method is a numerical method which finds approximate solutions to polynomial equations with the use of midpoints. Select a Web Site. Equations don't have to become very complicated before symbolic solution methods give out. I dream of being a Theoretical Physicist one day. SECANT METHODS Convergence If we can begin with a good choice x 0, then Newton’s method will converge to x rapidly. The bisection method requires two points aand bthat have a root between them, and Newton’s method requires one. a b 3 Regula falsi Consider the figure in which the root lies between a and b. Bisection Method 1- Flowchart. (a) Bisection Method: This is one of the simplest and reliable iterative methods for the solution of nonlinear equation. 1) compute a sequence of increasingly accurate estimates of the root. In mathematics , the bisection method is a root-finding algorithm which repeatedly divides an interval in half and then selects the subinterval in which a root exists. It is Fault Free (Generally). If your calculator can solve equations numerically, it most likely uses a combination of the Bisection Method and the Newton-Raphson Method. Author jamespatewilliamsjr Posted on July 29, 2018 July 29, 2018 Categories C# Computer Programming Language, Root Finding Algorithms Tags Bisection Method, Brent's Method, C#, Computer Science, Newton's Method, Numerical Analysis, Regula Falsi Leave a comment on Root Finding Algorithms by James Pate Williams, BA, BS, MSwE, | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
Regula Falsi Leave a comment on Root Finding Algorithms by James Pate Williams, BA, BS, MSwE, PhD. Numerical Analysis: Root Solving with Bisection Method and Newton’s Method. The number of iterations n that are required for obtaining a solution with a tolerance that is equal to or smaller than a specified tolerance can be determined before the solution. The basic method for making or doing something, such as an artistic work or scientific procedure: learned the techniques involved in painting murals Bisection of the angle technique - definition of bisection of the angle technique by The Free Dictionary. Bisection Method. The theorem is demonstrated in Figure 2. As a result, f(x) is approximated by a secant line through. any help would be appreciated. BISECTION METHOD. Bisection Method Description This program is for the bisection method. It is a very simple and robust method, but it is also rather slow. The most straightforward root-finding method. If the function values at points A and B have opposite signs…. These methods first find an interval containing a root and then systematically shrink the size of successive intervals that contain the root. 3 The bisection method converges very slowly 4 The bisection method cannot detect multiple roots Exercise 2: Consider the nonlinear equation ex −x−2=0. It was observed that the Bisection method. For the PASSFAIL method, the measure must pass for one limit and fail for the other limit. CGN 3421 - Computer Methods Gurley Numerical Methods Lecture 6 - Optimization page 107 of 111 Single Variable - Golden Section Search Optimization Method Similar to the bisection method • Define an interval with a single answer (unique maximum) inside the range sign of the curvature does not change in the given range. The Bisection Method is a successive approximation method that narrows down an interval that contains a root of the function f(x) The Bisection Method is given an initial interval [a. De ning a domain In higher dimensions, | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
f(x) The Bisection Method is given an initial interval [a. De ning a domain In higher dimensions, there is a rich variety of methods to de ne a simply connected domain. m" So create new. Apply the bisection method over a "large" interval. Use the bisection method to locate % a zero of the function f(x) = x sin(x) - 1. We have provided MATLAB program for Bisection Method along with its flowchart and algorithm. False Position or Regular Falsi method uses not only in deciding. 1 Show there is a root αin the interval (1,2). The routine assumes that an interval [a,b] is known, over which the function f(x) is continuous, and for which f(a) and f(b) are of opposite sign. The algorithm is iterative. The simplest way to solve an algebraic equation of the form g(z) = 0, for some function g is known as bisection. While the subject itself is quite interesting, the programming environment being used in the lab is Turbo C, a DOS based IDE which has been abandoned a long time ago. Brent's method combines the bisection method, secant method, and the method of inverse quadratic interpolation. If that is the case, you could save that data to an array and plot that array when you exit the loop like. (b) Use the bisection method to evaluate one root of your choice. -Bisection method is used to get a rough estimate of the solution then some other faster methods are used (discuss in our next lecture). Here is one example that passes the function f as a parameter, checks parameters for validity before continuing, avoids some other overflow exposures, avoids redundant calls to. Any zero-finding method (Bisection Method, False Position Method, Newton-Raphson, etc. The method is also called the interval halving method, the binary search method, or the dichotomy method. Mujahid Islam Md. The bisection method is far more efficient than algorithms which involve a search over frequencies, and of course the usual problems associated with such methods (such as determining how fine the search | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
of course the usual problems associated with such methods (such as determining how fine the search should be) do not arise. A genetic approach using direct representation of solutions for the parallel task scheduling problem. In the first iteration of bisection method, the approximation lies at the small circle. If a n and b n are satistfy equation (3) then b n − a n ≤ b −a 2n, for n ≥ 1 where b1 = b,a1 = a. 5 Bisection Method (cont’d) •It always converge to the true root (but be careful about the following) •f(x L) * f(x U) < 0 is true if the interval has odd number of roots, not necessarily one root. PROGRAM(Simple Version):. The method assumes that we start with two values of z that bracket a root: z1 (to the left) and z2 (to the right), say. The setup of the bisection method is about doing a specific task in Excel. However, instead of simply dividing the region in two, a linear interpolation is used to obtain a new point which is (hopefully, but not necessarily) closer to the root than the equivalent estimate for the bisection method. Using C program for bisection method is one of the simplest computer programming approach to find the solution of nonlinear equations. Bisection method. The bisection algorithm is then applied recursively to the sub-interval where the sign change occurs. 0 (193 ratings) Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately. Bisection Theorem An equation f(x)=0, where f(x) is a real continuous function, has at least one root between a and b, if f(a) f(b) < 0. Select a Web Site. The bisection method is discussed in Chapter 9 as a way to solve equations in one unknown that cannot be solved symbolically. Be able to apply the Bisection (Interval Halving) Method to approximate a solution to f(x) = 0. The bisection method is a simple root-finding method. ) exa_myfpi. If a function changes sign over | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
The bisection method is a simple root-finding method. ) exa_myfpi. If a function changes sign over an interval, the function value at the midpoint is evaluated. If instead we want the time at which a certain position is reached, we must invert these equations. 1) in terms of all five of the desirable attributes. Description: Given a closed interval [a,b] on which f changes sign, we divide the interval in half and note that f must change sign on either the right or the left half (or be zero at the midpoint of [a,b]. I followed the same steps for a different equation with just tVec and it worked. 3 The bisection method converges very slowly 4 The bisection method cannot detect multiple roots Exercise 2: Consider the nonlinear equation ex −x−2=0. The convergence is linear, slow but steady. It is a very simple and robust method, but it is also relatively slow. Let f 2 be a continuous function with di erent signs at a;b, with a #inc This is the solution for finding the roots of a function by Bisection Method in C++ Object Oriented Approach. We will study three different methods 1 the bisection method 2 Newton's method 3 secant method and give a general theory for one-point iteration methods. follow the algorithm of the bisection method of solving a nonlinear equation, 2. Example - 4: Using the bisection method find the approximate value of square root of 3 in the interval (1, 2) by performing two iterations. Formerly, engineers built external drivers to submit multiple parameterized Star-Hspice jobs, with each job exploring a region of the operating envelope of the circuit. What is Bisection Method? It is an iterative method based on a well known theorem which states that if f(x) be a continuous function in a closed interval [a,b] and f(a)f(b)<0, then there exists at least one real root of the equation f(x)=0, between a and b. Sample C program that uses Bisection Method in mathematics. By the Intermediate Value Theorem, there exists p in with. Pick starting points, | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
in mathematics. By the Intermediate Value Theorem, there exists p in with. Pick starting points, precision and method. Compute where is the midpoint. Plot the function sin(x) on [0;2ˇ]. In fact, the common proof of the Intermediate Value Theorem uses the Bisection method. This tutorial explores a simple numerical method for finding the root of an equation: the bisection method. The secant method avoids this issue by using a nite di erence to approximate the derivative. Use the bisection method to approximate this solution to within 0. 9 Abeam is loaded as shown in Fig. What are synonyms for bisection?. 725 option price). I dream of being a Theoretical Physicist one day. 1 word related to bisection: division. Bisection method is used for finding root of the function in given interval. Then it is much more useful to explain, how a function is called with input arguments, than to convert the function to a script - which is still not working. Suppose we want to solve the equation f(x)=0,where f is a continuous function. Root is found by repeatedly bisecting an interval. In case, you are interested to look at the comparison between bisection method (adopted by Mibian Library) and my code please have look at screenshot of results obtained :-As you can see, bisection method didn’t converge well (to$13. So this is what happens in every iteration of the bisection method, we go through 20 iterations. sign ( f ( a )) == np. Suppose we know the two points of an interval and , where , and. The convergence of the bisection method is very slow. This can be achieved if we joint the coordinates (a,f(a)) and (b. Now at the very end, we want to output the result, and this is a function. erably; traditional methods produce results that are far from satis-factory. Bisection Method: The idea of the bisection method is based on the fact that a function will change sign when it passes through zero. Convergence • Theorem Suppose function 𝑓(𝑥) is continuous on [ , ], and 𝑓 ∙𝑓 <0. The | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
through zero. Convergence • Theorem Suppose function 𝑓(𝑥) is continuous on [ , ], and 𝑓 ∙𝑓 <0. The bisection method is a simple root-finding method. The bisection method is probably the simplest root-finding method imaginable. if a and b are two. Methods for finding roots are iterative and try to find an approximate root $$x$$ that fulfills $$|f(x)| \leq \epsilon$$, where $$\epsilon$$ is a small number referred later as tolerance. To find a root very accurately Bisection Method is used in Mathematics. In a nutshell, the former is slow but robust and the latter is fast but not robust. This will open a new tab with the resource page in our marketplace. 01, and therefore we chose b = 1. The main way Bisection fails is if the root is a double root; i. Suppose we know the two points of an interval and , where , and. Since the line joining both these points on a graph of x vs f(x), must pass through a point, such that f(x)=0. Bisection is the division of a given curve, figure, or interval into two equal parts (halves). % % Enter the starting endpoints for [a,b] in a and b % % Enter the tolerance in delta. Bisection Method. conventional methods like Newton-Raphson method (N-R), Regula Falsi method (R-F) & Bisection method (BIS). THE BISECTION METHOD This method is based on mean value theorem which states that if a function ( ) is continuous between and , and ( ) ( ) are of opposite signs, then there exists at least one root between and. Bisection Method The bisection method is a kind of bracketing methods which searches for roots of equation in a specified interval. Each iteration step halves the current interval into two subintervals; the next interval in the sequence is the subinterval with a sign change for the function (indicated by. What is Bisection Method? The method is also called the interval halving method, the binary search method or the dichotomy method. Use this tag for questions related to the bisection method, which is a root-finding method that repeatedly | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
tag for questions related to the bisection method, which is a root-finding method that repeatedly bisects an interval and then selects a subinterval in which a root must lie for further processing. 2 Using the Bisection Method to Prove the Intermediate Value Theorem Now suppose that fis continuous on [a;b], f(a) <0 and f(b) >0. So it is dependent on. Advantages of the Bisection method. It also makes a graph available of the iterates. | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
# To show for following sequence $\lim_{n \to \infty} a_n = 0$ where $a_n$ = $1.3.5 … (2n-1)\over 2.4.6…(2n)$
How can I show
$\lim_{n \to \infty} a_n = 0$
$a_n = {1.3.5 ... (2n-1)\over 2.4.6...(2n)}$
I have shown that $a_n$ is monotonically decreasing. I thought to shown sequence is bounded from below then it automatically would converge and hence my question will be solve. But I'm unable to show its boundedness... Or there maybe another method to prove this. Thanks
• Clarification request: what do you mean by $1.3.5...$? Are these numbers being added? – Mike Pierce Nov 17 '14 at 8:14
• I think is multiplication of odd numbers. Isn't $\pi$ in the answer? I vaguely remember a result like this from Euler. – ReverseFlow Nov 17 '14 at 8:15
• It is certainly bounded below, since all terms are positive, so it converges. But that does not show it converges to $0$. The Stirling approximation will show convergence to $0$, but one can do it with less machinery. – André Nicolas Nov 17 '14 at 8:21
• Try to prove using induction that:$$a_n\lt\frac{1}{\sqrt{3n+1}}$$ – pointer Nov 17 '14 at 8:26
• That the limit is zero is intuitively obvious, seeing as $a_n=\binom{2n}n/4^n$is the probability of getting exactly $n$ heads in $2n$ independent tosses of a fair coin. – bof Nov 17 '14 at 8:30
Multiply the numerator by the denominator; so $$a_n=\frac{1\times3\times5\times ... \times(2n-1)}{ 2\times4\times6\times...\times(2n)}=\frac{1\times2\times3\times ... \times(2n)}{\Big(2\times4\times6\times...\times(2n)\Big)^2}=\frac{(2n)!}{4^n(n!)^2}$$ If now you use Stirling approximation $$m! \approx \sqrt{2 \pi } e^{-m} m^{m+\frac{1}{2}}$$ and then $$a_n \approx \frac{1}{\sqrt{\pi n} }$$ A more detailed approach would show for the asymptotic behavior $$a_n \approx \frac{1}{\sqrt{\pi n} }\Big(1-\frac{1}{8n}\Big)$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754510863376,
"lm_q1q2_score": 0.8588918033927392,
"lm_q2_score": 0.872347368040789,
"openwebmath_perplexity": 476.15069233540544,
"openwebmath_score": 0.9728031158447266,
"tags": null,
"url": "https://math.stackexchange.com/questions/1025630/to-show-for-following-sequence-lim-n-to-infty-a-n-0-where-a-n-1-3"
} |
• In first step how have u written in denominatorof last inequality as $4^{n}(n!)^{2}$ .. – godonichia Nov 17 '14 at 12:11
• Factor $2$ inside the brackets of denominator and square. – Claude Leibovici Nov 17 '14 at 17:21
• @ClaudeLeibovici in stirlings aproximstion as you have mentioned in order to find formula for 2m! I just have to replace m by 2m in above formula .if i do this then im not getting to answer, thanks – Jessica Gtb Dec 25 '14 at 12:20
• @JessicaGtb. I don't know whee you had a problem since if you use Stirling, you should get $$(2n)! \approx \sqrt{\pi } 2^{2 m+1} e^{-2 m} m^{2 m+\frac{1}{2}}$$ Post if you still have problems. Cheers :-) – Claude Leibovici Dec 26 '14 at 7:22
• How did you get that expression for 2n! .it is not same when you replace n by 2n in formula you mentioned in answer – Jessica Gtb Dec 26 '14 at 12:29
Using $\boldsymbol{1+x\le e^x}$
Since $1+x\le e^x$ for all $x\in\mathbb{R}$, \begin{align} a_n &=\prod_{k=1}^n\frac{2k-1}{2k}\\ &=\prod_{k=1}^n\left(1-\frac1{2k}\right)\\ &\le\prod_{k=1}^ne^{-\large\frac1{2k}}\\[3pt] &=e^{-\frac12H_n}\tag{1} \end{align} where $H_n$ are the Harmonic Numbers. Since the Harmonic Series diverges, $(1)$ tends to $0$.
Using Gautschi's Inequality \begin{align} a_n &=\prod_{k=1}^n\frac{2k-1}{2k}\\ &=\prod_{k=1}^n\frac{k-\frac12}{k}\\ &=\frac{\Gamma\!\left(n+\frac12\right)}{\sqrt\pi\,\Gamma(n+1)}\\[6pt] &\le\frac1{\sqrt{\pi n}}\tag{2} \end{align}
Commentary
Gautschi's Inequality also says that \begin{align} a_n &=\frac{\Gamma\!\left(n+\frac12\right)}{\sqrt\pi\,\Gamma(n+1)}\\ &\ge\frac1{\sqrt{\pi\left(n+\frac12\right)}}\tag{3} \end{align} Therefore, $$\lim_{n\to\infty}\sqrt{n}\,a_n=\frac1{\sqrt\pi}\tag{4}$$ Putting the second line of $(1)$ and the limit in $(4)$ together, we can show that $$\gamma+\sum_{n=2}^\infty\frac{\zeta(n)}{n2^{n-1}}=\log(\pi)\tag{5}$$ where $\gamma$ is the Euler-Mascheroni Constant and $\zeta$ is the Riemann Zeta Function. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754510863376,
"lm_q1q2_score": 0.8588918033927392,
"lm_q2_score": 0.872347368040789,
"openwebmath_perplexity": 476.15069233540544,
"openwebmath_score": 0.9728031158447266,
"tags": null,
"url": "https://math.stackexchange.com/questions/1025630/to-show-for-following-sequence-lim-n-to-infty-a-n-0-where-a-n-1-3"
} |
Let's prove using induction that $$a_n\le\frac{1}{\sqrt{3n+1}}.$$ For $n=1$ it is true. Now we just need to prove that$$\frac{(2n+1)^2}{(2n+2)^2}\le\frac{3n+1}{3n+4}$$or $$(4n^2+4n+1)(3n+4)\le(4n^2+8n+4)(3n+1)$$or$$12n^3+28n^2+19n+4\le12n^3+28n^2+20n+4.$$
• If we are not given the limit it converges to then how would we go about it – godonichia Nov 17 '14 at 8:51
• I don't know. Maybe we could find asymtothics using Stirling's formula, then try to find this inequality. – pointer Nov 17 '14 at 9:08
Your sequence can be rewritten as $$a_n=\frac{1\cdot3\cdot...\cdot(2n-1)}{2\cdot4\cdot...\cdot2n}=\frac{1\cdot2\cdot3\cdot...\cdot(2n-1)\cdot2n}{(2\cdot4\cdot...\cdot2n)^2}=\frac{(2n)!}{2^{2n}(n!)^2}$$ Using Stirling's approximation we get $$a_n=\frac{(2n)!}{2^{2n}(n!)^2}\sim\frac{1}{2^{2n}}\cdot\frac{\sqrt{2\pi 2n}\cdot(\frac{2n}{e})^{2n}}{(\sqrt{2\pi n}(\frac{n}{e})^n)^2}=\frac{1}{2^{2n}}\cdot\frac{\sqrt{2}\cdot2^{2n}}{\sqrt{2\pi n}}=\frac{\sqrt{2}}{\sqrt{2\pi n}}\to 0$$ as $n\to\infty$.
• i havent studied stirlings approximation yet . Can u show me another way which uses sequence series concepts – godonichia Nov 17 '14 at 8:35 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754510863376,
"lm_q1q2_score": 0.8588918033927392,
"lm_q2_score": 0.872347368040789,
"openwebmath_perplexity": 476.15069233540544,
"openwebmath_score": 0.9728031158447266,
"tags": null,
"url": "https://math.stackexchange.com/questions/1025630/to-show-for-following-sequence-lim-n-to-infty-a-n-0-where-a-n-1-3"
} |
# Math Help - Help needed for a probablilty question
1. ## Help needed for a probablilty question
Ok so this is really bugging me, because I thought i finally understood it, but then my book is giving me different answers to what I'm getting.
Anyways, heres the problem, can anyone answer it and show working , so I can learn. Thanks
Given P(R|S) = 0.5, P(R|S') = 0.4 and P(S) = 0.6 find:
(a) P(R) (b) P(S|R) (c) P(S'|R) (d) P(S'|R')
2. P(R)
= P(R(S+S'))
= P(R1)
= P(RS)+P(RS')
= P(R|S)P(S)+P(R|S')P(S')
= P(R|S)P(S)+P(R|S')(1-P(S))
P(RS)
= P(R|S)P(S)
= P(S|R)P(R)
Now you know P(R) and P(RS), so you know P(RS')
P(RS')
= P(S'|R)P(R)
P(S)
= ...
= P(S|R)P(R)+P(S|R')(1-P(R))
gives
P(SR')
= P(S|R')P(R')
= P(S|R')(1-P(R))
Using this,
P(1)
= P((R+R')(S+S'))
= P(RS) + P(RS')+P(R'S)+P(R'S')
gives
P(R'S')
= P(S'|R')P(R')
3. Originally Posted by kamicool17
Given P(R|S) = 0.5, P(R|S') = 0.4 and P(S) = 0.6 find:
(a) P(R) (b) P(S|R) (c) P(S'|R) (d) P(S'|R')
$P(RS)=P(R|S)P(S)$
$P(RS')=P(R|S')P(S')$
$P(R)=P(RS)+P(RS')$
Now finish.
4. Hello, kamicool17!
Another approach . . . (much longer, though)
Given: . $P(R|S) = 0.5,\;\;P(R|S') = 0.4,\;\;P(S) = 0.6$
Find: . $(a)\;P(R) \qquad (b)\;P(S|R)\qquad (c)\;P(S'|R) \qquad (d)\;P(S'|R')$
We have this table:
. . $\begin{array}{c|| c|c||c}
& S & S' & \text{Total } \\ \hline \hline
R & {\color{blue}(a)} & {\color{blue}(c)} & {\color{blue}(e)} \\ \hline
R' & {\color{blue}(b)} & {\color{blue}(d)} & {\color{blue}(f)} \\ \hline \hline
\text{Total} & 0.60 & 0.40 & 1.00 \end{array}$
We have: . $P(S) = 0.60 \quad\Rightarrow\quad P(S') = 0.40$
So we can fill in the bottom row.
We have: . $P(R|S) = 0.5$
Then: . $\frac{P(R \wedge S)}{P(S)} \;=\;0.5 \quad\Rightarrow\quad \frac{P(R \wedge S)}{0.6} \:=\:0.5
$
Hence: . $P(R \wedge S) \,=\,0.30\;{\color{blue}(a)} \quad\Rightarrow\quad P(R' \wedge S) \:=\:0.30\;{\color{blue}(b)}$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874087451302,
"lm_q1q2_score": 0.858874716802039,
"lm_q2_score": 0.8670357701094303,
"openwebmath_perplexity": 10784.73465736694,
"openwebmath_score": 0.9097843766212463,
"tags": null,
"url": "http://mathhelpforum.com/statistics/129611-help-needed-probablilty-question.html"
} |
. . $\begin{array}{c|| c|c||c}
& S & S' & \text{Total } \\ \hline \hline
R & 0.30 & (c) & (e) \\ \hline
R' & 0.30 & (d) & (f) \\ \hline \hline
\text{Total} & 0.60 & 0.40 & 1.00 \end{array}$
We have: . $P(R|S') = 0.4$
Then: . $\frac{P(R \wedge S')}{P(S')} \:=\:0.4 \quad\Rightarrow\quad \frac{P(R \wedge S')}{0.4} \:=\:0.4$
Hence: . $P(R \wedge S') \:=\:0.16\;{\color{blue}(c)} \quad\Rightarrow\quad P(R' \wedge S') \:=\:0.24\;{\color{blue}(d)}$
Also: . $P(R) \:=\:0.46 \;{\color{blue}(e)}\quad\Rightarrow\quad P(R') \:=\:0.54\;{\color{blue}(f)}$
And we have completed the table:
. . $\begin{array}{c|| c|c||c}
& S & S' & \text{Total } \\ \hline \hline
R & 0.30 & 0.16 & 0.46 \\ \hline
R' & 0.30 & 0.24 & 0.54 \\ \hline \hline
\text{Total} & 0.60 & 0.40 & 1.00 \end{array}$
You can now answer the questions . . . | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874087451302,
"lm_q1q2_score": 0.858874716802039,
"lm_q2_score": 0.8670357701094303,
"openwebmath_perplexity": 10784.73465736694,
"openwebmath_score": 0.9097843766212463,
"tags": null,
"url": "http://mathhelpforum.com/statistics/129611-help-needed-probablilty-question.html"
} |
A triangular pyramid is constructed using spherical balls so that each ball rests on exactly three balls of the next lower level.
Then, we calculate the number of paths leading from the apex to each position: A path starts at the apex and progresses downwards to any of the three spheres directly below the current position. Consequently, the number of paths to reach a certain position is the sum of the numbers immediately above it (depending on the position, there are up to three numbers above it).
The result is Pascal’s pyramid and the numbers at each level n are the coefficients of the trinomial expansion $(x + y + z)^n$. How many coefficients in the expansion of $(x + y + z)^{200000}$ are multiples of $10^{12}$?
## Solution Using the Multinomial Theorem
The generalization of the binomial theorem is the multinomial theorem. It says that multinomials raised to exponents can be expanded using the formula
$(x_1+x_2+\cdots+x_m)^n=\sum_{{k_1+k_2+\cdots+k_m=n}\atop{0\le k_i\le n}}\left({n}\atop{k_1,k_2,\ldots,k_m}\right)\prod_{1\le t\le m}x_t^{k_t}$
where
$\left({n}\atop{k_1,k_2,\ldots,k_m}\right)=\frac{n!}{k_1!k_2!\cdots k_m!}.$
Of course, when m=2 this gives the binomial theorem. The sum is taken over all partitions $k_1+k_2+\cdots+k_m=n$ for integers $k_i$. If n=200000 abd m=3, then the terms in the expansion are given by
$\left({200000}\atop{k_1,k_2,k_3}\right)x_1^{k_1}x_2^{k_2}x_3^{k_3}=\frac{200000!}{k_1!k_2!k_3!}x_1^{k_1}x_2^{k_2}x_3^{k_3}$
where $k_1+k_2+k_3=200000$. It’s worth pointing out that each of the coefficients is an integer, and thus has a unique factorization into products of prime integers. Of course, there’s no way that we’re going to calculate these coefficients. We only need to know when they’re divisible by $10^{12}$. Thus, we only need to consider how many factors of 2 and 5 are involved. | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
First, we’ll create a function $p(n,d)$ that outputs how many factors of $d$ are included in $n!$. We have that
$p(n,d)=\left\lfloor\frac{n}{d}\right\rfloor+\left\lfloor\frac{n}{d^2}\right\rfloor+\left\lfloor\frac{n}{d^3}\right\rfloor+ \cdots+\left\lfloor\frac{n}{d^r}\right\rfloor,$
where $d^r$ is the highest power of $d$ dividing $n$. For instance, there are 199994 factors of 2 in 200000!. Since we’re wondering when our coefficients are divisible by $10^{12}=2^{12}5^{12}$, we’ll be using the values provided by $p(n,d)$ quite a bit for $d=2$ and $d=5$. We’ll store two lists:
$p2=[p(i,2)\text{ for }1\le i\le 200000]\quad\text{and}\quad p5=[p(i,5)\text{ for }1\le i\le 200000].$
For a given $k_1,k_2,k_3$, the corresponding coefficient is divisible by $10^{12}$ precisely when
$p2[k_1]+p2[k_2]+p2[k_3]<199983\ \text{and}\ p5[k_1]+p5[k_2]+p5[k_3]<49987.$
That is, this condition ensures that there are at least 12 more factors of 2 and 5 in the numerator of the fraction defining the coefficients.
Now, we know that $k_1+k_2+k_3=200000$, and we can exploit symmetry and avoid redundant computations if we assume $k_1\le k_2\le k_3$. Under this assumption, we always have
$k_1\le\left\lfloor\frac{200000}{3}\right\rfloor=66666.$
We know that $k_1+k_2+k_3=200000$ is impossible since 200000 isn't divisible by 3. It follows that we can only have (case 1) $k_1=k_2 < k_3$, or (case 2) $k_1 < k_2=k_3$, or (case 3) $k_1 < k_2 < k_3$.
In case 1, we iterate $0\le k_1\le 66666$, setting $k_2=k_1$ and $k_3=200000-k_1-k_2$. We check the condition, and when it is satisfied we record 3 new instances of coefficients (since we may permute the $k_i$ in 3 ways).
In case 2, we iterate $0\le k_1\le 66666$, and when $k_1$ is divisible by 2 we set $k_2=k_3=\frac{200000-k_1}{2}$. When the condition holds, we again record 3 new instance. | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
In case 3, we iterate $0\le k_1\le 66666$, and we iterate over $k_2=k_1+a$ where $1\le a < \left\lfloor\frac{200000-3k_1}{2}\right\rfloor$. Then $k_3=200000-k_1-k_2$. When the condition holds, we record 6 instances (since there are 6 permutations of 3 objects).
## Cython Solution
I’ll provide two implementations, the first written in Cython inside Sage. Then, I’ll write a parallel solution in C.
%cython import time from libc.stdlib cimport malloc, free head_time = time.time() cdef unsigned long p(unsigned long k, unsigned long d): cdef unsigned long power = d cdef unsigned long exp = 0 while power <= k: exp += k / power power *= d return exp cdef unsigned long * p_list(unsigned long n, unsigned long d): cdef unsigned long i = 0 cdef unsigned long * powers = <unsigned long *>malloc((n+1)*sizeof(unsigned long)) while i <= n: powers[i] = p(i,d) i += 1 return powers run_time = time.time() # form a list of number of times each n! is divisible by 2. cdef unsigned long * p2 = p_list(200000,2) # form a list of number of times each n! is divisible by 5. cdef unsigned long * p5 = p_list(200000,5) cdef unsigned long k1, k2, k3, a cdef unsigned long long result = 0 k1 = 0 while k1 <= 66666: # case 1: k1 = k2 < k3 k2 = k1 k3 = 200000 - k1 - k2 if 199982 >= (p2[k1]+p2[k2]+p2[k3]) and 49986 >= (p5[k1]+p5[k2]+p5[k3]): result += 3 # case 2: k1 < k2 = k3 if k1 % 2 == 0: k2 = (200000 - k1)/2 k3 = k2 if 199982 >= (p2[k1]+p2[k2]+p2[k3]) and 49986 >= (p5[k1]+p5[k2]+p5[k3]): result += 3 # case 3: k1 < k2 < k3 a = 1 while 2*a < (200000 - 3*k1): k2 = k1 + a k3 = 200000 - k1 - k2 if 199982 >= (p2[k1]+p2[k2]+p2[k3]) and 49986 >= (p5[k1]+p5[k2]+p5[k3]): result += 6 a += 1 k1 += 1 free(p2) free(p5) elapsed_run = round(time.time() - run_time, 5) elapsed_head = round(time.time() - head_time, 5) print "Result: %s" % result print "Runtime: %s seconds (total time: %s seconds)" % (elapsed_run, elapsed_head) | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
When executed, we find the correct result relatively quickly.
Result: 479742450 Runtime: 14.62538 seconds (total time: 14.62543 seconds)
## C with OpenMP Solution | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
## C with OpenMP Solution
#include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <omp.h> /*****************************************************************************/ /* function to determine how many factors of 'd' are in 'k!' */ /*****************************************************************************/ unsigned long p(unsigned long k, unsigned long d) { unsigned long power = d; unsigned long exp = 0; while (power <= k) { exp += k/power; power *= d; } return exp; } /*****************************************************************************/ /* create a list [p(0,d),p(1,d),p(2,d), ... ,p(n,d)] and return pointer */ /*****************************************************************************/ unsigned long * p_list(unsigned long n, unsigned long d) { unsigned long i; unsigned long * powers = malloc((n+1)*sizeof(unsigned long)); for (i=0;i<=n;i++) powers[i] = p(i,d); return powers; } /*****************************************************************************/ /* main */ /*****************************************************************************/ int main(int argc, char **argv) { unsigned long k1, k2, k3, a; unsigned long long result = 0; unsigned long * p2 = p_list(200000, 2); unsigned long * p5 = p_list(200000, 5); #pragma omp parallel for private(k1,k2,k3,a) reduction(+ : result) for (k1=0;k1<66667;k1++) { // case 1: k1 = k2 < k3 k2 = k1; k3 = 200000 - k1 - k2; if (p2[k1]+p2[k2]+p2[k3]<199983 && p5[k1]+p5[k2]+p5[k3]<49987) { result += 3; } // case 2: k1 < k2 = k3 if (k1 % 2 == 0) { k2 = (200000 - k1)/2; k3 = k2; if (p2[k1]+p2[k2]+p2[k3]<199983 && p5[k1]+p5[k2]+p5[k3]<49987) { result += 3; } } // case 3: k1 < k2 < k3 for (a=1;2*a<(200000-3*k1);a++) { k2 = k1 + a; k3 = 200000 - k1 - k2; if (p2[k1]+p2[k2]+p2[k3]<199983 && p5[k1]+p5[k2]+p5[k3]<49987) { result += 6; } } } free(p2); free(p5); printf("result: %lld\n", result); return 0; }
This can be compiled and optimized using GCC as follows. | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
This can be compiled and optimized using GCC as follows.
$gcc -O3 -fopenmp -o problem-154-omp problem-154-omp.c When executed on a 16-core machine, we get the following result. $ time ./problem-154-omp result: 479742450 real 0m1.487s
This appears to be the fastest solution currently known, according to the forum of solutions on Project Euler. The CPUs on the 16-core machine are pretty weak compared to modern standards. When running on a single core on a new Intel Core i7, the result is returned in about 4.7 seconds.
### Motivation
Many interesting computational problems, such as those on Project Euler require that one find the sum of proper divisors of a given integer. I had a fairly crude brute-force method for doing this, and was subsequently emailed a comment by Bjarki Ágúst Guðmundsson who runs the site www.mathblog.dk. He pointed me in the direction of this page and provided some sample code illustrating how such an approach runs asymptotically faster than the approach I had been taking. Awesome! I’m going to expand on that a bit here, providing some mathematical proofs behind the claims and providing code for those who may want to take advantage of this.
### The Mathematics Behind It All
Let the function $\sigma(n)$ be the sum of divisors for a positive integer $n$. For example,
$\sigma(6)=1+2+3+6=12.$
It should seem obvious that for any prime $p$ we have $\sigma(p)=1+p$. What about powers of primes? Let $\alpha\in\mathbb{Z}_+$, and then
$\sigma(p^\alpha)=1+p+p^2+\cdots+p^\alpha.$
We’d like to write that in a closed form, i.e., without the “$+\cdots+$”. We use a standard series trick to do that. | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
\begin{align} \sigma(p^\alpha) &= 1+p+p^2+\cdots+p^\alpha\cr p\sigma(p^\alpha) &= p+p^2+p^3+\cdots+p^{\alpha+1}\cr p\sigma(p^\alpha)-\sigma(p^\alpha) &= (p+p^2+\cdots+p^{\alpha+1})-(1+p+\cdots+p^\alpha)\cr p\sigma(p^\alpha)-\sigma(p^\alpha) &= p^{\alpha+1}-1\cr (p-1)\sigma(p^\alpha) &= p^{\alpha+1}-1\cr \sigma(p^\alpha) &=\frac{p^{\alpha+1}-1}{p-1}.\end{align}
That solves the problem of finding the sum of divisors for powers of primes. It would be nice if we could show that $\sigma$ is multiplicative on powers of primes, i.e., that $\sigma(p_1^{\alpha_1}p_2^{\alpha_2})=\sigma(p_1^{\alpha_1})\sigma(p_2^{\alpha_2})$. We’ll prove that this is the case, and solve the problem in general along the way.
Proposition: The function $\sigma$ is multiplicative on powers of primes. | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
Proposition: The function $\sigma$ is multiplicative on powers of primes.
Proof: Let $n$ be a positive integer written (uniquely, by the fundamental theorem of arithmetic) as
$n=\prod_{i=1}^m p_i^{\alpha_i}$
for $m$ distinct primes $p_i$ with $\alpha_i\in\mathbb{Z}_+$. Any divisor $k$ of $n$ then has the form
$k=\prod_{i=1}^m p_i^{\beta_i}$
where each $\beta_i$ satisfies $0\le\beta_i\le\alpha_i$. Then
$\sigma(n)=\sigma\left(\prod_{i=1}^m p_i^{\alpha_i}\right)$
is the sum of all divisors $k$ of $n$ and can be written by summing over all possible combinations of the exponents $\beta_i$. There are $\prod_{i=1}^m \alpha_i$ combinations, and we can form their sum and simplify it as follows.
\begin{align}\sigma(n) &= \sum_{1\le i\le m,\ 0\le\beta_i\le\alpha_i}p_1^{\beta_i}p_2^{\beta_2}\cdots p_m^{\beta_m}\cr &= \sum_{\beta_1=0}^{\alpha_1}p_1^{\beta_1}\left(\sum_{2\le i\le m,\ 0\le\beta_i\le\alpha_i}p_2^{\beta_2}p_3^{\beta_3}\cdots p_m^{\beta_m}\right)\cr &= \sum_{\beta_1=0}^{\alpha_1}p_1^{\beta_1}\sum_{\beta_2=0}^{\alpha_2}p_2^{\beta_2}\left(\sum_{3\le i\le m,\ 0\le\beta_i\le\alpha_i}p_3^{\beta_3}p_4^{\beta_4}\cdots p_m^{\beta_m}\right) \cr &= \vdots\cr &=\sum_{\beta_1=0}^{\alpha_1}p_1^{\beta_1}\sum_{\beta_2=0}^{\alpha_2}p_2^{\beta_2}\sum_{\beta_3=0}^{\alpha_3}p_3^{\beta_3}\ \cdots\ \sum_{\beta_m=0}^{\alpha_m}p_m^{\beta_m}\cr &=\sigma(p_1^{\alpha_1})\sigma(p_2^{\alpha_2})\cdots\sigma(p_m^{\alpha_m}).\end{align}
This completes the proof. Q.E.D.
Thus, we now have a formula for the sum of divisors of an arbitrary positive integer $n$ using the factorization of $n$. Namely,
$\sigma(n)=\sigma\left(\prod_{i=1}^m p_i^{\alpha_i}\right)=\prod_{i=1}^m\left(\frac{p_i^{\alpha_i+1}-1}{p_i-1}\right).$ | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
This is something I use quite a bit for various problems and programming exercises, so I figured I could post it here. It’s a basic post that isn’t advanced at all, but that doesn’t mean that the implementation given below won’t save work for others. The idea is to create a list of primes in C by malloc’ing a sieve, then malloc’ing a list of specific length based on that sieve. The resulting list contains all the primes below a given limit (defined in the code). The first member of the list is an integer representing the length of the list.
#include <stdio.h> #include <stdlib.h> #include <malloc.h> #define bool _Bool static unsigned long prime_limit = 1000000; unsigned long sqrtld(unsigned long N) { int b = 1; unsigned long res,s; while(1<<b<N) b+= 1; res = 1<<(b/2 + 1); for(;;) { s = (N/res + res)/2; if(s>=res) return res; res = s; } } unsigned long * make_primes(unsigned long limit) { unsigned long *primes; unsigned long i,j; unsigned long s = sqrtld(prime_limit); unsigned long n = 0; bool *sieve = malloc((prime_limit + 1) * sizeof(bool)); sieve[0] = 0; sieve[1] = 0; for(i=2; i<=prime_limit; i++) sieve[i] = 1; j = 4; while(j<=prime_limit) { sieve[j] = 0; j += 2; } for(i=3; i<=s; i+=2) { if(sieve[i] == 1) { j = i * 3; while(j<=prime_limit) { sieve[j] = 0; j += 2 * i; } } } for(i=2;i<=prime_limit;i++) if(sieve[i]==1) n += 1; primes = malloc((n + 1) * sizeof(unsigned long)); primes[0] = n; j = 1; for(i=2;i<=prime_limit;i++) if(sieve[i]==1) { primes[j] = i; j++; } free(sieve); return primes; } int main(void) { unsigned long * primes = make_primes(prime_limit); printf("There are %ld primes <= %ld\n",primes[0],prime_limit); free(primes); return 0; }
Say one wanted to form a list of all primes below 1,000,000. That’s what the above program does by default, since “prime_limit = 1000000.” If one compiles this and executes, you would get something like what follows. The timing is relatively respectable. | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
$gcc -O3 -o prime-sieve prime-sieve.c$ time ./prime-sieve There are 78498 primes <= 1000000 real 0m0.008s user 0m0.004s sys 0m0.000s
The code is linked here: prime-sieve.c | {
"domain": "jasonbhill.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747119378474,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 1626.5125118132278,
"openwebmath_score": 0.7797718644142151,
"tags": null,
"url": "http://code.jasonbhill.com/category/algorithms/"
} |
# Triangles in 20 non-straight-line "dots"
• August 22nd 2010, 07:07 AM
grottvald
Triangles in 20 non-straight-line "dots"
Twenty points/dots are given so that the three of them are never in a straight line. How many triangles can be formed with corners(as in vertex i think?) in the dots?
• August 22nd 2010, 07:21 AM
Plato
Calculate the number of ways to choose three points from twenty.
• August 22nd 2010, 10:36 AM
grottvald
C(20,3) ? But that results in a very big number that seems unlikely to be correct (Worried)
• August 22nd 2010, 10:57 AM
Plato
Quote:
Originally Posted by grottvald
C(20,3) ? But that results in a very big number that seems unlikely to be correct
It is not a large number at all: $\displaystyle \binom{20}{3}=\frac{20!}{3!\cdot 17!}=1140$
• August 22nd 2010, 11:58 AM
Quote:
Originally Posted by grottvald
C(20,3) ? But that results in a very big number that seems unlikely to be correct (Worried)
You may be thinking of non-overlapping triangles in the picture with 20 dots.
That's a different situation.
Imagine the dots are placed apart from left to right, not on a straight line.
Pick the leftmost point.
To make a triangle, you can pick any 2 of the remaining 19 dots.
The number of ways to do this is $\binom{19}{2}=171$
Therefore, there are 171 triangles that can be drawn which include the leftmost point.
If you move on to the next point to the right and exclude the point previously chosen,
then you can draw another $\binom{18}{2}=153$ triangles.
These triangles do not include any of the previous 171,
since these 153 omit the leftmost point.
Notice that these triangles typically share sides of other triangles,
but they are made of 3 distinct points, hence the triangles are being counted only once.
hence, there are $\binom{19}{2}+\binom{18}{2}+\binom{17}{2}+........ .+\binom{2}{2}=\binom{20}{3}$ triangles.
• August 22nd 2010, 01:26 PM
grottvald
Quote: | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747102361404,
"lm_q2_score": 0.867035763237924,
"openwebmath_perplexity": 722.7878330307632,
"openwebmath_score": 0.6234351396560669,
"tags": null,
"url": "http://mathhelpforum.com/geometry/154183-triangles-20-non-straight-line-dots-print.html"
} |
You may be thinking of non-overlapping triangles in the picture with 20 dots.
That's a different situation.
Imagine the dots are placed apart from left to right, not on a straight line.
Pick the leftmost point.
To make a triangle, you can pick any 2 of the remaining 19 dots.
The number of ways to do this is $\binom{19}{2}=171$
Therefore, there are 171 triangles that can be drawn which include the leftmost point.
If you move on to the next point to the right and exclude the point previously chosen,
then you can draw another $\binom{18}{2}=153$ triangles.
These triangles do not include any of the previous 171,
since these 153 omit the leftmost point.
Notice that these triangles typically share sides of other triangles,
but they are made of 3 distinct points, hence the triangles are being counted only once.
hence, there are $\binom{19}{2}+\binom{18}{2}+\binom{17}{2}+........ .+\binom{2}{2}=\binom{20}{3}$ triangles.
Thank you so much! You explained it in an very easy and beautiful way. Thanks again! | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874090230069,
"lm_q1q2_score": 0.8588747102361404,
"lm_q2_score": 0.867035763237924,
"openwebmath_perplexity": 722.7878330307632,
"openwebmath_score": 0.6234351396560669,
"tags": null,
"url": "http://mathhelpforum.com/geometry/154183-triangles-20-non-straight-line-dots-print.html"
} |
# $\int\frac{g(x)}{f(x)} \, dx$ where $f(x) = \frac{1}{2}(e^x+e^{-x})$ and $g(x) = \frac{1}{2}(e^x - e^{-x})$?
Given two functions $$f(x) = \frac{1}{2}(e^x+e^{-x})$$ and $$g(x) = \frac{1}{2}(e^x - e^{-x})$$, calculate
$$\int\frac{g(x)}{f(x)} \, dx.$$
Observing that $$f'(x) = g(x)$$, this is very easy to do. Just take $$u = f(x)$$ and therefore $$du = f'(x)\,dx$$. Now we have
$$\int \frac{f'(x)}{f(x)} \, dx = \int \frac{du}{u} = \ln |u| + C = \ln\left|\frac{1}{2}(e^x+e^{-x})\right|+C.$$
However, this solution is wrong. The correct one is $$\ln|e^x+e^{-x}| + C$$. I see how we could get that, just plug in $$g(x)$$ and $$f(x)$$ directly, and we get
$$\int \frac{\frac{1}{2}(e^x - e^{-x})}{\frac{1}{2}(e^x+e^{-x})} \, dx.$$
Cancelling the $$\frac{1}{2}$$'s and taking $$u = e^x+e^{-x}$$ and $$du = (e^x-e^{-x}) dx$$ gives us
$$\int \frac{du}{u} = \ln|u| + C = \ln|e^x+e^{-x}| + C.$$
I can't see where I made a mistake in my approach, and I'd be really grateful if you pointed it out. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.969785409439575,
"lm_q1q2_score": 0.8588724741307903,
"lm_q2_score": 0.8856314662716159,
"openwebmath_perplexity": 463.9013710302533,
"openwebmath_score": 0.7617987990379333,
"tags": null,
"url": "https://math.stackexchange.com/questions/3687083/int-fracgxfx-dx-where-fx-frac12exe-x-and-gx"
} |
I can't see where I made a mistake in my approach, and I'd be really grateful if you pointed it out.
• Please try to make the titles of your questions more informative. For example, Why does $a<b$ imply $a+c<b+c$? is much more useful for other users than A question about inequality. From How can I ask a good question?: Make your title as descriptive as possible. In many cases one can actually phrase the title as the question, at least in such a way so as to be comprehensible to an expert reader. You can find more tips for choosing a good title here. – Shaun May 22 at 18:47
• Thanks, I will do that next time. :) – Gregor Perčič May 22 at 19:01
• I feel terrible mentioning it because I know you're only trying to be polite but could you remove the religious elements at the end? There are likely many faiths none should be given a platform – Karl May 22 at 19:10
• @Karl With all due respect, I will not remove it. It is very good to try to propagate the Faith in all contexts of life. The mods may remove it, but hey, I did my best. Not to mention that my right to free speech will be trampled on in this instance. – Gregor Perčič May 22 at 19:29
• I ment no offence honestly. I'd just rather stick to maths. – Karl May 22 at 19:38 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.969785409439575,
"lm_q1q2_score": 0.8588724741307903,
"lm_q2_score": 0.8856314662716159,
"openwebmath_perplexity": 463.9013710302533,
"openwebmath_score": 0.7617987990379333,
"tags": null,
"url": "https://math.stackexchange.com/questions/3687083/int-fracgxfx-dx-where-fx-frac12exe-x-and-gx"
} |
Note that if $$K$$ is a constant, $$\ln|K h(x)|= \ln|K|+\ln|h(x)|$$. In other words, the $$1/2$$ in the log can get 'absorbed' into the $$+C$$ term.
• Aaaaah, I see! But then that means that my solution $\ln|\frac{1}{2}(e^x + e^{-x})| + C$ doesn't by itself (with $C = 0$) calculate the area under the curve $h(x) = \frac{f(x)}{g(x)}$? – Gregor Perčič May 22 at 19:00
• It seems $f$ and $g$ are reversed in your comment. It should, in the sense that $$\int _{0}^x \frac{g(t)}{f(t)}\,dt = \left.\ln|\frac{1}{2}(e^t + e^{-t})|+C\right|_{0}^x$$ $$= \left(\ln|\frac{1}{2}(e^x + e^{-x})|+C\right)-\left(\ln|\frac{1}{2}(1+1)|+C\right)=\ln|\frac{1}{2}(e^x + e^{-x})|$$The $1/2$ is essential to make sure, starting at $x=0$, the area is $0$; otherwise, you'll be off by a constant. – Integrand May 22 at 19:25
• Yes, $f$ and $g$ are reversed. Sorry about that and thanks for the insight. – Gregor Perčič May 22 at 19:32
Using the identity: $$\log (\frac{a}{b})=\log(a)- \log(b)$$
$$\ln \frac{1}{2}(e^x+e^{-x})+C$$
$$=\ln (e^x+e^{-x})-\ln 2+C$$
$$=\ln (e^x+e^{-x})+C{'}$$ (as $$\ln 2$$ is constant) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.969785409439575,
"lm_q1q2_score": 0.8588724741307903,
"lm_q2_score": 0.8856314662716159,
"openwebmath_perplexity": 463.9013710302533,
"openwebmath_score": 0.7617987990379333,
"tags": null,
"url": "https://math.stackexchange.com/questions/3687083/int-fracgxfx-dx-where-fx-frac12exe-x-and-gx"
} |
# Monthly Archives: August 2015
## Marilyn vos Savant Conditional Probability Follow Up
In the Marilyn vos Savant problem I posted yesterday, I focused on the subtle shift from simple to conditional probability the writer of the question appeared to miss. Two of my students took a different approach.
The majority of my students, typical of AP Statistics students’ tendencies very early in the course, tried to use a “wall of words” to explain away the discrepancy rather than providing quantitative evidence. But two fully embraced the probabilities and developed the following probability tree to incorporate all of the given probabilities. Each branch shows the probability of a short or long straw given the present state of the system. Notice that it includes both of the apparently confounding 1/3 and 1/2 probabilities.
The uncontested probability of the first person is 1/4.
The probability of the second person is then (3/4)(1/3) = 1/4, exactly as expected. The probabilities of the 3rd and 4th people can be similarly computed to arrive at the same 1/4 final result.
My students argued essentially that the writer was correct in saying the probability of the second person having the short straw was 1/3 in the instant after it was revealed that the first person didn’t have the straw, but that they had forgotten to incorporate the probability of arriving in that state. When you use all of the information, the probability of each person receiving the short straw remains at 1/4, just as expected.
## Marilyn vos Savant and Conditional Probability
The following question appeared in the “Ask Marilyn” column in the August 16, 2015 issue of Parade magazine. The writer seems stuck between two probabilities.
(Click here for a cleaned-up online version if you don’t like the newspaper look.)
I just pitched this question to my statistics class (we start the year with a probability unit). I thought some of you might like it for your classes, too. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541734255229,
"lm_q1q2_score": 0.8588683051427728,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 1911.5803115971619,
"openwebmath_score": 0.6689112782478333,
"tags": null,
"url": "https://casmusings.wordpress.com/2015/08/"
} |
I asked them to do two things. 1) Answer the writer’s question, AND 2) Use precise probability terminology to identify the source of the writer’s conundrum. Can you answer both before reading further?
Very briefly, the writer is correct in both situations. If each of the four people draws a random straw, there is absolutely a 1 in 4 chance of each drawing the straw. Think about shuffling the straws and “dealing” one to each person much like shuffling a deck of cards and dealing out all of the cards. Any given straw or card is equally likely to land in any player’s hand.
Now let the first person look at his or her straw. It is either short or not. The author is then correct at claiming the probability of others holding the straw is now 0 (if the first person found the short straw) or 1/3 (if the first person did not). And this is precisely the source of the writer’s conundrum. She’s actually asking two different questions but thinks she’s asking only one.
The 1/4 result is from a pure, simple probability scenario. There are four possible equally-likely locations for the short straw.
The 0 and 1/3 results happen only after the first (or any other) person looks at his or her straw. At that point, the problem shifts from simple probability to conditional probability. After observing a straw, the question shifts to determining the probability that one of the remaining people has the short straw GIVEN that you know the result of one person’s draw.
So, the writer was correct in all of her claims; she just didn’t realize she was asking two fundamentally different questions. That’s a pretty excusable lapse, in my opinion. Slips into conditional probability are often missed. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541734255229,
"lm_q1q2_score": 0.8588683051427728,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 1911.5803115971619,
"openwebmath_score": 0.6689112782478333,
"tags": null,
"url": "https://casmusings.wordpress.com/2015/08/"
} |
Perhaps the most famous of these misses is the solution to the Monty Hall scenario that vos Savant famously posited years ago. What I particularly love about this is the number of very-well-educated mathematicians who missed the conditional and wrote flaming retorts to vos Savant brandishing their PhDs and ultimately found themselves publicly supporting errant conclusions. You can read the original question, errant responses, and vos Savant’s very clear explanation here.
CONCLUSION:
Probability is subtle and catches all of us at some point. Even so, the careful thinking required to dissect and answer subtle probability questions is arguably one of the best exercises of logical reasoning around.
RANDOM(?) CONNECTION:
As a completely different connection, I think this is very much like Heisenberg’s Uncertainty Principle. Until the first straw is observed, the short straw really could (does?) exist in all hands simultaneously. Observing the system (looking at one person’s straw) permanently changes the state of the system, bifurcating forever the system into one of two potential future states: the short straw is found in the first hand or is it not.
CORRECTION (3 hours after posting):
I knew I was likely to overstate or misname something in my final connection. Thanks to Mike Lawler (@mikeandallie) for a quick correction via Twitter. I should have called this quantum superposition and not the uncertainty principle. Thanks so much, Mike.
## SBG and AP Statistics Update
I’ve continued to work on my Standards for AP Statistics and after a few conversations with colleagues and finding this pdf of AP Statistics Standards, I’ve winnowed down and revised my Standards to the point I’m comfortable using them this year. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541734255229,
"lm_q1q2_score": 0.8588683051427728,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 1911.5803115971619,
"openwebmath_score": 0.6689112782478333,
"tags": null,
"url": "https://casmusings.wordpress.com/2015/08/"
} |
Following is the much shorter document I’m using in my classes this year. They address the AP Statistics core content as well as the additional ideas, connections, etc. I hope my students learn this year. As always, I welcome all feedback, and I hope someone else finds these guides helpful.
## SBG and Statistics
I’ve been following Standards-Based Grading (SBG) for several years now after first being introduced to the concept by colleague John Burk (@occam98). Thanks, John!
I finally made the dive into SBG with my Summer School Algebra 2 class this past June & July, and I’ve fully committed to an SBG pilot for my AP Statistics classes this year.
I found writing standards for Algebra 2 this summer relatively straightforward. I’ve taught that content for decades now and know precisely what I want my students to understand. I needed some practice writing standards and got better as the summer class progressed. Over time, I’ve read several teachers’ versions of standards for various courses. But writing standards for my statistics class prove MUCH more challenging. In the end, I found myself guided by three major philosophies. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541734255229,
"lm_q1q2_score": 0.8588683051427728,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 1911.5803115971619,
"openwebmath_score": 0.6689112782478333,
"tags": null,
"url": "https://casmusings.wordpress.com/2015/08/"
} |
1. The elegance and challenge of well designed Enduring Understandings from the Understanding by Design (UbD) work of Jay McTighe the late Grant Wiggins helped me craft many of my standards as targets for student learning that didn’t necessarily reveal everything all at once.
2. The power of writing student-centered “I can …” statements that I learned through my colleague Jill Gough (@jgough) has become very important in my classroom design. I’ve become much more focused on what I want my students (“learners” in Jill’s parlance) to be able to accomplish and less about what I’m trying to deliver. This recentering of my teaching awareness has been good for my continuing professional development and was a prime motivator in writing these Standards.
3. I struggled throughout the creation of my first AP Statistics standards document to find a balance between too few very broad high-level conceptual claims and a far-too-granular long list of skill minutiae. I wanted more than a narrow checklist of tiny skills and less than overloaded individual standards that are difficult for students to satisfy. I want a challenging, but reachable bar.
So, following is my first attempt at Standards for my AP Statistics class, and I’ll be using them this year. In sharing this, I have two hopes:
• Maybe some teacher out there might find some use in my Standards.
• More importantly, I’d LOVE some feedback from anyone on this work. It feels much too long to me, but I wonder if it is really too much or too little. Have I left something out?
At some point, all work needs a public airing to improve. That time for me is now. Thank you in advance on behalf of my students for any feedback.
## Chemistry, CAS, and Balancing Equations | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541734255229,
"lm_q1q2_score": 0.8588683051427728,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 1911.5803115971619,
"openwebmath_score": 0.6689112782478333,
"tags": null,
"url": "https://casmusings.wordpress.com/2015/08/"
} |
## Chemistry, CAS, and Balancing Equations
Here’ s a cool application of linear equations I first encountered about 20 years ago working with chemistry colleague Penney Sconzo at my former school in Atlanta, GA. Many students struggle early in their first chemistry classes with balancing equations. Thinking about these as generalized systems of linear equations gives a universal approach to balancing chemical equations, including ionic equations.
This idea makes a brilliant connection if you teach algebra 2 students concurrently enrolled in chemistry, or vice versa.
FROM CHEMISTRY TO ALGEBRA
Consider burning ethanol. The chemical combination of ethanol and oxygen, creating carbon dioxide and water:
$C_2H_6O+3O_2 \longrightarrow 2CO_2+3H_2O$ (1)
But what if you didn’t know that 1 molecule of ethanol combined with 3 molecules of oxygen gas to create 2 molecules of carbon dioxide and 3 molecules of water? This specific set coefficients (or multiples of the set) exist for this reaction because of the Law of Conservation of Matter. While elements may rearrange in a chemical reaction, they do not become something else. So how do you determine the unknown coefficients of a generic chemical reaction?
Using the ethanol example, assume you started with
$wC_2H_6O+xO_2 \longrightarrow yCO_2+zH_2O$ (2)
for some unknown values of w, x, y, and z. Conservation of Matter guarantees that the amount of carbon, hydrogen, and oxygen are the same before and after the reaction. Tallying the amount of each element on each side of the equation gives three linear equations:
Carbon: $2w=y$
Hydrogen: $6w=2z$
Oxygen: $w+2x=2y+z$
where the coefficients come from the subscripts within the compound notations. As one example, the carbon subscript in ethanol ( $C_2H_6O$ ) is 2, indicating two carbon atoms in each ethanol molecule. There must have been 2w carbon atoms in the w ethanol molecules. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541734255229,
"lm_q1q2_score": 0.8588683051427728,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 1911.5803115971619,
"openwebmath_score": 0.6689112782478333,
"tags": null,
"url": "https://casmusings.wordpress.com/2015/08/"
} |
This system of 3 equations in 4 variables won’t have a unique solution, but let’s see what my Nspire CAS says. (NOTE: On the TI-Nspire, you can solve for any one of the four variables. Because the presence of more variables than equations makes the solution non-unique, some results may appear cleaner than others. For me, w was more complicated than z, so I chose to use the z solution.)
All three equations have y in the numerator and denominators of 2. The presence of the y indicates the expected non-unique solution. But it also gives me the freedom to select any convenient value of y I want to use. I’ll pick $y=2$ to simplify the fractions. Plugging in gives me values for the other coefficients.
Substituting these into (2) above gives the original equation (1).
VARIABILITY EXISTS
Traditionally, chemists write these equations with the lowest possible natural number coefficients, but thinking of them as systems of linear equations makes another reality obvious. If 1 molecule of ethanol combines with 3 molecules of hydrogen gas to make 2 molecules of carbon dioxide and 3 molecules of water, surely 10 molecule of ethanol combines with 30 molecules of hydrogen gas to make 20 molecules of carbon dioxide and 30 molecules of water (the result of substituting $y=20$ instead of the $y=2$ used above).
You could even let $y=1$ to get $z=\frac{3}{2}$, $w=\frac{1}{2}$, and $x=\frac{3}{2}$. Shifting units, this could mean a half-mole of ethanol and 1.5 moles of hydrogen make a mole of carbon dioxide and 1.5 moles of water. The point is, the ratios are constant. A good lesson.
ANOTHER QUICK EXAMPLE:
Now let’s try a harder one to balance: Reacting carbon monoxide and hydrogen gas to create octane and water.
$wCO + xH_2 \longrightarrow y C_8 H_{18} + z H_2 O$
Setting up equations for each element gives
Carbon: $w=8y$
Oxygen: $w=z$
Hydrogen: $2x=18y+2z$
I could simplify the hydrogen equation, but that’s not required. Solving this system of equations gives | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541734255229,
"lm_q1q2_score": 0.8588683051427728,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 1911.5803115971619,
"openwebmath_score": 0.6689112782478333,
"tags": null,
"url": "https://casmusings.wordpress.com/2015/08/"
} |
Nice. No fractions this time. Using $y=1$ gives $w=8$, $x=17$, and $z=8$, or
$8CO + 17H_2 \longrightarrow C_8 H_{18} + 8H_2 O$
Simple.
EXTENSIONS TO IONIC EQUATIONS:
Now let’s balance an ionic equation with unknown coefficients a, b, c, d, e, and f:
$a Ba^{2+} + b OH^- + c H^- + d PO_4^{3-} \longrightarrow eH_2O + fBa_3(PO_4)_2$
In addition to writing equations for barium, oxygen, hydrogen, and phosphorus, Conservation of Charge allows me to write one more equation to reflect the balancing of charge in the reaction.
Barium: $a = 3f$
Oxygen: $b +4d = e+8f$
Hydrogen: $b+c=2e$
Phosphorus: $d=2f$
CHARGE (+/-): $2a-b-c-3d=0$
Solving the system gives
Now that’s a curious result. I’ll deal with the zeros in a moment. Letting $d=2$ gives $f=1$ and $a=3$, indicating that 3 molecules of ionic barium combine with 2 molecules of ionic phosphate to create a single uncharged molecule of barium phosphate precipitate.
The zeros here indicate the presence of “spectator ions”. Basically, the hydroxide and hydrogen ions on the left are in equal measure to the liquid water molecule on the right. Since they are in equal measure, one solution is
$3Ba^{2+}+6OH^- +6H^-+2PO_4^{3-} \longrightarrow 6H_2O + Ba_3(PO_4)_2$
CONCLUSION:
You still need to understand chemistry and algebra to interpret the results, but combining algebra (and especially a CAS) makes it much easier to balance chemical equations and ionic chemical equations, particularly those with non-trivial solutions not easily found by inspection.
The minor connection between science (chemistry) and math (algebra) is nice.
As many others have noted, CAS enables you to keep your mind on the problem while avoiding getting lost in the algebra. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541734255229,
"lm_q1q2_score": 0.8588683051427728,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 1911.5803115971619,
"openwebmath_score": 0.6689112782478333,
"tags": null,
"url": "https://casmusings.wordpress.com/2015/08/"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.