Wikipedia:Reference desk/Mathematics
of the Wikipedia reference desk.
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.
August 30
[edit]Projections of hypercubes
[edit]Looking at Hypercube#Graphs, it looks like the projection of the n-cube into the Bn Coxeter plane has a no central vertex exactly when n can be written as 2m for some positive integer m. The pictures confirm this is true for 1 ≤ n ≤ 15.
So:
- Is this true in general?
- What's the general term of the sequence (an), where an is the number of vertices projected to the centre (i.e. 0, 0, 2, 0, 2, 4, 2, 0, ...) ?
Double sharp (talk) 18:21, 30 August 2024 (UTC)
- Did you intend to include a "not" in the question? I get no central vertex for n=2, 4, 8. For n=9 I get 8 points projected to the center. --RDBury (talk) 23:02, 30 August 2024 (UTC)
- Um, yes. Oops. T_T Double sharp (talk) 03:54, 31 August 2024 (UTC)
- For those who want to play along at home, I'm pretty sure the projection in question, translated to R2, is given by the matrix with columns and There may be a scaling factor involved if you're picky about distance being preserved, but this is irrelevant for the question. It's not too hard to show that these vectors are orthogonal and have the same length. So the question becomes, given n, how many combinations of add to These vectors form half of the points on a regular 2n-gon. It's not hard to see that there are at least two ways of doing it if n is odd; just alternate signs. A similar sign alternating idea shows that the number must be at least 2mp if n=mp where p is odd. So if n has an odd factor then there are points which project to 0. Proving the converse seems tricky though. --RDBury (talk) 00:04, 31 August 2024 (UTC)
- PS. I think I have an argument for the converse. The n points on the circle are all of the from ρk where ρ = eπi/n. We need to find a combination of these powers of ρ, which amounts to a polynomial in p of degree n-1, where all coefficients are ±1. If n is odd then ρ satisfies (ρn+1)/(ρ+1) = 1 - ρ + ρ2 - ... + ρn-1 = 0, and this polynomial has the desired properties. If n has an odd factor, say n=pq with p odd, then p satisfies (ρn+1)/(ρq+1) = 1 - ρq + ρ2q - ... + ρn-q = 0. Multiply by any polynomial of the form 1 ± ρ ± ρ2 - ... + ρq-1 to get a polynomial with the desired properties. But if n is a power of 2 then the minimum polynomial for ρ is ρn+1=0. The degree n is greater than n-1, so no integer combination of the powers of ρ from 1 to n-1 can add to 0 except when all the coefficients are 0. In other words, the condition that the coefficients are all ±1 isn't needed; we only need that they are not all 0, FWIW, it appears that the number of vertices projecting to the center is given by OEIS: A182256. It's a lower bound in any case. --RDBury (talk) 00:44, 31 August 2024 (UTC)
- That's nice indeed! So it was really a question about roots of unity, after all. :) Double sharp (talk) 04:00, 31 August 2024 (UTC)
- PS. I think I have an argument for the converse. The n points on the circle are all of the from ρk where ρ = eπi/n. We need to find a combination of these powers of ρ, which amounts to a polynomial in p of degree n-1, where all coefficients are ±1. If n is odd then ρ satisfies (ρn+1)/(ρ+1) = 1 - ρ + ρ2 - ... + ρn-1 = 0, and this polynomial has the desired properties. If n has an odd factor, say n=pq with p odd, then p satisfies (ρn+1)/(ρq+1) = 1 - ρq + ρ2q - ... + ρn-q = 0. Multiply by any polynomial of the form 1 ± ρ ± ρ2 - ... + ρq-1 to get a polynomial with the desired properties. But if n is a power of 2 then the minimum polynomial for ρ is ρn+1=0. The degree n is greater than n-1, so no integer combination of the powers of ρ from 1 to n-1 can add to 0 except when all the coefficients are 0. In other words, the condition that the coefficients are all ±1 isn't needed; we only need that they are not all 0, FWIW, it appears that the number of vertices projecting to the center is given by OEIS: A182256. It's a lower bound in any case. --RDBury (talk) 00:44, 31 August 2024 (UTC)
August 31
[edit]Term for prime to a power?
[edit]For the prime factorization of n:
is there a term for an individual ? Bubba73 You talkin' to me? 04:17, 31 August 2024 (UTC)
- I thought of that but it isn't specific enough. What I'm looking for is for the largest power of the prime that divides the number. Bubba73 You talkin' to me? 20:26, 31 August 2024 (UTC)
- It would be nice if there was a settled answer to this question. "Primary factor" would be appropriate in commutative ring theory. (Primary ideal) But this usage is not standard in this situation. Tito Omburo (talk) 21:44, 31 August 2024 (UTC)
- I thought of that but it isn't specific enough. What I'm looking for is for the largest power of the prime that divides the number. Bubba73 You talkin' to me? 20:26, 31 August 2024 (UTC)
- The exponent of p in the prime factorization is called the p-adic valuation of n. 100.36.106.199 (talk) 01:49, 1 September 2024 (UTC)
- A bit of a mouthful: "maximal prime-power factor".[1][2][3] --Lambiam 21:56, 1 September 2024 (UTC)
- Thanks. That is a bit of a mouthful (i.e. too long to use repeatedly). In my mind, and in notes to myself, for years I have called it the "prime component". Soon I expect to be writing up something, so I wondering if there is a recognized term. Bubba73 You talkin' to me? 02:28, 2 September 2024 (UTC)
- The prime component? has three mpp factors: and --Lambiam 12:58, 2 September 2024 (UTC)
- Thanks. That is a bit of a mouthful (i.e. too long to use repeatedly). In my mind, and in notes to myself, for years I have called it the "prime component". Soon I expect to be writing up something, so I wondering if there is a recognized term. Bubba73 You talkin' to me? 02:28, 2 September 2024 (UTC)
- I'd call each of those a prime component. Bubba73 You talkin' to me? 21:09, 2 September 2024 (UTC)
- We hereby authorise you to name it the "Bubba factor". -- Jack of Oz [pleasantries] 20:02, 2 September 2024 (UTC)
September 2
[edit]Coin flip
[edit]This has to be a really dumb question but it seems slightly paradoxical. Say you are going to bet $1 on a coin flip. One way to look at this is you plunk down your $1, the coin is flipped, and if heads you get back $2 (your original bet plus $1 winnings), net result +1. If tails, you lose your $1, net result -1. So the expected value is 0.5(+1) + 0.5(-1) which is 0, not surprising.
Another way to see the same proposition is you start with nothing and the coin is flipped. If heads, you receive $2. If tails, you receive $(-1) (i.e. you now have to pay $1). So the expectation is 0.5*2 + 0.5*(-1)= 0.5.
What has happened? It's the same proposition both ways, I think. Is there a systematic way to tell which analysis is the right one? The second calculation has to be wrong, but it's not obvious how. Thanks. 2601:644:8581:75B0:0:0:0:C030 (talk) 22:12, 2 September 2024 (UTC)
- The first way, you gain net $1 for a win; the second way, you gain $2. (The dollar in escrow does not change that.) They are not the same bet. —Tamfang (talk) 23:37, 2 September 2024 (UTC)
- The calculations by themselves are both correct, but (as noted by Tamfang), they represent different betting propositions. Assume the coin comes up tails. In the first version your loss is the $1 paid in advance, in the second you pay $1 afterwards for losing the bet. So that amounts to the same loss. But now assume the coin comes up heads. In the first you pay $1 in advance and then receive $2. In the second version you just receive $2 without having to make an advance payment. That is clearly more advantageous. To make your second version equivalent to the first, replace "you receive $2" by "you receive $1". --Lambiam 06:00, 3 September 2024 (UTC)
- To supplement to the arithmetical explanations above: It's not a paradox, and since you know which answer is right, you know the basic analysis is to step through it slowly and carefully. This may not be possible in a real-world cash transaction, and this is how quick change scams work (and similar for some street gambling scams) -- in other words, it's not a dumb question, it's not obvious, and if you can think of a truly easy generalized way to work this stuff out for people in real-time social situations, you'll have done a huge service for humanity. (See video examples of the quick change scam from Noah Da Boa and The Real Hustle.) (Right now, most people online say just not to give change to strangers -- the best way to win is not to play.) SamuelRiv (talk) 18:23, 3 September 2024 (UTC)
- Incidentally, one way to see that they are different is to determine the (maximum) amount you would be willing to pay to be in the second position instead of the first. (I get $0.50) Tito Omburo (talk) 20:10, 3 September 2024 (UTC)
- To supplement to the arithmetical explanations above: It's not a paradox, and since you know which answer is right, you know the basic analysis is to step through it slowly and carefully. This may not be possible in a real-world cash transaction, and this is how quick change scams work (and similar for some street gambling scams) -- in other words, it's not a dumb question, it's not obvious, and if you can think of a truly easy generalized way to work this stuff out for people in real-time social situations, you'll have done a huge service for humanity. (See video examples of the quick change scam from Noah Da Boa and The Real Hustle.) (Right now, most people online say just not to give change to strangers -- the best way to win is not to play.) SamuelRiv (talk) 18:23, 3 September 2024 (UTC)
Thanks everyone, I must not have been thinking clearly. Another way to see it is imagine playing twice, winning one and losing one. You end up with $1 instead of with $0. 2601:644:8581:75B0:0:0:0:C030 (talk) 22:34, 3 September 2024 (UTC)
September 5
[edit]Anomalous result
[edit]Solve for x:
- = x - 1.
Here's my approach, step by step:
- Square both sides:
- x + 1 = - 2x + 1
- Cancel 1's:
- x = - 2x
- Collect x's:
- - 3x = 0
- Factorise:
- x (x - 3) = 0
- Solution:
- x = 0 or 3.
So far, so good. Or so it seems.
Plug 3 back into the original equation:
- = 3 - 1
- = 2 = 3 - 1. Correct
Plug 0 back into the original equation:
- = 0 - 1
- = 1 =/= 0 - 1. Incorrect.
I've gone over this a dozen or more times but cannot see what really basic error I must be making.
Any ideas? -- Jack of Oz [pleasantries] 22:06, 5 September 2024 (UTC)
- You didn't do anything really wrong, but just discovered that 0 is an "Extraneous solution to the problem. As our article says, they "result from performing operations that are not invertible for some or all values of the variables involved, which prevents the chain of logical implications from being bidirectional."
- The problem is that squaring is not a one-to-one function, so its inverse, square-rooting needs to be carefully defined. That is, -5 and 5 squared are both 25. So we must pick one of them as "the" square root if we want to define a function, something that spits out just one value "5" when fed "25". If we defined "square root" as Euler did and said either are square roots, then 0 is perfectly good solution. In modern terms it would amount to solving ± = x - 1John Z (talk) 23:19, 5 September 2024 (UTC)
- You proved that implies or Indeed, if (the only true solution), it is the case that or You appear to assume that the converse implication also holds, but this assumption is unwarranted. The false solution is introduced by the squaring operation; it adds solutions of the equation A simpler puzzle based on the same issue is the following:
- Solve for the equation
- Square both sides:
- Plug for into the original equation:
- What gives?
- Solve for the equation
- What we found is the solution of the equation --Lambiam 23:17, 5 September 2024 (UTC)
- Wow, that really is basic. But not obvious. I've been aware forever that the sq rt sign is always taken to be the positive root only of X unless modified by a - or ± in front; whereas, the words "the square root of X" mean both positive and negative roots. What I've never quite focussed on is the dangers of squaring, if I can put it that way. Squaring both sides of an equation is a tool we all learn early in our algebraic studies, but I don't remember this particular hazard ever being brought to my attention. But then, my most recent formal mathematical studies were in 1984 [before my younger son was born; he's now produced three grandchildren for me].
- Thanks for a very enlightening set of answers. -- Jack of Oz [pleasantries] 20:16, 6 September 2024 (UTC)
September 6
[edit]Distance to a line segment
[edit]I am unsure if this is better in Maths or in Computing, but I've chosen Maths.
In a standard planar (x,y) world, a line segment is defined by two endpoints P1=(x1,y1) and P2=(x2,y2).
A third point (anywhere, not necessarily off the line segment extension) is A=(xa,ya).
It is easy to calculate the distance from A to P1 and from A to P2. Sometimes one will be the answer for which part of the line segment is closest to A.
But if A is "perpendicularly within P1~P2", then the closest part of P1~P2 will be somewhere on that line segment.
Is there a standard algorithm for determining the coordinates of the closest part of the line segment to A?
--SGBailey (talk) 22:59, 6 September 2024 (UTC)
- I don't know if it's "standard", but it's not too hard to work out. Let D be the square distance between P1 and P2, so D = (x2-x1)2 + (y2-y1)2. Let E be twice the (signed) area of the triangle P1P2A, so E = x1y2 - x1ya - x2y1 + x2ya + xay1 - xay2. Note that if D=0 then the result is undefined, if E=0 then the result is just A, if x1=x2 then y=ya, and if y1=y2 then x=xa; these facts can be used as checks. Then, using Cramer's rule and a few tricks I'm pretty sure I wouldn't be able to fully explain, I get x = xa + (y2-y1)E/D, y = ya - (x2-x1)E/D. Geometrically, you know that the vector PA is perpendicular to P1P2, which means P can be written A + mP1P2⊥, where P1P2⊥ is normal to P1P2; we can take this as (-(y2-y1), x2-x1). You can then solve for m by finding the area of the triangle P1P2A in two ways. Note that if you just want the distance to the line it's a lot easier, just divide twice the area of the triangle, |E|, by the length of the segment P1P2. I'm assuming here that you want the closest point to the line P1P2, since there's no guarantee that the result P will be between P1 and P2, and if not it technically won't be on the segment P1P2. --RDBury (talk) 05:51, 7 September 2024 (UTC)
- Here is an analytic approach. The line through the distinct points and can be parametrically represented by
- (The usual equation for the line can be obtained by eliminating from this equation.)
- The vector connecting a generic point on the line to a point not on the line is then given by
- The length of this vector is minimized when its square is, which is given by the quantity
- Now solve for and substitute the result in the parametric equation and you have the coordinates of the nearest point. Note: if is on the line, this procedure may lead to division by zero.
- (If done by hand, it helps to first rewrite the parametric equation as
- Also, alternatively, to avoid differentiation, rewrite the equation for in the form The value of minimizing is then given by )
--Lambiam 06:47, 7 September 2024 (UTC)- One advantage to this method is that it works just as well in multiple dimensions. A more general version is: Given k points P1, ... Pk, and l points Q1, ... Ql in Rn, with k+l≤n-1, find a formula for the points P and Q where P is on the affine space determined by the Pi's, Q is on the affine space determined by the Qi's, and P and Q are a close as possible to each other. It might be easier if the affine planes were given by systems of equations instead of as affine hulls. --RDBury (talk) 07:31, 7 September 2024 (UTC)
- PS. It might be worth mentioning that when you solve for lambda, the resulting point P will be the one where AP⊥P1P2, so you're basically just proving what was assumed in the original question. This holds for any smooth curve and even smooth surfaces; if P is the closest point to A on a smooth curve/surface, then PA is perpendicular to the tangent line/plane at P. --RDBury (talk) 01:53, 9 September 2024 (UTC)
Thanks. That is probably resolved, but I need to study the replies. -- SGBailey (talk) 18:02, 8 September 2024 (UTC)
September 11
[edit]120 being the smallest highly composite number
[edit]120 (number) says it is the "smallest highly composite number", but the OEIS contradicts this. Is there any definition of "highly composite number" that would make this true? Batrachoseps (talk) 02:29, 11 September 2024 (UTC)
- It is specifically called the smallest highly composite number not adjacent to any prime. This is a true statement, if perhaps a bit confusingly phrased. Double sharp (talk) 03:08, 11 September 2024 (UTC)
- I have rephrased the statement to clarify it. Double sharp (talk) 03:09, 11 September 2024 (UTC)
- Thanks for rephrasing it. I had interpreted the sentence to mean "120 is the smallest highly composite number" and "120 is the first multiple of six with no adjacent prime number". Batrachoseps (talk) 03:12, 11 September 2024 (UTC)