Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2014 September 4

From Wikipedia, the free encyclopedia
Mathematics desk
< September 3 << Aug | Sep | Oct >> Current desk >
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.



September 4

[edit]

Explanation for the solution of x in this equation.

[edit]

Well, I've certainly tried everywhere, but it seems the answer is tricky. Can someone explain me how do I solve x in ? Thank you very much 181.60.185.140 (talk) 00:03, 5 September 2014 (UTC)[reply]

ln(x) = x * y
ln(x)/x = y
y = g(x) where g(x)=ln(x)/x
x = invg(y)
I am not sure how you can solve it symbolically but you can now solve it numerically

202.177.218.59 (talk) 01:54, 5 September 2014 (UTC)[reply]

I believe you need a special function for that called the Lambert W function. I'll leave you the fun of figuring out how to do it :) Dmcq (talk) 08:08, 5 September 2014 (UTC)[reply]
I've known you have to use this Lambert W function, yet I can't manage to get the equation to be of the form without y having a value of x. So, when I use this function x keeps on both sides, making it unsolvable, yet again. 181.60.185.140 (talk) 16:56, 5 September 2014 (UTC)[reply]
Rewrite your equation to , then substitute . You immediately get . 95.112.218.246 (talk) 09:46, 7 September 2014 (UTC)[reply]

Rewrite the equation

0=eyx−x.

Expand the exponential,

pn(x)=1+(y−1)x+(y2/2)x2+ . . . +(yn/n!)xn

For a sufficiently big value of n the equation 0=pn(x) is solved numerically by, say, the Durand-Kerner method. Bo Jacoby (talk) 08:18, 5 September 2014 (UTC).[reply]

If a numerical solution is desired, Newton's method works better. (The method you linked to is for polynomial equations, not transcendental equations.) Sławomir Biały (talk) 12:37, 5 September 2014 (UTC)[reply]
For every n the equation 0=pn(x) is a polynomial equation of degree n. Newtons method does not always converge. (Try Newton on 0=x2+1). 14:47, 5 September 2014 (UTC).
Note that y = ln(x)/x has a maximum of y = 1/e at x = e so that there are no real solutions for y > 1/e but two solutions when 0 < y < 1/e (one in the range 1 < x < e and one e < x < ∞). For negative y there is only one real solution (in the range 0 < x < 1) --catslash (talk) 13:48, 5 September 2014 (UTC)[reply]

Linear congruential generator

[edit]

Hi, at Linear congruential generator it says:

For example, the Java implementation operates with 48-bit values at each iteration but returns only their 32 most significant bits. This is because the higher-order bits have longer periods than the lower-order bits (see below).

I don't see how the second sentence necessarily justifies the first. Sure, I get that if you want 32 bits then you are better off with the high 32 than the low 32, but are you necessarily better off with the high 32 than with all 48? Specifically, in my case, I want to return a real number between 0 and 1, with the most precision and best randomness possible. Am I better off taking the high 32 bits and dividing by 2^32 rather than using all the bits and dividing by 2^48? If so, why? 31.51.7.25 (talk) 20:41, 5 September 2014 (UTC)[reply]

A short period means the bits in question follow an obvious pattern, which disqualifies them for use as pseudorandom digits. So the bits are discarded rather than being used as output from the pseudorandom number generator. --RDBury (talk) 22:26, 5 September 2014 (UTC)[reply]
As described, there might be a specific problem with the high-order bits, namely that the returned values are not uniformly distributed over the full 32-bit range. If the modulus is m, then the output distribution will be uniform over the range 0 to ⌊(m − 1)/216⌋ − 1, with the value ⌊(m − 1)/216⌋ having lower probability, and higher values never occurring. Your suggestion of dividing be 248 would have the same problem, though adding 0.5 and dividing by m would give a more uniform distribution. Applications that have any sensitivity to correlation between values and other statistical properties should steer clear of linear congruential generators.
If you are looking for high quality pseudo-random numbers as you seem to be, I'd suggest using a secure random number generator (which I'd expect is available in Java), and concatenating enough data to fill a real number storage, then convert to real. You may find you need over 50 bits for this. —Quondum 22:22, 5 September 2014 (UTC)[reply]
Thanks for the replies. Firstly, I understand what a short period means. However, if I use a 32-bit random number in an application as a double-precision value, then the low bits are going to be always zero. That is a period of one, and I don't see why any period, however short, should not be better. Second, Quondam, you lost me at "As described, there might be a specific problem with the high-order bits". The problem under discussion here is with the LOW-order bits. Are you referring to a different problem? 31.51.7.25 (talk) 22:53, 5 September 2014 (UTC)[reply]
Yes, but on closer review, I see that m = 248, which nullifies my point. You seem to misunderstand the period, though. The period is how soon the same number repeats, and is unlikely to be less than 232, regardless of which bits you use. Unless you have a random data requirement exceeding this, this should not be an issue to you. But since you indicated that you wanted data "with the most precision and best randomness possible", you might want more than 48 bits per value (easily achieved by concatenating two 32-bit values), as well as avoiding certain undesirable statistical properties that linear congruential generators exhibit. If, for example, you are using the data for a Monte Carlo simulation of some sort, you can be unfortunate and get highly improbable behaviour. LCGs sometimes bite one that way. —Quondum 23:51, 5 September 2014 (UTC)[reply]
Thanks for your reply. I understand exactly what the period is. With respect, I think the problem is not with my understanding but with yours. You seem not to grasp the point that I am making. 31.51.7.25 (talk) 00:30, 6 September 2014 (UTC)[reply]
Apologies, you are probably correct. I was confused by your phrase "That is a period of one". —Quondum 01:02, 6 September 2014 (UTC)[reply]
If the LCG returned all 48 bits it would not really be a pseudorandom number generator, since the low bits are not random-looking. Client software would have to be written to work around the non-randomness of the output bits, which would tie it to that particular generator. It's normally better to make the PRNG emit only high-quality random bits; then the client doesn't need to know how the PRNG works.
If your application was so time-sensitive that you couldn't afford to clock the LCG twice per generated double, then it would probably be better to use all 48 bits than just the top 32, but hopefully you'll never find yourself in that situation. Otherwise, if your application is sensitive to N bits of the mantissa, then you should put at least N high-quality random bits in the mantissa. If N ≤ 32 then you might as well use the 32-bit output, and if N > 32 then you'd be much better off using two concatenated 32-bit outputs than one 48-bit state. -- BenRG (talk) 05:05, 7 September 2014 (UTC)[reply]
I'm really not sure why anyone would use a linear-congruential generator anymore. It was a nice solution compared to the ones that existed at the time, and there's some fun math that goes into picking good values for the coefficients and modulus. But better ways have been found — algoes that have both better statistical properties (well, depending on which ones you look at, but better for most properties anyway) and are, on most systems, faster, because they don't require division, just bit manipulation. See Mersenne twister. There's a simpler algo based on primitive trinomials mod 2, called Tausworthe, which we don't seem to have an article on. --Trovatore (talk) 05:12, 7 September 2014 (UTC)[reply]

Meaning of a symbol

[edit]

What is the meaning of the symbol in "Let S = C ∪ {∞} ?" I mean, the infinity sign between curled brackets. It is taken from here, sub-chapter: "Examples," example #3 (bullet 3). I could not find it among the List of Mathematical Symbols. Thanks --AboutFace 22 (talk) 21:43, 5 September 2014 (UTC)[reply]

The infinity symbol is simply a constant symbol; an arbitrary name for a new point outside of the complex plane. The brackets are standard set brackets. That line is saying "Take the complex plane and add a new point. Call that new point infinity. Call the resulting space S."--88.217.142.67 (talk) 22:01, 5 September 2014 (UTC)[reply]
See Riemann sphere for more details on this construction. --RDBury (talk) 22:12, 5 September 2014 (UTC)[reply]

It is now clear. Thank you. --AboutFace 22 (talk) 00:41, 6 September 2014 (UTC)[reply]

what's happening?

[edit]

I'm trying to convert a boolean expression (in sum of products form) to NOR logic using WolframAlpha, but the results seem off. For example, this expression, I scroll down to where it says "minimal forms", select "text notation", copy everything to Notepad, then paste the line where it says NOR, back to WolframAlpha. The result is this, but it's a different function! is it a bug or do I not "get" something (precedence maybe)? shouldn't they be identical? Asmrulz (talk) 09:55, 6 September 2014 (UTC)[reply]

You copied only the last half of the solution. In WolframAlpha's copyable plaintext, the solution will be formatted as
 ...
 NOR | <solution using NORs>
 NAND | <solution using NANDs>
 ...
It's important that you locate the line where it says NOR followed by a vertical bar and copy possibly multiple lines until the NAND followed by a vertical bar. Egnau (talk) 14:53, 6 September 2014 (UTC)[reply]
but I did... Here's what I'm copying: http://s15.postimg.org/w77xofwhn/snapshot8.png ... Asmrulz (talk) 18:31, 6 September 2014 (UTC)[reply]
Let me show you the differences by aligning the different answers (use the scrollbar).
What I get:          ((NOT v) NOR  (NOT w)) NOR  ((NOT v) NOR  (NOT z)) NOR  ((NOT w) NOR  x) NOR  ((NOT w) NOR  y) NOR  (x NOR  (NOT z)) NOR  (y NOR  (NOT z))
Your link "this":                                                                                  ((NOT w) NOR  y) NOR  (x NOR  (NOT z)) NOR  (y NOR  (NOT z))
Your blue highlight: ((NOT v) NOR  (NOT w)) NOR  ((NOT v) NOR  (NOT z)) NOR                                       (w NOR  x NOR  (NOT z)) NOR  (y NOR  (NOT z))
Egnau (talk) 00:58, 7 September 2014 (UTC)[reply]
and? paste your first line into WA and tell me it's the same function as that in my first link, what with different truth densities (17/32, as compared to 11/32, meaning, as I understand it, they have entirely different truth tables which aren't "rearrangements" of one another) and different DNFs. It's not about copying/pasting I now realized that the screenshot I posted belongs to another expression, sorry. But it's the same thing, the sum of products and what WA says is it's NOR form are different functions Asmrulz (talk) 09:19, 7 September 2014 (UTC)[reply]
I think I know. The problem is WA's parser thinks NOR is right-associative but in the "copyable plaintext" it is left-associative. I'll post a shorter example in a moment Asmrulz (talk) 10:05, 7 September 2014 (UTC)[reply]
1) expression: (a and b) or (c and d) (screenshot)
2) plaintext result: (a NOR c) NOR (a NOR d) NOR (b NOR c) NOR (b NOR d)
3) pasting result back, screenshot
4) observe how interpretation of NOR is that it is right-associative
5) manually parenthesizing previous output assuming left-associative NOR, and... NOPE, still not the equivalent of "(a and b) or (c and d)". I give up. Asmrulz (talk) 10:33, 7 September 2014 (UTC)[reply]
The parser does treat it as right-associative (which must be a bug). In the output it isn't left- or right-associative but has the natural interpretation x ⊽ y ⊽ z ≡ ¬(x ∨ y ∨ z). The only way to turn the output into something acceptable to the parser would be to use a completely different syntax, like Mathematica's native syntax Nor[x, y, z]. -- BenRG (talk) 16:28, 7 September 2014 (UTC)[reply]
Thank you! I started doubting my sanity for a moment Asmrulz (talk) 18:09, 7 September 2014 (UTC)[reply]

names for particular slices of the 5 cube (Vertex first)

[edit]

Consider the 4-D slices of the 5 cube {0,1}^5. starting with the (0,0,0,0,0) point, the next slice that includes vertices are the 5 permutations of (0,0,0,0,1) which are a standard pentatope.

  • What is the Polytope is the next slice that includes vertices at the 10 permutations of (0,0,0,1,1)?
  • What is the Polytope of the middle of the 5-cube at the 30 permutations of (0,0,.5,1,1)? (This is the equivalent of the hexagonal slice of the 3-cube or the octahedral slice of the 4-cube.)12:28, 6 September 2014 (UTC)
The permutations of (0,0,0,1,1) form a polytope with 5 tetrahedral faces, 5 octahedral faces, and whose vertex figures are triangular pyramids. I believe it's the Rectified 5-cell. The other solid is more complex and may not have a name, but I need to compute some statistics on it before searching. WP has gone a bit overboard (imo) as far as its listing of polytopes, including not just the regular ones but their truncated, cantilevered and reticulated versions. So if it has a name then we probably have an article on it. --RDBury (talk) 17:43, 6 September 2014 (UTC)[reply]
Yes, the first is the Rectified 5-cell, there is a sentence under co-ordinates that says

More simply, the vertices of the rectified 5-cell can be positioned on a hyperplane in 5-space as permutations of (0,0,0,1,1) or (0,0,1,1,1).

no clue on the other for now.19:23, 6 September 2014 (UTC)
By analogy, I suspect that the halfway slice is the bitruncated 5-cell – and that entry agrees. —Tamfang (talk) 19:34, 6 September 2014 (UTC)[reply]
Yes, according to the linked article, "the vertices of the bitruncated 5-cell can be constructed on a hyperplane in 5-space as permutations of (0,0,1,2,2). These represent positive orthant facets of the bitruncated pentacross." This is the above scaled by 2. --RDBury (talk) 01:18, 7 September 2014 (UTC)[reply]

Extensions

[edit]

Any idea how to extend this idea, i.e. all of the polytopes consisting of vertices of an n-cube equidistant from a single vertex and how to get all of the polytopes which are the halfway cuts of n-cubes (where n is odd, n being even gives a result from the first group)20:21, 6 September 2014 (UTC) (Naraht (talk) 01:55, 7 September 2014 (UTC))[reply]

Look at a more general slice. You get sum(xi)=a with xi>=0, xi<=1. Scale by 1/a = b to get sum(xi)=1, xi>=0, xi<=b. This is the (n-1)-simplex sum(xi)=1, xi>=0 truncated by the planes xi<=b, in other words it's in the continuum of truncations of the (n-1)-simplex starting from the full simplex (b=1) and ending at a single point (b=1/n). At b = 2/3 you get the (standard) truncated simplex and at b=1/2 you get the rectified simplex. Apparently (I'm having trouble understanding the definition) the bitruncated simplex is at b=2/5. For b=1/k the polytope has n choose k vertices, namely the permutations of (1/k, ... 1/k, 0, ... , 0) and is called a rectified, birectified, trirectified, etc simplex. For b=2/k, k odd, there are n × (n-1 choose (k-1)/2) vertices, the permutations of (2/k, ..., 2/k, 1/k, 0, ... 0). These are called truncated, bitruncated, tritruncated, etc simplices (again, assuming I've understood the meanings of these terms). Applying this to n=9 for example gives the middle slice as the quadritruncated 8-simplex.