How can we compute this quantity, constructed using motivation from Vandermonde's identity? states that $$ \sum_{k=0}^{r} {m \choose k}{n \choose r-k} = {m+n \choose r} $$ I wonder if we can use this formula or otherwise to calculate: $$ \sum_{k=0}^{r}k^l {m \choose k}{n \choose r-k}, l \in \mathbb{N} ?$$ or if not,  at least when $l=1,$ namely: $$ \sum_{k=0}^{r}k {m \choose k}{n \choose r-k}?$$ I'd appreciate the relevant calculations or some links where I can find the above?
Proving a combinatorial identity without double counting Consider the following problem:  We have a collection of m white and n black balls. We pick k balls (k ≤ m+n) without replacement. What is the expected number of white balls in the sample?  Counting method 1: The ratio of white balls in the collection is m/(m+n). If we repeatedly sample the collection, we expect that on average, our sample has the same ratio. Therefore, the expected number of white balls in a sample of size k is km/(m+n). As a side note, I think the above argument somehow depends on the unbiasedness of  the mean estimator. Am I right?  Counting method 2: We directly compute the expected number of white balls in the sample: $$ \frac{\sum_{i=0}^{k} i\binom{m}{i}\binom{n}{k-i}}{\binom{m+n}{k}} \enspace.$$  So, we reach at the identity: $$ \sum_{i=0}^{k} i\binom{m}{i}\binom{n}{k-i} = \frac{km}{m+n}\binom{m+n}{k} \enspace.$$  How to prove the above result without double counting? It seems to be provable using  as well as $i\binom{m}{i} = m\binom{m-1}{i-1}$. But is there a simpler approach (which does not depend on extra identities such as Vandermonde's)?
When & How often do 4e Monster powers recharge? How often should I roll power recharge rolls and at which point in the monster's turn do I re-roll them?  I'm trying to find the official definition of the recharge mechanic in the online compendium and I'm not seeing it there. Integral involving Cosine function What will be the formula for the following:  $$\int_0^\infty \cos(x)dx.$$ Community♦ user edit: How does it know what to edit? How to determine whether the direction of rotating a 2D vector to another one is counter-clockwise or clockwise using the cross product? Vec2 a, b; // some random vector Vec2 cross = a.Cross(b); RelativeDirection(a,b,cross); // return true if the direction of                               // rotating a to b is counter-clockwise   How do I implement the function RelativeDirection()?  I got some suedo code from the textbook:  if a.Cross(b) &gt; 0 then ... else ...   but the cross product is a vector right? how do you compare it with an integer? Is uncertainty principle a technical difficulty in measurement? Is the uncertainty principle a technical difficulty in measurement or is it an intrinsic concept in quantum mechanics irrelevant of any measurement?  Everyone knows the thought experiment of measuring the position of an electron. One can detect electron's position by hitting it with a photon, due to Compton scattering the collision of the photon with electron will change electron's momentum. This experiment is used to explain uncertainty principle to layman, but it is over simplified, isn't it? It also gives an impression that if there was a better suited experimental method the uncertainty principle becomes irrelevant.   I personally think it is intrinsic as it arises from the non-zero commutator of position and momentum operators irrespective of the measurement process. Am I right?  EDIT: My question is similar to certain extent to  and . The answers there are nice but they focus on explaining basics of quantum mechanics more than they comment on the technical difficulty part. In the answers of question 2 there are statements like "So, it's not a knowledge limit" and "you're sort of correct when you say it's an observational limit" without further comments  To summarize, assume hypothetically we managed to find a way in the future where we can have a look at an electron without disturbing it by measurement or causing its wave function to collapse, would the uncertainty principle still hold in such a case?? Why/Why not? Cycle option when drawing between nodes in TikZ Cycle lets you close curves when drawing, and  \coordinate (a) at (0,0); \coordinate (b) at (1,0); \coordinate (c) at (0.5, -1); \draw (a) -- (b) -- (c) -- cycle;   works fine. Shouldn't also  \node (a) at (0,0) {}; \node (b) at (1,0) {}; \node (c) at (0.5, -1) {}; \draw (a) -- (b) -- (c) -- cycle;   give the same result?  The former gives a triangle, while the second doesn't close up. Is this a bug or am I missing something regarding the cycle option?  (Of course, as a workaround I could use the coordinates to draw the cycled path, and then draw the nodes at the same coordinates, but still...) I was trying to remove all the lines of a file except the last line but the following command did not work, although file.txt is not empty.  $cat file.txt |tail -1 &gt; file.txt  $cat file.txt   Why is it so? Coding for an ordered covariate I am performing ordinal regression, I have 5 response categories and several predictors both continuous and categorical. I would like to add a predictor which is categorical but ordered (1, 2, 3, 4). I don't think it would be appropriate to apply the usual dummy coding for unordered categorical predictors, but when I searched for how to code this I did not find much information.  In  "linear coding" or "assuming linearity of the predictor effect" is mentioned, but without further details.  Does it mean I just use my ordered values as they are, i.e. use them as a continuous variable? Where to find the Mac OS X Lion security configuration guide? Reading a Set in PostLoad on JPA/Hibernate How does the radius of a pipe affect the rate of flow of fluid? Poiseuille's law states that the rate of flow of water is proportionate to $r^4$ where $r$ is the radius of the pipe. I don't see why.  Intuitively I would expect rate of flow of fluid to vary with $r^2$ as the volume of a cylinder varies with $r^2$ for a constant length. The volume that flows past a point is equal to rate of flow fluid, and thus it should vary with $r^2$.  I cannot understand the mathematical proof completely. Is there an intuitive explanation for this? Why bar magnet can produce magnetic field? I have downloaded an ISO file recently.  How do I burn it to a CD or DVD or mount it? Have iPhone 4 with iOS 5.1.1 Trying to update to 6.1.2 (not the latest) via downloaded IPSW but unfortunately getting error:     iphone could not be restored device isn't eligible for the requested   build   After searching for fix all over the internet found some suggestion like putting # in hosts file in line gs.apple.com but not helped.  Have you any idea why I'm getting this error and can't restore iphone? Receiving Push Notifications while in background Let $P(x, y, 1)$ and $Q(x, y, z)$ lie on the curves $$\frac{x^2}{9}+\frac{y^2}{4}=4$$ and $$\frac{x+2}{1}=\frac{y-\sqrt{3}}{\sqrt{3}}=\frac{z-1}{2}$$ respectively. Then find the square of the minimum distance between $P$ and $Q$.  My Attempt is:  I tried to find minimum distance between the points $(-2,\sqrt{3})$ and $(6\cos \theta,4\sin \theta)$. How do you maximize the cycle count of your battery?  There seems to be a debate between:   Leave plugged in 24/7 but do a full cycle once a month Charge to ~100%, drain to ~10%, repeat.   NOTE: Taking your   Which method is better and why? How much of a difference does it really make?  Here are some of the better sources I've found about battery behavior so far. Even still I feel they don't conclusively answer the question above. See my elaborations below:           Elaborating on Option 1  Now IF Apple engineers were smart and optimized for AC draw when plugged in to not use up your charge cycles, then it seem logical to assume that you are using effectively none of your 1000 charge cycles while plugged in. If that's the case, it would seem that the LiPo drop from holding at 100% would be vastly outweighed by the fact you're not using any charge cycles.  However, this is a purely speculative assumption and I could find no evidence to either confirm or deny.  If this is NOT true, and the AC adapter only goes to charging the battery, then there would be no difference. Your battery would drain to 99%, then back up to 100%, then back down to 99%, etc. Those micro-charge cycles would add up at the same rate as 100% -> 0% -> 100%, and you would get no gain. In this case the negative effect of holding LiPo batteries at 100% would outweigh everything else.  Elaborating on Option 2  There are lots of good reasons why Option 2 is the way it is:   Because of known LiPo chemistry issues, holding a 100% charge for a long time causes the battery to degrade Apple specifically recommends not to leave it plugged in all the time  Draining a battery all the way to zero all the time is bad for the cell (Which is why ~10% is used) Heat is a killer, and when plugged in AND charging, you get extra heat that causes damage.   There are a couple reasons why I'm challenging Option 2:   It seems silly that the most intuitive use case for thousands of people that use their macs as primary computers is wrong. If the hypothesis in option 1 is true, you're just burning unnecessarily through your finite charge cycles. It's a pain to have to remember to keep plugging in and plugging out and be worried about whether or not your device is plugged in. How can I play sound in Java? Frobenius Inequality Rank I was looking for an answer for this problem in terms of matrices, but I really don't know how to prove this result. The proposition says that:  Let $A\in M_{m\times k}(\mathbb{C})$, $B\in M_{k\times p}(\mathbb{C})$ and $C\in M_{p\times n}(\mathbb{C})$, then $\textrm{rank}(AB)+\textrm{rank}(BC)\leq \textrm{rank}(B)+\textrm{rank}(ABC)$ How to access java-classes in the default-package? I'm working now together with others in a grails project. I have to write some Java-classes. But I need access to an searchable object created with groovy. It seems, that this object has to be placed in the default-package.   My question is: Is there a way to access this object in the default-package from a Java-class in a named package?