(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 13.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 114712, 3118] NotebookOptionsPosition[ 106495, 2925] NotebookOutlinePosition[ 108259, 2977] CellTagsIndexPosition[ 108216, 2974] WindowTitle->SelectPermutations | Example Notebook WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Basic Examples", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->462042388], Cell[TextData[{ "Select from the list ", Cell[BoxData[ RowBox[{"{", RowBox[{"5", ",", "6", ",", "7", ",", "8", ",", "9"}], "}"}]], "InlineFormula", FontFamily->"Source Sans Pro"], " those permutations that form a prime when concatenating the digits:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.775568205955653*^9, 3.775568227320828*^9}, { 3.775568257522637*^9, 3.775568284776268*^9}, {3.775568406638788*^9, 3.7755684078891897`*^9}, {3.8589604751194897`*^9, 3.858960479849156*^9}}, CellID->13078159], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{"5", ",", "6", ",", "7", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"PrimeQ", "@*", "FromDigits"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.775568168324977*^9, 3.775568246840334*^9}, { 3.775568343294755*^9, 3.7755683487998447`*^9}, {3.775568398156794*^9, 3.775568423898609*^9}, {3.776529126287918*^9, 3.77652913001302*^9}}, CellLabel->"In[13]:=", CellID->443871870], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"5", ",", "6", ",", "8", ",", "9", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "7", ",", "6", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8", ",", "6", ",", "7", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8", ",", "9", ",", "6", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "5", ",", "7", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "7", ",", "5", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "8", ",", "5", ",", "9", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "9", ",", "8", ",", "5", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "5", ",", "6", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "5", ",", "8", ",", "6", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "8", ",", "5", ",", "6", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "6", ",", "5", ",", "7", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "9", ",", "5", ",", "6", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "9", ",", "6", ",", "5", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "6", ",", "5", ",", "8", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "6", ",", "8", ",", "5", ",", "7"}], "}"}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.775568183396497*^9, 3.775568201638604*^9}, { 3.775568255076702*^9, 3.775568263439975*^9}, {3.775568380685358*^9, 3.775568424252521*^9}, 3.7756595100280657`*^9, {3.776529095525774*^9, 3.776529130338461*^9}, 3.776529313866888*^9, 3.777914407196706*^9}, CellLabel->"Out[13]=", CellID->1183436730] }, Open ]], Cell["Select those permutations having length 3:", "Text", TaggingRules->{}, CellChangeTimes->{{3.77556848444596*^9, 3.7755685001038637`*^9}, { 3.858960506224182*^9, 3.8589605088242826`*^9}}, CellID->1018044751], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{"5", ",", "6", ",", "7", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", "3", "}"}], ",", RowBox[{"PrimeQ", "@*", "FromDigits"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7755684786907463`*^9, 3.7755684795515823`*^9}}, CellLabel->"In[14]:=", CellID->1743190533], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"5", ",", "6", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "5", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "6", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "5", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "5", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "6", ",", "7"}], "}"}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.7755684799271097`*^9, 3.775568497623534*^9}, 3.775659511887641*^9, 3.7765291338475637`*^9, 3.77652931593814*^9, 3.777914412861889*^9}, CellLabel->"Out[14]=", CellID->939908904] }, Open ]], Cell["Select those permutations having length 3\[Dash]4:", "Text", TaggingRules->{}, CellChangeTimes->{{3.77556848444596*^9, 3.775568509805202*^9}, { 3.775568557163394*^9, 3.775568581141801*^9}, {3.858960492488168*^9, 3.858960513439598*^9}}, CellID->117437822], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{"5", ",", "6", ",", "7", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"PrimeQ", "@*", "FromDigits"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7755684786907463`*^9, 3.7755684795515823`*^9}, { 3.7755685117029343`*^9, 3.775568514832704*^9}, {3.775568548776168*^9, 3.775568573740428*^9}}, CellLabel->"In[15]:=", CellID->240002761], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"5", ",", "6", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "5", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "6", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "5", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "5", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "6", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "6", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8", ",", "6", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8", ",", "6", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8", ",", "7", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8", ",", "9", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "9", ",", "8", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "8", ",", "5", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "5", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "5", ",", "9", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "5", ",", "8", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "8", ",", "5", ",", "7"}], "}"}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.7755684799271097`*^9, 3.775568515310902*^9}, { 3.7755685510649137`*^9, 3.775568573972561*^9}, 3.77565951429523*^9, 3.7765291361641808`*^9, 3.77652931673779*^9, 3.777914421493857*^9}, CellLabel->"Out[15]=", CellID->975107208] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", TaggingRules->{}, CellID->254923484], Cell[TextData[{ "Select permutations of ", Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "4"}], "}"}]], "InlineFormula", FontFamily->"Source Sans Pro"], " for which the first two elements and the last elements add up to the same \ value:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.775568615672393*^9, 3.775568642910595*^9}, { 3.858960518535878*^9, 3.858960525347588*^9}}, CellID->169213106], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "4"}], "}"}], ",", RowBox[{ RowBox[{ RowBox[{"Total", "[", RowBox[{"#", "[", RowBox[{"[", RowBox[{"1", ";;", "2"}], "]"}], "]"}], "]"}], "==", RowBox[{"Total", "[", RowBox[{"#", "[", RowBox[{"[", RowBox[{"3", ";;", "4"}], "]"}], "]"}], "]"}]}], "&"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.775568591553537*^9, 3.7755686112570133`*^9}}, CellLabel->"In[72]:=", CellID->1217591689], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "4", ",", "2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4", ",", "3", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3", ",", "1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3", ",", "4", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "2", ",", "1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "2", ",", "4", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "1", ",", "2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "1", ",", "3", ",", "2"}], "}"}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{3.775568611591529*^9, 3.775568644008772*^9, 3.775659516424469*^9, 3.7765291414916773`*^9, 3.77652931856979*^9}, CellLabel->"Out[72]=", CellID->1356299517] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Scope", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->964056545], Cell["\<\ Select the first 10 permutations of length 4 for which the elements add up to \ an odd number:\ \>", "Text", TaggingRules->{}, CellChangeTimes->{{3.775568753645933*^9, 3.775568812706834*^9}, { 3.858960529408826*^9, 3.85896052997519*^9}}, CellID->649685796], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6"}], "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"OddQ", "@*", "Total"}], ",", "10"}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{ 3.775568390327188*^9, {3.775568657121542*^9, 3.775568658024325*^9}, { 3.7755687157418547`*^9, 3.7755687754639063`*^9}}, CellLabel->"In[73]:=", CellID->836153427], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "2", ",", "4", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "2", ",", "5", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "2", ",", "6", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3", ",", "2", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3", ",", "4", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3", ",", "5", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3", ",", "5", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3", ",", "5", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3", ",", "6", ",", "5"}], "}"}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.7755687038053503`*^9, 3.7755688138863287`*^9}, 3.7756595189226503`*^9, 3.776529143745932*^9, 3.7765293197019567`*^9}, CellLabel->"Out[73]=", CellID->1281710037] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Applications", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->568056528], Cell[TextData[{ "Select polynomials for which the slope is 1 at ", Cell[BoxData[ RowBox[{ StyleBox["x", "TI"], "=", "0"}]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.775568978297995*^9, 3.775568990453267*^9}, 3.7779148648834963`*^9}, CellID->2127383492], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"out", "=", RowBox[{"Total", "/@", RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", RowBox[{"4", "x"}], ",", "1", ",", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "2"}], ")"}], "^", "2"}]}], "}"}], ",", "4", ",", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"D", "[", RowBox[{ RowBox[{"Total", "[", "#", "]"}], ",", "x"}], "]"}], ")"}], "/.", RowBox[{"x", "\[Rule]", "0"}]}], ")"}], "\[Equal]", "1"}], "&"}]}], "]"}]}]}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7755690066041317`*^9, 3.775569013725047*^9}}, CellLabel->"In[74]:=", CellID->1795550878], Cell[BoxData[ RowBox[{"{", RowBox[{"x", ",", RowBox[{"1", "+", "x"}], ",", RowBox[{"1", "+", "x"}], ",", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}], ",", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"], "+", RowBox[{"5", " ", "x"}]}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.775568996876224*^9, 3.775569014097753*^9}, 3.775659522403158*^9, 3.7756596276060133`*^9, 3.776529146850255*^9, 3.776529321528561*^9}, CellLabel->"Out[74]=", CellID->1163760108] }, Open ]], Cell[TextData[{ "Confirm that the slope is indeed unity at ", Cell[BoxData[ RowBox[{ StyleBox["x", "TI"], "=", "0"}]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.775569032362935*^9, 3.775569042022148*^9}, 3.7779148702157297`*^9}, CellID->213203828], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{"#", ",", "x"}], "]"}], "/.", RowBox[{"x", "\[Rule]", "0"}]}], "&"}], "/@", "out"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.775569008779991*^9, 3.775569029774448*^9}}, CellLabel->"In[75]:=", CellID->490770762], Cell[BoxData[ RowBox[{"{", RowBox[{ "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.775569024986065*^9, 3.77556903028509*^9}, 3.775659524049831*^9, 3.7756596295261593`*^9, 3.776529148801647*^9, 3.776529322629979*^9}, CellLabel->"Out[75]=", CellID->1388539143] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Properties and Relations", "\[NonBreakingSpace]", Cell["(3)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->754506620], Cell["Duplicated items are treated the same:", "Text", TaggingRules->{}, CellChangeTimes->{{3.7756596329305153`*^9, 3.775659640189417*^9}}, CellID->1795557196], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{"6", ",", "7", ",", "7", ",", "7", ",", "8"}], "}"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Total", "[", "#", "]"}], "\[Equal]", "14"}], ")"}], "&"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.775658730148959*^9, 3.775658747520253*^9}, { 3.7756590438565607`*^9, 3.775659044412951*^9}, {3.7756596525277853`*^9, 3.7756596527056847`*^9}}, CellLabel->"In[76]:=", CellID->912947602], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"6", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "6"}], "}"}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.775658748232149*^9, 3.775658894579425*^9, 3.775658982885504*^9, { 3.77565902072548*^9, 3.775659044907261*^9}, {3.7756591949370537`*^9, 3.775659233580648*^9}, {3.7756593450669947`*^9, 3.775659400072006*^9}, 3.7756595071964903`*^9, 3.7756596532496367`*^9, 3.77652915012943*^9, 3.776529324231215*^9}, CellLabel->"Out[76]=", CellID->35409958] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", TaggingRules->{}, CellID->1569204759], Cell[TextData[{ "The main difference between ", Cell[BoxData[ RowBox[{ StyleBox["SelectPermutations", "InlineResourceFunction"], "[", RowBox[{ StyleBox["list", "TI"], ",", StyleBox["crit", "TI"]}], "]"}]], "InlineFormula", FontFamily->"Source Sans Pro"], " and ", Cell[BoxData[ RowBox[{ TagBox[ ButtonBox[ StyleBox["Select", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Select", ContentPadding->False], MouseAppearanceTag["LinkHand"]], "[", RowBox[{ RowBox[{ TagBox[ ButtonBox[ StyleBox["Permutations", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Permutations", ContentPadding->False], MouseAppearanceTag["LinkHand"]], "[", StyleBox["list", "TI"], "]"}], ",", StyleBox["crit", "TI"]}], "]"}]], "InlineFormula", FontFamily->"Source Sans Pro"], " is the memory usage:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.775659692231538*^9, 3.775659737034504*^9}, { 3.777915104180867*^9, 3.7779151337974873`*^9}}, CellID->306210210], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MaxMemoryUsed", "[", RowBox[{ RowBox[{"result1", "=", RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{ "Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", "13"}], "]"}], ",", "6", ",", RowBox[{ RowBox[{ RowBox[{"Total", "[", "#", "]"}], "\[Equal]", "24"}], "&"}]}], "]"}]}], ";"}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7756597419331837`*^9, 3.775659859377911*^9}, 3.775659965227964*^9}, CellLabel->"In[77]:=", CellID->1252262848], Cell[BoxData["75936"], "Output", TaggingRules->{}, CellChangeTimes->{{3.77565978044046*^9, 3.775659822081428*^9}, { 3.775659853998701*^9, 3.775659866096383*^9}, 3.775659977992035*^9, 3.7756600199457493`*^9, 3.776529154597158*^9, 3.776529328657302*^9}, CellLabel->"Out[77]=", CellID->858035014] }, Open ]], Cell[TextData[{ "Using ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Select", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Select", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], " and ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Permutations", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Permutations", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], " uses 500 times more memory:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.775659958690896*^9, 3.775660003727075*^9}, { 3.777914890455714*^9, 3.777914892938813*^9}}, CellID->183330921], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MaxMemoryUsed", "[", RowBox[{ RowBox[{"result2", "=", RowBox[{"Select", "[", RowBox[{ RowBox[{"Permutations", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", "13"}], "]"}], ",", "6"}], "]"}], ",", RowBox[{ RowBox[{ RowBox[{"Total", "[", "#", "]"}], "\[Equal]", "24"}], "&"}]}], "]"}]}], ";"}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.775659826770007*^9, 3.775659862367159*^9}, 3.775659967831942*^9}, CellLabel->"In[78]:=", CellID->475670842], Cell[BoxData["37562680"], "Output", TaggingRules->{}, CellChangeTimes->{{3.775659833819317*^9, 3.775659867629966*^9}, 3.775659978889728*^9, 3.775660020843718*^9, 3.776529158151636*^9, 3.776529329564918*^9}, CellLabel->"Out[78]=", CellID->446869541] }, Open ]], Cell["Verify that the results are identical:", "Text", TaggingRules->{}, CellChangeTimes->{{3.775660014046246*^9, 3.775660019525916*^9}}, CellID->1477825697], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"result1", "\[Equal]", "result2"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.775659839679294*^9, 3.775659844204294*^9}}, CellLabel->"In[79]:=", CellID->1539593924], Cell[BoxData["True"], "Output", TaggingRules->{}, CellChangeTimes->{{3.775659844726769*^9, 3.775659872379087*^9}, 3.775660021901587*^9, 3.7765291614553967`*^9, 3.776529330743194*^9}, CellLabel->"Out[79]=", CellID->826863674] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", TaggingRules->{}, CellID->725256671], Cell[TextData[{ Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Head", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Head", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], " does not have to be ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["List", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/List", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.775659940349708*^9, 3.77565995308701*^9}, 3.77791491092492*^9}, CellID->728890353], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"f", "[", RowBox[{"1", ",", "2", ",", "3", ",", "4", ",", "5"}], "]"}], ",", RowBox[{"{", "2", "}"}], ",", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Plus", "@@", "#"}], ")"}], "\[Equal]", "6"}], "&"}], ")"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.775564501355146*^9, 3.77556453064013*^9}, { 3.775564595079977*^9, 3.775564596369431*^9}, {3.775564628426854*^9, 3.775564631573576*^9}}, CellLabel->"In[80]:=", CellID->110682005], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"f", "[", RowBox[{"1", ",", "5"}], "]"}], ",", RowBox[{"f", "[", RowBox[{"2", ",", "4"}], "]"}], ",", RowBox[{"f", "[", RowBox[{"4", ",", "2"}], "]"}], ",", RowBox[{"f", "[", RowBox[{"5", ",", "1"}], "]"}]}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.77556451988704*^9, 3.77556463182666*^9}, 3.7755676679041758`*^9, 3.775567712707305*^9, 3.775567818332111*^9, 3.77565941046673*^9, 3.776529163330064*^9, 3.776529331852521*^9}, CellLabel->"Out[80]=", CellID->1118722283] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Possible Issues", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->92483860], Cell[TextData[{ Cell[BoxData[ StyleBox["SelectPermutations", "InlineResourceFunction"]], "InlineFormula", FontFamily->"Source Sans Pro"], " might take longer as it is written in higher-level code as compared to the \ implementation of ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Permutations", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Permutations", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.775660090968472*^9, 3.775660098838415*^9}, { 3.7756601400967207`*^9, 3.7756601913190613`*^9}, {3.775660772370102*^9, 3.775660773132094*^9}, 3.777914921223103*^9}, CellID->786689731], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"MaxMemoryUsed", "[", RowBox[{"time", "=", RowBox[{ RowBox[{"AbsoluteTiming", "[", RowBox[{ RowBox[{"result1", "=", RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{ "Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["SelectPermutations", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{ LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{ "Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/SelectPermutations"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{ "Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "SelectPermutations"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["SelectPermutations"], BoxID -> "SelectPermutations", Selectable->False], "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"3", ",", "13"}], "]"}], ",", "6", ",", RowBox[{ RowBox[{ RowBox[{"Total", "[", "#", "]"}], "\[Equal]", "24"}], "&"}]}], "]"}]}], ";"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"Grid", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\