Optimising the Selection of MaxValue in AssociationOptimising 2D binning codeMathematica List Selectionselection based on values of other listConstructing lists in an efficient wayImproving a selection routineSelect Consecutive Association rows based on patternSelection based on truth tableHow to negate a boolean selection criteriaSorting an Association by FindMaximumOptimising Table wrapping over a Select

Did Voldemort kill his father before finding out about Horcruxes?

How can the electric potential be zero at a point where the electric field isn't, if that field can give a test charge kinetic energy?

Increasing muscle power without increasing volume

Why is the total probability theorem expressed in this way?

How possible is a successful landing just with 1 wing?

ArcPy Delete Function not working inside for loop?

Was Apollo 13 radio blackout on reentry longer than expected?

Is this Android phone Android 9.0 or Android 6.0?

Use chown -R while excluding one or two files

What is the point of a constraint expression on a non-templated function?

Cover a cube with four-legged walky-squares!

Kepler space telescope undetected planets

A verb to describe specific positioning of three layers

Why does "git status" show I'm on the master branch and "git branch" does not in a newly created repository?

Which GPUs to get for Mathematical Optimization (if any...)?

How to have a continuous player experience in a setting that's likely to favor TPKs?

Credit card details stolen every 1-2 years. What am I doing wrong?

How to color a tag in a math equation?

Where are the rest of the Dwarves of Nidavellir?

How could an animal "smell" carbon monoxide?

What are the basics of commands in Minecraft Java Edition?

Will this tire fail its MOT?

Does inertia keep a rotating object rotating forever, or something else?

What would be the safest way to drop thousands of small, hard objects from a typical, high wing, GA airplane?



Optimising the Selection of MaxValue in Association


Optimising 2D binning codeMathematica List Selectionselection based on values of other listConstructing lists in an efficient wayImproving a selection routineSelect Consecutive Association rows based on patternSelection based on truth tableHow to negate a boolean selection criteriaSorting an Association by FindMaximumOptimising Table wrapping over a Select






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3












$begingroup$


Suppose I have the following Association:



f=<|"vanilla:veal" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 + 
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 480.615 x^17 + 261.089 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"leek:white_wine" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3772.08 x^4 + 5369.78 x^5 + 6306.37 x^6 + 6699.93 x^7 +
6523.46 x^8 + 5443.65 x^9 + 4606.18 x^10 + 3463.31 x^11 +
2651.02 x^12 + 2101.95 x^13 + 1520.17 x^14 + 1073.14 x^15 +
755.953 x^16 + 476.793 x^17 + 264.901 x^18 + 202.406 x^19 +
111.822 x^20 + 53.8665 x^21 + 29.2147 x^22 + 27.2539 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"orange:shiitake" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2655.86 x^12 + 2099.05 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.995 x^18 + 203.356 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"pepper:smoked_sausage" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3773.07 x^4 + 5370.77 x^5 + 6303.41 x^6 + 6708.77 x^7 +
6522.48 x^8 + 5432.91 x^9 + 4612.02 x^10 + 3461.37 x^11 +
2650.05 x^12 + 2100.02 x^13 + 1520.17 x^14 + 1075.06 x^15 +
754.037 x^16 + 481.571 x^17 + 262.042 x^18 + 203.356 x^19 +
109.927 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"carrot:celery" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3787.92 x^4 + 5375.7 x^5 + 6322.12 x^6 + 6740.18 x^7 +
6545.98 x^8 + 5464.16 x^9 + 4600.34 x^10 + 3451.66 x^11 +
2659.74 x^12 + 2084.56 x^13 + 1512.46 x^14 + 1049.12 x^15 +
733.916 x^16 + 467.238 x^17 + 254.419 x^18 + 199.555 x^19 +
107.084 x^20 + 47.2513 x^21 + 31.0995 x^22 + 23.4948 x^23 +
18.7435 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
0.926702 x^28 + 2.77225 x^29 + 1.84293 x^30 +
0.918848 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"cane_molasses:cumin" -> (353.073 x + 1137.02 x^2 + 2303.76 x^3 +
3769.12 x^4 + 5371.76 x^5 + 6304.4 x^6 + 6706.81 x^7 +
6518.57 x^8 + 5447.56 x^9 + 4618.84 x^10 + 3458.46 x^11 +
2655.86 x^12 + 2105.81 x^13 + 1514.39 x^14 + 1076.98 x^15 +
749.246 x^16 + 479.66 x^17 + 255.372 x^18 + 208.107 x^19 +
108.031 x^20 + 51.9764 x^21 + 24.5026 x^22 + 28.1937 x^23 +
18.7435 x^24 + 5.60733 x^25 + 2.79581 x^26 + 0.929319 x^27 +
2.7801 x^28 + 2.77225 x^29 + 1.8377 x^31)/(354 x + 1143 x^2 +
2320 x^3 + 3811 x^4 + 5441 x^5 + 6403 x^6 + 6829 x^7 +
6658 x^8 + 5571 x^9 + 4737 x^10 + 3560 x^11 + 2741 x^12 +
2174 x^13 + 1579 x^14 + 1120 x^15 + 789 x^16 + 502 x^17 +
275 x^18 + 215 x^19 + 117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 +
21 x^24 + 6 x^25 + 4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 +
2 x^31),
"lettuce:turnip" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6519.54 x^8 + 5438.77 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"corn_grit:pork_sausage" -> (353.073 x + 1137.02 x^2 + 2302.77 x^3 +
3771.09 x^4 + 5371.76 x^5 + 6301.45 x^6 + 6701.9 x^7 +
6519.54 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.98 x^13 + 1519.2 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
2.7801 x^28 + 1.84817 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"avocado:pumpkin" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6303.41 x^6 + 6702.88 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"chive:mandarin_peel" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6704.84 x^7 +
6517.59 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"anise_seed:coconut" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.98 x^13 + 1521.13 x^14 + 1075.06 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31)|>


which contains rational functions. I want to select the ones that have y value above 1 for a specific range of x, so I do:



Select[f, MaxValue[#, 2/382 <= x <= 1, x] > 1 &] // AbsoluteTiming


in this case none of them are, so I get:






The point is that my original list contains 30000 of these polynomials and the command I have for selection is taking a lot of time. For 10 of them as above it took 1.8 seconds. I wonder how can I break this time down without losing the dictionary, namely what key is related to what polynomial?



I know if I only look at values the time would be reduced, but then I will not know the output would belong to which key from the association.










share|improve this question











$endgroup$







  • 1




    $begingroup$
    If you have 8 cores, and use ParallelTable, that would take less than 12 minutes. Is that too long?
    $endgroup$
    – rhermans
    9 hours ago











  • $begingroup$
    I have 4 so presume it will take 24', is there any way to chunk the code down into easier-to-handle part?
    $endgroup$
    – William
    9 hours ago










  • $begingroup$
    For all of the polynomials you give, the maximum lies at the lower edge of your search interval. Maybe there's something generalizable here: maybe it's possible to exclude a large number of polynomials by just looking at the values (and derivatives) at the end points.
    $endgroup$
    – Roman
    7 hours ago

















3












$begingroup$


Suppose I have the following Association:



f=<|"vanilla:veal" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 + 
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 480.615 x^17 + 261.089 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"leek:white_wine" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3772.08 x^4 + 5369.78 x^5 + 6306.37 x^6 + 6699.93 x^7 +
6523.46 x^8 + 5443.65 x^9 + 4606.18 x^10 + 3463.31 x^11 +
2651.02 x^12 + 2101.95 x^13 + 1520.17 x^14 + 1073.14 x^15 +
755.953 x^16 + 476.793 x^17 + 264.901 x^18 + 202.406 x^19 +
111.822 x^20 + 53.8665 x^21 + 29.2147 x^22 + 27.2539 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"orange:shiitake" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2655.86 x^12 + 2099.05 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.995 x^18 + 203.356 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"pepper:smoked_sausage" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3773.07 x^4 + 5370.77 x^5 + 6303.41 x^6 + 6708.77 x^7 +
6522.48 x^8 + 5432.91 x^9 + 4612.02 x^10 + 3461.37 x^11 +
2650.05 x^12 + 2100.02 x^13 + 1520.17 x^14 + 1075.06 x^15 +
754.037 x^16 + 481.571 x^17 + 262.042 x^18 + 203.356 x^19 +
109.927 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"carrot:celery" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3787.92 x^4 + 5375.7 x^5 + 6322.12 x^6 + 6740.18 x^7 +
6545.98 x^8 + 5464.16 x^9 + 4600.34 x^10 + 3451.66 x^11 +
2659.74 x^12 + 2084.56 x^13 + 1512.46 x^14 + 1049.12 x^15 +
733.916 x^16 + 467.238 x^17 + 254.419 x^18 + 199.555 x^19 +
107.084 x^20 + 47.2513 x^21 + 31.0995 x^22 + 23.4948 x^23 +
18.7435 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
0.926702 x^28 + 2.77225 x^29 + 1.84293 x^30 +
0.918848 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"cane_molasses:cumin" -> (353.073 x + 1137.02 x^2 + 2303.76 x^3 +
3769.12 x^4 + 5371.76 x^5 + 6304.4 x^6 + 6706.81 x^7 +
6518.57 x^8 + 5447.56 x^9 + 4618.84 x^10 + 3458.46 x^11 +
2655.86 x^12 + 2105.81 x^13 + 1514.39 x^14 + 1076.98 x^15 +
749.246 x^16 + 479.66 x^17 + 255.372 x^18 + 208.107 x^19 +
108.031 x^20 + 51.9764 x^21 + 24.5026 x^22 + 28.1937 x^23 +
18.7435 x^24 + 5.60733 x^25 + 2.79581 x^26 + 0.929319 x^27 +
2.7801 x^28 + 2.77225 x^29 + 1.8377 x^31)/(354 x + 1143 x^2 +
2320 x^3 + 3811 x^4 + 5441 x^5 + 6403 x^6 + 6829 x^7 +
6658 x^8 + 5571 x^9 + 4737 x^10 + 3560 x^11 + 2741 x^12 +
2174 x^13 + 1579 x^14 + 1120 x^15 + 789 x^16 + 502 x^17 +
275 x^18 + 215 x^19 + 117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 +
21 x^24 + 6 x^25 + 4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 +
2 x^31),
"lettuce:turnip" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6519.54 x^8 + 5438.77 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"corn_grit:pork_sausage" -> (353.073 x + 1137.02 x^2 + 2302.77 x^3 +
3771.09 x^4 + 5371.76 x^5 + 6301.45 x^6 + 6701.9 x^7 +
6519.54 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.98 x^13 + 1519.2 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
2.7801 x^28 + 1.84817 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"avocado:pumpkin" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6303.41 x^6 + 6702.88 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"chive:mandarin_peel" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6704.84 x^7 +
6517.59 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"anise_seed:coconut" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.98 x^13 + 1521.13 x^14 + 1075.06 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31)|>


which contains rational functions. I want to select the ones that have y value above 1 for a specific range of x, so I do:



Select[f, MaxValue[#, 2/382 <= x <= 1, x] > 1 &] // AbsoluteTiming


in this case none of them are, so I get:






The point is that my original list contains 30000 of these polynomials and the command I have for selection is taking a lot of time. For 10 of them as above it took 1.8 seconds. I wonder how can I break this time down without losing the dictionary, namely what key is related to what polynomial?



I know if I only look at values the time would be reduced, but then I will not know the output would belong to which key from the association.










share|improve this question











$endgroup$







  • 1




    $begingroup$
    If you have 8 cores, and use ParallelTable, that would take less than 12 minutes. Is that too long?
    $endgroup$
    – rhermans
    9 hours ago











  • $begingroup$
    I have 4 so presume it will take 24', is there any way to chunk the code down into easier-to-handle part?
    $endgroup$
    – William
    9 hours ago










  • $begingroup$
    For all of the polynomials you give, the maximum lies at the lower edge of your search interval. Maybe there's something generalizable here: maybe it's possible to exclude a large number of polynomials by just looking at the values (and derivatives) at the end points.
    $endgroup$
    – Roman
    7 hours ago













3












3








3





$begingroup$


Suppose I have the following Association:



f=<|"vanilla:veal" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 + 
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 480.615 x^17 + 261.089 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"leek:white_wine" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3772.08 x^4 + 5369.78 x^5 + 6306.37 x^6 + 6699.93 x^7 +
6523.46 x^8 + 5443.65 x^9 + 4606.18 x^10 + 3463.31 x^11 +
2651.02 x^12 + 2101.95 x^13 + 1520.17 x^14 + 1073.14 x^15 +
755.953 x^16 + 476.793 x^17 + 264.901 x^18 + 202.406 x^19 +
111.822 x^20 + 53.8665 x^21 + 29.2147 x^22 + 27.2539 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"orange:shiitake" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2655.86 x^12 + 2099.05 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.995 x^18 + 203.356 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"pepper:smoked_sausage" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3773.07 x^4 + 5370.77 x^5 + 6303.41 x^6 + 6708.77 x^7 +
6522.48 x^8 + 5432.91 x^9 + 4612.02 x^10 + 3461.37 x^11 +
2650.05 x^12 + 2100.02 x^13 + 1520.17 x^14 + 1075.06 x^15 +
754.037 x^16 + 481.571 x^17 + 262.042 x^18 + 203.356 x^19 +
109.927 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"carrot:celery" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3787.92 x^4 + 5375.7 x^5 + 6322.12 x^6 + 6740.18 x^7 +
6545.98 x^8 + 5464.16 x^9 + 4600.34 x^10 + 3451.66 x^11 +
2659.74 x^12 + 2084.56 x^13 + 1512.46 x^14 + 1049.12 x^15 +
733.916 x^16 + 467.238 x^17 + 254.419 x^18 + 199.555 x^19 +
107.084 x^20 + 47.2513 x^21 + 31.0995 x^22 + 23.4948 x^23 +
18.7435 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
0.926702 x^28 + 2.77225 x^29 + 1.84293 x^30 +
0.918848 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"cane_molasses:cumin" -> (353.073 x + 1137.02 x^2 + 2303.76 x^3 +
3769.12 x^4 + 5371.76 x^5 + 6304.4 x^6 + 6706.81 x^7 +
6518.57 x^8 + 5447.56 x^9 + 4618.84 x^10 + 3458.46 x^11 +
2655.86 x^12 + 2105.81 x^13 + 1514.39 x^14 + 1076.98 x^15 +
749.246 x^16 + 479.66 x^17 + 255.372 x^18 + 208.107 x^19 +
108.031 x^20 + 51.9764 x^21 + 24.5026 x^22 + 28.1937 x^23 +
18.7435 x^24 + 5.60733 x^25 + 2.79581 x^26 + 0.929319 x^27 +
2.7801 x^28 + 2.77225 x^29 + 1.8377 x^31)/(354 x + 1143 x^2 +
2320 x^3 + 3811 x^4 + 5441 x^5 + 6403 x^6 + 6829 x^7 +
6658 x^8 + 5571 x^9 + 4737 x^10 + 3560 x^11 + 2741 x^12 +
2174 x^13 + 1579 x^14 + 1120 x^15 + 789 x^16 + 502 x^17 +
275 x^18 + 215 x^19 + 117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 +
21 x^24 + 6 x^25 + 4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 +
2 x^31),
"lettuce:turnip" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6519.54 x^8 + 5438.77 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"corn_grit:pork_sausage" -> (353.073 x + 1137.02 x^2 + 2302.77 x^3 +
3771.09 x^4 + 5371.76 x^5 + 6301.45 x^6 + 6701.9 x^7 +
6519.54 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.98 x^13 + 1519.2 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
2.7801 x^28 + 1.84817 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"avocado:pumpkin" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6303.41 x^6 + 6702.88 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"chive:mandarin_peel" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6704.84 x^7 +
6517.59 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"anise_seed:coconut" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.98 x^13 + 1521.13 x^14 + 1075.06 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31)|>


which contains rational functions. I want to select the ones that have y value above 1 for a specific range of x, so I do:



Select[f, MaxValue[#, 2/382 <= x <= 1, x] > 1 &] // AbsoluteTiming


in this case none of them are, so I get:






The point is that my original list contains 30000 of these polynomials and the command I have for selection is taking a lot of time. For 10 of them as above it took 1.8 seconds. I wonder how can I break this time down without losing the dictionary, namely what key is related to what polynomial?



I know if I only look at values the time would be reduced, but then I will not know the output would belong to which key from the association.










share|improve this question











$endgroup$




Suppose I have the following Association:



f=<|"vanilla:veal" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 + 
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 480.615 x^17 + 261.089 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"leek:white_wine" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3772.08 x^4 + 5369.78 x^5 + 6306.37 x^6 + 6699.93 x^7 +
6523.46 x^8 + 5443.65 x^9 + 4606.18 x^10 + 3463.31 x^11 +
2651.02 x^12 + 2101.95 x^13 + 1520.17 x^14 + 1073.14 x^15 +
755.953 x^16 + 476.793 x^17 + 264.901 x^18 + 202.406 x^19 +
111.822 x^20 + 53.8665 x^21 + 29.2147 x^22 + 27.2539 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"orange:shiitake" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2655.86 x^12 + 2099.05 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.995 x^18 + 203.356 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"pepper:smoked_sausage" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3773.07 x^4 + 5370.77 x^5 + 6303.41 x^6 + 6708.77 x^7 +
6522.48 x^8 + 5432.91 x^9 + 4612.02 x^10 + 3461.37 x^11 +
2650.05 x^12 + 2100.02 x^13 + 1520.17 x^14 + 1075.06 x^15 +
754.037 x^16 + 481.571 x^17 + 262.042 x^18 + 203.356 x^19 +
109.927 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"carrot:celery" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3787.92 x^4 + 5375.7 x^5 + 6322.12 x^6 + 6740.18 x^7 +
6545.98 x^8 + 5464.16 x^9 + 4600.34 x^10 + 3451.66 x^11 +
2659.74 x^12 + 2084.56 x^13 + 1512.46 x^14 + 1049.12 x^15 +
733.916 x^16 + 467.238 x^17 + 254.419 x^18 + 199.555 x^19 +
107.084 x^20 + 47.2513 x^21 + 31.0995 x^22 + 23.4948 x^23 +
18.7435 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
0.926702 x^28 + 2.77225 x^29 + 1.84293 x^30 +
0.918848 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"cane_molasses:cumin" -> (353.073 x + 1137.02 x^2 + 2303.76 x^3 +
3769.12 x^4 + 5371.76 x^5 + 6304.4 x^6 + 6706.81 x^7 +
6518.57 x^8 + 5447.56 x^9 + 4618.84 x^10 + 3458.46 x^11 +
2655.86 x^12 + 2105.81 x^13 + 1514.39 x^14 + 1076.98 x^15 +
749.246 x^16 + 479.66 x^17 + 255.372 x^18 + 208.107 x^19 +
108.031 x^20 + 51.9764 x^21 + 24.5026 x^22 + 28.1937 x^23 +
18.7435 x^24 + 5.60733 x^25 + 2.79581 x^26 + 0.929319 x^27 +
2.7801 x^28 + 2.77225 x^29 + 1.8377 x^31)/(354 x + 1143 x^2 +
2320 x^3 + 3811 x^4 + 5441 x^5 + 6403 x^6 + 6829 x^7 +
6658 x^8 + 5571 x^9 + 4737 x^10 + 3560 x^11 + 2741 x^12 +
2174 x^13 + 1579 x^14 + 1120 x^15 + 789 x^16 + 502 x^17 +
275 x^18 + 215 x^19 + 117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 +
21 x^24 + 6 x^25 + 4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 +
2 x^31),
"lettuce:turnip" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6519.54 x^8 + 5438.77 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"corn_grit:pork_sausage" -> (353.073 x + 1137.02 x^2 + 2302.77 x^3 +
3771.09 x^4 + 5371.76 x^5 + 6301.45 x^6 + 6701.9 x^7 +
6519.54 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.98 x^13 + 1519.2 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
2.7801 x^28 + 1.84817 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"avocado:pumpkin" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6303.41 x^6 + 6702.88 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"chive:mandarin_peel" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6704.84 x^7 +
6517.59 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31),
"anise_seed:coconut" -> (353.073 x + 1137.02 x^2 + 2301.78 x^3 +
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5439.75 x^9 + 4612.99 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.98 x^13 + 1521.13 x^14 + 1075.06 x^15 +
755.953 x^16 + 479.66 x^17 + 262.042 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31)|>


which contains rational functions. I want to select the ones that have y value above 1 for a specific range of x, so I do:



Select[f, MaxValue[#, 2/382 <= x <= 1, x] > 1 &] // AbsoluteTiming


in this case none of them are, so I get:






The point is that my original list contains 30000 of these polynomials and the command I have for selection is taking a lot of time. For 10 of them as above it took 1.8 seconds. I wonder how can I break this time down without losing the dictionary, namely what key is related to what polynomial?



I know if I only look at values the time would be reduced, but then I will not know the output would belong to which key from the association.







list-manipulation filtering maximum






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 8 hours ago









Carl Woll

87.2k3 gold badges114 silver badges222 bronze badges




87.2k3 gold badges114 silver badges222 bronze badges










asked 10 hours ago









WilliamWilliam

1,0066 silver badges8 bronze badges




1,0066 silver badges8 bronze badges







  • 1




    $begingroup$
    If you have 8 cores, and use ParallelTable, that would take less than 12 minutes. Is that too long?
    $endgroup$
    – rhermans
    9 hours ago











  • $begingroup$
    I have 4 so presume it will take 24', is there any way to chunk the code down into easier-to-handle part?
    $endgroup$
    – William
    9 hours ago










  • $begingroup$
    For all of the polynomials you give, the maximum lies at the lower edge of your search interval. Maybe there's something generalizable here: maybe it's possible to exclude a large number of polynomials by just looking at the values (and derivatives) at the end points.
    $endgroup$
    – Roman
    7 hours ago












  • 1




    $begingroup$
    If you have 8 cores, and use ParallelTable, that would take less than 12 minutes. Is that too long?
    $endgroup$
    – rhermans
    9 hours ago











  • $begingroup$
    I have 4 so presume it will take 24', is there any way to chunk the code down into easier-to-handle part?
    $endgroup$
    – William
    9 hours ago










  • $begingroup$
    For all of the polynomials you give, the maximum lies at the lower edge of your search interval. Maybe there's something generalizable here: maybe it's possible to exclude a large number of polynomials by just looking at the values (and derivatives) at the end points.
    $endgroup$
    – Roman
    7 hours ago







1




1




$begingroup$
If you have 8 cores, and use ParallelTable, that would take less than 12 minutes. Is that too long?
$endgroup$
– rhermans
9 hours ago





$begingroup$
If you have 8 cores, and use ParallelTable, that would take less than 12 minutes. Is that too long?
$endgroup$
– rhermans
9 hours ago













$begingroup$
I have 4 so presume it will take 24', is there any way to chunk the code down into easier-to-handle part?
$endgroup$
– William
9 hours ago




$begingroup$
I have 4 so presume it will take 24', is there any way to chunk the code down into easier-to-handle part?
$endgroup$
– William
9 hours ago












$begingroup$
For all of the polynomials you give, the maximum lies at the lower edge of your search interval. Maybe there's something generalizable here: maybe it's possible to exclude a large number of polynomials by just looking at the values (and derivatives) at the end points.
$endgroup$
– Roman
7 hours ago




$begingroup$
For all of the polynomials you give, the maximum lies at the lower edge of your search interval. Maybe there's something generalizable here: maybe it's possible to exclude a large number of polynomials by just looking at the values (and derivatives) at the end points.
$endgroup$
– Roman
7 hours ago










3 Answers
3






active

oldest

votes


















4












$begingroup$

Maybe you can use Reduce instead of MaxValue. For instance, the "vanilla:veal" rational function is:



p = (353.073 x + 1137.02 x^2 + 2301.78 x^3 + 
3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
755.953 x^16 + 480.615 x^17 + 261.089 x^18 + 204.306 x^19 +
110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31)


Compare:



MaxValue[p, 2/382 <= x <= 1, x] //AbsoluteTiming
Quiet[Reduce[p > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



0.133098, 0.976077



0.041712, False




Another example where the result isn't false:



MaxValue[p+.5, 2/382 <= x <= 1, x] //AbsoluteTiming
Quiet[Reduce[p+.5 > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



0.128614, 1.47608



0.041923, 0.0390256 < x <= 1.




So, using Reduce is about 3 times faster. Combine it with a ParallelTable approach as in @rherman's answer.






share|improve this answer









$endgroup$




















    3












    $begingroup$

    This would take less than 25 minutes with 4 cores.



    LaunchKernels[];
    maxlist = ParallelTable[
    MaxValue[eq, 2/382 <= x <= 1, x]
    , eq, List @@ f
    ];

    Pick[
    Keys[f],
    Thread[Greater[maxlist, 1]]
    ]



    My take on the answer by Carl Woll, which should bring you below 6 minutes.



    trueFalseList = ParallelTable[
    UnsameQ[
    False,
    Quiet[
    Reduce[eq > 1 && 2/382 <= x <= 1, x]
    , Reduce::ratnz]
    ], eq, List @@ f]

    Pick[
    Keys[f],
    trueFalseList
    ]





    share|improve this answer











    $endgroup$




















      1












      $begingroup$

      The following is not the exact filter that you want, but a simple prefilter that apparently is quite good at filtering the given example ;) The point is that this check is much cheaper than computing the maxima, so it can be used to filter out (hopefully) many rational functions from your list f, so that filtering the resulting list becomes less expensive.



      Here is the code:



      a = 2./382;
      b = 1.;
      picker =
      ParallelMap[
      With[x = a + (b - a) z/(1 + z),
      With[p = Together[#],
      Min[CoefficientList[Denominator[r] - Numerator[r], z]] < 0.
      ]
      ] &,
      Values[f]
      ]; // AbsoluteTiming // First

      fpresieved = Pick[f, picker]



      0.04817



      <||>




      Here is the idea behind the method.



      Let $r(x)$ be a rational function from your list f.
      First, we apply the substitution x = a + (b - a) z/(1 + z); The mapping $z mapsto x$ maps the $[0,infty]$ to the interval $[a,b]$.
      Thus, $r = fracpq$ is a rational function on the positive real axis for which we want to check whether



      $$r(x) = fracp(z)q(z) leq 1 quad textfor all $z geq 0$.$$



      This is equivalent to



      $$q(z) - p(z) geq 0 quad textfor all $z geq 0$.$$



      A sufficient condition for this is that all coefficients of the polynomial $q(z) - p(z)$ are nonnegative. So a necessary condition for r(x) to be selected is that at least one coefficient of $q(z) - p(z)$ is negative. And precisely that is checked for in the code above.






      share|improve this answer









      $endgroup$















        Your Answer








        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "387"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f202252%2foptimising-the-selection-of-maxvalue-in-association%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        4












        $begingroup$

        Maybe you can use Reduce instead of MaxValue. For instance, the "vanilla:veal" rational function is:



        p = (353.073 x + 1137.02 x^2 + 2301.78 x^3 + 
        3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
        6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
        2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
        755.953 x^16 + 480.615 x^17 + 261.089 x^18 + 204.306 x^19 +
        110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
        19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
        1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
        1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
        5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
        4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
        1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
        117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
        4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31)


        Compare:



        MaxValue[p, 2/382 <= x <= 1, x] //AbsoluteTiming
        Quiet[Reduce[p > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



        0.133098, 0.976077



        0.041712, False




        Another example where the result isn't false:



        MaxValue[p+.5, 2/382 <= x <= 1, x] //AbsoluteTiming
        Quiet[Reduce[p+.5 > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



        0.128614, 1.47608



        0.041923, 0.0390256 < x <= 1.




        So, using Reduce is about 3 times faster. Combine it with a ParallelTable approach as in @rherman's answer.






        share|improve this answer









        $endgroup$

















          4












          $begingroup$

          Maybe you can use Reduce instead of MaxValue. For instance, the "vanilla:veal" rational function is:



          p = (353.073 x + 1137.02 x^2 + 2301.78 x^3 + 
          3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
          6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
          2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
          755.953 x^16 + 480.615 x^17 + 261.089 x^18 + 204.306 x^19 +
          110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
          19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
          1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
          1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
          5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
          4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
          1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
          117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
          4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31)


          Compare:



          MaxValue[p, 2/382 <= x <= 1, x] //AbsoluteTiming
          Quiet[Reduce[p > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



          0.133098, 0.976077



          0.041712, False




          Another example where the result isn't false:



          MaxValue[p+.5, 2/382 <= x <= 1, x] //AbsoluteTiming
          Quiet[Reduce[p+.5 > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



          0.128614, 1.47608



          0.041923, 0.0390256 < x <= 1.




          So, using Reduce is about 3 times faster. Combine it with a ParallelTable approach as in @rherman's answer.






          share|improve this answer









          $endgroup$















            4












            4








            4





            $begingroup$

            Maybe you can use Reduce instead of MaxValue. For instance, the "vanilla:veal" rational function is:



            p = (353.073 x + 1137.02 x^2 + 2301.78 x^3 + 
            3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
            6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
            2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
            755.953 x^16 + 480.615 x^17 + 261.089 x^18 + 204.306 x^19 +
            110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
            19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
            1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
            1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
            5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
            4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
            1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
            117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
            4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31)


            Compare:



            MaxValue[p, 2/382 <= x <= 1, x] //AbsoluteTiming
            Quiet[Reduce[p > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



            0.133098, 0.976077



            0.041712, False




            Another example where the result isn't false:



            MaxValue[p+.5, 2/382 <= x <= 1, x] //AbsoluteTiming
            Quiet[Reduce[p+.5 > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



            0.128614, 1.47608



            0.041923, 0.0390256 < x <= 1.




            So, using Reduce is about 3 times faster. Combine it with a ParallelTable approach as in @rherman's answer.






            share|improve this answer









            $endgroup$



            Maybe you can use Reduce instead of MaxValue. For instance, the "vanilla:veal" rational function is:



            p = (353.073 x + 1137.02 x^2 + 2301.78 x^3 + 
            3771.09 x^4 + 5369.78 x^5 + 6302.43 x^6 + 6703.86 x^7 +
            6518.57 x^8 + 5440.72 x^9 + 4612.02 x^10 + 3457.49 x^11 +
            2654.9 x^12 + 2100.02 x^13 + 1521.13 x^14 + 1076.02 x^15 +
            755.953 x^16 + 480.615 x^17 + 261.089 x^18 + 204.306 x^19 +
            110.874 x^20 + 55.7565 x^21 + 28.2723 x^22 + 28.1937 x^23 +
            19.6806 x^24 + 5.60733 x^25 + 3.72775 x^26 + 0.929319 x^27 +
            1.8534 x^28 + 2.77225 x^29 + 0.921466 x^30 +
            1.8377 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 3811 x^4 +
            5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 +
            4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 +
            1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 +
            117 x^20 + 59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 +
            4 x^26 + x^27 + 2 x^28 + 3 x^29 + x^30 + 2 x^31)


            Compare:



            MaxValue[p, 2/382 <= x <= 1, x] //AbsoluteTiming
            Quiet[Reduce[p > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



            0.133098, 0.976077



            0.041712, False




            Another example where the result isn't false:



            MaxValue[p+.5, 2/382 <= x <= 1, x] //AbsoluteTiming
            Quiet[Reduce[p+.5 > 1 && 2/382 <= x <= 1, x], Reduce::ratnz] //AbsoluteTiming



            0.128614, 1.47608



            0.041923, 0.0390256 < x <= 1.




            So, using Reduce is about 3 times faster. Combine it with a ParallelTable approach as in @rherman's answer.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 8 hours ago









            Carl WollCarl Woll

            87.2k3 gold badges114 silver badges222 bronze badges




            87.2k3 gold badges114 silver badges222 bronze badges























                3












                $begingroup$

                This would take less than 25 minutes with 4 cores.



                LaunchKernels[];
                maxlist = ParallelTable[
                MaxValue[eq, 2/382 <= x <= 1, x]
                , eq, List @@ f
                ];

                Pick[
                Keys[f],
                Thread[Greater[maxlist, 1]]
                ]



                My take on the answer by Carl Woll, which should bring you below 6 minutes.



                trueFalseList = ParallelTable[
                UnsameQ[
                False,
                Quiet[
                Reduce[eq > 1 && 2/382 <= x <= 1, x]
                , Reduce::ratnz]
                ], eq, List @@ f]

                Pick[
                Keys[f],
                trueFalseList
                ]





                share|improve this answer











                $endgroup$

















                  3












                  $begingroup$

                  This would take less than 25 minutes with 4 cores.



                  LaunchKernels[];
                  maxlist = ParallelTable[
                  MaxValue[eq, 2/382 <= x <= 1, x]
                  , eq, List @@ f
                  ];

                  Pick[
                  Keys[f],
                  Thread[Greater[maxlist, 1]]
                  ]



                  My take on the answer by Carl Woll, which should bring you below 6 minutes.



                  trueFalseList = ParallelTable[
                  UnsameQ[
                  False,
                  Quiet[
                  Reduce[eq > 1 && 2/382 <= x <= 1, x]
                  , Reduce::ratnz]
                  ], eq, List @@ f]

                  Pick[
                  Keys[f],
                  trueFalseList
                  ]





                  share|improve this answer











                  $endgroup$















                    3












                    3








                    3





                    $begingroup$

                    This would take less than 25 minutes with 4 cores.



                    LaunchKernels[];
                    maxlist = ParallelTable[
                    MaxValue[eq, 2/382 <= x <= 1, x]
                    , eq, List @@ f
                    ];

                    Pick[
                    Keys[f],
                    Thread[Greater[maxlist, 1]]
                    ]



                    My take on the answer by Carl Woll, which should bring you below 6 minutes.



                    trueFalseList = ParallelTable[
                    UnsameQ[
                    False,
                    Quiet[
                    Reduce[eq > 1 && 2/382 <= x <= 1, x]
                    , Reduce::ratnz]
                    ], eq, List @@ f]

                    Pick[
                    Keys[f],
                    trueFalseList
                    ]





                    share|improve this answer











                    $endgroup$



                    This would take less than 25 minutes with 4 cores.



                    LaunchKernels[];
                    maxlist = ParallelTable[
                    MaxValue[eq, 2/382 <= x <= 1, x]
                    , eq, List @@ f
                    ];

                    Pick[
                    Keys[f],
                    Thread[Greater[maxlist, 1]]
                    ]



                    My take on the answer by Carl Woll, which should bring you below 6 minutes.



                    trueFalseList = ParallelTable[
                    UnsameQ[
                    False,
                    Quiet[
                    Reduce[eq > 1 && 2/382 <= x <= 1, x]
                    , Reduce::ratnz]
                    ], eq, List @@ f]

                    Pick[
                    Keys[f],
                    trueFalseList
                    ]






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 7 hours ago

























                    answered 8 hours ago









                    rhermansrhermans

                    23k4 gold badges42 silver badges107 bronze badges




                    23k4 gold badges42 silver badges107 bronze badges





















                        1












                        $begingroup$

                        The following is not the exact filter that you want, but a simple prefilter that apparently is quite good at filtering the given example ;) The point is that this check is much cheaper than computing the maxima, so it can be used to filter out (hopefully) many rational functions from your list f, so that filtering the resulting list becomes less expensive.



                        Here is the code:



                        a = 2./382;
                        b = 1.;
                        picker =
                        ParallelMap[
                        With[x = a + (b - a) z/(1 + z),
                        With[p = Together[#],
                        Min[CoefficientList[Denominator[r] - Numerator[r], z]] < 0.
                        ]
                        ] &,
                        Values[f]
                        ]; // AbsoluteTiming // First

                        fpresieved = Pick[f, picker]



                        0.04817



                        <||>




                        Here is the idea behind the method.



                        Let $r(x)$ be a rational function from your list f.
                        First, we apply the substitution x = a + (b - a) z/(1 + z); The mapping $z mapsto x$ maps the $[0,infty]$ to the interval $[a,b]$.
                        Thus, $r = fracpq$ is a rational function on the positive real axis for which we want to check whether



                        $$r(x) = fracp(z)q(z) leq 1 quad textfor all $z geq 0$.$$



                        This is equivalent to



                        $$q(z) - p(z) geq 0 quad textfor all $z geq 0$.$$



                        A sufficient condition for this is that all coefficients of the polynomial $q(z) - p(z)$ are nonnegative. So a necessary condition for r(x) to be selected is that at least one coefficient of $q(z) - p(z)$ is negative. And precisely that is checked for in the code above.






                        share|improve this answer









                        $endgroup$

















                          1












                          $begingroup$

                          The following is not the exact filter that you want, but a simple prefilter that apparently is quite good at filtering the given example ;) The point is that this check is much cheaper than computing the maxima, so it can be used to filter out (hopefully) many rational functions from your list f, so that filtering the resulting list becomes less expensive.



                          Here is the code:



                          a = 2./382;
                          b = 1.;
                          picker =
                          ParallelMap[
                          With[x = a + (b - a) z/(1 + z),
                          With[p = Together[#],
                          Min[CoefficientList[Denominator[r] - Numerator[r], z]] < 0.
                          ]
                          ] &,
                          Values[f]
                          ]; // AbsoluteTiming // First

                          fpresieved = Pick[f, picker]



                          0.04817



                          <||>




                          Here is the idea behind the method.



                          Let $r(x)$ be a rational function from your list f.
                          First, we apply the substitution x = a + (b - a) z/(1 + z); The mapping $z mapsto x$ maps the $[0,infty]$ to the interval $[a,b]$.
                          Thus, $r = fracpq$ is a rational function on the positive real axis for which we want to check whether



                          $$r(x) = fracp(z)q(z) leq 1 quad textfor all $z geq 0$.$$



                          This is equivalent to



                          $$q(z) - p(z) geq 0 quad textfor all $z geq 0$.$$



                          A sufficient condition for this is that all coefficients of the polynomial $q(z) - p(z)$ are nonnegative. So a necessary condition for r(x) to be selected is that at least one coefficient of $q(z) - p(z)$ is negative. And precisely that is checked for in the code above.






                          share|improve this answer









                          $endgroup$















                            1












                            1








                            1





                            $begingroup$

                            The following is not the exact filter that you want, but a simple prefilter that apparently is quite good at filtering the given example ;) The point is that this check is much cheaper than computing the maxima, so it can be used to filter out (hopefully) many rational functions from your list f, so that filtering the resulting list becomes less expensive.



                            Here is the code:



                            a = 2./382;
                            b = 1.;
                            picker =
                            ParallelMap[
                            With[x = a + (b - a) z/(1 + z),
                            With[p = Together[#],
                            Min[CoefficientList[Denominator[r] - Numerator[r], z]] < 0.
                            ]
                            ] &,
                            Values[f]
                            ]; // AbsoluteTiming // First

                            fpresieved = Pick[f, picker]



                            0.04817



                            <||>




                            Here is the idea behind the method.



                            Let $r(x)$ be a rational function from your list f.
                            First, we apply the substitution x = a + (b - a) z/(1 + z); The mapping $z mapsto x$ maps the $[0,infty]$ to the interval $[a,b]$.
                            Thus, $r = fracpq$ is a rational function on the positive real axis for which we want to check whether



                            $$r(x) = fracp(z)q(z) leq 1 quad textfor all $z geq 0$.$$



                            This is equivalent to



                            $$q(z) - p(z) geq 0 quad textfor all $z geq 0$.$$



                            A sufficient condition for this is that all coefficients of the polynomial $q(z) - p(z)$ are nonnegative. So a necessary condition for r(x) to be selected is that at least one coefficient of $q(z) - p(z)$ is negative. And precisely that is checked for in the code above.






                            share|improve this answer









                            $endgroup$



                            The following is not the exact filter that you want, but a simple prefilter that apparently is quite good at filtering the given example ;) The point is that this check is much cheaper than computing the maxima, so it can be used to filter out (hopefully) many rational functions from your list f, so that filtering the resulting list becomes less expensive.



                            Here is the code:



                            a = 2./382;
                            b = 1.;
                            picker =
                            ParallelMap[
                            With[x = a + (b - a) z/(1 + z),
                            With[p = Together[#],
                            Min[CoefficientList[Denominator[r] - Numerator[r], z]] < 0.
                            ]
                            ] &,
                            Values[f]
                            ]; // AbsoluteTiming // First

                            fpresieved = Pick[f, picker]



                            0.04817



                            <||>




                            Here is the idea behind the method.



                            Let $r(x)$ be a rational function from your list f.
                            First, we apply the substitution x = a + (b - a) z/(1 + z); The mapping $z mapsto x$ maps the $[0,infty]$ to the interval $[a,b]$.
                            Thus, $r = fracpq$ is a rational function on the positive real axis for which we want to check whether



                            $$r(x) = fracp(z)q(z) leq 1 quad textfor all $z geq 0$.$$



                            This is equivalent to



                            $$q(z) - p(z) geq 0 quad textfor all $z geq 0$.$$



                            A sufficient condition for this is that all coefficients of the polynomial $q(z) - p(z)$ are nonnegative. So a necessary condition for r(x) to be selected is that at least one coefficient of $q(z) - p(z)$ is negative. And precisely that is checked for in the code above.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 6 hours ago









                            Henrik SchumacherHenrik Schumacher

                            65.3k5 gold badges94 silver badges180 bronze badges




                            65.3k5 gold badges94 silver badges180 bronze badges



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Mathematica Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                Use MathJax to format equations. MathJax reference.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f202252%2foptimising-the-selection-of-maxvalue-in-association%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                                Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                                Tom Holland Mục lục Đầu đời và giáo dục | Sự nghiệp | Cuộc sống cá nhân | Phim tham gia | Giải thưởng và đề cử | Chú thích | Liên kết ngoài | Trình đơn chuyển hướngProfile“Person Details for Thomas Stanley Holland, "England and Wales Birth Registration Index, 1837-2008" — FamilySearch.org”"Meet Tom Holland... the 16-year-old star of The Impossible""Schoolboy actor Tom Holland finds himself in Oscar contention for role in tsunami drama"“Naomi Watts on the Prince William and Harry's reaction to her film about the late Princess Diana”lưu trữ"Holland and Pflueger Are West End's Two New 'Billy Elliots'""I'm so envious of my son, the movie star! British writer Dominic Holland's spent 20 years trying to crack Hollywood - but he's been beaten to it by a very unlikely rival"“Richard and Margaret Povey of Jersey, Channel Islands, UK: Information about Thomas Stanley Holland”"Tom Holland to play Billy Elliot""New Billy Elliot leaving the garage"Billy Elliot the Musical - Tom Holland - Billy"A Tale of four Billys: Tom Holland""The Feel Good Factor""Thames Christian College schoolboys join Myleene Klass for The Feelgood Factor""Government launches £600,000 arts bursaries pilot""BILLY's Chapman, Holland, Gardner & Jackson-Keen Visit Prime Minister""Elton John 'blown away' by Billy Elliot fifth birthday" (video with John's interview and fragments of Holland's performance)"First News interviews Arrietty's Tom Holland"“33rd Critics' Circle Film Awards winners”“National Board of Review Current Awards”Bản gốc"Ron Howard Whaling Tale 'In The Heart Of The Sea' Casts Tom Holland"“'Spider-Man' Finds Tom Holland to Star as New Web-Slinger”lưu trữ“Captain America: Civil War (2016)”“Film Review: ‘Captain America: Civil War’”lưu trữ“‘Captain America: Civil War’ review: Choose your own avenger”lưu trữ“The Lost City of Z reviews”“Sony Pictures and Marvel Studios Find Their 'Spider-Man' Star and Director”“‘Mary Magdalene’, ‘Current War’ & ‘Wind River’ Get 2017 Release Dates From Weinstein”“Lionsgate Unleashing Daisy Ridley & Tom Holland Starrer ‘Chaos Walking’ In Cannes”“PTA's 'Master' Leads Chicago Film Critics Nominations, UPDATED: Houston and Indiana Critics Nominations”“Nominaciones Goya 2013 Telecinco Cinema – ENG”“Jameson Empire Film Awards: Martin Freeman wins best actor for performance in The Hobbit”“34th Annual Young Artist Awards”Bản gốc“Teen Choice Awards 2016—Captain America: Civil War Leads Second Wave of Nominations”“BAFTA Film Award Nominations: ‘La La Land’ Leads Race”“Saturn Awards Nominations 2017: 'Rogue One,' 'Walking Dead' Lead”Tom HollandTom HollandTom HollandTom Hollandmedia.gettyimages.comWorldCat Identities300279794no20130442900000 0004 0355 42791085670554170004732cb16706349t(data)XX5557367