Wikipedia:Reference desk/Archives/Mathematics/2006 December 18

From Wikipedia, the free encyclopedia
Mathematics desk
< December 17 << Nov | December | Jan >> Current desk >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


December 18[edit]

Absolute Extrema and Absolute Values[edit]

How do you go about finding critical numbers and absolute extrema when the original function is an absolute value? Say, for example:

f(x) = |x + 3| on the interval [-4,4]

A critical point (mathematics) is where the derivative is zero or undefined. The only place here is when the derivative is undefined where the absolute value is zero, which is at x = -3. Global extrema must occur on critical points or at the boundary, so the candidates are: x = -4 (y = 1), x = -3 (y = 0), and x = 4 (y = 7). So the global maximum is at x = 4 and the global minimum is at x = -3. --Spoon! 00:29, 18 December 2006 (UTC)[reply]
(after edit conflict) An extremal value of function f, where f(x) = |g(x)|, is either an extremal value of function g or is a minimum value of 0 attained at a zero of g. Maxima of g are maxima of f when positive, and otherwise they become minima. Likewise, minima remain minima when non-negative and otherwise become maxima. As always you must consider the boundaries of an interval: on [−4,4] you have extremal values for x = -4 and x = 4. The function g with g(x) = x + 3 has a minimum −1 at x = −4, which becomes a maximum 1 for f, and a maximum 7 at x = 4, which remains a maximum. Other than that, the function g with g(x) = x + 3 has no extrema, but it vanishes at x = −3, giving a minimum of 0 for f. So we have two maximum points: f(−4) = 1 and f(4) = 7, and one minimum: f(−3) = 0. Obviously, the last two are absolute extrema. If the range of the function had been unbounded or the interval not closed, a further investigation would be needed; in such cases it is possible that there is no absolute minimum or maximum.  --LambiamTalk 00:38, 18 December 2006 (UTC)[reply]
Do you want to solve this by algebra or numerically? By Algebra: normal calculus does not hold for absolute value function (it is non-differentiable). But you can use the concept of subdifferential. Basically this is the convex hull of all the possible limits you could get for the derivative at the point in questions. In the above example f(x) is non-differentiable at x = -3. The possible limits for the derivatives are -1, 1 (depending on whether you come from right or left), so the subdifferential is the set [-1, 1]. If this set contains 0, then x is a critical point.
Numerically you can restate the problem: min |x+3| as "min v, subject to v>=x+3, v>=-x-3". That is now a standard linear programming problem and can be solved e.g. by Simplex195.128.251.240 10:07, 20 December 2006 (UTC)[reply]

Straight lines[edit]

Dear Sir/Madame,

Please give me a hint to solve this problem: The base of a triangle is fixed and of length 2a.Find the locus of the vertex when one base angle is double the other,the coordinate axes being along the fixed base and perpendicular to the base through the midpoint.

Thank you.

-Sruthi. —The preceding unsigned comment was added by 59.93.64.113 (talk) 02:34, 18 December 2006 (UTC).[reply]

fixed formatting - no need to indent. :) In fact, a line starting with a space has special meaning to the software. Responses in a bit.... —AySz88\^-^ 03:13, 18 December 2006 (UTC)[reply]
Draw a couple of triangles to see what it looks like, hypothesize what the curve it is, and then try to prove it. --Spoon! 04:55, 18 December 2006 (UTC)[reply]
The length of the base being given as of the form 2a seems like a red herring. If the "single" base angle is interior and the "double" angle exterior, the locus of the top vertex is a particularly simple and well-known figure, and easy to guess from such a sketch if executed with precision. If both angles are meant to be interior – as would be my first interpretation – the locus is not quite as simple, and not easy to hypothesize from a sketch. In that case the simplest approach (in my opinion) is to use analytic geometry. Fix the base points at A = (0,0) and B = (0, 2a), put C = (x,y) for the vertex, find one equation for (x,y) as being on the line through A making a certain angle α with the x-axis, and another equation for the line through B making an angle 2α in the mirrored direction. Using the double-angle formula for tan(2α), eliminate tan α from the equations, resulting in one equation in the unknowns x and y. This is the analytic formula for the locus of C. It is a quadratic equation in x and y, and therefore the equation of a conic section.  --LambiamTalk 07:37, 18 December 2006 (UTC)[reply]
I would assume that both the angles are interior. Though why the base is given as 2a and not say just 'a' is currently a mystery.83.100.250.252 09:42, 18 December 2006 (UTC)[reply]
In some *cough* nice examinations, some questions use 2a as a hint that it has to be divided by 2 (and 3a to hint that it has to be divided into 3, and so on). x42bn6 Talk 17:38, 18 December 2006 (UTC)[reply]
And in some other (choking sounds omitted) questions they use 2a while the base, if it's to be divided at all, is most sensibly divided into three.  --LambiamTalk 21:13, 18 December 2006 (UTC)[reply]
It seems reasonable to use 2a, as the origin has been stated as midway along the base.81.154.107.121 18:09, 20 December 2006 (UTC)[reply]
Oh yeah! very sorry. I just wasn't reading the question - now I understand those {coughs}. Stupid me. sorry.87.102.4.227 19:23, 20 December 2006 (UTC)[reply]
Since the problem mentions coordinate axes, presumably we are meant to use a coordinate approach. The three angles of the triangle must sum to π, and if we fix one base angle, then we force the other base angle, and hence the triangle. We conclude that the locus of the vertex is a curve, which we could parameterize by a base angle. This much should be obvious, but it is worth stating.
We also have two easy points on the locus. An isosceles right triangle gives (a,2a), and a 30°–60°–90° right triangle gives (12a,√32a). These will be useful in confirming any solution. Were we to allow a degenerate triangle with a zero angle, the vertex could be anywhere along the base; we should expect some echo of this in our solution. The geometry also tells us that if (x,y) is a solution vertex, its mirror (x,−y) will be another.
If we were to interpret the single angle as inside and the double angle as a supplement, then a proposition of Euclid would give an easy solution. That's wishful thinking, but the algebra of inscribed angles will be useful.
Drop a perpendicular from the vertex to the base, splitting the triangle into two right triangles. Both have height h, and the left has base ℓ while the right has base r. Let the left angle be ϑ; then h/ℓ = tan ϑ = t, while h/r = tan 2ϑ = 2t/(1−t2). (This final formula is derived from the relationship between the inscribed angle and the central angle of a chord of a circle.) Therefore
So long as h is not zero, we can divide it from both sides. (Otherwise, there's our degenerate triangle.) Now a series of elementary algebraic manipulations reduces this to an implicit polynomial equation in x and y, where y is simply h, and x is ℓ−a or ar. In the equation, we expect only even powers of y, because of the symmetry noted above.
In case it is not obvious, I have essentially retraced the steps of Lambiam. But just as we're ready to congratulate ourselves and turn in our homework, we notice a problem. Somewhere along the way (where?) we introduced the possibility of extraneous algebraic solutions that are geometrically inadmissible! (Try x = −53a.) A complete answer must account for this. We may also want to note the ambiguity of the original problem statement, which does not say which side has the single angle and which has the double; thus if (x,y) is a solution, perhaps we should also admit (−x,y).
Let us close with a challenge: Can we see an answer using purely geometric reasoning, without the crutch of coordinates? --KSmrqT 20:39, 21 December 2006 (UTC)[reply]
((((I would find it very difficult to visualise it given that the orientation of the hyperbola changes depending on the absolute value of a and when a =sqrt(1/3) the 'graph' is of the form y2=kx2. I bow to those that can however..83.100.255.234 22:37, 21 December 2006 (UTC) ))))[reply]
Ignore above. beep.mega_error. maths_bot terminated..87.102.22.65 02:21, 22 December 2006 (UTC)[reply]

Probability distribution question[edit]

Six variables, a1 through a6, are all initially set to 3. A "bank of points," b, is initially set to 54. Two six-sided dice are to be rolled, the results being x and y. x is subtracted from b and added to ay, unless x > b (in which case only b points are transferred) or ay + x > 18 (in which case only 18 – ay are transferred). This is repeated until b = 0. A C program for this operation, if I'm not too rusty on my C, would be:

int a = new int[3,3,3,3,3,3];
int b = 60;
int x,y;
while (b > 0) {
    x = random(6) + 1;
    y = random(6);
    if ( a[y] + x > 18 )
        x = 18 - a[y];
    if ( x > b )
        x = b;
    a[y] += x;
    b -= x;
}

The average a is then obviously 12, but what is the probability distribution? How does it change if the initial b is higher or lower? NeonMerlin 02:24, 18 December 2006 (UTC)[reply]

Let's do a quick simulation. It's easy because you gave us an algorithm that's ready to implement. A few tries give the following results:
   
   St:18 Dx:9 Co:8 In:18 Wi:18 Ch:7
   St:11 Dx:7 Co:11 In:18 Wi:13 Ch:18
   St:18 Dx:17 Co:18 In:8 Wi:14 Ch:3
   St:18 Dx:10 Co:11 In:11 Wi:18 Ch:10
   St:18 Dx:11 Co:18 In:11 Wi:10 Ch:10
   St:16 Dx:3 Co:13 In:10 Wi:18 Ch:18
   St:13 Dx:18 Co:18 In:11 Wi:3 Ch:15
   St:11 Dx:16 Co:15 In:3 Wi:15 Ch:18 
A few tries gives us the following statistics. The second column gives the probability that a is exactly the value of the first column, the third column is the percentage that a has at most that value.
    3:  2.3%   2.3%
    4:  1.6%   3.9%
    5:  2.2%   6.1%
    6:  3.0%   9.1%
    7:  3.9%  13.0%
    8:  5.0%  18.0%
    9:  6.3%  24.3%
   10:  5.9%  30.2%
   11:  6.4%  36.6%
   12:  6.7%  43.3%
   13:  6.8%  50.1%
   14:  6.7%  56.8%
   15:  6.4%  63.2%
   16:  5.7%  68.9%
   17:  5.2%  74.1%
   18: 25.9% 100.0%
Here's a simple illustration showing the distribution:
   
   ,                       ,                        ,                        ,                        , 
   3344556667777888889999990000001111111222222333333344444445555556666667777788888888888888888888888888
   
b_jonas 12:33, 18 December 2006 (UTC)[reply]
Btw, above you once give the initial value of b as 54 and once as 60. I used 60 above, but now I rather think 57 would be the correct value. – b_jonas 12:37, 18 December 2006 (UTC)[reply]
Let's see what we get if b starts from 54 so you get a total of 72 point and each a is 12 in average:
   
    3:  4.0%   4.0%
    4:  2.3%   6.3%
    5:  3.1%   9.4%
    6:  4.0%  13.4%
    7:  5.0%  18.4%
    8:  6.2%  24.6%
    9:  7.6%  32.3%
   10:  6.5%  38.8%
   11:  6.8%  45.6%
   12:  6.9%  52.5%
   13:  6.8%  59.3%
   14:  6.5%  65.8%
   15:  5.9%  71.7%
   16:  5.0%  76.8%
   17:  4.5%  81.2%
   18: 18.8% 100.0%
   
   ,                       ,                        ,                        ,                        ,
   3333445556666777778888888999999900000001111111222222333333344444445555556666677778888888888888888888
   
And now with the initial value of b being 57, so the total a is 75 and the average is 12.5.
   
    3:  3.1%   3.1%
    4:  1.9%   5.0%
    5:  2.6%   7.6%
    6:  3.5%  11.1%
    7:  4.5%  15.6%
    8:  5.7%  21.2%
    9:  7.0%  28.2%
   10:  6.2%  34.4%
   11:  6.6%  41.1%
   12:  6.8%  47.9%
   13:  6.9%  54.8%
   14:  6.7%  61.4%
   15:  6.2%  67.6%
   16:  5.4%  73.0%
   17:  4.9%  77.9%
   18: 22.1% 100.0%
   
   ,                       ,                        ,                        ,                        ,
   3334455566677777888889999999000000111111122222223333333444444555555566666777778888888888888888888888
   
b_jonas 12:57, 18 December 2006 (UTC)[reply]
In case you want an analytic expression for the distribution, it is worth noting that often, it is easier to solve a "harder" (or more precisely, more general) problem than a specific case. Instead of considering the distribution for this particular setting, consider the distribution generated by any initial conditions a1,...,a6 and b. This is trivial for the case where a1+...+a6+b = 108, and it shouldn't be too hard to find a recursive relation between lower initial conditions and those with higher ones. You then may be able to solve this recurrecnce relation, and finally substitute your particular starting conditions and obtain the exact distribution. -- Meni Rosenfeld (talk) 17:38, 18 December 2006 (UTC)[reply]
I notice that all the distributions (for b = 54, 57 and 60) spike a bit at 9. Is this a fluke or is it real? NeonMerlin 18:08, 18 December 2006 (UTC)[reply]
I'd say it's for real, and that it's because this is the highest value that can be arrived with one die. If you think about it a bit, you'll see why it's logical to have a relatively high probability there. -- Meni Rosenfeld (talk) 18:16, 18 December 2006 (UTC)[reply]
Sounds right. There's also a spike at 3. – b_jonas 23:17, 18 December 2006 (UTC)[reply]

nPr & nCr[edit]

Help! I don't know how to tell the difference for nPr and nCr! I mean, I know the equations, but how do I know which one to use for a certain situation? --a student 03:17, 18 December 2006 (UTC)

To start with, take a look at the article Permutations and combinations. Maelin (Talk | Contribs) 03:26, 18 December 2006 (UTC)[reply]
The key question is, is order important? Use nPr when it is and nCr when it isn't. If you're choosing three of A,B,C,D and E, would ABE be the same as EAB? If so, there are 5C3 ways to choose; if not, there are 5P3 ways. NeonMerlin 03:46, 18 December 2006 (UTC)[reply]
Remember that replacement is another important consideration. Use nPr if you are concerned with the order and you don't have replacement - that is, once an item is "selected", it can't be selected again (it is "taken out of the bag"). If you do have replacement, in which you are concerned about the ordering but items can be selected several times, use instead. Maelin (Talk | Contribs) 04:15, 18 December 2006 (UTC)[reply]
And if order is unimportant and there is replacement, that's the most complicated situation, AFAIK requiring case logic for n > 2. NeonMerlin 05:22, 18 December 2006 (UTC)[reply]
Surely not. One could simply pretend there were exactly r instances of each unique element and transform it into a simple combinations without replacement problem again. Maelin (Talk | Contribs) 05:34, 18 December 2006 (UTC)[reply]
No, suppose you did that with combinations of three letters. By your reasoning, we'd be making the source set AAABBBCCCDDDEEE...YYYZZZ. Then you'd be counting A1L1L2 and A3L1L3 as distinct. The number of identicals to be divided out would depend on the number of distinct letters in a combination. That's why you need case logic. NeonMerlin 19:10, 18 December 2006 (UTC)[reply]
I think it comes down to or something very similar. -- Meni Rosenfeld (talk) 17:29, 18 December 2006 (UTC)[reply]
I'm not sure what you mean by "case logic", but it's a well known problem, there's at least one elegant way to solve it, I believe the solution ends up as the formula I presented, but I agree that Maelin's suggestion may not be the right way to solve it. -- Meni Rosenfeld (talk) 19:58, 18 December 2006 (UTC)[reply]
Huh. Guess I should have thought about that one a bit more carefully :P. Any idea where one might find a derivation of the binomial solution above, just for interest's sake? Maelin (Talk | Contribs) 01:13, 19 December 2006 (UTC)[reply]
Funny you should ask, seeing as you are the one who has linked to Permutations and combinations, where a reasonable explanation is present (though without an appropriate heading). I guess any good book about combinatorics should contain a better explanation (the idea is the same though). -- Meni Rosenfeld (talk) 15:10, 19 December 2006 (UTC)[reply]

Thank you, Neon Merlin! Wow, I thought I had to wait longer to get an answer! --24.76.255.207 04:03, 18 December 2006 (UTC)[reply]

Planes[edit]

I was wondering what was the formula for doing problems like this:

"A plane is determined by 3 noncollinear points. How many planes are determined by 12 points, no 3 of which are collinear."

I believe the way to solve it using combinations. 12 C 3 = 220. Is this the right method?

Thanks. --Proficient 21:44, 18 December 2006 (UTC)[reply]

The problem is phrased somewhat ambiguously. The meaning of "A plane is determined by 3 non-collinear points" is this: "Given any 3 non-collinear points, there is a unique plane containing all 3 points". Generalizing this to a definition of "is determined by N points" in the obvious way, the question would appear to be: "Given any 12 points, no 3 of which are collinear, how many unique planes contain all 12 points?" First off, if they are to be unique, the answer can't be more than 1. And in general, no single plane will contain all 12. If we assume that the meaning is: "How many planes contain at least 3 of these 12 points?" (an interpretation that is not strongly suggested by the formulation), the answer is: any number from 1 to 220, depending on the position of the points.  --LambiamTalk 22:11, 18 December 2006 (UTC)[reply]
With the warning that I'm before my morning cup of coffee and thus might be missing something obvious exactly like after that cup [sic :-)], could you please elaborate on the any? —Gennaro Prota•Talk 08:52, 19 December 2006 (UTC)[reply]
2 and 3 are clearly impossible (four non-coplanar points determine four planes), and if I'm not mistaken, a slightly more complicated argument rules out several other "small" numbers.--80.136.186.137 10:42, 19 December 2006 (UTC)[reply]
I must have drunk too much coffee. Indeed, I think all numbers in the range from 2 to 46 are not possible, as well as numbers near 220 not of the form 220 − 3n. In the middle, most numbers seem to be reachable.  --LambiamTalk 23:57, 19 December 2006 (UTC)[reply]
Of course, if you add the condition that no 4 points are coplanar, then the answer is 220. -- Meni Rosenfeld (talk) 22:26, 18 December 2006 (UTC)[reply]
I see. Thanks for your input. I think the problem did intend to mean that no 4 points are coplanar as well. --Proficient 02:07, 19 December 2006 (UTC)[reply]