Wikipedia:Reference desk/Archives/Mathematics/2009 October 30

= October 30 =

Piping a pump/filter for minimum number of valves
I am trying to figure what is the best way to pipe a pump and filter so that various operating modes can be achieved with the minimum number of valves. A valve is either open (allowing flow in either direction) or closed (blocking flow).

Using the valves I need to be able to direct flow so these 5 modes of operation that my pump and filter can be used in: 1. Filter (water from pool to be pumped FORWARD through filter and back to pool). 2. Circulate (water from pool to be pumped back into pool). 3. Back-wash (water from pool to be pumped BACKWARD through filter and out to seperate waste-pool). 4. Flush (Water from pool to be pumped FORWARD through filter and out to waste-pool). 5. Waste (water from pool to be pumped directly to waste-pool).

The pump can only pump in one direction. The water must pass the pump before the filter, this is because you cannot pull water thourgh the filter, only push it, I only have 1 filter and 1 pump.

The best I have been able to come up with is 5 valves. But I am hoping there is a way to do it with 4 or less?

+---Pool--+ V        | Pump      | V        |             1 2 3 4 5 +-+  |   Filter    O C C C O       |     |   |   Backwash  C O O C C        X1    |   |   Rinse     O C C O C       |     |   |   Circul. C O C C O W-+-X3-+    X2  X5  Waste     O C O C C   |    |     |   | | Filter  |   | |   |     |   |  +-X4-+-+---+

X = valve W = waste V = pump direction

--Dacium (talk) 06:34, 30 October 2009 (UTC)
 * I think that's best you can do. The main problem is getting both backwash and flush to work.  To have both of those, both ends of the filter need to be connected to both the pool end and the waste end of the track.  All 4 of those connections need a valve to be able to direct the flow the correct direction through the filter without being able to bypass it.  Finally you need a fifth filter to direct between going back to the pool or to waste.  I rearranged your diagram a little to show what the issue is.

+---Pool--+ V        | Pump      | V        | |        X5  +++    | X1       X2   | +--->F>---++ X3       X4  +++ |      W
 * Rckrone (talk) 17:17, 30 October 2009 (UTC)

probability question
My question is:- The question on an examination paper are numbered from 1 to 40,A question is chosen at random, find the probability  that question chosen will  not be divisible by 4 or 5. I m confused between answers either 38/40 or 3/5 .--True path finder (talk) 10:07, 30 October 2009 (UTC) m .k .s
 * Can you explain why you think each is correct? -- Meni Rosenfeld (talk) 11:15, 30 October 2009 (UTC)

yes,there are two appraoches 1:- numbers neither divisible by 4 or 5 are 1,2,3,6,7,9,11,13,14,17,18,19,21,22,23,26,27,29,31,33,34,37,38,39 ,so probability is 3/5 ,this answer is according to book .mathematics d4(singapure) ,6th eddition 2:-numbers neither divisible by 4 or 5 are numbers other than 20 and 40 so probability will be 38/40 = 19/20.--True path finder (talk) 13:59, 30 October 2009 (UTC)m.k.s
 * Sure looks like the book is wrong in this case. Or at least whoever wrote the answer key is interpreting the question in a weird way. The same answers holds at least approximately for any range of numbers. In the limit, 3/4 of number are not divisible by 4 and 4/5 of those are not divisible by 5 so the number that aren't divisible by either is 3/4 * 4/5 = 3/5.--RDBury (talk) 18:52, 30 October 2009 (UTC)

If it asked about "numbers not divisible by 4 and 5", that could mean only a number that's divisible by both 4 and 5 would be excluded. That means only 20 and 40 are excluded. But if it asked about "numbers not divisible by 4 or 5", maybe that's ambiguous. If a number is divisible by 4 or 5, then excluded it....or maybe "not divisible by 4 or 5" means divisible by neither 4 nor 5. Michael Hardy (talk) 19:22, 30 October 2009 (UTC)

Finding global maximum
I have a function,

$$f(\theta) = \frac{\cos(k \pi \cos(\theta)) - \cos(k \pi)}{\sin(\theta)}$$

where $$k \in \mathbb{R}$$.

I'd like to find the global maximum, so an obvious approach would be to look for all the stationary points and see which one provides the greatest value. However, this is proving slightly tricky.

At the stationary points, we get the following rather nasty expression,

$$k \pi \sin^2(\theta) \sin(k \pi \cos(\theta)) - \cos(\theta) \cos(k \pi \cos(\theta)) + \cos(\theta) \cos(k \pi) = 0$$

Now, $$\theta = \frac{\pi}{2}$$ is the obvious solution, but I'm stuck on how I go about finding all the others.

If this is a futile search, then I'd like to have at least some sort of method by which I can find the global maximum without looping through all the values of theta ($$0 \le \theta < 2 \pi$$). It's been a while since I did this sort of thing so I might well be missing something obvious.

Any advice would be welcome. Thanks. Readro (talk) 10:10, 30 October 2009 (UTC)
 * I do not think I understand your question. On what domain do you wish to find the maximum of f (f is undefined at all integer multiples of π)? -- PS T  13:50, 30 October 2009 (UTC)
 * But there's a limit, so we may agree that the expression on the RHS represents a bounded real analytic function f(θ) defined for all real θ in R. --pma (talk) 14:07, 30 October 2009 (UTC)
 * That is true. It must be the 12 o'clock nights I have been having lately... -- PS T  14:24, 30 October 2009 (UTC)
 * Why does this function have a limit(other than infinite) when θ=0? Taemyr (talk) 14:33, 30 October 2009 (UTC)
 * If you make a Taylor expansion at θ=mπ (or use old de l'Hopital's rule)  you should find that the limit is actually 0. --pma (talk) 14:39, 30 October 2009 (UTC)
 * Taemyr: Consider the classic $$\frac{sin(x)}{x}$$. Here, the limit of this function as x tends to zero, is 1, as can be verified by a geometric argument, or by L'Hopital's rule. -- PS T  14:55, 30 October 2009 (UTC)


 * ok, just a couple of questions: 1) is $$\scriptstyle k\in\R$$ or maybe it was just $$\scriptstyle k\in\Z$$ ? 2) is your question coming from an exercise/homework  or from real life? (just to know if I need to use instructor's psychology or maths ;)  --pma (talk) 13:48, 30 October 2009 (UTC)
 * k is most definitely a real value. This is a real life problem. The function represents the radiation pattern of a dipole antenna that has a length of $$k\lambda$$. I am interested in the limit, where f is undefined, so if I wanted to be rigorous I really should have defined another function that takes the limit of f when f is undefined. Readro (talk) 14:35, 30 October 2009 (UTC)


 * Some hints. You can extend your f letting f(mπ)=0 for all m in Z to an analytic 2π-periodic function on R (see above). Clearly f(-θ)=-f(θ)=f(θ+π) and f(π/2+x)=f(π/2-x) so you just have to consider 0 ≤ θ ≤ π. It seems difficult to compute the max (let's call it M(k)), especially for large k, as the number of stationary points became larger and larger. For sure M(k) diverges as k goes to infinity, because for θ>0 very small, the denominator is large, but the numerator may be equal to 2 choosing a k large. In particular, the maximum is not at π/2 if k is too large. However, to get a bound from above on M(k) you may write
 * $$f(\theta)=\frac{\cos(k \pi \cos(\theta)) - \cos(k \pi \cos(0))}{\sin(\theta)-\sin(0)}$$
 * and apply the Cauchy's mean value theorem, so
 * $$f(\theta)=\frac{k\pi\sin(k \pi \cos(\eta))\sin(\eta)}{\cos(\eta)}$$
 * for some $$\eta$$ between 0 and $$\theta$$. Hence M(k) is less than or equal to the maximum of
 * $$g(\eta):=\frac{k\pi\sin(k \pi \cos(\eta))\sin(\eta)}{\cos(\eta)},$$
 * which is for instance bounded by $$(\pi k)^2$$ (using sin(u)/u ≤ 1). Of course M(k) ≥ 1-cos(kπ) = f(π/2), but the two bounds are still too far from each other if k is large. --pma (talk) 17:41, 30 October 2009 (UTC)


 * After some experiments, it seems that your maximum M(k) is reached at the first local maximum of f (not surprisingly). As k varies, it seems that M(k) oscillates so as to be 0 at every even k=2m, to be increasing on [2m, 2m+1], and decreasing again to 0 on [2m+1, 2m+2] . Also, it seems that along th sequence of odd numbers k, the value M(k) increases and diverges, though quite below the rough upper bound (πk)2. --pma (talk) 21:59, 30 October 2009 (UTC)
 * For even k, f is non-positive in the first quadrant, but since f is an even function you should check the fist minimum too. The max of f is is the max of |f|. Rckrone (talk) 23:05, 30 October 2009 (UTC)
 * I do apologise. It seems I forgot that I've been taking the absolute value. I'm interested in the maximum of |f|. I hope I haven't wasted anyone's time. Readro (talk) 23:49, 30 October 2009 (UTC)
 * I think you mean f is an odd function, so in fact max f= max|f|. I was just talking of f on [0,π] forgetting [-π,0] sorry. If I find time I'll think a bit on your problem. --pma (talk) 05:25, 31 October 2009 (UTC)

Intervals of real numbers
Are there any sets of intervals of real numbers with the following properties: 1. Any two intervals in the set have non-empty intersection; and 2. there are no real numbers in all the intervals in the set? --88.77.232.207 (talk) 13:28, 30 October 2009 (UTC)


 * all the intervals=the intersection, I assume. What about the collection $$[x,\infty)$$ with x in N . --pma (talk) 13:54, 30 October 2009 (UTC)
 * (Edit Conflict) Sure. Let Ax = (0, x) for each real number x greater than 0. Then any pair consisting of Ay and Az have non-trivial intersection - Amin{y, z}. However, if w were a real number in each member of the set; that is, if w were in Ax for all real x greater than 0, then 0 < w < x for all x greater than 0. This is a contradiction since R is an Archimedean field. Therefore, this set of intervals satisfies the two desired properties. -- PS T  14:01, 30 October 2009 (UTC)
 * Note that it would be interesting to investigate whether you can construct an ordered field such that there is no set of intervals with the desired properties (exercise for the OP). If this is too basic, think about abstract topological spaces - for instance, see finite intersection property. It is interesting to note that if one restricts to closed intervals within [0, 1], there is no such set of intervals. Furthermore, this fact yields a proof that [0, 1] is an uncountable set. -- PS T  14:16, 30 October 2009 (UTC)
 * Two edit conflicts at RD/M in the space of ten minutes, pma! We must share the same lunchbreak :) -- PS T  14:18, 30 October 2009 (UTC)
 * (3rd ec) As a further remark, notice that you have an example with a family of intervals that are closed but not bounded, and an example with a family of intervals that are bounded but not closed. Not by chance: the intersection would necessarily be non-empty if the family is made by closed and bounded intervals. Say it is $$\scriptstyle \{[a_\lambda,\,b_\lambda]\}_{\lambda\in\Lambda}$$ : then for any $$\mu\in\Lambda$$ the hypotheses imply $$\scriptstyle a_\mu\leq\sup_{\lambda\in\Lambda}a_\lambda\leq\inf_{\lambda\in\Lambda}  b_\lambda\leq b_\mu$$, so that the non-epmty interval $$\scriptstyle[\sup_{\lambda\in\Lambda}a_\lambda\, ,\,\inf_{\lambda\in\Lambda}b_\lambda   ]$$ is contained in the intersection of the family. Check also compactness. (:-) --pma (talk) 14:34, 30 October 2009 (UTC)

While we're talking about intervals...
Does there exist an uncountably large set of intervals on the real numbers (open or closed, I don't care), all disjoint from each other? --129.116.47.9 (talk) 18:12, 30 October 2009 (UTC)


 * No (assuming we aren't counting degenerate intervals like [1,1] - if we are then the answer is trivially "yes"). Consider each interval [n,n+1] for integers n. There will be a certain number of intervals in your set that intersect that interval. The total number of intervals in your set can be no more than the sum of those numbers. Since there are only countably many of those numbers at least one of them must be uncountable (I'm using "number" to refer to include transfinite cardinals). We'll call the corresponding interval [N,N+1]. We then take the intersection of all the intervals in your set with that interval. We will be left with uncountably many that are still non-empty. Since they are disjoint they're lengths must add up to one, but all their lengths are finite (since they are intervals). You can't have uncountably many finite numbers adding up to one. --Tango (talk) 18:27, 30 October 2009 (UTC)


 * "You can't have uncountably many finite numbers adding up to one." Can you explain why this is, or point me to a page that explains this?
 * thanks, --129.116.47.9 (talk) 18:32, 30 October 2009 (UTC)
 * Actually, that's a good question... If we knew the finite numbers had a positive lower bound (I think I was inadvertently assuming that, which is why I didn't elaborate), then it would be trivial, but we don't. Can anyone plug this hole? --Tango (talk) 19:19, 30 October 2009 (UTC)
 * It's not really clear what you mean by an uncountable sum, but with any sensible definition it will not converge for the following reason: consider S_n, the set of all intervals whose length is greater than 1/n. There must be an infinite (indeed, uncountable) S_n. Tinfoilcat (talk) 20:07, 30 October 2009 (UTC)


 * Here's a simpler proof, any interval contains at least one rational and the rationals are countable.--RDBury (talk) 18:57, 30 October 2009 (UTC)
 * Actually this can be generalized: Any collection of disjoint open sets of a separable space is countable.--RDBury (talk) 19:02, 30 October 2009 (UTC)
 * Indeed. I thought there probably was a simpler proof (although I couldn't immediately think of one), but my proof (assuming it can be fixed) has the advantage of not requiring any significant other results (ie. the density and countability of the rationals). --Tango (talk) 19:19, 30 October 2009 (UTC)

Thanks, guys, I think I understand now. --129.116.47.9 (talk) 20:18, 30 October 2009 (UTC)


 * Tango, your solution does require one thing. It requires the definition of an uncountable sum of nonnegative numbers.  An exercise in Royden defines this to be the supremum over all finite sums from the uncountable set, if I remember correctly.  This can only be finite if only countably many of the numbers are nonzero, which requires undergraduate level analysis to prove.  But, to state it maybe you don't need much of anything.  In your proof, you end up with an uncountable set of all positive numbers so the sum must be infinite.  In particular, it would be greater than 1, which is the contradiction.  It is not that it is not 1 that is the contradiction by the way.  There could be some open interval in [N, N+1] that is uncovered. StatisticsMan (talk) 00:08, 31 October 2009 (UTC)
 * I worded it in terms of an uncountable sum, but it would be more rigorous perhaps to talk about the measure of an uncountable union of sets with non-zero measure. I was trying to avoid too much explicit measure theory, but it might be easier to use it. You are right about the final point - for some reason I thought we were dealing with a covering of the real line, but we're not. --Tango (talk) 00:33, 31 October 2009 (UTC)
 * Tango, your argument requires no or few measure theory indeed. You may just say: the intervals of the initial disjoint family that have length ≥1/n and are included in the interval [-n,n] are a subfamily Fn of at most 2n2 elements. So the family of the nontrivial intervals is an increasing union of a sequence of finite families F1, F2, F3...--pma (talk) 05:17, 31 October 2009 (UTC)


 * I think that the real heart of this problem lies within the realm of general topology, and in particular, the countable chain condition. Methods which use the fact that the real numbers form a topological ring (as well as measure theory), although quite interesting, do not generalize to more abstract contexts. Nevertheless, it would be a good exercise for the OP to formalize Tango's argument. Exercises for the OP (and interesting points to ponder over)(Warning: Some of these are non-trivial! If you are familiar with some concepts in point-set topology, it would be interesting to understand why this is so, and what difficulties arise in some of these problems):


 * 1 (Solved). Does there exist a non-separable space that satisfies the countable chain condition?
 * 2 (Solved). Does there exist a non-separable Moore space that satisfies the countable chain condition?
 * 3 (Open Problem!). Is every starcompact Moore space compact?


 * I am going to stop now in case I get too carried away ;) but these problems illustrate the diversity of general topology and how simple ideas such as the OP's question may lead to such interesting questions (for instance, in question one, we know that every separable space satisfies the countable chain condition; the obvious question is whether there exists a non-separable space which satisfies the countable chain condition (that is, does the converse hold?). Question two goes even further: does there exist a Moore space which has the desired properties? In fact, one solution to question two yielded a beautiful example of a non-metrizable Moore space (as well as an overly complicated one by M. E. Rudin!)). However, do not worry too much if you are unable to solve question three (but if you can, there are some topologists out there who would like to hear it ;)).-- PS T  01:52, 31 October 2009 (UTC)

Degenerate conics
Hey all, I have an equation which is of the form $$Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0$$ and I am trying to figure out what it is. All I really care is that it has an infinite number of solutions really. The article Conic section says what I have is an ellipse unless it is degenerate. So, how can I tell if it is degenerate? The article does not say, though it has something on homogeneous coordinates. I also looked in a few college algebra books and found no new info. Is there a way to tell just from A, B, C, D, E, F? Or, is there some number of solutions I can exhibit that will guarantee I have an infinite number? I believe I know of several solutions already. Thanks! StatisticsMan (talk) 21:10, 30 October 2009 (UTC)


 * If B is zero and A and C have opposite signs, then it's a hyperbola. If B is zero and A and C have the same sign, then it's either an circle or a single point (a degenerate ellipse) or it's empty (ie. no points are on the graph).  If B is zero and one of A, C is zero and the other is not, then it's a parabola.
 * It's when B is not zero that I'd need to think through some details (Look at B2 &minus; AC or B2 &minus; 4AC? Which shape corresponds to positive and which to negative?) Michael Hardy (talk) 23:00, 30 October 2009 (UTC)
 * It's when B is not zero that I'd need to think through some details (Look at B2 &minus; AC or B2 &minus; 4AC? Which shape corresponds to positive and which to negative?) Michael Hardy (talk) 23:00, 30 October 2009 (UTC)


 * Sorry, I didn't give the detail of that. The point is, I know that $$B^2 - 4AC < 0$$ so according to the article, it is an ellipse UNLESS it is degenerate.  So, I know it's either an ellipse or degenerate and I want to know how I can tell if it's an ellipse, or at least is degenerate in such a way that it has infinitely many points such as two lines.  The problem I am doing is in connection with the bivariate normal distribution.  It says the parameters for it are found by solving some equations and it gives the equations.  Then, it says to find another solution and then asks how many solutions there are.  I parametrized it with s and t and am to the point where I know they must satisfy $$\sigma_Y^2 s^2 + (-2\rho \sigma_X\sigma_Y) st + \sigma_X^2 t^2 + (\rho^2 - 1)\sigma_X^2 \sigma_Y^2 = 0$$.  So, in this case, you can see that $$B^2 - 4AC = 4\rho^2 \sigma_X^2 \sigma_Y^2 - 4\sigma_X^2\sigma_Y^2 = 4\sigma_X^2\sigma_Y^2(\rho^2 - 1)$$.  Since we are given that $$-1 < \rho < 1$$ (actually we are given that $$-1 \leq \rho \leq 1$$ but I think that's a typo), then it must be that $$B^2 - 4AC < 0$$.  I know the answer is that there are an infinite number of solutions and I think I am just a step away from showing that but I want to be sure. StatisticsMan (talk) 23:57, 30 October 2009 (UTC)


 * I think I have found the answer. I found a webpage that says a degenerate conic is a point, a line, or double lines.  So, if I can just show I have 2 solutions, then I must have an infinite number. StatisticsMan (talk) 13:27, 31 October 2009 (UTC)


 * That's right. It seems easy to show there are two solutions - s and t can't both be zero, but each can be individually. Black Carrot (talk) 17:51, 31 October 2009 (UTC)


 * There's no reason to exclude the cases $$\rho=\pm1$$ however. You do get degenerate solutions in such a case (particularly, the lines $$s=\pm t$$, assuming $$\sigma_X^2=\sigma_Y^2=1$$), though I can think of no good reason to throw them out. They just correspond to a degenerate bivariate normal distribution.Nm420 (talk) 16:49, 2 November 2009 (UTC)

Simple geometrical question
Hi! I have the following problem that I probably could solve myself, but that someone might know a handy trick or standard method for. Assume I have 3 points in Cartesian 3-D space, given by p1=(x1, y1, z1), p2=(x2, y2, z2) and p3=(x3, y3, z3). I construct a line L through p1 and p2. Now I want to know the shortest distance from p3 to L, in other words, the length of the line segment that starts at p3 and hits L at a right angle. --Stephan Schulz (talk) 21:26, 30 October 2009 (UTC)
 * I don't see anything beyond the obvious: parametrize the line in terms of a variable, say, t, write the distance to p_3 as a function of t, use calculus to find the value of t at which the minimum distance is achieved. I mean, it involves some calculation, but is not terribly difficult. Ray  Talk 22:44, 30 October 2009 (UTC)
 * Let a = p2 - p1 and b = p3 - p1. (a.b)/|a||b| = cosθ where θ is the angle between a and b.  You are looking for |b|sinθ = |b|(1 - ((a.b)/|a||b|)2)1/2 = (|b|2 - (a.b)2/|a|2)1/2. Rckrone (talk) 00:06, 31 October 2009 (UTC)
 * Thanks! That looks exactly what I need, and specified in term of functions I already have in my code ;-). --Stephan Schulz (talk) 14:27, 31 October 2009 (UTC)

Take a look at the triangle in the figure. Let A = p1, B = p2 and C = p3. It follows that p2 &minus; p3 p1 &minus; p3 and p1 &minus; p2 We want to find the length, say l, of the chord joining the vertex C to the edge AB which is also perpendicular to the edge AB. This length is just b.sin(&alpha;). A standard fact[1] is that (p1 &minus; p2) &times; (p1 &minus; p3) where &times; denotes the vector product. It then follows that
 * $$l = \frac{||(p_1 - p_2) \times (p_1 - p_3)||}{||p_1 - p_2||} . $$ Dr Dec  (Talk)   21:55, 1 November 2009 (UTC)