Wikipedia:Reference desk/Archives/Mathematics/2010 April 30
Mathematics desk | ||
---|---|---|
< April 29 | << Mar | April | May >> | May 1 > |
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. |
April 30
[edit]Need a tutorial on calculating moments
[edit]Would someone please point me to a layman's reference, or walk me through the procedure that was used to determine that the variance of the logistic distribution is and the kurtosis is 6/5? The article on kurtosis, cumulant, and the like lost me, I'm afraid. I have a probability density function that's a nonlinear (but symmetrical) distortion of the logistic distribution, and I'd like to know its kurtosis and variance. If I know how to do it for the logistic distribution, I can figure it out for my version.
I can figure them out with a brute-force approach by generating thousands of values distributed according to my distribution, and then calculating the variance and kurtosis as . That will give me an approximation. I need help figuring it out exactly, not numerically.
According to the moment (mathematics) article, I would find, say, the variance of the logistic distribution like this:
...but when I plug the indefinite integral into into Wolfram Alpha (which serves as a Mathematica front end), I get a result that involves a polylogarithm, which isn't exactly closed form. Wolfram Alpha won't solve the definite integral, and by inspection, substituting the -∞ and +∞ for x won't give a meaningful result. So where does come from, as given in the logistic distribution article? ~Amatulić (talk) 04:52, 30 April 2010 (UTC)
- [ec] Which part are you having trouble with - knowing what integrals to evaluate, or evaluating the integrals?
- The former is fairly straightforward - the mean is , the variance is , the excess kurtosis is where , and so on.
- The latter can be difficult to do by hand, but luckily you have
the Wolfram IntegratorWolfram Alpha. -- Meni Rosenfeld (talk) 04:59, 30 April 2010 (UTC) - Looks like Alpha is still a bit quirky with these things. Giving the integral to Mathematica itself returns under the assumption . -- Meni Rosenfeld (talk) 05:08, 30 April 2010 (UTC)
- Ah, thanks. That explains my difficulty.
- AAARGH! I had Mathematica at my previous employer, now I'm self-employed and must use Wolfram Alpha (can't afford Mathematica for personal use). I sure miss it.
- The pdf for which I'm trying to find these moments is:
- (for of course). If you have Mathematica handy, would you mind seeing if it gives a result for and ? ~Amatulić (talk) 05:16, 30 April 2010 (UTC)
- Not at all. Unfortunately, I tried it and Mathematica is unable to evaluate these integrals.
- If you do end up resorting to numerical calculation, numerical integration techniques will be much more accurate than the sampling method you mentioned. -- Meni Rosenfeld (talk) 06:04, 30 April 2010 (UTC)
- It can be done for specific values of a (for example, gives ), but for large a the expressions involve solutions to high-order polynomials. -- Meni Rosenfeld (talk) 14:26, 30 April 2010 (UTC)
- Thanks. Actually my value of a is small, 1/tanh(1) or approximately 1.313. My experiments suggest that 1<a<2 always. ~Amatulić (talk) 17:49, 30 April 2010 (UTC)
- Axiom is free and has a powerful integrator. I haven't tried it though. 69.228.170.24 (talk) 06:29, 30 April 2010 (UTC)
- Thanks I'll give it a look. What I really would like is a symbolic rather than numeric solution as a function of s, but if I have to go with numeric that's how it must be, I suppose. ~Amatulić (talk) 17:49, 30 April 2010 (UTC)
- I found a definite integral solver here. It doesn't give symbolic results, just numeric, but it was enough for me to determine that for a=1/tanh(1), . The odd thing is, the kurtosis came out negative (-4.25426), which the kurtosis article says means the peak is lower than a normal distribution and has thinner tails, but I know for a fact this distribution exhibits just the opposite character - taller thinner peak and fatter tails -- which is why I'm using it. ~Amatulić (talk) 05:07, 1 May 2010 (UTC)
- The problem is not with the size of a per se, but with how complicated it is. 1/tanh(1) is too complicated to evaluate symbolically.
- But if the value of a is fixed, then you have may have miscommunicated the problem. s is just a scaling factor, so the variance will be proportional to its square and the kurtosis doesn't depend on it. Finding the values numerically for a given a is easy.
- The excess kurtosis is never less than -3. Your program gave a nonsensical result because the kurtosis is infinite - in fact, it is infinite for any a<2 (probably a=2, too). This is consistent with "taller peak, fatter tails", perhaps more so than you intended. The variance result is confirmed by Mathematica, though (the last 3 digits are off).
- It sounds like you have a choice which distribution to use - perhaps you should choose one which is easier to work with. -- Meni Rosenfeld (talk) 19:50, 1 May 2010 (UTC)
- I found a definite integral solver here. It doesn't give symbolic results, just numeric, but it was enough for me to determine that for a=1/tanh(1), . The odd thing is, the kurtosis came out negative (-4.25426), which the kurtosis article says means the peak is lower than a normal distribution and has thinner tails, but I know for a fact this distribution exhibits just the opposite character - taller thinner peak and fatter tails -- which is why I'm using it. ~Amatulić (talk) 05:07, 1 May 2010 (UTC)
Upon further investigation, it looks like the optimum value of a for my data is around 1.7.
Yes, my value of a is fixed once I determine the best fit to my data.
I was wondering if there was an elegant way to express in terms of a. I painstakingly solved for s=1 and a large number of values of a and, by inspection and experimentation, discovered five closed-form results in addition to the one you found (shown last):
Let
(Corrected per reply comments below)
Those are just the ones I found. There may be more. For all I know, the whole relationship between sigma, a, and s might be a closed-form expression. That's one thing I was curious about.
If you look at the plot, you see that looks like it should be capable of being modeled somehow. The discontinuity at a=1 is where my distribution reduces to something Cauchy-like. I have no explanation for the behavior at a<1; in fact, between 0 and 1/2 there is only one value, a=1/4, that has a solution for variance.
While it's true that kurtosis can't be less than -3, mathematically a definite integral can have any value it wants. My red plot of kurtosis shows that it isn't defined at a=2, but also shows a smooth curve of negative values where a<2. Nevertheless, your comment above suggests that this may be an artifact of the online definite integral solver I used. Wolfram Alpha doesn't give me answers for a<2.
As to having a choice of distributions... I made this one up because it meets all the following requirements where other distributions fail:
- The pdf, cdf, and inverse cdf are all closed form, requiring no numerical methods. (The only numerical method is figuring out the relationship between variance, a, and s, once the value a is established, and I need to do that only once.)
- The distribution has a variance at the parameter a of interest to me.
- The pdf has a taller narrower peak and fatter tails than the normal distribution, while at the same time having a rounded peak, unlike, say, the stable pareto.
- The tails of the distribution bend outward when plotted on a log scale, crossing above the normal distribution tails past two standard deviations. The logistic distribution tails also cross the normal tails in that region, but plotted on a log scale they don't bend outward, they have a constant slope. I need the outward bend.
- The distribution fits my data! In fact it appears to universally fit several unrelated collections of samples.
I couldn't find anything else that met all those requirements.
One thing I want to do with this is modify the Black-Scholes option pricing formula, but for that I need kurtosis. On the other hand, the adjustment doesn't blow up with kurtosis values < -3. I'll try it and see (assuming those negative values I got are real results). ~Amatulić (talk) 04:50, 2 May 2010 (UTC)
- It's unfortunate that you refuse to listen to both myself and your own common sense. Excess kurtosis is defined as , where and is the integral of a non-negative quantity ( and thus ). "Mathematically", the integral of a nonnegative quantity is nonnegative, and therefore the excess kurtosis cannot be less than -3. Any result that says the kurtosis is less than -3 is nonsense and is an artifact of the way it was calculated. As you may know, Mathematica can do arbitrary-precision arithmetic and control its error bounds, and I've used that to verify that the kurtosis is infinite for . Also, it can be seen that grows like from which it can also be readily seen that the kurtosis is infinite.
- And you can also see that the variance is reported negative for , which I hope you believe me is also impossible. In fact it's, as you may have guessed, infinite. This includes for which, for whatever reason, a positive nonsensical result was reported. It may have something to do with the fact that for , the distribution doesn't even have a mean.
- And as I've explained, finding the value (for the variance, say) for any specific a is easy. There was no need to do anything "painstaking". However, the result for complicated a is unwieldy (as I said, solutions to high-order polynomials) which makes me doubt there is a nice closed form for general a, and you shouldn't look for one. It's naive to assume there's always a closed form in simple functions. There's a lot that can be done numerically (for example, using a root-finding algorithm to find the value of a which has a given variance), and I may help you with that if you explain what it is you're after (specifically, what did you intend to do with the closed form once you've found it).
- By the way, your solution for the variance wasn't written correctly - the terms in the table multiply only the Pi term, not the -2. -- Meni Rosenfeld (talk) 08:57, 2 May 2010 (UTC)
- Thanks, I corrected that above. That's what I meant. ~Amatulić (talk) 15:09, 2 May 2010 (UTC)
- Note: It's not that surprising that the results came out negative. With a very specific algebraic interpretation, you can have results like 1+2+4+8...= -1 and 1+2+3+4...= -1/12. The former is roughly described as "If the series converges, you can do some algebraic manipulation to show that it must converge to -1". Likewise, numerical definite integrators over infinite domains can empirically determine the rate of convergence of the integrand to 0, do some algebraic tricks and reach an estimate for the integral. But if the integrand does not converge to 0 fast enough, and the integral is infinite, it is plausible that these tricks will lead to a negative result. But again, in our current context which is analytic, not algebraic, such a result makes no sense. -- Meni Rosenfeld (talk) 09:25, 2 May 2010 (UTC)
- A simple example: Suppose you choose some large and find that . If you assume the function is asymptotically of the form , you get and thus . If the function decreases sublinearly (and thus the integral diverges), you'll get and the result of this "approximation" will be negative. -- Meni Rosenfeld (talk) 10:47, 2 May 2010 (UTC)
- You're right, that was a stupid comment on my part regarding negative kurtosis. I wrote that late last night before bed, then as I was falling asleep I realized that the integral is a positive function and can't have a negative result. I was hoping to delete that part this morning but I was too late!
- And yes, I meant to exclude the 2 in the expressions for variance. Again, the only excuse I can offer is the late hour. I have corrected it above.
- What was "painstaking" was solving the variance for many specific values of a to come up with that plot, in the hope of modeling the function somehow. What's also painstaking (for me) is to figure out by experimentation that, for example, 8.4791976 is . The consistent pattern in these results suggested the existence of a closed form relationship. I don't really need to have a closed-form solution for variance, I just wanted the convenience of having a relationship that I could plug in a value for a and get a variance, in case I need to adjust a on the fly during processing that I might do in the future.
- Thanks very much for the explanations. I have a much better understanding as a result of our dialogue. ~Amatulić (talk) 14:50, 2 May 2010 (UTC)
- Ok, that's understandable. I'm glad everything is clearer to you now.
- You can use the (numerical) values you've computed to fit a function of the form (with more terms if necessary), and use that to plug in different values of a. -- Meni Rosenfeld (talk) 15:51, 2 May 2010 (UTC)
- By the way, you can use Plouffe's Inverter to find analytic expressions for numerically obtained numbers (it doesn't work for all numbers, though). It may also interest you to know that for large a, the variance goes like . -- Meni Rosenfeld (talk) 17:48, 2 May 2010 (UTC)
- Thanks, I didn't know about Plouffe's inverter. It had only a couple of my numbers, but one of them I didn't have.
- The integral for variance gives a real result for negative a also. The results are exactly the same only negative, i.e. . The resulting plot looks very much like y=tanh−1(1/x), because it has an undefined region from -1 ≤ x ≤ 1 just like my a parameter. That suggests that it might be better to model it not as a polynomial, but as some form of:
- ...which also approaches as you observed. It needs some sort of decaying correction factor, though, because for small a it doesn't have sufficient magnitude, although the shape and curvature looks correct. After some experimentation, I found that multiplying that expression by gets the variance to less than 0.6% of the actual value for a=1.5, improving to 0.1% or better for a>2.
One more question about kurtosis
[edit]The plot at the right shows a histogram of my data overlayed by my distribution (a=1.6), a normal distribution, and a logistic distribution plotted in log scale. My distribution looks like a perfect fit when plotted in linear scale; I use the log scale because I am most interested in the tails.
One thing I'm still confused about is kurtosis. I have a distribution that fits my data better than anything else I have found, and my distribution has infinite kurtosis at a=1.6 which provides the best fit. And yet, I can calculate the sample kurtosis directly from my data to get a reasonable positive value of 29.6. You can see visually the data and my distribution are a good match. So why does one have infinite kurtosis and not the other? ~Amatulić (talk) 21:27, 4 May 2010 (UTC)
- First, the infinitude of the kurtosis crucially depends on the pdf at very large values of x. Even if the distribution seems to fit for the range of values you've tested, it's possible that the pdf actually decreases at a more rapid rate later on.
- But even if the data is truly sampled with this distribution, the nature of such distributions is that if you calculate their moments from a sample, it will have a very high probability to give benign estimates, and a very small probability to give an extreme outlier (thus, infinite expectation). If you continue to sample values, eventually you'll encounter one that will surprise you.
- As an example, see a list of values I have just sampled from the Cauchy distribution : {0.273766, 0.153153, -0.0181623, 0.353249, 1.38974, -0.777828, 0.307389, -34.0192, 3.19055, -4.95814}. Until you stumble upon that -34 you would think the mean is around 0, when in fact it's indeterminate. -- Meni Rosenfeld (talk) 08:37, 5 May 2010 (UTC)
- By the way, did you try Student's t-distribution? It's asymptotically (for large x) the same as yours, has closed-form variance and kurtosis and has been studied more extensively. -- Meni Rosenfeld (talk) 13:54, 5 May 2010 (UTC)
- Thanks for the explanation. That makes sense.
- For the data that fits best where a=1.6 I have 12,000 samples. The whole reason I embarked on this distribution investigation is due to the preponderance of high-impact "black swan" events in financial market data, which appear to be 100,000 times more probable at 6-sigma from the mean than a normal distribution would suggest.
- I am really happy that I found a closed-form approximation for the relationship between a, s, and σ (see end of last section above). Thanks for your help with that. Telling me that variance becomes π2/(3a2) for large a led me to it.
- For other similar but smaller data sets (2,000-6,000 samples), the best fit is where a=2.1 (kurtosis=34). I understand that this value of a doesn't account for outliers that would appear in a larger sample, as the value a=1.6 would. I found that a=2.1 (or as close to 2 as possible while remaining greater than 2) sacrifices a smidgen at the tails (very slightly thinner tails than the data shows). For my 12,000-sample data set, it may be acceptable approximation for what I need to do.
- Yes, Student's t is one of the first things I looked at. As I described in my list of criteria somewhere above, it was more important to me to have closed-form pdf, cdf, and inverse cdf, than closed-form kurtosis. I didn't pursue Student's t because (a) gamma functions and hypergeometric functions aren't easily manageable, and (b) the Student's t shape is wrong; I need a taller peak than the normal distribution as well as fatter tails. The Student's t has a smaller peak. For other reasons (particularly modifying the Black-Scholes formula), I also needed a connection to a finite and defined variance, which is not guaranteed with Student's t. Therefore, I ended up inventing a distribution that met my needs. I didn't have a requirement for kurtosis. ~Amatulić (talk) 18:05, 5 May 2010 (UTC)
Division Puzzle
[edit]Hi, I'm trying to solve this GeoCaching puzzle, and it's driving me mad. I need to find: "the lowest 10 digit integer which contains each of the digits 0 to 9 and which is exactly divisible by every number from 2 to 16 inclusive". I've tried working it out by testing each combination in order - I've got up to 1237546890 with no joy so far - is there a quicker way to solve this? The only digit I.m certain of is the zero, which has to be last for the number to be divisible by 10. Can anyone help me please? —Preceding unsigned comment added by 194.205.143.136 (talk) 05:42, 30 April 2010 (UTC)
- Well, I thought the idea of a puzzle is you're supposed to do it yourself, but.... if you're doing it with a computer, use brute force, 10! is just 3.6 million. Some optimizations involving the least common multiple might speed things up. Do they say you are supposed to be able to do it by hand? 69.228.170.24 (talk) 06:38, 30 April 2010 (UTC)
(ec)
- If it contains all digits 0...9 then it is divisible by 3 and 9. It must end with zero to be divisible by 10. Then it also is divisible by 2, so by 6, too.
- 100=4×25, so the two last digits must form a number divisible by 4 for the whole number to be divisible by 4: with the last digit being 0 they may only be 20, 40, 60 or 80. Now the number is guaranteed to be divisible by 2, 3, 4, 5, 6, 9, 10, 12 and 15.
- 1000 is divisible by 8, so the 3−digits tail needs to be, too. That means the number of hundreds is even iff the 2−digits tail is divisible by 8, so the tail must be one of {1,3,5,7,9}{20,60} or one of {2,4,6,8}{40,80}, except repeating digits (440 and 880).
- 1/16=0.0625 → 10000 is divisible by 16 and no lower power of 10 is. So the last four digits must form a number divisible by 16. For each of sixteen possible 3−digits tails found before, check which of remaining 7 digits give 4−digits numbers divisible by 16. You can use modular arithmetic: for example 3−digits tail 760 ≡ 8 (mod 16), then 4−digits number will be "x760" ≡ 1000x + 8 ≡ 8x + 8 = 8(x + 1) (mod 16). Now x+1 must be even, so x is one of 1, 3, 5, 9 (7 got is already used). Similar way you'll find all possible 4−digits tail.
Then your divisors set is {2..6, 8..10, 12, 15, 16}. - For each 4−digit tail, there are 6 remainig digits, so you'll have to check only 6!=720 permutations of them (not combinations!) and test the whole number for divisibility by 7, 11 and 13 (14=2×7 will follow from 2 and 7). These three are all prime numbers, so they are coprime, so don't waste time to implement specific tests for divisibility by each them, just try dividing by 7×11×13=1001.
- Good luck. CiaPan (talk) 08:14, 30 April 2010 (UTC)
- You can also simply iterate through 10–digits multiples of LCM(2, 3, ..., 16) = 24×32×5×7×11×13 = 720720 and test which of them have all digits different. :) CiaPan (talk) 10:09, 30 April 2010 (UTC)
- That's probably the most efficient approach for a computerised search, as it hits the lowest candidate first, and only needs to check about 3% of the search space. Gandalf61 (talk) 10:34, 30 April 2010 (UTC)
- I certainly don't consider myself a math expert in any regard, but using CiaPan's advice, I used Excel to generate a list of all 10-digit multiples of 720,720, used the "text to columns" feature to split each number into ten columns, then used "sort columns" to eliminate numbers with duplicate digits until I found the answer. Good old left-brained fun, and it didn't take me all that long.... Kingsfold (talk) 13:36, 30 April 2010 (UTC)
- Agreed, Gandalf. If we divide the lowest possible 10 digit number (assuming no leading zero allowed) by 720720 we get 1234567890/720720=1712.96. If we divide the largest possible number, we get 9876543210/720720 = 13703.72. So, we want to test all multiples of 720720 between 1713 and 13703. Here's a Fortran program to do just that:
program mp ! Math Problem.
integer I,J,N,C(10),CHECK
character*11 STRING
do I=1713,13703
N = I*720720
write (STRING,*) N
STRING = STRING(2:) ! Needed since default format puts N
! in STRING(2:11),
! not STRING(1:10).
do J=1,10
C(J) = 0
enddo
do J=1,10 ! Count number of each digit:
! C(1) = number of ones in
! current number, etc.
if (STRING(J:J) .eq. "1") C( 1) = C( 1) + 1
if (STRING(J:J) .eq. "2") C( 2) = C( 2) + 1
if (STRING(J:J) .eq. "3") C( 3) = C( 3) + 1
if (STRING(J:J) .eq. "4") C( 4) = C( 4) + 1
if (STRING(J:J) .eq. "5") C( 5) = C( 5) + 1
if (STRING(J:J) .eq. "6") C( 6) = C( 6) + 1
if (STRING(J:J) .eq. "7") C( 7) = C( 7) + 1
if (STRING(J:J) .eq. "8") C( 8) = C( 8) + 1
if (STRING(J:J) .eq. "9") C( 9) = C( 9) + 1
if (STRING(J:J) .eq. "0") C(10) = C(10) + 1
enddo
CHECK = 0 ! Number of digits found
! exactly once in string.
do J=1,10
if (C(J) .eq. 1) CHECK = CHECK + 1
enddo
if (CHECK .eq. 10) print *,STRING
enddo
end
- It gives 8 solutions, but I don't want to give them away, as that would spoil all the fun. StuRat (talk) 13:49, 30 April 2010 (UTC)
- This might be ticky, but the lowest 10-digit number to include all numerals between 0 and 9 is 1023456789, not 1234567890. (Right?) Kingsfold (talk) 15:43, 30 April 2010 (UTC)
- That's true, but we also know that the number must end in a 0, since it has 10 as a factor. However, I modified the program to run with your lower limit. It doesn't make any diff in the outcome, but we might as well be throrough. StuRat (talk) 17:46, 30 April 2010 (UTC)
- There are 8 solutions below 231 and 58 above so I guess you have signed 32-bit integers. This is good enough to find the smallest solution but you would have missed the 4 that are also divisible by 17. PrimeHunter (talk) 14:12, 30 April 2010 (UTC)
- Good catch. I was using the default INTEGER size, which is indeed a signed 32-bit integer. I've changed the program (below) to use a signed 64-bit INTEGER, and found all 66 matches. StuRat (talk) 17:46, 30 April 2010 (UTC)
- Yes, I found 66 10-digit solutions with Python (which supports arbitrary-precision arithmetic), and I was just wondering where the other 58 had gone ! Gandalf61 (talk) 14:19, 30 April 2010 (UTC)
- PARI/GP is also arbitrary precision. This computes the 66:
forstep(n=0,10^10,720720,if(vecsort(Col(Str(n)))==Col("0123456789"),print(n)))
- Here's a strange thing. If you add 17 and 19 to the list of divisors then there are no 10-digit solutions using digits 0-9 once each. But if you relax that requirement and just look for pandigital solutions (using digits 0-9 at least once each) there are just two 11-digit solutions - and the larger is exactly twice the smaller ! Gandalf61 (talk) 14:32, 30 April 2010 (UTC)
- OK, I updated the program to find all 66 values by using a longint (INTEGER*8, or 8 byte integer, in Fortran terminology). I also lowered the starting point so we will now find any matches between 1023456789 and 1234567890 (there aren't any), and I added a line count to the print:
program mp ! Math Problem.
integer*8 I,J,K,N,C(10),CHECK
character*11 STRING
K = 0 ! Number of solutions found.
do I=1421,13703
N = I*720720
write (STRING,*) N
STRING = STRING(2:) ! Needed since default format puts N
! in STRING(2:11),
! not STRING(1:10).
do J=1,10
C(J) = 0
enddo
do J=1,10 ! Count number of each digit:
! C(1) = number of ones in
! current number, etc.
if (STRING(J:J) .eq. "1") C( 1) = C( 1) + 1
if (STRING(J:J) .eq. "2") C( 2) = C( 2) + 1
if (STRING(J:J) .eq. "3") C( 3) = C( 3) + 1
if (STRING(J:J) .eq. "4") C( 4) = C( 4) + 1
if (STRING(J:J) .eq. "5") C( 5) = C( 5) + 1
if (STRING(J:J) .eq. "6") C( 6) = C( 6) + 1
if (STRING(J:J) .eq. "7") C( 7) = C( 7) + 1
if (STRING(J:J) .eq. "8") C( 8) = C( 8) + 1
if (STRING(J:J) .eq. "9") C( 9) = C( 9) + 1
if (STRING(J:J) .eq. "0") C(10) = C(10) + 1
enddo
CHECK = 0 ! Number of digits found
! exactly once in string.
do J=1,10
if (C(J) .eq. 1) CHECK = CHECK + 1
enddo
if (CHECK .eq. 10) THEN
K = K + 1 ! Increment number of solutions found.
print *,K," = ",STRING
endif
enddo
end
- StuRat (talk) 17:38, 30 April 2010 (UTC)
- Thanks so much for all the replies to my query. Most of it was over my head to be honest, but I was able to pick out some hints to help my 'brute force' attempt to crack it. Finally solved it by starting with 720720*1713 - then just kept adding 720720 until I got 10 different digits! Took me about 10 minutes in total - versus the hours already spent!
- Also, in reply to the first answer, I realize the idea of a puzzle is to 'do it myself' - I wasn't looking for (and didn't receive) an answer - just some idea on a quicker way to solve it. Also the puzzle makes no reference to 'solving it by hand' - previous logs state it has been solved by excel and programs like the one above - but I wouldn't know where to start, hence the brute force method.
- Thanks again, Justin 194.205.143.136 (talk) 13:00, 1 May 2010 (UTC)
I enjoyed coding in the J (programming language) the lowest 10 digit integer which contains each of the digits 0 to 9 and which is exactly divisible by every number from 2 to 16 inclusive, and the number of solutions
({.,#) (#~(n=(\:])"_1&.((10#10)&#:))) (*[:i.[:<.(n=.9876543210x)&%) *./2+i.15 1274953680 66
I don't know any shortcut, but brute force works. Bo Jacoby (talk) 13:00, 1 May 2010 (UTC).
Quick query about eigenvalues of a positive real matrix
[edit]Hi all - I'm working my way through some old exam papers and I came upon this quick problem which I can't for the life of me seem to solve: could anyone give me a hand?
If A is a n*n matrix and all entries of A are real and positive, do all eigenvalues of A have positive real part? I know that since all entries are real the determinant (polynomial) will have only real coefficients so for any complex eigenvalue root, its conjugate must be an eigenvalue too - then I tried looking at the trace as the sum of the eigenvalues, and arguing that summing over all the eigenvalues will end up picking up only the real parts of every eigenvalue, since every complex root has a conjugate eigenvalue, so the trace will be the sum of the real parts of the eigenvalues - and certainly, since all entries >= 0, the trace >= 0, but that only tells me about the overall sum of the eigenvalues being positive - for all I know, there could be a negative eigenvalue and just an even larger positive eigenvalue which makes the trace positive despite a negative eigenvalue, and I can't see any way to 'fix' the matrix so that we can definitely obtain only that negative-real-part eigenvalue without any of those larger positive-real-part eigenvalues necessarily being there: or who knows, perhaps it's in fact false and I simply can't think of a counterexample!
Your thoughts would be much appreciated, 131.111.29.210 (talk) 15:18, 30 April 2010 (UTC)
- has eigenvalues 3 and −1, the latter corresponding to the eigenvector (1,−1).—Emil J. 15:35, 30 April 2010 (UTC)
- And the way you should have come up with this example is that the determinant is the product of all eigenvalues, so if the determinant is negative there's no way all eigenvalues are conjugate pairs and positive reals. -- Meni Rosenfeld (talk) 15:41, 30 April 2010 (UTC)
- Wonderful, thankyou both for the counterexample and the explanation :) —Preceding unsigned comment added by 82.6.96.22 (talk) 17:27, 30 April 2010 (UTC)
- What is true is that if a nxn matrix has all nonnegative entries, it has at least a real nonnegative eigenvalue, and the correspondig eigenvector has nonnegative coordinates. It's a theorem by Frobenius; in fact quite an immediate consequence of the Brouwer fixed point theorem. --pma 18:43, 30 April 2010 (UTC)
- Wonderful, thankyou both for the counterexample and the explanation :) —Preceding unsigned comment added by 82.6.96.22 (talk) 17:27, 30 April 2010 (UTC)
Even distribution on a sphere
[edit]Is there any any algorithm to describe the distribution of n points on a sphere such that the distance between points is maximized? For instance, if there were n entities of a certain length, with a charge (the same) at one end, and all joined at the other end, how would they orient themselves to minimize the potential energy? For certain cases, it's trivial (2 = opposite, 3 = triangle), and it should be nice and symmetric for the Platonic solids (4 = tetrahedron, 6 = cube, 8 = icosahedron, 12 = icosahedron, 20 = dodecahedron). For 5, I assume it would be a double tetrahedon, with three oriented along the horizontal plane in a triangle, and the other two directly up and down. Is there a general algorithm or pattern? Perhaps there is not a unique solution? — Knowledge Seeker দ 21:20, 30 April 2010 (UTC)
- Have you read Wikipedia:Reference desk/Archives/Mathematics/2007 August 29#Distributing points on a sphere? Algebraist 21:30, 30 April 2010 (UTC)
- No! And I apologize; I tried searching the archives before asking, but I don't know how I didn't find that entry. I will read it now, thank you. — Knowledge Seeker দ 21:42, 30 April 2010 (UTC)
- It helps to have been here long enough to remember it. Algebraist 21:57, 30 April 2010 (UTC)
- No! And I apologize; I tried searching the archives before asking, but I don't know how I didn't find that entry. I will read it now, thank you. — Knowledge Seeker দ 21:42, 30 April 2010 (UTC)
If you want to minimize the potential energy, then the problem is not trivial, see here for an analogous problem which is discussed here and the outline of a solution is given here. Count Iblis (talk) 22:23, 30 April 2010 (UTC)
- There's an article about that, one of two mentioned at the end of the circle packing article. I notice thats not referenced from packing problem, I'll go and add it. Dmcq (talk) 22:27, 30 April 2010 (UTC)
I think Coxeter's 12 Geometric Essays book addresses this problem. A Dover reprint bears the title The Beauty of Geometry, if I recall correctly. Michael Hardy (talk) 20:54, 1 May 2010 (UTC)
- Thank you all for your insights. One the one hand, such a basic problem (maximize the distance between points constrained on a sphere) seems like it would have some pattern, but on the other hand, the more I thought about it, the less likely I thought there would be a general algorithm. I really think there should be an article on this, don't you guys? Though I have no idea if this problem has a name or is notable enough mathematically. — Knowledge Seeker দ 00:16, 3 May 2010 (UTC)
- I am interested in the same question for a different reason. As of yesterday, the LDS Church currently has 131 temples in operation. While admittedly, the existing temples are stationary, and for that matter, not evenly distributed, I often wonder how many more temples will be necessary for there to be a temple within, say, 600 miles of each Church member. Admittedly, the difficulty of this question is compounded by the fact that roughly ¾ of the Earth's surface is underwater (you can't build in the ocean), and that Church members aren't evenly distributed, either. Any ideas or suggestions? Thanks! Kingsfold (talk) 16:54, 3 May 2010 (UTC)
- Induct cetaceans into the church. Dmcq (talk) 18:42, 3 May 2010 (UTC)
- Finding a distribution of the maximum number of discs (or spheres) that will fit round a sphere is called the Tammes problem by the way. I suppose my reduction of the LDS Church problem to this problem isn't fully satisfactory because even this simpler problem hasn't been solved yet :) Dmcq (talk) 19:35, 3 May 2010 (UTC)
- Right. And to make it even more complicated, people can't travel those, say, 600 miles "as the crow flies." I posed my question mostly to add a real-life application (but not exactly) of the question to the discussion. Kingsfold (talk) 11:16, 4 May 2010 (UTC)
- Just realized this is a different problem, it is what is the minimum number of discs that would completely cover the sphere. Dmcq (talk) 19:44, 3 May 2010 (UTC)
- I am interested in the same question for a different reason. As of yesterday, the LDS Church currently has 131 temples in operation. While admittedly, the existing temples are stationary, and for that matter, not evenly distributed, I often wonder how many more temples will be necessary for there to be a temple within, say, 600 miles of each Church member. Admittedly, the difficulty of this question is compounded by the fact that roughly ¾ of the Earth's surface is underwater (you can't build in the ocean), and that Church members aren't evenly distributed, either. Any ideas or suggestions? Thanks! Kingsfold (talk) 16:54, 3 May 2010 (UTC)
Sqrt
[edit]What is the antiderivative of square root. 76.199.144.250 (talk) 22:14, 30 April 2010 (UTC)
- You can use the same rule as with any power of x. --Tango (talk) 22:21, 30 April 2010 (UTC)
- See the first entry of List of integrals of rational functions, with n=1/2. Buddy431 (talk) 22:25, 30 April 2010 (UTC)
Product rule on Banach spaces
[edit]Let U, A and B be Banach spaces, L(A,B) the vector space of linear maps from A to B, let
I'm wandering whether some version of the product rule holds like
and in that case what would be the meaning of the product DM(x)v(x).
Can anybody help me?--Pokipsy76 (talk) 22:31, 30 April 2010 (UTC)
- Yes, you just have to use the composition rule. The map taking to the pair is differentiable because its components are; and you are composing it with the evaluation map
- , taking the pair (T,x) to Tx.
- The evaluation map is bilinear and continuous (of norm 1: essentially by definition of the operator norm: ).
- As a general fact, any bounded bilinear map on Banach spaces is infinitely differentiable, and the differential is given immediately by the expansion: . Since you have . As a consequence, the differential of the composed map is the linear map , which is what you wrote (recall that for any in U , M(x) and DM(x)h are in L(A,B), while v(x) and Dv(x)h are in A, so that the meaning of the evaluations and is clear).
- Also, remember that DM(x), formally (that is, according with the general definition of differential) is an element of . The latter Banach space is naturally isometrically isomorphic with the space of bounded bilinear maps. So if we wish we may identify DM(x) with the corresponding bilinear map , which is somehow a simpler object, and write in consequence e.g. or .--pma 08:49, 1 May 2010 (UTC)
- Thank you, very illuminating. I still have some problem i guessing the nature of the isometry about DM, I don't understand if this isometry depends on some particular choice of the norm. I've just posted another question here which is related to this point.--Pokipsy76 (talk) 14:05, 1 May 2010 (UTC)