# Truncating a List of Subsets of Ordered Pairs

I have a set of pairs:

v = {{12300, "h"}, {11600, "cb"}, {9400, "ck"}, {8700,
"ds"}, {8600, "ed"}, {12000, "jn"}, {11800,
"bb"}, {9000, "co"}, {8800, "di"}, {8300, "ex"}, {8100,
"sh"}, {8200, "lo"}, {7200, "ko"}, {2300,
"ma"}, {3858, "ps"}, {8500, "ha"}, {8100,
"lg"}, {7500, "kc"}, {6300, "xy"}, {3658, "py"}}


And I'm sorting all subsets with exactly six elements based on the sum of the elements in the subsets:

Sort[List /@ Total[Subsets[v, {6}], {2}]]


outputs

{{{30816, "kc" + "ck" + "ma" + "md" + "py" + "pu"}},
{{31416, "ck" + "lg" + "my" + "ma" + "py" + "pu"}},
{{31416, "ck" + "ma" + "md" + "py" + "pu" + "sh"}}, <<38755>>,
{{65900, "bo" + "cl" + "co" + "dk" + "jo" + "hn"}},
{{66100, "bo" + "cl" + "co" + "ck" + "jo" + "hn"}}}


I want to be able to truncate that output based on the sums of the numbers so that it will only output the ordered pairs in the 46000-50000 range.

Thanks, j

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 Apr 25 '15 at 16:45
• Welcome - and thanks for the accept :) – eldo Apr 25 '15 at 17:08

Select[Total[Subsets[v, {6}], {2}], First@# >=  46000 && First@# <= 50000 &]