Cell[CellGroupData[{Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"characterWeights", " ", "=", " ", RowBox[{"Prepend", "[", RowBox[{ RowBox[{"Thread", "[", RowBox[{ RowBox[{"CharacterRange", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}], "\[Rule]", RowBox[{"Range", "[", "26", "]"}]}], "]"}], ",", RowBox[{"\"\<\>\"", "\[Rule]", "0"}]}], "]"}]}], ";"}], "\n"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"StringN", "[", RowBox[{"weight_Integer", ",", "n_Integer"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"t", "=", "1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Reap", "[", RowBox[{ RowBox[{"Scan", "[", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "==", "0"}], ",", RowBox[{ RowBox[{"Sow", "[", "t", "]"}], ";", RowBox[{"t", "=", "1"}]}], ",", RowBox[{"t", "++"}]}], "]"}], "&"}], ",", RowBox[{"IntegerDigits", "[", RowBox[{"n", ",", "2", ",", RowBox[{"weight", "-", "1"}]}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Sow", "[", "t", "]"}]}], "]"}], "\[LeftDoubleBracket]", RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}], " ", "/.", RowBox[{"(", RowBox[{"Reverse", " ", "/@", " ", "characterWeights"}], ")"}]}], " ", "//", "StringJoin"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"UnrankString", "[", "i_Integer", "]"}], " ", ":=", " ", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"n", "=", RowBox[{"BitLength", "[", "i", "]"}]}], "}"}], ",", RowBox[{"StringN", "[", RowBox[{"n", ",", RowBox[{"i", "-", RowBox[{"2", "^", RowBox[{"(", RowBox[{"n", "-", "1"}], ")"}]}]}]}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"RankString", "[", "s_String", "]"}], " ", ":=", " ", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"weight", "=", RowBox[{ RowBox[{"Characters", "[", "s", "]"}], " ", "/.", "characterWeights"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"FromDigits", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"{", RowBox[{"1", ",", RowBox[{"Riffle", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{"1", ",", RowBox[{"{", "#", "}"}]}], "]"}], "&"}], " ", "/@", " ", RowBox[{"(", RowBox[{"weight", "-", "1"}], ")"}]}], ",", "0"}], "]"}]}], "}"}], "]"}], ",", "2"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"UnrankString", "[", "0", "]"}], "=", "\"\<\>\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"RankString", "[", "\"\<\>\"", "]"}], "=", "0"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"detailHeaders", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"weight", "[", "n_Integer", "]"}], " ", ":=", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"n", "\[Equal]", "0"}], ",", "0", ",", RowBox[{"BitLength", "[", "n", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"weight", "[", "s_String", "]"}], " ", ":=", " ", RowBox[{"Total", "[", RowBox[{ RowBox[{"Characters", "[", "s", "]"}], " ", "/.", " ", "characterWeights"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"steps", "[", "s_String", "]"}], " ", ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "chars", ",", "weights", ",", "origweights", ",", "totalWeight", ",", "numberPreviousWeights", ",", RowBox[{"code", "=", "\"\<\>\""}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"chars", "=", RowBox[{"Characters", "[", "s", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"origweights", "=", RowBox[{"weights", "=", RowBox[{"chars", "/.", "characterWeights"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"totalWeight", "=", RowBox[{"Total", "[", "weights", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"s", "==", "\"\<\>\""}], ",", RowBox[{"Text", "/@", " ", RowBox[{"Flatten", "[", RowBox[{"{", RowBox[{"0", ",", RowBox[{"Table", "[", RowBox[{"\"\<\>\"", ",", RowBox[{"{", "6", "}"}]}], "]"}]}], "}"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"numberPreviousWeights", "=", RowBox[{"2", "^", RowBox[{"(", RowBox[{"totalWeight", "-", "1"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"weights", "\[NotEqual]", RowBox[{"{", "1", "}"}]}], ",", " ", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"weights", "\[LeftDoubleBracket]", RowBox[{"-", "1"}], "\[RightDoubleBracket]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"code", "=", RowBox[{"\"\<0\>\"", "<>", "code"}]}], ";", " ", RowBox[{"weights", "=", RowBox[{"Most", "[", "weights", "]"}]}]}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"code", "=", RowBox[{"\"\<1\>\"", "<>", "code"}]}], ";", " ", RowBox[{ RowBox[{"weights", "\[LeftDoubleBracket]", RowBox[{"-", "1"}], "\[RightDoubleBracket]"}], "--"}]}]}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"Text", "@", RowBox[{"FromDigits", "[", RowBox[{ RowBox[{"\"\<1\>\"", "<>", "code"}], ",", "2"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Text", "@", RowBox[{"Superscript", "[", RowBox[{"2", ",", RowBox[{"totalWeight", "-", "1"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Text", "@", RowBox[{"FromDigits", "[", RowBox[{"code", ",", "2"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"code", "\[Equal]", "\"\<\>\""}], ",", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"Row", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Text", "/@", "\[IndentingNewLine]", RowBox[{"Flatten", "[", RowBox[{"{", RowBox[{ RowBox[{"Most", "@", "#"}], ",", RowBox[{"Subscript", "[", RowBox[{ RowBox[{"Last", "@", "#"}], ",", "2"}], "]"}]}], "}"}], "]"}]}], "&"}], "@", RowBox[{"Characters", "[", "code", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"FrameMargins", "\[Rule]", "0"}], ",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{"Automatic", ",", "Automatic"}], "}"}]}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Text", "@", RowBox[{"StringJoin", "[", RowBox[{"ToString", "/@", RowBox[{"Flatten", "@", RowBox[{"{", "\[IndentingNewLine]", RowBox[{"\"\<{\>\"", ",", RowBox[{"Riffle", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{"\"\<1\>\"", ",", RowBox[{"{", "totalWeight", "}"}]}], "]"}], ",", RowBox[{ RowBox[{"Characters", "[", "code", "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"\"\<0\>\"", "\[Rule]", "\"\<, \>\""}], ",", RowBox[{"\"\<1\>\"", "\[Rule]", "\"\<+\>\""}]}], "}"}]}]}], "]"}], ",", "\"\<}\>\""}], "}"}]}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Text", "[", RowBox[{ RowBox[{"ToString", "[", "totalWeight", "]"}], "<>", "\"\<:\>\"", "<>", RowBox[{"StringReplace", "[", RowBox[{ RowBox[{"ToString", "[", "origweights", "]"}], ",", RowBox[{"\"\< \>\"", "\[RuleDelayed]", RowBox[{"If", "[", RowBox[{ RowBox[{"code", "===", "\"\<000000000\>\""}], ",", "\"\<\>\"", ",", "\"\< \>\""}], "]"}]}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Text", "@", "s"}]}], "}"}]}]}], "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"note0", "=", RowBox[{ "Text", "[", "\"\\"", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"note1", "=", RowBox[{"Text", "[", RowBox[{"Style", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ "\"\\"", ",", "\"\\"", ",", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ "\"\\"", ",", RowBox[{"TraditionalForm", "[", SuperscriptBox["2", RowBox[{"w", "-", "1"}]], "]"}], ",", "\"\< strings of weight \>\"", ",", RowBox[{"TraditionalForm", "[", "w", "]"}], ",", "\"\<.\>\""}], "}"}], "]"}], ",", "\[IndentingNewLine]", "\"\\""}], "\[IndentingNewLine]", "}"}], ",", "Left", ",", "2"}], "]"}], ",", RowBox[{"LineIndent", "\[Rule]", "0"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"note2", "=", RowBox[{"Text", "@", RowBox[{"Grid", "[", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ "{", "\"\\"", "}"}], ",", RowBox[{ "{", "\"\\"", "}"}]}], "}"}], ",", RowBox[{"Alignment", "\[Rule]", "Left"}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"note3", "=", RowBox[{"Text", "@", RowBox[{"Style", "[", RowBox[{ RowBox[{"Row", "@", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ "\"\\"", ",", RowBox[{"TraditionalForm", "[", SuperscriptBox["2", RowBox[{"w", "-", "1"}]], "]"}], ",", "\"\< = number of strings of weight less than \>\"", ",", RowBox[{"TraditionalForm", "[", "w", "]"}], ",", "\"\<. \>\"", ",", " ", "\"\\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{"LineIndent", "\[Rule]", "0"}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"note4", "=", RowBox[{"Text", "@", RowBox[{"Style", "[", RowBox[{ RowBox[{"Row", "@", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ "\"\\"", ",", RowBox[{"TraditionalForm", "[", SuperscriptBox["2", RowBox[{"w", "-", "1"}]], "]"}], ",", "\"\< = number of strings of weight less than \>\"", ",", RowBox[{"TraditionalForm", "[", "w", "]"}], ",", "\"\<. \>\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{"LineIndent", "\[Rule]", "0"}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"removeAccents", "[", "s_String", "]"}], ":=", RowBox[{"StringReplace", "[", RowBox[{ RowBox[{"ToUpperCase", "@", "s"}], ",", RowBox[{"{", RowBox[{ RowBox[{ "\"\<\[CapitalADoubleDot]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalARing]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalAAcute]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalAGrave]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalAHat]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalCCedilla]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{ "\"\<\[CapitalEDoubleDot]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalEAcute]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalEGrave]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalEHat]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{ "\"\<\[CapitalIDoubleDot]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalIAcute]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalNTilde]\>\"", "->", "\"\\""}], ",", RowBox[{ "\"\<\[CapitalODoubleDot]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalOAcute]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalOHat]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{ "\"\<\[CapitalUDoubleDot]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<\[CapitalUHat]\>\"", "\[Rule]", "\"\\""}], ",", RowBox[{"\"\<'\>\"", "\[Rule]", "\"\<\>\""}], ",", RowBox[{"\"\<-\>\"", "\[Rule]", "\"\<\>\""}]}], "}"}]}], "]"}]}]}], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, InitializationCell->True, CellChangeTimes->{ 3.35696210375764*^9, {3.476811027159257*^9, 3.4768110279404316`*^9}, {3.4768113490947714`*^9, 3.4768115007188025`*^9}, {3.4768115419857473`*^9, 3.476811565845886*^9}, 3.476811607753477*^9, { 3.4768116466765976`*^9, 3.4768116882404275`*^9}, { 3.4768118535120173`*^9, 3.4768118544651847`*^9}, { 3.476812189864967*^9, 3.476812191005555*^9}, {3.476814755384245*^9, 3.476814818699581*^9}, {3.476814852419842*^9, 3.4768148562481384`*^9}, {3.4768149279701014`*^9, 3.4768149531274786`*^9}, {3.4768150252088327`*^9, 3.476815111509574*^9}, {3.476815170387211*^9, 3.476815176215597*^9}, {3.47681526545397*^9, 3.4768152667821546`*^9}, {3.4768154567281637`*^9, 3.4768154706350365`*^9}, {3.4768155018083086`*^9, 3.476815517980908*^9}, {3.47681564090829*^9, 3.476815732037372*^9}, {3.4768157832115393`*^9, 3.476815894622781*^9}, {3.476816010081004*^9, 3.476816014674872*^9}, 3.476816047925723*^9, {3.476816098520768*^9, 3.4768161604129777`*^9}, {3.4768162161019034`*^9, 3.4768162198519993`*^9}, {3.476816260353036*^9, 3.476816294010148*^9}, {3.476816364747082*^9, 3.476816437624881*^9}, {3.4768213655*^9, 3.476821413453125*^9}, { 3.4768214790625*^9, 3.476821531703125*^9}, {3.476827601*^9, 3.47682770078125*^9}, {3.47682774153125*^9, 3.476827881546875*^9}, {3.476827914984375*^9, 3.4768280203125*^9}, {3.4768280906875*^9, 3.4768281275625*^9}, { 3.4768281768125*^9, 3.476828316734375*^9}, {3.476828420703125*^9, 3.47682844859375*^9}, {3.47682861453125*^9, 3.476828802578125*^9}, {3.4768289726875*^9, 3.47682902434375*^9}, { 3.476829548953125*^9, 3.47682955171875*^9}, {3.47683011896875*^9, 3.4768301854375*^9}, {3.47683023728125*^9, 3.476830257984375*^9}, { 3.476830341390625*^9, 3.4768303421875*^9}, {3.476830382234375*^9, 3.47683040759375*^9}, {3.476830438328125*^9, 3.4768304438125*^9}, { 3.476830502109375*^9, 3.4768305524375*^9}, {3.476830612671875*^9, 3.476830681921875*^9}, 3.47683079096875*^9, {3.47683083075*^9, 3.476830980375*^9}, {3.476831056796875*^9, 3.47683106203125*^9}, { 3.476831247125*^9, 3.476831278234375*^9}, {3.476831422953125*^9, 3.47683142603125*^9}, {3.4768314965*^9, 3.476831499109375*^9}, { 3.476831534625*^9, 3.47683158321875*^9}, 3.47683163484375*^9, { 3.47683172621875*^9, 3.47683176278125*^9}, {3.476831982875*^9, 3.47683200321875*^9}, 3.4768322500625*^9, {3.476832308328125*^9, 3.476832325265625*^9}, {3.476868528234375*^9, 3.47686859675*^9}, { 3.47686878265625*^9, 3.476868816296875*^9}, 3.476872666640625*^9, { 3.476872897109375*^9, 3.47687291484375*^9}, 3.476872949546875*^9, { 3.47687411659375*^9, 3.476874158296875*^9}, {3.476874206875*^9, 3.4768742748125*^9}, {3.476874544578125*^9, 3.476874566703125*^9}, {3.47687615559375*^9, 3.476876217625*^9}, { 3.47687630925*^9, 3.476876327875*^9}, {3.476899248015625*^9, 3.476899274703125*^9}, {3.476899413921875*^9, 3.4768994209375*^9}, {3.476899697984375*^9, 3.476899718453125*^9}, 3.476899784078125*^9, {3.476899976609375*^9, 3.476900018890625*^9}, 3.4769002113125*^9, {3.476900393734375*^9, 3.476900401578125*^9}, {3.476900442875*^9, 3.47690054759375*^9}, 3.47690076415625*^9, 3.476901156140625*^9, {3.476910240546875*^9, 3.476910256859375*^9}, {3.476910317625*^9, 3.4769104711875*^9}, { 3.476910517484375*^9, 3.476910646203125*^9}, {3.47691074840625*^9, 3.476910748578125*^9}, {3.47691124346875*^9, 3.476911260921875*^9}, {3.476911931640625*^9, 3.476911940359375*^9}, {3.476912350421875*^9, 3.47691235925*^9}, { 3.47691245865625*^9, 3.47691246303125*^9}, 3.476912604046875*^9, { 3.476915100296875*^9, 3.47691510084375*^9}, {3.476954591296875*^9, 3.476954615515625*^9}, {3.476954673375*^9, 3.476954712984375*^9}, { 3.4769556899375*^9, 3.47695576975*^9}, {3.47695610675*^9, 3.47695612325*^9}, {3.47695743478125*^9, 3.47695745221875*^9}, { 3.476957549296875*^9, 3.476957550328125*^9}, {3.476958128467127*^9, 3.4769581298757706`*^9}, {3.476958191026572*^9, 3.4769581991027975`*^9}, {3.4769582602222958`*^9, 3.476958262554384*^9}, {3.4769592610682955`*^9, 3.4769593290305786`*^9}, {3.476959365481371*^9, 3.4769594139924088`*^9}, {3.476959446357582*^9, 3.476959446529488*^9}, {3.476959495788314*^9, 3.476959496335287*^9}, {3.4769632545008783`*^9, 3.4769632656415033`*^9}, {3.4769633316102533`*^9, 3.4769633719071283`*^9}, {3.4769636066727533`*^9, 3.4769637591571283`*^9}, {3.4769637978446283`*^9, 3.4769638277977533`*^9}, {3.4769638814696283`*^9, 3.4769638913602533`*^9}, {3.4769639353290033`*^9, 3.4769639493915033`*^9}, {3.4769641062352533`*^9, 3.4769641528758783`*^9}, 3.4769643952821283`*^9, { 3.4769645354071283`*^9, 3.4769646798758783`*^9}, { 3.4769647210477533`*^9, 3.4769647340633783`*^9}, { 3.4769648083602533`*^9, 3.4769648139852533`*^9}, { 3.4769648824540033`*^9, 3.4769649839227533`*^9}, { 3.4769650219071283`*^9, 3.4769651846883783`*^9}, { 3.4769652531258783`*^9, 3.4769652691727533`*^9}, { 3.4769656513915033`*^9, 3.4769656729696283`*^9}, { 3.4774182518571777`*^9, 3.477418278092224*^9}, { 3.4774183150618677`*^9, 3.477418391653657*^9}, { 3.4774184393243113`*^9, 3.477418439980545*^9}, 3.4774184921823335`*^9, 3.477418571492803*^9, { 3.477419234128877*^9, 3.4774192379258738`*^9}, { 3.477419294255801*^9, 3.477419307646855*^9}, { 3.4774194212277393`*^9, 3.4774194236965365`*^9}, { 3.47742438271875*^9, 3.477424459421875*^9}, 3.4774263715268*^9, { 3.4774264484077044`*^9, 3.477426456783347*^9}, { 3.4774325120166063`*^9, 3.4774325461756983`*^9}, { 3.477432668764022*^9, 3.4774326883437757`*^9}, { 3.47743271856504*^9, 3.4774327377228837`*^9}, { 3.477432780601451*^9, 3.4774328033533435`*^9}, { 3.4774345241606836`*^9, 3.477434565974122*^9}, { 3.4774346515181313`*^9, 3.477434678130433*^9}, { 3.4774347422063513`*^9, 3.477434781843358*^9}, { 3.477434846075635*^9, 3.4774348470763326`*^9}, { 3.477434939623703*^9, 3.4774349694297314`*^9}, { 3.4774350736804976`*^9, 3.4774350782131395`*^9}, 3.477435903880128*^9, {3.4774360889537735`*^9, 3.477436111226381*^9}, {3.4774735253895087`*^9, 3.4774735849207587`*^9}, {3.4774757485457587`*^9, 3.4774758422488837`*^9}, {3.4774929290457587`*^9, 3.4774929674676337`*^9}, {3.4774930091395087`*^9, 3.4774930600145087`*^9}, {3.4774933510770087`*^9, 3.4774934023895087`*^9}, {3.4774934463426337`*^9, 3.4774934677488837`*^9}, {3.4775190035926337`*^9, 3.4775191854207587`*^9}, {3.4775193555457587`*^9, 3.4775193816863837`*^9}, {3.4775194557020087`*^9, 3.4775195629051337`*^9}, {3.4775195948738837`*^9, 3.4775196330770087`*^9}, {3.4775196697801337`*^9, 3.4775197942645087`*^9}, {3.4775198612020087`*^9, 3.4775198727176337`*^9}, {3.4775201864832587`*^9, 3.4775202038738837`*^9}, {3.4775204882332587`*^9, 3.4775205690145087`*^9}, {3.4775220678113837`*^9, 3.4775220852645087`*^9}, {3.4775226909363837`*^9, 3.4775226916551337`*^9}, {3.4775228197020087`*^9, 3.4775228430301337`*^9}, {3.4775228816238837`*^9, 3.4775230225770087`*^9}, {3.4775230619207587`*^9, 3.4775231084676337`*^9}, {3.4775231592645087`*^9, 3.4775232070926337`*^9}, {3.4775234128270087`*^9, 3.4775234873113837`*^9}, {3.4775640271551337`*^9, 3.4775640966707587`*^9}, {3.4775641640457587`*^9, 3.4775642859988837`*^9}, {3.4775643562176337`*^9, 3.4775643577020087`*^9}, 3.4775648356551337`*^9, { 3.4775649049832587`*^9, 3.4775649089832587`*^9}, { 3.4775697611070004`*^9, 3.4775698496070004`*^9}, { 3.4775698919195004`*^9, 3.4775701107163754`*^9}, { 3.4775702092788754`*^9, 3.4775703799976254`*^9}, { 3.4775705851538754`*^9, 3.4775705910445004`*^9}, { 3.4775706684663754`*^9, 3.4775706713101254`*^9}, { 3.4775707080288754`*^9, 3.4775707284038754`*^9}, { 3.4775707950288754`*^9, 3.4775707952632504`*^9}, { 3.477571257724581*^9, 3.477571314626212*^9}, {3.477571363045126*^9, 3.477571369520842*^9}, {3.4775716745151925`*^9, 3.4775716868767176`*^9}, {3.47757176760217*^9, 3.4775717749564953`*^9}, {3.4775718348081827`*^9, 3.4775718376716747`*^9}, {3.477572003953511*^9, 3.477572007703295*^9}, {3.4775721037446375`*^9, 3.4775721395863233`*^9}, {3.477572438815813*^9, 3.4775724394721384`*^9}, {3.4775724796955214`*^9, 3.477572483492834*^9}, {3.477572537561562*^9, 3.477572576972354*^9}, 3.4775726390616035`*^9, { 3.477572691602267*^9, 3.4775727728355713`*^9}, { 3.4775728289081173`*^9, 3.4775728297676463`*^9}, 3.477572880589344*^9, {3.4775729687949047`*^9, 3.4775729998012533`*^9}, {3.4775730308636007`*^9, 3.47757303095735*^9}, {3.477573074925537*^9, 3.4775730930815544`*^9}, {3.477686043765625*^9, 3.47768606828125*^9}, {3.477686119671875*^9, 3.477686121015625*^9}, {3.4776863926875*^9, 3.4776863939375*^9}, 3.477686528359375*^9, {3.47768668359375*^9, 3.477686696953125*^9}, {3.47768673790625*^9, 3.477686742203125*^9}, {3.477686794234375*^9, 3.47768687328125*^9}, {3.477686921265625*^9, 3.477686926859375*^9}, {3.477686960625*^9, 3.477686963671875*^9}, { 3.477686996375*^9, 3.477687046203125*^9}, {3.477687283609375*^9, 3.477687625140625*^9}, {3.47768765578125*^9, 3.47768797915625*^9}, {3.477688070453125*^9, 3.477688073703125*^9}, {3.477688129265625*^9, 3.477688133390625*^9}, {3.477688211703125*^9, 3.477688252453125*^9}, {3.477688289109375*^9, 3.477688291765625*^9}, {3.477688748234375*^9, 3.477688881359375*^9}, {3.477690609890625*^9, 3.47769061365625*^9}, {3.47769074025*^9, 3.477690744484375*^9}, { 3.47769103821875*^9, 3.477691100578125*^9}, {3.477691341078125*^9, 3.477691344859375*^9}, {3.4776913796875*^9, 3.4776913895625*^9}, { 3.4778294674036407`*^9, 3.477829536387574*^9}, { 3.4779296024705863`*^9, 3.477929619346274*^9}, 3.4782569068113146`*^9, 3.8696786368671494`*^9}, CellID->262564730], Cell[BoxData[ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Pane", "[", RowBox[{ RowBox[{"Switch", "[", RowBox[{"ctrl", ",", "\[IndentingNewLine]", "1", ",", RowBox[{"Grid", "[", RowBox[{ RowBox[{"{", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Grid", "[", RowBox[{ RowBox[{"Prepend", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Text", "/@", RowBox[{"{", RowBox[{ "#", ",", "\"\<\[LeftRightArrow]\>\"", ",", RowBox[{"UnrankString", "[", "#", "]"}], ",", "\"\<:\>\"", ",", RowBox[{"weight", "[", "#", "]"}]}], "}"}]}], "&"}], "/@", RowBox[{"Range", "[", RowBox[{"n", ",", RowBox[{"n", "+", "20"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Text", "[", RowBox[{"Style", "[", RowBox[{"#", ",", "Underlined"}], "]"}], "]"}], "&"}], "/@", " ", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\<\>\"", ",", "\"\\"", ",", "\"\<\>\"", ",", "\"\\""}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Alignment", "\[Rule]", RowBox[{"{", RowBox[{"Center", ",", "Center"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"ItemSize", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{ "3", ",", "2", ",", "8", ",", "1", ",", "3"}], "}"}], "}"}], ",", "1"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Spacings", "\[Rule]", RowBox[{"{", RowBox[{"Automatic", ",", ".045"}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", "note1"}], "\[IndentingNewLine]", "}"}], "}"}], ",", RowBox[{"Spacings", "\[Rule]", "4"}]}], "]"}], ",", "\[IndentingNewLine]", "2", ",", RowBox[{"Column", "[", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Grid", "[", RowBox[{ RowBox[{"Prepend", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"steps", "[", RowBox[{"UnrankString", "[", "#", "]"}], "]"}], "&"}], "/@", RowBox[{"Range", "[", RowBox[{"n", ",", RowBox[{"n", "+", "20"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Flatten", "@", RowBox[{"{", RowBox[{ RowBox[{"Text", "[", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Underlined"}], "]"}], "]"}], ",", "SpanFromLeft", ",", "SpanFromLeft", ",", RowBox[{ RowBox[{ RowBox[{"Text", "[", RowBox[{"Style", "[", RowBox[{"#", ",", "Underlined"}], "]"}], "]"}], "&"}], "/@", " ", RowBox[{"detailHeaders", "\[LeftDoubleBracket]", RowBox[{"4", ";;"}], "\[RightDoubleBracket]"}]}]}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Alignment", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"Center", ",", RowBox[{"{", "Left", "}"}]}], "}"}], ",", "Center"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"ItemSize", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{ "2", ",", "1", ",", "2", ",", "5", ",", "11", ",", "10", ",", "9"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"1", "\[Rule]", "2"}], "}"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Spacings", "\[Rule]", RowBox[{"{", RowBox[{"Automatic", ",", ".03"}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", "note2"}], "\[IndentingNewLine]", "}"}], ",", RowBox[{"Spacings", "\[Rule]", "1"}]}], "]"}], ",", "\[IndentingNewLine]", "3", ",", RowBox[{ RowBox[{ RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"stps", "=", RowBox[{"steps", "[", "#", "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Column", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"n", "\[Equal]", "0"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Grid", "[", RowBox[{"{", RowBox[{"Text", "/@", RowBox[{"{", RowBox[{ "0", ",", "\"\<\[LeftRightArrow]\>\"", ",", "\"\<\>\""}], "}"}]}], "}"}], "]"}], ",", "note0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Grid", "[", RowBox[{"{", RowBox[{"Text", "/@", RowBox[{"{", RowBox[{ "n", ",", "\"\<\[LeftRightArrow]\>\"", ",", "#"}], "}"}]}], "}"}], "]"}], ",", RowBox[{"Grid", "[", RowBox[{ RowBox[{"Transpose", "@", RowBox[{"{", RowBox[{ RowBox[{"Text", "/@", " ", "detailHeaders"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"Text", "@", "\"\<:\>\""}], ",", RowBox[{"{", RowBox[{"Length", "[", "detailHeaders", "]"}], "}"}]}], "]"}], ",", "stps"}], "}"}]}], ",", RowBox[{"Spacings", "\[Rule]", RowBox[{"{", RowBox[{"Automatic", ",", "0.8"}], "}"}]}], ",", RowBox[{"Alignment", "\[Rule]", "Left"}]}], "]"}], ",", "\[IndentingNewLine]", "note3"}], "}"}]}], "]"}], ",", "Left", ",", "2", ",", RowBox[{"Dividers", "\[Rule]", RowBox[{"{", RowBox[{"False", ",", "Center"}], "}"}]}]}], "]"}]}], "]"}], "&"}], "@", RowBox[{"UnrankString", "[", "n", "]"}]}], ",", "\[IndentingNewLine]", "4", ",", RowBox[{ RowBox[{ RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"stps", "=", RowBox[{"steps", "[", "string", "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Column", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Grid", "[", RowBox[{"{", RowBox[{"Text", "/@", RowBox[{"{", RowBox[{ "string", ",", "\"\<\[LeftRightArrow]\>\"", ",", "#"}], "}"}]}], "}"}], "]"}], ",", RowBox[{"Grid", "[", RowBox[{ RowBox[{"Transpose", "@", RowBox[{"{", RowBox[{ RowBox[{"Text", "/@", " ", RowBox[{"Reverse", "@", "detailHeaders"}]}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"Text", "@", "\"\<:\>\""}], ",", RowBox[{"{", RowBox[{"Length", "[", "detailHeaders", "]"}], "}"}]}], "]"}], ",", RowBox[{"Reverse", "@", RowBox[{"steps", "[", "string", "]"}]}]}], "}"}]}], ",", RowBox[{"Spacings", "\[Rule]", RowBox[{"{", RowBox[{"Automatic", ",", "0.8"}], "}"}]}], ",", RowBox[{"Alignment", "\[Rule]", "Left"}]}], "]"}], ",", "\[IndentingNewLine]", "note4"}], "}"}], ",", "Left", ",", "2", ",", RowBox[{"Dividers", "\[Rule]", RowBox[{"{", RowBox[{"False", ",", "Center"}], "}"}]}]}], "]"}]}], "]"}], "&"}], "@", RowBox[{"RankString", "[", "string", "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"{", RowBox[{"550", ",", "400"}], "}"}], ",", RowBox[{"ImageSizeAction", "\[Rule]", "\"\\""}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"ctrl", ",", "1", ",", "\"\<\>\""}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"1", "\[Rule]", "\"\< sample \>\""}], ",", RowBox[{"2", "\[Rule]", "\"\< sample with details \>\""}], ",", RowBox[{"3", "\[Rule]", "\"\< index \[Rule] string \>\""}], ",", RowBox[{"4", "\[Rule]", "\"\< string \[Rule] index \>\""}]}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"n", ",", "43", ",", "\"\\""}], "}"}], ",", "0", ",", "492", ",", "1", ",", RowBox[{"Appearance", "\[Rule]", "\"\\""}], ",", RowBox[{"Enabled", "\[RuleDelayed]", RowBox[{"(", RowBox[{"ctrl", "\[NotEqual]", "4"}], ")"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"initial", ",", "\"\\""}], "}"}], ",", RowBox[{"CharacterRange", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}], ",", RowBox[{"ControlType", "\[Rule]", "SetterBar"}], ",", RowBox[{"Enabled", "\[RuleDelayed]", RowBox[{"(", RowBox[{"ctrl", "\[Equal]", "4"}], ")"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"string", ",", "\"\\""}], "}"}], ",", RowBox[{"removeAccents", "/@", RowBox[{"DictionaryLookup", "[", RowBox[{ RowBox[{"initial", "~~", "__"}], ",", RowBox[{"IgnoreCase", "\[Rule]", "True"}]}], "]"}]}], ",", RowBox[{"ControlType", "\[Rule]", "PopupMenu"}], ",", RowBox[{"Enabled", "\[RuleDelayed]", RowBox[{"(", RowBox[{"ctrl", "\[Equal]", "4"}], ")"}]}]}], "}"}], ",", RowBox[{"AutorunSequencing", "\[Rule]", RowBox[{"{", RowBox[{"2", ",", "1", ",", "5"}], "}"}]}], ",", RowBox[{"SaveDefinitions", "\[Rule]", "True"}]}], "]"}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{ 3.35696210375764*^9, {3.469921337769099*^9, 3.4699216035355*^9}, { 3.46992165819175*^9, 3.469921745832375*^9}, {3.469921791973*^9, 3.469921842082375*^9}, {3.469921886332375*^9, 3.4699219031605*^9}, {3.469921944676125*^9, 3.4699219541605*^9}, { 3.46993012506675*^9, 3.46993025319175*^9}, {3.469930317551125*^9, 3.469930393957375*^9}, {3.4699304284105*^9, 3.46993043537925*^9}, { 3.469930474519875*^9, 3.469930516176125*^9}, {3.469930688582375*^9, 3.469930715644875*^9}, {3.46993075081675*^9, 3.46993088475425*^9}, {3.469930925582375*^9, 3.469931065269875*^9}, {3.469931111582375*^9, 3.469931308488625*^9}, {3.4699313470355*^9, 3.469931467644875*^9}, {3.469931618113625*^9, 3.46993161962925*^9}, {3.469931709973*^9, 3.469931834863625*^9}, { 3.46993186544175*^9, 3.46993210356675*^9}, {3.4699321547855*^9, 3.469932178863625*^9}, {3.4699324747855*^9, 3.469932508707375*^9}, {3.46993254762925*^9, 3.46993260950425*^9}, 3.469932695176125*^9, {3.4699327634105*^9, 3.469932776269875*^9}, { 3.4699328875355*^9, 3.469932904426125*^9}, {3.46993299981675*^9, 3.46993300794175*^9}, {3.469933053223*^9, 3.469933084426125*^9}, { 3.469933195363625*^9, 3.46993320075425*^9}, 3.469933235926125*^9, { 3.4699333259105*^9, 3.469933338957375*^9}, {3.469933479098*^9, 3.469933509457375*^9}, {3.469933540238625*^9, 3.469933585723*^9}, { 3.469933643848*^9, 3.4699336501605*^9}, {3.469933756832375*^9, 3.46993376944175*^9}, {3.46993408062925*^9, 3.4699340815355*^9}, { 3.469934387488625*^9, 3.469934388269875*^9}, {3.469934549769875*^9, 3.46993455362925*^9}, {3.469934584894875*^9, 3.469934845863625*^9}, {3.4699348914105*^9, 3.4699348969105*^9}, { 3.469934947113625*^9, 3.46993499762925*^9}, {3.469935206598*^9, 3.469935211113625*^9}, {3.46993532600425*^9, 3.46993541619175*^9}, 3.469936107988625*^9, {3.469936189457375*^9, 3.469936211613625*^9}, {3.4699362636605*^9, 3.46993626419175*^9}, { 3.469936297269875*^9, 3.469936298473*^9}, {3.46993634369175*^9, 3.469936344363625*^9}, {3.469936392738625*^9, 3.469936393176125*^9}, {3.46994318037925*^9, 3.469943181348*^9}, { 3.469943266098*^9, 3.469943278269875*^9}, {3.4701550497932434`*^9, 3.470155050646329*^9}, {3.4768110843256435`*^9, 3.4768110850599475`*^9}, {3.476811125337331*^9, 3.47681119122163*^9}, 3.4768117133037295`*^9, { 3.4768117934000425`*^9, 3.4768118289171658`*^9}, { 3.4768118791225395`*^9, 3.4768118955607758`*^9}, { 3.4768120412915964`*^9, 3.4768120931493115`*^9}, { 3.4768122131768837`*^9, 3.476812248333809*^9}, { 3.476812286053283*^9, 3.4768123590546846`*^9}, { 3.4768124493064175`*^9, 3.476812455025277*^9}, 3.47681250804192*^9, {3.476812659202982*^9, 3.476812773753523*^9}, {3.4768128637098703`*^9, 3.4768130806671033`*^9}, {3.476813238933741*^9, 3.4768132783253765`*^9}, 3.4768133217955174`*^9, { 3.476813355999737*^9, 3.4768133600623665`*^9}, { 3.476813416220414*^9, 3.4768134211893225`*^9}, { 3.4768135623970537`*^9, 3.4768136554162507`*^9}, { 3.4768136884331436`*^9, 3.4768136981366415`*^9}, { 3.4768137382475567`*^9, 3.476813760732795*^9}, { 3.476813831032369*^9, 3.4768138326105547`*^9}, { 3.476814141841879*^9, 3.4768142656904325`*^9}, { 3.476814302770219*^9, 3.476814365585533*^9}, 3.4768144805594335`*^9, {3.4768145226550694`*^9, 3.476814535608774*^9}, {3.476828834546875*^9, 3.4768288621875*^9}, {3.47682910103125*^9, 3.476829532390625*^9}, { 3.476829587125*^9, 3.47682969671875*^9}, {3.4768297441875*^9, 3.476829802359375*^9}, {3.47682988240625*^9, 3.476829946140625*^9}, {3.4768324698125*^9, 3.476832488578125*^9}, 3.4768325354375*^9, {3.476832678265625*^9, 3.476832729875*^9}, { 3.476868645*^9, 3.476868654015625*^9}, {3.476873210578125*^9, 3.476873425703125*^9}, {3.47687346628125*^9, 3.47687359303125*^9}, {3.476873651296875*^9, 3.476873733578125*^9}, {3.476873871296875*^9, 3.476873920765625*^9}, {3.47687437184375*^9, 3.4768744566875*^9}, 3.47687464753125*^9, {3.47687480840625*^9, 3.47687482909375*^9}, { 3.476874900140625*^9, 3.476874905453125*^9}, {3.476874982765625*^9, 3.47687499115625*^9}, 3.476875054578125*^9, {3.476875138453125*^9, 3.476875173234375*^9}, {3.4768752369375*^9, 3.47687524278125*^9}, {3.47687533053125*^9, 3.476875378546875*^9}, {3.47687549003125*^9, 3.476875494921875*^9}, {3.476875538859375*^9, 3.476875584109375*^9}, {3.4768756546875*^9, 3.47687567565625*^9}, 3.476875705984375*^9, {3.4768757381875*^9, 3.476875741328125*^9}, { 3.476875776421875*^9, 3.476875788375*^9}, {3.47687584659375*^9, 3.4768758675*^9}, 3.476875948625*^9, {3.476876423390625*^9, 3.47687648646875*^9}, 3.476876616390625*^9, {3.476899823125*^9, 3.476899867140625*^9}, {3.476900123328125*^9, 3.476900189453125*^9}, {3.476900705046875*^9, 3.476900730765625*^9}, 3.476900960765625*^9, {3.476901166796875*^9, 3.476901234078125*^9}, {3.476901267109375*^9, 3.47690127115625*^9}, {3.4769014246875*^9, 3.476901469453125*^9}, { 3.47690165871875*^9, 3.47690166215625*^9}, {3.476901696796875*^9, 3.47690174184375*^9}, 3.47690208328125*^9, {3.47690214078125*^9, 3.476902197484375*^9}, {3.4769022360625*^9, 3.476902268734375*^9}, {3.476902299609375*^9, 3.47690230559375*^9}, {3.476902726875*^9, 3.476902774375*^9}, { 3.476902875484375*^9, 3.47690287646875*^9}, {3.476903197359375*^9, 3.476903198890625*^9}, {3.476903237625*^9, 3.47690328425*^9}, 3.476903458703125*^9, {3.476903563328125*^9, 3.4769035636875*^9}, { 3.476903617625*^9, 3.47690363946875*^9}, {3.47690392321875*^9, 3.4769039745625*^9}, {3.47690405315625*^9, 3.47690416925*^9}, { 3.47690420775*^9, 3.47690425721875*^9}, {3.47690428975*^9, 3.47690436003125*^9}, {3.47690442171875*^9, 3.47690455303125*^9}, { 3.4769046134375*^9, 3.476904654328125*^9}, {3.4769047141875*^9, 3.4769047476875*^9}, {3.476904822546875*^9, 3.47690482909375*^9}, { 3.476904888875*^9, 3.476904907609375*^9}, {3.476904959015625*^9, 3.476905028953125*^9}, {3.476905119828125*^9, 3.47690517546875*^9}, {3.4769052214375*^9, 3.47690522240625*^9}, { 3.4769052620625*^9, 3.47690528603125*^9}, {3.47690533453125*^9, 3.476905351890625*^9}, {3.4769054319375*^9, 3.476905436703125*^9}, {3.476908004296875*^9, 3.4769081389375*^9}, {3.47690819859375*^9, 3.476908287875*^9}, { 3.4769083561875*^9, 3.476908408015625*^9}, {3.47690843809375*^9, 3.476908521359375*^9}, {3.476908717078125*^9, 3.47690889384375*^9}, {3.4769093555*^9, 3.476909358125*^9}, { 3.47690981509375*^9, 3.476909831828125*^9}, {3.47690996746875*^9, 3.476909985765625*^9}, {3.476910017890625*^9, 3.476910031296875*^9}, {3.47691009215625*^9, 3.476910125140625*^9}, {3.476910291671875*^9, 3.476910302796875*^9}, {3.476910480046875*^9, 3.476910510765625*^9}, {3.47691066134375*^9, 3.476910662203125*^9}, 3.47691121421875*^9, {3.47691232725*^9, 3.476912336296875*^9}, 3.476913332265625*^9, {3.4769133771875*^9, 3.476913444328125*^9}, 3.4769136715625*^9, {3.47691417834375*^9, 3.476914178546875*^9}, { 3.4769143215625*^9, 3.476914323734375*^9}, {3.476915116234375*^9, 3.476915120609375*^9}, {3.476915224828125*^9, 3.47691526415625*^9}, {3.476915309875*^9, 3.476915353953125*^9}, 3.476915401*^9, {3.4769154375*^9, 3.476915586*^9}, { 3.4769157165*^9, 3.4769157423125*^9}, {3.476916170890625*^9, 3.476916190421875*^9}, {3.47691626771875*^9, 3.47691628209375*^9}, {3.476916331859375*^9, 3.476916390375*^9}, { 3.4769166203125*^9, 3.476916622203125*^9}, {3.47691668065625*^9, 3.4769167305*^9}, {3.476916787734375*^9, 3.476916792734375*^9}, { 3.476916896703125*^9, 3.476916897015625*^9}, {3.476916940296875*^9, 3.476916947609375*^9}, {3.476916988875*^9, 3.476916990859375*^9}, {3.476954780921875*^9, 3.4769548443125*^9}, {3.47695487634375*^9, 3.47695500790625*^9}, { 3.47695505178125*^9, 3.476955076328125*^9}, {3.476955165359375*^9, 3.476955178734375*^9}, {3.476955272875*^9, 3.476955370890625*^9}, { 3.47695544815625*^9, 3.47695545146875*^9}, 3.47695556321875*^9, { 3.4769556594375*^9, 3.4769556660625*^9}, {3.476955833203125*^9, 3.476955853109375*^9}, {3.4769595219961343`*^9, 3.4769595391085753`*^9}, {3.4769595720050945`*^9, 3.476959607667734*^9}, {3.4769596672721634`*^9, 3.476959671569808*^9}, {3.476959712496601*^9, 3.4769597225133157`*^9}, {3.4769619611555214`*^9, 3.4769619645929775`*^9}, {3.476962003764351*^9, 3.4769620191860285`*^9}, 3.476962062576098*^9, { 3.4769625618385468`*^9, 3.4769625802151933`*^9}, { 3.476962641220659*^9, 3.476962652752942*^9}, {3.476962741448388*^9, 3.4769627518087015`*^9}, {3.4769630977352533`*^9, 3.4769631599383783`*^9}, {3.4769632221415033`*^9, 3.4769632320946283`*^9}, {3.4769633210165033`*^9, 3.4769633251727533`*^9}, {3.4769633567977533`*^9, 3.4769633586571283`*^9}, 3.4769634568602533`*^9, { 3.4769635116258783`*^9, 3.4769635128290033`*^9}, { 3.4769642700946283`*^9, 3.4769642952508783`*^9}, { 3.4769659382821283`*^9, 3.4769659417665033`*^9}, { 3.4769661641258783`*^9, 3.4769661942196283`*^9}, { 3.4769662352821283`*^9, 3.4769662355165033`*^9}, 3.4769665279696283`*^9, {3.4769666413602533`*^9, 3.4769666515946283`*^9}, 3.4769667637821283`*^9, { 3.4769670132352533`*^9, 3.4769670804227533`*^9}, { 3.476976985328125*^9, 3.476976990640625*^9}, {3.477418692352092*^9, 3.4774187610873466`*^9}, {3.4774189576216702`*^9, 3.477418982309802*^9}, {3.4774190247952647`*^9, 3.4774190638587646`*^9}, {3.4774193558202333`*^9, 3.477419375726866*^9}, {3.477419478447588*^9, 3.477419499901125*^9}, {3.477419530073579*^9, 3.4774195955904617`*^9}, {3.4774196536853375`*^9, 3.477419660076167*^9}, 3.477419702030635*^9, {3.47742458628125*^9, 3.47742463115625*^9}, {3.477424973734375*^9, 3.47742501353125*^9}, {3.477425057036004*^9, 3.4774250647566805`*^9}, 3.4774254186446*^9, { 3.4774255849407487`*^9, 3.477425590910033*^9}, { 3.477425623334813*^9, 3.477425624756816*^9}, { 3.4774256558367033`*^9, 3.477425658680544*^9}, { 3.4774256938847957`*^9, 3.4774257312609916`*^9}, { 3.4774257863877554`*^9, 3.477425833092375*^9}, { 3.477425983330689*^9, 3.4774259846119556`*^9}, { 3.4774262059512157`*^9, 3.4774262235637465`*^9}, 3.4774263482892184`*^9, 3.477426609982612*^9, { 3.4774266402505617`*^9, 3.4774266676742973`*^9}, { 3.4774267283324885`*^9, 3.4774267666774654`*^9}, 3.4774267999754057`*^9, {3.4774268414142323`*^9, 3.477426914822831*^9}, {3.4774269492770586`*^9, 3.477426997403148*^9}, {3.4774325894761753`*^9, 3.477432589554307*^9}, {3.4774328621082315`*^9, 3.4774328646084394`*^9}, {3.477432936426914*^9, 3.4774329576943088`*^9}, {3.477433006198344*^9, 3.477433038872937*^9}, {3.477433085423685*^9, 3.4774330855174427`*^9}, {3.4774331315368967`*^9, 3.4774331317087855`*^9}, {3.4774331843694167`*^9, 3.4774332110278845`*^9}, 3.4774333090829167`*^9, { 3.4774333983715954`*^9, 3.477433439156238*^9}, { 3.477433478862666*^9, 3.4774335049742136`*^9}, { 3.4774335730111237`*^9, 3.477433631875396*^9}, { 3.477433824328907*^9, 3.4774339851235337`*^9}, { 3.477434025001851*^9, 3.4774340558012886`*^9}, { 3.4774341471995173`*^9, 3.477434211673631*^9}, { 3.477436130873165*^9, 3.4774361588037963`*^9}, { 3.4774712650770087`*^9, 3.4774713282488837`*^9}, { 3.4774713770926337`*^9, 3.4774715297645087`*^9}, 3.4774730656238837`*^9, 3.4774731526395087`*^9, { 3.4774732507176337`*^9, 3.4774732577801337`*^9}, { 3.4774756680770087`*^9, 3.4774756879676337`*^9}, 3.4774926616863837`*^9, {3.4774936934051337`*^9, 3.4774936987488837`*^9}, {3.4774938472020087`*^9, 3.4774939810926337`*^9}, {3.4775188322957587`*^9, 3.4775188626551337`*^9}, {3.4775189477801337`*^9, 3.4775189649051337`*^9}, {3.4775192382801337`*^9, 3.4775192524207587`*^9}, {3.4775193008113837`*^9, 3.4775193091551337`*^9}, {3.4775202753738837`*^9, 3.4775203837332587`*^9}, {3.4775205952488837`*^9, 3.4775206094363837`*^9}, {3.4775708786070004`*^9, 3.4775708932007504`*^9}, {3.477571177219178*^9, 3.4775712007466755`*^9}, {3.47768798715625*^9, 3.477688016671875*^9}, {3.47768890390625*^9, 3.477688956890625*^9}, {3.47769047284375*^9, 3.47769055309375*^9}, {3.477690634796875*^9, 3.47769064334375*^9}, {3.47769113321875*^9, 3.47769114928125*^9}, { 3.47769144096875*^9, 3.477691468375*^9}, {3.477829224092698*^9, 3.4778292246708193`*^9}, 3.4778293147952423`*^9, { 3.4778297116677027`*^9, 3.4778297120270753`*^9}, 3.4779296282591653`*^9, 3.869678636538291*^9}, CellID->310646788], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`ctrl$$ = 1, $CellContext`initial$$ = "E", $CellContext`n$$ = 43, $CellContext`string$$ = "ENUMERATION", Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`ctrl$$], 1, ""}, { 1 -> " sample ", 2 -> " sample with details ", 3 -> " index \[Rule] string ", 4 -> " string \[Rule] index "}}, {{ Hold[$CellContext`n$$], 43, "index"}, 0, 492, 1}, {{ Hold[$CellContext`initial$$], "E"}, { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}}, {{ Hold[$CellContext`string$$], "ENUMERATION"}, Dynamic[ Map[$CellContext`removeAccents, DictionaryLookup[ StringExpression[$CellContext`initial$$, BlankSequence[]], IgnoreCase -> True]]]}}, Typeset`size$$ = {550., {197.3544921875, 202.6455078125}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = False, $CellContext`ctrl$6577$$ = False, $CellContext`n$6578$$ = 0, $CellContext`initial$6579$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`ctrl$$ = 1, $CellContext`initial$$ = "E", $CellContext`n$$ = 43, $CellContext`string$$ = "ENUMERATION"}, "ControllerVariables" :> { Hold[$CellContext`ctrl$$, $CellContext`ctrl$6577$$, False], Hold[$CellContext`n$$, $CellContext`n$6578$$, 0], Hold[$CellContext`initial$$, $CellContext`initial$6579$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Pane[ Switch[$CellContext`ctrl$$, 1, Grid[{{ Grid[ Prepend[ Map[Map[Text, {#, "\[LeftRightArrow]", $CellContext`UnrankString[#], ":", $CellContext`weight[#]}]& , Range[$CellContext`n$$, $CellContext`n$$ + 20]], Map[Text[ Style[#, Underlined]]& , { "index", "", "string", "", "weight"}]], Alignment -> {Center, Center}, ItemSize -> {{{3, 2, 8, 1, 3}}, 1}, Spacings -> {Automatic, 0.045}], $CellContext`note1}}, Spacings -> 4], 2, Column[{ Grid[ Prepend[ Map[$CellContext`steps[ $CellContext`UnrankString[#]]& , Range[$CellContext`n$$, $CellContext`n$$ + 20]], Flatten[{ Text[ Style["offset", Underlined]], SpanFromLeft, SpanFromLeft, Map[Text[ Style[#, Underlined]]& , Part[$CellContext`detailHeaders, Span[4, All]]]}]], Alignment -> {{Center, {Left}}, Center}, ItemSize -> {{{2, 1, 2, 5, 11, 10, 9}}, {1 -> 2}}, Spacings -> {Automatic, 0.03}], $CellContext`note2}, Spacings -> 1], 3, (With[{$CellContext`stps$ = $CellContext`steps[#]}, Column[ If[$CellContext`n$$ == 0, { Grid[{ Map[ Text, { 0, "\[LeftRightArrow]", ""}]}], $CellContext`note0}, { Grid[{ Map[ Text, {$CellContext`n$$, "\[LeftRightArrow]", #}]}], Grid[ Transpose[{ Map[Text, $CellContext`detailHeaders], Table[ Text[":"], { Length[$CellContext`detailHeaders]}], \ $CellContext`stps$}], Spacings -> {Automatic, 0.8}, Alignment -> Left], $CellContext`note3}], Left, 2, Dividers -> {False, Center}]]& )[ $CellContext`UnrankString[$CellContext`n$$]], 4, ( With[{$CellContext`stps$ = \ $CellContext`steps[$CellContext`string$$]}, Column[{ Grid[{ Map[ Text, {$CellContext`string$$, "\[LeftRightArrow]", #}]}], Grid[ Transpose[{ Map[Text, Reverse[$CellContext`detailHeaders]], Table[ Text[":"], { Length[$CellContext`detailHeaders]}], Reverse[ $CellContext`steps[$CellContext`string$$]]}], Spacings -> {Automatic, 0.8}, Alignment -> Left], $CellContext`note4}, Left, 2, Dividers -> {False, Center}]]& )[ $CellContext`RankString[$CellContext`string$$]]], {550, 400}, ImageSizeAction -> "Scrollable"], "Specifications" :> {{{$CellContext`ctrl$$, 1, ""}, { 1 -> " sample ", 2 -> " sample with details ", 3 -> " index \[Rule] string ", 4 -> " string \[Rule] index "}}, {{$CellContext`n$$, 43, "index"}, 0, 492, 1, Appearance -> "Labeled", Enabled :> Dynamic[$CellContext`ctrl$$ != 4]}, {{$CellContext`initial$$, "E"}, { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}, ControlType -> SetterBar, Enabled :> Dynamic[$CellContext`ctrl$$ == 4]}, {{$CellContext`string$$, "ENUMERATION"}, Dynamic[ Map[$CellContext`removeAccents, DictionaryLookup[ StringExpression[$CellContext`initial$$, BlankSequence[]], IgnoreCase -> True]]], ControlType -> PopupMenu, Enabled :> Dynamic[$CellContext`ctrl$$ == 4]}}, "Options" :> {AutorunSequencing -> {2, 1, 5}}, "DefaultOptions" :> {ControllerLinking -> True}], ImageSizeCache->{594., {282., 287.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, Initialization:>({$CellContext`UnrankString[0] = "", $CellContext`UnrankString[ Pattern[$CellContext`i, Blank[Integer]]] := With[{$CellContext`n = BitLength[$CellContext`i]}, $CellContext`StringN[$CellContext`n, $CellContext`i - 2^($CellContext`n - 1)]], $CellContext`StringN[ Pattern[$CellContext`weight, Blank[Integer]], Pattern[$CellContext`n, Blank[Integer]]] := Module[{$CellContext`t = 1}, StringJoin[ ReplaceAll[ Part[ Reap[ Scan[If[# == 0, Sow[$CellContext`t]; $CellContext`t = 1, Increment[$CellContext`t]]& , IntegerDigits[$CellContext`n, 2, $CellContext`weight - 1]]; Sow[$CellContext`t]], 2, 1], Map[ Reverse, $CellContext`characterWeights]]]], \ $CellContext`weight[ Pattern[$CellContext`n, Blank[Integer]]] := If[$CellContext`n == 0, 0, BitLength[$CellContext`n]], $CellContext`weight[ Pattern[$CellContext`s, Blank[String]]] := Total[ ReplaceAll[ Characters[$CellContext`s], \ $CellContext`characterWeights]], $CellContext`characterWeights = { "" -> 0, "A" -> 1, "B" -> 2, "C" -> 3, "D" -> 4, "E" -> 5, "F" -> 6, "G" -> 7, "H" -> 8, "I" -> 9, "J" -> 10, "K" -> 11, "L" -> 12, "M" -> 13, "N" -> 14, "O" -> 15, "P" -> 16, "Q" -> 17, "R" -> 18, "S" -> 19, "T" -> 20, "U" -> 21, "V" -> 22, "W" -> 23, "X" -> 24, "Y" -> 25, "Z" -> 26}, $CellContext`note1 = Text[ Style[ Column[{ "Each index corresponds to exactly one string, and all \ possible strings of any length with all possible characters will \ appear in this enumeration, if continued far enough.", "Strings appear in order of weight: the weight of the \ string is the total of the weights of its characters ('A'\[Rule]1, \ 'B'\[Rule]2, \[Ellipsis])", Row[{"Note that there is 1 = \!\(\*SuperscriptBox[\(2\), \ \(0\)]\) string of weight 1, there are 2 = \ \!\(\*SuperscriptBox[\(2\), \(1\)]\) strings of weight 2, 4 = \ \!\(\*SuperscriptBox[\(2\), \(2\)]\) strings of weight 3, and in \ general ", TraditionalForm[2^(-1 + $CellContext`w)], " strings of weight ", TraditionalForm[$CellContext`w], "."}], "Within each weight group, strings are ordered according \ to an algorithm shown by the examples."}, Left, 2], LineIndent -> 0]], $CellContext`steps[ Pattern[$CellContext`s, Blank[String]]] := Module[{$CellContext`chars, $CellContext`weights, \ $CellContext`origweights, $CellContext`totalWeight, \ $CellContext`numberPreviousWeights, $CellContext`code = ""}, $CellContext`chars = Characters[$CellContext`s]; $CellContext`origweights = \ ($CellContext`weights = ReplaceAll[$CellContext`chars, \ $CellContext`characterWeights]); $CellContext`totalWeight = Total[$CellContext`weights]; If[$CellContext`s == "", Map[Text, Flatten[{0, Table["", {6}]}]], $CellContext`numberPreviousWeights = 2^($CellContext`totalWeight - 1); While[$CellContext`weights != {1}, If[ Part[$CellContext`weights, -1] == 1, $CellContext`code = "0" <> $CellContext`code; $CellContext`weights = Most[$CellContext`weights], $CellContext`code = "1" <> $CellContext`code; Decrement[ Part[$CellContext`weights, -1]]]]; { Text[ FromDigits["1" <> $CellContext`code, 2]], Text[ Superscript[2, $CellContext`totalWeight - 1]], Text[ FromDigits[$CellContext`code, 2]], If[$CellContext`code == "", "", Row[ (Map[Text, Flatten[{ Most[#], Subscript[ Last[#], 2]}]]& )[ Characters[$CellContext`code]], FrameMargins -> 0, ImageSize -> {Automatic, Automatic}]], Text[ StringJoin[ Map[ToString, Flatten[{"{", Riffle[ Table["1", {$CellContext`totalWeight}], ReplaceAll[ Characters[$CellContext`code], { "0" -> ", ", "1" -> "+"}]], "}"}]]]], Text[(ToString[$CellContext`totalWeight] <> ":") <> StringReplace[ ToString[$CellContext`origweights], " " :> If[$CellContext`code === "000000000", "", " "]]], Text[$CellContext`s]}]], Attributes[Superscript] = {NHoldRest, ReadProtected}, Attributes[Subscript] = { NHoldRest}, $CellContext`detailHeaders = { "index", "offset", "reduced", "binary", "meaning", "weights", "string"}, $CellContext`note2 = Text[ Grid[{{"index - offset = reduced = binary, binary \ \[LeftRightArrow] meaning: {0|1} \[LeftRightArrow] {','|'+'},"}, { "meaning = weights, weights \[LeftRightArrow] string: \ {1|2|3|...} \[LeftRightArrow] {A|B|C|...}"}}, Alignment -> Left]], $CellContext`note0 = Text["By definition the index 0 represents the empty \ string."], $CellContext`note3 = Text[ Style[ Row[{"index - offset = reduced = binary \[LeftRightArrow] \ meaning = weights \[LeftRightArrow] string, where offset ", TraditionalForm[2^(-1 + $CellContext`w)], " = number of strings of weight less than ", TraditionalForm[$CellContext`w], ". ", "weights \[LeftRightArrow] string: {1|2|3|...} \ \[LeftRightArrow] {A|B|C|...}", "There is a one\[Hyphen]to\[Hyphen]one function between \ the binary reduced index and the meaning: {0|1} \[LeftRightArrow] \ {','|'+'}"}], LineIndent -> 0]], $CellContext`note4 = Text[ Style[ Row[{"string \[LeftRightArrow] weights = meaning \ \[LeftRightArrow] binary = reduced, reduced + offset = index, where \ offset ", TraditionalForm[2^(-1 + $CellContext`w)], " = number of strings of weight less than ", TraditionalForm[$CellContext`w], ". ", "weights \[LeftRightArrow] string: {1|2|3|...} \ \[LeftRightArrow] {A|B|C|...}", "There is a one\[Hyphen]to\[Hyphen]one function between \ the binary reduced index and the meaning: {0|1} \[LeftRightArrow] \ {','|'+'}"}], LineIndent -> 0]], $CellContext`RankString[""] = 0, $CellContext`RankString[ Pattern[$CellContext`s, Blank[String]]] := With[{$CellContext`weight = ReplaceAll[ Characters[$CellContext`s], \ $CellContext`characterWeights]}, FromDigits[ Flatten[{1, Riffle[ Map[Table[1, {#}]& , $CellContext`weight - 1], 0]}], 2]], $CellContext`removeAccents[ Pattern[$CellContext`s, Blank[String]]] := StringReplace[ ToUpperCase[$CellContext`s], { "\[CapitalADoubleDot]" -> "A", "\[CapitalARing]" -> "A", "\[CapitalAAcute]" -> "A", "\[CapitalAGrave]" -> "A", "\[CapitalAHat]" -> "A", "\[CapitalCCedilla]" -> "C", "\[CapitalEDoubleDot]" -> "E", "\[CapitalEAcute]" -> "E", "\[CapitalEGrave]" -> "E", "\[CapitalEHat]" -> "E", "\[CapitalIDoubleDot]" -> "I", "\[CapitalIAcute]" -> "I", "\[CapitalNTilde]" -> "N", "\[CapitalODoubleDot]" -> "O", "\[CapitalOAcute]" -> "O", "\[CapitalOHat]" -> "O", "\[CapitalUDoubleDot]" -> "U", "\[CapitalUHat]" -> "U", "'" -> "", "-" -> ""}]}; Typeset`initDone$$ = True), SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{3.869678636538719*^9}, CellID->270262828] }, {3}]]