Let $T\in\mathbb{R}^{n\times n}$, $\rho(T)$ denote the spectral radius of $T$ and $\rho \in \mathbb{R}_{++}$. Show that \begin{align} \rho(T) &lt; \rho \end{align} if and only if there exists a $P\succ0$ such that \begin{align}  T^{\rm T}PT-\rho^2P \prec 0. \end{align} Sufficiency: Let $\lambda \in \text{sp}(T)$ and $x$ be an associated eigenvector. We have: $$x^T T^T P T x - \rho^2 x^T P x &lt; 0 \implies (Tx)^T P (Tx) &lt; \rho^2 x^T P x$$ and $$(Tx)^T P (Tx) = (\lambda x)^T P (\lambda x ) = \lambda ^2 x^T P x$$ As $x^T P x&gt;0$, we get $\lambda ^2 &lt; \rho^2$, i.e. $|\lambda| &lt; \rho$. We conclude that $\rho(T) &lt; \rho$ and proves the sufficiency. Necessity: Suppose that $\rho(T) &lt; \rho$. Suppose towards a contradiction that for each $P\succ0$ it holds that \begin{align}  T^{\rm T}PT-\rho^2P \succeq 0. \end{align} Let $x\in\mathbb{R}^{n}\setminus\{0\}$ be an eigenvector of $T$ with eigenvalue $\lambda$ such that $|\lambda| = \rho(T)$. Then it holds that \begin{align}  x^{\rm T}T^{\rm T}Tx-\rho^2 x^{\rm T} x \geq 0, \end{align} since $P=I\succ0$. This implies that \begin{align}  |\lambda| \geq \rho &gt; \rho(T), \end{align} i.e. a contradiction. This proves the necessity.
Assume $T \in \mathbb{R}^{d\times d}$. Let $\rho(T)$ be the spectral radius of $T$ and $\rho \ge 0$. Prove that  $\rho(T) &lt; \rho$ if and only if there exists a $P \succ 0$ satisfying $T^TPT - \rho^2 P \prec 0$.  I can prove the Necessity: If $P = I$, for any $x \in \mathbb{R}^d$,   \begin{equation} x^T T^T P T x - \rho^2 x^T P x = \| Tx \|^2 - \rho^2 \| x\|^2 &lt; 0 \end{equation} so $T^T PT - \rho^2 P \prec 0$  I get stuck in proving the Sufficiency.
Why do corn flakes clump together in milk when stirred? The Cheerios Effect is the name the scientific community has given to this phenomenon. When cornflakes or oats are mixed with milk and stirred, they tend to clump together. Why does this happen? Can physics explain this? What is the meaning of ./ before a given path? ACPI error when trying to make dual boot with Ubuntu 18.04 and Windows 10 Proof: $\det\pmatrix{\langle v_i , v_j \rangle}\neq0$ $\iff \{v_1,\dots,v_n\}~\text{l.i.}$ Mobile SE sites not allowing edits to edits When you have less than 2K rep and your edit goes in a queue, you are usually allowed to revise your edit while it is being reviewed, by clicking the edit button again on the question page. However, when on mobile SE sites, the edit button disappears when you have submitted an edit for review.    Editing  by  into the question: It seems that the cause of this is when the mobile site hides the edit link (when there is a pending edit), it doesn't check who is making the edit, which means that it hides it for your own as well as other's edits. $\lim_{n\to \infty}f(nx)=0$ implies $\lim_{x\to \infty}f(x)=0$ Can anyone help me with this problem?     Let $f:[0,\infty)\longrightarrow \mathbb R$ be a continuous function such that for each $x&gt;0$, we have $\lim_{n\to \infty}f(nx)=0$. Then prove that $\lim_{x\to \infty}f(x)=0$.   Our teacher told first to prove Baire's theorem, and then show that this is a consequence of that theorem. I proved Baire's theorem, and I spend a few hours thinking on how Baire's theorem is related to this problem, but I couldn't find anything. I'd really appreciate your help. A question here on meta for instance may stick around for quite a while. A feature-request  maybe even for months. Then the status (tags) gets changed to  or  or whatever and the OP does not get notified.  On a normal post-edit we get a notification but retagging does not count for that. Please add retagging to the edit notifications. What is the maximum party size and the corresponding monster buffs? What is the maximum party size (if there is one) in Diablo 3?  Additionally, how much of a buff do monsters get when adding party members?     "A new ally has joined, but the minions of Hell grow stronger." Picking coefficient in Inverse Distance Weighted method of QGIS? I'm using QGIS 1.8.0 to interpolate weather data. This is, I have a weather station located in say, A and C. With the Inverted Distance Weighting or Triangular Interpolation methods, I can know/interpolate information in B. When using the IDW method, I have to choose a coefficient.   Does anyone know in which range the coefficients should be?   Say from 1 to 10 or .1 to .99 or 100 to 1000?   Any ideas? CPU Speed stuck at 0.78 GHz, How do I increase it to its base speed of 2.30 GHz? My 1yr old laptop, HP Pavilion 15 has it's CPU, Intel i5-8300H stuck at 0.78 GHz whenever it's plugged and charging, and the moment I remove the charger plug or switch it off, it increases suddenly and keep fluctuating freely, with good utilisation percentage more than 1-2GHz or more as I experience Thermal Throttling. I tried sneaking into the BIOS to see if I can do anything, but found nothing. I also downloaded Intel Extreme Tuning Utility (XTU) but couldn't control it. My question is how do I increase the speed to say atleast 2 GHz (fixed, not fluctuating) when it's charging, irrespective of getting thermal throttle, and also maybe even control the fan speed if it does get hot? Can I use Named Credential merge fields as URL parameters on the endpoint? I have a named credential as follows:  Name   Test_Credential URL    https://www.somesite.com Identity Type    Named Principal Authentication Protocol    Password Authentication Username   foobar Password   mySomeSiteDeveloperKey Generate Authorization Header   FALSE Allow Merge Fields in HTTP Header    TRUE Allow Merge Fields in HTTP Body     TRUE   The service that I am trying to authenticate against uses URL parameters to pass in the developer key and username. Is there any way to use  to pass those in to the URL?   The Named Credential attributes seem not to get decoded until the request is actually sent, as debugging the endpoint, or headers if I set them per the linked doc, show the un-merged data. I can get the callout to go to the right place, and return the expected error because the auth information is not provided. Anybody know of a "show me my HTTP request" site that I could point to to get a better idea of how this works?  I've tried both of these:  req.setEndpoint('callout:Test_Credential/api/action?id={!$Credential.Password}&amp;account={!$Credential.UserName}');  req.setEndpoint('callout:Test_Credential/api/action' + '?id=' + '{!$Credential.Password}' + '&amp;account=' + '{!$Credential.UserName}');   (Edited to remove the part about $Credential vs. $Test_Credential as I was able to determine that it is the former, and see the merged creds by calling out to .) Write18: capturing shell (script) output as command/variable? Let's say I compile the following file with pdflatex -shell-escape test.tex:   \documentclass{minimal}  \begin{document}  File listing is:  \immediate\write18{ls /usr}  \end{document}   This will send the output of the command ls /usr to report/log of pdflatex (primarily to stdout).   There are then two cases I'd like to utilize:    The output of ls /usr being included directly in the document (LaTeX stream). The output of ls /usr becoming the contents of a \newcommand (by this I mean, that I'd like the script to be executed when the \newcommand is executed first - and upon subsequent calls to the new command, the shell code should not be executed anew).    I have read through , but I'm not sure if this "pipe input" can be applied to \newcommand.   I have also read through  - and it seems that Tex' file I/O should be used; but I'm quite disliking the fact that I'd still have to redirect the script output (actually, in this case, the ls /usr output) to a file, and then read it in, to have it as contents of a command.   So, is there an easier way to achieve what I'd want (hopefully, illustrated through an example based on the above code)?     EDIT: Ehm, I should have asked one more question earlier :) I'll try with an edit here, although it will probably get missed .. :)   I originally asked for a \newcommand that will execute shell code only upon its definition (i.e., in a sense it is "cached"); and the answer from @egreg does exactly that. But then - would it be possible to have a different \newcommand definition, such that each time this newcommand is called, the shell command is executed anew? I.e. executing something like \@@input|"cat tempfile" (which cannot be executed as such), where tempfile changes between calls? What should main() return in C and C++? What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related: Mathematical induction for inequalities: $\frac1{n+1} + \frac1{n+2} + \cdots +\frac1{3n+1} > 1$ Show that a group of order $180$ is not simple. How do I remotely wake my Mac over Wi-Fi? Multiple Inheritance in C# Show the title character limit when writing a title I just ran into this while writing .  [I originally wrote:     you need a minimum of X reputation to comment on questions that are not your own, and on answers that are not to your own questions   But had to shorten it to:     you need a minimum of X reputation to comment]   First, it didn't tell me that I'd gone over the character limit for the title until after I had already tabbed out of the title field.  Second, it didn't tell me how much I'd gone over or anything. I had to copy-paste the text I'd written into my text editor in order to get some real-time feedback on the exact character count, to help figure out how to best shorten it. Motivation: I once had one surplus card on my hand, and knew the robbers would come soon. So I gave it to someone for free, to avoid losing more cards when they hit. I was surprised by how badly this was received. Two of the three other players (the hosts of the game) acted upset, like I had tried to cheat. I had to take the card back, get robbed the next turn and 'giving cards away for free' was banned immediately. (Oh, how I hate mid-game additions to the rules. But that's beside the point.)  So now the question: Is this really illegal in Settlers of Catan? Is it generally considered underhanded in any way? If so, why?   My reasoning was like this:        Consider players A and B.   A wants to give B a sheep.   A trades a sheep and one rock to B, in exchange for wheat.   A trades the received wheat for the (formerly his) rock.   A and B now both have the same resources they had in the beginning, only the sheep has moved from A to B. Labels and nesting gather and align