I want to play a game which uses one 10-faces dice, but I only have 6-faces &quot;classic&quot; dices at my disposal. Is it possible to approximately recover, to an arbitrary precision, a 10-faces dice probability distribution using N classic 6-faces dices and clever algorithm ? I have no clue how or even if this is remotely possible. Thanks you in advance for your kind help.
I want to get random decimal digits out of a 6-faced die.  Let's say the die is fair, with an equal probability for each outcome. (But feel free to share any consequences of that not being true, if you feel like it.)  I will represent the outcome of a die roll as a base-6 number:   In base-6 there are only 6 possible digits: $\{0,1,2,3,4,5\}$. The die has faces numbered 1 to 6. Face $f$ corresponds to digit $f-1$.   Thus, I can represent as many die rolls as I like with a base-6 number:   If the die is rolled once:   Let's say the die stopped on face $5$. The final base-6 number will be $4$.  If the die is rolled twice:   Let's say the die stopped on face $5$. And then on face $3$. The final base-6 number will be $42$.  If I roll the dice 10 times:   Let's say the die stopped sequentially on faces $5$, $3$, $4$, $6$, $2$, $3$, $3$, $3$, $2$, and $4$. The final base-6 number will be $4235122213$.    Since I want decimal digits, I need to convert to base-10.   Base-6: $4235122213$ Base-10: $44753985$   For any given number of die rolls, how many different combinations exist? If there are $r$ die rolls, the total of possible combinations is $6^r$.   $r$ rolls — $6^r$ different combinations. $0$ rolls — only $1$ combination. $1$ roll — $6$ different combinations. $2$ rolls — $36$ different combinations. $3$ rolls — $216$ different combinations. $4$ rolls — $1296$ different combinations. $5$ rolls — $7776$ different combinations. $6$ rolls — $46656$ different combinations. $7$ rolls — $279936$ different combinations. $8$ rolls — $1679616$ different combinations. $9$ rolls — $10077696$ different combinations.   $n_r$ ($\in \mathbb{N_0}$) is the number obtained after $r$ die rolls through the process described previously: "If the die is rolled once, twice, ..."  It is impossible for $n_r$ to reach the number of possible different combinations ($6^r$). It will be always short by least $1$:  $$ 0 \leqslant n_r &lt; 6^r $$   $r$ rolls — $n_r$ never surpasses $6^r-1$. $0$ rolls — $n_r$ never surpasses $0$. $1$ roll — $n_r$ never surpasses $5$. $2$ rolls — $n_r$ never surpasses $35$. $3$ rolls — $n_r$ never surpasses $215$. $4$ rolls — $n_r$ never surpasses $1295$. $5$ rolls — $n_r$ never surpasses $7775$. $6$ rolls — $n_r$ never surpasses $46655$. $7$ rolls — $n_r$ never surpasses $279935$. $8$ rolls — $n_r$ never surpasses $1679615$. $9$ rolls — $n_r$ never surpasses $10077695$.   I can never trust the leftmost nor the rightmost digit (fringe digits), since the possible values are potentially restricted.   For $0$ rolls, the outcome is always $0$. For $1$ roll, the fringe digit never surpasses $5$. For $2$ rolls, the leftmost digit never surpasses $3$, and the rightmost, $5$. For $3$ rolls, the leftmost digit never surpasses $2$, and the rightmost, $5$. For $4$ rolls, the leftmost digit never surpasses $1$, and the rightmost, $5$. For $5$ rolls, the leftmost digit never surpasses $7$, and the rightmost, $5$. For $6$ rolls, the leftmost digit never surpasses $4$, and the rightmost, $5$. For $7$ rolls, the leftmost digit never surpasses $2$, and the rightmost, $5$. For $8$ rolls, the leftmost digit never surpasses $1$, and the rightmost, $5$. For $9$ rolls, the leftmost digit never surpasses $1$, and the rightmost, $5$.   The other digits seem perfectly random to me though. Am I wrong?
In .NET, which loop runs faster, 'for' or 'foreach'? In C#/VB.NET/.NET, which loop runs faster, for or foreach?  Ever since I read that a for loop works faster than a foreach loop a  I assumed it stood true for all collections, generic collections, all arrays, etc.  I scoured Google and found a few articles, but most of them are inconclusive (read comments on the articles) and open ended.  What would be ideal is to have each scenario listed and the best solution for the same.  For example (just an example of how it should be):   for iterating an array of 1000+ strings - for is better than foreach for iterating over IList (non generic) strings - foreach is better than for   A few references found on the web for the same:               [Edit]  Apart from the readability aspect of it, I am really interested in facts and figures. There are applications where the last mile of performance optimization squeezed do matter. There was a post this morning asking about how many people disable JavaScript. Then I began to wonder what techniques might be used to determine if the user has it disabled.   Does anyone know of some short/simple ways to detect if JavaScript is disabled? My intention is to give a warning that the site is not able to function properly without the browser having JS enabled.   Eventually I would want to redirect them to content that is able to work in the absence of JS, but I need this detection as a placeholder to start. Organize desktop icons on Windows into categories or sections Classification of groups of order 12 I have a lot of difficulty understanding this proof we went over in class about classification of groups of order 12.  Let $G$ be a finite group of order $n=p^rm$ where $m \nshortmid p$.  Denote $Syl_p(G)$ as the set of all sylow p-subgroups, and $n_p(G)$ as the cardinality of $Syl_p(G)$.  (1) G has subgroups of order $p^r$. (How do we know this??)  (2) We know all sylow p-groups are conjugate and their number $n_p(G) | m$, by the 2nd and 3rd Sylow Theorems.  (3) We have that $n_p(G) \equiv 1(p). $  Then $n=12=2^2*3^1$ so $n_2(G)|3$ gives $n_2(G) \in \{1,3\}$ and $n_3(G)|4$ so $n_3(G) \in \{1,4\}$ since $2 \not\equiv 1(3)$.  Case 1: $n_3(G) = 4.$ Then the action of G by conjugation on $Syl_3(G)$ gives a homomorphism $f: G \rightarrow S_{Syl_3(G)} \simeq S_4$. $Ker(f)$ consists of $g \in G$ that normalizes all 3-Sylow subgroups. (Why?). Let $P_3$ be a 3-Sylow subgroup. Then the order of $P_3$ is 3. (I don't get that either), and $[G:N_G(P_3)] = 4.$ Thus $P_3 \subset N_G(P_3)$ gives $P_3 = N_G(P_3)$. (I'm lost here...) So $Ker(f) = \cap Syl_3(G) = \{e\}$ (the intersection of the sylow 3-subgroups is trivial. (How did we arrive here...) Thus we conclude that $G$ is isomorphic to a subgroup of $S_4$ of order 12.  To show $G$ is isomorphic to $A_4$, we have that $G$ has 8 elements of order 3: 4 3-sylow subgroups each has 3-1=2 elements of order 3. And $S_4$ has 8 3-cycles meaning f(G) contains all 3-cycles and hence the group they generate, which is $A_4$, so $A_4 \subset f(G)$. But since $|A_4| = 12 = |f(G)$ then $f(G) = A_4$ and $G \simeq A_4$. (Not understanding the first half of the proof, I do not get this part either).  Case 2: $n_3(G) = 1.$ The scope of the question is too large, I will need to post separately to understand the second half, unless the organizational rules of math.stackexchange would require that I post here. In that case, I'll edit the question.  I basically cannot follow the proof because it seems to skip too many steps; it would be helpful if anyone could elaborate case 1 with more reasoning so that I can follow it. Any help would be appreciated; I've spent hours trying to look up and decipher the proof but without any success. "I think him to be about 50" or "I think he is about 50"? Prove that formula is not tautology. Show Kripke's model proving that the following formula isn't tautology in intuitionistic logic. $ \neg ( p \wedge q ) \implies (\neg p \vee \neg q) $  Please help/hint me ;) Deep cloning objects I want to do something like:  MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone();   And then make changes to the new object that are not reflected in the original object.  I don't often need this functionality, so when it's been necessary, I've resorted to creating a new object and then copying each property individually, but it always leaves me with the feeling that there is a better or more elegant way of handling the situation.  How can I clone or deep copy an object so that the cloned object can be modified without any changes being reflected in the original object? Two Clash of Clans accounts on one device I have been playing on two clash of clans accounts on one device for a long time but just recently i cannot switch from my lvl17 to my lvl75. The switch villages option is not popping up for me and I don't know why. Can anyone help me get my main account back? Is $L^{p}$ space with alternate norm Banach? Log4Net: Programmatically specify multiple loggers (with multiple file appenders) How to (programmatically, without xml config) configure multiple loggers with Log4Net? I need them to write to different files. Let $A, B \in \mathcal M_n(\mathbb C)$, we want to know if there's any relation between their spectral radius and the spectral radius of $A + B$.  The first part of this exercise is giving examples of the three posibilities: $\rho(A) + \rho(B) &lt; \rho(A+B)$ ; $\rho(A) + \rho(B) &gt; \rho(A+B)$ and $\rho(A)+ \rho(B) =\rho(A+B)$. This part was easy because there are no conditions about A or B.  The second part is proving that if A and B are normal matrixes, (i.e. $ AA^* =A^*A$, where $A^*$ is its conjugate transpose), then $ \rho(A+B) \le \rho(A) + \rho(B) $.   So my first attempt was using the Schur's decomposition, so $A=U^{-1}D_AU$ where $D_A$ is a diagonal matrix with the eigenvalues of $A$ in its diagonal and U is an unitary matrix. Similarly, B is similar to a diagonal matrix $D_B$ with the eigenvalues of B in its diagonal. That way I have $\rho(A) = \rho(D_A)$ and $\rho(B) = \rho(D_B)$ so now since $D_A + D_B$ is a diagonal matrix with $\lambda_i + \mu_i$ for $ 1\le i \le n $, where $\lambda_i$ and $\mu_i$ are the eigenvalues of $A$ and $B$ respectively. From here it's easy to see that $ \rho(D_A+D_B) \le \rho(D_A) + \rho(D_B) $, since $ |\lambda_i+\mu_i|\le|\lambda_i|+|\mu_i| \ \forall i$. But I don't see how to include $\rho(A+B)$ in this.  And the last part of the exercise is proving that if $ \{X_i\}$ is a basis of eigenvectors, which is common to A and B, then $ \rho(A+B) \le \rho(A) + \rho(B) $.  Here's my attempt, but I would like to know if it's correct:  Let $\lambda_i$ and $\mu_i$ be eigenvalues of A and B associated to the vector $X_i$, then $AX_i=\lambda_i X_i$ and $BX_i = \mu_iX_i$, and if we sum both equalities, we have $AX_i + BX_i = \lambda_iX_i + \mu_iXi$ so $(A+B)X_i=(\lambda_i+\mu_i)X_i$ so $(\lambda_i+\mu_i)$ is an eigenvalor of $(A+B)$ associated to the eigenvector $X_i$. Then is again clear that $|\lambda_i+\mu_i|\le|\lambda_i|+|\mu_i| \le \rho(A) + \rho(B)\ \forall i$, and particularly, for $\max_i |\lambda_i+\mu_i| = \rho(A+B)$ so $ \rho(A+B)\le \rho(A) + \rho(B)$  Any kind of help is appreciated and thank you very much in advance! Imgur is over capacity - some user avatars fail to load I see a lot of 'white' avatars in the question lists, e.g.  and . Some user avatars aren't loaded, e.g.  and  – they just timeout for me. Sometimes (but not always) I do get a nice "Imgur is over capacity!" image, which I'm (rather surprisingly) able to upload to imgur - but you might not see it. To show that $2$ | $x^{2n} - x^n$, $n \in \mathbb{Z^+}$ is the following adequate? Show that $2$ | $x^{2n} - x^n$, $n \in \mathbb{Z^+}$   Let $x^n = a$ then $\frac{a}{2}$ $\implies a = 2q + r$ such that $r = 0 \vee r = 1$.   So $x^{2n} = (x^n)^2 = a^2 = (2q + r)^2$, which means that $2|[x^{2n} - x^n ]= 2| [(2q + r)^2 - (2q + r)]$. If $r = 1$ we get $(4q^2 + 4q + 1) - 2q - 1 = 4q^2 + 2q = 2(2q^2 +1)$. Thus $2$|$x^{2n} - x^n$, $n \in \mathbb{Z^+}$. Is this reasoning correct? Is it adequate? Why do universal constants have the values they do? How did Luke know where to land on Dagobah? What oil is best for seasoning a cast-iron skillet I have my local.machine, the proxy.machine and target.machine. local.machine doesn't have direct contact with target.machine, but needs to go through proxy.machine.   I want to scp a file from target.machine to local.machine. Is this possible to do with just one command from local.machine? What harm can be done with a copy of one's passport? In one of the questions on this site, it was suggested the use of  to save a backup copy of your passport, in case you need to proof who you are if your original document is lost.   I like the idea, but what if someone gets access to your Dropbox folders and is able to acquire the copy of your passport.  The same goes for when you leave a copy of your passport at a hotel receptions desk. Once someone has the info printed on that copy, would that make it easier to steal your identity? How to store lots of small text in a SQL Server database? Suppose $f:X\rightarrow Y$ is a surjection and you want to show that there exists $g:Y\rightarrow X$ s.t. $f\circ g=\mathrm{id}_Y$. You need the AC to show this.  However, suppose $f$ is a injection and you want show there is $g$ s.t. $g\circ f=\mathrm{id}_X$. Then, according to my textbook, you don't need the AC to show this.  This is counterintuitive to me, because it's like you need a special axiom to claim that an infinite product of big sets is nonempty, while you don't need one to claim that an infinite product of singleton sets is nonempty, which seems smaller than the former.  So why don't you need the AC to show the latter?  EDIT: $X$ should be nonempty.  EDIT 2: I realized (after asking this) that my question mostly concerns whether the AC is needed to say that an infinite product of finite sets is nonempty, and why.