Wikipedia:Reference desk/Archives/Mathematics/2016 August 7

= August 7 =

partial permutation of a multiset
I know how to count incomplete permutations of a set of unique elements: $$\frac{n!}{(n-k)!}$$

I know how to count permutations of a set with repeated elements: $$\frac{n!}{\Pi(n_j!)}$$ (where $$\Sigma n_j=n$$)

But I don't know how to efficiently count incomplete permutations of a set with repeated elements. For example, I have a set with 24 elements, eight each of three kinds, from which I draw 19; the number of outcomes is clearly $$ 3\frac{19!}{8! 8! 3!} + 6\frac{19!}{8! 7! 4!} + 6\frac{19!}{8! 6! 5!} + 3\frac{19!}{7! 7! 5!} + 3\frac{19!}{7! 6! 6!} $$; but is there a more compact way to express that? —Tamfang (talk) 05:43, 7 August 2016 (UTC)
 * I am not quite sure of what you are asking. If we have a set of $$n=p+q+r$$ elements, with (say) $$p$$ yellow balls, $$q$$ blue balls and $$r$$ red balls, I see at least three possible interpretations of what you asked, :
 * 1) The number of different final sets after a draw of $$k$$ (=19) balls, irrespective of which balls were chosen, i.e. $$\sum_{0\leq l \leq p} \sum_{0\leq m \leq q} \sum_{0\leq n \leq r} \delta_{l+m+n,k}$$ (with the Kronecker delta notation).
 * 2) The number of different ways to draw $$k$$ balls, which is simply $$\begin{pmatrix}n\\ k\end{pmatrix}=\frac{n!}{(n-k)!k!}$$ and the colors do not matter,
 * 3) For a given final set of $$p'$$ yellow, $$q'$$ blue and $$r'$$ red, the number of ways to draw. But then it is simply three independent draws so it is just the product $$\begin{pmatrix}p\\ p'\end{pmatrix}\begin{pmatrix}q\\ q'\end{pmatrix}\begin{pmatrix}r\\ r'\end{pmatrix}$$.
 * Could you clarify? Tigraan Click here to contact me 11:53, 8 August 2016 (UTC)


 * I'm asking about permutations, and all three of your interpretations appear to be about combinations; perhaps you assumed I don't know the difference. A simpler example: taking three items from AAABBC in the sense I mean, possible results are AAA, AAB, AAC, ABA, ABB, ABC, ACA, ACB, BAA, BAB, BAC, BBA, BBC, BCA, BCB, CAA, CAB, CBA, CBB. —Tamfang (talk) 21:20, 8 August 2016 (UTC)
 * Yeah, I was a bit sloppy myself. So what you want seems to be the number of ordered subsets of a given number of elements.
 * If you have $$n_1, n_2, ... n_N$$ elements of N types, number of unordered sets = sum (for each ordered set) (number of permutations of that set) so the formula is $$\sum_{0\leq m_i \leq n_i, k=\sum_i m_i} P(m_1,...m_N)$$ where $$P(m_1,...m_N)=\frac{k!}{\Pi(m_j!)}$$ if I understand your formula correctly. That is an explicit form, but it looks tricky to reduce the sum for arbitrary $$n_i$$. It probably simplifies somewhat if all of them are equal, but even then it does not look trivial.  Tigraan Click here to contact me 07:57, 9 August 2016 (UTC)

Finding focus and directrix of a conic section
Is there any general rule for finding the focus and directrix of a parabola, ellipse or hyperbola from an equation like $$ax^2+2hxy+by^2+2gx+2fy+c=0$$ ? — Preceding unsigned comment added by Sayan19ghosh99 (talk • contribs) 06:00, 7 August 2016 (UTC)


 * I found the answer in Barry Spain, Analytical Conics, Dover 2007 (originally published 1957 by Pergamon Press), pp.86–88. It contains layers upon layers of notation, and thus is not useful in a practical sense. It's too complicated to reproduce here. Loraof (talk) 16:50, 7 August 2016 (UTC)


 * It seems to me that one way to find the foci (original research, not Spain's approach) would be to denote the foci as $$(x_1,y_1)\quad \text{and} \quad  (x_2,y_2)$$ and to define the conic as $$||(x,y),(x_1,y_1)||+||(x,y),(x_2,y_2)||=k.$$ Then write out the distances as square roots, isolate one square root on one side, square both sides, isolate the remaining square root on one side, and square both sides, to obtain (if I haven't made an algebra mistake) $$[-2x_1x+x_1^2-2y_1y+y_1^2+2x_2x-x_2^2+2y_2y-y_2^2-k^2]^2=4k^2[(x-x_2)^2+(y-y_2)^2].$$ This equation has five unknown parameters: the coordinates of the foci and k. These parameters could be found by using this equation to create five equations, each with a particular point on the conic $$ax^2+2hxy+by^2+2gx+2fy+c=0$$  used for $$(x,y).$$ For example, the four points $$\left(0, \frac{-f\pm \sqrt{f^2-bc}}{b}\right) \quad \text{and} \quad \left(\frac{-g\pm \sqrt{g^2-ac}}{a}, 0\right)$$ would work provided the expressions under the radicals are non-negative. You can see how complicated the set of five equations would be! Loraof (talk) 17:30, 7 August 2016 (UTC)


 * Or, you could take the two ways of writing the equation—$$[-2x_1x+x_1^2-2y_1y+y_1^2+2x_2x-x_2^2+2y_2y-y_2^2-k^2]^2=4k^2[(x-x_2)^2+(y-y_2)^2]$$ expanded out, and $$ax^2+2hxy+by^2+2gx+2fy+c=0$$—divide through each so the coefficient of $$x^2$$ equals 1, and get five equations in the five desired parameters by equating the coefficients between the two equations term by term. Loraof (talk) 19:40, 7 August 2016 (UTC)

Rigor of visual calculus
From what I can tell, this method is too hand-wavy and can easily be applied incorrectly. Importantly, the statement of the so-called "Mamikon's theorem" does not state the conditions under which this method is valid (I imagine that the curve in question must obey at least continuous differentiability, and otherwise be a Jordan plane curve).

This is probably why it has gained little attention in academia, as far as I know. However, I have not really been able to find peer reviews or other critiques of Mamikon's work. Does anyone know of such a critique, or have any comment on the mathematical rigor of this method?--Jasper Deng (talk) 20:11, 7 August 2016 (UTC)
 * Do you have examples of it being applied incorrectly? Bo Jacoby (talk) 23:04, 7 August 2016 (UTC).
 * What exactly is it that you don't like about it? Dmcq (talk) 08:43, 8 August 2016 (UTC)
 * It seems to me to be a theorem discovered after its time. It would have been very important if it was discovered five hundred years ago, and they knew quite enough to do so - but they didn't. Nowadays the most important use is to popularize mathematics. I think there probably is something in it which could be generalized and made more 'modern', but Mamikon is a physicist rather than a mathematician and besides that likes diagrams with lots of colors and animations. So I'd guess if you'd like to make something of it then you're welcome to. Dmcq (talk) 11:45, 8 August 2016 (UTC)
 * I was thinking something along those lines; in fact I'd question calling it calculus. Similar theorems, such as the Theorem of Pappus, which slice and dice areas and volumes to find the area had been around centuries (if not millennia) before Newton and Leibniz came along. You could spend a lot of time teaching these theorems, or you can mention them as the precursors to what would become calculus and spend more time covering how to find antiderivatives. The proofs have a certain elegance about them, especially if you throw in the colors and animations, but I suspect this would be lost on the typical college freshman. --RDBury (talk) 13:44, 8 August 2016 (UTC)
 * Suppose that we have a non-singular convex plane curve $$\gamma$$ that is equipped with its arc-length parameterization s.  The "tangent sweep" is specified by a single non-negative continuous function f(s), and is the region R of the plane swept out by the vector $$f(s)T(s)$$ where T(s) is the unit tangent vector to the curve.  The area of R can be computed as follows.  Each point $$x\in R$$ is along a unique tangent line to the curve (by convexity).  Define a function $$\rho(x)$$ to be the distance from x to the curve, measured along that tangent line.  Let $$s=\sigma(x)$$ denote the value of the arclength parameter at the point of tangency.  Then $$r=\rho(x)$$ and $$s=\sigma(x)$$ parameterized the region R.  In fact, we have a diffeomorphism $$\phi(s,r)=\gamma(s)+r T(s)$$ from a region in the sr plane to the xy plane.  The Jacobian is easily calculated to be
 * $$|J_\phi(s,r)| = r\kappa(s)$$
 * where $$\kappa(s)$$ is the curvature of the curve. By change of variables, the area is then given by
 * $$A=\int_R1\,dA = \int_0^L\int_0^{f(s)} r\kappa(s)\,dr\,ds = \int_0^L\frac{f(s)^2}{2} \kappa(s)\,ds.$$
 * The "theorem" (as far as I can tell) is that we may use the total curvature $$K(s) = \int_0^s k(t)\,dt$$ to parameterize this integral rather than s (up to factors of 2&pi;). So, that's pretty trivial as a "theorem".
 * However, I think the above argument fails to capture the intuitive appeal of this method. The method involves slicing the plane up into regions.  In other words, the essence of the method is to do with the coarea formula rather than the more generic change of variables formula.  The idea is to bake in the total curvature parameterization from the beginning.  Parameterize the curve, not by arc-length, but by the turning angle of the tangent: $$\theta=K(s)$$.  So there are new parameters $$r,\theta$$, where r is the same as before, but &theta; is the turning angle of the curve.  This angle satisfies $$|\nabla\theta|=1/r$$.  The coarea formula then gives
 * $$\begin{align}

A(R) &= \int_R 1\,d\mathcal L^2 = \int_R r|\nabla\theta|\,d\mathcal L^2\\ &= \int_0^{K(L)} \left[\int_{K^{-1}(\theta)\cap R} r dH^1(r)\right]\, d\mathcal L^1(\theta) = \int_0^{K(L)} \frac{f(K^{-1}(\theta))^2}{2}\,d\theta. \end{align}$$
 * This latter application of coarea is the analytical content of the "visual calculus" theorem.
 * I'm not sure what the most general conditions under which this is valid should be, but the proof given here applies if $$T(s)$$ is Lipschitz continuous which holds, for example, provided the curve &gamma; is twice continuously differentiable in addition to being convex.  Sławomir Biały  (talk) 16:20, 8 August 2016 (UTC)