Given that $i,j,k$ are non-negative integers, how many possible ways can $i+j+k=n$ without taking the order into account?   In other words, what does the following sum equal? $$\sum_{i+j+k=n} 1$$  And then, for a generalized case of m numbers:  $$a_0+a_1+...+a_m=n$$  But the order for which i,j and k are placed does not matter, for example: $1+1+2$, $1+2+1$ and $2+1+1$ are the same combination.
I want to find out the number of possible combinations of $x$ numbers that sum to $y$. For example, I want to calculate all combination of 5 numbers, which their sum equals to 10.  An asymptotic approixmation is also useful. This question seems to be very close to number partitioning, with the difference that a number can be 0. See:    All possible partitions for sum 10 and 3 positions that can be zero, are 63 possiblities: (numbers shown as 3 digits)  019 028 037 046 055 064 073 082 091 109 118 127 136 145 154 163 172 181 190 208 217 226 235 244 253 262 271 280 307 316 325 334 343 352 361 370 406 415 424 433 442 451 460 505 514 523 532 541 550 604 613 622 631 640 703 712 721 730 802 811 820 901 910
Good day. I'm not too sure how I should go about asking my question, so if it is in anyway confusing, feel free to edit it.   In my Group Theory course we defined and showed a few properties of the commutator subgroup $[G,G]$ of a group $G$. And then we stated and proved a lemma in lecture that I'm having some difficulty wrapping my head around. I'll state it here for clarity.  Lemma a) The commutator subgroup $[G,G]$ of $G$ is a normal subgroup of $G$. b) The quotient group $G / [G,G]$ is the largest abelian quotient of G in the sense that every homomorphism $\varphi : G \to A$ where $A$ is an an abelian group, induces a unique homomorphism $\bar \varphi : G/[G,G] \to A$ so that $\varphi =\bar \varphi \circ \pi$ where $\pi : G \to G/[G,G]$ is the quotient homomorphism.  Now, it's not the proof of this lemma that I'm having trouble with, it's the italicized text that is messing with me. I completely understand what it is that the italicized text is saying, I'm just not too sure why it is that the property gives us the "largeness" that is claimed. I can see that the above forces $G$ to "pass through" $G/[G,G]$ before it "reaches" $A$ (I apologize for the casual terminology), so I can sort of see why $G/[G,G]$ should be the largest quotient, in a non-rigorous sort of way.  Overall I'm very confused. Perhaps I'm missing something very simple. Any help or nudges in the right direction would be much appreciated.   As a side note I did try a search on Google and here on Stack Exchange and couldn't find anything that answered my question. So if I missed something obvious, then my apologies. Thank you in advance. I understand the idea of a focal length for a single lens, i e the distance from the lens to the point at which parallel rays of light converge. However, in the case of a photographic lens with multiple lens elements, where exactly is the focal length of the lens as a whole measured from? Can matter be described as the result of the curvature of space, instead of vice versa? Can matter be described as the result of the curvature of space, rather than the curvature of space being the result of matter, and energy being the cause of the curvature of space? Why is 4 not an instance of Number? Just curious:    4 instanceof Number => false new Number(4) instanceof Number => true?   Why is this? Same with strings:    'some string' instanceof String returns false new String('some string') instanceof String => true String('some string') instanceof String also returns false ('some string').toString instanceof String also returns false   For object, array or function types the instanceof operator works as expected. I just don't know how to understand this.  [new insights]  Object.prototype.is = function() {         var test = arguments.length ? [].slice.call(arguments) : null            ,self = this.constructor;         return test ? !!(test.filter(function(a){return a === self}).length)                : (this.constructor.name ||                   (String(self).match ( /^function\s*([^\s(]+)/im )                     || [0,'ANONYMOUS_CONSTRUCTOR']) [1] ); } // usage var Newclass = function(){};  // anonymous Constructor function var Some = function Some(){}; // named Constructor function (5).is();                     //=&gt; Number 'hello world'.is();           //=&gt; String (new Newclass()).is();        //=&gt; ANONYMOUS_CONSTRUCTOR (new Some()).is();            //=&gt; Some /[a-z]/.is();                 //=&gt; RegExp '5'.is(Number);               //=&gt; false '5'.is(String);               //=&gt; true Plotting a function with an argument in degrees I want to plot a function. The function is, F is proportional to x/cos(x). Here x is rotation in degree and F is the force. I have to plot the graph where the x axis will be from 0 to 70 degree and the y axis will be linear value 0 to 5. I am not able to find any option to draw graphs where x axis is with rotational degree. Pseudoinverse and norm Suppose the m * n matrix A =$ \begin{bmatrix}     A_1 \\A_2 \end{bmatrix}$ where A1 is a nonsingular square matrix (n*n) and A2 is an arbitrary matrix. Why is $||A^{+}||_2 \leq ||A_1^{-1}||_2$  ?   ($A^{+}$ denotes the psuedoinverse) I have been reading through my notes and I came across this example and I found it hard to understand so I need some help in explaining how the inverse of this is found.  The set $\mathbb Q(\sqrt 2)=\{a+b\sqrt2$: $a,b$ in $\mathbb Q \}$ is a field. The inverse of an element $a+b\sqrt 2$ in $ \mathbb Q(\sqrt 2$) is  $$\frac{1}{a+b\sqrt{2}}=\frac{a}{a^2-2b^2}+\frac{-b}{a^2-2b^2}\sqrt{2} $$  Can anyone explain  to how the inverse was found? Appreciate your help. How long does the Truffle take to move in after building the mushroom biome? I currently find myself in a pickle because even after I've built the mushroom biome and met all other requirements, the Truffle NPC won't move in.   I've defeated not only the Wall of Flesh but Ocram already. Created a surface mushroom biome. Built a house made out of mushrooms with mushroom furniture.   I have no idea how long it takes for the NPC to move in or if I'm wrong in any of the steps. Multiple domains for different products? I have a website with software applications. Is it good for SEO to choose one keyword rich domain name for each of our software products or should we stick to a single domain?  From a user's perspective I think it would be easier to remember a domain that is keyword rich as the user will instantly know what this product is for.  But I have read articles that the latest trend in SEO is to stick to one domain for all of your products and invest on this single domain website.  Is that true? What do you advise? Should I register a separate domain for each of our products or should I use only one single domain?  Should I do a 301 redirect with a .htaccess to a single domain? And what about the sitemaps? Should I register all sites in Google Webmaster Tools and post a separate sitemap for each one of them? should my main site sitemap include all pages or should separate domains have their own sitemaps? I was wondering if anyone knows how to configure a Windows 7 x64 Enterprise install that is on a domain to run a script if the user attempts to shutdown the computer - but I dont want the script to run if the user tries to log out.   Here is a bit of detail on my situation...  I have installed drive encryption software on 5 desktops that are in use by various people in my group.  These desktops are installed a few buildings away in a secure lab that very people have access to.   People in my group access these machines (8 Core 2600K Intel Sandybridge with 8GB RAM) over RDP to preform tasks that require heavy lifting that laptops are not well suited for.    I wrote a shutdown script (.hta file) to warn a user that if he/she shuts the computer down, they will have to get access to the lab and enter the drive encryption password in order to bring the machine back online.   The script has a timer that counts down for 1 minute and allows the user to cancel the shutdown command.    The script works as expected when a user tries to shutdown the computer, but I just realized that the script seems to run when a user tries to log off.  Is there any way to differentiate between a user logging off and a user shutting down a machine?   If possible, I would only want the script to run if the machine is shutdown.  If the user logs out, I would not want any script to run.  If this is possible, it seems like this would be managed via local Group Policy.     Let me know if you need any further details. How do I copy Team Fortress 2 to other computers? Assume  $$\lim_{n\to \infty}  (y_{2n} - y_n)=0$$  then  $$\lim_{n\to \infty} y_n$$  exists.  I know it's not true, and I can see a sequence that disprove that $(1,1,2,1,3,2,4,1,5,3,...)$ but I want a sequence that has formula.  hint/help?  thanks Electric shock - was I stupid, unlucky, or a combination of both? One of the double sockets in our garage needed replacing (damaged after a washing pole hit it) - a pretty trivial job that I'd done before. So I flipped the MCB for the ring main, used a non-contact voltage tester to check nothing was there, and set to work. I disconnected the old socket fine, and was lining the cables up to fit into the new socket when... ow.  My finger bridged the live and earth pins, and suffice to say the live wire was very much alive. Bar a few finger spasms I was fine fortunately, and believe me I realise I was very lucky in that respect (I'm in the UK, so that was 240V.) Before finishing the job I then shut off the entire property's electrics - I was taking no more chances.  Further inspection confirmed two things I immediately suspected at this point - the MCB in the garage (installed before we moved into the house) was shutting off power via the neutral, not the live, and the voltage tester was dodgy (I had tested it on the same socket earlier and it seemed fine, further testing showed it presumably had a loose connection internally and only worked sporadically.) Needless to say it's now in the bin, and an electrician has been called to sort the MCB and check the rest of the house for similar issues.  Unsurprisingly this has shaken me up a bit - I would say I'm a rather safety conscious person, and in this case thought I'd done all the checks properly (including taping over the relevant trip switch to ensure no-one flipped it back on while I was working.) In some ways I can't help feeling I was unlucky that the MCB was wired by a cowboy, in combination with the voltage tester failing in the way that it did, at the time that it did. However, I'm not one to solely blame tools - clearly some, if not most of the blame here lies with myself also.  So in short, what should I have done differently - and was I primarily being stupid, or really quite unlucky? How to put legend below the chart? I have the following code that produces a line chart:  \begin{figure}[p]     \centering \begin{tikzpicture}     \begin{axis}[     use units,     cycle list name=exotic, %This defines the color. It produces nicer colors         width=15cm, height=8cm,     % size of the image         grid = major,         grid style={dashed, gray!30},         %xmode=log,log basis x=10,         %ymode=log,log basis y=10,         xmin=0,     % start the diagram at this x-coordinate         ymin=0,     % start the diagram at this y-coordinate         %/pgfplots/xtick={0,5,...,60}, % make steps of length 5         %extra x ticks={23},         %extra y ticks={0.507297},         axis background/.style={fill=white},         ylabel=Time,         xlabel=Number of Datapoints (n),         y unit=s,y unit prefix=m,         tick align=outside]        % import the correct data from a CSV file       \addplot table [col sep=comma,trim cells=true,y=Best Case (Ascending)] {datasets/time_mergesort.txt};           \addplot table [col sep=comma,trim cells=true,y=Average Case (Random)] {datasets/time_mergesort.txt};                     \addplot table [col sep=comma,trim cells=true,y=Worst Case (Descending)] {datasets/time_mergesort.txt};                      \legend{Ascending,Random,Descending}     \end{axis}  \end{tikzpicture}     \caption{Mergesort Run Time for Sorting Random Data}     \label{fig:merge_sort_from_csv} \end{figure}   And at the moment the legend appears on the chart on the upper right corner. I need to move that below the chart, or even to leave that on the chart but to move that on the upper left corner.   I have tried the solution mentioned at , but it did not work for me.  How can I move the axis in a different position? Why do high resolution cameras shoot stills at high resolutions, but only typically shoot video at 1080p which is about 2 megapixels?  For example I have a Sony-NEX 6 which can shoot stills at 16 megapixels but only 1080p by 1920p video.  Also how do digital cameras separate the frames in video if the lens shutter never closes?  And if you can shoot video at 30 fps or 60 fps then why can't cameras have a continuous drives at 30 to 60 fps? Currently, once an edit by a user without full edit privilege is suggested, it can be either approved or rejected.  There is a known edge case that cause suggested edits to get auto rejected: (aka edit conflict)   User with full edit privilege click "edit" and start typing. Let's name this user Joe. Since the user from previous step did not yet send the edit, users without full edit privilege can still click the "edit" as well, oblivious to the fact someone else is editing the same post in those very seconds. Such user click "edit" too and start typing. Let's name this user Kenny. Kenny is faster than Joe: he send his edit first, creating new suggested edit. Joe is still typing. Joe finally done typing. He send his edit to its merry way oblivious to the consequences. As result of the full edit made by Joe, Kenny's suggested edit is kicked away and rejected. Boom.   This is all known and reported many times.  where the user got it hard with at least two auto rejections in short period of time. Some concrete examples: , , .  For edge case, it became pretty thick edge. This is not just minor hassle: enough rejections, and the user is banned from suggesting for a whole week: and remember we're talking here about good edits made by good users. The above used to count for the ban, but . Thanks Gilles for requesting such a change!   I know it was already suggested to lock edits and similar solutions, but I suggest whole different approach: instead of auto rejecting the suggested edit, dismiss it, i.e. cancel it like it never existed same way a bounty can be revoked by moderator.  In the edit suggestion page it will show "Dismissed" instead of Approved or Rejected maybe with a tooltip explaining what caused this. This will soften the blow from those edge cases, taking the edge out of them. :) Even though JRE 8 is installed on my MAC OS Yosemite, the error - " No Java Runtime present,requesting to install " How to add and sync folders outside SkyDrive folder? I have folders with documents all over my hard drive, some which I would like to include in SkyDrive without moving them into the SkyDrive folder.  E.g. my SkyDrive folder is in C:\Users\Name\SkyDrive, but I have some files in C:\Users\Name\SyncMePlz that I also would like to be synced with SkyDrive so that I can reach them from other devices.  How can this be achieved? apt-get build-dep is unable to find a source package I have already followed  to disable middle mouse button paste on my Ubuntu 12.04.   Works like a charm.   Now I am trying to achieve the same on my Linux Mint 17. When I try to  sudo apt-get build-dep libgtk2.0-0   it gives me the following output:   Reading package lists... Done Building dependency tree        Reading state information... Done Picking 'gtk+2.0' as source package instead of 'libgtk2.0-0' E: Unable to find a source package for gtk+2.0   For me it looks like apt-get is somehow "resolving" 'libgtk2.0-0' to 'gtk+2.0', but then does not find any package named like that.   EDIT:  although I am now able to compile the program (see my answer), I still do not know what  Picking 'gtk+2.0' as source package instead of 'libgtk2.0-0' is supposed to mean. Any insight on this would be appreciated, thanks! Balancing long table inside multicol in LaTeX I would like to put some longer tabular data inside the multicols environment while maintaining its balancing abilities. I have tried supertabular with the trick to redefine \newpage as columnbreak. This isn't good though, because the columns aren't properly balanced. Finally I ended up using \halign:  \documentclass[11pt, a4paper]{article} \usepackage[margin=3cm]{geometry} \usepackage{supertabular} \usepackage{multicol}  \def\shortlipsum{\par Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.\par}  \newcounter{entryno} \setcounter{entryno}{1} \def\tabline{Test &amp; \the\value{entryno} &amp; Description\addtocounter{entryno}{1}\\} \def\tablines{\tabline\tabline\tabline\tabline\tabline} \def\mybreak{\hrule width \columnwidth height 0pt \columnbreak}  \begin{document} \begin{multicols}{2} \shortlipsum \medskip  % % This doesn't balance the columns. Whole table ends up in the left column (it fits) % \begingroup\let\newpage\mybreak % \noindent\begin{supertabular*}{\columnwidth}{@{\indent}l l l} % \tablines\tablines\tablines\tablines\tablines\tablines % \end{supertabular*} % \endgroup  \begingroup\let\\\cr \noindent\halign{\indent#\quad&amp;#\quad&amp;#\hfil\cr \tablines\tablines\tablines\tablines\tablines\tablines} \endgroup  \medskip \shortlipsum \end{multicols} \shortlipsum \end{document}     I was wondering if I'm the only one using \halign to achieve this result. On the other hand supertabular leaves me with an undesired almost empty right column. How would you approach this problem?