Wikipedia:Reference desk/Archives/Mathematics/2010 November 2

From Wikipedia, the free encyclopedia
Mathematics desk
< November 1 << Oct | November | Dec >> November 3 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


November 2[edit]

Decimals in Fractions[edit]

Is it acceptable to have decimals in fractions? e.g., 2.13/4.7 I thought I remembered learning somewhere that even a non-simplified fraction must not contain decimals, a custom just as conventional as not dividing by zero. Can't find any sources one way or the other now. (Google search) 72.164.134.59 (talk) 00:54, 2 November 2010 (UTC)[reply]

There's nothing wrong with that; the expression 2.13/4.7 just means 2.13 divided by 4.7. By the way, it isn't just "conventional" that division by zero is undefined—if you tried to give it a meaningful value you would find that arithmetic doesn't work the way you want it to. —Bkell (talk) 03:50, 2 November 2010 (UTC)[reply]
I disagree that division by zero is not a convention. We could easily do all math on the Riemann sphere if we so chose. 70.26.152.11 (talk) 23:45, 2 November 2010 (UTC)[reply]
I disagree. I'm all for using the Riemann sphere, or the real projective line. You might have a case that working mostly with real numbers rather than these compactifications is a convention. I'm not so sure about the "easily" - the rules of arithmetic there have quite a few caveats relative to reals. The impossibility of division by zero in reals, and the peculiarities of the structures which allow it, result from the very nature of division and of zero. Comparing it with grade school teacher whims like using only integers in fractions is downright insulting. -- Meni Rosenfeld (talk) 09:23, 3 November 2010 (UTC)[reply]
Division by zero being undefined is "conventional" inasmuch as every definition is at some level simply a convention. However, I would say calling division by 0 "conventional" breaks the connotations of the word, particularly that conventions are usually small notational conveniences, and that division by zero is not in the same league of simplicity as writing fractions with whole numbers. 67.158.43.41 (talk) 09:53, 3 November 2010 (UTC)[reply]
It's sometimes odd not to simply convert a decimal divided by something into a single decimal, perhaps rounding depending on how you're handling the significant figures. Fractions are sometimes written as a/b for whole numbers a and b to preserve their meaning or accuracy. For instance, if I said the probability of rolling 1 three times in a row with a fair die is about 0.00462963, that's much less accurate and less elucidating than 1/216. As a rule of thumb, decimals don't tend to have such nice combinatorial interpretations--they're just numbers, so you may as well write them as such. 67.158.43.41 (talk) 04:38, 2 November 2010 (UTC)[reply]
And of course if you decide you don't want the decimals, you can always multiply top and bottom by a suitable factor of ten. EG 213/470. -- SGBailey (talk) 10:32, 2 November 2010 (UTC)[reply]
Or perhaps even a power of ten. -- 119.31.126.67 (talk) 11:32, 2 November 2010 (UTC)[reply]
yeah. -- SGBailey (talk) 21:56, 2 November 2010 (UTC)[reply]

Dice Probability[edit]

If I roll P (ordinary 6-sided) dice, and my opponent rolls Q similar dice, what are the odds of me a) winning? b) drawing with him?

Not homework, I'm trying to improve my playing of Dicewars

 Rojomoke (talk) 14:33, 2 November 2010 (UTC)[reply]
What is the rule for determining the winner?—Emil J. 14:42, 2 November 2010 (UTC)[reply]
First, I assume by `winning' you mean rolling a higher sum of pips. In any case, it will be easier to think of your answer as a probability rather than odds. The general result can be worked out as follows. What is the expected_value of one D6?(Hint, it is not 3, you can follow the worked example on our expected value article) By linearity of the mean, the expected value of the sum is the sum of expected values. If you want to get good at dicewars, you should invest the time to finish it off from here yourself :) SemanticMantis (talk) 14:47, 2 November 2010 (UTC)[reply]
I think you should first look at Dice#probability, from which the answer can be derived. The answer should be the probability the roll of (P + Q) dice is greater than 6Q. E.g. if you have two dice, your opponent has one, P + Q is 3, and the chance of you winning is the same as rolling over six with these three dice. A roll of exactly six would be a draw. And so on.--JohnBlackburnewordsdeeds 14:51, 2 November 2010 (UTC)[reply]
John, I think your description only works for the probability of an assured win, i.e. no roll of Q can beat the the given roll of P. If this is the win condition of dicewars, fine, but otherwise the OP should consider theconditional_probability for a case-by-case analysis. You'll end up getting the probability of winning by summing over all conditional winning probabilities, conditioned on of each throw of Q dice.SemanticMantis (talk) 14:57, 2 November 2010 (UTC)[reply]
My math was a bit wrong. It should be the probability (P+Q) dice is more than 7Q, or equal for a draw.--JohnBlackburnewordsdeeds 15:19, 2 November 2010 (UTC)[reply]
E.g. consider the simplest case, 2 dice vs. 1 die. You win if the score of your two dice is greater than your opponents one. The distribution of the probability of (your roll - his roll) will look like the graph on the right, except instead of going from 2 to 18 it goes from -5 to 11, so is shifted by seven. You win if your winning margin is greater than zero, equivalent to seven on this graph. You shift by seven for every dice your opponent has, hence the 7Q (you may have to click through to see it, the SVG to PNG converter doesn't seem to be working right now).--JohnBlackburnewordsdeeds 15:30, 2 November 2010 (UTC)[reply]
I think that the assumption that the goal is to have the sum of your dice exceed the opponents dice is wrong. Looking at the game, it appears to be designed like Risk. You roll your dice. The opponent rolls his. Your highest value is compared to his highest value. The one with the lower value loses. Then, your next highest value is compared to his next highest value - and so on. Ties are considered a push - neither die is killed. -- kainaw 17:26, 2 November 2010 (UTC)[reply]
I don't think so (and I've played this game many times before). As far as I can tell it is totalling the two dice totals, and you win if your total is more than your opponents. If they are the same, or if your total is less, you lose as in you do not gain the territory. It's the numeric values of the totals that matter every time. Play it a lot and you get a feel for the probabilities, and the dice rolls do seem completely random, though the play isn't: they gang up on a stronger competitor, and will hold off attacking weaker ones, but won't hold off attacking you.--JohnBlackburnewordsdeeds 18:14, 2 November 2010 (UTC)[reply]
If it's indeed the total that counts, then the probabilities of winning for P and Q from 1 to 10 (rounded to 1/10000) are:
0.4166	0.0925	0.0115	0.0007	0	0	0	0	0	0
0.8379	0.4436	0.152	0.0358	0.0061	0.0007	0	0	0	0
0.9729	0.7785	0.4535	0.1917	0.0607	0.0148	0.0028	0.0004	0	0
0.9972	0.9392	0.7428	0.4595	0.2204	0.0834	0.0254	0.0063	0.0013	0.0002
0.9998	0.9879	0.9093	0.718	0.4636	0.2424	0.1036	0.0367	0.0109	0.0027
0.9999	0.9982	0.9752	0.8839	0.6996	0.4667	0.2599	0.1215	0.0481	0.0163
1	0.9998	0.9946	0.9615	0.8623	0.6851	0.4691	0.2743	0.1373	0.0593
1	0.9999	0.999	0.9895	0.9477	0.8438	0.6734	0.471	0.2864	0.1515
1	0.9999	0.9998	0.9976	0.9833	0.9343	0.8278	0.6637	0.4727	0.2967
1	0.9999	0.9999	0.9995	0.9954	0.9763	0.9217	0.8137	0.6554	0.474
The probabilities for a draw are:
0.1666	0.0694	0.0154	0.0019	0.0001	0	0	0	0	0
0.0694	0.1126	0.0694	0.0248	0.0059	0.001	0.0001	0	0	0
0.0154	0.0694	0.0928	0.0654	0.0299	0.0098	0.0024	0.0004	0	0
0.0019	0.0248	0.0654	0.0809	0.0614	0.0326	0.013	0.004	0.001	0.0002
0.0001	0.0059	0.0299	0.0614	0.0726	0.0579	0.0339	0.0155	0.0057	0.0017
0	0.001	0.0098	0.0326	0.0579	0.0665	0.0548	0.0346	0.0174	0.0072
0	0.0001	0.0024	0.013	0.0339	0.0548	0.0617	0.0521	0.0347	0.0189
0	0	0.0004	0.004	0.0155	0.0346	0.0521	0.0578	0.0498	0.0346
0	0	0	0.001	0.0057	0.0174	0.0347	0.0498	0.0545	0.0477
0	0	0	0.0002	0.0017	0.0072	0.0189	0.0346	0.0477	0.0518
For example, if there's a probability of 77.85% to win, 6.94% to draw and 15.2% to lose. -- Meni Rosenfeld (talk) 20:10, 2 November 2010 (UTC)[reply]


Meni's brute force calculation can be approximated by using the normal distribution like this.

  1. The expected value of pips by throwing one dice is (1+2+3+4+5+6)/6 = 7/2.
  2. The variance is ((1−7/2)2+(2−7/2)2+(3−7/2)2+(4−7/2)2+(5−7/2)2+(6−7/2)2)/6 = 35/12.
  3. When you throw P dice the expected number of pips is 7P/2 and the variance is 35P/12.
  4. When your opponent throw Q dice the expected number of pips is 7Q/2 and the variance is 35Q/12.
  5. You are ahead by X pips which is of course an integer.
  6. The expected value of X is μ = 7(PQ)/2 pips but the variance is σ2 = 35(P+Q)/12.
  7. You win when X>1/2 and you draw when −1/2<X<1/2.
  8. The variable (X−μ)/σ has expected value 0 and variance 1 and is approximately normally distributed.

a) The approximate probability of winning is

b) The approximate probability of drawing with him is

where and the error function erf is used for computing the Q-function.

Meni's example, P=3 and Q=2, gives that the approximate probability of winning is (1+erf((3 sqrt(6/7))/5))/2 = 0.7839, and the approximate probability of drawing is (erf((4 sqrt(6/7))/5)-erf((3 sqrt(6/7))/5)))/2 = 0.0686 (computed by http://www.wolframalpha.com ).

These approximations are close to Meni's results, even if P and Q are small numbers. Bo Jacoby (talk) 10:40, 3 November 2010 (UTC).[reply]

Thanks to Taemyr for improving the above text. I continued the improvement. Bo Jacoby (talk) 23:20, 3 November 2010 (UTC).[reply]

Johns answer further up is correct. Let Dice(X) denote a result from rolling X dices. Since the probability distribution of Dice(X) is symetric with min X and max 6*X we have that Dice(1) has the same probability distribution as 7-Dice(1), more importantly Dice(X) has the same probability distribution as 7*X-Dice(X).
The result we are looking for is Dice(P)-Dice(Q)>0.
By the above Dice(P)-Dice(Q) will have the same probability distribution as Dice(P)-(7*Q-Dice(Q))=Dice(P)+Dice(Q)-7
Hence we are looking for the probability of getting more than 7*Q on all dices involved.
Taemyr (talk) 19:01, 3 November 2010 (UTC)[reply]

Use this matrix identity??[edit]

It can be shown that Use this matrix identity to simplify
It can of course be done from scratch but how do you use the matrix identity?--115.178.29.142 (talk) 21:39, 2 November 2010 (UTC)[reply]

I can interpret the instructions two different ways. I think the second way makes more sense. (1) You can use the distributive law to expand and simplify the expression you are given. When you do this, you will multiply the matrix with itself, so you can use the given matrix identity to simplify this. (2) The matrix identity draws attention to a particular property of that matrix, namely, that it's square is -1. Use this insight to find a clever way to simplify the given expression. Eric. 82.139.80.73 (talk) 21:55, 2 November 2010 (UTC)[reply]
I probably should give a slightly bigger hint. What more familiar number has a square of -1? Then keep in mind that what is important about a number is not how you write it down or whether you call it a "matrix" or whatnot, but how it behaves. Eric. 82.139.80.73 (talk) 22:20, 2 November 2010 (UTC)[reply]
Thanks!--115.178.29.142 (talk) 22:39, 2 November 2010 (UTC)[reply]
I agree that this answer is true, but it is debatable whether it is sufficient. Handwavy arguments about "how it behaves" are tricky: be careless, and you might end up proving because they behave the same. For example, here's a naive objection: matrix multiplication is not in general commutative -- are you sure that the properties of C you use in your calculation depend only on but not ? If I were marking the answer, I'd expect some sort of explicit argument that an appropriate set of matrices are isomorphic to C, as justification of moving back and forth between them.
(Also, I think it sounds strange to be asked to "simplify" an expression with no variables in it. Usually one would simply speak of "evaluating" it). –Henning Makholm (talk) 23:25, 2 November 2010 (UTC)[reply]
Right. My goal was more to intuitively motivate the answer, but to formally justify this we would do something like embed C in the ring of two-by-two real matrices in the appropriate way. Of course by that point, it's easier to just do the computations. Hopefully the OP will not handwave on the actual set. Eric. 82.139.80.73 (talk) 07:28, 3 November 2010 (UTC)[reply]
Personally, I'd accept a very brief justification if I were grading. Something like...
"We see
so a subset of 2x2 real matrices is [ring] isomorphic to C (the additive isomorphism is trivial). Therefore... (insert above string of equalities here)"
It lets me (grader) know you (student) know what's going on without wasting my time with a long-winded but very easy argument. I think this would be faster for me than cubing the above directly, if I had instantly noticed the isomorphism. If the argument were at all unusual or difficult, more justification would be appropriate. (It seems to me the OP could trivially come up with the subset, otherwise I wouldn't have implied it.) 67.158.43.41 (talk) 09:45, 3 November 2010 (UTC)[reply]
For this specific calculation you really only need to go so far as to note that and commute, which is obvious since the identity commutes with everything. Rckrone (talk) 04:44, 4 November 2010 (UTC)[reply]
You mean to apply the binomial theorem, since the terms commute? Perhaps that would be quicker; uglier, I'd say, but less writing--two lines, if you're terse. 67.158.43.41 (talk) 16:43, 4 November 2010 (UTC)[reply]
No I don't mean to explicitly write out the terms of the expansion. Once you address commutativity (or alternatively note that the expression is a polynomial in ) then there are no obstacles to treating that matrix (in this calculation) as if it were the imaginary unit. Rckrone (talk) 22:29, 4 November 2010 (UTC)[reply]

Peano axioms[edit]

In a weakened version of the Peano axioms without multiplication, is it still possible to express the formula x=yz? Would these axioms be Gödel-incomplete, or is multiplication necessary to state any unprovable propositions? In the Peano axioms with multiplication, is it possible to express x=yz? 70.26.152.11 (talk) 23:53, 2 November 2010 (UTC)[reply]

A formalization of one such weakened arithmetic is called Presburger arithmetic. In such a system, for free variables x, y, and z, it is not possible to express the relation x=y*z. If multiplication by a constant is used as shorthand for repeated addition, so that y+y=2*y, then it is possible to express for free variables x and y that x = y+y = 2*y. The article describes details of decidability in this system. Black Carrot (talk) 01:03, 3 November 2010 (UTC)[reply]
Thanks, that's exactly what I was looking for. 70.26.152.11 (talk) 04:02, 3 November 2010 (UTC)[reply]
For the second question: Yes, because integer exponentiation is primitive recursive and Gödel showed that every primitive recursive function is definable in the Peano arithmetic. This makes use of a trick (Gödel's β function) to quantify over all finite sequences of integers with finitely many quantifiers. –Henning Makholm (talk) 06:48, 3 November 2010 (UTC)[reply]

In Peano arithmetic#Arithmetic, it says "Addition is the function + : N × N → N (written in the usual infix notation), defined recursively as:" Should "N × N" be "N + N" ? -- SGBailey (talk) 10:10, 3 November 2010 (UTC)[reply]

No. The × denotes cartesian product: N × N is the set of ordered pairs of natural numbers. I've no idea what your "N + N" could mean. Algebraist 10:16, 3 November 2010 (UTC)[reply]
My only guess is that they took the "recursive" definition in a very non-standard way, thinking to use + inside it's domain's definition. I'm curious, what did you mean by "N + N", SGBailey? (I don't mean to call out a mistake; I'm genuinely curious what you were thinking, even if you don't believe it anymore.) 67.158.43.41 (talk) 12:41, 3 November 2010 (UTC)[reply]
Both Addition and Multiplication weredefined as "N × N" and it just seemed unlikely to me that they'd be the same. -- SGBailey (talk) 16:04, 3 November 2010 (UTC)[reply]
They are not defined as "NxN" they are both defined as functions "N x N → N". Meaning they are both functions that take two natural numbers and return one natural number, and so far they are the same. The definition then goes on with "defined recursivly as:" and the stuff after that tells us the difference between + and *. Taemyr (talk) 17:13, 3 November 2010 (UTC)[reply]
Perhaps you're sort of confusing the notation with the notation , which are superficially similar, but mean very different things. The second notation has the meaning Taemyr describes, where the N x N part is specifying the domain of the function and the N is specifying the codomain, with the arrow being the conventional delimiter between the two. This notation also explicitly names the function using the symbol "+", where the colon is another delimiter between the function name and the domain. In more formal usage one applies + like any function, i.e. with +(n, m). The first notation is describing a (so far anonymous) function mapping n to twice n. The domain and codomain aren't specified. This is less formal but often clearer when context supplies the domain, codomain, and definition of any symbols used (like +, which must already be defined for the first notation to make sense).
Thanks for satisfying my curiosity. I find it helpful for future explanations to hear a variety of misconceptions. Misconceptions also often give an interesting new perspective on things, which can sometimes be repaired to give real insight. 67.158.43.41 (talk) 18:08, 3 November 2010 (UTC)[reply]
It's interesting to note that the two notations mentioned by 67 are usually used together. For example, the real function that squares any number can be given the name f rigorously and concisely using the notation . -- Meni Rosenfeld (talk) 19:56, 3 November 2010 (UTC)[reply]
Though if you've the function a name, it's just as easy to write .—Emil J. 12:24, 4 November 2010 (UTC)[reply]
In similar contexts N + N can mean the disjoint union of two copies of N. Doesn't make much sense here, though.—Emil J. 13:36, 3 November 2010 (UTC)[reply]
The disjoint union of two copies of one set works only for the empty set, so the number of applications for that seems to be very limited. I've seen (and usually) use for the disjoint union of N and M. --Stephan Schulz (talk) 17:28, 3 November 2010 (UTC)[reply]
Any two sets have a disjoint union, whether or not the sets are disjoint, or even different. Disjoint union means the union of disjoint copies of the original sets, constructed for the purpose. Algebraist 17:36, 3 November 2010 (UTC)[reply]
Aha! I was only aware of the second definition in the article. Thanks. --Stephan Schulz (talk) 18:13, 3 November 2010 (UTC)[reply]