For all integers $x$ and $y$, if $ x^3 + x = y^3 + y$ then $x = y$.
Proof: For all integers $x$ and $y$, if $x^3+x = y^3+y$ then $x = y$
I've tried searching for this question but couldn't find it on stackexchange. This is a common type of interview question; I ran into it doing brain teasers on a probability puzzles app, and if you fine people agree with my logic, I will inform the app developer that his/her answers are incorrect.   The problem is essentially this:  You are sentenced to death for thievery. The King is magnanimous and decides to put your fate in the hands of chance. You are given $100$ white marbles and 100 black marbles, and $2$ urns. The king will choose an urn at random and pull out a single marble at random; if the marble is white, you live, if its black, you die. If you place the marbles in the best way possible, what is your probability of survival?  I started with the base case: $100$ white marbles in one urn, $100$ black marbles in the other. This comes down to a $50$-$50$ chance of survival. I then worked my way to deciding that placing $1$ white marble in one urn and $99$ white marbles + $100$ black marbles in the other urn would be the "best way possible", which yields the following:  $$P(\text{Survival}) = \frac{1}{2}(1+\frac{99}{199}) \approx .749$$  Selecting $1$ of $2$ urns at random gives $\frac{1}{2}$, the urn containing $1$ marble gives $1$, and the other that contains $99$ white marbles and $100$ black marbles gives $\frac{99}{199}$ because there are $99$ possible white marbles to select out of $199$ total marbles.  The app claims that the correct answer is $\frac{1}{2}(1+\frac{99}{200}) \approx .748$   I see where the $200$ comes from, but I do not think it is right to say that there are $200$ marbles in the other urn. Who is correct? Where did the age go on the network profile? Ever since the profile redo, the age was shown in the network profile, but not in the per-site profiles. So if someone wanted to see the age, they had to go to the network profile. However.. It's vanished! The field is still there in the profile editing, however. It doesn't appear as if this was implemented:   So... Where is it? $\dfrac{pq}{r}+\dfrac{qr}{p}+\dfrac{pr}{q}\in\Bbb Z\,\Rightarrow\, \dfrac{pq}{r},\dfrac{qr}{p},\dfrac{pr}{q}\in\Bbb Z$ Let $p,q,r$ be integers such that the symmetric sum of fractions $\dfrac{pq}{r}+\dfrac{qr}{p}+\dfrac{pr}{q}$ is an integer. Prove that each of the numbers: $\dfrac{pq}{r},\dfrac{qr}{p},\dfrac{pr}{q}$ is an integer. How to do this? Someone posted but deleted soon. I have a function with the same name, but with different signature in a base and derived classes. When I am trying to use the base class's function in another class that inherits from the derived, I receive an error. See the following code:  class A {     public:     void foo(string s){}; };  class B : public A {     public:     int foo(int i){}; };  class C : public B {     public:     void bar()     {         string s;         foo(s);     } };   I receive the following error from the gcc compiler:  In member function `void C::bar()': no matching function for call to `C::foo(std::string&amp;)' candidates are: int B::foo(int)   If I remove int foo(int i){}; from class B, or if I rename it from foo1, everything works fine.   What's the problem with this? How to shop for mortgage rates ? I have already been prequalified with 3.8% (but I am sure I can do better :)). Now, I am about to make an offer on a house. So, once the seller accepts my offer, how do I rate shop ?    Do I need to do the rate shopping before making an offer, or after the seller accepts my offer ?  When the seller accepts my offer, then I will go to a banker and submit a full application, so will it be legally binding for me to go with the approved mortgage application ?  Or, once the seller accepts my offer, may I simultaneously apply for a mortgage with 3-4 bankers, and then choose the lowest rate ?     I asked my realtor, but she recommends to go with just one banker (her friend), and not to do any rate shopping. Is it the right way ?   (I live in a state of Arkansas, so I am thinking of going with the local bankers) Is there a standard function in C that would return the length of an array? When does Hamiltonian equals to energy of the system? Grant Select on a view not base table when base table is in a different database I have a view which is selecting rows from a table in a different database.  I'd like to grant select access to the view, but not direct access to the base table.  The view has a where clause restricting the number of rows.  Can I grant select to the view and not the base table, or do I need to switch to a stored procedure? I would rather not do it the latter way. Manually calculated $R^2$ doesn't match up with randomForest() $R^2$ for testing new data I know this is a fairly specific R question, but I may be thinking about proportion variance explained, $R^2$, incorrectly. Here goes.  I'm trying to use the R package randomForest. I have some training data and testing data. When I fit a random forest model, the randomForest function allows you to input new testing data to test. It then tells you the percentage of variance explained in this new data. When I look at this, I get one number.  When I use the predict() function to predict the outcome value of the testing data based on the model fit from the training data, and I take the squared correlation coefficient between these values and the actual outcome values for the testing data, I get a different number. These values don't match up.   Here's some R code to demonstrate the problem.  # use the built in iris data data(iris)  #load the randomForest library library(randomForest)  # split the data into training and testing sets index &lt;- 1:nrow(iris) trainindex &lt;- sample(index, trunc(length(index)/2)) trainset &lt;- iris[trainindex, ] testset &lt;- iris[-trainindex, ]  # fit a model to the training set (column 1, Sepal.Length, will be the outcome) set.seed(42) model &lt;- randomForest(x=trainset[ ,-1],y=trainset[ ,1])  # predict values for the testing set (the first column is the outcome, leave it out) predicted &lt;- predict(model, testset[ ,-1])  # what's the squared correlation coefficient between predicted and actual values? cor(predicted, testset[, 1])^2  # now, refit the model using built-in x.test and y.test set.seed(42) randomForest(x=trainset[ ,-1], y=trainset[ ,1], xtest=testset[ ,-1], ytest=testset[ ,1]) How to move from screen 1 to screen 3 by moving cursor to the left and vice versa? If I have to move the mouse from the left screen all the way to the right screen, the distance is quite big.   Is there a way to virtually connect the sides of the screen as if they were arranged in a circle? I could then move from the left screen to the right screen, by simply moving the cursor to the left. Does an absolutely integrable function tend to $0$ as its argument tends to infinity? Suppose that $f:[0,\infty)\rightarrow\mathbb{R}$ is continuous. Is it true that   $$\int_{0}^\infty|f(t)|dt&lt;\infty\Rightarrow \lim_{t\rightarrow\infty}f(t)=0?$$  If so can you provide a proof, otherwise a counter example. Thank you. Explanation of finite correction factor Derivative (or differential) of symmetric square root of a matrix Let A be a square, symmetric, positive-definite matrix.  Let S be its symmetric square root found by a singular value decomposition.  Let vech() be the half-vectorization operator.  Is there a convenient expression for the derivative (or differential) of vech(S) with respect to vech(A)?  I know the expression for an inverse, which is sort of like a matrix version of the power rule.  Would this approach work for a symmetric square root as well (i.e., (1/2)S^(-1/2))? Can it be proven in $\sf ZF^{\neg\infty}$ that the sets $x_n=\{x_{n+1}\}$ do not exist? I have a Canon 550D with 70-200 f4 and 50mm prime lenses. Although the camera has built-in 9 focal points, I sometimes face a strange problem. Here's a sample photo:    In reference to the above pic, you can see that both of the faces are NOT in focus. I used 70-200 f4 for this shot at max aperture. Still, I couldn't get both of them in focus. Why? I also try decreasing the aperture to attain a greater DoF but still, I couldn't get both of them into focus.  Another thing: Although the cam has 9 focal points, why can't I use all of them to focus, say, 9 points in a portrait shot? In manual mode, it has the option to select one of the 9 focal points. And in auto mode, it sometimes select more than one focal points.  This is just an example image. I've faced this problem zillions of times. The problem with reputation: does high reputation attract too many upvotes? It's not that I feel bitter when somebody else's answer is upvoted above my own, but it's when a user with a high rep answers a question and their answer seems to attract an immediate barrage of upvotes.  Now I'm not saying that these votes are always unwarranted, but by simply observing this behavior, I think the system seems flawed.    The concept of reputation (or at least one of the concepts) is to give users a sense of trust in the reputed user's answers.  But this should be trust, not blind faith.  I know that this problem doesn't exist for every question asked on SO, but it's definitely present.  I'm sure this is a contentious question, as it might seem overly critical, but does anybody else agree with me and, if so, does anybody have any thoughts on how this problem could be alleviated? It's a great shame when a new or less active user's answer is stifled by the reputation-rich user's answer. Given Newton's third law, why are things capable of moving? Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction? How to restore file copy / transfer status window? How can I write the name show in axis of 3D array using TiKz I am drawing a 3D array like the attached picture, which actually describes a multidimensional array. However, I can not put the name of the axis and take the value from the matrix like the attached picture.  This is the code that I have:  \documentclass[margin=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{matrix,calc}  \begin{document} \begin{tikzpicture}[every node/.style={anchor=north east,fill=white,minimum width=1.4cm,minimum height=7mm}] \matrix (mA) [draw,matrix of math nodes] { (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ };  \matrix (mB) [draw,matrix of math nodes] at ($(mA.south west)+(1.5,0.7)$) { (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ };  \matrix (mC) [draw,matrix of math nodes] at ($(mB.south west)+(1.5,0.7)$) { (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ (1,1,3) &amp; (1,1,3) &amp; (1,1,3) &amp; (1,1,3) \\ };  \draw[dashed](mA.north east)--(mC.north east); \draw[dashed](mA.north west)--(mC.north west); \draw[dashed](mA.south east)--(mC.south east); \end{tikzpicture}   \end{document} Prove that Gauss map on M is surjective