(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 4.2' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 20155, 689]*) (*NotebookOutlinePosition[ 20872, 714]*) (* CellTagsIndexPosition[ 20828, 710]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Producing power sets and a-2-free strings", "Subtitle", FontSize->20, Background->GrayLevel[1]], Cell["\<\ Veikko Ker\[ADoubleDot]nen 2001 Rovaniemi Polytechnic School of Technology veikko.keranen@ramk.fi\ \>", "Subsubtitle"], Cell[CellGroupData[{ Cell["Power Sets", "Section", FontSize->18], Cell[TextData[{ "Here we start from ", "{}", " or {{}} and utilize ", StyleBox["Nest", FontWeight->"Bold"], " and ", StyleBox["NestList", FontWeight->"Bold"], ":" }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(NestList[f, {}, 3]\)], "Input", FontSize->14], Cell[BoxData[ \({{}, f[{}], f[f[{}]], f[f[f[{}]]]}\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Nest[f, {}, 3]\)], "Input", FontSize->14], Cell[BoxData[ \(f[f[f[{}]]]\)], "Output", FontSize->14] }, Open ]], Cell["Some developmental work:", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(Append[{}, 0]\)], "Input", FontSize->14], Cell[BoxData[ \({0}\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(Append[{}, #] &\)\ /@ \ \ {0, 1}\)], "Input", FontSize->14], Cell[BoxData[ \({{0}, {1}}\)], "Output", FontSize->14] }, Open ]], Cell["This does the same:", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(Flatten[\(Table[Append[#, i - 1], {i, 2}] &\) /@ \ {{}}, 1]\)], "Input",\ FontSize->14], Cell[BoxData[ \({{0}, {1}}\)], "Output", FontSize->14] }, Open ]], Cell["And this:", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(\(Flatten[\(Table[Append[#, i - 1], {i, 2}] &\) /@ #, 1] &\)\ [{{}}]\)], "Input", FontSize->14], Cell[BoxData[ \({{0}, {1}}\)], "Output", FontSize->14] }, Open ]], Cell[TextData[{ "Let's define the operation as ", StyleBox["myAppend ", FontWeight->"Bold"], "function:" }], "Text", FontSize->14], Cell[BoxData[{ \(\(Clear[myAppend];\)\), "\[IndentingNewLine]", \(myAppend[x_List, k_: 2] := Flatten[\(Table[Append[#, i - 1], {i, k}] &\) /@ \ x, 1]\ \)}], "Input",\ InitializationCell->True, FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(result1 = myAppend[{{}}]\)], "Input", FontSize->14], Cell[BoxData[ \({{0}, {1}}\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(myAppend[result1]\)], "Input", FontSize->14], Cell[BoxData[ \({{0, 0}, {0, 1}, {1, 0}, {1, 1}}\)], "Output", FontSize->14] }, Open ]], Cell[BoxData[{ \(\(Clear[myLists];\)\), "\[IndentingNewLine]", \(myLists[n_, k_: 2] := Nest[myAppend[#, k] &, {{}}, n]\)}], "Input", InitializationCell->True, FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(myLists[2]\)], "Input", FontSize->14], Cell[BoxData[ \({{0, 0}, {0, 1}, {1, 0}, {1, 1}}\)], "Output", FontSize->14] }, Open ]], Cell["\<\ Note that the second argument can be chosen to be different from 2, e.g.:\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(myLists[2, 4]\)], "Input", FontSize->14], Cell[BoxData[ \({{0, 0}, {0, 1}, {0, 2}, {0, 3}, {1, 0}, {1, 1}, {1, 2}, {1, 3}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {3, 0}, {3, 1}, {3, 2}, {3, 3}}\)], "Output", FontSize->14] }, Open ]], Cell["Count the positions of zeros:", "Text", FontSize->14], Cell[BoxData[{ \(\(Clear[myPositions];\)\ \), "\[IndentingNewLine]", \(myPositions[n_] := \(Position[#, 0] &\)\ /@ \ myLists[n]\)}], "Input", InitializationCell->True, FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(myPositions[2]\)], "Input", FontSize->14], Cell[BoxData[ \({{{1}, {2}}, {{1}}, {{2}}, {}}\)], "Output", FontSize->14] }, Open ]], Cell[BoxData[ \(Clear[powerSet]; powerSet[mySet_] := \((\(Delete[mySet, #] &\)\ /@ \ myPositions[Length[mySet]])\) // Sort\)], "Input", InitializationCell->True, FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(powerSet[{a, b}]\)], "Input", FontSize->14], Cell[BoxData[ \({{}, {a}, {b}, {a, b}}\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(powerSet[{a, b, c, d}]\)], "Input", FontSize->14], Cell[BoxData[ \({{}, {a}, {b}, {c}, {d}, {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d}, {a, b, c}, {a, b, d}, {a, c, d}, {b, c, d}, {a, b, c, d}}\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(ps1 = powerSet[{}]\)], "Input", FontSize->14], Cell[BoxData[ \({{}}\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(powerSet[ps1]\)], "Input", FontSize->14], Cell[BoxData[ \({{}, {{}}}\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(NestList[powerSet, {}, 3]\)], "Input", FontSize->14], Cell[BoxData[ \({{}, {{}}, {{}, {{}}}, {{}, {{}}, {{{}}}, {{}, {{}}}}}\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Nest[powerSet, {}, 4]\)], "Input", FontSize->14], Cell[BoxData[ \({{}, {{}}, {{{}}}, {{{{}}}}, {{{}, {{}}}}, {{}, {{}}}, {{}, {{{}}}}, \ {{}, {{}, {{}}}}, {{{}}, {{{}}}}, {{{}}, {{}, {{}}}}, {{{{}}}, {{}, {{}}}}, \ {{}, {{}}, {{{}}}}, {{}, {{}}, {{}, {{}}}}, {{}, {{{}}}, {{}, {{}}}}, {{{}}, \ {{{}}}, {{}, {{}}}}, {{}, {{}}, {{{}}}, {{}, {{}}}}}\)], "Output", FontSize->14] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Repetition-free strings", "Section", FontSize->18], Cell[CellGroupData[{ Cell["\<\ Ordinary squares are unavoidable over 2 letters - every word of length 4 \ contains them:\ \>", "Subsubsection", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(patternFreeLists = NestList[DeleteCases[myAppend[#, 2], {___, u__, u__}] &, {{}}, 4]\)], "Input", FontSize->14], Cell[BoxData[ \({{{}}, {{0}, {1}}, {{0, 1}, {1, 0}}, {{0, 1, 0}, {1, 0, 1}}, {}}\)], "Output", FontSize->14] }, Open ]], Cell[BoxData[{ \(\(Clear[toStrings];\)\), "\[IndentingNewLine]", \(\(toStrings[ x_] := \(Map[ Apply[StringJoin, #] &, #] &\)\ /@ \((x\ /. \ {0 -> "\", 1 -> "\", 2 -> "\", 3 -> "\"})\);\)\)}], "Input", InitializationCell->True, FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(toStrings[patternFreeLists]\)], "Input", FontSize->14], Cell[BoxData[ \({{\*"\<\"\"\>"}, {"a", "b"}, {"ab", "ba"}, {"aba", "bab"}, {}}\)], "Output", FontSize->14] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Abelian squares are unavoidable over 3 letters - every word of length 8 \ contains them:\ \>", "Subsubsection", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(patternFreeLists = With[{n = 8, k = 3}, NestList[ DeleteCases[ Flatten[Map[Table[Append[#, i - 1], {i, k}] &, #], 1], {___, u__, v__} /; Sort[{u}] \[Equal] Sort[{v}]]\ &, {{}}, n]]\)], "Input", FontSize->14], Cell[BoxData[ \({{{}}, {{0}, {1}, {2}}, {{0, 1}, {0, 2}, {1, 0}, {1, 2}, {2, 0}, {2, 1}}, {{0, 1, 0}, {0, 1, 2}, {0, 2, 0}, {0, 2, 1}, {1, 0, 1}, {1, 0, 2}, {1, 2, 0}, {1, 2, 1}, {2, 0, 1}, {2, 0, 2}, {2, 1, 0}, {2, 1, 2}}, {{0, 1, 0, 2}, {0, 1, 2, 0}, {0, 1, 2, 1}, {0, 2, 0, 1}, {0, 2, 1, 0}, {0, 2, 1, 2}, {1, 0, 1, 2}, {1, 0, 2, 0}, {1, 0, 2, 1}, {1, 2, 0, 1}, {1, 2, 0, 2}, {1, 2, 1, 0}, {2, 0, 1, 0}, {2, 0, 1, 2}, {2, 0, 2, 1}, {2, 1, 0, 1}, {2, 1, 0, 2}, {2, 1, 2, 0}}, {{0, 1, 0, 2, 0}, {0, 1, 0, 2, 1}, {0, 1, 2, 0, 1}, {0, 1, 2, 0, 2}, {0, 1, 2, 1, 0}, {0, 2, 0, 1, 0}, {0, 2, 0, 1, 2}, {0, 2, 1, 0, 1}, {0, 2, 1, 0, 2}, {0, 2, 1, 2, 0}, {1, 0, 1, 2, 0}, {1, 0, 1, 2, 1}, {1, 0, 2, 0, 1}, {1, 0, 2, 1, 0}, {1, 0, 2, 1, 2}, {1, 2, 0, 1, 0}, {1, 2, 0, 1, 2}, {1, 2, 0, 2, 1}, {1, 2, 1, 0, 1}, {1, 2, 1, 0, 2}, {2, 0, 1, 0, 2}, {2, 0, 1, 2, 0}, {2, 0, 1, 2, 1}, {2, 0, 2, 1, 0}, {2, 0, 2, 1, 2}, {2, 1, 0, 1, 2}, {2, 1, 0, 2, 0}, {2, 1, 0, 2, 1}, {2, 1, 2, 0, 1}, {2, 1, 2, 0, 2}}, {{0, 1, 0, 2, 0, 1}, {0, 1, 0, 2, 1, 0}, {0, 1, 0, 2, 1, 2}, {0, 1, 2, 0, 1, 0}, {0, 1, 2, 1, 0, 1}, {0, 2, 0, 1, 0, 2}, {0, 2, 0, 1, 2, 0}, {0, 2, 0, 1, 2, 1}, {0, 2, 1, 0, 2, 0}, {0, 2, 1, 2, 0, 2}, {1, 0, 1, 2, 0, 1}, {1, 0, 1, 2, 0, 2}, {1, 0, 1, 2, 1, 0}, {1, 0, 2, 0, 1, 0}, {1, 0, 2, 1, 0, 1}, {1, 2, 0, 1, 2, 1}, {1, 2, 0, 2, 1, 2}, {1, 2, 1, 0, 1, 2}, {1, 2, 1, 0, 2, 0}, {1, 2, 1, 0, 2, 1}, {2, 0, 1, 0, 2, 0}, {2, 0, 1, 2, 0, 2}, {2, 0, 2, 1, 0, 1}, {2, 0, 2, 1, 0, 2}, {2, 0, 2, 1, 2, 0}, {2, 1, 0, 1, 2, 1}, {2, 1, 0, 2, 1, 2}, {2, 1, 2, 0, 1, 0}, {2, 1, 2, 0, 1, 2}, {2, 1, 2, 0, 2, 1}}, {{0, 1, 0, 2, 0, 1, 0}, {0, 1, 0, 2, 1, 0, 1}, {0, 1, 2, 1, 0, 1, 2}, {0, 2, 0, 1, 0, 2, 0}, {0, 2, 0, 1, 2, 0, 2}, {0, 2, 1, 2, 0, 2, 1}, {1, 0, 1, 2, 0, 1, 0}, {1, 0, 1, 2, 1, 0, 1}, {1, 0, 2, 0, 1, 0, 2}, {1, 2, 0, 2, 1, 2, 0}, {1, 2, 1, 0, 1, 2, 1}, {1, 2, 1, 0, 2, 1, 2}, {2, 0, 1, 0, 2, 0, 1}, {2, 0, 2, 1, 0, 2, 0}, {2, 0, 2, 1, 2, 0, 2}, {2, 1, 0, 1, 2, 1, 0}, {2, 1, 2, 0, 1, 2, 1}, {2, 1, 2, 0, 2, 1, 2}}, {}}\)], "Output"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ \(toStrings[patternFreeLists]\)], "Input", FontSize->14], Cell[BoxData[ \({{\*"\<\"\"\>"}, {"a", "b", "c"}, {"ab", "ac", "ba", "bc", "ca", "cb"}, {"aba", "abc", "aca", "acb", "bab", "bac", "bca", "bcb", "cab", "cac", "cba", "cbc"}, {"abac", "abca", "abcb", "acab", "acba", "acbc", "babc", "baca", "bacb", "bcab", "bcac", "bcba", "caba", "cabc", "cacb", "cbab", "cbac", "cbca"}, {"abaca", "abacb", "abcab", "abcac", "abcba", "acaba", "acabc", "acbab", "acbac", "acbca", "babca", "babcb", "bacab", "bacba", "bacbc", "bcaba", "bcabc", "bcacb", "bcbab", "bcbac", "cabac", "cabca", "cabcb", "cacba", "cacbc", "cbabc", "cbaca", "cbacb", "cbcab", "cbcac"}, {"abacab", "abacba", "abacbc", "abcaba", "abcbab", "acabac", "acabca", "acabcb", "acbaca", "acbcac", "babcab", "babcac", "babcba", "bacaba", "bacbab", "bcabcb", "bcacbc", "bcbabc", "bcbaca", "bcbacb", "cabaca", "cabcac", "cacbab", "cacbac", "cacbca", "cbabcb", "cbacbc", "cbcaba", "cbcabc", "cbcacb"}, {"abacaba", "abacbab", "abcbabc", "acabaca", "acabcac", "acbcacb", "babcaba", "babcbab", "bacabac", "bcacbca", "bcbabcb", "bcbacbc", "cabacab", "cacbaca", "cacbcac", "cbabcba", "cbcabcb", "cbcacbc"}, {}}\)], "Output", FontSize->14] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Produce a-2-free words over 4 letters - below all words of length up to 12 \ (in less than 7 minutes on a 600 MHz machine) \ \>", "Subsubsection", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(fourLists = With[{n = 4, k = 4}, NestList[ DeleteCases[ Flatten[Map[Table[Append[#, i - 1], {i, k}] &, #], 1], {___, u__, v__} /; Sort[{u}] \[Equal] Sort[{v}]]\ &, {{}}, n]]\)], "Input", FontSize->14], Cell[BoxData[ \({{{}}, {{0}, {1}, {2}, {3}}, {{0, 1}, {0, 2}, {0, 3}, {1, 0}, {1, 2}, {1, 3}, {2, 0}, {2, 1}, {2, 3}, {3, 0}, {3, 1}, {3, 2}}, {{0, 1, 0}, {0, 1, 2}, {0, 1, 3}, {0, 2, 0}, {0, 2, 1}, {0, 2, 3}, {0, 3, 0}, {0, 3, 1}, {0, 3, 2}, {1, 0, 1}, {1, 0, 2}, {1, 0, 3}, {1, 2, 0}, {1, 2, 1}, {1, 2, 3}, {1, 3, 0}, {1, 3, 1}, {1, 3, 2}, {2, 0, 1}, {2, 0, 2}, {2, 0, 3}, {2, 1, 0}, {2, 1, 2}, {2, 1, 3}, {2, 3, 0}, {2, 3, 1}, {2, 3, 2}, {3, 0, 1}, {3, 0, 2}, {3, 0, 3}, {3, 1, 0}, {3, 1, 2}, {3, 1, 3}, {3, 2, 0}, {3, 2, 1}, {3, 2, 3}}, {{0, 1, 0, 2}, {0, 1, 0, 3}, {0, 1, 2, 0}, {0, 1, 2, 1}, {0, 1, 2, 3}, {0, 1, 3, 0}, {0, 1, 3, 1}, {0, 1, 3, 2}, {0, 2, 0, 1}, {0, 2, 0, 3}, {0, 2, 1, 0}, {0, 2, 1, 2}, {0, 2, 1, 3}, {0, 2, 3, 0}, {0, 2, 3, 1}, {0, 2, 3, 2}, {0, 3, 0, 1}, {0, 3, 0, 2}, {0, 3, 1, 0}, {0, 3, 1, 2}, {0, 3, 1, 3}, {0, 3, 2, 0}, {0, 3, 2, 1}, {0, 3, 2, 3}, {1, 0, 1, 2}, {1, 0, 1, 3}, {1, 0, 2, 0}, {1, 0, 2, 1}, {1, 0, 2, 3}, {1, 0, 3, 0}, {1, 0, 3, 1}, {1, 0, 3, 2}, {1, 2, 0, 1}, {1, 2, 0, 2}, {1, 2, 0, 3}, {1, 2, 1, 0}, {1, 2, 1, 3}, {1, 2, 3, 0}, {1, 2, 3, 1}, {1, 2, 3, 2}, {1, 3, 0, 1}, {1, 3, 0, 2}, {1, 3, 0, 3}, {1, 3, 1, 0}, {1, 3, 1, 2}, {1, 3, 2, 0}, {1, 3, 2, 1}, {1, 3, 2, 3}, {2, 0, 1, 0}, {2, 0, 1, 2}, {2, 0, 1, 3}, {2, 0, 2, 1}, {2, 0, 2, 3}, {2, 0, 3, 0}, {2, 0, 3, 1}, {2, 0, 3, 2}, {2, 1, 0, 1}, {2, 1, 0, 2}, {2, 1, 0, 3}, {2, 1, 2, 0}, {2, 1, 2, 3}, {2, 1, 3, 0}, {2, 1, 3, 1}, {2, 1, 3, 2}, {2, 3, 0, 1}, {2, 3, 0, 2}, {2, 3, 0, 3}, {2, 3, 1, 0}, {2, 3, 1, 2}, {2, 3, 1, 3}, {2, 3, 2, 0}, {2, 3, 2, 1}, {3, 0, 1, 0}, {3, 0, 1, 2}, {3, 0, 1, 3}, {3, 0, 2, 0}, {3, 0, 2, 1}, {3, 0, 2, 3}, {3, 0, 3, 1}, {3, 0, 3, 2}, {3, 1, 0, 1}, {3, 1, 0, 2}, {3, 1, 0, 3}, {3, 1, 2, 0}, {3, 1, 2, 1}, {3, 1, 2, 3}, {3, 1, 3, 0}, {3, 1, 3, 2}, {3, 2, 0, 1}, {3, 2, 0, 2}, {3, 2, 0, 3}, {3, 2, 1, 0}, {3, 2, 1, 2}, {3, 2, 1, 3}, {3, 2, 3, 0}, {3, 2, 3, 1}}}\)], "Output"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ \(toStrings[fourLists]\)], "Input", FontSize->14], Cell[BoxData[ \({{\*"\<\"\"\>"}, {"a", "b", "c", "d"}, {"ab", "ac", "ad", "ba", "bc", "bd", "ca", "cb", "cd", "da", "db", "dc"}, {"aba", "abc", "abd", "aca", "acb", "acd", "ada", "adb", "adc", "bab", "bac", "bad", "bca", "bcb", "bcd", "bda", "bdb", "bdc", "cab", "cac", "cad", "cba", "cbc", "cbd", "cda", "cdb", "cdc", "dab", "dac", "dad", "dba", "dbc", "dbd", "dca", "dcb", "dcd"}, {"abac", "abad", "abca", "abcb", "abcd", "abda", "abdb", "abdc", "acab", "acad", "acba", "acbc", "acbd", "acda", "acdb", "acdc", "adab", "adac", "adba", "adbc", "adbd", "adca", "adcb", "adcd", "babc", "babd", "baca", "bacb", "bacd", "bada", "badb", "badc", "bcab", "bcac", "bcad", "bcba", "bcbd", "bcda", "bcdb", "bcdc", "bdab", "bdac", "bdad", "bdba", "bdbc", "bdca", "bdcb", "bdcd", "caba", "cabc", "cabd", "cacb", "cacd", "cada", "cadb", "cadc", "cbab", "cbac", "cbad", "cbca", "cbcd", "cbda", "cbdb", "cbdc", "cdab", "cdac", "cdad", "cdba", "cdbc", "cdbd", "cdca", "cdcb", "daba", "dabc", "dabd", "daca", "dacb", "dacd", "dadb", "dadc", "dbab", "dbac", "dbad", "dbca", "dbcb", "dbcd", "dbda", "dbdc", "dcab", "dcac", "dcad", "dcba", "dcbc", "dcbd", "dcda", "dcdb"}}\)], "Output", FontSize->14] }, Open ]], Cell[BoxData[ \(\(fourLists = NestList[ DeleteCases[ myAppend[#, 4], {___, u__, v__} /; Sort[{u}] \[Equal] Sort[{v}]\ ] &, {{}}, 12];\)\)], "Input", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(fourLists[\([1]\)]\), "\[IndentingNewLine]", \(fourLists[\([2]\)]\), "\[IndentingNewLine]", \(fourLists[\([3]\)]\), "\[IndentingNewLine]", \(fourLists[\([9]\)] // Length\), "\[IndentingNewLine]", \(fourLists[\([10]\)] // Length\), "\[IndentingNewLine]", \(fourLists[\([11]\)] // Length\), "\[IndentingNewLine]", \(fourLists[\([12]\)] // Length\), "\[IndentingNewLine]", \(fourLists[\([13]\)] // Length\)}], "Input", FontSize->14], Cell[BoxData[ \({{}}\)], "Output", FontSize->14], Cell[BoxData[ \({{0}, {1}, {2}, {3}}\)], "Output", FontSize->14], Cell[BoxData[ \({{0, 1}, {0, 2}, {0, 3}, {1, 0}, {1, 2}, {1, 3}, {2, 0}, {2, 1}, {2, 3}, {3, 0}, {3, 1}, {3, 2}}\)], "Output", FontSize->14], Cell[BoxData[ \(3576\)], "Output", FontSize->14], Cell[BoxData[ \(7872\)], "Output", FontSize->14], Cell[BoxData[ \(15360\)], "Output", FontSize->14], Cell[BoxData[ \(29184\)], "Output", FontSize->14], Cell[BoxData[ \(51120\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(ByteCount[fourLists]\)], "Input", FontSize->14], Cell[BoxData[ \(11417264\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(SetDirectory["\"]\)], "Input", FontSize->14], Cell[BoxData[ \("C:\\TheStringCD"\)], "Output", FontSize->14] }, Open ]], Cell[BoxData[{ \(\(myMapApply[x_] := Map[Apply[StringJoin, #] &, x];\)\), "\[IndentingNewLine]", \(\(abcdLists = myMapApply\ /@ \((fourLists\ /. \ {0 -> "\", 1 -> "\", 2 -> "\", 3 -> "\"})\);\)\), "\[IndentingNewLine]", \(Save["\", abcdLists]\)}], "Input", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(abcdLists[\([1]\)]\), "\[IndentingNewLine]", \(abcdLists[\([2]\)]\), "\[IndentingNewLine]", \(abcdLists[\([3]\)]\), "\[IndentingNewLine]", \(abcdLists[\([9]\)] // Length\), "\[IndentingNewLine]", \(abcdLists[\([10]\)] // Length\), "\[IndentingNewLine]", \(abcdLists[\([11]\)] // Length\), "\[IndentingNewLine]", \(abcdLists[\([12]\)] // Length\), "\[IndentingNewLine]", \(abcdLists[\([13]\)] // Length\)}], "Input", FontSize->14], Cell[BoxData[ \({\*"\<\"\"\>"}\)], "Output", FontSize->14], Cell[BoxData[ \({"a", "b", "c", "d"}\)], "Output", FontSize->14], Cell[BoxData[ \({"ab", "ac", "ad", "ba", "bc", "bd", "ca", "cb", "cd", "da", "db", "dc"}\)], "Output", FontSize->14], Cell[BoxData[ \(3576\)], "Output", FontSize->14], Cell[BoxData[ \(7872\)], "Output", FontSize->14], Cell[BoxData[ \(15360\)], "Output", FontSize->14], Cell[BoxData[ \(29184\)], "Output", FontSize->14], Cell[BoxData[ \(51120\)], "Output", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(ByteCount[abcdLists]\)], "Input", FontSize->14], Cell[BoxData[ \(3930456\)], "Output", FontSize->14] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, FrontEndVersion->"4.2 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 685}}, AutoGeneratedPackage->None, WindowSize->{1016, 651}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, CellLabelAutoDelete->True, Magnification->2 ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 105, 2, 117, "Subtitle"], Cell[1884, 57, 128, 5, 202, "Subsubtitle"], Cell[CellGroupData[{ Cell[2037, 66, 45, 1, 121, "Section"], Cell[2085, 69, 218, 11, 67, "Text"], Cell[CellGroupData[{ Cell[2328, 84, 67, 2, 59, "Input"], Cell[2398, 88, 84, 2, 59, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2519, 95, 63, 2, 59, "Input"], Cell[2585, 99, 61, 2, 59, "Output"] }, Open ]], Cell[2661, 104, 56, 1, 67, "Text"], Cell[CellGroupData[{ Cell[2742, 109, 62, 2, 59, "Input"], Cell[2807, 113, 53, 2, 59, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2897, 120, 84, 2, 59, "Input"], Cell[2984, 124, 60, 2, 59, "Output"] }, Open ]], Cell[3059, 129, 51, 1, 67, "Text"], Cell[CellGroupData[{ Cell[3135, 134, 110, 3, 98, "Input"], Cell[3248, 139, 60, 2, 59, "Output"] }, Open ]], Cell[3323, 144, 41, 1, 67, "Text"], Cell[CellGroupData[{ Cell[3389, 149, 128, 3, 98, "Input"], Cell[3520, 154, 60, 2, 59, "Output"] }, Open ]], Cell[3595, 159, 142, 6, 67, "Text"], Cell[3740, 167, 228, 6, 137, "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[3993, 177, 73, 2, 59, "Input"], Cell[4069, 181, 60, 2, 59, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4166, 188, 66, 2, 59, "Input"], Cell[4235, 192, 82, 2, 59, "Output"] }, Open ]], Cell[4332, 197, 186, 4, 137, "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[4543, 205, 59, 2, 59, "Input"], Cell[4605, 209, 82, 2, 59, "Output"] }, Open ]], Cell[4702, 214, 115, 3, 67, "Text"], Cell[CellGroupData[{ Cell[4842, 221, 62, 2, 59, "Input"], Cell[4907, 225, 196, 4, 137, "Output"] }, Open ]], Cell[5118, 232, 61, 1, 67, "Text"], Cell[5182, 235, 195, 4, 98, "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[5402, 243, 63, 2, 59, "Input"], Cell[5468, 247, 80, 2, 59, "Output"] }, Open ]], Cell[5563, 252, 202, 5, 176, "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[5790, 261, 65, 2, 59, "Input"], Cell[5858, 265, 72, 2, 59, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5967, 272, 71, 2, 59, "Input"], Cell[6041, 276, 198, 4, 137, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6276, 285, 67, 2, 59, "Input"], Cell[6346, 289, 54, 2, 59, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6437, 296, 62, 2, 59, "Input"], Cell[6502, 300, 60, 2, 59, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6599, 307, 74, 2, 59, "Input"], Cell[6676, 311, 104, 2, 98, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6817, 318, 70, 2, 59, "Input"], Cell[6890, 322, 330, 5, 293, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[7269, 333, 58, 1, 77, "Section"], Cell[CellGroupData[{ Cell[7352, 338, 138, 4, 120, "Subsubsection"], Cell[CellGroupData[{ Cell[7515, 346, 149, 4, 176, "Input"], Cell[7667, 352, 125, 3, 98, "Output"] }, Open ]], Cell[7807, 358, 312, 7, 176, "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[8144, 369, 76, 2, 59, "Input"], Cell[8223, 373, 121, 3, 59, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[8393, 382, 137, 4, 120, "Subsubsection"], Cell[CellGroupData[{ Cell[8555, 390, 304, 8, 293, "Input"], Cell[8862, 400, 2359, 31, 1347, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[11258, 436, 76, 2, 49, "Input"], Cell[11337, 440, 1275, 18, 761, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[12661, 464, 172, 4, 120, "Subsubsection"], Cell[CellGroupData[{ Cell[12858, 472, 297, 8, 254, "Input"], Cell[13158, 482, 2212, 29, 1177, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[15407, 516, 69, 2, 49, "Input"], Cell[15479, 520, 1339, 19, 722, "Output"] }, Open ]], Cell[16833, 542, 218, 6, 215, "Input"], Cell[CellGroupData[{ Cell[17076, 552, 487, 9, 332, "Input"], Cell[17566, 563, 54, 2, 59, "Output"], Cell[17623, 567, 70, 2, 59, "Output"], Cell[17696, 571, 155, 3, 98, "Output"], Cell[17854, 576, 54, 2, 59, "Output"], Cell[17911, 580, 54, 2, 59, "Output"], Cell[17968, 584, 55, 2, 59, "Output"], Cell[18026, 588, 55, 2, 59, "Output"], Cell[18084, 592, 55, 2, 59, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[18176, 599, 69, 2, 59, "Input"], Cell[18248, 603, 58, 2, 59, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[18343, 610, 84, 2, 59, "Input"], Cell[18430, 614, 67, 2, 59, "Output"] }, Open ]], Cell[18512, 619, 353, 7, 254, "Input"], Cell[CellGroupData[{ Cell[18890, 630, 487, 9, 332, "Input"], Cell[19380, 641, 64, 2, 59, "Output"], Cell[19447, 645, 70, 2, 59, "Output"], Cell[19520, 649, 129, 3, 59, "Output"], Cell[19652, 654, 54, 2, 59, "Output"], Cell[19709, 658, 54, 2, 59, "Output"], Cell[19766, 662, 55, 2, 59, "Output"], Cell[19824, 666, 55, 2, 59, "Output"], Cell[19882, 670, 55, 2, 59, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[19974, 677, 69, 2, 59, "Input"], Cell[20046, 681, 57, 2, 59, "Output"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)