How to proof that RandomSearch is better than GridSearch with mathematics?
Practical hyperparameter optimization: Random vs. grid search
This is the proof from the book:     Theorem. There are infinitely many primes of the form $4n+3$.    Lemma. If $a$ and $b$ are integers, both of the form $4n + 1$, then the product $ab$ is also in this form.  Proof of Theorem: Let assume that there are only a finite number of primes of the form $4n + 3$, say  $$p_0, p_1, p_2, \ldots, p_r.$$ Let $$Q = 4p_1p_2p_3\cdots p_r + 3.$$ Then there is at least one prime in the factorization of $Q$ of the form $4n + 3$. Otherwise, all of these primes would be of the form $4n + 1$, and by the Lemma above, this would imply that $Q$ would also be of this form, which is a contradiction. However, none of the prime $p_0, p_1,\ldots, p_n$ divides $Q$. The prime $3$ does not divide $Q$, for if $3|Q$  then $$3|(Q-3) = 4p_1p_2p_3\cdots p_r,$$ which is a contradiction. Likewise, none of the primes $p_j$ can divides $Q$, because $p_j | Q$ implies $p_j | ( Q - 4p_1p_2\cdots p_r ) = 3$, which is absurd. Hence, there are infinitely many primes of the form $4n +3$.   END  From "however, none of the prime ...." to the end, I totally lost!    My questions:   Is the author assuming $Q$ is prime or is not? Why none of the primes $p_0, p_1,\ldots, p_r$ divide $Q$? Based on what argument?     Can anyone share me a better proof?     Thanks. Does a percentage quantity take singular or plural verb agreement? Does a percentage require a singular or plural verb, for example, do we say ten percent "go" or "goes"? There are no book recommendations for Astrophysics here. I will write my own answer, but I am also interested in what are others' views on the question (I will NOT mark my own answer as the best one). What are the functions that are their own inverse?  (thus functions where $ f(f(x)) = x $ for a large domain)  I always thought there were only 4:  $f(x) = x , f(x) = -x , f(x) = \frac {1}{x} $ and $ f(x) = \frac {-1}{x} $   Later I heard about a fifth one     $$f(x) = \ln\left(\frac {e^x+1}{e^x-1}\right) $$ (for $x &gt; 0$)  This made me wonder are there more? What are conditions that apply to all these functions to get more, etc. Naming threads and thread-pools of ExecutorService What am I doing wrong? Joint Density of sum of random variables! So, I have this question:    And, what I have tried so far is I let $z_1 = \frac{X + Y}{2}$ and let $z_2 = \frac{X - Y}{2}$ to use change of variables for this question. However, when I work this out and plug it into my joint distribution of $X$ and $Y$ above, I end up with the $z_2$ disappearing and only having $z_1$ left in my joint distribution of $z_1$ and $z_2$. So, then when I go to find the marginal for just $z_1$ (which is $\frac{X + Y}{2}$ &lt;- what I am looking for), there is no $z_2$ therefore, integrating wrt to $z_2$, I get $z_2$ just come up (integral of 1). This is an issue because the bounds are from 0 to $\inf$. Obviously, I can't have infinite in my marginal density so what am I doing wrong?   Also, for question 5, I work it out similarly except I let $z_2 = X$ but I just end up with the exact same density as $f_{x,y}$ as seen in question 4 - is that normal? Please help, I been doing this question for a long time trying various dummy transformations.  Also, for question 4, I found the marginals of $x$ and $y$ and realized that the independence consequence (of the product being equal to the joint) is satisfied but using convolution, I get the same issue of my integral coming out to infinite! Thank you for all the help!   EDIT: Am I doing my bounds wrong? the bound for z_2 is from 0 to inf or 0 to z_1? How to control your iPad with your Mac remotely? I would like to know, is there a way to control your iPad with your Mac remotely (be able to see and manipulate iPad's desktop on your Mac)? I know that with the TeamViewer or other programs you can control your Mac with your iPad but not vice versa. Integrate $$\displaystyle \int_{0}^{\pi}{\frac{x\cos{x}}{1+\sin^{2}{x}}dx}$$ Is there a way to monitor an SSD state and predict its failure in case of active read-write usage? As far as I know, the only con against switching to an SSD except its price is the tendency to fail soon (relatively to conventional HDDs) in case used in active read-write operation. Is there an efficient way to predict the failure? Finding Elevation Change, any method So, I think it'd be cool - for goal setting for example - if I could keep track of my elevation change.  The problem is, the local cyclocomputers I looked at seem to use barometric pressure to determine the change.  This is fine, unless some weather is moving in, which happens not infrequently in the Midwestern United States.  Or do some of them try to use an inclinometer, your speed, and some math you learn in Calculus II to keep track of your change?  That would seem more accurate!  I could try to use a GPS meter, but those things are expensive -  and based on back when I had service to my smart phone, not guaranteed to match my car's odometer for distance even - I've read from some other riders that the distance varies at least slightly from local measurement on a bike as well.   Alternatively, let's say that I ride along a known route.  Is there any good way of plotting that route for elevation change?  Thanks! LSTM : shape of tensors? I'm trying to understand LSTM, using for instance   I get the overall idea, I guess. But I'm not quite sure I get the maths.  I'll set a very simple problem : I have a sequence of numbers and want to predict next number.   So x_t is of shape (1), and as I understand, h_t will be the prediction, so it should also be of shape (1). (I'm just here ignoring batch size)  Now, the equation producing h_t, using * operation should then have two operands of the same size as the result; that is, C_t and o_t should also be of shape (1).  Following on that idea, equation producing C_t forces also shape of (1) for f_t, i_t and ~C_t.  So... everything reduced to scalar real numbers in that case ?  what am I getting wrong ? because this would just not be able to learn much, would it ? Bread and butter is/are my breakfast? Bread and butter (is or are) my breakfast?  And what's the difference between the above sentence and saying "My breakfast is bread and butter"?  Thanks. Take the function  $$ \begin{cases}f(x,y)=(x^2+y^2)/\sin(\sqrt{x^2+y^2}) &amp; \text{when } 0&lt;\lvert (x,y)\rvert&lt;\pi\\   0 &amp; \text{when } (x,y)=(0,0) \end{cases}$$  I got that this function is differentiable at $(0,0)$. I calculated the partial derivatives at $(0,0)$ of which both were $0$ and trying to show the definition of differentiability is not satisfied but I keep getting that it is. Plz help. iOS App stuck in 'Loading...' I tried downloading Tumblr yesterday but it never completed. At the moment I have an App icon stuck at 'Loading...'.  I have tried restarting the iPhone (holding down both home and side buttons at the same time) and I have also tried shutting down the iPhone (holding the side button and swiping).  I have also tried deleting it as usual (holding the icon down and choosing delete but it doesn't go away).  Any ideas on what I can do to get rid of this icon? Equivalent of "former" and "latter" for more than 2 items Former and latter are valid only when there are two choices.  If I have a list of more than two items, is there an elegant way to say the first one or the last one? Should methods in a Java interface be declared with or without a public access modifier? Should methods in a Java interface be declared with or without the public access modifier?  Technically it doesn't matter, of course. A class method that implements an interface is always public. But what is a better convention?  Java itself is not consistent in this. See for instance Collection vs. Comparable, or Future vs. ScriptEngine. Export cycles material to unity I have been experiencing an issue that once I have a material created and looking the way I want it, I cannot seem to export it correctly with the textures mixed.  I don't know the correct words to use, but in blender I have the material created using the nodes editor, and I have placed two textures inside of there (one for the rock texture and one for moss, my object is a rock). When I export this model and import to Unity (the game engine I am using), I find a materials folder but the material inside of it does not have the textures assigned, it's just a plain white material?  How can I export my material from blender in a way that it will allow me to import it WITH TEXTURES into Unity? Show $\sum\limits_{n=0}^{\infty}{2n \choose n}x^n=(1-4x)^{-1/2}$ How do you prove that $\sum\limits_{n=0}^{\infty}{2n \choose n}x^n=(1-4x)^{-1/2}$? I tried to identify the sum as a binomial series, but the $4$ and the $-1/2$ puzzle me. (This series arises in studying the first passage time of a simple random walk.) Difference between Loading a class using ClassLoader and Class.forName How does SO's (or other SE sites) versioning work of questions and answers? Do they use some standard piece of code or is it something homebrew?  With versioning I meant if for example a question is edited you'll see all the changes (a diff).