Wikipedia:Reference desk/Archives/Mathematics/2024 November 13
Mathematics desk | ||
---|---|---|
< November 12 | << Oct | November | Dec >> | November 14 > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is a transcluded 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 13
[edit]Math sequence problem (is it solvable?)
[edit]I am looking at a "math quiz" problem book and it has the following question. I am changing the numbers to simplify it and avoid copyright: You have counts for a rolling 12-month period of customers. For example, the one year count in January is the count of customers from Feb of the year before to Jan of the current year. Feb is the count from Mar to Feb, and so on. The 12 counts for this year (Jan to Dec) are 100, 110, 105, 200, 150, 170, 150, 100, 200, 150, 175, 125. What is the count of customers for each month? So, I know that the Feb-Jan count is 100 and the Mar-Feb count is 110. That means that the count for Feb of this year is 10 more than the count of Feb of last year because I removed Feb of last year and added Feb of this year. But, I don't know what that count is. I can only say it is 10 more. I can do that for every month, telling you what the difference is between last year and this year as a net change. Is this solvable or is this a weird case where the actual numbers for the counts somehow mean something silly and a math geek would say "Oh my! That's the sum of the hickuramabiti sequence that only 3 people know about so I know the whole number sequence!" 68.187.174.155 (talk) 15:36, 13 November 2024 (UTC)
- You have 12 linear equations with 23 unknowns. In general, you cannot expect a system of linear equations with more unknowns than equations to be solvable. In special cases, such a system may be solvable for at least some of the unknowns. This is not such a special case.
- If you ignore the fact that customer counts cannot be negative, there are many solutions. For example, one solution is given by [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 19, 4, 104, −41, 29, −11, −41, 109, −41, 34, −41]. Another one is [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, −10, 20, 5, 105, −40, 30, −10, −40, 110, −40, 35, −40]. For the 12-month counts given above no solution exists without negative values.
- If an actual quiz of this form has a unique solution, it can only be due to the constraint of not allowing negative values. --Lambiam 17:42, 13 November 2024 (UTC)
- (edit conflict)Name the counts for each month FebP to DecC, where P stands for the previous year and C stands for the current year. These are 23 variables and there is a system of 12 equations in these variables. If the variables can take on any values there are an infinite number of solutions to this system, but I think we're meant to assume that the counts are ≥ 0. (Integers as well; without knowing the counts given in the original problem it's unclear whether this is important.) This imposes additional constraints on the possible solution and the result may be there is exactly one possible solution or none at all. To see how a problem of this type might have no solutions, let's look at a simpler version where we're looking at three month sums over three months. There are 5 variables in this case, say Jan, Feb, Mar, Apr, May. Lets say the sums are given as:
- Jan-Mar: 10, Feb-Apr: 50, Mar-May 10.
- If we compute
- (Jan-Mar) - (Feb-Apr) + (Mar-May)
- in terms of the variables, we get
- Jan+Feb+Mar-Feb-Mar-Apr+Mar+Apr+May = Jan+Mar+May ≥ 0.
- But if we compute it in terms of the given totals the result is
- 10-50+10 = -30 < 0.
- This is a contradiction so no solutions are possible. It turns out that something like this happens with the values you made up and there are no solutions to the problem given. If you let JanSum, ... DecSum be the rolling sums, and compute
- JanSum - FebSum + MarSum - AprSum + MaySum - JunSum + AugSum - SepSum + OctSum - NovSum + DecSum (with JulSum left out),
- then you get (according to my calculations)
- FebP+AprP+JunP+SepP+NovP+JanC+MarC+MayC+JulC+AugC+OctC+DecC ≥ 0
- in terms of the variables. But if we evaluate this in terms of the given values it's (again, according to my calculations)
- 100-110+105-200+150-170+100-200+150-175+125 = -125 < 0,
- so there are no possible solutions. Notice that both cases involved looking at particularly opportune alternating sums of the rolling sums, which produce a nonnegative combination of the variables on one side and a negative number on the other side. Suppose that there is no such opportune alternating sum where the total is <0, but there is one where the total is =0. Then all the individual variables involved must be 0 and this may be enough information to narrow down the number of solutions to exactly 1. I imagine that's how the problem given in your book is set up and the puzzle is to find an alternating sum with this property. But I have an unfair advantage here because sometime in the previous century I took a course in Linear programming which taught me general methods for solving systems of equations and inequalities. So my approach would be to enter the appropriate numbers into a spreadsheet, apply the appropriate algorithm, and read off the solution when it's done. Having specialized knowledge would be a help, though I assume there are more than 3 people who are familiar with linear programming, but I think getting the inspiration to look at alternating sums, and a certain amount of trial and error, would allow you to find the solution without it. --RDBury (talk) 17:48, 13 November 2024 (UTC)
- Thanks both. Yes, I did make up the numbers. I bet the numbers in the book do have a solution. It looks like it is a matter of trying a value for the first month and seeing what comes up every other month based on that to see if it is all positive. Then, you have an answer. It doesn't feel much like math to me in comparison to the other problems in the book which are all problems you can solve easily by making sets or comparing the order of things. 68.187.174.155 (talk) 17:52, 13 November 2024 (UTC)
- With the correct numbers for which there is (presumably) a solution, you can represent the problem as a system of linear equations and compute the echelon form of the system. From the echelon form, it is possible to read off a particular solution (where you allow negative numbers of customers). The nullspace of the system is easy to calculate, and from it you can also find a particular solution that satisfies the constraint (if one exists), verify uniqueness (if true), or confirm non-existence. Tito Omburo (talk) 20:59, 13 November 2024 (UTC)
- Thanks both. Yes, I did make up the numbers. I bet the numbers in the book do have a solution. It looks like it is a matter of trying a value for the first month and seeing what comes up every other month based on that to see if it is all positive. Then, you have an answer. It doesn't feel much like math to me in comparison to the other problems in the book which are all problems you can solve easily by making sets or comparing the order of things. 68.187.174.155 (talk) 17:52, 13 November 2024 (UTC)
I confirm that there are no solutions subject to the contraint that the number of customers is non-negative (even allowing fractional numbers of customers), although the verification is a bit of a brute to write out. Tito Omburo (talk) 18:09, 13 November 2024 (UTC)
- Here is a rather painless verification. Use the names FebP, ..., DecC as above. Let JanT stand for the running 12-month total of the summation ending with JanC, and likewise for the next 11 months. So JanT = 100, FebT = 110, MarT = 105, ..., DecT = 125. We have FebT − JanT = FebC − FebP, MarT − FebT = MarC − MarP, ..., DecT − NovT = DecC − DecP.
- Require each count to be nonnegative. From MarC − MarP = MarT − FebT = 105 − 110 = −5, we have MarP ≥ MarP − MarC = 5. We find similarly the lower bounds MayP ≥ 50, JulP ≥ 20, AugP ≥ 50, OctP ≥ 50 and DecP ≥ 50. So JanT = FebP + ... + JanC ≥ 5 + 50 + 20 + 50 + 50 + 50 = 225. This contradicts JanT = 100, so the constraint excludes all unconstrained solutions. --Lambiam 18:37, 13 November 2024 (UTC)
- Thanks again for the help. I feel that I should give the numbers from the book. I don't think listing some numbers is going to upset anyone, but without them, I feel that those who looked into this problem feel let down. The numbers from the book are: 24966, 24937, 25300, 25055, 22914, 25832, 25820, 25468, 25526, 25335, 25331, 25370. There is supposed to be one solution. I think it is implied that the request is for the minimum number of customers per month, but it doesn't make that very clear.
- Edit: It appears this problem was removed and replaced with a complerely different problem in later books. So, the publishers likely decided it either doesn't have a unique answer (which is my bet) or it is simply a bad problem to include. Every other problem in the book is logical using geometry, algebra, and maybe some simple set comparisons. So, this is very out of place. 68.187.174.155 (talk) 12:11, 14 November 2024 (UTC)
- Indeed the solution is not unique in that case. One solution is (29,0,245,2141,0,12,352,0,191,4,0,21992,0,363,0,0,2918,0,0,58,0,0,39), and there is obvious slackness. Tito Omburo (talk) 14:24, 14 November 2024 (UTC)
- It is the only solution with JanC ≥ 21992. To go from zero to almost twenty-two thousand customers in one month is spectacular. To then loose all in one month is tragicomedy. --Lambiam 20:33, 14 November 2024 (UTC)
- Indeed the solution is not unique in that case. One solution is (29,0,245,2141,0,12,352,0,191,4,0,21992,0,363,0,0,2918,0,0,58,0,0,39), and there is obvious slackness. Tito Omburo (talk) 14:24, 14 November 2024 (UTC)