3
$\begingroup$

I start with a set:

 splittableau ={{{998, 0}, {982, 0}, {974, 0}, {958, 0}, {934, 0}, {926, 0}, {922, 
    0}, {914, 0}, {898, 0}, {886, 0}, {878, 0}, {866, 0}, {862, 
    0}, {842, 0}, {838, 0}, {818, 0}, {802, 0}, {794, 0}, {778, 
    0}, {766, 0}, {758, 0}, {746, 0}, {734, 0}, {718, 0}, {706, 
    0}, {698, 0}, {694, 0}, {674, 0}, {662, 0}, {634, 0}, {626, 
    0}, {622, 0}, {614, 0}, {586, 0}, {566, 0}, {562, 0}, {554, 
    0}, {542, 0}, {538, 0}, {526, 0}, {514, 0}, {502, 0}, {482, 
    0}, {478, 0}, {466, 0}, {458, 0}, {454, 0}, {446, 0}, {422, 
    0}, {398, 0}, {394, 0}, {386, 0}, {382, 0}, {362, 0}, {358, 
    0}, {346, 0}, {334, 0}, {326, 0}, {314, 0}, {302, 0}, {298, 
    0}, {278, 0}, {274, 0}, {262, 0}, {254, 0}, {226, 0}, {218, 
    0}, {214, 0}, {206, 0}, {202, 0}, {194, 0}, {178, 0}, {166, 
    0}, {158, 0}, {146, 0}, {142, 0}, {134, 0}, {122, 0}, {118, 
    0}, {106, 0}, {94, 0}, {86, 0}, {82, 0}, {74, 0}, {62, 0}, {58, 
    0}, {46, 0}, {38, 0}, {34, 0}, {26, 0}, {22, 0}, {14, 0}, {10, 
    0}, {6, 0}, {4, 0}}, {{924, 1}, {864, 1}, {840, 1}, {696, 1}, {624,
    1}, {564, 1}, {540, 1}, {480, 1}, {456, 1}, {396, 1}, {384, 
    1}, {360, 1}, {300, 1}, {276, 1}, {216, 1}, {204, 1}, {144, 
    1}, {120, 1}, {84, 1}, {60, 1}, {36, 1}, {24, 1}, {12, 1}, {8, 
    1}}, {{978, 2}, {930, 2}, {918, 2}, {882, 2}, {798, 2}, {762, 
    2}, {702, 2}, {630, 2}, {618, 2}, {558, 2}, {462, 2}, {450, 
    2}, {390, 2}, {330, 2}, {258, 2}, {222, 2}, {210, 2}, {198, 
    2}, {162, 2}, {138, 2}, {90, 2}, {78, 2}, {42, 2}, {30, 2}, {18, 
    2}}, {{928, 3}, {920, 3}, {892, 3}, {872, 3}, {772, 3}, {752, 
    3}, {740, 3}, {712, 3}, {700, 3}, {668, 3}, {628, 3}, {620, 
    3}, {560, 3}, {548, 3}, {532, 3}, {520, 3}, {508, 3}, {472, 
    3}, {460, 3}, {452, 3}, {392, 3}, {388, 3}, {352, 3}, {340, 
    3}, {320, 3}, {308, 3}, {268, 3}, {220, 3}, {212, 3}, {208, 
    3}, {200, 3}, {172, 3}, {152, 3}, {140, 3}, {128, 3}, {112, 
    3}, {100, 3}, {88, 3}, {80, 3}, {68, 3}, {52, 3}, {40, 3}, {32, 
    3}, {28, 3}, {20, 3}, {16, 3}}, {{990, 4}, {966, 4}, {906, 
    4}, {870, 4}, {810, 4}, {786, 4}, {726, 4}, {546, 4}, {534, 
    4}, {474, 4}, {354, 4}, {306, 4}, {270, 4}, {186, 4}, {150, 
    4}, {126, 4}, {114, 4}, {66, 4}, {54, 4}}, {{888, 5}, {876, 
    5}, {852, 5}, {828, 5}, {768, 5}, {756, 5}, {708, 5}, {684, 
    5}, {576, 5}, {552, 5}, {492, 5}, {468, 5}, {372, 5}, {336, 
    5}, {324, 5}, {288, 5}, {264, 5}, {168, 5}, {156, 5}, {132, 
    5}, {96, 5}, {72, 5}, {48, 5}}, {{994, 6}, {986, 6}, {970, 
    6}, {946, 6}, {910, 6}, {874, 6}, {854, 6}, {850, 6}, {830, 
    6}, {806, 6}, {790, 6}, {686, 6}, {574, 6}, {550, 6}, {490, 
    6}, {470, 6}, {434, 6}, {410, 6}, {374, 6}, {370, 6}, {290, 
    6}, {286, 6}, {266, 6}, {190, 6}, {154, 6}, {130, 6}, {70, 6}, {50,
    6}}, {{912, 7}, {900, 7}, {780, 7}, {732, 7}, {720, 7}, {648, 
    7}, {600, 7}, {528, 7}, {408, 7}, {348, 7}, {312, 7}, {240, 
    7}, {192, 7}, {180, 7}, {108, 7}}, {{942, 8}, {750, 8}, {690, 
    8}, {678, 8}, {570, 8}, {498, 8}, {438, 8}, {378, 8}, {342, 
    8}, {318, 8}, {102, 8}}, {{1000, 9}, {940, 9}, {916, 9}, {904, 
    9}, {896, 9}, {880, 9}, {860, 9}, {820, 9}, {784, 9}, {776, 
    9}, {716, 9}, {680, 9}, {644, 9}, {604, 9}, {544, 9}, {496, 
    9}, {484, 9}, {464, 9}, {440, 9}, {404, 9}, {380, 9}, {376, 
    9}, {364, 9}, {344, 9}, {316, 9}, {296, 9}, {280, 9}, {244, 
    9}, {236, 9}, {196, 9}, {184, 9}, {176, 9}, {160, 9}, {124, 
    9}, {104, 9}, {76, 9}, {64, 9}, {56, 9}, {44, 9}}, {{954, 
    10}, {858, 10}, {822, 10}, {738, 10}, {714, 10}, {654, 10}, {642, 
    10}, {606, 10}, {522, 10}, {402, 10}, {366, 10}, {294, 10}, {282, 
    10}, {234, 10}}, {{996, 11}, {936, 11}, {816, 11}, {504, 11}, {444,
    11}}, {{950, 12}, {902, 12}, {890, 12}, {770, 12}, {742, 
    12}, {722, 12}, {650, 12}, {638, 12}, {610, 12}, {590, 12}, {338, 
    12}, {322, 12}, {250, 12}, {238, 12}, {230, 12}, {182, 12}, {170, 
    12}, {110, 12}, {98, 12}}, {{948, 13}, {792, 13}, {588, 13}, {420, 
    13}, {252, 13}, {228, 13}}, {{894, 14}, {774, 14}, {594, 14}, {510,
    14}, {486, 14}, {426, 14}, {246, 14}, {174, 14}}, {{988, 
    15}, {952, 15}, {944, 15}, {868, 15}, {848, 15}, {832, 15}, {808, 
    15}, {788, 15}, {764, 15}, {748, 15}, {736, 15}, {728, 15}, {704, 
    15}, {664, 15}, {596, 15}, {592, 15}, {584, 15}, {556, 15}, {512, 
    15}, {428, 15}, {424, 15}, {416, 15}, {356, 15}, {332, 15}, {328, 
    15}, {304, 15}, {284, 15}, {248, 15}, {232, 15}, {224, 15}, {188, 
    15}, {164, 15}, {148, 15}, {136, 15}, {116, 15}, {92, 15}}, {{834, 
    16}, {666, 16}, {414, 16}}, {{660, 17}, {432, 17}}, {{962, 
    18}, {782, 18}, {730, 18}, {710, 18}, {670, 18}, {658, 18}, {598, 
    18}, {578, 18}, {518, 18}, {430, 18}, {418, 18}, {350, 18}, {310, 
    18}, {242, 18}}, {{960, 19}, {804, 19}, {516, 19}}, {{582, 
    20}}, {{976, 21}, {964, 21}, {956, 21}, {884, 21}, {844, 21}, {836,
    21}, {800, 21}, {760, 21}, {676, 21}, {656, 21}, {580, 21}, {524, 
    21}, {500, 21}, {436, 21}, {260, 21}, {256, 21}}, {{972, 23}, {672,
    23}}, {{814, 24}, {754, 24}, {506, 24}, {494, 24}, {406, 
    24}}, {{744, 25}, {612, 25}}, {{846, 26}}, {{812, 27}, {640, 
    27}, {608, 27}, {568, 27}, {448, 27}, {412, 27}, {400, 27}, {368, 
    27}, {272, 27}}, {{984, 29}}, {{938, 30}, {826, 30}, {646, 
    30}, {602, 30}, {442, 30}}, {{980, 33}, {932, 33}, {908, 33}, {692,
    33}, {652, 33}, {632, 33}, {488, 33}, {292, 33}}, {{636, 
    35}}, {{856, 39}, {616, 39}, {536, 39}, {476, 39}}, {{530, 
    42}}, {{824, 45}, {796, 45}, {572, 45}}, {{682, 48}}, {{968, 
    63}}, {{724, 69}}, {{992, 75}, {688, 75}}};

Introduce the following rule to isolate the n's with the same ordinate:

 rule = {a_, b_} :> a;

Next; I do the following evaluations:

 nwithZeroAsOrdinate = Sort[splittableau[[1]] //. rule]

 nwithOneAsOrdinate = Sort[splittableau[[2]] //. rule]

 nwithTwoAsOrdinate = Sort[splittableau[[3]] //. rule]

 nwithThreeAsOrdinate = Sort[splittableau[[4]] //. rule]

 nwithFourAsOrdinate = Sort[splittableau[[5]] //. rule]

 nwithFiveAsOrdinate = Sort[splittableau[[6]] //. rule]

 nwithSixAsOrdinate = Sort[splittableau[[7]] //. rule]

 nwithSevenAsOrdinate = Sort[splittableau[[8]] //. rule]

 nwithEightAsOrdinate = Sort[splittableau[[9]] //. rule]

 nwithNineAsOrdinate = Sort[splittableau[[10]] //. rule]

 nwithTenAsOrdinate = Sort[splittableau[[11]] //. rule]

 nwithElevenAsOrdinate = Sort[splittableau[[12]] //. rule]

 nwithTwelveAsOrdinate = Sort[splittableau[[13]] //. rule]

 nwithThirteenAsOrdinate = Sort[splittableau[[14]] //. rule]

 nwithFourteenAsOrdinate = Sort[splittableau[[15]] //. rule]

 nwithFifteenAsOrdinate = Sort[splittableau[[16]] //. rule]

 nwithSixteenAsOrdinate = Sort[splittableau[[17]] //. rule]

 splittableau[[18]]

 nwithSeventeenAsOrdinate = Sort[splittableau[[18]] //. rule]

 nwithEightteenAsOrdinate = Sort[splittableau[[19]] //. rule]

 nwithNineteenAsOrdinate = Sort[splittableau[[20]] //. rule]

 nwithTwentyAsOrdinate = Sort[splittableau[[21]] //. rule]

 nwithTwentyOneAsOrdinate = Sort[splittableau[[22]] //. rule]

 splittableau[[23]]

 nwithTwentyTwoAsOrdinate = Sort[splittableau[[23]] //. rule]

 nwithTwentyFourAsOrdinate = Sort[splittableau[[24]] //. rule]

 splittableau[[25]]

 nwithTwentyFiveAsOrdinate = Sort[splittableau[[25]] //. rule]

 nwithTwentySixAsOrdinate = Sort[splittableau[[26]] //. rule]

 nwithTwentySevenAsOrdinate = Sort[splittableau[[27]] //. rule]

 nwithTwentyNineAsOrdinate = Sort[splittableau[[28]] //. rule]

 nwithThirtyAsOrdinate = Sort[splittableau[[29]] //. rule]

 nwithThirtyThreeAsOrdinate = Sort[splittableau[[30]] //. rule]

 nwithThirtyFiveAsOrdinate = Sort[splittableau[[31]] //. rule]

 nwithThirtyNineAsOrdinate = Sort[splittableau[[32]] //. rule]

 nwithFortyTwoAsOrdinate = Sort[splittableau[[33]] //. rule]

 nwithFortyFiveAsOrdinate = Sort[splittableau[[34]] //. rule]

 nwithFortyEightAsOrdinate = Sort[splittableau[[35]] //. rule]

 nwithSixtyThreeAsOrdinate = Sort[splittableau[[36]] //. rule]

 nwithSixtyNineAsOrdinate = Sort[splittableau[[37]] //. rule]

 splittableau[[38]]

 nwithSeventyFiveAsOrdinate = Sort[splittableau[[38]] //. rule]

Four among the above evaluations produce the following warning:

Sort::normal: Nonatomic expression expected at position 1 in Sort[value].

My question is how can I improve my rule to avoid this error. Also; other ideas about how to isolate the n's according to the ordinates in the set "splittableau" are welcome. Thank you!

$\endgroup$
2
$\begingroup$

What about

nwithBlaAsOrdinate = Sort /@ GroupBy[Flatten[splittableau, 1], Last -> First];

?

Now, nwithBlaAsOrdinate[i] returns the list of ns with i as ordinate.

$\endgroup$
  • $\begingroup$ Thank you Henrik. Your code is not only more compact but, it also helped me to keep accountability of the sets involved, more efficiently. Grateful to you; Gilmar $\endgroup$ – Gilmar Rodriguez Pierluissi Jan 11 '18 at 16:24
  • $\begingroup$ You're welcome! $\endgroup$ – Henrik Schumacher Jan 11 '18 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.