The total number of ways which 5 balls of different colors can be distributed among 3 persons so that each person gets at least one ball is..?  My attempt: So, first we can choose any three balls to allocate to any person, so $\binom{5}{3}$ and, then distribute them then in 3! ways. And, so we have, $\binom{5}{3} \cdot 3! $. Now I have two remaining balls and this I can give randomly to any of the three people. For the first ball I have three choices and so do I for the second ball. Hence,  The net number of cases is $ \binom{5}{3} \cdot 3! \cdot 3^2$ Now, I know that like the thing can happen in reverse. For example distributing three then distributing two, I could have some overlapping cases where the items which are distributed in the distributing two case is actually distributed in the distributing three step. How do I account for the overlapping case? Ans: 150 Stars and bars attempt: We have five objects and introduce two objects as dividers, subtract cases where one guy gets nothing (3 x 6!) and add cases where two people get nothing and third guy everything (3) What I am looking for : A fix to this method such that it gives me the correct answer, in the other stack post linked to this one, it has ample amount of methods based on other ways to solve it but my question here is how to fix this method.
How many ways are there to distribute 5 distinguishable balls between 3 kids such that each of them gets at least one ball?   My approach is $ \binom{5}{3} 3! $ + $ \binom{2}{2} \binom{3}{2}2!$ which is equal to $66$?
What are the practical applications of the Taylor Series? I started learning about the  in my calculus class, and although I understand the material well enough, I'm not really sure what actual applications there are for the series.  Question: What are the practical applications of the Taylor Series? Whether it's in a mathematical context, or in real world examples. List of PDOStatement::bindParam data_type parameters File names for JSP include directive to avoid compilation of them Standard example where Jacobson radical not equal nilradical Is there a standard example in commutative algebra of a ring where the jacobson radical does not equal the nilradical? I would like to scale an image file for each dimension differently for example 50% of the x dimension or 25% of the y dimension. Thank you very much. Lebesgue integral uniform convergence Let $f_n, f \colon [a,b] \to \mathbb{R}.$ Show that, if $f_n \to f$ uniformly, then the Lebesgue integrals are equal, i.e. $\int f = \lim \int f_n$.  This is clearly true for continuous functions, but how do I handle the case of non-continuous functions? How exactly do I tell if "A xxx of" is plural or singular? I looked up a few grammar-teaching websites (in Chinese language). The website says many people do not use the phrase "A xxx of" correctly because they do not identify the subject of the phrase correctly.   The website says phrases like "A range of; A high percentage of" is singular, while "a number of; a group of; a couple of; a total of" is plural.  Therefore according to the website, the correct sentences should be as follows.     A wide range of courses is available. ("A wide range" is the subject)      A high percentage of peptides that are made of amino acids is present   in the sample. ("A high percentage" is the subject)      A number/ group/ couple of people were killed in the earthquake.("people" is the subject )       A total of 230 employees were laid off. ("employees" is the subject)   I don't get the pattern here. All of this looks (or should I use "look"?) arbitrary to me. In fact I thought this phrase is supposed to be arbitrary and whether the phrase is plural or singular should depend on the the person's own judgment.   How do I identify the correct subject in the "A xxx of" phrase? When approximating a posterior using MCMC, why don't we save the posterior probabilities but use the parameter value frequencies afterwards? How to prove that there exist no functions $f,g:\Bbb{R}\to\Bbb{R}$ such that $f(g(x))=x^{2018}$ and $g(f(x))=x^{2019}$? I have tried a little bit to solve the problem which goes as follows:   My intuition says that there exist no $f:\Bbb R\to\Bbb R$ such that $$f(g(x))=x^{2018}\text{ and }g(f(x))=x^{2019}.$$  Note that $$f(g(f(x)))=f(x)^{2018}\implies f(x^{2019})=f(x)^{2018}$$  Similarly, $$g(x^{2018})=g(x)^{2019}$$ Putting $x=1$ in $f(x^{2019})=f(x)^{2018}$, we get $f(1)=f(1)^{2018}$ and thus $f(1)=0$ or $f(1)=1$.  Similarly, putting $x=1$ in $g(x^{2018})=g(x)^{2019}$ we get $g(1)=g(1)^{2019}$ and thus $g(1)=0,1,-1$.  Now, I can't proceed further. Can anybody solve it? Thanks for assistance in advance. How do I survive in the Nether? Whenever I travel to the Nether in Minecraft, I almost instantly get blasted to smithereens and chopped up into little pieces.  How do I survive in the Nether, at least long enough to build some sort of shelter and get situated? cp vs. mv: which operation is more efficient? I find myself moving reasonably large amount of data (20+ GB) from one directory tree to other. Often times they are on the same filesystem but sometimes they are on different ones. I do cp just to preserve the original data just-in-case. Once the copy is done I delete the original data after verifying that the data has been copied alright. Sometimes I just do mv if I feel too lazy to clean original data afterwards. However, I am wondering, from purely technical point of view, which operation is more efficient? Why? Here is the situation.  I have hexagonal board,and a unit on it,with speed or move value 4.Diffrent terrain has a diffrent cost.When i click on the unit,game should show me a move range.  My solution was to check each  hex in range of 4,with A* pathfinding,and if path cost was less than 4 then this hex was in range.Finally game nicely show me range of that unit.  My question is:   Is there other solution to search for range on hex grids or square grid,because even if i am really proud of what i did in my solution,i think,it is a little to exaggerated?:))  What make me ask this question?I noticed that when unit speed is 4 or 6 or even 8,time to computing range for my computer was really good,but when speed was 10 and more i noticed that i needed to wait few second to compute.Well in real games i rather dont see something like this and my A* pathfinding is rather well optimized,so im thinking that my solution is wrong.  Thanks for any replies. The following code snippet (correctly) gives a warning in C and an error in C++ (using gcc &amp; g++ respectively, tested with versions 3.4.5 and 4.2.1; MSVC does not seem to care):  char **a; const char** b = a;   I can understand and accept this. The C++ solution to this problem is to change b to be a const char * const *, which disallows reassignment of the pointers and prevents you from circumventing const-correctness ().  char **a; const char* const* b = a;   However, in pure C, the corrected version (using const char * const *) still gives a warning, and I don't understand why. Is there a way to get around this without using a cast?  To clarify: 1) Why does this generate a warning in C?  It should be entirely const-safe, and the C++ compiler seems to recognize it as such. 2) What is the correct way to go about accepting this char** as a parameter while saying (and having the compiler enforce) that I will not be modifying the characters it points to? For example, if I wanted to write a function:  void f(const char* const* in) {   // Only reads the data from in, does not write to it }   And I wanted to invoke it on a char**, what would be the correct type for the parameter? What is information? Proving that this function is continuous on $G\times G$ What does this cryptic Bash command mean? how to create facebook event in an android app? It seems intuitive that $a\; \propto \frac{F}{m}$, as the greater the force that is applied on an object, the greater its acceleration will be. Inversely, the greater the mass of the object, the slower the acceleration will be.  However, when rewriting proportions as equations, you must introduce a constant of proportionality, and in this case of a direct proportion, if $a \propto \frac{F}{m}$ then when rewriting as an equation you will have $$a = k\cdot\frac{F}{m}$$  In order to get the standard formula $F = ma$ this constant must be $1$. However, how do we know that this is the case? How do we know that the constant isn't $2$ and the formula $F = \frac{1}{2}ma$, for instance? Why can't I use switch statement on a String? What is the reasoning that leads one to postulate this second form for the relativistic particle action? The action for the free relativistic particle with worldline $\gamma : I\subset \mathbb{R}\to M$ is  $$S[\gamma]=-m\int d\lambda\sqrt{-\dot{\gamma}^a(\lambda)\dot{\gamma}_a(\lambda)}\tag{1} $$  Now, one may postulate a second action  $$S'[\gamma,\eta]=\frac{1}{2}\int d\lambda \bigg(\eta(\lambda)^{-1}\dot{\gamma}^a(\lambda)\dot{\gamma}_a(\lambda)-\eta(\lambda)m^2\bigg).\tag{2}$$  These are classically equivalent actions.  My question is: usually what we have is (1) and we have a problem both with the square root and with the massless limit. Given this, how could we think about postulating (2)? In other words, how can we reach (2)?  Usually some people answer this by saying: "it doesn't matter, actions are postulated, you postulate it, compute the equations, prove it works and its over".  Now I beg to differ. I want to know how could someone reason exactly in order to know what to postulate.   I am perfectly comfortable with computing the equations of motion. I want to know is how given (1) we would have the idea to postulate (2).  Is it some special case of some general procedure that deals with constraints?