Show that each vertex $v$ of a tree $T$ appears $\deg(v)-1$ times in Prüfer sequence of $T$.  Could you do this by induction on $n$ where $n$ is the number of vertices in a graph?  So far, I have my base case $n=2$ in which case both vertices have degree $1$ and since the Prüfer encoding is empty, the base case holds.  How would I go from here? Or am I going about it in completely the wrong way?
The question is as below:      Show that each vertex $v$ of a tree $T$ appears $deg(v)-1$ times in the Prüfer encoding of $T$, where $deg(v)$ is the degree of $v$ in $T$.   For this, I think there are 3 scenarios a leaf should be considered for: (1) when it is a leaf as part of a tree; (2) a leaf that has been discarded; (3) the remaining edge. I feel like this will result in a short proof which is only two (or so) statements long, but at the same time, feel it is too simple.   EDIT: I've had a look at this again and narrowed it down to 2 cases:   Case 1: The vertex $v$ in question has $deg(v)\ge2$. $v$ then loses its neighbours as the algorithm is applied repeatedly until $v$ becomes a leaf itseelf. At this point, $v$ is attached to another neighbour, leaving an edge. This means the algorithm can no longer be applied and we have obtained the final Prüfer Encoding for the tree $T$.  Case 2: The vertex $v$ has $deg(v)\ge 2$. It loses its neighbours as the algorithm is applied repeatedly but is deleted itself at some point in the process.   Have I gone about this wrong?  Thank you.
Why does SQL Server use a better execution plan when I inline the variable? I am trying to evaluate the following sum. Here $x\in\mathbb{R^{+}}$. $$f(x)=\sum_{n=1}^{\infty}\frac{(n-1)!}{\prod_{r=1}^{n}(x+r)}$$ At present I do not know how to proceed. Any hints are appreciated. Thanks. Mean Time to Failure (MTTF): When disk manufacturers post this, how should you interpret their numbers? Mean Time to Failure (MTTF) is usually given in terms of hours, and by doing some calculations, it seems that a disk should fail only after a good number of years have gone by.  It seems that disks need repair more often than that. Does anyone know why this is so?  I figured that there is something fishy about this metric. Am interpreting something wrong here? I'd like to know if the following problem of elementary linear algebra is already solved / solvable.  For two (singular) $n\times n$ matrices $P$ and $Q$, if $\det(\lambda P+\mu Q)=0$ for any $\lambda,\mu\in\mathbb{R}$, what are conditions on $P$ and $Q$? For subspaces, if $N\subseteq M_1\cup\cdots\cup M_k$, then $N\subseteq M_i$ for some $i$? I have a vector space $V$ over a field of characteristic $0$. If $M_1,\dots,M_k$ are proper subspaces of $V$, and $N$ is a subspace of $V$ such that $N\subseteq M_1\cup\cdots\cup M_k$, how can you tell $N\subseteq M_i$ for some $i$?  I was first trying to show it just in the case $N\subseteq M_1\cup M_2$, and hoping to extend it to finitely many $M_i$. If either of the $M_i$ contains the other, the claim follows, so I suppose neither $M_i$ contains the other.   In hopes of a contradiction, I suppose $N\not\subseteq M_1$ and $N\not\subseteq M_2$, Picking $x_1\in N\setminus M_1$ and $x_2\in N\setminus M_2$, I'd have $x_1+x_2\in N\subseteq M_1\cup M_2$. The only thing I could conclude was that actually $x_1,x_2\notin M_1$ and $x_1,x_2\notin M_2$, which seems like a dead end. What's the right way to do this? What is the "last" data that get's backed up, when running pg_dump on a live server? I'm wondering: If I start doing a pg_dump of a very large database (it would take hours), that is still running actively receiving writes, what is then the last data that goes into the backup? Is it:   The data as-it-was, at the point in time where the pg_dump command was initiated. The last changes that it encountered at some point where it was dumping that individual record. Something else.   Bonus question: If I'm trying to dump a database as part of trying to rescue it from corrupt data, will it then make any difference whether I use the directory format or the custom format? Deleted posts should not influence reputation Coming from Eclipse and having been used to duplicate lines all the time, it's pretty strange finding out that Xcode has no such function. Or does it?  I know it's possible to change the system wide keybindings but that's not what I'm after. Okay. If I wanted to redirect the output of a program to a file, I'd do something like this  prog &gt; file   If I wanted to redirect both stdout and stderr to that file, then I'd do  prog &gt; file 2&gt;&amp;1   This is all well and good if you want the output to go to the file. But what if you want the output to go to the file and yet still go to stdout/stderr? So, the output is saved in the file, but you can still see it on the console as the program is running. Is there a way to do that? And if so, how? Show that every group of prime order is cyclic Adding CSS Reference on Site Page Fortunately, I have very few strongly negative interactions with cars (most people generally seem to respect the way I ride), but those that do stick with me for a while.  The scenario is almost always the same. Rude driver approaches, does their rude thing (obscenities, "get off the road," unsafe passing, etc...), then speeds off to annoy the next bicyclist (or more than likely arrives at the next red light).  While this is generally a short interaction, I find that I just don't have a good rest of the ride. I find myself angry at the driver, thinking about what I could have done differently, and just generally being pissed off. Clearly I realize that it is possible I'm a jerk, but given the relative infrequency of these events I'm hoping that's not the case and I'm just riding defensively and this driver is having a bad day.  What can I do to get over (or mitigate) my anger at inconsiderate drivers? Calculating Optimal Geohash Precision from Bounding Box I'm using Elasticsearch's  to plot clusters on a map (using Leaflet). I understand that for larger areas a lower precision setting should be used to limit the number of buckets created/returned.  How should I determine the appropriate precision value to request?  Is there a standard or recommended formula for calculating the optimal precision based on a bounding box and/or zoom level? Is it better to just map zoom levels to precision values (I know that's probably easiest.) Is ∅ equivalent to {∅}? What does pwd output? Does the command pwd in a shell script output the directory the shell script is in? While trying to ask a question, I got the error message     This question body does not meet our quality standards. Please make sure that it completely describes your problem - including what you have already tried - and is written using proper grammar.    Why am I getting this message? What can I do to get the system to accept my question? Can you be more specific? What are good resources on how to ask high-quality questions?      For more information, see  in the . Return more than 2000 records (SOQL) I'm trying to retrieve a list of Account objects from Salesforce using SOQL. Originally my query was this:  var result = service.query("SELECT Id, Name, RecordTypeId FROM Account"); return result.records.Select(record =&gt; record as Account).ToList();   However this only returns a maximum of 2,000 records and I have over that which I need to be returned by this query. After some digging around I found an example in Java which loops over the SOQL query which will allow a maximum of 10,000 records to be returned. I tried to replicate this in C# but it differs slightly, here is what I have now:  var accounts = new List&lt;Account&gt;(); foreach (Account account in service.query("SELECT Id, Name, Composer_ID__c, RecordTypeId FROM Account").records)     accounts.Add(account);  return accounts;   However this still only returns a maximum of 2,000 records. How can I return more than 2,000 records by querying Account? Delay answer downvote rep loss to voter to help hide voter's identity A while back, I posted an answer to SO, which was downvoted.  I wasn't sure who did it, but had a suspicion because I thought I had seen a particular user lose a reputation point.  When I deleted the answer, my suspicion was confirmed by a point gain in reputation by the particular user.  Now, I wasn't going to attempt any sort of retaliation (and did deserve the downvote) but this seems like it could lead to abuse.  My suggestion is to apply answer downvote rep loss/gain at a particular time of day, and not immediately after the vote or answer deletion. How do I properly clean up Excel interop objects? I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause:  while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet = null; GC.Collect(); GC.WaitForPendingFinalizers();   Although this kind of works, the Excel.exe process is still in the background even after I close Excel. It is only released once my application is manually closed.  What am I doing wrong, or is there an alternative to ensure interop objects are properly disposed of? My PC has a build-in VT1828S chip. The connection between PC and monitor (which has built-in speakers) is through an HDMI cable.  Audio preferences shows 2 devices for audio output: analog stereo and RS880 Audio Device [Radeon HD 4200] digital stereo (HDMI).  When I plug a headphone in the rear jack and I choose the former device, everything works. When I choose the latter device, instead, no sound is heard, and video playback is too fast. It is as if video frames want to synchronise with the audio timing, but the audio timing information is wrong.  HDMI audio worked perfectly with Ubuntu 11.04, but stopped after 11.10 upgrade.