If I roll a dice 4 times then what is the probability of getting 20 total dots? So, here the total evets = $6^4$
If I get $a,b,c,d$ doing each rolling then, $$a+b+c+d=20$$
$$where\ a,b,c,d\in\mathbb{N} \ and\ 1\le a,b,c,d\le6$$
Now, how can I solve this by stars and bars method? Or there are other easier ways to solve this?
 A: Write out all the ways you can get 20 dots total with 4 dice (there should be 5 up to reordering if I didn't miscount). Then compute the chance for each of these events. Here you need to keep track of the different ways to arrange the dots. For example there are 4 events for getting 6,6,6,2 because each of the 4 dice can be the one with the 2.
A: Using generating functions: The number of ways to roll a total of $20$ on four dice is $$\begin{align}[x^{20}](x+x^2+x^3+x^4+x^5+x^6)^4 &= [x^{16}](1+x+x^2+x^3+x^4+x^5)^4 \\ &= [x^{16}]\left({1-x^6 \over 1-x}\right)^4 \\ 
&= [x^{16}]{\binom40-\binom41x^6+\binom42x^{12}-\cdots \over (1-x)^4} \\
&= [x^{16}]{\binom40 \over (1-x)^4}-[x^{10}]{\binom41 \over (1-x)^4}+[x^4]{\binom42 \over (1-x)^4} \\
&= \binom40\binom{19}3-\binom41\binom{13}3+\binom42\binom{7}3 \\ &= 35. \end{align}$$ The probability is therefore $\frac{35}{6^4} = \frac{35}{1296} \approx 2.7\%$.
A: You are looking for:
$$
\eqalign{
  & {\rm No}{\rm .}\,{\rm of}\,{\rm solutions}\,{\rm to}\;\left\{ \matrix{
  {\rm 1} \le {\rm integer}\;x_{\,j}  \le 6 \hfill \cr 
  x_{\,1}  + x_{\,2}  + \;x_{\,3} \; + x_{\,4}  = 20 \hfill \cr}  \right.\quad  =   \cr 
  &  = {\rm No}{\rm .}\,{\rm of}\,{\rm solutions}\,{\rm to}\;\left\{ \matrix{
  {\rm 0} \le {\rm integer}\;y_{\,j}  \le 5 \hfill \cr 
  y_{\,1}  + y_{\,2}  + \;y_{\,3} \; + y_{\,4}  = 16 \hfill \cr}  \right. \cr} 
$$
and because $5<16$ you cannot apply "stars and bars" directly.
The general solution to
$$N_{\,b} (s,r,m) = \text{No}\text{. of solutions to}\;\left\{ \begin{gathered}
  0 \leqslant \text{integer  }x_{\,j}  \leqslant r \hfill \\
  x_{\,1}  + x_{\,2}  +  \cdots  + x_{\,m}  = s \hfill \\ 
\end{gathered}  \right.$$
is given by
$$
N_b (s,r,m)\quad \left| {\;0 \leqslant \text{integers  }s,m,r} \right.\quad  =
\sum\limits_{\left( {0\, \leqslant } \right)\,\,k\,\,\left( { \leqslant \,\frac{s}{r+1}\, \leqslant \,m} \right)} 
{\left( { - 1} \right)^k \binom{m}{k}
 \binom
 { s + m - 1 - k\left( {r + 1} \right) } 
 { s - k\left( {r + 1} \right)}\ }
$$
as explained in this related post,
and which is a better way to write the formula already presented by @satishramanathan 
because it renders superfluous the summation bounds, as being implicit in the binomial.
That said, in your case there is a nice shortcut, using the fact that $N_b (s,r,m)=N_b (m \cdot r -s,r,m)$
as can be easily verified.
That is, you can ask that the sum of the "missing points" be four, in which case you can apply 
"stars and bars" or weak compositions of $4$ into four parts, and get
$$
N = \binom{4+4-1}{4-1} = \binom{7}{3}=35
$$
which, of course would be the same if you computed 
$N_b (m \cdot r -s,r,m)= N_b (4,5,4)$, because the sum reduces to the only term in $k=0$.
A: In general, the formula for finding the distribution of sum $s$ in throwing $n$ dice with $x$ sides goes like this
$$\sum_{k = 0}^{\lfloor\frac{(s-n)}{x}\rfloor} (-1)^k {n\choose k}{(s-1-xk)\choose (n-1)}$$
Thus in your case, the favorable cases would be
$ = (-1)^0 {4\choose0}{19\choose3}+(-1)^1 {4\choose1}{13\choose3}+(-1)^2 {4\choose2}{7\choose3}$.
Can you take it from here?
