How to describe and solve this problem mathematically

sxtja

New member
Joined
Aug 2, 2016
Messages
2
I appreciate any hints on how to solve this problem mathematically. I'm also not sure how it should be solved, if it should be calculus then I will move the post to that forum. I tried uploading a spreadsheet but the site would not allow it so I will post the data below, which you can copy to a spreadsheet. The left column is the item #, which can be ignored, and the next column is a set of observations for each item, I'm calling this variable z.

13345333.2
10894644.4
1734405
18552420.8
7681958.2
12691668.4
7851553.2
5601414.4
2981391.6
14041088.2
7831039.6
1637780
746723.6
1562711.6
1271650
306630.2
1816582.8
994533.2
1649491.2
1779440.6
95414.4
302393
1000390.2
65388.6
193383
1059336
1255334.4
1329313.8
1689310.4
2177282.8
805270.2
464253.8
1201252
1273242.4
1378242.2
1653241.6
1106192.6
512192.4
2094178.4
167137.2
1621136.6
2148134
1546131.8
401131
967101.2
159699.4
155775.8
80973.8
104573
208266
16165.8
52160
102957.6
120250.6
104246.8
199246.4
93341.4
165539.8
185039.6
86235
19233.6
194031.6
150630.2
208030
91128
172527.6
201826.8
13025
156924.4
173022.8
22522.8
19622
199420.8
122018.2
93816.6
137616.2
119314
25113.4
125012.4
72710.4
20939.2
13808
20136.6
13986.6
2723.8
13463
10912.6
7502.6
15432.4
1781.8
8871.4
15041
11411
21860.8
6520.8
11180.6
10400.6
8420.4
4920.4
3930.2
10500.2
5650
16100
1790
12030
15590
22020
17410
14490

There are 109 items. I sorted the items by descending value of z. I need to find the solution such that 5000 divided by (number of items) will be greater than the minimum value of z (I can delete items/observations). As an example, if I take 5000/ 109, it is 45.9, which is greater than 0. By removing the bottom items below that value, I can take 5000/ 56, which still does not work. By trial and error I then used 46 and 44, which is the solution, as 5000/44 = 113.6 and the 44th item has a value of 131, which is greater than 113.6. I know there must be some way to express this mathematically but I have not figured it out. Thanks for any help!
 
I appreciate any hints on how to solve this problem mathematically. I'm also not sure how it should be solved, if it should be calculus then I will move the post to that forum. I tried uploading a spreadsheet but the site would not allow it so I will post the data below, which you can copy to a spreadsheet. The left column is the item #, which can be ignored, and the next column is a set of observations for each item, I'm calling this variable z.
...
There are 109 items. I sorted the items by descending value of z. I need to find the solution such that 5000 divided by (number of items) will be greater than the minimum value of z (I can delete items/observations). As an example, if I take 5000/ 109, it is 45.9, which is greater than 0. By removing the bottom items below that value, I can take 5000/ 56, which still does not work. By trial and error I then used 46 and 44, which is the solution, as 5000/44 = 113.6 and the 44th item has a value of 131, which is greater than 113.6. I know there must be some way to express this mathematically but I have not figured it out. Thanks for any help!
13345333.2 1000390.2 967101.2 201826.8 15432.4
10894644.4 65388.6 159699.4 13025 1781.8
1734405 193383 155775.8 156924.4 8871.4
18552420.8 1059336 80973.8 173022.8 15041
7681958.2 1255334.4 104573 22522.8 11411
12691668.4 1329313.8 208266 19622 21860.8
7851553.2 1689310.4 16165.8 199420.8 6520.8
5601414.4 2177282.8 52160 122018.2 11180.6
2981391.6 805270.2 102957.6 93816.6 10400.6
14041088.2 464253.8 120250.6 137616.2 8420.4
7831039.6 1201252 104246.8 119314 4920.4
1637780 1273242.4 199246.4 25113.4 3930.2
746723.6 1378242.2 93341.4 125012.4 10500.2
1562711.6 1653241.6 165539.8 72710.4 5650
1271650 1106192.6 185039.6 20939.2 16100
306630.2 512192.4 86235 13808 1790
1816582.8 2094178.4 19233.6 20136.6 12030
994533.2 167137.2 194031.6 13986.6 15590
1649491.2 1621136.6 150630.2 2723.8 22020
1779440.6 2148134 208030 13463 17410
95414.4 1546131.8 91128 10912.6 14490
302393 401131 172527.6 7502.6
Are you talking about a way to express this mathematically or a way to compute what you want automatically? Expressing something mathematically is not always a simple formula. In your case I think one might write
Given the real numbers ai, i= 1, 2, 3,, ...., n with aj < ak if j > k, find a m such that 5000/m > am
There are other mathematical symbols which could make the statement even more concise but none of those tell you how to solve the problem.

The way I would go about solving the problem with a spread sheet is add two new columns. For ease of discussion, let column A be the items number, column B be the item value (your z), column C be the index value, and column D a computed value discussed after describing column C. Column C comes about after you have sorted columns A and B with column B (your z) in descending order. Then add the index in column C: 1 would go in the row next to 5333.2, 2 in the row next to 4644.4, 3 in the row next to 4405, etc.[put a 1 in for the first item, then the next is just the last plus 1 which can be copied and pasted for all but the first item] Now the formula for column D would be 5000 divided by the appropriate index value from column C minus the appropriate value in column B. If you format this column so that negative numbers are red [maybe easiest done by formatting as currency], then the change from black to red would give you a solution.

As an example using your numbers, all item numbers from 1 to 44 are red and all those following are black.
 
Last edited by a moderator:
This is magnificent! Yes, you are correct; I realized what I want was a way to solve it automatically. I am amazed by how concise and elegant your solution is. It didn't occur to me at all.
 
Top