Guest User

Untitled

a guest
Jun 19th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. n=20
  2. m=18
  3. r=c(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
  4. t= c(1:m-1);t
  5. w=cumsum(r);w
  6. d=n-w-t;d
  7. c=n*prod(d);c
  8.  
  9. L1=c(0:r[1])
  10. L2=c(0:r[2])
  11. B1=choose(r[1],L1)
  12. B2=choose(r[2],L2)
  13. H1=L1+1
  14. H2=L2+2
  15. sum1=sum((-1)^L1*B1/H1)
  16. sum2=sum((-1)^L2*B2/H2)
  17. pr=sum1*sum2
  18. f=c*pr;f
Advertisement
Add Comment
Please, Sign In to add comment