Jump to content

Wikipedia:Reference desk/Mathematics: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Non-Euclidian geometry
Fuzzyeric (talk | contribs)
Line 86: Line 86:


:Firstly a remark: If you have Hessians (i.e. second derivatives) of ''f'', why not use Newton to find zeros of the derivative, rather than conjugate gradients? On your specific question: if your (x1,y1), (x2,y2) are very close (say <math>10^{-7}</math>) and you cannot get more accurate solutions due to numerical errors (say your function values are only exact to 7 decimal places), then there is nothing you can do. Sampling intermediate points will just give you noise based on those numerical errors. You will just have to accept that up to 7-digits exact these ARE the same mountain. Some smoothness argument (Lipschitz continuity of the derivative) will help in establishing that in a vincinity of your (x1,y1)/(x2,y2) there are no points with large values of f' (which would make those two separate mountains).[[User:195.128.250.110|195.128.250.110]] 23:04, 13 December 2006 (UTC)
:Firstly a remark: If you have Hessians (i.e. second derivatives) of ''f'', why not use Newton to find zeros of the derivative, rather than conjugate gradients? On your specific question: if your (x1,y1), (x2,y2) are very close (say <math>10^{-7}</math>) and you cannot get more accurate solutions due to numerical errors (say your function values are only exact to 7 decimal places), then there is nothing you can do. Sampling intermediate points will just give you noise based on those numerical errors. You will just have to accept that up to 7-digits exact these ARE the same mountain. Some smoothness argument (Lipschitz continuity of the derivative) will help in establishing that in a vincinity of your (x1,y1)/(x2,y2) there are no points with large values of f' (which would make those two separate mountains).[[User:195.128.250.110|195.128.250.110]] 23:04, 13 December 2006 (UTC)

:: You '''may''' be able to achieve [[superresolution]] in this numerical problem by replacing your function with its [[Pade approximant]]. The Pade approximant is a rational polynomial approximation to the function. If your f() is sufficiently well-behaved, then its approximant will be a faithful approximation. Note that [[meromorphic]] is sufficient. The advantage of the approximant is that you can use symbolic methods (derivatives of rational polynomial functions can be computed by what amounts to elementary arithmetic on lists of pairs of coefficients and powers) to determine whether there's a zero between the two peaks and/or to determine whether the Hessian has the same sign at the two peaks.
:: For many "natural" problems, the Pade approximant is a surprisingly rapidly faithfully converging approximation. The simplicity of the arithmetic on rational polynomials is another benefit.
:: In this application, you'd sample a bunch of points scattered around your two nearly coincident peaks and use those pairs of inputs and output to build your approximant. There are canned codes for this and the Pade approximant article references "Numerical Recipes". Note that this is a variety of superresolution/extrapolation, so your result could be wrong, but you're making the best guess you can with the data you've got.
[[User:Fuzzyeric|Fuzzyeric]] 04:17, 14 December 2006 (UTC)


== Rate of Return with Multiple Capital Injections ==
== Rate of Return with Multiple Capital Injections ==

Revision as of 04:17, 14 December 2006


Science Mathematics Computing/IT Humanities
Language Entertainment Miscellaneous Archives
How to ask a question
  • Search first. It's quicker, because you can find the answer in our online encyclopedia instead of waiting for a volunteer to respond. Search Wikipedia using the searchbox. A web search could help too. Common questions about Wikipedia itself, such as how to cite Wikipedia and who owns Wikipedia, are answered in Wikipedia:FAQ.
  • Sign your question. Type ~~~~ at its end.
  • Be specific. Explain your question in detail if necessary, addressing exactly what you'd like answered. For information that changes from country to country (or from state to state), such as legal, fiscal or institutional matters, please specify the jurisdiction you're interested in.
  • Include both a title and a question. The title (top box) should specify the topic of your question. The complete details should be in the bottom box.
  • Do your own homework. If you need help with a specific part or concept of your homework, feel free to ask, but please don't post entire homework questions and expect us to give you the answers.
  • Be patient. Questions are answered by other users, and a user who can answer may not be reading the page immediately. A complete answer to your question may be developed over a period of up to seven days.
  • Do not include your e-mail address. Questions aren't normally answered by e-mail. Be aware that the content on Wikipedia is extensively copied to many websites; making your e-mail address public here may make it very public throughout the Internet.
  • Edit your question for more discussion. Click the [edit] link on right side of its header line. Please do not start multiple sections about the same topic.
  • Archived questions If you cannot find your question on the reference desks, please see the Archives.
  • Unanswered questions If you find that your question has been archived before being answered, you may copy your question from the Archives into a new section on the reference desk.
  • Do not request medical or legal advice.
    Ask a doctor or lawyer instead.
After reading the above, you may
ask a new question by clicking here.

Your question will be added at the bottom of the page.
How to answer a question
  • Be thorough. Please provide as much of the answer as you are able to.
  • Be concise, not terse. Please write in a clear and easily understood manner. Keep your answer within the scope of the question as stated.
  • Link to articles which may have further information relevant to the question.
  • Be polite to users, especially ones new to Wikipedia. A little fun is fine, but don't be rude.
  • The reference desk is not a soapbox. Please avoid debating about politics, religion, or other sensitive issues.


December 6

Is a point inside a given triangle?

The problem above on the probability of an arbitrary shape balancing on 3 random-chosen points hinged on whether the triangle of the points included the shape's centroid. Which made me wonder - is there a simple test to determine whether or not the point (x,y) is within the triangle formed by the points (x1,y1), (x2,y2) and (x3,y3)?86.132.238.194 00:21, 6 December 2006 (UTC)[reply]

There are lots of tests, and we probably ought to have a article on the problem, but it appears that we don't... this is a good idea for computer work, although it could be optimized further. Does that count as simple? Melchoir 00:39, 6 December 2006 (UTC)[reply]
The probability of a point being inside a triangle is surely just area of a triangle / total area (assuming there's equal probability of the point happening in the "total area". --h2g2bob 00:56, 6 December 2006 (UTC)[reply]
Right, but does that help? The original question has a fixed centroid whereas all three vertices of the triangle are chosen at random, so its area varies. Melchoir 01:15, 6 December 2006 (UTC)[reply]
He wasn't talking about the probability...83.100.138.168 09:32, 6 December 2006 (UTC)[reply]

I had a look at your test "Melchoir" and it looks right - check to see if a point is on the same side of line AB (of triangle ABC) as point C, repeat for AC and BC , if all three are true the answer is yes...(it's also the simplest and quickest way as well)

The other possibilty is to express point (x,y) as (x1,y1)+n(x2-x1,y2-y1)+m(x3-x1,y3-y1) ie express point (x,y) as point A plus n times vector AB plus m times vector AC. n and m are obtained by solving the above equation separately for the x terms and the y terms (two linear equations with two unknowns). For the point to be in the triangle n>0 and m>0 and n+m<1

(x1,y1)+n(x2-x1,y2-y1)+m(x3-x1,y3-y1)=(x,y)

Giving x1+n(x2-x1)+m(x3-x1)=x and y1+n(y2-y1)+m(y3-y1)=y solve these for n and m.

eg solving for n by eliminating m m=[y-y1-n(y2-y1)]/(y3-y1) from second equation (could use either)

putting this into first equation x1+n(x2-x1)+(x3-x1)[(y-y1)-n(y2-y1)]/(y3-y1)=x

n[(x2-x1)(y3-y1)-(x3-x1)(y2-y1)]/(y3-y1) =[(x-x1)(y3-y1)-(x3-x1)(y-y1)]/(y3-y1)

n=[(x-x1)(y3-y1)-(x3-x1)(y-y1)]/[(x2-x1)(y3-y1)-(x3-x1)(y2-y1)] and m by a similar proceedure - note this method also can give the relative position inside the triangle but requires a little more computation. Probably no reason to expand all that for you. If you need more try a page or site on "ray tracing" these two equations pop up all the time in such places (usually the three dimensional form) 83.100.138.168 09:51, 6 December 2006 (UTC)[reply]

Note this is a reduced form of Line-plane intersection (equations in matrix form at this page).83.100.138.168 10:00, 6 December 2006 (UTC)[reply]

Question:can anyone give a third method - can anyone prove there is no third method??83.100.138.168 10:05, 6 December 2006 (UTC)[reply]

There are many ways to decide the point-in-triangle question, and the differences have practical implication for computational geometry and computer graphics. The article Point in Polygon Strategies discusses a number of alternatives (for a more general problem) in the context of computer graphics. Jonathan Shewchuk discusses robust primitives for use in computational geometry.
Here are a few alternatives:
  1. Shoot a ray from the probe point to infinity in any direction; if it crosses an odd number of edges, the point is inside. (Hitting a vertex is not a problem if done properly.)
  2. Perform a "left of" test for each edge; if all succeed, the point is inside.
  3. Compute the barycentric coordinates of the probe point with respect to the triangle; if all are positive, the point is inside.
  4. Compute the angle at the probe point for each edge segment; if the sum of the angles is 2π, the point is inside.
  5. Compute the (unsigned) area formed by the probe point and a pair of triangle vertices; if the sum of the three areas equals the triangle area, the point is inside.
The first test is fast using a horizontal ray and common in computer graphics. The second test is robust and common in computational geometry. --KSmrqT 16:57, 6 December 2006 (UTC)[reply]
Super Excellent - I never would have thought of those, especially the 'sum of angles' one. Thanks.87.102.6.143 17:38, 6 December 2006 (UTC)[reply]
I'm not sure about the "sum of the angles is 2π" test. Even if the point is outside the triangle, the sum of the three angles formed by drawing edge segments to each of the three points of the triangle will be 2π because the three angles form a complete circle around the point. However, I think (haven't proven) that a related test that might work would be that all three angles must be less than π. That's because if any one of the angles is greater than π, the picture would look like a cone emanating from the point in question, with all three edges leading from that point to the triangle, sort of like a flashlight shining on the triangle from the outside. (Not a mathematical argument, of course, but visually it makes sense). Dugwiki 20:45, 6 December 2006 (UTC)[reply]
I think KSmrq is using interior angles, whereas your angles seem to be directed. Either family of methods ought to work. Melchoir 21:09, 6 December 2006 (UTC)[reply]
Ah, ok, that would explain it. Like you said, both methods are basically equivalent. Thanks. Dugwiki 21:18, 6 December 2006 (UTC)[reply]
Depending on the size of the triangle compared to the "pointable" zone, it might be a good idea to test if the point is inside the triangle's bounding box before using Melchior's test. yandman 15:38, 6 December 2006 (UTC)[reply]

Circle and parabola

Let's suppose we have a circle of radius R centered at (0, R), and a parabola with the vertex at the origin. Let's say, we wanted to find the area that is between the circle and the parabola. What's a good way to parameterize this question so that it's easily solved? If I recall correctly, this might be a Putnam problem. --HappyCamper 20:28, 6 December 2006 (UTC)[reply]

Hmm, I know I'm rusty, but what about having the parabola be and the circle be ? Then the area between the two would be where z is the non-zero point of intersection where f(z)=g(z)? The trick then is to find z.... Dugwiki 21:05, 6 December 2006 (UTC)[reply]
That's the correct general idea, but the details are wrong. If I'm not mistaken, any parabola tangent to a circle and then intersecting it elsewhere as well (which it must if the equation is to make sense) must lie inside the circle between the intersections, so we should consider . But that's trivial: the real problem is that the equation of (here, the lower half of) a circle (derived from ) is ; in this case and in your notation, it's just . As for finding z, note that and you can rather quickly get a quadratic (in ) from the equation for g. Does that help? --Tardis 22:01, 6 December 2006 (UTC)[reply]
oops, I misread the problem. I was thinking the circle was centered at (r,0), which is why I had g(x)-f(x). My bad. Dugwiki 22:08, 6 December 2006 (UTC)[reply]
Do you mean the parabola described by y=k·x² with k>0, and the area which is above the parabola and below the circle arc? If so, then just draw a chord between intersection points. Then calculate two areas, between the chord and each curve, and sum them to get an answer. --CiaPan 07:07, 7 December 2006 (UTC)[reply]
For fun, let's try thinking "outside the box". Let's assume that we have "arms right": x = λy2, λ > 0. Then the upper arm must pass through the circle. However, we still have two plausible meanings for "between" from the two areas of the split circle. Fortunately, if we can find one, the other is easily determined as well. We know the parabola intersects the circle at the origin, (0,0). It also intersects at one other point, a joint solution of x−λy2 = 0 and x2+(yR)2R2 = 0. Scale the geometry so that R is 1, which also scales λ; the circle becomes x2+(y−1)2−1 = 0. Unfortunately, even with the simplification we find that the y intersection value is a root of λ2y3+y−2, which does not give a pretty answer. And as we all learn early, set problems have pretty answers. (Not so for real problems!) Apparently we have chosen the wrong geometry.
So let's rotate, and be more specific. A parabola of the form y = κx2, κ > 0, can completely contain the circle if κ is large enough; or it can give an uncertain meaning for the area if κ is small enough so that the arms intersect the circle symmetrically. Again fix R at 1 and adjust κ as needed; in fact, use y = 12κx2 so that κ > 1 will keep the arms in. Also demand the answer be the portion of the circle area within the arms of the parabola.
We can easily substitute for y in the circle equation to get a quadratic in x2, and so find that the intersections are at
This is pretty enough to suggest we've chosen the intended geometry. Now we are asked for a good parameterization. Frankly, we don't need one. Instead of splitting with a chord, as CiaPan suggests, let's split with a sector from the circle center. And given the bilateral symmetry, restrict attention to the right half. Since we have reduced to a unit circle, the area of the sector is merely the angle between the intersection and the vertical,
Finding the area of the parabola below the sector is now little challenge; we want
Finally, we sum the two, double the area, and convert the results to use the original R and κ.
Two cautions should be observed. First, the sought area may be that below the parabola; in that case, subtract our result from πR2. Second, unless (our reduced) κ is exactly 2, the circle bulges laterally beyond the intersection points; we include the extra area, which may be unwanted. --KSmrqT 14:45, 7 December 2006 (UTC)[reply]
I really appreciate the responses people! Yes, I think my wording was ambiguous. Let me get back on this question...I think I might be able to dig this up. --HappyCamper 02:03, 8 December 2006 (UTC)[reply]

grades

This is a real example, but I've wondered about this for awhile.

The class syllabus says that 70% of my grade is made up of tests (including the final exam).

If I have a C+ in the class, and the average grade of my tests is a B+, what grade do I need on my final to bring my overall grade up? Would I need anything higher than a B+ or anything higher than a C+? In other words, would it be true to say that regardless of "tests" and "homework" categories being grouped together and weighted differently, if you recieve a grade anything higher than your current overall average then it brings your overall average up?

It seems like such an easy question, no wonder I'm doing so poorly :)

--frothT C 21:24, 6 December 2006 (UTC)[reply]

A new grade, higher than the current average, will always raise the average, yes. But, by how much or how little is going to depend on the number of points involved. Average in this case would mean the total number of points you've gotten divided by the total number of possible points. So if you're currently at 700/1000 possible points, and you get a perfect score of 1/1 on a new assignment, the effect will be very small. See Arithmetic mean. Friday (talk) 21:30, 6 December 2006 (UTC)[reply]
Ah all right thanks friday --frothT C 21:34, 6 December 2006 (UTC)[reply]

But if the tests are weighted as 70% of the total grade, as I suspect, then Friday's summary will not work. Friday's example is based upon the idea the grades are based upon a point system whereas, based on what you wrote, it seems more of a block system, with each part given a block of the total grade (i.e. homework is worth 10%, projects 20%, and tests 70%). Irrespective of how many tests are given, the total worth is 70% of the grade. As such, if the test average drops, then the total grade will drop. For example, let's say your current point total is 440/500, or 88%. Then, on the next test, you get a 80. Now your point total for tests is 520/600, or 86.67%. However, this grade has the same weight in your total - 70%. Thus, you're 88% would make up .88 x .70 = .616, or 61.6 of the points in your grade. And once your test average drops to 86.67, .8667 x .70 = .6069, or 60.69 of the points to your grade. As a result, both your test and grade average have dropped - your test average by 1.33%, and your overall grade by .931%. So, in order to raise your grade, you need to get higher than your current test average on your next exam.--AstoVidatu 01:25, 7 December 2006 (UTC)[reply]

The distinction you're making only makes a difference when computing grades in the middle of the term. In classes that I've taken and taught, when something like "Tests are 75% of the total grade, homework is 20%, and attendance is 5%" appeared in the syllabus, it meant: everything that gets graded is worth a certain number of points, and the total number of points for tests is 75% of the total number of points, etc. When computing averages midway through the semester (which I usually don't do), it's simply number of points achieved so far, divided by number of points possible so far. As long as the teacher grades this way (reports grades this way, really), then Friday's analysis is correct. Tesseran 02:33, 7 December 2006 (UTC)[reply]

Very well could be. And yeah, if that is true, then Sr. Viernes is, as you said, right. --71.235.243.114 04:23, 7 December 2006 (UTC)[reply]

You might be interested in the related Simpson's paradox. StuRat 13:55, 7 December 2006 (UTC)[reply]


December 7

Efficient point mass forces

Suppose I have a set of points in Euclidean 2-space, with each point A represented on a computer by a vector (A_x, A_y). The points repel each other by an inverse exponent, i.e. the force of repulsion varies with 1 / rn, with n an arbitrary integer. For a particular point, A, I want to calculate the resultant force from all the other points. Assume all points are identical in all respects except their location.

What is the most computationally efficient way to calculate the resultant force on the point A from the other points? Once I have calculated the resultant force I will apply it and adjust the position of point A appropriately, then repeat the process on the next point, etc. What I need is a way to calculate the corresponding force in each dimension with as few computations as possible. Any ideas? Maelin (Talk | Contribs) 05:12, 7 December 2006 (UTC)[reply]

I'd say:

  1. Use two floats/doubles/whatever to store the total force on x and y for each point other than the one considered, calulate and store dx and dy (algebraic distances between the two points), add them and store it too. Then take the root of the sum of the squares to get r, calculate 1/r^n, multiply it by dx/(dx+dy)dx/r and put it in x, multiply it by dy/(dx+dy)dy/r and put it in y. Then continue. I know this is rather simplistic, but I don't think there's a simpler algorithm. yandman 10:33, 7 December 2006 (UTC)[reply]
  2. How are you thinking of "adjusting" the position of point A? I suppose you were thinking of Euler's method? If you want to avoid divergence problems, it might be better to use retrograde techniques, and if precision is what you want, a fEhlberg or RK4 method might be a better idea. yandman 10:41, 7 December 2006 (UTC)[reply]
Comment point 1, shouldn't that be dx/sqrt(dx2+dy2) not dx/(dx+dy) (I assumed you just simplifed the notation.
I can't see any real way to make it easier - there are n points, n-1 forces to sum. n(n-1) point point interactions overall.
You could attempt to speed r^n using r,r^2,(r^2)^2=r^4 etc eg if n=7 x=r^2 x2=x^2=x^4 there fore x^7=x2 times x times r. Thats 4 multiplies instead of 6 - it gets better as n increses depending on n. Did you mean speed it on a computational machine - or just the simplest method?83.100.174.147 11:20, 7 December 2006 (UTC)[reply]
Note if you store the Particle(n) to Particle(m) distance in memory when calculating it for particle(n) - you don't need to recalculate it for particle m reduced the number of calculations by 1/2 = 1/2n(n-1) particle particle calculation + 1/2n(n-1) particle particle calculation lookup from a stored memory. (Where you thinking interms of computers?)83.100.174.147 11:24, 7 December 2006 (UTC)[reply]
WHoops, I meant to put dx/r. Corrected. yandman 13:12, 7 December 2006 (UTC)[reply]
I would strongly suggest asking this at the science reference desk. There are important computational results that the typical mathematician would know nothing about. Among these are Leslie Greengard's 1987 Yale doctoral dissertation, The Rapid Evaluation of Potential Fields in Particle Systems, which won an ACM Distinguished Dissertation award. Sophisticated methods are hugely important in computational astronomy, physics, and chemistry. You might want to read these brief summaries, and consult this longer list of resources. Our mathematically-oriented article on the n-body problem offers no hint of this rich computational literature. --KSmrqT 15:17, 7 December 2006 (UTC)[reply]
Out of curiosity, what two-dimensional system gives you n > 1? Melchoir 16:09, 7 December 2006 (UTC)[reply]
A very small steel ball on a very thin table with very small magnets just underneath it is the usual excuse for asking students to do this, I think. yandman 16:30, 7 December 2006 (UTC)[reply]

Had a math test today, didn't go all that well but what the heck. I found one particular question rather amusing but sadly I wasn't able to solve it. Here goes:

The figure shows an area A that is limited by the functions f(x) = x + sin x and
g(x) = x. Calculate a so that the line x = a divides the area in two equal parts.

My approach was this: if f and g intersect in P_1(0:0) and P_2(w:z), then S(0->a)f(x)dx - S(0->a)g(x)dx = S(a->w)f(x)dx - S(a->w)g(x)dx Is this the right approach? I didn't get any further than that so I'd be glad if someone could provide an answer to the question. I tried to get the coordinates for P_2 by adding the two formulas but it didn't make much sense to me - isn't that how you're supposed to do to find out where two equations would intersect? Anyway if someone could provide an answer it'd be great, of course feel free to rename any variables you like. Thanks in advance. Jack Daw 10:05, 7 December 2006 (UTC)[reply]

Good work. All you then had to do was merge the integrals, you do S(0->a)(f(x)-g(x))dx = S(a->w)(f(x)-g(x))dx, which is S(0->a)(sin x)dx = S(a->w)(sin x)dx, integrate ( [-cosx](0->a) = [-cosx](a->w) ), you know that w=Pi/2w=Pi, you use arccos, and robert's your father's brother. yandman 10:21, 7 December 2006 (UTC)[reply]

Yeah I figured that it was possible to merge, wasn't sure though. But how did you get pi/2 as the x-coordinate for the second intersection? Jack Daw 10:46, 7 December 2006 (UTC)[reply]
Corrected. Please forgive me, Euler... yandman 10:48, 7 December 2006 (UTC)[reply]

Using Cavalieri's principle, you can see that the answer is the same for f(x) = sin x and g(x) = 0, which should be obvious.--80.136.173.216 10:55, 7 December 2006 (UTC)[reply]

It would be kind to either say a little more, or offer a link. Let's try something simpler still. Recall that the area of a triangle is half the product of base and height. Notice especially that it does not depend on the horizontal position of the top vertex with respect to the base; the area is invariant under horizontal shearing. We immediately deduce that the area of any region is invariant over shearing in any direction. (This is a limited form of Cavalieri principle, but all we need.) Now observe that f(x) = x+sin x and g(x) = x are sheared forms of F(x) = sin x and G(x) = 0. I'm going to assume that the figure, which we are not shown here, limits x to the interval [0,π]. Thus the total area is
which is exactly 2. However, we will not need to integrate. We wish to split this with a vertical line, x = a, to divide the area exactly in half. But this is trivial, because the region is symmetric. Furthermore, the shearing does not affect the line, so we can obtain our answer with no calculus. --KSmrqT 16:04, 7 December 2006 (UTC)[reply]
That was a bit too complicated for me. I don't doubt that your answer is wrong, however I doubt this is the way we were supposed to solve the problem. We haven't been taught the math you use to solve the problem, that's why. The figure doesn't add any extra information, the problem was part of the test where you weren't allowed to use a calculator so the figure was merely for the sake of showing how f and g intersect. So, do you know a method involving calculus that would solve the problem? Jack Daw 18:49, 7 December 2006 (UTC)[reply]
The moral of the story is: either you do what they expect you to and integrate, either you think a bit and are called KSmrq. yandman 16:18, 7 December 2006 (UTC)[reply]
My apologies; I was trying for a simpler answer, to explain the invocation of Cavalieri's principle. If you prefer to use integration, more explicit calculations are involved but much is alike. The area under f(x) = x+sin x is given by the obvious integral; similarly for the area under g(x) = x. The area between the two curves is either the difference of these area integrals, or the integral of the difference function, f(x)−g(x) = sin x. Taking the latter route, we are looking at
for the total area, where x0 is the x value of the intersection, and
for the split. To find the total area, we must know that the curves intersect at x0 = π. This comes from knowing where sin x equals zero, for then x+sin x will equal x. We have already computed the first integral in this case, and found that the total area is 2. The second integral is no more difficult, and gives an equation to solve for 1. The equation involves cos a, and the solution requires basic knowledge of its behavior. --KSmrqT 18:30, 8 December 2006 (UTC)[reply]
First of all, when I wrote "I don't doubt that your answer is wrong" I meant RIGHT. Hope you got that... Second... How do you know that the second intersection is at x = pi? arcsin 0 = 2 * pi * n, is it not? So how does that become pi? Jack Daw 03:32, 9 December 2006 (UTC)[reply]
Yes, I assumed that was what you meant. :-D
No, sin x is zero at integer multiples of π, not 2π. It has period 2π, which is not the same thing. --KSmrqT 17:11, 9 December 2006 (UTC)[reply]
File:Sin 1to1.png
Sine function


Aha OK now I get it. Thank you. Too bad I didn't nail this during the test, gave a lot of points. Oh well... Jack Daw 02:15, 10 December 2006 (UTC)[reply]

Probability question

Note: I am not a student, and this is not a homework question.

Say I have a 10-sided die. What are the chances of getting, say, a 3 at least nine times out of 10?

Please explain how you arrived at your answer.

Thanks -- 192.206.151.130 15:43, 7 December 2006 (UTC)[reply]


The simplest way to consider this is to divide the number of "good" outcomes by the total possible outcomes. Here the total is 10^10, i.e. 10 billion. The number of "good" outcomes is:

  1. 1 for the outcome of getting 3's every time.
  2. 10 for each "order" of 9 3's (say, 5 3's, followed by another number, followed by another 4 3's etc...). You multiply this by 9 because the "other number" could be a 1,2,4,5...10.

Which gives 91/10 billion. Not much, huh?

There are simpler but more abstract ways of calculating it, though. 0.1^10 (the chance of getting straight 3's) + (0.1^9)*0.9*10 (the chance of getting 9 3's on 9 rolls multiplied by the chance of not getting a 3 on the last roll multiplied by the number of orders possible).

Basically, don't take the bet.... :-) yandman 16:05, 7 December 2006 (UTC)[reply]

You mean 9.1/1 billion, surely? Melchoir 16:07, 7 December 2006 (UTC)[reply]
Yeah, I get 91/(10 billion), which is 9.1x10^-9 -sthomson 16:20, 7 December 2006 (UTC)[reply]

Time for me to get some coffee. Yeah, it was the 10 billion I wrote 4 lines above... Corrected. yandman 16:24, 7 December 2006 (UTC)[reply]

So throwing 9 or more 3s in 10 throws with a fair dice is stupendously unlikely - you would probably have to roll 10 dice once a second, 24x7, for over 3 years before you saw this result. If this is a practical problem, say someone has defeated your battalion of orcs against overwhelming odds, then you can reasonably assume that something dodgy is going on. Gandalf61 17:15, 7 December 2006 (UTC)[reply]
The ten-sided die itself is a little problem. No regular polygon available ... you have to turn to a bar with ten angles, something like a Grecian temple column. Don't stay under it when someone throws it :-)-- DLL .. T 19:02, 8 December 2006 (UTC)[reply]
There are perfectly good ten-sided dice, they're just not platonic solids. Confusing Manifestation 13:25, 9 December 2006 (UTC)[reply]
(edit conflict) I think you meant no regular polyhedron. However, the five Platonic solids are the tetrahedron (4 faces), the cube (6 faces), the octahedron (8 faces), the dodecahedron (12 faces), and the icosahedron (20 faces). An obvious adaptation suggests itself.
Ten-sided antiprism
Ten-sided antiprism
But there is no reason that fair dice must be regular polyhedra. Remarkably, Commons has a collection of examples. A natural choice is the bipyramid, which guarantees equal faces without limiting their number (except to be even); but the pentagonal antiprism dual, the pentagonal trapezohedron, remains fair while rolling better. From the dice article:

The full geometric set of "uniform fair dice" (with all congruent sides) are:
Rolling-pin style dice are usually made so that all the faces they may actually land on are congruent, so they are equally fair.

Nor must we restrict to flat faces; we might take a dodecahedron and glue halves of a sphere to two opposite faces to prevent them being stable resting bases, thus reducing the 12 fair faces to 10. See this collection for more creative inspiration. --KSmrqT 16:52, 9 December 2006 (UTC)[reply]

Average number of workdays

Thanks for the probability answer. Here's another question:

Say you live in a country with a five-day workweek. In addition, there are nine weekday holidays on which people don't work.

What is the average number of workdays in any 10-day period ending in a weekday?

Thanks -- 192.206.151.130 17:05, 7 December 2006 (UTC)[reply]

Let f(x) be the number of workdays in the 10-day period that ends on day x, and let W be the set of all workdays. Then the average number of workdays is .
So the first question to answer is how to calculate . At this point, though, I'm not sure when you say "10-day period" whether you mean "10 workdays" or "10 days, including weekends". Which you mean would affect the outcome. Also, the cardinality of W (ie the number of workdays in the year) needs to be defined. And finally, do holidays count as workdays, or do they count as extra "weekends"? Dugwiki 17:34, 7 December 2006 (UTC)[reply]
Isn't it easier to simply count them in your example? I did that some time ago and the average I found was 22 - not counting February. Jack Daw 19:38, 7 December 2006 (UTC)[reply]
Assume that "weekday" means: any day of the week except Saturday and Sunday. In a random period of 10 consecutive calendar days of which the last is a weekday, there are on the average:
1.6 Mondays
1.6 Tuesdays
1.6 Wednesdays
1.4 Thursdays
1.2 Fridays
1.2 Saturdays
1.4 Sundays
This can be established by straightforward counting for each possible final weekday. Together this gives us on the average 7.4 weekdays. If some of the holidays are bound to a specific day of the week (say the fourth Thursday in November), then we need to know the exact distribution. If the weekday holidays are uniformly distributed over the weekdays, then we need to know the number of weekdays in a year. Taking 365.2425 days for the average length of a year, the average number of weekdays is 260.8875. If 9 of these are holidays, the remaining 251.8875 days are workdays. So a fraction of 251.8875/260.8875 of the weekdays are workdays. Under the assumption of uniform distribution, the average number of workdays out of these 7.4 weekdays is then 251.8875/260.8875 × 7.4 = 82843/11595 = 7.14471755... workdays.  --LambiamTalk 06:38, 8 December 2006 (UTC)[reply]
Here is a little table, to support computing the weekday probabilities:
day 1 2 3 4 5 6 7 8 9 X
M T W R F S U M T W
T W R F S U M T W R
W R F S U M T W R F
S U M T W R F S U M
U M T W R F S U M T
We count 8 Mondays (M), 8 Tuesdays (T), 8 Wednesdays (W), 7 Thursdays (R), 6 Fridays (F), 6 Saturdays (S), 7 Sundays (U). Thus from a total of 50 days, we find that 37 are weekdays. But in practical terms, of the nine Canadian national holidays, one is coerced to Friday and three are coerced to Monday. Of course, every country is different, but it is quite likely that Easter will be celebrated on a Sunday (if at all), and Good Friday on a Friday, to give two obvious examples. --KSmrqT 19:31, 8 December 2006 (UTC)[reply]

Why not invent a symbol for 1/0

I am thinking about 1/0 = w
SO 2/0 = 2 * (1/0) = 2w
and (3/0) * (4/0) = 3w * 4w = 12 w2
7 + 5/0 = 7 + 5w
(42/0) * 0 = 42w * 0 = 42

My question is this. I'm sure this has been thought up before by other people before me, so why was it rejected. Is there a fatal flaw in representing 1/0 as w?

202.168.50.40 21:13, 7 December 2006 (UTC)[reply]
See Division_by_zero. Friday (talk) 21:19, 7 December 2006 (UTC)[reply]
The reason is that division is defined to be the inverse operation of multiplication. This means that the value of is the solution x of the equation whenever such a value exists and is unique. Otherwise the value is left undefined.
For b = 0, the equation bx = a can be rewritten as 0x = a or simply 0 = a. Thus, in this case, the equation bx = a has no solution if a is not equal to 0, and has any x as a solution if a equals 0. In either case, there is no unique value, so is undefined. Conversely, in a field, the expression is always defined if b is not equal to zero.

I think you misunderstood.

because

202.168.50.40 21:35, 7 December 2006 (UTC)[reply]
Division by zero would break other rules of math, hence the contradictions explained in Division_by_zero#Fallacies_based_on_division_by_zero. Friday (talk) 21:38, 7 December 2006 (UTC)[reply]
Argh! yes you are right. Replacing (1/0) with w ( or 0/0 with 0w ) does not resolve the paradox, hence it is rejected as not useful. Thank you very much. 202.168.50.40 23:26, 7 December 2006 (UTC)[reply]
Are you sure  ? Are they not both  ? --V. Szabolcs 17:40, 14 December 2006 (UTC)[reply]
There's a recent Slashdot story about someone claiming to have done something very similar. BungaDunga 05:03, 9 December 2006 (UTC)[reply]

whilst on zero

Seeing as the subject has come up can someone direct me to a page covering 00. Is it undefined...87.102.36.136 22:30, 7 December 2006 (UTC)[reply]

See Exponent#Exponents_one_and_zero. Friday (talk) 22:32, 7 December 2006 (UTC)[reply]
More directly, see Empty product#0 raised to the 0th power Dugwiki 22:40, 7 December 2006 (UTC)[reply]

Taking the nth root of zero is zero - it is only in this case that

lim n to infinity | 01/n

that the result can be considered zero.? The page doesn't seem to consider the case xy where x is alreadly zero and y approaches zero. Just wondering.87.102.36.136 23:01, 7 December 2006 (UTC)[reply]

Limits only need to be considered when defining powers for non-integers. 0 is an integer, so 0^0 has nothing to do with limits. It is just the product of no factors, which is 1. True, when we later try to extend the definition to any nonnegative real, we get the inconvenience that the function xyM/ is defined but discontinuous at (0, 0), but this is beside the point. -- Meni Rosenfeld (talk) 11:04, 8 December 2006 (UTC)[reply]
I noticed that for the graph z=xy that the planes x=0 and y=0 are the boundaries of 'massive' discontinuities. Wondering if anyone has a link to an image of such a graph, (just real values obviously) just to satisfy my curiousity..87.102.37.17 11:10, 8 December 2006 (UTC)[reply]
There is much more of a discontinuity with respect to x than with respect to y, because you can a positive number to any power but negative numbers only to integers and specific roots (in the real domain), hence when x > 0 you get a nice solid shape but when x < 0 you get a very sparse-looking graph. Try plotting it in gnuplot:
gnuplot > splot [x = -1:1][y = -1:1] x**y
And you'll see what I mean.137.99.174.5 23:33, 8 December 2006 (UTC)[reply]


Actually Meni's answer elides a subtlety. It is possible to make a distinction between the integer or natural number zero, and the real number zero. Since this distinction almost never makes a difference, we rarely bother.
But it does arguably make a difference when considering the expression 00. If both 0s are considered to be the natural number 0, then the arguments for defining the value of the expression to be 1 are quite convincing. Even if the base is taken to be the real number (I'll write it as 0.0 to make the distinction) it seems clear that 0.00 should be the real number 1.0 (as possibly distinct from the natural number 1).
However if the exponent is taken to be a real number, in the expression 0.00.0, most of these arguments lose their force. I personally think that 0.00.0 should be considered undefined. --Trovatore 22:16, 10 December 2006 (UTC)[reply]

Probability w/ coins

Say I have a coin with height (or thickness) h and bases w/ radius r. What are the odds that if I flip this coin, it will land on its side (as opposed to the bases)?? --Tuvwxyz (T) (C) 22:39, 7 December 2006 (UTC)[reply]

  • Obviously this needs to be highly idealized. The coin has to be a perfect cylinder. You have to assume that the coin will have no bounce, otherwise it's way complicated. Reduce it to "assume the coin will land on its side if it hits the ground within a certain range of angles", and then it will be whatever that range is divided by π. Or something rather like that. For a real world number, I guess you just have to start flipping. --jpgordon∇∆∇∆ 23:38, 7 December 2006 (UTC)[reply]
When you consider that the answer is effected by all sorts of factors such as the motion and angular momentum of the flipping coin and the physics of how it bounces when it lands, I doubt there's a simple answer besides "almost zero" for standard coins.
A simpler related problem to consider might be to consider a coin that is in a random orientation relative to a plane below it. Then what would be the probability that the coin's center of gravity, when projected onto the plane, lies over the coin's rim?
Assume the coin is circular. Then let's look at a planar cross section perpendicular to the ground that includes the coin's center of gravity. To land on its edge at the moment of impact, the center of gravity would have to lie over the rim when looking along that cross section would be the ratio of the angles formed by tracing edges from the center of the coin's rectangle in the plane to its corners. This would have to be true of all possible such cross sections; if the center of gravity projects beyond the coin's rim on any cross section, then the coin would likely tip over onto its base along that angle.
I'm going to bow out at this point to the experts on how to calculate that probability, since it's getting a bit over my head. But I'm thinking it might involve integrating the angular ratios over all possible cross sections and orientations for the coin. Dugwiki 00:00, 8 December 2006 (UTC)[reply]
Well, it won't always be "almost zero". For instance, if a "coin" has a radius of one inch and and a height of 1 foot, the probability would be "almost 100%". That was the entire point of me supplying variables for the radius and height. --Tuvwxyz (T) (C) 00:27, 8 December 2006 (UTC)[reply]
That's why I said it was almost zero "for standard coins". You'll have a hard time finding a coin that's shaped like a piston. :) Dugwiki 17:04, 11 December 2006 (UTC)[reply]
Out of a full circle (of 2π for the measure) of possible orientations of the coin in a perpendicular cross section, two orientations will let the coin land, on first impact, exactly flush on its edge. With a tolerance of ±arctan(h/(2r)), the centre of gravity will be over a spot inside the rim. The measure of these orientations is then 2 × 2 × arctan(h/(2r)) – where one factor 2 is for the two exactly-flush orientations, and the other for the two-sided tolerance. Expressed as a fraction, this results in 4×arctan(h/(2r))/(2π). For example, if h = 1 and r = 1/2, we get 4×arctan(1)/(2π) = 1/2. Of course, as already noted above, this has little to do with the eventual result; if h<<r, the chance of the coin coming to rest on its side is typically much smaller. Also, in actual coin flipping not all orientations are equally likely.  --LambiamTalk 07:07, 8 December 2006 (UTC)[reply]

If considering 'coin dropping' and nor coin flipping (the coin is not allowed to rotate) then the probaility of it landing on the 'edge' will be the solid angle subtended by the edge divided by the total solid angle (4pi), the angle the rim makes to the plane of symmetry of the coin is a=arctan(h/2r),

The solid angle is

2

=4π sin(arctan(h/2r) so the probability is sin(arctan[h/2r]) (in the case h=1 r=0.5) p=1/sqrt(2) ~ 0.7 </math>

If the coin is spinning in any direction but along the axis this method will not be right.87.102.37.17 10:28, 8 December 2006 (UTC)[reply]

I do not know the odds of landing on edge, but Persi Diaconis has evidence that coin flipping is biased so that the face that is up when it is flipped is slightly more likely to be the face that is up afterwards. (He himself can flip a coin so it comes up heads every time.) Fun to know; hell to analyze! --KSmrqT 19:46, 8 December 2006 (UTC)[reply]

I think the problem is that not only must the coin be on its edge at some point, it has to have just the right energy to stay there. I'll look at the two-dimensional problem and assume with each bounce, the coin's total mechanical energy decreases by a factor of f > 1. (This might not be a good assumption, but it'll produce a reasonable scalaing law.) Let gravity be g = 1. Then the coin settles on its edge if and only if:

  • After some bounce, its energy is between r and sqrt(r^2 + h^2/4) or about r + h^2/8r.
  • At that point in time, its orientation is within ±arctan(h/(2r)).

As Lambiam calculates, the latter probability is 4×arctan(h/(2r))/(2π) or about h/3r. But the former probability is even smaller: a random geometric progression must happen to intersect with a band of width h2/8r at a height of r, which happens with probability log ([r+dr]/r)/log f or about dr/r log f = h2/8r2 log f. So my final answer is

for small h/r. Not very good. Melchoir 20:33, 8 December 2006 (UTC)[reply]

And then there is research. For example, we might read what Justin Smith has to say about "Constructing a fair 3 sided coin". Or, we might consult the article by Daniel B. Murray and Scott W. Teare, "Probability of a tossed coin landing on edge", in Physical Review E, 48(4), October 1993, pp. 2547–2552. The abstract states:
An experiment is reported in which an object which can rest in multiple stable configurations is dropped with randomized initial conditions from a height onto a flat surface. The effect of varying the object's shape on the probability of landing in the less stable configuration is measured. A dynamical model of the experiment is introduced and solved by numerical simulations. Results of the experiments and simulations are in good agreement, confirming that the model incorporates the essential features of the dynamics of the tossing experiment. Extrapolations based on the model suggest that the probability of an American nickel landing on edge is approximately 1 in 6000 tosses.
This is what references are really about among professionals: knowing what has been done before so we can build on the work of our predecessors, acknowledging and benefiting from their successes and their failures. This concept bewilders crank contributors, but it works. To quote the old chestnut by Sir Isaac Newton:
If I have seen further it is by standing on ye shoulders of Giants. (Letter to Robert Hooke, February 5, 1676)
Still, we must balance this with a lovely quotation attributed to Carl Sagan:
When you make the finding yourself — even if you’re the last person on Earth to see the light — you’ll never forget it.
Apropos of quotations and references, I always hesitate when I find an enticing line without a definite reference, even if it is widely repeated. Sometimes the quotation is wrong, sometimes the attribution. Hence, "attributed". Any help on this one? --KSmrqT 19:23, 9 December 2006 (UTC)[reply]
Excellent reference; we ought to have an article on this problem! I see that Murray and Teare's Figure 5, p.2551 is a log-log plot with a slope of 3 and an intercept that varies with the coefficient of restitution. I wonder if there's another model as simple as mine that also predicts that result? Melchoir 23:08, 9 December 2006 (UTC)[reply]


December 8

Confusing little puzzle

A friend of mine is trying to solve a puzzle, and we're both stumped. Here it is, word for word - anybody have a clue? We know for sure that there's an answer to be found.

"If 'A' is two, and 'B' is three, and 'F' is eight...how high must you count to get to Heaven?"

--134.173.92.139 04:08, 8 December 2006 (UTC)[reply]

Infinity. Counting to any finite number is conceivably possible, but it will not get you to Heaven, so it is necessary to count to infinity. Counting to infinity is impossible, barring cheating, so it is sufficient to achieve any goal, up to and including transfiguration.
The A, B, F stuff is just there to distract you. Melchoir 05:18, 8 December 2006 (UTC)[reply]

Are you sure F isn't 7? yandman 08:01, 8 December 2006 (UTC)[reply]

yes it should rhyme. 87.102.37.17 10:50, 8 December 2006 (UTC)[reply]
Mabye it's just a poem? :-) —Bromskloss 12:45, 8 December 2006 (UTC)[reply]
"If 'A' is two, and 'B' is three, and 'F' is eight...how high must you count to get to Heaven's gate?"87.102.37.17 13:53, 8 December 2006 (UTC)[reply]

Assuming F should be 7, and not 8, we get the following:

 a=2  b=3  c=4  d=5  e=6  f=7  g=8  h=9  i=10 j=11
 k=12 l=13 m=14 n=15 o=16 p=17 q=18 r=19 s=20 t=21
 u=22 v=23 w=24 x=25 y=26 z=27

Thus, H-E-A-V-E-N is 9-6-2-23-6-15. Now, perhaps they want to run the numbers all together to get 96223615 ? StuRat 13:01, 8 December 2006 (UTC)[reply]

I was thinking of 9+6+2+23+6+15=61. I was hoping it would give 42, but never mind... yandman 13:38, 8 December 2006 (UTC)[reply]
If I add one to the count at every vowel this gives H=10,E=7,A=2,V=27,E=7,N=17. Curious it's 1's 2's and 7's but doesn't seem to make any extra sense. The sum is 70 ("three score years and ten"? isn't that a quote from somewhere?)87.102.37.17 14:07, 8 December 2006 (UTC)[reply]
Think base 27. —The preceding unsigned comment was added by 203.27.159.30 (talk) 00:54, 9 December 2006 (UTC).[reply]

unsolved problem

I cannot solve this small problem

 x^x+ y^y =31 -eqn (1)
 x^y+ y^x =17 -eqn (2)

The answer I have found by trial and error method that x=2,y=3 or x=3,y=2. but what is the procedure to solve the problem. —The preceding unsigned comment was added by 203.145.188.131 (talk) 07:50, 8 December 2006 (UTC).[reply]

These equations look like they cannot be solved in the general case (that is, there is no standard function which can express the solution). It can be solved numerically in various ways, and if you know in advance that you are looking for integer solutions, you can try x=0,1,2,3 and find which one allows an integer solution for y (sort of an educated version of trial and error). -- Meni Rosenfeld (talk) 10:55, 8 December 2006 (UTC)[reply]
The equations are transcendental so you have to solve them numerically. However, it is possible to solve by inspection. From (1), you can see that the highest value that x or y can take is 3, as and . Obviously one of x or y cannot be zero. If one was 1, then from (1) it would require that the other was greater than 3, which is not allowed. This leaves 2 and 3 as allowable values, which cannot coincide as (1) would not be satisfied. So or are the only solutions. Readro 11:47, 8 December 2006 (UTC)[reply]
Also, a graph of the two equations is quite interesting, because (according to GrafEq, at least) the first equation has a split that's quite hard to see, but occurs somewhere around (3.1, 0) (and (0, 3.1) but I'm going to focus on the 1st and 2nd quadrants and just assume that the reflection about y=x is given). The result of this split is that besides the (3,2) solution, there are two more apparent solutions quite close to each other, at about (-2.516, 3.067) and (-2.518, 3.064). Of course, proving the actual existence of these is tricky because of the nasty behaviour of things like x^x and x^y when x is negative. Confusing Manifestation 13:18, 9 December 2006 (UTC)[reply]

Check out Lambert W function for related problems. Robinh 15:00, 15 December 2006 (UTC)[reply]

Equation for determing Occupancy for an office building

I need an equation to help me determine the Occupancy of an office building or meeting room, conference room, etc —The preceding unsigned comment was added by 24.208.156.155 (talk) 19:42, 8 December 2006 (UTC).[reply]

You have to compute the volume of the room by using the formula height*width*length, and then divide it by the volume of a human.(Igny)
I think it has more to do with area and the number of tables, doors, etc. --Daniel Olsen 05:47, 9 December 2006 (UTC)[reply]
If you mean the maxmimum legal occupancy for fire codes, for example, that's a legal question, not a math question. See fire safety. Friday (talk) 21:24, 8 December 2006 (UTC)[reply]
I'd say it's both. There will be some legal rule for the amount of space to be allocated for each person, based on your location/jurisdiction, I suspect in the form of square footage per person. Then, to determine the occupancy, you will need to do some basic math. StuRat 07:15, 9 December 2006 (UTC)[reply]

I'd interpret occupancy differently, but as there are various meanings the questioner should be clearer. Anyway:

Take just one room. If it is fully occupied all the time, it has an occupancy of 100%; if half-occupied all the time, of 50%; if fully occupied for half the time, of 50%; etc. So a formula would be:

Occupancy (%) = 100 X Σ(No. of people X Length of meeting)/(Size X Total time)

So for example, a meeting room holds 20 people and is available for 8 hours in a day. There are 2 meetings, one with 8 people lasting 3 hours and one with 12 people lasting 2 hours. Then the occupancy will be given by 100 X (8 X 3 +12 X 2)/(20 X 8) = 30%.

This can be extended to more than one room and to more than one day in what should be an obvious way.Semiable 13:27, 9 December 2006 (UTC)[reply]

Yea, that might be how they meant the question. StuRat 12:28, 10 December 2006 (UTC)[reply]


December 9

Rational denominators

Suppose I had a number like

What's a good algorithm to use to express this number so that the denominator is a rational number? The numerator can be as messy as we like. --HappyCamper 02:57, 9 December 2006 (UTC)[reply]

I'm sure this isn't the best way, but it is a start, I think you can rewrite that fraction as:
Then you rationalize that denominator by multiplying top and bottom by , you'll end up with only two square root terms in the denominator instead of three, and you can rinse and repeat until all are gone. Maybe it's possible to multiply by something to get rid of it all at once? 137.99.174.5 04:19, 9 December 2006 (UTC)[reply]
The numerator doesn't have to be very messy. The number is an element of the field , so it can be expressed as
where all the as are rational numbers. As for how to get those coefficients, the most straightforward way is to keep multiplying by conjugates until all the roots disappear, i.e., multiply by
to get rid of all the s, leaving you with
where the pops up unavoidably because it's in the field generated by and . But don't worry, because the conjugate is easily obtained by negating everything with a multiple of three under the radical,
leaving you with . This process is tedious but it's guaranteed to work and requires no ingenuity. —Keenan Pepper 05:23, 9 December 2006 (UTC)[reply]
You can treat this somewhat like partial fractions: write , and then write it as . We can restrict i, j, and k so because the square of one of our variables is a rational number and is thus largely equivalent to that variable to the 0th; in a sense, the powers of this polynomial live in (link). Then clear the denominator, giving , where ; the factors of show up because of the imperfect wrap-around. But we then know that (see discrete delta), since the left hand side is precisely 1 and has no radicals. Choosing some ordering for the , we can write (for whichever n corresponds to ) and it becomes a standard matrix equation. For example, taking the lexicographic ordering of the bitstrings "001", "010", etc., I find
with the solution . If we generalize the problem to include other coefficients than 1, we can just add those to our expression for B; however, other generalizations are harder. For instance, if we had , we would have to worry about cancellation between products of the first two radicals and the third alone (that is, multiplied by 1): it might do, however, to just identify and (and similarly for b) and so remove some equations. I don't know that this method is particularly practical, but I certainly find it interesting. --Tardis 06:27, 9 December 2006 (UTC)[reply]
When you expand (A+B+C+D)(A+B+C−D)(A+B−C+D)(A+B−C−D)(A−B+C+D)(A−B+C−D)(A−B−C+D)(A−B−C−D) you get a (symmetric) polynomial in the squares A2, B2, C2, and D2. So multiply numerator and denominator both by all factors of sums of 1 plus-or-minus these surds with at least one minus. This is essentially the method of multiplying by conjugates suggested by Keenan Pepper, but requires even less exercise of one's grey brain matter.  --LambiamTalk 09:56, 9 December 2006 (UTC)[reply]
Thanks for the responses guys. Tardis' one reminds me very much of digital communications systems. Quite creative. --HappyCamper 02:44, 10 December 2006 (UTC)[reply]

Doodles, recursive curves?

I was playing around the other day, and I came up with an interesting little thing:

Plot three points somewhere on a coordinate plane. Numbering them A B and C, with B being the one in the "middle", find the midpoints of AB and BC and name them D and E. Draw AD, DE, EC. Find the midpoints of AD, DE and EC (F, G, H) and draw AF, FG, GH and HC.

If you keep doing this, you get something that looks more and more like a smooth curve, anchored at A and C and "pointing" toward B. My question is: can this be described with a function? Since it can be defined recursively, is it possible to write a function that models the "limit" of the recursion? BungaDunga 05:04, 9 December 2006 (UTC)[reply]

My guess is that the limit exists and is some sort of a curve on a circle or an ellipse. If you take points A, B, C to be from an equilateral triangle, the first iteration gives you a portion of a hexagon. The next, gives you a section of a 12-gon. Then, a 24-gon, and so on. I'm not sure how to make this rigorous though. --HappyCamper 05:22, 9 December 2006 (UTC)[reply]
I didn't think of that- very interesting. One difficulty I think is that the number of points flip from odd to even and back again, so the point closest to B only changes every other iteration. I think I managed to find a parametric equation that looked like it found the point nearest to A or B given the number of iterations; I don't remember it though, I'll have to find the bit of paper I worked it out on. --BungaDunga 05:36, 9 December 2006 (UTC)[reply]
Maybe I'm wrong, but it seem like what you get at the end may be a Bézier curve (look at the animations near the middle). --Daniel Olsen 05:44, 9 December 2006 (UTC)[reply]
Hmm. This construction looks very much like what I did, and it says it produces a quadratic Bezier curve. The construction looks slightly different, but I'm half-convinced it's functionally identical. --BungaDunga 06:09, 9 December 2006 (UTC)[reply]
I'm certain you're describing a Bezier curve, though I'm not sure you've worded it correctly. Given a number of points A B C D, you find the midpoint of each in sequence AB to E, BC to F, CD to G, then find the midpoint of each of these H and I, then the midpoint of that, and you've found the midpoint J of your Bezier curve. Replace "midpoint" with some other ratio, ie. 10%, and you will find the point 10% along the curve, etc. - 07:57, 9 December 2006 (UTC)
As described, this is almost the midpoint subdivision algorithm for a quadratic Bézier curve. More generally, it is the beginning of an exploration of "corner cutting" and "stationary subdivision". Professional computer graphics today uses subdivision surfaces extensively. One of Pixar's founders, Ed Catmull, was a pioneer in the use of subdivision, and one of its researchers, Tony DeRose, along with his student Charlie Loop, made important later contributions. (So have many others, including Jos Stam.)
A popular modern way to approach Bézier curves, and especially their generalization to B-spline curves, is through polar forms, often known by the evocative name Lyle Ramshaw once suggested, "blossoms". (His influential paper, "Blossoming: A connect-the-dots approach to splines", has lovely illustrations by one of our contributors, Jorge Stolfi.) Given points A, B, and C (in that order), the degree-2 Bézier curve they determine is
The polar form of a degree-n polynomial in one variable is a polynomial in n variables, linear in each. (The idea originates with "polarities" in geometry, the seminal example being the polarization of Pythagoras' x2+y2 to produce the dot product x1x2+y1y2.) An algorithmic embodiment of the polar form is a slight generalization of de Casteljau's algorithm, which for a quadratic looks like this:
When t is 12, we are splitting each line segment at its midpoint. The process actually proposed, however, is not evaluation, but resembles subdivision. That is, we take the original two legs and split repeatedly to get many legs. And while it may not be immediately obvious, it is well-known that, properly done, this process converges to the curve. An important early example is Chaiken's algorithm.
For one kind of analysis, it is convenient to view a Bézier curve as a special case of a B-spline curve, and de Casteljau's algorithm as a special case of de Boor's algorithm. The control points of a curve parameterized over the unit interval [0,1], are given by the three polar form values P2(0,0), P2(0,1), and P2(1,1). (Verify!) The control points for the portion of the curve from a to b are, similarly, P2(a,a), P2(a,b), and P2(b,b). The midpoint subdivision essentially splits the whole curve into two halves, then splits those, and so on.
For subdivision surfaces, the converged result at "extraordinary points" cannot be described by a polynomial. The pivotal insight for analyzing the limit surface is to express stationary subdivision in matrix terms, then consider eigenvalues. Of course, we can do the same thing for curves.
I understand such mathematics is much too "applied" for some tastes, though historically great minds like Archimedes, Euler, and Gauss have thrived on applications. So let us close with the observation that barycentric subdivision, a purely topological process, can be used to obtain the nerve of a simplicial set, which is pure abstract nonsense. --KSmrqT 02:00, 10 December 2006 (UTC)[reply]
No, that's not the same algorithm. The difference between Chaikin's algorithm and the method proposed above is that in Chaikin's algorithm part of the original line segment remains; in BungaDunga's method the original line segment is completely discarded. As a result the process doesn't converge to a true limit curve but simply continues as far as is possible. For example, consider the process on a closed polygon such as a square; you just get nested squares and diamonds down to the point. Similarly, as explained below, on a line segment with control point the process just converges down to the line segment itself.
Nice research, though. EdC 14:53, 10 December 2006 (UTC)[reply]
Thanks. I agree the proposed method is not Chaiken's algorithm. In fact, I was hinting that you might want to try eigenvalue analysis as an alternative or supplement to your previous approach.
The real payoff is for surfaces. For many years the standard surfaces used in everything from aircraft and auto body design to quality animation were polynomial parametric surfaces. There has also been a limited used of implicit surfaces, including quadrics and "blobbies" and an occasional convolution surface; but these are awkward for "sculpted surfaces". Benefits of subdivision surfaces were visible in an early animation from Symbolics called The Little Death, but the work of Loop and Stam was pivotal in bringing them under control. Sadly, the desktop computer graphics in games still clings to polygonal models, partly for performance reasons. But ever since the Academy Award-winning Geri's Game, Pixar (which always insisted on true curved surfaces) has used subdivision surfaces. Subdivision's success in the CAD industry is still uncertain. --KSmrqT 20:40, 10 December 2006 (UTC)[reply]
No, that's not a Bezier curve; in the divide-and-conquer bezier method the midpoints drawn lie on the curve. That isn't the case here; the iteration always draws the new lines beyond the previous cycle's midpoints.
Actually, this iteration does tend to a curve, and one with a very simple equation, but it's probably not the result you were hoping for; it tends to the line AC.
Argument: Consider where ABC are (1,0), (0,0) and (0,1) resp. By symmetry under skewing, scaling and rotation, finding the limit for this configuration gives the limit in all cases.
Write
Then ;
AFGHC =
Note that the two rows of the matrix are the same in reverse; note also that we can multiply through by an appropriate power of 2 to get integers throughout.
Denote the multiplied top row by ; we have:
This is, of course, A008949 (discarding the initial zeros).
Now consider the midpoints of the even rows: 0, 1, 5, 22, etc. By the symmetry mentioned above, these get drawn as points B=(0,0), G=(1/4, 1/4), (5/16, 5/16), (22/64, 22/64), etc. If we can find the limit of this sequence of points on y=x, this will tell us plenty about the curve.
Well, I can't work out the reason, but plug that sequence into AEIS and you get A000346, which has closed-form formula . Divide by the corresponding power of two and get , which tends to 1/2. Thus the midpoint tends to the midpoint of AC, so the iterated curve has as limit AC.
Now, if I could only work out why the second-left-of-middle column of A008949 is A000346... EdC 18:34, 9 December 2006 (UTC)[reply]
After playing a little more, another fun result: if we take the coordinates and calculate the area of the triangles being chopped off each time, we get:
1/8
1/32 1/32
1/128 3/128 1/128
1/512 6/512 6/512 1/512
This is (ignoring the denominators) the triangle of Narayana numbers (prove it!) with row sums the Catalan numbers... and , showing again that the whole of the triangle ABC is eaten away by the iteration. EdC 22:20, 13 December 2006 (UTC)[reply]
Very interesting! I constructed a few iterations of it in Geometer's Sketchpad (great program) and it definately looks much more like it's going to converge into a line than anything else. Almost all of the math- and terms- you've used is (unsurprisingly) way over my head, but the example of a square EdC gave makes a lot of sense. I'll definately play some more with constructions that actually produce interesting curves.--206.124.138.153 23:51, 10 December 2006 (UTC)[reply]

Starting with equilateral triangle of height 1: Distance from top to bottom of curve: 1-1/2-1/8-1/32-... = 1-1/2*(4/3) =1/3. I just did this calculation to check if it was a line. As pointed out previously, if this were done on an equilateral triangle, all angles in the curve would always be equal. Taking an equilateral triangle ABC and using points D,E,F to create equilateral triangles ABD, BCE, and ACF outside of ABC, we can do this process to these three triangles to see that the curve would approximate a circle. Imagine we stretch the equilateral triangle horizontally and verticall; we can also shear it (like going from a rectangle to a paralellogram); and we can finally rotate it...this set of transformations performed on a circle will give an ellipse. Thus, your curve will be an ellipse. 74.69.109.91 06:34, 11 December 2006 (UTC)[reply]

New Year's moment

Am I right?:

New Year's moment should only be celebrated at 12 midnight on leap years. On a year after a leap year, it should be celebrated on January 1 6AM. On a year two years after a leap year, it should be celebrated on January 1, 12noon. Ane finally, on a year 3 years after a leap year, it should be celebrated on January 1 6PM.

The above rules should be followed because a year is (approximatley) 365.25 days, and not 365 days. The rules should be followed so that New Year's moment is celebrated when the Earth is in exactly the same position of its orbit each year.

Am I Right?

Has anybody ever suggested this idea before?

(*I call it 'New Year's Moment' because it is exactly when one year turns inta the other) --172.146.41.157 08:45, 9 December 2006 (UTC)[reply]

The sidereal year is 365.25636 days, about 20 minutes longer than the tropical year. This is a more solid criterion. If applied, it means that in some 3000 years we'll be having our New Year's moment in the middle of February.  --LambiamTalk 10:16, 9 December 2006 (UTC)[reply]
New Year's is more a cultural thing than an astronomical thing. For the same reason, the New Millenium was celebrated on the day the numbers rolled over (Jan. 1, 2000), rather than after the last year of a 2000-year calendar (Jan. 1, 2001). It's more about what strikes people as noteworthy (in other words, as a good excuse for a party) than what seems technically accurate. Black Carrot 21:01, 9 December 2006 (UTC)[reply]

Probability of article selection

This is for Portal:Kerala. The portal currently employs an automatic selection process for the "selected article" on its main page. The following code is evaluated and the corresponding article is selected.

{{CURRENTDAY}}*{{CURRENTMONTH}}*{{CURRENTWEEKDAY}}/(31*12*7)*X round 0

where X is the current number of selected articles. The formula yeilds 0 for nine selected articles, thus selecting Portal:Kerala/Selected articles/Selected article 0 from the pool.

So my question is this: In any given year, would ALL the articles in the pool be displayed on the portal, or would some be left out? Thanks for the answer!--thunderboltz(Deepu) 10:45, 9 December 2006 (UTC)[reply]

If X is small compared to the number of days in a year then this algorithm will give a sequence of numbers that is fairly evenly distributed across the range 1 to X (I am assuming you are always rounding up to the next integer), so then yes, every article will be displayed over the course of a year, although articles with low numbers will appear much more often than articles with higher numbers. If X approaches 365 20, then you will get discrepancies - some articles will be displayed twice in the year, some only once, some may not appear at all. If X is greater than 365, then you cannot display every article in a given year (there are not enough days) so some will be left out. If you want more precise predictions, you can model this algorithm quite simply using a spreadsheet (which is what I should have done before I gave my first response !). If you want every article to appear more or less the same number of times during a year then this is not a satisfactory algorithm because the sequence that it gives is so skewed towards low numbers.Gandalf61 11:26, 9 December 2006 (UTC)[reply]
If you can do modular arithmetic, use
({{CURRENTDAY}}+31*{{CURRENTMONTH}}) mod X,
which will give you a number in the range from 0 to X−1.  --LambiamTalk 15:36, 9 December 2006 (UTC)[reply]
Gosh, so the forumlas of no good use?! Thanks for taking the trouble to verify that, Gandalf. Lambiam, I will try that suggestion of yours and get back to you. Thanks again!--thunderboltz(Deepu) 14:05, 11 December 2006 (UTC)[reply]

Verizon maths

A bit OT, but you really, really need to check out this link [1]. It's so funny. To make it on topic, has anyone else ever had problems with companies which really, really don't understand maths? (Actually it may not be a maths problem but more of a well the computer says it so it must be right problem that is so common with customer service reps etc). To be fair, IMHO this guy was a bit silly to try and sort it our of the phone. An e-mail or letter or fax clearly laying out the maths would have worked much better. Still, you can't deny it's funny... :-P Nil Einne 16:32, 9 December 2006 (UTC)[reply]

I've seen this mistake a lot -- for example, grocery store selling bananas for .59 cents/lb. Not usually a problem, since no one expects to take 8 pounds of bananas to the register and only owe a nickel. So at first I thought the guy whose blog you pointed to was being disingenuous. What's funny is that unlike bananas, no one has a clue what cell phone data transfer "should" cost. I can't think of any other product like that. So basically it's a common mistake that rarely causes any problems, but this time it did. Dave6 01:57, 10 December 2006 (UTC)[reply]

Something that's even more confusing is mills, which are thousandths of a dollar (or tenths of a cent), in the US. This term is used almost exclusively in property tax discussions, where a vote to raise or lower property taxes is called a millage vote to change the millage rate: [2]. So, when they say they want to raise property taxes by 0.5 mill, people really have to scratch their heads to figure out how much money that is. That means, you would pay $0.0005 more for every dollar in assessed property value, or 1 cent in property tax more, for every 20 dollars of assessed value of your home, I believe, but it's a challenge for me, too. So, if you own a $200,000 home, that would mean $100 a year in additional taxes. Did I do the math right ? StuRat 12:21, 10 December 2006 (UTC)[reply]

That was very funny. It was also quite fascinating, because I kept thinking of how I'd try to explain the problem, different ways I'd try to make them see the issue. Amazing that he had to go through so many people, none of whom got it. Maelin (Talk | Contribs) 00:00, 11 December 2006 (UTC)[reply]

Probability

I ask this question every few months, and it's a bit different every time, because I learn more about what I'm trying to ask. I think I finally have it in a form other people might understand:

  1. Law of Large Numbers- Given a random event, where no possible result is more or less likely than any other and no instance of the event is influenced by any other, certain things naturally follow as the event is repeated over and over. In this case, the fraction (instances of possible result/total repetitions) will almost certainly come increasingly close to the fraction (1/number of possible results), and limit to it. For example, given something with two results A and B, as the number of instances increases, most likely nearly 50% of the instances will be A and nearly 50% will be B.
  2. Deterministic System (mathematics)/Deterministic System (philosophy)/Clockwork Universe- It is generally accepted that, barring quantum randomness (which is pretty well irrelevant to this anyway), the universe is fully deterministic. If someone were to, for instance, flip a coin 1000 times, there was never really any question how it would turn out, except in our limited minds, with our tiny tiny store of available information. Even though we didn't know how it would turn out, it was always going to turn out a particular way. Also, given things like gravity and the butterfly effect, it seems sensible to say that nothing exists that is independent of any other event. More practically, in the case of coin flipping, how your mind responds to the results so far almost certainly influences how you toss the coin, and how far you have to stretch to pick it up may have some effect on exactly how your muscles move.
  3. Pseudorandom Number Generator- Not all things that display results indistinguishable from theoretic randomness are, by any stretch of the imagination, random. Any cluster of deterministic interactions that produces results statistically similar to randomness can be considered a pseudorandom number generator, and can range from high-quality (very similar to random) to low-quality (not really very random-looking). Take some examples from the world. The movement of the planets is governed by the laws of physics and is therefore deterministic, but nothing about it really seems random. The movement of air particles is also governed by the laws of physics and is therefore also deterministic, but appears so random that you can find plenty of sources online for air-generated pseudorandom numbers. The fall of a coin is similar - fully deterministic, yet statistically indistinguishable from randomness and in most people's minds, nearly the definition of it.
  4. Where is the pseudorandomness coming from in a flipping coin? Let's start by taking out all the unneccessary outside influences. Put a person in a large metal room with a quarter. According to the theory, the flipping should still look random, but anything outside the room short of an earthquake should have negligible effect. A quarter is heavy enough to cut through the air, so unpredictable airflow can be ignored, and the floor can be flat, level to gravity, and evenly bouncy throughout. Nice and simple. Now, given this, it's pretty clear the pseudorandomness must happen before the quarter leaves your hand. Once it does leave your hand, it's pretty simple highschool physics to say that it will follow a parabolic arc to the floor, that given its spin it will flip over a certain number of times before that, and that once it contacts the floor it will either settle or bounce up in a fairly straightforward way. However, since a small change in the angle or speed of the throw, or the initial spin, or the height you start it at, can switch the result around, it does make it a bit of a dowsing rod for the actual psuedorandomness, which by the process of elimination must be within the confines of your skin. Now, it's well known that with practice (and no life to speak of) people have managed to gain complete control over a coin. They can make it land on whichever side they choose. This involves 1) Finding out, given a particular height and spin and so on, what the result will be, and 2) Getting enough muscular control to provide those chosen conditions consistently. So, the source of the pseudorandom behavior of the coin is unawareness of the results of particular motions combined with whatever quirks of the system get ironed out through practice.

My question, then, is whether anyone can explain to me what about this deterministic system produces results indistinguishable from randomness. In the case of a formula (Lagged Fibonacci generator), I could just slap the thing on a metal table and dissect it, but that's harder to do with something so complicated, and about which so little is known. And I'm looking for an answer that doesn't use the words "likely" or "probable". I'm trying to look at it in terms of a set of rules and a seed state, and I want to know how, as this algorithm runs, it outputs something with all the requisite statistical properties. Black Carrot 22:43, 9 December 2006 (UTC)[reply]

First of all, how many of the different definitions of entropy (Entropy (classical thermodynamics), Entropy (statistical thermodynamics), Information entropy...) are you familiar with? —Keenan Pepper 04:41, 10 December 2006 (UTC)[reply]
In classical mechanics, the motion of a tossed coin is entirely determined by its initial position, momentum, orientation and angular momentum. So you can, in theory, assign a definite and predictable outcome of "heads" or "tails" to every point in a multi-dimensional phase space of initial states. But you may find that there are regions in that phase space where each point has some points arbitrarily close to it that are "heads", and other points arbitrarily close to it that are "tails". In other words, the outcome is very sensitive to initial conditions - an arbitrarily small change in the initial state can change the outcome from "heads" to "tails" or vice versa. If this is true, then the tossed coin is a chaotic system - it is completely deterministic, but at the same time unpredictable in any practical sense. Gandalf61 12:51, 10 December 2006 (UTC)[reply]
Keenan Pepper- I read through the articles you linked, but I don't understand how they connect. I don't know much about entropy yet, but give me your interpretation and I'll run with it.
Gandalf61- Well said. And it turns out, to my astonishment, that the motion of the coin between leaving the thumb and settling is indeed chaotic, mainly due to how it bounces upon striking the ground. (I confirmed that by following links from the Coin flipping page, which I just discovered.) However, I've thought about it carefully, and I don't think that's what I'm going for.
I'm going to break the problem up into two parts for a moment. Bear with me. One is between a starting condition and its result (call it Part A) and the other is between consecutive starting conditions (call it Part B). Part A is what Gandalf was talking about. Given a phase space for the coin as it leaves the thumb (or any other phase space), you figure out what result to tack on each point. That's useful, and in a way it does answer part of my question, but it avoids what I'm getting at the same way the Law of Large Numbers did the last time I asked. Both of them are about turning one distribution into another. This doesn't produce likelyhood or randomness unless that's what you start out with as input, which is the exact thing that's been bothering me for years. Every definition, description, or explanation of probability I've heard is circular. It just rearranges what's already there. Part B is, I think, what I'm going for. Even given a set of possible starting conditions, and a set of possible results, and how each leads to the other, you still don't have anything resembling probability until you know what starting conditions you can expect. Part A then transforms that starting distribution into the results distribution. Part B, then. Given any original seed state (a person picking up a coin), this whole coin-flippy thing should still work. In Part A, the point is that given a bunch of similar starting points, collectively they give all kinds of results. In Part B, the question is, given any particular seed state, will the one and only string of results that follows it display the characteristics of a random series, or not? At least, I think that's the question. I'm figuring this out as I go along, so let me know if that isn't the right question. Basically, what I think it needs to eventually reduce to is something where it doesn't matter what you choose, you'll still get what you want. Black Carrot 01:31, 11 December 2006 (UTC)[reply]
Physiology tells us that the human body is very very complicated, or are we taking it out of this equation? Sethwoodworth 01:49, 11 December 2006 (UTC)[reply]
Well, yes and no. I think the question is more about the the shape of the thing than the details - with the flight and bounce of a coin, for instance, it's more useful to know that the result is chaotic than to know the exact formulae for it. Any details that would help are welcome, though. And it's possible that there's a better example than coin-flipping. Roulette, perhaps. Black Carrot 02:08, 11 December 2006 (UTC)[reply]
Let me try to summarise. If we stick to classical mechanics, coin tossing is a deterministic process. If we knew the initial conditions exactly than we also know the outcome - every point in the phase space has a single, well defined outcome. But in practice we can't know the initial conditiosne exactly, we only know them to certain degree of precision. So we only know that we are somewhere in a certain small region of phase space. And in most of the coin tossing phase space (if we avoid special cases like dropping the coin straight downwards flat from a small height) the "heads" and "tails" outcomes are mixed together so thoroughly that, no matter how small we make this region, it will contain both "heads" and "tails" outcomes - and in approximately equal measures. So no matter how precisely we try to specify the initial conditions, we cannot make any better prediction of the outcome than 50:50. Gandalf61 10:07, 11 December 2006 (UTC)[reply]
True. Very true. Well summarized. That's not what I'm getting at, though. Black Carrot 13:27, 11 December 2006 (UTC)[reply]
I don't mean to be rude, but what are you getting at? It's not obvious, to me at least, what you're actually asking here. I thought I knew what your query was, but then you said that it wasn't. Can you explain in 100 words or less exactly what you're trying to understand? Maelin (Talk | Contribs) 04:19, 13 December 2006 (UTC)[reply]

I think part of your question might be where the initial randomness comes from in any system that exhibits random behavior. As we know, a slight change in a system can cause a massive change to result. That slight change, in turn, can result from an even smaller change, and this can be traced all the way back, I imagine, to quantum uncertainty. A similar question is how the uneven distribution of mass in the universe resulted from the presumably perfectly evenly distributed Big Bang. Again, we know that any tiny ripple would ultimately lead to the formations of galaxies, but it's still unclear what would cause that ripple. This ultimately all leads to the philosophical question "how can something arise from nothing ?". I have no answer, either in a universe without God, or in a universe with one (in which case, where did He come from ?). StuRat 14:00, 11 December 2006 (UTC)[reply]

Yeah, Original Cause type things can be hard to work with, since either A) It was caused by something, or B) It wasn't, which either A) Doesn't answer the question or B) Breaks the cause-and-effect chain we rely on. Tricky. I've considered that I might be setting myself up for an endless chain of "but what made that happen," but I don't think I am. What I'm getting at is hard to put a finger on (well, more accurately, it's hard to put someone else's finger on it), but generally it's a question of how reliably random-esque behavior arises from deterministic, iterative realisitic systems. I'm afraid I can't state it any more clearly than that. Black Carrot 21:18, 12 December 2006 (UTC)[reply]
You already said that you dont understand how it outputs something with all the requisite statistical properties. Do you already understand those statistical properties, and all statistical tests which are used to measure the randomness?? But they are far from perfect, and cannot distinguish between real randomness and pseudo-randomness. -- 131.111.48.168 15:10, 13 December 2006 (UTC)[reply]
There is one elephant standing in the room which I will get back to.
A deterministic, iterative, comprehensible (and therefore the opposite of realistic, and necessarily so, since you claim you want to understand it) is a cellular automaton. Stephen Wolfram wrote about these at some length in A New Kind of Science and demonstrates examples of two-state, one-dimensional cellular automata which exhibit highly complicated, effectively random, behaviour. Dr. Wolfram goes on to propose a notion of computational irreducibility to describe a limit on predictability. The extremely over-simplified idea is this: Complex behavior can be produced by systems that have simple underlying structures.
Chaotic behaviour in continuous systems is exemplified by various familiar fractals: the Henon map (two equations, two independent variables, one dependent variable, (weak) quadratic nonlinearity), the Lorenz attractor (a very simplified weather model) (three equations, three independent variables, one dependent variable, quadratic nonlinearities). Lots of discrete and continuous examples can be found at List of chaotic maps. Discrete systems are usually iterations of a simple rule, like the Mandelbrot set. See also Chaos theory#Minimum complexity of a chaotic system.
It is "unfortunate" that chaotic behaviour can be produced by simple systems. "The Poincaré-Bendixson theorem shows that a strange attractor can only arise in a continuous dynamical system if it has three or more dimensions. However, no such restriction applies to discrete systems, which can exhibit strange attractors in two or even one dimensional systems." -- Chaos theory#Strange attractors
Finally, to the elephant in the room. There is not a sustainable definition of random. Randomness and Random sequence avoid the ontological difficulties of "random sequence". An example of the difficulty is the question: "Is HHHHHHHHHHHH (12 heads) a random sequence of flips of a coin?". The answer is yes and no. A fair coin is likely to produce this sequence for every 4096 experiments of flipping the coin twelve times. However, seeing *only* this information we may assert, with a strong probability of being correct, that the data indicates that the hypothesis "the coin is fair" is wrong. I.e., it is far more likely given only this sequence of outputs that the coin was unfair than that the coin was fair. (Inference about the experimental inputs based on the likelihood of generating the observed output is called parameter estimation and I usually apply Bayesian methods for this kind of problem.)
The point is that in order to make any progress on "the random question", we've had to be a lot more specific about what randomness is. Kolmogorov complexity, computational irreducibility, et seq. are formulations of the idea of "random sequence" that provide somewhere to stand (philosophically) and on which an edifice of knowledge may be built. If you really want to understand "random sequence", then you're going to have to be very specific about what you mean when you say "random sequence". Knuth, in his "The Art of Computer Programming, vol2: Seminumerical Algorithms, 3rd ed." (pp. 149 et seq. in my copy) goes on at some length about reasonable definitions of random sequence and how it may be shown that no realizable sequence can have those properties. So, it's useful to realize that imprecision at the front (definition of "random") may ensure that no progress is subsequently made.
Fuzzyeric 04:59, 14 December 2006 (UTC)[reply]


December 10

cubic

Polynomial of degree 3

What's the maximum value of a cubic function?

A cubic function has the form:
Therefore, the maxmum degree is 3, is that what you're asking ? StuRat 11:59, 10 December 2006 (UTC)[reply]

Well, the maximum value of, say,

is 1 when x = 3, meaning the highest value of f is 1

I was wondering how to find the maximum value of a cubic. Or is it just positive infinity?

A cubic doesn't have a global maximum or minimum value - think about what happens when x is a very large positive number or a very large negative number. However, it may have local maximum or minimum values, which are stationary points. Sketch the graph of to see an example. Gandalf61 12:30, 10 December 2006 (UTC)[reply]
I posted a pic above, so you can see what we mean. And yes, the maximum is normally positive infinity (with possible exceptions for degenerate cases, such as where a = 0). StuRat 12:53, 10 December 2006 (UTC)[reply]
You can find the turning point - where the function changes direction from up to down or down to up (at about x=-3 and x=+1 on the pic) by setting the differential of the function to zero. b:Differential Equations has info on differentials. --h2g2bob 18:01, 10 December 2006 (UTC)[reply]
Should have read Gandalf61's post more carefully, that's more or less what was said already :-) A turning point is another name for a stationary point.
As for the very edges, what happens is that as x goes to infinity, y will also go to infinity; and as x goes to negative infinity, y will go to negative infinity. If the coefficient of x3 is negative, the sign will swap (ie: if y = -x3, then if x→+∞ then y→-∞ and if x→-∞ then y→+∞) Technically you can't actually ever reach infinity, thats why it "goes to" or "tends to" infinity (see limit (mathematics)). If x ever reached infinity, y would also become infinity (substitute x=infinity and solve for y to prove this). The function will tend to a countable infinity.
The way to solve these is to think "what happens if x is really big" (or "really big negatively" for negative x). You only really have to worry about the highest order term - if there's an x3 term, you can ignore the x2 and x terms. Likewise, you only have to worry about the sign of the coefficient (if you go to infinity, then something times infinity is still infinity). --h2g2bob 18:49, 10 December 2006 (UTC)[reply]
What? Countability has nothing to do with this. Even if infinity is introduced to the number system, it is not much more than just an object called infinity. This is completely different from the cardinality of sets. And let's not forget that as long as we are working with real numbers, there's no such thing as substituting infinity in the equation. -- Meni Rosenfeld (talk) 21:21, 10 December 2006 (UTC)[reply]
The possibilities for a polynomial function are few and simple. As with any function, we first ask if we are given bounds, such as, "Find the maximum of f(x) for a ≤ x ≤ b." If so, then we might have a maximum at a boundary, or we might have one within the boundaries.
The unbounded behavior splits into three cases: constant, odd degree, even degree. The maximum of f(x) = c is c; done! Otherwise, let n be a positive integer, and let λ be a non-zero real number. For odd degree, f(x) = λx2n−1+(lower-order terms), the behavior for large x is entirely controlled by λ. If λ is positive, then as x increases positively, eventually so will f(x), becoming as large as we like; and if λ is negative, then this happens as x increases negatively. (An odd power of a number retains the sign.) Either way there is no maximum. For even degree, f(x) = λx2n+(lower-order terms), a maximum may exist, depending on the sign of λ. If λ is positive, then as x increases either positively or negatively, so does f(x), making a maximum impossible; but if λ is negative, then a maximum is guaranteed. (An even power of a real number is never negative.)
As for where to find a maximum, that was discussed in a recent thread. And if the function is not polynomial, such as f(x) = 1x, the possibilities are more delicate. It is even possible to have a function that cannot take on arbitrarily large values, yet that also does not achieve a maximum value; an example is f(x) = x2/(x2+1). --KSmrqT 21:43, 10 December 2006 (UTC)[reply]

Bézier Curves

Hello, I've been looking at the Bézier curve article and have been drawing a few Bézier curves from points. (I've uploaded an image at Media:BezierCurve.gif)

But is there a way, instead of getting the curve from the points, to get the points corresponding to the curve ? I mean, under what assumptions can any curve be represented as a Bezier curve ? I suppose for example that it's impossible to draw sharp points except at the end of the curve, but that you can simulate those points, maybe, with a higher degree curve and points placed quite far away... Is there any way I can get the points with a given parametric/implicit equation ? Otherwise, how can I get a good approximation ?

--Xedi 13:39, 10 December 2006 (UTC)[reply]

Hmm, I suppose stitching together multiple Bézier curves allows the sharp points. Any ideas to get close approximations ? --Xedi 17:55, 10 December 2006 (UTC)[reply]
Degree is a limiting factor. A parametric curve of degree n can be represented exactly by a Bezier curve of degree n. For a curve like y=sin(x) which has infinite degree then you will not be able to get an exact Bezier curve, but the aproximation will be as good as you need.
If you have a degree-n parametric representaion of the curve over a given interval (p(t),q(t)) t in [0,1], then you calculate the Bernstein polynomial for each polynomial. There is a faily well know algorithm to do this, see for example [3].
Alternatively if you are happy with a piecewise cubic aproximation, for a given segment, P0 and P3 will be the end points, P1 will lie along the tangent to the curve at P1 and it distance is related to the curvature of the curve at P0. Similar for P2. --Salix alba (talk) 11:46, 11 December 2006 (UTC)[reply]
That is a lot to answer, enough to fill a lecture series!
Elliptic curve
A Bézier curve is piece of a polynomial curve; that is x and y are polynomial functions of a parameter t. Such a function is infinitely differentiable, and will not have any exact sharp corners. We do have the flexibility to perfectly reproduce any polynomial curve, but that's more limiting that we like. If we allow rational Bézier curves, where we draw a curve in 3D then perspectively project to 2D, we can handle functions which are a ratio of polynomials. This allows us to handle any curve with a quadratic implicit equation, including circles, ellipses, and hyperbolas. However, algebraic geometry tells us that most implicit curves of higher degree have no parametric representation as a ratio of polynomial functions. This already applies to the so-called elliptic curves, cubics like y2 = x3x+12.a
Thus we step up to B-spline curves (or sometimes non-uniform rational B-spline curves, NURBS). These piecewise (rational) polynomial curves allow us to join pieces either smoothly or sharply, and avoid a major problem of polynomial approximation, Runge's phenomenon. A practical illustration of the possibilities is visible in the letter shapes you see on this page. For example, the outline of the letter "a" is drawn with such curves. --KSmrqT 15:49, 11 December 2006 (UTC)[reply]
Okay, thanks a lot. --Xedi 21:14, 11 December 2006 (UTC)[reply]

rewrite using partial fractions

hello, I need help rewriting this

(s-1)/(s+3)

into this, possibly using partial fractions, but I can't figure it out.

(-1/3)/s + (4/9)/(s/3+1)

thanks, -Steve

Start from the second one and work back to the first. Then write it down as if you'd done it the right way round. That always worked for me... yandman 07:53, 11 December 2006 (UTC)[reply]
Or, if you're supposed to understand how to do those sorts of things ... first you need to write them down correctly because there's no way in hell what you've written there can be equal. I suspect the first fraction is meant to be (s-1)/s(s+3). To work this out, I'll just give you the first couple of steps (because I'm feeling just a tad too lazy to do it all here):

Let . Then a little rearranging gives , and it's just a case of finding a and b. Confusing Manifestation 10:29, 11 December 2006 (UTC)[reply]

yes you're rigyht, this is controls and there was a step change, hence the extra 1/s. Thanks for the help. -Steve

vector perpindicular

if A =5I+3J+2K AND B=4I+2J+K HOW DO I FIND TWO VECTORS PERPENDICULAR TO THEM —The preceding unsigned comment was added by Garrycp2p (talkcontribs) 14:03, 10 December 2006 (UTC).[reply]

Use the scalar product. Imagine the vector of coordinates xI+yJ+zK. You need 5x+3y+2z=0 and 4x+2y+z=0 (the vector must be perpendicular to both the vectors, so the scalar product must be 0). This gives you { y=-3x and z=2x } for example. Just pick two values of x, put them in the equations to get y and z, and write your name and class on the top of the sheet... yandman 14:11, 10 December 2006 (UTC)[reply]
Well, that's one way of doing it. A far, far easier way would be to think of what other kind of product of vectors you may have been taught in class, and think about what properties the result of that product has in relation to the original two vectors. Confusing Manifestation 14:13, 10 December 2006 (UTC)[reply]
I was worried that he might not have seen that yet. I recall having studied vectorial products much (1 or 2 years) later than scalar ones. yandman 16:24, 10 December 2006 (UTC)[reply]
hi thank for the help both of ye. Con man will you explain your way better if its easier id like to know my brain is gone to mush for cramming for exams so any help is great - garrycp2p —The preceding unsigned comment was added by Garrycp2p (talkcontribs) 16:13, 10 December 2006 (UTC).[reply]
Well we're not supposed to answer homework questions here, but I'll give you a little more of a hint: do you know about the Cross product, aka the vector product? If you have two vectors in 3D Euclidean space (which you do), then what do you know about the cross product of the two, specifically, where does it point in relation to the two vectors? Confusing Manifestation 10:20, 11 December 2006 (UTC)[reply]
(As stated at the top of this page, please do not use ALL CAPS; also, sign your posts. Thanks.)
This question is awkward to answer for three reasons: (1) we don't give complete homework answers, (2) we don't know what you know, and (3) it's tricky to handle all the input possibilities. Most of us instantly think of the same well-known tool. However, you may not yet have learned that tool, and it has limitations.
The way you have presented your two vectors, we will assume you are working in three dimensions with real scalars. Therefore, at most three vectors can be mutually perpendicular. Since you want to extend a list of two to a list of four, each cannot be perpendicular to the other three; in fact, the four cannot be linearly independent.
A very general way to proceed is to construct an orthonormal basis for the whole space, partitioned into a basis for the span of the given vectors, and a basis for its orthogonal complement. Then we can make as many perpendicular vectors as we like by taking linear combinations of the complement basis. A robust algorithm for the construction is QR decomposition, with pivoting, of a matrix whose first columns are the given vectors and whose remaining columns form an identity matrix.
We do have special cases. In 2D, a perpendicular to nonzero vector (x,y) is (−y,x). In 3D, we typically use a cross product; however, it is dangerous to blindly trust it. If either input vector is zero, it fails. If the input vectors are not independent, it fails. And if the input vectors are nearly dependent, a numerical calculation may suffer "catastrophic cancellation" and fail. --KSmrqT 13:59, 11 December 2006 (UTC)[reply]

natural log integration

I can easily find the integral of ln(x) using int. by parts, but I am having trouble doing the same for integral of ln(x+2). Can anyone help? --68.126.3.68 21:47, 10 December 2006 (UTC)[reply]

Try substituting . -- Meni Rosenfeld (talk) 22:00, 10 December 2006 (UTC)[reply]
If you know how to, use substitution : put t = x + 2. Otherwise you can just see that, as (because the derivative of a constant is 0), you can just say that if , then --Xedi 22:01, 10 December 2006 (UTC)[reply]
Ok, Meni Rosenfeld was faster. --Xedi 22:02, 10 December 2006 (UTC)[reply]
To amplify slightly: Any time you see an integral with an expression in place of x, which otherwise looks like a known integral, a change of variables is a natural attack. Here you claim to know how to handle
so it is reasonable to try the change of variables y = 3x−5 when presented with
(Note the different problem, to avoid doing homework.) If y is so defined, then x = (y+5)/3, and dx = 13dy. Thus the integral becomes
and the known answer does the rest. Three cautions: (1) Remember to reverse substitute to use x in the answer, (2) it is necessary to adjust the limits of integration in a definite integral, and (3) this attack may not give a known integral if the expression for y is complicated (because the complexity is moved to the dx substitution). --KSmrqT 14:33, 11 December 2006 (UTC)[reply]

December 11

continuity question

is the graph of 2*(3root(X)) it should be approching x=0 but never get there , is it called point discontinuity or jump discontinuity thanks --205.222.248.176 12:48, 11 December 2006 (UTC)[reply]

Do you mean 2 times the cube root of x ? That should include the point (0,0), and I don't think there's any discontinuity. StuRat 13:29, 11 December 2006 (UTC)[reply]
If y = 2x1/3, for x ≥ 0, then x = (12y)3. If we extend the meaning of cube root for negative values of x to be sign of x times the cube root of the absolute value, then the x equation holds for all y. The formula posted is in error, or the belief in a discontinuity is in error. --KSmrqT 14:14, 11 December 2006 (UTC)[reply]

That won't have any discontinuity. However, I'll define them for you. A point discontinuity is a single point on a graph that the value doesn't exist for and such that the lim x -> a- = lim x -> a+. Think of the graph of f(x)=(x+1)²/(x+1). A jump discontinuity is where the graph jumps on the discontinuity such that lim x -> a+ does not equal lim x -> a-. An example would be f(x)= 1/x. --AstoVidatu 00:21, 12 December 2006 (UTC)[reply]

Actually, in order to count as a jump discontinuity both the right hand and left hand limits have to exist and be finite (see Classification of discontinuities). So 1/x does not have a jump discontinuity at x=0 since the right-hand and left-hand limits aren't finite. Rather, x=0 would be an essential discontinuity for 1/x.
An example of a jump discontinuity would be f(x)=int(x) at x=0. For 0<x<1, f(x)=0, but for -1<x<0, f(x)=-1. So the right-hand limit is 0 while the left hand limit is -1, making x=0 a jump discontinuity. Dugwiki 16:17, 12 December 2006 (UTC)[reply]
Once we start talking about continuity, we are probably going to move into calculus. Consider the familiar absolute value function φ(x) = |x|; it is continuous everywhere. Now look at the slope of φ, or what calculus would call the first derivative, φ′. For x < 0 it is −1, for x > 0 it is +1, and at x = 0 it is undefined. Thus φ′ (a slight variation of the Heaviside step function) is a continuous — in fact, constant — function everywhere but at zero, and there it has a jump discontinuity. Now repeat; take the derivative again, producing φ″. Since φ′ is constant everywhere except at zero, its slope is zero everywhere except at zero. At zero the slope is undefined, so we have a point discontinuity.
It seems a little artificial to treat (x+1)2/(x+1) as having a discontinuity, since we have an irresistible urge to reduce it to simply x+1. So consider instead the "sinc function", which we may define as sinc(x) = sin(x)/x. We cannot simplify, and we get division by zero at x = 0; yet if we let x approach zero from either side, the function approaches 1.
These discontinuities are straightforward to explain and easy to picture. Not weird enough? Then define φ(x) to be 0 if x is rational, and 1 if x is irrational. Now we have a discontinuity at every point!
Let's close with a humdinger, separating discontinuities from derivatives. Define
In 1953, John McCarthy published an elementary 13-line proof in the American Mathematical Monthly that this is an example of a function that is everywhere continuous but nowhere differentiable. --KSmrqT 18:28, 12 December 2006 (UTC)[reply]

Finding a tangent

I need a tangent to a curve. There's an s-t-diagram for a man jogging, and, I don't know the English name for it, but I need the velocity of the jogger at a particular point, specifically after 40 seconds. The travelled distance at that time is 220 meters. How do I calculate the tangent? The answer is 2.3m/s. Sorry I can't explain it properly, hope you guys understand it anyway. Thanks in advance. Jack Daw 21:57, 11 December 2006 (UTC)[reply]

If I understand your question correctly, what you're looking at is a graph x=f(t) where t is a point in time and x is the total distance travelled. Velocity is a measure of the ratio of change of position x over time, which you can also write as , and this corresponds to the slope of the graph. To calculate the slope of the graph at a particular time z, you need to find the derivative x'(z). Dugwiki 22:24, 11 December 2006 (UTC)[reply]

If you don't have a calculus base you can approximate the tangent by finding a secant line. So find the (x,y) values at 39.999 and 40.001 or something like that (as close together as you can) and then use the slope formula (y1 - y2)/(x1 - x2) = slope. Basically, calculus just makes the difference between x1 and x2, and hence y1 and y2 (under most circumstances) so that it approaches zero. --AstoVidatu 00:27, 12 December 2006 (UTC)[reply]

I forgot to say I'm looking for the inclination of the tangent. This is the velocity in a certain instant, 40 seconds to be exact, and the answer is 2.3 (meters/second). Now... I don't know how to formulate the variables in an equation, but this is all related to v = (capital delta s)/(capital delta t) where v = velocity in m/s, s = distance and t = time. The instruction for a similar question is, "Draw a tangent to the graph in the point t=42. Calculate the inclination of the tangent..." In that question the tangent is already drawn however, which it isn't in the one I'm trying to solve, and I have no idea how to do it. Should be something similar however. This is junior high physics, so all you mathletes out there ought to be able to solve it (with high school math). Again, how do I find the tangent and its inclination to a point (40;220)? Thank you. Jack Daw 01:03, 13 December 2006 (UTC)[reply]

December 12

Partial (trapezoidal) section of sphere/ellipsoid surface

(Moved by suggestion from Talk:Polar coordinate system)

What is a trapezoidal shaped section of a sphere or ellipsoid's surface called? I think it is something like "quadratic angle" or "quadrilateral section"—?  ~Kaimbridge~01:04, 13 December 2006 (UTC)[reply]

The thing you describe will bound a solid angle. It's called a "spherical polygon" provided the lines creating it are arcs of great circles (see great circle also geodesic) see:Spherical trigonometry.83.100.254.21 17:57, 13 December 2006 (UTC)[reply]

No, that's not the term (I came across the term and an image of it a while back, while looking something else up——I think either here in Wikipedia or MathWorld).

The closest description would be "spherical isosceles trapezoid" (but, like segments in the above image, not necessarily "upright").  ~Kaimbridge~20:11, 13 December 2006 (UTC)[reply]

Is it a specific term that means the same as "spherical isosceles trapezoid" you are looking for, or is it a slightly different thing? To be honest I can't find anything the same, http://mathworld.wolfram.com/SphericalTriangle.html http://mathworld.wolfram.com/SphericalPolygon.html gives no alternative names. The only 'specialised' term I can think of in terms of spherical geometry is spherical lune. Have you looked at 'Hosohedron'?83.100.254.21 20:39, 13 December 2006 (UTC)[reply]
Looking at the two diagrams you supply do you mean the area/volume produced by the intersection of a spherical wedge and spherical segment/sector?83.100.254.21 20:43, 13 December 2006 (UTC)[reply]
Question are the parallels great circles (or not), are the 'legs' definately great circles.? alternatively is the shape formed from two longitudes and two latitudes?83.100.254.21 20:47, 13 December 2006 (UTC)[reply]

How to distinguish between different local maxima points and numerical errors

Hi all! I think this is a simple question, but I cannot think a clever algorithm for this problem: We will work in standard x-y-z space. We have an objective (strictly positive and bounded) function f(x,y) in domain, says, [0,10]x[0,10], and we want to write a computer program to find the set of all points {(x,y) } in the domain which locally maximizes f(x,y). However, suppose f(x,y) contains many many local maximum points, says, more than hundred mountains in the domain. To simplify the problem now, I suppose there is no ridge in any mountains.

Let us suppose that we can calculate the gradient (and hessian) of f(x,y), my basic scheme is to try using standard gradient ascent (or conjugate gradient, etc.) many times with different random starting points to discover all mountains. However, suppose my 2 answers (x1,y1) and (x2,y2) are very closed, and also f(x1,y1) and f(x2,y2) are also very closed. How can we check that they come from the same mountain (but with small numerical errors), or they really come from two different mountains?? -- 131.111.164.218 12:55, 13 December 2006 (UTC)[reply]

Why random points? Can't you just find the 0's of the {df/dx,df/dy}? yandman 13:04, 13 December 2006 (UTC)[reply]
Sorry, I didn't make my problem precisely. Suppose I have to solve the problem by wrting the computer program, so I have to concern about numerical error. Now suppose I find two 0's of the {df/dx,df/dy} which you mentioned, and they are very closed. How can I know that these two points come from different mountains or they come from the same mountain with small numerical error? -- 131.111.164.218 13:32, 13 December 2006 (UTC)[reply]
If they're from different mountains, there'll be another 0 of {df/dx,df/dy} between them (the bottom of the "valley"). yandman 13:43, 13 December 2006 (UTC)[reply]
Yes, you're right, but in order to find that point in between, it looks like I have to solve another problem (with the same difficulty) for every pair of mountains (and there are a lot of mountains). So, now I'm looking for more simple checking method such as this: if |f(x1,y1) - f(x2,y2)| < c1 & if |(x1,y1) - (x2,y2)| < c2, then just ignore the error. But I'm still strucking of how can we know these c1 and c2? Are there any good rule of thumbs, (or totally different methods?). 131.111.48.168 15:34, 13 December 2006 (UTC)[reply]
I'm no expert on numerical methods, but I guess the answer can depend heavily on what kind of assumptions we can make about f (how smooth it is, what order of derivatives can be assumed to be nonzero, etc.). My idea is to calculate f at random points in the vicinity of the two maxima, and to check the statistical correspondence between receiving high values and being close to the maxima. If there doesn't seem to be a difference between, say, points in the middle and points near the maxima, we can assume that these are actually the same maximum. The exact implementation can vary. -- Meni Rosenfeld (talk) 16:44, 13 December 2006 (UTC)[reply]
Thank Meni! But can you explain more about your sentence check the statistical correspondence between receiving high values and being close to the maxima? I think I do not clearly understand 131.111.164.218 17:04, 13 December 2006 (UTC)[reply]
Heh, that sentence was left vague in purpose, because the exact way you implement it depends on many things, and even if those things are given, I'm not sure what's best. But consider this simplified example: Suppose your function is defined on , and your analysis shows that the points +1 and -1 are suspected local maxima, with a value of 0. You are trying to figure out whether the function is something like , so these are actually the same maximum at 0, or the function is something like , so there really are maxima at +1 and -1. Since there are numerical errors (which we can model as random noise), you can't check this directly. However, you can evaluate the function at many random points, and calculate Pearson's correlation coefficient between, on one hand, the resulting values and the first of these candidate functions, and on the other hand, between the resulting values and the second of these candidate values. Whichever gets a higher coefficient is more likely to resemble the true function, so this can estimate whether the two maxima are actually one. This idea can probably be generalized to a more useful setting (just find two or more functions which may resemble the true function, and go with the one that corresponds better with the data). -- Meni Rosenfeld (talk) 17:25, 13 December 2006 (UTC)[reply]
Thanks for your clarifying :). That's surely a clever (though requires some works) method. In fact, I did not understand that sentence, because of my English, not because of its vagueness ... 131.111.164.218 17:36, 13 December 2006 (UTC)[reply]


Firstly a remark: If you have Hessians (i.e. second derivatives) of f, why not use Newton to find zeros of the derivative, rather than conjugate gradients? On your specific question: if your (x1,y1), (x2,y2) are very close (say ) and you cannot get more accurate solutions due to numerical errors (say your function values are only exact to 7 decimal places), then there is nothing you can do. Sampling intermediate points will just give you noise based on those numerical errors. You will just have to accept that up to 7-digits exact these ARE the same mountain. Some smoothness argument (Lipschitz continuity of the derivative) will help in establishing that in a vincinity of your (x1,y1)/(x2,y2) there are no points with large values of f' (which would make those two separate mountains).195.128.250.110 23:04, 13 December 2006 (UTC)[reply]
You may be able to achieve superresolution in this numerical problem by replacing your function with its Pade approximant. The Pade approximant is a rational polynomial approximation to the function. If your f() is sufficiently well-behaved, then its approximant will be a faithful approximation. Note that meromorphic is sufficient. The advantage of the approximant is that you can use symbolic methods (derivatives of rational polynomial functions can be computed by what amounts to elementary arithmetic on lists of pairs of coefficients and powers) to determine whether there's a zero between the two peaks and/or to determine whether the Hessian has the same sign at the two peaks.
For many "natural" problems, the Pade approximant is a surprisingly rapidly faithfully converging approximation. The simplicity of the arithmetic on rational polynomials is another benefit.
In this application, you'd sample a bunch of points scattered around your two nearly coincident peaks and use those pairs of inputs and output to build your approximant. There are canned codes for this and the Pade approximant article references "Numerical Recipes". Note that this is a variety of superresolution/extrapolation, so your result could be wrong, but you're making the best guess you can with the data you've got.

Fuzzyeric 04:17, 14 December 2006 (UTC)[reply]

Rate of Return with Multiple Capital Injections

I need assistance determining the the TRUE ROI for a serious of investments with differing profit/loss and differing capital injections.

For example:

Jan 06: Purchase $10000 in shares in X Jan 06: Sell all shares in X and make profit of $1000 & spend this $1000 Feb 06: Take $10000 & purchase share in Y Feb 06: Stock drops and purchase $5000 more share sin Y Mar 06: Sell all shares in Y & make profit of $1500.

Individually, the SIMPLE ROI for each investment is 10%

However, the total profit is $2500, with a maximum invesment of $15000 = 16.7% return. I think this is wrong.. I need validation

OR

Do i just weight each investment accordingly to better understand the correct SIMPLE ROI.

OR

Is there some other method to best figure out ROI?

Thanks Trevor Gartner trevor.gartner@telus.com

I'd say the ROI is actually closer to 18%, because you only actually invest 14k (the 1k you gain after the first "session" can be deducted from the 5k extra you put in). yandman 20:50, 13 December 2006 (UTC)[reply]

Non-Euclidian geometry

The five postulates of classical Euclidian geometry are

  1. Any two points can be joined by a straight line.
  2. Any straight line segment can be extended indefinitely in a straight line.
  3. Given any straight line segment, a circle can be drawn having the segment as radius and one endpoint as center.
  4. All right angles are congruent.
  5. If two lines intersect a third in such a way that the sum of the inner angles on one side is less than two right angles, then the two lines inevitably must intersect each other on that side if extended far enough.

By changing the fifth postulate, you get the hyperbolic and elliptical geometries. But what sort of geometry do you get if you change the fourth postulate? --Carnildo 23:49, 13 December 2006 (UTC)[reply]