Jump to content

Wikipedia:Reference desk/Mathematics: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
rmv as there were no questions asked on this day
→‎January 6: delete empty date
Line 73: Line 73:
*::It seems to me that the parameter <math>t</math> of <math>A(t)</math> with respect to which the derivative is taken is meant to range over <math>\mathbf{R}.</math> &nbsp;--[[User talk:Lambiam|Lambiam]] 00:26, 9 January 2021 (UTC)
*::It seems to me that the parameter <math>t</math> of <math>A(t)</math> with respect to which the derivative is taken is meant to range over <math>\mathbf{R}.</math> &nbsp;--[[User talk:Lambiam|Lambiam]] 00:26, 9 January 2021 (UTC)
*:::Yes, the chain rule implies that d/dt ln(A(t)) = Dln(A)(A'(t)) where Dln(A) is the derivative considered as a map from M<sub>nn</sub> to M<sub>nn</sub>. So knowing one is equivalent to knowing the other. Note that, by the above series for exp(A), you can write Dexp(A) = I + (ad<sub>L</sub>(A)+ad<sub>R</sub>(A))/2 + (ad<sub>L</sub><sup>2</sup>(A)+ad<sub>L</sub>(A)ad<sub>R</sub>(A)+ad<sub>R</sub>(A)<sup>2</sup>)/6 +... where ad<sub>L</sub> is the map U→AU and ad<sub>R</sub> is the map U→UA. Similarly, I think you can get a series expression for Dln(A) when A is close to I, but it would be more complicated. I don't know if [[Derivative of the exponential map]] (linked above) is relevant here because the domain of exp in that context is a Lie algebra, it might be applicable though. --[[User:RDBury|RDBury]] ([[User talk:RDBury|talk]]) 04:23, 9 January 2021 (UTC)
*:::Yes, the chain rule implies that d/dt ln(A(t)) = Dln(A)(A'(t)) where Dln(A) is the derivative considered as a map from M<sub>nn</sub> to M<sub>nn</sub>. So knowing one is equivalent to knowing the other. Note that, by the above series for exp(A), you can write Dexp(A) = I + (ad<sub>L</sub>(A)+ad<sub>R</sub>(A))/2 + (ad<sub>L</sub><sup>2</sup>(A)+ad<sub>L</sub>(A)ad<sub>R</sub>(A)+ad<sub>R</sub>(A)<sup>2</sup>)/6 +... where ad<sub>L</sub> is the map U→AU and ad<sub>R</sub> is the map U→UA. Similarly, I think you can get a series expression for Dln(A) when A is close to I, but it would be more complicated. I don't know if [[Derivative of the exponential map]] (linked above) is relevant here because the domain of exp in that context is a Lie algebra, it might be applicable though. --[[User:RDBury|RDBury]] ([[User talk:RDBury|talk]]) 04:23, 9 January 2021 (UTC)

= January 6 =


= January 7 =
= January 7 =

Revision as of 09:03, 10 January 2021

Welcome to the mathematics section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:

January 3

Generating numbers with a modulus which is not a power of two?

Suppose you had a stream of bits from which to construct some numbers using a modulus of say 72. Does the fact that the modulus is not a power of two introduce any bias in the result? For some reason it just seems that it would. Earl of Arundel (talk) 14:53, 3 January 2021 (UTC)[reply]

Here's my attempt to remove any possible bias. (Although I'm not sure it's even necessary at this point!)

ulong generate(ulong bits, ulong modulus)
{
 ulong sum = 0;
 ulong power = 1;
 while(power != 0)
 {
  if(modulus & power)
   sum += bits % power;
  power <<= 1;
 }
 return sum;
}

Earl of Arundel (talk) 15:05, 3 January 2021 (UTC)[reply]

This does not solve the issue for long streams. If you have bits galore, as in a cheaply obtained infinite stream, an easy solution is to chop up the stream into parts of length such that where stands for the modulus, interpreting these as binary numbers and discarding all outside the range from to . For a modulus of you should choose which means that about 44% of the bits are thrown away. If you have to pay dearly for each bit, this is not a good approach. Instead, think of the problem as having to convert an infinitely expanded fraction of a value in the unit interval given in some base (here with ) to one in base (here with ). For example, suppose you are given the stream (which happens to be the fractional part of expressed as a binary fraction, instead of the usual decimal ). If the desired modulus is , this should now become again the same value, but this time ternary. Using this example, without looking ahead we know that the binary fraction is contained in the closed interval from to , in which an overlined digit denotes an infinite repetition. The corresponding respective ternary fractions are and in which the common initial part is underlined. So after having seen an initial segment of the input stream, you can already produce the initial segment of the output stream. This method uses all digits from the input; no information is discarded. There is a theoretical risk that you may have to wait indefinitely before a next output digit becomes certain. If the bitstream begins with with an interminably repeated alteration of and , you are kept in suspension about whether to produce a ternary or until the pattern is broken. For a random input stream this is not a real problem. You need to be prepared, though, to compute with very large integers.  --Lambiam 16:03, 3 January 2021 (UTC)[reply]
There are intermediate schemes where you throw out some information, but not as much as you would be generating one number at a time. For example, if you want to generate numbers modulo 3, then interpret each 8 bit chunk as a number between 0 and 255, and if this is less than 242 then express in base 3 to get 5 numbers modulo three. You end up throwing out 1-243/256 = 5% of the bits instead of 25% as when you generate the numbers one by one. --RDBury (talk) 01:55, 4 January 2021 (UTC)[reply]
On average you lose a small amount more. For each 8 bits in, you obtain 5 trits output with probability 243/256 and 0 trits with probability 13/256; on the average 1215/256 = 4.74610 trits. The information content of a trit is log2 3 = 1.58496 bits. So the average information content extracted from 8 bits equals 4.74610 × 1.58496 = 7.52238 bits. The efficiency is then 7.52238/8 = 0.94030 bits, so the loss is 0.05970 bits per input bit, or almost 6%. In a general formula, for m base-a digits in and n base b-digits out, where bnam, the efficiency is
Splitting the input up in chunks of 290 bits to get out batches of 47 base-72 digits, the efficiency is slightly above 0.99.  --Lambiam 03:05, 4 January 2021 (UTC)[reply]
Yes, the 5% was a lower bound in the information lost, basically a raw percentage of the bits thrown out. Any computation done will reduce efficiency more. In this case it was the conversion from binary (8-bits) to ternary (5*log23=7.9 bits). You can get arbitrarily close to 100% efficiency by using larger and larger chunks, but it's a case of diminishing returns. You could also increase efficiency without increasing chink size by being a bit smarter about throwing out bits. For example if your chunk starts '11111' then you don't need to look at the remaining 3 bits to know that the number is >242, so just throw out those 5 and start over saving yourself 3 bits. Again, it's trade-off between simplicity and efficiency. --RDBury (talk) 05:49, 4 January 2021 (UTC)[reply]

Derivative of matrix

Or

Which is true?

How do you define the function on matrices? You can define it as the inverse – if it exists – of function defined by a power series:
But many of the conventional rules for determining derivatives do not work for matrices. For example, while the identity is invalid. The correct rule is
The conventional rule fails because matrix multiplication is not commutative. I think that both of these rules for the derivative of the logarithm of a matrix likewise fail to hold.  --Lambiam 19:00, 3 January 2021 (UTC)[reply]
If A is sufficiently close to I then you can define ln(A) as (A-I)-(A-I)2/2+(A-I)3/3-(A-I)4/4 ... . There are probably other A's for which ln(A) can be reasonably defined, but that doesn't solve the basic problem here, namely that the usual rules for calculus have to be drastically recast or thrown out altogether when you don't have commutativity. Note that
So defining the inverse of exp on matrices is trickier than it may look at first blush. --RDBury (talk) 02:21, 4 January 2021 (UTC)[reply]
See here and also here. Count Iblis (talk) 08:52, 4 January 2021 (UTC)[reply]
The issue of defining on matrices can be bypassed by reformulating the original question as: assuming that can we express as a product of the inverse and the derivative of And the answer is, no, not in general. It is true for the special case of diagonal matrices, for which multiplication is commutative, and then either order of the multiplicands works. While not immediately related, I can report that the following identity appears to hold:
It follows that  --Lambiam 11:22, 4 January 2021 (UTC)[reply]
Generally if the operators commute. Ruslik_Zero 08:07, 5 January 2021 (UTC)[reply]
  • Matrix logarithm covers the topic of defining the logarithm of a matrix. Like in the 1D case, there are branches, but I am not too familiar with several complex variables or the behavior of this particular multivalued function.--Jasper Deng (talk) 10:26, 7 January 2021 (UTC)[reply]
    Now there's an idea: Look it up on Wikipedia! Okay, I feel silly now. At least we managed to cover a good chunk of the article. In any case, the article doesn't mention derivatives. It just came to me that log does define map from some open set in Cn2 to Cn2 so it has a derivative in that sense. From this point of view it would be a n2 by n2 matrix, or perhaps more accurately a linear map from the space of n×n matrices to itself, which may be complicated but it is defined. There's probably a way to get an expression for this, but it's not coming to me at the mement. --RDBury (talk) 00:15, 9 January 2021 (UTC)[reply]
    It seems to me that the parameter of with respect to which the derivative is taken is meant to range over  --Lambiam 00:26, 9 January 2021 (UTC)[reply]
    Yes, the chain rule implies that d/dt ln(A(t)) = Dln(A)(A'(t)) where Dln(A) is the derivative considered as a map from Mnn to Mnn. So knowing one is equivalent to knowing the other. Note that, by the above series for exp(A), you can write Dexp(A) = I + (adL(A)+adR(A))/2 + (adL2(A)+adL(A)adR(A)+adR(A)2)/6 +... where adL is the map U→AU and adR is the map U→UA. Similarly, I think you can get a series expression for Dln(A) when A is close to I, but it would be more complicated. I don't know if Derivative of the exponential map (linked above) is relevant here because the domain of exp in that context is a Lie algebra, it might be applicable though. --RDBury (talk) 04:23, 9 January 2021 (UTC)[reply]

January 7

limit of Likelihood of tie for most selected of others

(From this week's RuPaul's Drag Race)... If 7 queens vote at Random for one of the other queens (in this case they can't vote for themselves, Ben DeLaCreme isn't part of this), what is the probability of a tie in the queen with the most number of votes. Does this probability go up or down if they can vote for themselves? As the number of queens goes up, does the probability go up or down?

If self-votes are not allowed, the probability of a tie for 7 queens equals 129534/67 = 0.46273. If allowed, it goes down to 372540/77 = 0.45236. Increasing the number of queens increases the likelihood of a tie, except if that number was less than 3. I suspect that the limit equals 1 − 1/e = 0.63212.  --Lambiam 09:56, 7 January 2021 (UTC)[reply]
Here's a computer calculation showing the same results as stated above, as well as the results for lower numbers. --116.86.4.41 (talk) 10:45, 7 January 2021 (UTC)[reply]

January 10