A problem regarding table decorations My one friend Alex has r red, g green and b blue balloons. To decorate a single table for the banquet he needs exactly three balloons. Three balloons attached to some table shouldn't have the same color.  What maximum number t of tables can be decorated if he knows number of balloons of each color? Alex gave me this problem to solve. For given values r, g and b how will I find the maximum number t of tables, that can be decorated in the required manner.  My another friend joy solved it  and found this information. If r=5,b=4,g=3,his result is 4.  But I can't understand how he solved and found this result.Can anyone tell me joy's process and reasoning behind it?
Decorate Tables You have $r$ red, $g$ green and $b$ blue balloons. To decorate a single table for the banquet you need exactly three balloons. Three balloons attached to some table shouldn't have the same color. What maximum number $t$ of tables can be decorated if we know number of balloons of each color?  I know the answer will at least be $\min(r,g,b)$. Also we need to add tables with $2$ reds, $2$ blues or $2$ greens. I cannot think of the formula for it
Is system cleanup/optimization needed Does Ubuntu need regular cleanups like Windows. For example:   Cleaning the logs Temporary files Package cache Dependencies left over   I am not referring to web browsers only.  In case I never do a cleanup, will I have a system like new without my hard drive being full of temporary files, packages, etc.?  Will the performance degrade overtime if a cleanup is not done. What is the best time to ask questions? Mclaurins with $e^{\sin(x)}$ To evaluate $e^{\sin(x)}$ I use the standard series $e^t$ and $\sin(t)$, combining them gives me:  $e^t = 1+t+\dfrac{t^2}{2!}+\dfrac{t^3}{3!}+\dfrac{t^4}{4!}+O(t^5)$  $\sin(t) = t-\dfrac{t^3}{3!}+O(t^5)$  $\therefore e^{\sin(x)} = 1+\sin(x)+\dfrac{\sin^2(x)}{2!}+\cdots+O(x^5)$  $\iff e^{\sin(x)}=1+\left(x-\dfrac{x^3}{6}\right)+\dfrac{\left(x-\frac{x^3}{6}\right)^2}{2}+\dfrac{x^3}{6}+O(x^5) = 1+x +\dfrac{x^2}{2}-\dfrac{x^4}{6} + O(x^5)$  In the last step, I only evaluate up to $\sin^3x$ term, everything above has a grade equal to or greater than $x^5$  However, I'm wrong. According to Wolfram, the series expansion for $e^{\sin x} = 1+x+\dfrac{x^2}{2}-\dfrac{x^4}{8}+O(x^5)$.  What did I do wrong? I can't seem to find what or where. Generating list of manually installed packages and querying individual packages I'd like to get a list of packages installed manually by apt or aptitude and be able to find out whether a foobar package was installed manually or automatically. Is there any neat way of doing that from the command line? Punctuation in an indirect quotation Difference between staticmethod and classmethod /ə/ in a stressed syllable? According to , the schwa /ə/ doesn't occur in stressed syllables. But , Oxford Advanced Learner's Dictionary and Longman Pronunciation Dictionary say otherwise: the word "because" has been variously transcribed as /bɪˈkəz/ or /bəˈkəz/. So in which source should I believe? Or is there any error in transcription going on here? Or is "because" the only exception? And are there others? Is "of" instead of "have" correct? Gel circular polarising filter I am contemplating buying a lens that only takes rear gel filters. Is it possible to buy a circular polarising filter in gel format? If so, who can supply them (preferably UK based)? limit of integral $n\int_{0}^{1} x^n f(x) \text{d}x$ as $n\rightarrow \infty$ I am trying to solve the following problem at the level of a senior undergrad analysis level. So, the problem is as follows: We are given a function $f$ which is continuous on the interval $\left [ 0,1 \right ]$, and the question is to find the limit: $$\lim_{n\rightarrow \infty}\int_{0}^{1}x^{n}f(x)dx\;.$$ The second part of the problem is to deduce the following limit: $$\lim_{n\rightarrow \infty}n\int_{0}^{1}x^{n}f(x)dx\;.$$  For the first part: I just did the following: For every $0\leq x&lt; 1$: $x\leq M$, where $0&lt; M&lt; 1$. Then: $$\int_{0}^{1}x^{n}f(x)dx\leq M^{n}\int_{0}^{1}f(x)dx\;.$$ Then: $$\lim_{n\rightarrow \infty }\int_{0}^{1}x^{n}f(x)dx\leq \lim_{n\rightarrow \infty }M^{n}\int_{0}^{1}f(x)dx= 0.\int_{0}^{1}f(x)dx=0\;,$$ so $$\lim_{n\rightarrow \infty }\int_{0}^{1}x^{n}f(x)dx=\lim_{n\rightarrow \infty }f(1)\int_{0}^{1}1dx=f(1)\;.$$ Does that make sense? If not, please show me the correct one.  As for the second part, I have no idea what to do. Any help? I'm using BibLaTeX to handle my bibliography and I want a reference to be placed in a footnote on every page where I cite the same work and have the same number. Also I want to be able to cite the same work on one page several times. The latter could be done by using  from the Joseph Wright's blog. However, it puts a reference in a footnote only once. I want to make it so I always have 50 entities in an area. So when 1 dies/despawns/leaves the area I want it to detect that and summon in a new entity, and yes I do want them to die/despawn/leave the area so preventing those things is not an option. Puppet client not connection to master - SSL connect Error I installed the puppet master and agent on the same machine. When the client is started, I got the following error message.  puppet agent --server=agent.com --no-daemonize --debug    err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed.  This is often because the time is out of sync on the server or client Setting knots in natural cubic splines in R I have data with many correlated features, and I want to start by reducing the features with a smooth basis function, before running an LDA. I'm trying to use natural cubic splines in the splines package with the ns function.  How do I go about assigning the knots?  Here's the basic R code:  library(splines) lda.pred &lt;- lda(y ~ ns(x, knots=5))   But I have no idea about how to chose the knots in ns. How do I parse command line arguments in Bash? Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile? Suppose $a_n \ge 0$ for all natural numbers $\Bbb{N}$ and $\sum{a_n}$ converges. Is it necessarily true that $\sum{(a_n)^2}$ converges?  I think yes.  Clearly as $a_n \ge 0$ it follows $(a_1+a_2+\dots+a_n)^2 \ge a_1^2+a_2^2+\dots+a_n^2 \ge 0$ and so $(\sum_{n=1}^{\infty}{a_n})^2 \ge \sum_{n=1}^{\infty}{a_n^2} \ge 0$.  As we are told $\sum{a_n}$ converges to say $L$ where $L$ is a real number it follows $L^2 \ge \sum_{n=1}^{\infty}{a_n^2} \ge 0$ and so therefore $\sum{(a_n)^2}$ converges.  Is this correct? How to install apk in 2nd user of android 5.0 without playstore So, android 5.0.2 doesn't allow side loading of apks for 2nd user (irrespective of whether it is guest or standard user). "Unknown Sources" is disabled and is uncheckable. And I use a pure Cyanogen Mod 12 (android 5.0.2) without any Google apps. So, there is no Play Store app.  But I have root access.  As shown in the pics, Unknown Sources is Uncheckable and installation is blocked.  (Click image to enlarge)     With this situation, how can i install apks on to the 2nd user account??  EDIT:   It seems Google intentionally (in the name of security) blocked sideloading apks for 2nd user in android 5.0.2. There is a bug report . And sideloading was reenabled in android 5.1.   I will post how to sideload apks on lolipop 2nd user using adb. If this can be done without adb please post. What is the difference between linear regression and logistic regression? What is the difference between linear regression and logistic regression?  When would you use each? Does the Dueling Fighting Style prevent using a shield? The Dueling fighting style doesn't seem to state anything about shields, stating that the character can only wield one weapon while fighting to gain the benefit. Does a shield count as a weapon or otherwise stop the damage bonus from occurring? Before Voldemort, who was the last Horcrux creator? Horcruxes are rare (and then seven come along at once...) and only a few people know about them.  But when was the last Horcrux before Voldemort's? 50 years before him? Centuries? Millennia?