(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[    120103,       3673]
NotebookOptionsPosition[    105766,       3196]
NotebookOutlinePosition[    106521,       3225]
CellTagsIndexPosition[    106391,       3219]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["PwM`Chap05Functional`", "Section",
 InitializationGroup->True],

Cell[TextData[{
 StyleBox["From",
  FontWeight->"Bold"],
 ": ",
 StyleBox[ButtonBox["Programming with Mathematica: An Introduction",
  BaseStyle->"Hyperlink",
  ButtonData->{
    URL["http://www.cambridge.org/wellin"], None},
  ButtonNote->"http://www.cambridge.org/wellin"],
  FontSlant->"Italic",
  FontVariations->{"Underline"->True}]
}], "Text",
 CellMargins->{{28, 10}, {7, 7}},
 FontSize->14],

Cell[CellGroupData[{

Cell["Metadata", "Subsection"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{":", 
   RowBox[{"Name", ":", " ", "PwM`Chap05Functional`"}]}], " ", 
  "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{":", 
   RowBox[{"Book", ":", " ", 
    RowBox[{"Programming", " ", "with", " ", 
     RowBox[{"Mathematica", ":", " ", 
      RowBox[{"An", " ", "Introduction"}]}]}]}]}], " ", "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{":", 
   RowBox[{"Author", ":", " ", 
    RowBox[{"Paul", " ", "Wellin"}]}]}], " ", "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{
   RowBox[{":", 
    RowBox[{"Summary", ":", " ", 
     RowBox[{
     "This", " ", "package", " ", "contains", " ", "the", " ", "functions", 
      " ", "defined", " ", "in", " ", "Chapter", " ", "5"}]}]}], ",", " ", 
   RowBox[{"Functional", " ", 
    RowBox[{"programming", "."}]}]}], " ", "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{":", 
   RowBox[{"Context", ":", " ", "PwM`Chap05Functional`"}]}], " ", 
  "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{":", 
   RowBox[{"Package", " ", "Version"}], ":", " ", "1.01"}], " ", 
  "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{
   RowBox[{":", "Copyright", ":", " ", 
    RowBox[{"Copyright", " ", "2012"}]}], ",", " ", 
   RowBox[{"Paul", " ", 
    RowBox[{"R", ".", " ", "Wellin"}]}]}], " ", "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{
   RowBox[{":", 
    RowBox[{"History", ":", " ", 
     RowBox[{
     "Version", " ", "1.0", " ", "by", " ", "Paul", " ", "Wellin"}]}]}], ",", 
   " ", 
   RowBox[{
    RowBox[{
    "Dec", " ", "2012", "\[IndentingNewLine]", "           ", "Version", " ", 
     "1.01", " ", "by", " ", "Paul", " ", "Wellin", " ", "updated", " ", "to",
      " ", "be", " ", "compatible", " ", "with", " ", "Mathematica", " ", 
     "10"}], " ", "-", " ", 
    RowBox[{
    "renamed", " ", "several", " ", "functions", " ", "that", " ", "are", " ",
      "now", " ", "built", " ", "in"}]}]}], " ", "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{
   RowBox[{":", 
    RowBox[{"Keywords", ":", " ", 
     RowBox[{"adjacency", " ", "structure"}]}]}], ",", " ", 
   RowBox[{"composite", " ", "number"}], ",", " ", "attributes", ",", " ", 
   "options", ",", " ", 
   RowBox[{"Hamming", " ", "distance"}], ",", " ", 
   RowBox[{"perfect", " ", "numbers"}], ",", " ", 
   RowBox[{"pointset", " ", "diameter"}], ",", " ", 
   RowBox[{"regular", " ", "graph"}], ",", " ", 
   RowBox[{"random", " ", "colors"}], ",", " ", 
   RowBox[{"rep", " ", "unit"}], ",", " ", 
   RowBox[{"Smith", " ", "numbers"}], ",", " ", 
   RowBox[{"Sierpinski", " ", "triangle"}], ",", " ", 
   RowBox[{"stem", " ", "plot"}], ",", " ", 
   RowBox[{"truth", " ", "table"}], ",", " ", 
   RowBox[{"upper", " ", "triangular", " ", "matrix"}], ",", " ", 
   RowBox[{"Vandermonde", " ", "matrix"}]}], " ", "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{":", 
   RowBox[{"Source", ":", " ", 
    RowBox[{"Chap05Functional", ".", "nb"}]}]}], " ", "*)"}]], "Input"],

Cell[BoxData[
 RowBox[{"(*", " ", 
  RowBox[{":", 
   RowBox[{"Mathematica", " ", "Version"}], ":", " ", 
   RowBox[{"10.0", ".1"}]}], " ", "*)"}]], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["BeginPackage", "Subsection"],

Cell[BoxData[
 RowBox[{"Remove", "[", 
  RowBox[{
  "PerfectSearch", ",", "TruthTable", ",", "UpperTriangularMatrix", ",", 
   "compositeQ"}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"BeginPackage", "[", "\"\<PwM`Chap05Functional`\>\"", "]"}], 
  ";"}]], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["Usage messages for public functions", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"AdjacencyStructure", "::", "usage"}], "=", 
   "\"\<AdjacencyStructure[gr] returns the adjacency lists for each vertex in \
the graph gr.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"compositeQ", "::", "usage"}], "=", 
   "\"\<compositeQ[n] returns True if n  is a composite number.\>\""}], 
  ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"compositeQ", "::", "badarg"}], "=", 
   "\"\<Argument `1` in compositeQ[`1`] is not an integer greater than \
1.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"ExpandFactors", "::", "usage"}], "=", 
   "\"\<ExpandFactors[lis] expands a list of factors, lis, of an integer as \
given by FactorInteger and returns the explicit number.\>\""}], 
  ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"FunctionsWithAttribute", "::", "usage"}], "=", 
   "\"\<FunctionsWithAttribute[attr] returns a list of all symbols in the \
System` context that have the attribute attr.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"FunctionsWithOption", "::", "usage"}], "=", 
   "\"\<FunctionsWithOption[opt] returns a list of all symbols in the System` \
context that have the option opt.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"HammingDistance1", "::", "usage"}], "=", 
   "\"\<HammingDistance1[\!\(\*SubscriptBox[\(sig\), \
\(1\)]\),\!\(\*SubscriptBox[\(sig\), \(2\)]\)] computes the Hamming distance \
of the two binary signals \!\(\*SubscriptBox[\(sig\), \(1\)]\) and \
\!\(\*SubscriptBox[\(sig\), \(2\)]\) using \
Count[MapThread[SameQ[\[Ellipsis]]]].\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"HammingDistance2", "::", "usage"}], "=", 
   "\"\<HammingDistance2[\!\(\*SubscriptBox[\(sig\), \
\(1\)]\),\!\(\*SubscriptBox[\(sig\), \(2\)]\)] computes the Hamming distance \
of the two binary signals \!\(\*SubscriptBox[\(sig\), \(1\)]\) and \
\!\(\*SubscriptBox[\(sig\), \(2\)]\) using Total[BitXor[\[Ellipsis]]].\>\""}],
   ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"HammingDistance3", "::", "usage"}], "=", 
   "\"\<HammingDistance3[\!\(\*SubscriptBox[\(sig\), \
\(1\)]\),\!\(\*SubscriptBox[\(sig\), \(2\)]\)] computes the Hamming distance \
of the two binary signals \!\(\*SubscriptBox[\(sig\), \(1\)]\) and \
\!\(\*SubscriptBox[\(sig\), \(2\)]\) using \
Length[Select[\[Ellipsis],Mod[#,2]==1&]].\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"HammingDistance4", "::", "usage"}], "=", 
   "\"\<HammingDistance4[\!\(\*SubscriptBox[\(sig\), \
\(1\)]\),\!\(\*SubscriptBox[\(sig\), \(2\)]\)] computes the Hamming distance \
of the two binary signals \!\(\*SubscriptBox[\(sig\), \(1\)]\) and \
\!\(\*SubscriptBox[\(sig\), \(2\)]\) using \
Length[Select[\[Ellipsis],OddQ]].\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"HammingDistance5", "::", "usage"}], "=", 
   "\"\<HammingDistance5[\!\(\*SubscriptBox[\(sig\), \
\(1\)]\),\!\(\*SubscriptBox[\(sig\), \(2\)]\)] computes the Hamming distance \
of the two binary signals \!\(\*SubscriptBox[\(sig\), \(1\)]\) and \
\!\(\*SubscriptBox[\(sig\), \(2\)]\) using \
Length[Cases[Transpose[\[Ellipsis]],{p_,q_}/;p\[NotEqual]q]].\>\""}], 
  ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"HammingNumber", "::", "usage"}], "=", 
   "\"\<HammingNumber[n] returns the nth Hamming number. Hamming numbers are \
defined as numbers that divide powers of 60.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"HammingNumberList", "::", "usage"}], "=", 
   "\"\<HammingNumberList[n] returns the first n Hamming numbers.\>\""}], 
  ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"NearTo", "::", "usage"}], "=", 
   "\"\<NearTo[lis, elem, n] returns those elements in lis that are n \
positions from elem.\\nNearTo[lis, elem, {n}] returns those elements in lis \
that are less than or equal to n positions away from elem.\>\""}], 
  ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"PerfectSearch", "::", "usage"}], "=", 
   "\"\<PerfectSearch[n,m] returns a list of all those perfect numbers \
(numbers that are equal to the sum of their proper divisors) between n and m.\
\\nPerfectSearch[n,m,k] returns a list of all those perfect numbers between n \
and m, searching by increment k.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"PerfectSearchParallel", "::", "usage"}], "=", 
   "\"\<PerfectSearchParallel[n,m, k] searches for k-perfect numbers between \
n and m performing the search in parallel. If no subkernels are available, \
the search is performed on a single kernel.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"PointsetDiameter", "::", "usage"}], "=", 
   "\"\<PointsetDiameter[pts] computes the maximum distance between any pair \
of points in the list of points, pts.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"PrimeFactorForm", "::", "usage"}], "=", 
   "\"\<PrimeFactorForm[n] formats the prime factorization of the integer n \
in a traditional form.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"randomColor", "::", "usage"}], "=", 
   "\"\<randomColor[] returns an RGBColor expression with random values for \
the red, green, and blue components.\\nrandomColor[n] return a list of n \
random colors.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"RegularGraph", "::", "usage"}], "=", 
   "\"\<RegularGraph[n] returns a graph with n equilateral edges and all of \
whose internal angles are equiangular.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"RepUnit", "::", "usage"}], "=", 
   "\"\<RepUnit[n] returns a number consisting the digit 1 concatenated n \
times.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"ReplaceElement", "::", "usage"}], "=", 
   "\"\<ReplaceElement[mat, lis] returns the matrix mat with elements that \
are strings specified by lis replaced with their column mean.\>\""}], 
  ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"SierpinskiTriangle", "::", "usage"}], "=", 
   "\"\<SierpinskiTriangle[n] displays a Sierpinski triangle after n \
iterations of the geometric transformations that define it. \
SierpinskiTriangle takes the same options as Graphics.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"SmithNumberQ", "::", "usage"}], "=", 
   "\"\<SmithNumberQ[n] returns if n is a Smith number \[Dash] a composite \
number the sum of whose digits is equal to the sum of the digits of its prime \
factors.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"StemPlot", "::", "usage"}], "=", 
   "\"\<StemPlot[data] returns a stem plot of the discrete data, data.\>\""}],
   ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"StemPlot", "::", "badarg"}], "=", 
   "\"\<The first argument to StemPlot must be a list of numbers.\>\""}], 
  ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"ToGraph", "::", "usage"}], "=", 
   "\"\<ToGraph[lis] converts the list of pairs, lis, to a directed \
graph.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"TruthTable", "::", "usage"}], "=", 
   "\"\<TruthTable[expr, vars] returns a table of truth values for the \
logical expression expr in the variables vars.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"UpperTriangularMatrix", "::", "usage"}], "=", 
   "\"\<UpperTriangularMatrix[n] returns a square matrix of size n with zeros \
below the diagonal and ones on and above the diagonal.\>\""}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"VandermondeMatrix", "::", "usage"}], "=", 
   "\"\<VandermondeMatrix[n, var] returns the Vandermonde matrix of order n \
in the variable var.\>\""}], ";"}]], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["Options", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Options", "[", "StemPlot", "]"}], "=", 
   RowBox[{"Options", "[", "ListPlot", "]"}]}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Options", "[", "RegularGraph", "]"}], "=", 
   RowBox[{"Options", "[", "Graph", "]"}]}], ";"}]], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["Private context", "Subsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Begin", "[", "\"\<`Private`\>\"", "]"}]], "Input"],

Cell[BoxData["\<\"PWM`Chap05Functional`Private`\"\>"], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["Function definitions (public and private)", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"adjacencyList", "[", 
   RowBox[{"gr_", ",", "u_"}], "]"}], ":=", 
  RowBox[{"If", "[", 
   RowBox[{
    RowBox[{"DirectedGraphQ", "[", "gr", "]"}], ",", 
    RowBox[{"Select", "[", 
     RowBox[{
      RowBox[{"VertexList", "[", "gr", "]"}], ",", 
      RowBox[{
       RowBox[{"EdgeQ", "[", 
        RowBox[{"gr", ",", 
         RowBox[{"DirectedEdge", "[", 
          RowBox[{"u", ",", "#"}], "]"}]}], "]"}], "&"}]}], "]"}], ",", 
    RowBox[{"Select", "[", 
     RowBox[{
      RowBox[{"VertexList", "[", "gr", "]"}], ",", 
      RowBox[{
       RowBox[{"EdgeQ", "[", 
        RowBox[{"gr", ",", 
         RowBox[{"UndirectedEdge", "[", 
          RowBox[{"u", ",", "#"}], "]"}]}], "]"}], "&"}]}], "]"}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"AdjacencyStructure", "[", "gr_Graph", "]"}], ":=", 
  RowBox[{"Map", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"{", 
      RowBox[{"#", ",", 
       RowBox[{"adjacencyList", "[", 
        RowBox[{"gr", ",", "#"}], "]"}]}], "}"}], "&"}], ",", 
    RowBox[{"VertexList", "[", "gr", "]"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"compositeQ", "[", 
   RowBox[{"n_Integer", "/;", 
    RowBox[{"n", ">", "1"}]}], "]"}], ":=", 
  RowBox[{"Not", "[", 
   RowBox[{"PrimeQ", "[", "n", "]"}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"compositeQ", "[", "n_", "]"}], "/;", 
   RowBox[{"If", "[", 
    RowBox[{
     RowBox[{"TrueQ", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"Head", "[", "n", "]"}], "\[Equal]", "Integer"}], "&&", 
       RowBox[{"n", ">", "1"}]}], "]"}], ",", "True", ",", 
     RowBox[{
      RowBox[{"Message", "[", 
       RowBox[{
        StyleBox[
         RowBox[{"compositeQ", "::", "badarg"}], "MessageName"], ",", "n"}], 
       "]"}], ";", "False"}]}], "]"}]}], ":=", 
  RowBox[{"Not", "@", 
   RowBox[{"PrimeQ", "[", "n", "]"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ExpandFactors", "[", "lis_", "]"}], ":=", 
  RowBox[{"Apply", "[", 
   RowBox[{"Times", ",", 
    RowBox[{"Apply", "[", 
     RowBox[{"Power", ",", "lis", ",", 
      RowBox[{"{", "1", "}"}]}], "]"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"FunctionsWithAttribute", "[", "attrib_Symbol", "]"}], ":=", 
  RowBox[{"Select", "[", 
   RowBox[{
    RowBox[{"Names", "[", "\"\<System`*\>\"", "]"}], ",", 
    RowBox[{
     RowBox[{"MemberQ", "[", 
      RowBox[{
       RowBox[{"Attributes", "[", "#", "]"}], ",", "attrib"}], "]"}], "&"}]}],
    "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"FunctionsWithOption", "[", "opt_Symbol", "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", "names", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"names", "=", 
      RowBox[{"Complement", "[", 
       RowBox[{
        RowBox[{"Names", "[", "\"\<System`*\>\"", "]"}], ",", 
        RowBox[{"Names", "[", "\"\<System`$*\>\"", "]"}]}], "]"}]}], ";", 
     RowBox[{"Select", "[", 
      RowBox[{"names", ",", 
       RowBox[{
        RowBox[{"Quiet", "@", 
         RowBox[{"MemberQ", "[", 
          RowBox[{
           RowBox[{"First", "/@", 
            RowBox[{"Options", "[", 
             RowBox[{"Symbol", "[", "#", "]"}], "]"}]}], ",", "opt"}], 
          "]"}]}], "&"}]}], "]"}]}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"HammingDistance1", "[", 
   RowBox[{"lis1_", ",", "lis2_"}], "]"}], ":=", "\[IndentingNewLine]", 
  RowBox[{"Count", "[", 
   RowBox[{
    RowBox[{"MapThread", "[", 
     RowBox[{"SameQ", ",", 
      RowBox[{"{", 
       RowBox[{"lis1", ",", "lis2"}], "}"}]}], "]"}], ",", "False"}], 
   "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"HammingDistance2", "[", 
   RowBox[{"lis1_", ",", "lis2_"}], "]"}], ":=", 
  RowBox[{"Total", "[", 
   RowBox[{"BitXor", "[", 
    RowBox[{"lis1", ",", "lis2"}], "]"}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"HammingDistance3", "[", 
   RowBox[{"lis1_", ",", "lis2_"}], "]"}], ":=", 
  RowBox[{"Length", "[", 
   RowBox[{"Select", "[", 
    RowBox[{
     RowBox[{"lis1", "+", "lis2"}], ",", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"Mod", "[", 
         RowBox[{"#", ",", "2"}], "]"}], "\[Equal]", "1"}], "&"}], ")"}]}], 
    "]"}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"HammingDistance4", "[", 
   RowBox[{"lis1_", ",", "lis2_"}], "]"}], ":=", "\[IndentingNewLine]", 
  RowBox[{"Length", "[", 
   RowBox[{"Select", "[", 
    RowBox[{
     RowBox[{"lis1", "+", "lis2"}], ",", "OddQ"}], "]"}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"HammingDistance5", "[", 
   RowBox[{"lis1_List", ",", "lis2_List"}], "]"}], ":=", 
  "\[IndentingNewLine]", 
  RowBox[{"Length", "[", 
   RowBox[{"Cases", "[", 
    RowBox[{
     RowBox[{"Transpose", "[", 
      RowBox[{"{", 
       RowBox[{"lis1", ",", "lis2"}], "}"}], "]"}], ",", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"p_", ",", "q_"}], "}"}], "/;", 
      RowBox[{"p", "\[NotEqual]", "q"}]}]}], "]"}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"HammingNumberList", "[", "n_", "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", "lim", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"lim", "=", 
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"n", "<", "100"}], ",", 
        RowBox[{"Ceiling", "[", 
         RowBox[{"Log2", "[", "n", "]"}], "]"}], ",", 
        RowBox[{"Ceiling", "[", 
         RowBox[{
          RowBox[{"Log2", "[", 
           FractionBox["n", 
            RowBox[{"2", " ", "3", " ", "5"}]], "]"}], " ", 
          RowBox[{"Log2", "[", "n", "]"}]}], "]"}]}], "]"}]}], ";", 
     RowBox[{"Join", "[", 
      RowBox[{
       RowBox[{"{", "1", "}"}], ",", 
       RowBox[{"Take", "[", 
        RowBox[{
         RowBox[{"Union", "@@", 
          RowBox[{"NestList", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"Union", "@@", 
              RowBox[{"Outer", "[", 
               RowBox[{"Times", ",", 
                RowBox[{"{", 
                 RowBox[{"2", ",", "3", ",", "5"}], "}"}], ",", "#"}], 
               "]"}]}], "&"}], ",", 
            RowBox[{"{", 
             RowBox[{"2", ",", "3", ",", "5"}], "}"}], ",", "lim"}], "]"}]}], 
         ",", 
         RowBox[{"n", "-", "1"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}]}],
    "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"HammingNumber", "[", "n_", "]"}], ":=", 
  RowBox[{"Part", "[", 
   RowBox[{
    RowBox[{"HammingNumberList", "[", "n", "]"}], ",", "n"}], 
   "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"NearTo", "[", 
   RowBox[{"lis_List", ",", "elem_", ",", "n_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"pos", "=", 
      RowBox[{"Position", "[", 
       RowBox[{"lis", ",", "elem"}], "]"}]}], "}"}], ",", 
    RowBox[{"Extract", "[", 
     RowBox[{"lis", ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"pos", "-", "n"}], ",", 
        RowBox[{"pos", "+", "n"}]}], "}"}]}], "]"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"NearTo", "[", 
   RowBox[{"lis_List", ",", "elem_", ",", 
    RowBox[{"{", "n_", "}"}]}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"pos", "=", 
      RowBox[{"Position", "[", 
       RowBox[{"lis", ",", "elem"}], "]"}]}], "}"}], ",", 
    RowBox[{"Extract", "[", 
     RowBox[{"lis", ",", 
      RowBox[{"Range", "[", 
       RowBox[{
        RowBox[{"pos", "-", "n"}], ",", 
        RowBox[{"pos", "+", "n"}]}], "]"}]}], "]"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"PerfectSearch", "[", 
   RowBox[{"n_", ",", "m_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", "perfectQ", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"perfectQ", "[", "j_", "]"}], ":=", 
      RowBox[{
       RowBox[{"DivisorSigma", "[", 
        RowBox[{"1", ",", "j"}], "]"}], "\[Equal]", 
       RowBox[{"2", " ", "j"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Select", "[", 
      RowBox[{
       RowBox[{"Range", "[", 
        RowBox[{"n", ",", "m", ",", "2"}], "]"}], ",", "perfectQ"}], 
      "]"}]}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"PerfectSearch", "[", 
   RowBox[{"n_", ",", "m_", ",", "k_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", "perfectQ", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"perfectQ", "[", "j_", "]"}], ":=", 
      RowBox[{
       RowBox[{"DivisorSigma", "[", 
        RowBox[{"1", ",", "j"}], "]"}], "\[Equal]", 
       RowBox[{"k", " ", "j"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Select", "[", 
      RowBox[{
       RowBox[{"Range", "[", 
        RowBox[{"n", ",", "m"}], "]"}], ",", "perfectQ"}], "]"}]}]}], 
   "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"PerfectSearchParallel", "[", 
   RowBox[{"n_", ",", "m_", ",", "k_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", "perfectQ", "}"}], ",", 
    RowBox[{
     RowBox[{
      RowBox[{"perfectQ", "[", "j_", "]"}], ":=", 
      RowBox[{
       RowBox[{"DivisorSigma", "[", 
        RowBox[{"1", ",", "j"}], "]"}], "\[Equal]", 
       RowBox[{"k", " ", "j"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"DistributeDefinitions", "[", "perfectQ", "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"Parallelize", "[", 
      RowBox[{"Select", "[", 
       RowBox[{
        RowBox[{"Range", "[", 
         RowBox[{"n", ",", "m", ",", "2"}], "]"}], ",", "perfectQ"}], "]"}], 
      "]"}]}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"PointsetDiameter", "[", "pts_List", "]"}], ":=", 
  RowBox[{"Max", "[", 
   RowBox[{"Apply", "[", 
    RowBox[{"EuclideanDistance", ",", 
     RowBox[{"Subsets", "[", 
      RowBox[{"pts", ",", 
       RowBox[{"{", "2", "}"}]}], "]"}], ",", 
     RowBox[{"{", "1", "}"}]}], "]"}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"PrimeFactorForm", "[", 
   RowBox[{"p_", "?", "PrimePowerQ"}], "]"}], ":=", 
  RowBox[{"With", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"fp", "=", 
      RowBox[{"FactorInteger", "[", "p", "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"Interpretation", "[", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"First", "[", 
       RowBox[{"Superscript", "@@@", 
        RowBox[{"FactorInteger", "[", "p", "]"}]}], "]"}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{"Times", "@@", 
       RowBox[{"(", 
        RowBox[{"Power", "@@@", "fp"}], ")"}]}]}], "]"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"PrimeFactorForm", "[", "p_Integer", "]"}], ":=", 
  RowBox[{"With", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"fp", "=", 
      RowBox[{"FactorInteger", "[", "p", "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"Interpretation", "[", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"CenterDot", "@@", 
       RowBox[{"(", 
        RowBox[{"Superscript", "@@@", "fp"}], ")"}]}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{"Times", "@@", 
       RowBox[{"(", 
        RowBox[{"Power", "@@@", "fp"}], ")"}]}]}], "]"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"randomColor", "[", "]"}], ":=", 
  RowBox[{"Apply", "[", 
   RowBox[{"RGBColor", ",", 
    RowBox[{"RandomReal", "[", 
     RowBox[{"1", ",", 
      RowBox[{"{", "3", "}"}]}], "]"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"randomColor", "[", 
   RowBox[{"n_Integer", "?", "Positive"}], "]"}], ":=", 
  RowBox[{"Apply", "[", 
   RowBox[{"RGBColor", ",", 
    RowBox[{"RandomReal", "[", 
     RowBox[{"1", ",", 
      RowBox[{"{", 
       RowBox[{"n", ",", "3"}], "}"}]}], "]"}], ",", 
    RowBox[{"{", "1", "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"RegularGraph", "[", 
   RowBox[{"n_Integer", ",", 
    RowBox[{"opts", ":", 
     RowBox[{"OptionsPattern", "[", "]"}]}]}], "]"}], ":=", 
  "\[IndentingNewLine]", 
  RowBox[{"With", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"lis", "=", 
      RowBox[{"Range", "[", "n", "]"}]}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"Graph", "[", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"MapThread", "[", 
       RowBox[{"UndirectedEdge", ",", 
        RowBox[{"{", 
         RowBox[{"lis", ",", 
          RowBox[{"RotateLeft", "[", "lis", "]"}]}], "}"}]}], "]"}], ",", 
      "\[IndentingNewLine]", "opts", ",", "\[IndentingNewLine]", 
      RowBox[{"VertexSize", "\[Rule]", "0.002"}], ",", 
      RowBox[{"EdgeStyle", "\[Rule]", "Thick"}]}], "]"}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"RepUnit", "[", "n_", "]"}], ":=", 
  RowBox[{"Nest", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       RowBox[{"10", " ", "#"}], "+", "1"}], ")"}], "&"}], ",", "1", ",", 
    RowBox[{"n", "-", "1"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"colMean", "[", 
   RowBox[{"mat_", ",", "col_", ",", 
    RowBox[{"{", "strings___String", "}"}]}], "]"}], ":=", 
  RowBox[{
   RowBox[{"mat", "[", 
    RowBox[{"[", 
     RowBox[{"All", ",", "col"}], "]"}], "]"}], "/.", 
   RowBox[{
    RowBox[{"Apply", "[", 
     RowBox[{"Alternatives", ",", 
      RowBox[{"{", "strings", "}"}]}], "]"}], "\[Rule]", 
    RowBox[{"Mean", "[", 
     RowBox[{"Cases", "[", 
      RowBox[{
       RowBox[{"mat", "[", 
        RowBox[{"[", 
         RowBox[{"All", ",", "col"}], "]"}], "]"}], ",", 
       RowBox[{"_", "?", "NumberQ"}]}], "]"}], "]"}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ReplaceElement", "[", 
   RowBox[{"mat_", ",", 
    RowBox[{"{", "strings__", "}"}]}], "]"}], ":=", "\[IndentingNewLine]", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Map", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"colMean", "[", 
       RowBox[{"#", ",", 
        RowBox[{"{", "strings", "}"}]}], "]"}], "&"}], ",", 
     RowBox[{"Transpose", "[", "mat", "]"}]}], "]"}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"SierpinskiTriangle", "[", 
   RowBox[{"iter_", ",", 
    RowBox[{"opts", ":", 
     RowBox[{"OptionsPattern", "[", "Graphics", "]"}]}]}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"vertices", ",", "vecs"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"vertices", "=", 
      RowBox[{"N", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"1", "/", "2"}], ",", "1"}], "}"}]}], "}"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"vecs", "=", 
      RowBox[{"0.5", "vertices"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Graphics", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"Blue", ",", 
         RowBox[{"Nest", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"{", 
             RowBox[{"Blue", ",", 
              RowBox[{"Translate", "[", 
               RowBox[{
                RowBox[{"Scale", "[", 
                 RowBox[{"#", ",", "0.5", ",", 
                  RowBox[{"{", 
                   RowBox[{"0.", ",", "0."}], "}"}]}], "]"}], ",", "vecs"}], 
               "]"}]}], "}"}], "&"}], ",", 
           RowBox[{"Polygon", "[", "vertices", "]"}], ",", "iter"}], "]"}]}], 
        "}"}], ",", "opts"}], "]"}]}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"SmithNumberQ", "[", 
   RowBox[{"n_", "/;", 
    RowBox[{"n", "\[LessEqual]", "1"}]}], "]"}], ":=", "False"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"SmithNumberQ", "[", 
   RowBox[{"n_", "?", "PrimeQ"}], "]"}], ":=", "False"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"SmithNumberQ", "[", "n_", "]"}], ":=", 
  RowBox[{"With", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"lis", "=", 
      RowBox[{"FactorInteger", "[", "n", "]"}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Total", "[", 
      RowBox[{"Flatten", "[", 
       RowBox[{"MapThread", "[", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"IntegerDigits", "[", "#1", "]"}], "#2"}], "&"}], ",", 
         RowBox[{"Transpose", "[", "lis", "]"}]}], "]"}], "]"}], "]"}], 
     "\[Equal]", 
     RowBox[{"Total", "[", 
      RowBox[{"IntegerDigits", "[", "n", "]"}], "]"}]}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"StemPlot", "[", 
   RowBox[{"lis_", ",", 
    RowBox[{"opts", ":", 
     RowBox[{"OptionsPattern", "[", "]"}]}]}], "]"}], ":=", 
  "\[IndentingNewLine]", 
  RowBox[{"If", "[", 
   RowBox[{
    RowBox[{"MatchQ", "[", 
     RowBox[{"lis", ",", 
      RowBox[{"{", 
       RowBox[{"__", "?", "NumericQ"}], "}"}]}], "]"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"ListPlot", "[", 
     RowBox[{"lis", ",", "opts", ",", 
      RowBox[{"Filling", "\[Rule]", "Axis"}]}], "]"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"Message", "[", 
     RowBox[{"StemPlot", "::", "badarg"}], "]"}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ToGraph", "[", 
   RowBox[{"lis", ":", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"_", ",", "_"}], "}"}], ".."}], "}"}]}], "]"}], ":=", 
  RowBox[{"DirectedEdge", "@@@", "lis"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ToGraph", "[", 
   RowBox[{"lis", ":", 
    RowBox[{"{", 
     RowBox[{"_", ",", "_"}], "}"}]}], "]"}], ":=", 
  RowBox[{"DirectedEdge", "@@", "lis"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"TruthTable", "[", 
   RowBox[{"expr_", ",", "vars_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
      RowBox[{"len", "=", 
       RowBox[{"Length", "[", "vars", "]"}]}], ",", "tuples", ",", "rules", 
      ",", "table", ",", "head"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"tuples", "=", 
      RowBox[{"Tuples", "[", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"True", ",", "False"}], "}"}], ",", "len"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"rules", "=", "\[VeryThinSpace]", 
      RowBox[{
       RowBox[{
        RowBox[{"Thread", "[", 
         RowBox[{"vars", "\[Rule]", "#1"}], "]"}], "&"}], "/@", "tuples"}]}], 
     ";", 
     RowBox[{"table", "=", 
      RowBox[{"Transpose", "@", 
       RowBox[{"Join", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "tuples", "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"expr", "/.", "rules"}], "}"}]}], "]"}]}]}], ";", 
     RowBox[{"head", "=", 
      RowBox[{"Append", "[", 
       RowBox[{"vars", ",", 
        RowBox[{"TraditionalForm", "[", "expr", "]"}]}], "]"}]}], ";", 
     RowBox[{"Grid", "[", 
      RowBox[{
       RowBox[{"Prepend", "[", 
        RowBox[{
         RowBox[{"table", "/.", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"True", "\[Rule]", "\"\<T\>\""}], ",", 
            RowBox[{"False", "\[Rule]", "\"\<F\>\""}]}], "}"}]}], ",", 
         "head"}], "]"}], ",", "\[IndentingNewLine]", 
       RowBox[{"Dividers", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"1", "\[Rule]", 
             RowBox[{"{", 
              RowBox[{"Thin", ",", "Black"}], "}"}]}], ",", 
            RowBox[{
             RowBox[{"-", "1"}], "\[Rule]", 
             RowBox[{"{", 
              RowBox[{"Thin", ",", "Black"}], "}"}]}], ",", 
            RowBox[{
             RowBox[{"-", "2"}], "\[Rule]", 
             RowBox[{"{", 
              RowBox[{"Thin", ",", "LightGray"}], "}"}]}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"1", "\[Rule]", 
             RowBox[{"{", 
              RowBox[{"Thin", ",", "Black"}], "}"}]}], ",", 
            RowBox[{"2", "\[Rule]", 
             RowBox[{"{", 
              RowBox[{"Thin", ",", "LightGray"}], "}"}]}], ",", 
            RowBox[{
             RowBox[{"-", "1"}], "\[Rule]", 
             RowBox[{"{", 
              RowBox[{"Thin", ",", "Black"}], "}"}]}]}], "}"}]}], "}"}]}], 
       ",", "\[IndentingNewLine]", 
       RowBox[{"BaseStyle", "\[Rule]", "\"\<Text\>\""}]}], "]"}]}]}], 
   "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", " ", 
   RowBox[{"using", " ", "BooleanTable"}], " ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"truthTable", "[", "expr_", "]"}], ":=", 
    RowBox[{"Module", "[", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"head", ",", 
        RowBox[{"vars", "=", 
         RowBox[{"BooleanVariables", "[", "expr", "]"}]}]}], "}"}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"head", "=", 
        RowBox[{"Append", "[", 
         RowBox[{"vars", ",", 
          RowBox[{"TraditionalForm", "[", "expr", "]"}]}], "]"}]}], ";", 
       RowBox[{"Grid", "[", 
        RowBox[{
         RowBox[{"Prepend", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"BooleanTable", "[", 
             RowBox[{
              RowBox[{"Flatten", "[", 
               RowBox[{"{", 
                RowBox[{"vars", ",", "expr"}], "}"}], "]"}], ",", "vars"}], 
             "]"}], "/.", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"True", "\[Rule]", "\"\<T\>\""}], ",", 
              RowBox[{"False", "\[Rule]", "\"\<F\>\""}]}], "}"}]}], ",", 
           "head"}], "]"}], ",", "\[IndentingNewLine]", 
         RowBox[{"Dividers", "\[Rule]", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{
              RowBox[{"1", "\[Rule]", 
               RowBox[{"{", 
                RowBox[{"Thin", ",", "Black"}], "}"}]}], ",", 
              RowBox[{
               RowBox[{"-", "1"}], "\[Rule]", 
               RowBox[{"{", 
                RowBox[{"Thin", ",", "Black"}], "}"}]}], ",", 
              RowBox[{
               RowBox[{"-", "2"}], "\[Rule]", 
               RowBox[{"{", 
                RowBox[{"Thin", ",", "LightGray"}], "}"}]}]}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"1", "\[Rule]", 
               RowBox[{"{", 
                RowBox[{"Thin", ",", "Black"}], "}"}]}], ",", 
              RowBox[{"2", "\[Rule]", 
               RowBox[{"{", 
                RowBox[{"Thin", ",", "LightGray"}], "}"}]}], ",", 
              RowBox[{
               RowBox[{"-", "1"}], "\[Rule]", 
               RowBox[{"{", 
                RowBox[{"Thin", ",", "Black"}], "}"}]}]}], "}"}]}], "}"}]}], 
         ",", "\[IndentingNewLine]", 
         RowBox[{"BaseStyle", "\[Rule]", "\"\<Text\>\""}]}], "]"}]}]}], 
     "]"}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", "*)"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"UpperTriangularMatrix", "[", 
   RowBox[{"n_Integer", "?", "Positive"}], "]"}], ":=", 
  RowBox[{"Table", "[", 
   RowBox[{
    RowBox[{"If", "[", 
     RowBox[{
      RowBox[{"j", "\[GreaterEqual]", "i"}], ",", "1", ",", "0"}], "]"}], ",", 
    RowBox[{"{", 
     RowBox[{"i", ",", "n"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"j", ",", "n"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"VandermondeMatrix", "[", 
   RowBox[{
    RowBox[{"n_Integer", "/;", 
     RowBox[{"n", ">", "1"}]}], ",", "x_"}], "]"}], ":=", 
  "\[IndentingNewLine]", 
  RowBox[{"Outer", "[", 
   RowBox[{"Power", ",", 
    RowBox[{"Table", "[", 
     RowBox[{
      SubscriptBox["x", "i"], ",", 
      RowBox[{"{", 
       RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}], ",", 
    RowBox[{"Range", "[", 
     RowBox[{"0", ",", 
      RowBox[{"n", "-", "1"}]}], "]"}]}], "]"}]}]], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["End private context", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"End", "[", "]"}], ";"}]], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["EndPackage", "Subsection"],

Cell[BoxData[
 RowBox[{"EndPackage", "[", "]"}]], "Input"]
}, Closed]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Examples", "Section"],

Cell[CellGroupData[{

Cell["Load package", "Subsection"],

Cell[BoxData["Quit"], "Input"],

Cell[TextData[{
 "Load package (do ",
 StyleBox["not",
  FontSlant->"Italic"],
 " say \[OpenCurlyDoubleQuote]Yes\[CloseCurlyDoubleQuote] to evaluate init \
cells dialog)."
}], "Text"],

Cell[BoxData[
 RowBox[{"<<", "PWM`Chap05Functional`"}]], "Input"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Test usage messages", "Subsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "AdjacencyStructure"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"AdjacencyStructure[\\!\\(\\*\\nStyleBox[\\\"gr\\\", \
\\\"TI\\\"]\\)] returns the adjacency lists for each vertex in the graph \
\\!\\(\\*\\nStyleBox[\\\"gr\\\", \\\"TI\\\"]\\).\"\>", "MSG"]], "Print", \
"PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "compositeQ"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"compositeQ[\!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\)] returns \
True if \!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\)\!\(\*\\nStyleBox[\\\" \
\\\", \\\"TI\\\"]\) is a composite number.\"\>", "MSG"]], "Print", \
"PrintUsage",
 CellTags->"Info3626258524-1367978"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "ExpandFactors"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"ExpandFactors[\\!\\(\\*\\nStyleBox[\\\"lis\\\", \
\\\"TI\\\"]\\)] expands a list of factors, \\!\\(\\*\\nStyleBox[\\\"lis\\\", \
\\\"TI\\\"]\\), of an integer as given by FactorInteger and returns the \
explicit number.\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "FunctionsWithAttribute"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"FunctionsWithAttribute[\!\(\*\\nStyleBox[\\\"attr\\\", \
\\\"TI\\\"]\)] returns a list of all symbols in the System` context that have \
the attribute \!\(\*\\nStyleBox[\\\"attr\\\", \\\"TI\\\"]\).\"\>", 
  "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "FunctionsWithOption"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"FunctionsWithOption[\!\(\*\\nStyleBox[\\\"opt\\\", \\\"TI\\\"]\
\)] returns a list of all symbols in the System` context that have the option \
\!\(\*\\nStyleBox[\\\"opt\\\", \\\"TI\\\"]\).\"\>", "MSG"]], "Print", \
"PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "HammingDistance1"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"HammingDistance1[\\!\\(\\*SubscriptBox[\\nStyleBox[\\\"sig\\\",\
 \\\"TI\\\"], \\(1\\)]\\),\\!\\(\\*SubscriptBox[\\nStyleBox[\\\"sig\\\", \
\\\"TI\\\"], \\(2\\)]\\)] computes the Hamming distance of the two binary \
signals \\!\\(\\*SubscriptBox[\\nStyleBox[\\\"sig\\\", \\\"TI\\\"], \
\\(1\\)]\\) and \\!\\(\\*SubscriptBox[\\nStyleBox[\\\"sig\\\", \\\"TI\\\"], \
\\(2\\)]\\) using Count[MapThread[SameQ[\[Ellipsis]]]].\"\>", "MSG"]], "Print",\
 "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "HammingNumber"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"HammingNumber[\\!\\(\\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\\)] \
returns the \\*\\nStyleBox[\\(\\!\\(\\*\\nStyleBox[\\\"n\\\", \
\\\"TI\\\"]\\)th\\)] Hamming number. Hamming numbers are defined as numbers \
that divide powers of 60.\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "HammingNumberList"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"HammingNumberList[\\!\\(\\*\\nStyleBox[\\\"n\\\", \
\\\"TI\\\"]\\)] returns the first \\!\\(\\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\
\\) Hamming numbers.\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "NearTo"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"NearTo[\\!\\(\\*\\nStyleBox[\\\"lis\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\",\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\" \\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\"elem\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\",\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\" \\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\\)] returns those \
elements in \\!\\(\\*\\nStyleBox[\\\"lis\\\", \\\"TI\\\"]\\) that are \
\\!\\(\\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\\) positions from \
\\!\\(\\*\\nStyleBox[\\\"elem\\\", \\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\".\\\
\", \\\"TI\\\"]\\)\\nNearTo[\\!\\(\\*\\nStyleBox[\\\"lis\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\",\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\" \\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\"elem\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\",\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\" \\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\"{\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\"n\\\", \
\\\"TI\\\"]\\)\\!\\(\\*\\nStyleBox[\\\"}\\\", \\\"TI\\\"]\\)] returns those \
elements in \\!\\(\\*\\nStyleBox[\\\"lis\\\", \\\"TI\\\"]\\) that are less \
than or equal to \\!\\(\\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\\) positions \
away from \\!\\(\\*\\nStyleBox[\\\"elem\\\", \\\"TI\\\"]\\).\"\>", 
  "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "PerfectSearch"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"PerfectSearch[\!\(\*\\nStyleBox[\\\"n\\\", \
\\\"TI\\\"]\),\!\(\*\\nStyleBox[\\\"m\\\", \\\"TI\\\"]\)] returns a list of \
all those perfect numbers (numbers that are equal to the sum of their proper \
divisors) between \!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\) and \
\!\(\*\\nStyleBox[\\\"m\\\", \
\\\"TI\\\"]\).\\nPerfectSearch[\!\(\*\\nStyleBox[\\\"n\\\", \
\\\"TI\\\"]\),\!\(\*\\nStyleBox[\\\"m\\\", \\\"TI\\\"]\),\!\(\*\\nStyleBox[\\\
\"k\\\", \\\"TI\\\"]\)] returns a list of all those perfect numbers between \
\!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\) and \!\(\*\\nStyleBox[\\\"m\\\", \
\\\"TI\\\"]\), searching by increment \!\(\*\\nStyleBox[\\\"k\\\", \
\\\"TI\\\"]\).\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "PerfectSearchParallel"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"PerfectSearchParallel[\!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\
\),\!\(\*\\nStyleBox[\\\"m\\\", \\\"TI\\\"]\)\!\(\*\\nStyleBox[\\\",\\\", \
\\\"TI\\\"]\)\!\(\*\\nStyleBox[\\\" \\\", \
\\\"TI\\\"]\)\!\(\*\\nStyleBox[\\\"k\\\", \\\"TI\\\"]\)] searches for \
\!\(\*\\nStyleBox[\\\"k\\\", \\\"TI\\\"]\)-perfect numbers between \
\!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\) and \!\(\*\\nStyleBox[\\\"m\\\", \
\\\"TI\\\"]\) performing the search in parallel. If no subkernels are \
available, the search is performed on a single kernel.\"\>", "MSG"]], "Print",\
 "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "PointsetDiameter"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"PointsetDiameter[\!\(\*\\nStyleBox[\\\"pts\\\", \\\"TI\\\"]\)] \
computes the maximum distance between any pair of points in the list of \
points, \!\(\*\\nStyleBox[\\\"pts\\\", \\\"TI\\\"]\).\"\>", "MSG"]], "Print", \
"PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "PrimeFactorForm"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"PrimeFactorForm[\!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\)] \
formats the prime factorization of the integer \!\(\*\\nStyleBox[\\\"n\\\", \
\\\"TI\\\"]\) in a traditional form.\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "randomColor"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"randomColor[] returns an RGBColor expression with random \
values for the red, green, and blue \
components.\\nrandomColor[\!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\)] return \
a list of \!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\) random colors.\"\>", 
  "MSG"]], "Print", "PrintUsage",
 CellTags->"Info3626258528-1367978"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "RegularGraph"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"RegularGraph[\!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\)] \
returns a graph with \!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\) equilateral \
edges and all of whose internal angles are equiangular.\"\>", "MSG"]], "Print",\
 "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "RepUnit"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"RepUnit[\\!\\(\\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\\)] \
returns a number consisting the digit 1 concatenated \
\\!\\(\\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\\) times.\"\>", "MSG"]], "Print", \
"PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "ReplaceElement"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"ReplaceElement[\\!\\(\\*\\nStyleBox[\\\"mat\\\", \
\\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"lis\\\", \\\"TI\\\"]\\)] returns the \
matrix \\!\\(\\*\\nStyleBox[\\\"mat\\\", \\\"TI\\\"]\\) with elements that \
are strings specified by \\!\\(\\*\\nStyleBox[\\\"lis\\\", \\\"TI\\\"]\\) \
replaced with their column mean.\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "SierpinskiTriangle"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"SierpinskiTriangle[\\!\\(\\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\
\\)] displays a Sierpinski triangle after \\!\\(\\*\\nStyleBox[\\\"n\\\", \
\\\"TI\\\"]\\) iterations of the geometric transformations that define it. \
SierpinskiTriangle takes the same options as Graphics.\"\>", "MSG"]], "Print",\
 "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "SmithNumberQ"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"SmithNumberQ[\!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\)] \
returns if \!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\) is a Smith number \
\[Dash] a composite number the sum of whose digits is equal to the sum of the \
digits of its prime factors.\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "StemPlot"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"StemPlot[\!\(\*\\nStyleBox[\\\"data\\\", \\\"TI\\\"]\)] \
returns a stem plot of the discrete data, \!\(\*\\nStyleBox[\\\"data\\\", \
\\\"TI\\\"]\).\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "ToGraph"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"ToGraph[\!\(\*\\nStyleBox[\\\"lis\\\", \\\"TI\\\"]\)] converts \
the list of pairs, \!\(\*\\nStyleBox[\\\"lis\\\", \\\"TI\\\"]\), to a \
directed graph.\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "TruthTable"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"TruthTable[\!\(\*\\nStyleBox[\\\"expr\\\", \\\"TI\\\"]\), \!\(\
\*\\nStyleBox[\\\"vars\\\", \\\"TI\\\"]\)] returns a table of truth values \
for the logical expression \!\(\*\\nStyleBox[\\\"expr\\\", \\\"TI\\\"]\) in \
the variables \!\(\*\\nStyleBox[\\\"vars\\\", \\\"TI\\\"]\).\"\>", 
  "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "UpperTriangularMatrix"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"UpperTriangularMatrix[\\!\\(\\*\\nStyleBox[\\\"n\\\", \\\"TI\\\
\"]\\)] returns a square matrix of size \\!\\(\\*\\nStyleBox[\\\"n\\\", \
\\\"TI\\\"]\\) with zeros below the diagonal and ones on and above the \
diagonal.\"\>", "MSG"]], "Print", "PrintUsage"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"?", "VandermondeMatrix"}]], "Input"],

Cell[BoxData[
 StyleBox["\<\"VandermondeMatrix[\!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\)\!\
\(\*\\nStyleBox[\\\",\\\", \\\"TI\\\"]\)\!\(\*\\nStyleBox[\\\" \\\", \\\"TI\\\
\"]\)\!\(\*\\nStyleBox[\\\"var\\\", \\\"TI\\\"]\)] returns the Vandermonde \
matrix of order \!\(\*\\nStyleBox[\\\"n\\\", \\\"TI\\\"]\) in the variable \!\
\(\*\\nStyleBox[\\\"var\\\", \\\"TI\\\"]\).\"\>", "MSG"]], "Print", \
"PrintUsage"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["Exercise the functions and their options", "Subsection"],

Cell[CellGroupData[{

Cell["AdjacencyStructure", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"SeedRandom", "[", "16", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"gr", "=", 
  RowBox[{"RandomGraph", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"10", ",", "15"}], "}"}], ",", 
    RowBox[{"VertexLabels", "\[Rule]", "\"\<Name\>\""}]}], "]"}]}]}], "Input"],

Cell[BoxData[
 GraphicsBox[
  NamespaceBox["NetworkGraphics",
   DynamicModuleBox[{Typeset`graph = HoldComplete[
     Graph[{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {
      Null, {{2, 10}, {2, 3}, {3, 5}, {4, 5}, {4, 1}, {4, 7}, {4, 3}, {5, 
       7}, {5, 8}, {6, 5}, {9, 8}, {9, 6}, {10, 9}, {10, 8}, {10, 4}}}, {
      VertexLabels -> {"Name"}}]], Typeset`boxes, Typeset`boxes$s2d = 
    GraphicsGroupBox[{{
       Directive[
        Hue[0.6, 0.2, 0.8], 
        EdgeForm[
         Directive[
          GrayLevel[0], 
          Opacity[0.7]]]], 
       TagBox[{
         TagBox[
          
          DiskBox[{3.425766382958615, 0.8616061628114692}, 
           0.033216905142992845`], "DynamicName", BoxID -> "VertexID$1"], 
         InsetBox[
          FormBox["1", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$1", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$1"], 
       TagBox[{
         TagBox[
          
          DiskBox[{1.5246734576259806`, 2.443383919127916}, 
           0.033216905142992845`], "DynamicName", BoxID -> "VertexID$2"], 
         InsetBox[
          FormBox["2", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$2", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$2"], 
       TagBox[{
         TagBox[
          
          DiskBox[{1.9480154311828861`, 1.6093324781658502`}, 
           0.033216905142992845`], "DynamicName", BoxID -> "VertexID$3"], 
         InsetBox[
          FormBox["3", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$3", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$3"], 
       TagBox[{
         TagBox[
          
          DiskBox[{2.231722910700096, 0.9192802922018217}, 
           0.033216905142992845`], "DynamicName", BoxID -> "VertexID$4"], 
         InsetBox[
          FormBox["4", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$4", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$4"], 
       TagBox[{
         TagBox[
          
          DiskBox[{1.4170516751875386`, 0.5706183816828192}, 
           0.033216905142992845`], "DynamicName", BoxID -> "VertexID$5"], 
         InsetBox[
          FormBox["5", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$5", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$5"], 
       TagBox[{
         TagBox[
          
          DiskBox[{0.31069129891061786`, 0.15649560399398854`}, 
           0.033216905142992845`], "DynamicName", BoxID -> "VertexID$6"], 
         InsetBox[
          FormBox["6", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$6", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$6"], 
       TagBox[{
         TagBox[
          DiskBox[{2.204511816857064, 0.}, 0.033216905142992845`], 
          "DynamicName", BoxID -> "VertexID$7"], 
         InsetBox[
          FormBox["7", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$7", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$7"], 
       TagBox[{
         TagBox[
          
          DiskBox[{0.5913323090972973, 1.0086777003886587`}, 
           0.033216905142992845`], "DynamicName", BoxID -> "VertexID$8"], 
         InsetBox[
          FormBox["8", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$8", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$8"], 
       TagBox[{
         TagBox[
          DiskBox[{0., 1.043245588955872}, 0.033216905142992845`], 
          "DynamicName", BoxID -> "VertexID$9"], 
         InsetBox[
          FormBox["9", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$9", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$9"], 
       TagBox[{
         TagBox[
          
          DiskBox[{1.0560939911918834`, 1.5623737545357783`}, 
           0.033216905142992845`], "DynamicName", BoxID -> "VertexID$10"], 
         InsetBox[
          FormBox["10", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$10", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$10"]}, {
       Directive[
        Opacity[0.7], 
        Hue[0.6, 0.7, 0.5]], 
       LineBox[{{
          DynamicLocation["VertexID$1", Automatic, Center], 
          DynamicLocation["VertexID$4", Automatic, Center]}, {
          DynamicLocation["VertexID$2", Automatic, Center], 
          DynamicLocation["VertexID$10", Automatic, Center]}, {
          DynamicLocation["VertexID$2", Automatic, Center], 
          DynamicLocation["VertexID$3", Automatic, Center]}, {
          DynamicLocation["VertexID$3", Automatic, Center], 
          DynamicLocation["VertexID$5", Automatic, Center]}, {
          DynamicLocation["VertexID$3", Automatic, Center], 
          DynamicLocation["VertexID$4", Automatic, Center]}, {
          DynamicLocation["VertexID$4", Automatic, Center], 
          DynamicLocation["VertexID$5", Automatic, Center]}, {
          DynamicLocation["VertexID$4", Automatic, Center], 
          DynamicLocation["VertexID$7", Automatic, Center]}, {
          DynamicLocation["VertexID$4", Automatic, Center], 
          DynamicLocation["VertexID$10", Automatic, Center]}, {
          DynamicLocation["VertexID$5", Automatic, Center], 
          DynamicLocation["VertexID$7", Automatic, Center]}, {
          DynamicLocation["VertexID$5", Automatic, Center], 
          DynamicLocation["VertexID$8", Automatic, Center]}, {
          DynamicLocation["VertexID$5", Automatic, Center], 
          DynamicLocation["VertexID$6", Automatic, Center]}, {
          DynamicLocation["VertexID$6", Automatic, Center], 
          DynamicLocation["VertexID$9", Automatic, Center]}, {
          DynamicLocation["VertexID$8", Automatic, Center], 
          DynamicLocation["VertexID$9", Automatic, Center]}, {
          DynamicLocation["VertexID$8", Automatic, Center], 
          DynamicLocation["VertexID$10", Automatic, Center]}, {
          DynamicLocation["VertexID$9", Automatic, Center], 
          DynamicLocation["VertexID$10", Automatic, Center]}}]}}], 
    Typeset`data}, 
    TagBox[
     DynamicBox[GraphComputation`NetworkGraphicsBox[
      2, Typeset`graph, Typeset`boxes], {
      CachedValue :> Typeset`boxes, SingleEvaluation -> True, 
       SynchronousUpdating -> False, TrackedSymbols :> {}},
      ImageSizeCache->{{7.98, 450.02626186136763`}, {-177.38546186136767`, 
       151.40597101605186`}}],
     MouseAppearanceTag["NetworkGraphics"]],
    AllowKernelInitialization->False,
    UnsavedVariables:>{Typeset`data}]],
  DefaultBaseStyle->{
   "NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
  FrameTicks->None]], "Output"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"AdjacencyStructure", "[", "gr", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"1", ",", 
     RowBox[{"{", "4", "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"2", ",", 
     RowBox[{"{", 
      RowBox[{"3", ",", "10"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"3", ",", 
     RowBox[{"{", 
      RowBox[{"2", ",", "4", ",", "5"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"4", ",", 
     RowBox[{"{", 
      RowBox[{"1", ",", "3", ",", "5", ",", "7", ",", "10"}], "}"}]}], "}"}], 
   ",", 
   RowBox[{"{", 
    RowBox[{"5", ",", 
     RowBox[{"{", 
      RowBox[{"3", ",", "4", ",", "6", ",", "7", ",", "8"}], "}"}]}], "}"}], 
   ",", 
   RowBox[{"{", 
    RowBox[{"6", ",", 
     RowBox[{"{", 
      RowBox[{"5", ",", "9"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"7", ",", 
     RowBox[{"{", 
      RowBox[{"4", ",", "5"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"8", ",", 
     RowBox[{"{", 
      RowBox[{"5", ",", "9", ",", "10"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"9", ",", 
     RowBox[{"{", 
      RowBox[{"6", ",", "8", ",", "10"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"10", ",", 
     RowBox[{"{", 
      RowBox[{"2", ",", "4", ",", "8", ",", "9"}], "}"}]}], "}"}]}], 
  "}"}]], "Output"]
}, Closed]],

Cell["Check that it works for a directed graph also.", "SolutionText"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"gr2", "=", 
  RowBox[{"Graph", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
      RowBox[{"1", "\[DirectedEdge]", "2"}], ",", 
      RowBox[{"2", "\[DirectedEdge]", "1"}], ",", 
      RowBox[{"3", "\[DirectedEdge]", "1"}], ",", 
      RowBox[{"3", "\[DirectedEdge]", "2"}], ",", 
      RowBox[{"4", "\[DirectedEdge]", "1"}], ",", 
      RowBox[{"4", "\[DirectedEdge]", "2"}], ",", 
      RowBox[{"4", "\[DirectedEdge]", "4"}]}], "}"}], ",", 
    RowBox[{"VertexLabels", "\[Rule]", "\"\<Name\>\""}]}], "]"}]}]], "Input"],

Cell[BoxData[
 GraphicsBox[
  NamespaceBox["NetworkGraphics",
   DynamicModuleBox[{Typeset`graph = HoldComplete[
     Graph[{1, 2, 3, 
      4}, {{{1, 2}, {2, 1}, {3, 1}, {3, 2}, {4, 1}, {4, 2}, {4, 4}}, Null}, {
      VertexLabels -> {"Name"}}]], Typeset`boxes, Typeset`boxes$s2d = 
    GraphicsGroupBox[{{
       Directive[
        Hue[0.6, 0.2, 0.8], 
        EdgeForm[
         Directive[
          GrayLevel[0], 
          Opacity[0.7]]]], 
       TagBox[{
         TagBox[
          
          DiskBox[{0.9533983897463674, 0.8877204662905944}, 
           0.021850666999072288`], "DynamicName", BoxID -> "VertexID$1"], 
         InsetBox[
          FormBox["1", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$1", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$1"], 
       TagBox[{
         TagBox[
          DiskBox[{0.953711093251963, 0.}, 0.021850666999072288`], 
          "DynamicName", BoxID -> "VertexID$2"], 
         InsetBox[
          FormBox["2", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$2", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$2"], 
       TagBox[{
         TagBox[
          DiskBox[{0., 0.4441516790275224}, 0.021850666999072288`], 
          "DynamicName", BoxID -> "VertexID$3"], 
         InsetBox[
          FormBox["3", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$3", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$3"], 
       TagBox[{
         TagBox[
          
          DiskBox[{1.9067921163937833`, 0.4442973209701048}, 
           0.021850666999072288`], "DynamicName", BoxID -> "VertexID$4"], 
         InsetBox[
          FormBox["4", TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$4", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$4"]}, {
       Directive[
        Opacity[0.7], 
        Hue[0.6, 0.7, 0.5]], 
       Arrowheads[{{0.03441734055646053, 0.7}}], {
        Arrowheads[0.03441734055646053], 
        ArrowBox[{
          DynamicLocation["VertexID$1", Automatic, Center], {
          0.9862459649982531, 0.7939761701268301}, {0.9939805709161343, 
          0.7700755428983579}, {1.0005571414170036`, 0.745830691257929}, {
          1.0059604660898254`, 0.7212976891363096}, {1.0101780480277054`, 
          0.6965332769039029}, {1.0132001327309634`, 0.671594730140596}, {
          1.0150197306675148`, 0.6465397271677642}, {1.0156326334383878`, 
          0.6214262156488076}, {1.015757714840626, 0.26633802913257004`}, {
          1.0151625049132225`, 0.24122409205051082`}, {1.0133605588998125`, 
          0.21616781337262123`}, {1.0103560443736814`, 0.1912271437127749}, {
          1.0061559102302904`, 0.1664597663022207}, {1.0007698706157462`, 
          0.14192296357876327`}, {0.9942103824597478, 0.11767348470290644`}, {
          0.9864926166649746, 0.0937674143073701}, 
          DynamicLocation["VertexID$2", Automatic, Center]}]}, {
        Arrowheads[0.03441734055646053], 
        ArrowBox[{
          DynamicLocation["VertexID$2", Automatic, Center], {
          0.9208635180000773, 0.0937442961637645}, {0.9131289120821962, 
          0.11764492339223666`}, {0.9065523415813269, 0.1418897750326655}, {
          0.9011490169085051, 0.16642277715428502`}, {0.8969314349706251, 
          0.19118718938669174`}, {0.8939093502673671, 0.2161257361499986}, {
          0.8920897523308157, 0.24118073912283036`}, {0.8914768495599427, 
          0.26629425064178697`}, {0.8913517681577047, 0.6213824371580244}, {
          0.8919469780851083, 0.6464963742400837}, {0.8937489240985182, 
          0.6715526529179733}, {0.8967534386246493, 0.6964933225778196}, {
          0.9009535727680402, 0.7212606999883737}, {0.9063396123825844, 
          0.7457975027118313}, {0.9128991005385829, 0.7700469815876881}, {
          0.9206168663333563, 0.7939530519832244}, 
          DynamicLocation["VertexID$1", Automatic, Center]}]}, {
        Arrowheads[0.03441734055646053], 
        ArrowBox[{
          DynamicLocation["VertexID$3", Automatic, Center], 
          DynamicLocation["VertexID$1", Automatic, Center]}]}, {
        Arrowheads[0.03441734055646053], 
        ArrowBox[{
          DynamicLocation["VertexID$3", Automatic, Center], 
          DynamicLocation["VertexID$2", Automatic, Center]}]}, {
        Arrowheads[0.03441734055646053], 
        ArrowBox[{
          DynamicLocation["VertexID$4", Automatic, Center], 
          DynamicLocation["VertexID$1", Automatic, Center]}]}, {
        Arrowheads[0.03441734055646053], 
        ArrowBox[{
          DynamicLocation["VertexID$4", Automatic, Center], 
          DynamicLocation["VertexID$2", Automatic, Center]}]}, {{
         Arrowheads[0.03441734055646053], 
         ArrowBox[{
           DynamicLocation["VertexID$4", Automatic, Center], {
           1.9068520740455712`, 0.44822393479790273`}, {1.9179467703856041`, 
           0.5181488994664138}, {1.9482008174013454`, 0.5821589425060758}, {
           1.995187496130727, 0.6351197298185011}, {2.055137940075397, 
           0.6727832033918062}, {2.123243441196089, 0.6921283239101557}, {
           2.19404116303642, 0.6916033924963401}, {2.261852322391889, 
           0.6712505146252078}, {2.3212376923662696`, 0.6327022227852832}, {
           2.367433890285129, 0.5790505287895513}, {2.396735455209412, 
           0.5145989092307064}, {2.406792068083192, 0.44451711767058005`}, {
           2.396797074076379, 0.3744265115555389}, {2.367552185484505, 
           0.30994915535959255`}, {2.3214031752764734`, 0.2562568670158364}, {
           2.2620517193997776`, 0.21765637924577458`}, {2.194258480232161, 
           0.1972438905701521}, {2.123461247266794, 0.19665671494258186`}, {
           2.0553387644948398`, 0.21594195053240123`}, {1.9953552304944204`, 
           0.2535527019153577}, {1.9483220075039474`, 0.30647215869543565`}, {
           1.9180116954013406`, 0.37045557803992424`}, {1.9068555262491185`, 
           0.44037076137385417`}, 
           DynamicLocation["VertexID$4", Automatic, Center]}]}}}}], 
    Typeset`data}, 
    TagBox[
     DynamicBox[GraphComputation`NetworkGraphicsBox[
      2, Typeset`graph, Typeset`boxes], {
      CachedValue :> Typeset`boxes, SingleEvaluation -> True, 
       SynchronousUpdating -> False, TrackedSymbols :> {}},
      ImageSizeCache->{{5.740693309010094, 
       443.2393066909899}, {-107.68974523154209`, 81.1705687844847}}],
     MouseAppearanceTag["NetworkGraphics"]],
    AllowKernelInitialization->False,
    UnsavedVariables:>{Typeset`data}]],
  DefaultBaseStyle->{
   "NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
  FrameTicks->None]], "Output"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"AdjacencyStructure", "[", "gr2", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"1", ",", 
     RowBox[{"{", "2", "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"2", ",", 
     RowBox[{"{", "1", "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"3", ",", 
     RowBox[{"{", 
      RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"4", ",", 
     RowBox[{"{", 
      RowBox[{"1", ",", "2", ",", "4"}], "}"}]}], "}"}]}], "}"}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["compositeQ", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"lis", "=", 
  RowBox[{"FactorInteger", "[", 
   RowBox[{"10", "!"}], "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"2", ",", "8"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"3", ",", "4"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"5", ",", "2"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"7", ",", "1"}], "}"}]}], "}"}]], "Output"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"compositeQ", "[", 
  SuperscriptBox["2", "31"], "]"}]], "Input"],

Cell[BoxData["True"], "Output"]
}, Closed]],

Cell["Test bad arguments:", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"compositeQ", "[", 
  RowBox[{"{", 
   RowBox[{"a", ",", "b"}], "}"}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"compositeQ", "::", "badarg"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Argument \[NoBreak]\\!\\({a, b}\\)\[NoBreak] in \
compositeQ[\[NoBreak]\\!\\({a, b}\\)\[NoBreak]] is not an integer greater \
than 1.\"\>"}]], "Message", "MSG"],

Cell[BoxData[
 RowBox[{"compositeQ", "[", 
  RowBox[{"{", 
   RowBox[{"a", ",", "b"}], "}"}], "]"}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["ExpandFactors", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ExpandFactors", "[", "lis", "]"}]], "Input"],

Cell[BoxData["3628800"], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["FunctionsWithAttribute", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"FunctionsWithAttribute", "[", "Constant", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"Catalan\"\>", ",", "\<\"Degree\"\>", ",", "\<\"E\"\>", 
   ",", "\<\"EulerGamma\"\>", ",", "\<\"Glaisher\"\>", 
   ",", "\<\"GoldenRatio\"\>", ",", "\<\"Khinchin\"\>", 
   ",", "\<\"MachinePrecision\"\>", ",", "\<\"Pi\"\>"}], "}"}]], "Output"]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["FunctionsWithOption", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"FunctionsWithOption", "[", "EvaluationMonitor", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"BodePlot\"\>", ",", "\<\"ContourPlot\"\>", 
   ",", "\<\"ContourPlot3D\"\>", ",", "\<\"DensityPlot\"\>", 
   ",", "\<\"DiscretePlot\"\>", ",", "\<\"DiscretePlot3D\"\>", 
   ",", "\<\"FindArgMax\"\>", ",", "\<\"FindArgMin\"\>", 
   ",", "\<\"FindFit\"\>", ",", "\<\"FindMaximum\"\>", 
   ",", "\<\"FindMaxValue\"\>", ",", "\<\"FindMinimum\"\>", 
   ",", "\<\"FindMinValue\"\>", ",", "\<\"FindRoot\"\>", 
   ",", "\<\"LineIntegralConvolutionPlot\"\>", 
   ",", "\<\"ListLineIntegralConvolutionPlot\"\>", 
   ",", "\<\"ListStreamDensityPlot\"\>", ",", "\<\"ListStreamPlot\"\>", 
   ",", "\<\"ListVectorDensityPlot\"\>", ",", "\<\"ListVectorPlot\"\>", 
   ",", "\<\"ListVectorPlot3D\"\>", ",", "\<\"LogLinearPlot\"\>", 
   ",", "\<\"LogLogPlot\"\>", ",", "\<\"LogPlot\"\>", ",", "\<\"NArgMax\"\>", 
   ",", "\<\"NArgMin\"\>", ",", "\<\"NDSolve\"\>", 
   ",", "\<\"NDSolveValue\"\>", ",", "\<\"NicholsPlot\"\>", 
   ",", "\<\"NIntegrate\"\>", ",", "\<\"NMaximize\"\>", 
   ",", "\<\"NMaxValue\"\>", ",", "\<\"NMinimize\"\>", 
   ",", "\<\"NMinValue\"\>", ",", "\<\"NonlinearModelFit\"\>", 
   ",", "\<\"NProduct\"\>", ",", "\<\"NSum\"\>", ",", "\<\"NyquistPlot\"\>", 
   ",", "\<\"ParametricNDSolve\"\>", ",", "\<\"ParametricNDSolveValue\"\>", 
   ",", "\<\"ParametricPlot\"\>", ",", "\<\"ParametricPlot3D\"\>", 
   ",", "\<\"Plot\"\>", ",", "\<\"Plot3D\"\>", ",", "\<\"PolarPlot\"\>", 
   ",", "\<\"RegionPlot\"\>", ",", "\<\"RegionPlot3D\"\>", 
   ",", "\<\"RevolutionPlot3D\"\>", ",", "\<\"RootLocusPlot\"\>", 
   ",", "\<\"SingularValuePlot\"\>", ",", "\<\"SphericalPlot3D\"\>", 
   ",", "\<\"StreamDensityPlot\"\>", ",", "\<\"StreamPlot\"\>", 
   ",", "\<\"VectorDensityPlot\"\>", ",", "\<\"VectorPlot\"\>", 
   ",", "\<\"VectorPlot3D\"\>"}], "}"}]], "Output"]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 "HammingDistance",
 StyleBox["n",
  FontSlant->"Italic"]
}], "Subsubsection"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"sig1", "=", 
   RowBox[{"RandomInteger", "[", 
    RowBox[{"1", ",", 
     RowBox[{"{", 
      SuperscriptBox["10", "6"], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"sig2", "=", 
   RowBox[{"RandomInteger", "[", 
    RowBox[{"1", ",", 
     RowBox[{"{", 
      SuperscriptBox["10", "6"], "}"}]}], "]"}]}], ";"}]}], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Grid", "[", 
  RowBox[{
   RowBox[{"Join", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"{", 
       RowBox[{"\"\<Function\>\"", ",", "\"\<{Timing, result}\>\""}], "}"}], 
      "}"}], ",", 
     RowBox[{"Map", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"{", 
         RowBox[{"#", ",", 
          RowBox[{"Timing", "[", 
           RowBox[{"#", "[", 
            RowBox[{"sig1", ",", "sig2"}], "]"}], "]"}]}], "}"}], "&"}], ",", 
       
       RowBox[{"{", 
        RowBox[{
        "HammingDistance1", ",", "HammingDistance2", ",", "HammingDistance3", 
         ",", "HammingDistance4", ",", "HammingDistance5"}], "}"}]}], "]"}]}],
     "]"}], ",", 
   RowBox[{"ItemStyle", "\[Rule]", 
    RowBox[{"Directive", "[", "\"\<SR\>\"", "]"}]}], ",", 
   RowBox[{"Frame", "\[Rule]", "All"}]}], "]"}]], "Input"],

Cell[BoxData[
 TagBox[GridBox[{
    {"\<\"Function\"\>", "\<\"{Timing, result}\"\>"},
    {"HammingDistance1", 
     RowBox[{"{", 
      RowBox[{"0.47087599999999696`", ",", "499482"}], "}"}]},
    {"HammingDistance2", 
     RowBox[{"{", 
      RowBox[{"0.005252000000002255`", ",", "499482"}], "}"}]},
    {"HammingDistance3", 
     RowBox[{"{", 
      RowBox[{"1.061043000000005`", ",", "499482"}], "}"}]},
    {"HammingDistance4", 
     RowBox[{"{", 
      RowBox[{"0.29619900000000143`", ",", "499482"}], "}"}]},
    {"HammingDistance5", 
     RowBox[{"{", 
      RowBox[{"1.1912210000000023`", ",", "499482"}], "}"}]}
   },
   AutoDelete->False,
   GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}},
   GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}},
   GridBoxItemStyle->{"Columns" -> {{
        Directive["SR"]}}, "Rows" -> {{
        Directive["SR"]}}}],
  "Grid"]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["HammingNumber", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"HammingNumber", "[", "1691", "]"}]], "Input"],

Cell[BoxData["2125764000"], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["HammingNumberList", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"HammingNumberList", "[", 
  SuperscriptBox["10", "2"], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", "8", ",", "9", 
   ",", "10", ",", "12", ",", "15", ",", "16", ",", "18", ",", "20", ",", 
   "24", ",", "25", ",", "27", ",", "30", ",", "32", ",", "36", ",", "40", 
   ",", "45", ",", "48", ",", "50", ",", "54", ",", "60", ",", "64", ",", 
   "72", ",", "75", ",", "80", ",", "81", ",", "90", ",", "96", ",", "100", 
   ",", "108", ",", "120", ",", "125", ",", "128", ",", "135", ",", "144", 
   ",", "150", ",", "160", ",", "162", ",", "180", ",", "192", ",", "200", 
   ",", "216", ",", "225", ",", "240", ",", "243", ",", "250", ",", "256", 
   ",", "270", ",", "288", ",", "300", ",", "320", ",", "324", ",", "360", 
   ",", "375", ",", "384", ",", "400", ",", "405", ",", "432", ",", "450", 
   ",", "480", ",", "486", ",", "500", ",", "512", ",", "540", ",", "576", 
   ",", "600", ",", "625", ",", "640", ",", "648", ",", "675", ",", "720", 
   ",", "729", ",", "750", ",", "768", ",", "800", ",", "810", ",", "864", 
   ",", "900", ",", "960", ",", "972", ",", "1000", ",", "1024", ",", "1080", 
   ",", "1125", ",", "1152", ",", "1200", ",", "1215", ",", "1250", ",", 
   "1280", ",", "1296", ",", "1350", ",", "1440", ",", "1458", ",", "1500", 
   ",", "1536"}], "}"}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["NearTo", "Subsubsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"chars", "=", 
   RowBox[{"CharacterRange", "[", 
    RowBox[{"\"\<a\>\"", ",", "\"\<z\>\""}], "]"}]}], ";"}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"NearTo", "[", 
  RowBox[{"chars", ",", "\"\<q\>\"", ",", "3"}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", "\<\"n\"\>", "}"}], ",", 
   RowBox[{"{", "\<\"t\"\>", "}"}]}], "}"}]], "Output"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"NearTo", "[", 
  RowBox[{"chars", ",", "\"\<q\>\"", ",", 
   RowBox[{"{", "3", "}"}]}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"\<\"n\"\>", ",", "\<\"o\"\>", ",", "\<\"p\"\>", ",", "\<\"q\"\>", 
    ",", "\<\"r\"\>", ",", "\<\"s\"\>", ",", "\<\"t\"\>"}], "}"}], 
  "}"}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["PerfectSearch", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"PerfectSearch", "[", 
  RowBox[{"2", ",", 
   SuperscriptBox["10", "5"]}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"6", ",", "28", ",", "496", ",", "8128"}], "}"}]], "Output"]
}, Closed]],

Cell["Find 4-perfect numbers:", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"PerfectSearch", "[", 
  RowBox[{"2", ",", 
   SuperscriptBox["10", "6"], ",", "4"}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"30240", ",", "32760"}], "}"}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["PerfectSearchParallel", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"PerfectSearchParallel", "[", 
  RowBox[{"2", ",", "2200000", ",", "4"}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"30240", ",", "32760", ",", "2178540"}], "}"}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["PointsetDiameter", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"points3D", "=", 
   RowBox[{"RandomReal", "[", 
    RowBox[{"1", ",", 
     RowBox[{"{", 
      RowBox[{"5", ",", "3"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"PointsetDiameter", "[", "points3D", "]"}]}], "Input"],

Cell[BoxData["1.1660873156918987`"], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["PrimeFactorForm", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"PrimeFactorForm", "[", 
  RowBox[{"50", "!"}], "]"}]], "Input"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{
   TemplateBox[{"2","47"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"3","22"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"5","12"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"7","8"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"11","4"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"13","3"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"17","2"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"19","2"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"23","2"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"29","1"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"31","1"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"37","1"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"41","1"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"43","1"},
    "Superscript"], "\[CenterDot]", 
   TemplateBox[{"47","1"},
    "Superscript"]}],
  Apply[Times, 
   Apply[Power, {{2, 47}, {3, 22}, {5, 12}, {7, 8}, {11, 4}, {13, 3}, {17, 
    2}, {19, 2}, {23, 2}, {29, 1}, {31, 1}, {37, 1}, {41, 1}, {43, 1}, {47, 
    1}}, {1}]]]], "Output"]
}, Closed]],

Cell[BoxData[
 RowBox[{"PrimeFactorForm", "[", "9", "]"}]], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["randomColor", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"randomColor", "[", "]"}]], "Input"],

Cell[BoxData[
 InterpretationBox[
  ButtonBox[
   TooltipBox[
    RowBox[{
     GraphicsBox[{
       {GrayLevel[0], RectangleBox[{0, 0}]}, 
       {GrayLevel[0], RectangleBox[{1, -1}]}, 
       {RGBColor[0.311915810500651, 0.8240278085253765, 0.6637003540637734], 
        RectangleBox[{0, -1}, {2, 1}]}},
      AspectRatio->1,
      Frame->True,
      FrameStyle->RGBColor[
       0.20794387366710065`, 0.5493518723502511, 0.44246690270918226`],
      FrameTicks->None,
      ImageSize->
       Dynamic[{
        Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
         Magnification]}],
      PlotRangePadding->None], "\[InvisibleSpace]"}],
    "RGBColor[0.311915810500651, 0.8240278085253765, 0.6637003540637734]"],
   Appearance->None,
   BaseStyle->{},
   BaselinePosition->Baseline,
   ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
     If[
      Not[
       AbsoluteCurrentValue["Deployed"]], 
      SelectionMove[Typeset`box$, All, Expression]; 
      FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
      FrontEnd`Private`$ColorSelectorInitialColor = 
       RGBColor[0.311915810500651, 0.8240278085253765, 0.6637003540637734]; 
      FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
      MathLink`CallFrontEnd[
        FrontEnd`AttachCell[Typeset`box$, 
         FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
         Left, Top}, 
         "ClosingActions" -> {
          "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
   DefaultBaseStyle->{},
   Evaluator->Automatic,
   Method->"Preemptive"],
  RGBColor[0.311915810500651, 0.8240278085253765, 0.6637003540637734],
  Editable->False,
  Selectable->False]], "Output"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"randomColor", "[", "3", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      RowBox[{
       GraphicsBox[{
         {GrayLevel[0], RectangleBox[{0, 0}]}, 
         {GrayLevel[0], RectangleBox[{1, -1}]}, 
         {RGBColor[
          0.015133469585391968`, 0.19587980065365795`, 0.0316112155530468], 
          RectangleBox[{0, -1}, {2, 1}]}},
        AspectRatio->1,
        Frame->True,
        FrameStyle->RGBColor[
         0.010088979723594646`, 0.1305865337691053, 0.0210741437020312],
        FrameTicks->None,
        ImageSize->
         Dynamic[{
          Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
           Magnification]}],
        PlotRangePadding->None], "\[InvisibleSpace]"}],
      "RGBColor[0.015133469585391968, 0.19587980065365795, \
0.0316112155530468]"],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[
          0.015133469585391968`, 0.19587980065365795`, 0.0316112155530468]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0.015133469585391968`, 0.19587980065365795`, 0.0316112155530468],
    
    Editable->False,
    Selectable->False], ",", 
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      RowBox[{
       GraphicsBox[{
         {GrayLevel[0], RectangleBox[{0, 0}]}, 
         {GrayLevel[0], RectangleBox[{1, -1}]}, 
         {RGBColor[
          0.8420723780354857, 0.24180670176167163`, 0.1556179696260267], 
          RectangleBox[{0, -1}, {2, 1}]}},
        AspectRatio->1,
        Frame->True,
        FrameStyle->RGBColor[
         0.5613815853569906, 0.16120446784111442`, 0.1037453130840178],
        FrameTicks->None,
        ImageSize->
         Dynamic[{
          Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
           Magnification]}],
        PlotRangePadding->None], "\[InvisibleSpace]"}],
      "RGBColor[0.8420723780354857, 0.24180670176167163, 0.1556179696260267]"],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[
          0.8420723780354857, 0.24180670176167163`, 0.1556179696260267]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0.8420723780354857, 0.24180670176167163`, 0.1556179696260267],
    Editable->False,
    Selectable->False], ",", 
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      RowBox[{
       GraphicsBox[{
         {GrayLevel[0], RectangleBox[{0, 0}]}, 
         {GrayLevel[0], RectangleBox[{1, -1}]}, 
         {RGBColor[
          0.20560597219089893`, 0.8901373864793687, 0.1929270238592573], 
          RectangleBox[{0, -1}, {2, 1}]}},
        AspectRatio->1,
        Frame->True,
        FrameStyle->RGBColor[
         0.13707064812726596`, 0.5934249243195792, 0.12861801590617156`],
        FrameTicks->None,
        ImageSize->
         Dynamic[{
          Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
           Magnification]}],
        PlotRangePadding->None], "\[InvisibleSpace]"}],
      "RGBColor[0.20560597219089893, 0.8901373864793687, 0.1929270238592573]"],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[
          0.20560597219089893`, 0.8901373864793687, 0.1929270238592573]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0.20560597219089893`, 0.8901373864793687, 0.1929270238592573],
    Editable->False,
    Selectable->False]}], "}"}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["RegularGraph", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"RegularGraph", "[", 
  RowBox[{"5", ",", 
   RowBox[{"VertexSize", "\[Rule]", "Small"}], ",", 
   RowBox[{"VertexStyle", "\[Rule]", "Red"}], ",", 
   RowBox[{"VertexLabels", "\[Rule]", "\"\<Name\>\""}], ",", 
   RowBox[{"VertexLabelStyle", "\[Rule]", 
    RowBox[{"Directive", "[", 
     RowBox[{"\"\<Menu\>\"", ",", "8"}], "]"}]}]}], "]"}]], "Input"],

Cell[BoxData[
 GraphicsBox[
  NamespaceBox["NetworkGraphics",
   DynamicModuleBox[{Typeset`graph = HoldComplete[
     Graph[{1, 2, 3, 4, 5}, {
      Null, {{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 1}}}, {EdgeStyle -> {
         Thickness[Large]}, VertexLabels -> {"Name"}, VertexLabelStyle -> {
         Directive["Menu", 8]}, VertexSize -> {Small}, VertexStyle -> {
         RGBColor[1, 0, 0]}}]], Typeset`boxes, Typeset`boxes$s2d = 
    GraphicsGroupBox[{{
       Directive[
        Hue[0.6, 0.2, 0.8], 
        EdgeForm[
         Directive[
          GrayLevel[0], 
          Opacity[0.7]]]], 
       TagBox[{
         TagBox[
          StyleBox[
           
           DiskBox[{1.5388417685876266`, 0.8090169943749475}, 
            0.04999999999999999], 
           RGBColor[1, 0, 0], StripOnInput -> False], "DynamicName", BoxID -> 
          "VertexID$1"], 
         InsetBox[
          FormBox[
           StyleBox["1", 
            Directive["Menu", 8], StripOnInput -> False], TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$1", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$1"], 
       TagBox[{
         TagBox[
          StyleBox[
           
           DiskBox[{0.9510565162951536, 1.618033988749895}, 
            0.04999999999999999], 
           RGBColor[1, 0, 0], StripOnInput -> False], "DynamicName", BoxID -> 
          "VertexID$2"], 
         InsetBox[
          FormBox[
           StyleBox["2", 
            Directive["Menu", 8], StripOnInput -> False], TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$2", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$2"], 
       TagBox[{
         TagBox[
          StyleBox[
           
           DiskBox[{1.1102230246251565`*^-16, 1.3090169943749475`}, 
            0.04999999999999999], 
           RGBColor[1, 0, 0], StripOnInput -> False], "DynamicName", BoxID -> 
          "VertexID$3"], 
         InsetBox[
          FormBox[
           StyleBox["3", 
            Directive["Menu", 8], StripOnInput -> False], TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$3", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$3"], 
       TagBox[{
         TagBox[
          StyleBox[
           DiskBox[{0., 0.30901699437494756`}, 0.04999999999999999], 
           RGBColor[1, 0, 0], StripOnInput -> False], "DynamicName", BoxID -> 
          "VertexID$4"], 
         InsetBox[
          FormBox[
           StyleBox["4", 
            Directive["Menu", 8], StripOnInput -> False], TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$4", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$4"], 
       TagBox[{
         TagBox[
          StyleBox[
           DiskBox[{0.9510565162951534, 0.}, 0.04999999999999999], 
           RGBColor[1, 0, 0], StripOnInput -> False], "DynamicName", BoxID -> 
          "VertexID$5"], 
         InsetBox[
          FormBox[
           StyleBox["5", 
            Directive["Menu", 8], StripOnInput -> False], TraditionalForm], 
          Offset[{2, 2}, 
           DynamicLocation["VertexID$5", Automatic, {Right, Top}]], 
          ImageScaled[{0, 0}], BaseStyle -> "Graphics"]}, "DynamicName", 
        BoxID -> "VertexLabelID$5"]}, {
       Directive[
        Opacity[0.7], 
        Hue[0.6, 0.7, 0.5]], 
       StyleBox[
        LineBox[{
          DynamicLocation["VertexID$1", Automatic, Center], 
          DynamicLocation["VertexID$2", Automatic, Center]}], 
        Thickness[Large], StripOnInput -> False], 
       StyleBox[
        LineBox[{
          DynamicLocation["VertexID$1", Automatic, Center], 
          DynamicLocation["VertexID$5", Automatic, Center]}], 
        Thickness[Large], StripOnInput -> False], 
       StyleBox[
        LineBox[{
          DynamicLocation["VertexID$2", Automatic, Center], 
          DynamicLocation["VertexID$3", Automatic, Center]}], 
        Thickness[Large], StripOnInput -> False], 
       StyleBox[
        LineBox[{
          DynamicLocation["VertexID$3", Automatic, Center], 
          DynamicLocation["VertexID$4", Automatic, Center]}], 
        Thickness[Large], StripOnInput -> False], 
       StyleBox[
        LineBox[{
          DynamicLocation["VertexID$4", Automatic, Center], 
          DynamicLocation["VertexID$5", Automatic, Center]}], 
        Thickness[Large], StripOnInput -> False]}}], Typeset`data}, 
    TagBox[
     DynamicBox[GraphComputation`NetworkGraphicsBox[
      2, Typeset`graph, Typeset`boxes], {
      CachedValue :> Typeset`boxes, SingleEvaluation -> True, 
       SynchronousUpdating -> False, TrackedSymbols :> {}},
      ImageSizeCache->{{7.979999999999999, 
       446.37534099582473`}, {-242.73454099582472`, 222.4895433436372}}],
     MouseAppearanceTag["NetworkGraphics"]],
    AllowKernelInitialization->False,
    UnsavedVariables:>{Typeset`data}]],
  DefaultBaseStyle->{
   "NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
  FrameTicks->None]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["ReplaceElement", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"mat3", "=", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "0.796495", ",", "\"\<N/A\>\"", ",", "0.070125", ",", "\"\<nan\>\"", 
       ",", "0.806554"}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"\"\<nn\>\"", ",", 
       RowBox[{"-", "0.100365"}], ",", "0.992736", ",", 
       RowBox[{"-", "0.320560"}], ",", 
       RowBox[{"-", "0.0805351"}]}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"0.473571", ",", "0.460741", ",", "0.030060", ",", 
       RowBox[{"-", "0.412400"}], ",", "0.788522"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0.614974", ",", 
       RowBox[{"-", "0.503201"}], ",", "0.615744", ",", "0.966053", ",", 
       RowBox[{"-", "0.011776"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "0.828415"}], ",", "0.035514", ",", "0.8911617", ",", 
       "\"\<N/A\>\"", ",", 
       RowBox[{"-", "0.453926"}]}], "}"}]}], "}"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"MatrixForm", "[", "mat3", "]"}]}], "Input"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"0.796495`", "\<\"N/A\"\>", "0.070125`", "\<\"nan\"\>", "0.806554`"},
     {"\<\"nn\"\>", 
      RowBox[{"-", "0.100365`"}], "0.992736`", 
      RowBox[{"-", "0.32056`"}], 
      RowBox[{"-", "0.0805351`"}]},
     {"0.473571`", "0.460741`", "0.03006`", 
      RowBox[{"-", "0.4124`"}], "0.788522`"},
     {"0.614974`", 
      RowBox[{"-", "0.503201`"}], "0.615744`", "0.966053`", 
      RowBox[{"-", "0.011776`"}]},
     {
      RowBox[{"-", "0.828415`"}], "0.035514`", "0.8911617`", "\<\"N/A\"\>", 
      RowBox[{"-", "0.453926`"}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"ReplaceElement", "[", 
   RowBox[{"mat3", ",", 
    RowBox[{"{", 
     RowBox[{"\"\<N/A\>\"", ",", "\"\<nan\>\"", ",", "\"\<nn\>\""}], "}"}]}], 
   "]"}], "//", "MatrixForm"}]], "Input"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"0.796495`", 
      RowBox[{"-", "0.026827749999999997`"}], "0.070125`", 
      "0.07769766666666666`", "0.806554`"},
     {"0.26415625`", 
      RowBox[{"-", "0.100365`"}], "0.992736`", 
      RowBox[{"-", "0.32056`"}], 
      RowBox[{"-", "0.0805351`"}]},
     {"0.473571`", "0.460741`", "0.03006`", 
      RowBox[{"-", "0.4124`"}], "0.788522`"},
     {"0.614974`", 
      RowBox[{"-", "0.503201`"}], "0.615744`", "0.966053`", 
      RowBox[{"-", "0.011776`"}]},
     {
      RowBox[{"-", "0.828415`"}], "0.035514`", "0.8911617`", 
      "0.07769766666666666`", 
      RowBox[{"-", "0.453926`"}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["RepUnit", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"RepUnit", "[", "13", "]"}]], "Input"],

Cell[BoxData["1111111111111"], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["SierpinskiTriangle", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"SierpinskiTriangle", "[", 
  RowBox[{"8", ",", "\[IndentingNewLine]", 
   RowBox[{"ImageSize", "\[Rule]", "Small"}], ",", 
   RowBox[{"Frame", "\[Rule]", "True"}], ",", 
   RowBox[{"FrameTicks", "\[Rule]", "False"}], ",", 
   RowBox[{"Background", "\[Rule]", "LightYellow"}]}], "]"}]], "Input"],

Cell[BoxData[
 GraphicsBox[
  {RGBColor[0, 0, 1], 
   {RGBColor[0, 0, 1], GeometricTransformationBox[GeometricTransformationBox[
      {RGBColor[0, 0, 1], 
       GeometricTransformationBox[GeometricTransformationBox[
         {RGBColor[0, 0, 1], 
          GeometricTransformationBox[GeometricTransformationBox[
            {RGBColor[0, 0, 1], 
             GeometricTransformationBox[GeometricTransformationBox[
               {RGBColor[0, 0, 1], 
                GeometricTransformationBox[GeometricTransformationBox[
                  {RGBColor[0, 0, 1], 
                   GeometricTransformationBox[GeometricTransformationBox[
                    {RGBColor[0, 0, 1], 
                    GeometricTransformationBox[GeometricTransformationBox[
                    {RGBColor[0, 0, 1], 
                    GeometricTransformationBox[
                    GeometricTransformationBox[
                    PolygonBox[{{0., 0.}, {1., 0.}, {0.5, 1.}}], {{{0.5, 
                    0.}, {0., 0.5}}, {0., 0.}}], {{{0., 0.}}, {{0.5, 0.}}, {{
                    0.25, 0.5}}}]}, {{{0.5, 0.}, {0., 0.5}}, {0., 0.}}], {{{
                    0., 0.}}, {{0.5, 0.}}, {{0.25, 0.5}}}]}, {{{0.5, 0.}, {0.,
                     0.5}}, {0., 0.}}], {{{0., 0.}}, {{0.5, 0.}}, {{0.25, 
                    0.5}}}]}, {{{0.5, 0.}, {0., 0.5}}, {0., 0.}}], {{{0., 
                 0.}}, {{0.5, 0.}}, {{0.25, 0.5}}}]}, {{{0.5, 0.}, {0., 
                0.5}}, {0., 0.}}], {{{0., 0.}}, {{0.5, 0.}}, {{0.25, 
              0.5}}}]}, {{{0.5, 0.}, {0., 0.5}}, {0., 0.}}], {{{0., 0.}}, {{
           0.5, 0.}}, {{0.25, 0.5}}}]}, {{{0.5, 0.}, {0., 0.5}}, {0., 
          0.}}], {{{0., 0.}}, {{0.5, 0.}}, {{0.25, 0.5}}}]}, {{{0.5, 0.}, {0.,
        0.5}}, {0., 0.}}], {{{0., 0.}}, {{0.5, 0.}}, {{0.25, 0.5}}}]}},
  Background->RGBColor[1, 1, 0.85],
  Frame->True,
  FrameTicks->False,
  ImageSize->Small]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["SmithNumberQ", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Select", "[", 
  RowBox[{
   RowBox[{"Range", "[", "1000", "]"}], ",", "SmithNumberQ"}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "4", ",", "22", ",", "27", ",", "58", ",", "85", ",", "94", ",", "121", ",",
    "166", ",", "202", ",", "265", ",", "274", ",", "319", ",", "346", ",", 
   "355", ",", "378", ",", "382", ",", "391", ",", "438", ",", "454", ",", 
   "483", ",", "517", ",", "526", ",", "535", ",", "562", ",", "576", ",", 
   "588", ",", "627", ",", "634", ",", "636", ",", "645", ",", "648", ",", 
   "654", ",", "663", ",", "666", ",", "690", ",", "706", ",", "728", ",", 
   "729", ",", "762", ",", "778", ",", "825", ",", "852", ",", "861", ",", 
   "895", ",", "913", ",", "915", ",", "922", ",", "958", ",", "985"}], 
  "}"}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["StemPlot", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"StemPlot", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"1", ",", "2", ",", "3", ",", "4", ",", "5"}], "}"}], ",", 
   RowBox[{"PlotStyle", "\[Rule]", 
    RowBox[{"PointSize", "[", "Medium", "]"}]}], ",", 
   RowBox[{"FillingStyle", "\[Rule]", 
    RowBox[{"RGBColor", "[", 
     RowBox[{"1", ",", "0", ",", "0"}], "]"}]}]}], "]"}]], "Input"],

Cell[BoxData[
 GraphicsBox[
  GraphicsComplexBox[{{1., 1.}, {2., 2.}, {3., 3.}, {4., 4.}, {5., 5.}, {1., 
   0.}, {2., 0.}, {3., 0.}, {4., 0.}, {5., 0.}, {1., 1.}, {2., 2.}, {3., 
   3.}, {4., 4.}, {5., 5.}}, {{{}, {}, {}, {}, 
     {RGBColor[1, 0, 0], LineBox[{6, 1}], LineBox[{7, 2}], LineBox[{8, 3}], 
      LineBox[{9, 4}], LineBox[{10, 5}]}}, {{}, 
     {Hue[0.67, 0.6, 0.6], PointSize[Medium], 
      PointBox[{11, 12, 13, 14, 15}]}, {}}}],
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->True,
  AxesOrigin->{0, 0},
  PlotRange->{{0, 5.}, {0, 5.}},
  PlotRangeClipping->True,
  PlotRangePadding->{
    Scaled[0.02], 
    Scaled[0.02]}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["ToGraph", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"lis", "=", 
   RowBox[{"RandomInteger", "[", 
    RowBox[{"9", ",", 
     RowBox[{"{", 
      RowBox[{"12", ",", "2"}], "}"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"ToGraph", "[", "lis", "]"}]}], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"3", "\[DirectedEdge]", "8"}], ",", 
   RowBox[{"0", "\[DirectedEdge]", "0"}], ",", 
   RowBox[{"9", "\[DirectedEdge]", "3"}], ",", 
   RowBox[{"1", "\[DirectedEdge]", "2"}], ",", 
   RowBox[{"9", "\[DirectedEdge]", "7"}], ",", 
   RowBox[{"6", "\[DirectedEdge]", "7"}], ",", 
   RowBox[{"5", "\[DirectedEdge]", "3"}], ",", 
   RowBox[{"0", "\[DirectedEdge]", "2"}], ",", 
   RowBox[{"2", "\[DirectedEdge]", "6"}], ",", 
   RowBox[{"5", "\[DirectedEdge]", "7"}], ",", 
   RowBox[{"0", "\[DirectedEdge]", "4"}], ",", 
   RowBox[{"6", "\[DirectedEdge]", "2"}]}], "}"}]], "Output"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ToGraph", "[", 
  RowBox[{"{", 
   RowBox[{"3", ",", "2"}], "}"}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"3", "\[DirectedEdge]", "2"}]], "Output"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ToGraph", "[", 
  RowBox[{"{", "}"}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", "}"}]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["TruthTable", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"TruthTable", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"A", "\[And]", "B"}], "\[Implies]", 
    RowBox[{"\[Not]", "C"}]}], ",", 
   RowBox[{"{", 
    RowBox[{"A", ",", "B", ",", "C"}], "}"}]}], "]"}]], "Input"],

Cell[BoxData[
 TagBox[GridBox[{
    {"A", "B", "C", 
     TagBox[
      FormBox[
       RowBox[{
        RowBox[{"A", "\[And]", "B"}], "\[Implies]", 
        RowBox[{"\[Not]", "C"}]}],
       TraditionalForm],
      TraditionalForm,
      Editable->True]},
    {"\<\"T\"\>", "\<\"T\"\>", "\<\"T\"\>", "\<\"F\"\>"},
    {"\<\"T\"\>", "\<\"T\"\>", "\<\"F\"\>", "\<\"T\"\>"},
    {"\<\"T\"\>", "\<\"F\"\>", "\<\"T\"\>", "\<\"T\"\>"},
    {"\<\"T\"\>", "\<\"F\"\>", "\<\"F\"\>", "\<\"T\"\>"},
    {"\<\"F\"\>", "\<\"T\"\>", "\<\"T\"\>", "\<\"T\"\>"},
    {"\<\"F\"\>", "\<\"T\"\>", "\<\"F\"\>", "\<\"T\"\>"},
    {"\<\"F\"\>", "\<\"F\"\>", "\<\"T\"\>", "\<\"T\"\>"},
    {"\<\"F\"\>", "\<\"F\"\>", "\<\"F\"\>", "\<\"T\"\>"}
   },
   AutoDelete->False,
   BaseStyle->{FontFamily -> "Times"},
   GridBoxDividers->{"ColumnsIndexed" -> {1 -> {
         Thickness[Tiny], 
         GrayLevel[0]}, -1 -> {
         Thickness[Tiny], 
         GrayLevel[0]}, -2 -> {
         Thickness[Tiny], 
         GrayLevel[0.85]}}, "RowsIndexed" -> {1 -> {
         Thickness[Tiny], 
         GrayLevel[0]}, 2 -> {
         Thickness[Tiny], 
         GrayLevel[0.85]}, -1 -> {
         Thickness[Tiny], 
         GrayLevel[0]}}},
   GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
  "Grid"]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["UpperTriangularMatrix", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"UpperTriangularMatrix", "[", "5", "]"}], "//", 
  "MatrixForm"}]], "Input"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"1", "1", "1", "1", "1"},
     {"0", "1", "1", "1", "1"},
     {"0", "0", "1", "1", "1"},
     {"0", "0", "0", "1", "1"},
     {"0", "0", "0", "0", "1"}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["VandermondeMatrix", "Subsubsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"VandermondeMatrix", "[", 
   RowBox[{"4", ",", "\[Lambda]"}], "]"}], "//", "MatrixForm"}]], "Input"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"1", 
      SubscriptBox["\[Lambda]", "1"], 
      SubsuperscriptBox["\[Lambda]", "1", "2"], 
      SubsuperscriptBox["\[Lambda]", "1", "3"]},
     {"1", 
      SubscriptBox["\[Lambda]", "2"], 
      SubsuperscriptBox["\[Lambda]", "2", "2"], 
      SubsuperscriptBox["\[Lambda]", "2", "3"]},
     {"1", 
      SubscriptBox["\[Lambda]", "3"], 
      SubsuperscriptBox["\[Lambda]", "3", "2"], 
      SubsuperscriptBox["\[Lambda]", "3", "3"]},
     {"1", 
      SubscriptBox["\[Lambda]", "4"], 
      SubsuperscriptBox["\[Lambda]", "4", "2"], 
      SubsuperscriptBox["\[Lambda]", "4", "3"]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output"]
}, Closed]]
}, Closed]]
}, Closed]]
}, Open  ]]
},
AutoGeneratedPackage->Automatic,
ScreenStyleEnvironment->"Working",
WindowSize->{859, 732},
WindowMargins->{{213, Automatic}, {Automatic, 0}},
ShowSelection->True,
FrontEndVersion->"10.1 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 23, \
2015)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "Info3626258524-1367978"->{
  Cell[38547, 1249, 288, 5, 78, "Print",
   CellTags->"Info3626258524-1367978"]},
 "Info3626258528-1367978"->{
  Cell[45020, 1426, 350, 6, 112, "Print",
   CellTags->"Info3626258528-1367978"]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"Info3626258524-1367978", 106174, 3210},
 {"Info3626258528-1367978", 106285, 3213}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 68, 1, 60, "Section",
 InitializationGroup->True],
Cell[650, 25, 398, 13, 29, "Text"],
Cell[CellGroupData[{
Cell[1073, 42, 30, 0, 41, "Subsection"],
Cell[1106, 44, 134, 4, 56, "Input"],
Cell[1243, 50, 239, 6, 56, "Input"],
Cell[1485, 58, 146, 4, 53, "Input"],
Cell[1634, 64, 355, 9, 88, "Input"],
Cell[1992, 75, 137, 4, 56, "Input"],
Cell[2132, 81, 136, 4, 56, "Input"],
Cell[2271, 87, 229, 6, 56, "Input"],
Cell[2503, 95, 644, 16, 121, "Input"],
Cell[3150, 113, 888, 19, 187, "Input"],
Cell[4041, 134, 154, 4, 56, "Input"],
Cell[4198, 140, 157, 4, 53, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[4392, 149, 34, 0, 33, "Subsection"],
Cell[4429, 151, 159, 4, 45, "Input"],
Cell[4591, 157, 114, 3, 45, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[4742, 165, 57, 0, 33, "Subsection"],
Cell[4802, 167, 209, 5, 46, "Input"],
Cell[5014, 174, 174, 5, 28, "Input"],
Cell[5191, 181, 184, 5, 28, "Input"],
Cell[5378, 188, 247, 6, 63, "Input"],
Cell[5628, 196, 241, 5, 63, "Input"],
Cell[5872, 203, 230, 5, 63, "Input"],
Cell[6105, 210, 399, 8, 66, "Input"],
Cell[6507, 220, 390, 8, 66, "Input"],
Cell[6900, 230, 403, 8, 66, "Input"],
Cell[7306, 240, 395, 8, 66, "Input"],
Cell[7704, 250, 426, 9, 66, "Input"],
Cell[8133, 261, 234, 5, 63, "Input"],
Cell[8370, 268, 183, 5, 28, "Input"],
Cell[8556, 275, 315, 7, 80, "Input"],
Cell[8874, 284, 375, 7, 97, "Input"],
Cell[9252, 293, 318, 6, 80, "Input"],
Cell[9573, 301, 230, 5, 63, "Input"],
Cell[9806, 308, 213, 5, 63, "Input"],
Cell[10022, 315, 276, 6, 63, "Input"],
Cell[10301, 323, 226, 5, 63, "Input"],
Cell[10530, 330, 187, 5, 28, "Input"],
Cell[10720, 337, 253, 6, 63, "Input"],
Cell[10976, 345, 303, 6, 80, "Input"],
Cell[11282, 353, 275, 6, 63, "Input"],
Cell[11560, 361, 179, 5, 28, "Input"],
Cell[11742, 368, 175, 5, 28, "Input"],
Cell[11920, 375, 181, 5, 28, "Input"],
Cell[12104, 382, 227, 5, 63, "Input"],
Cell[12334, 389, 253, 5, 63, "Input"],
Cell[12590, 396, 213, 5, 46, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[12840, 406, 29, 0, 33, "Subsection"],
Cell[12872, 408, 151, 4, 56, "Input"],
Cell[13026, 414, 152, 4, 56, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[13215, 423, 37, 0, 33, "Subsection"],
Cell[CellGroupData[{
Cell[13277, 427, 74, 1, 235, "Input"],
Cell[13354, 430, 64, 0, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[13467, 436, 63, 0, 33, "Subsection"],
Cell[13533, 438, 791, 23, 80, "Input"],
Cell[14327, 463, 344, 10, 28, "Input"],
Cell[14674, 475, 209, 6, 28, "Input"],
Cell[14886, 483, 592, 18, 46, "Input"],
Cell[15481, 503, 256, 7, 28, "Input"],
Cell[15740, 512, 352, 10, 46, "Input"],
Cell[16095, 524, 778, 21, 63, "Input"],
Cell[16876, 547, 341, 10, 46, "Input"],
Cell[17220, 559, 222, 6, 28, "Input"],
Cell[17445, 567, 403, 13, 28, "Input"],
Cell[17851, 582, 275, 7, 46, "Input"],
Cell[18129, 591, 471, 14, 46, "Input"],
Cell[18603, 607, 1338, 38, 119, "Input"],
Cell[19944, 647, 196, 6, 28, "Input"],
Cell[20143, 655, 492, 15, 28, "Input"],
Cell[20638, 672, 526, 16, 46, "Input"],
Cell[21167, 690, 631, 18, 63, "Input"],
Cell[21801, 710, 629, 18, 63, "Input"],
Cell[22433, 730, 769, 21, 63, "Input"],
Cell[23205, 753, 334, 9, 28, "Input"],
Cell[23542, 764, 646, 18, 80, "Input"],
Cell[24191, 784, 603, 17, 80, "Input"],
Cell[24797, 803, 238, 7, 28, "Input"],
Cell[25038, 812, 345, 10, 28, "Input"],
Cell[25386, 824, 847, 22, 131, "Input"],
Cell[26236, 848, 277, 9, 28, "Input"],
Cell[26516, 859, 635, 19, 46, "Input"],
Cell[27154, 880, 429, 12, 46, "Input"],
Cell[27586, 894, 1483, 42, 97, "Input"],
Cell[29072, 938, 155, 4, 28, "Input"],
Cell[29230, 944, 123, 3, 28, "Input"],
Cell[29356, 949, 677, 20, 46, "Input"],
Cell[30036, 971, 672, 20, 97, "Input"],
Cell[30711, 993, 250, 8, 28, "Input"],
Cell[30964, 1003, 198, 6, 28, "Input"],
Cell[31165, 1011, 2700, 75, 165, "Input"],
Cell[33868, 1088, 2539, 65, 199, "Input"],
Cell[36410, 1155, 413, 12, 28, "Input"],
Cell[36826, 1169, 513, 16, 46, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[37376, 1190, 41, 0, 33, "Subsection"],
Cell[37420, 1192, 69, 2, 235, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[37526, 1199, 32, 0, 33, "Subsection"],
Cell[37561, 1201, 58, 1, 235, "Input"]
}, Closed]]
}, Open  ]],
Cell[CellGroupData[{
Cell[37668, 1208, 27, 0, 60, "Section"],
Cell[CellGroupData[{
Cell[37720, 1212, 34, 0, 41, "Subsection"],
Cell[37757, 1214, 30, 0, 28, "Input"],
Cell[37790, 1216, 183, 6, 29, "Text"],
Cell[37976, 1224, 65, 1, 28, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[38078, 1230, 41, 0, 41, "Subsection"],
Cell[CellGroupData[{
Cell[38144, 1234, 61, 1, 56, "Input"],
Cell[38208, 1237, 246, 4, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[38491, 1246, 53, 1, 43, "Input"],
Cell[38547, 1249, 288, 5, 78, "Print",
 CellTags->"Info3626258524-1367978"]
}, Closed]],
Cell[CellGroupData[{
Cell[38872, 1259, 56, 1, 56, "Input"],
Cell[38931, 1262, 286, 4, 510, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[39254, 1271, 65, 1, 41, "Input"],
Cell[39322, 1274, 267, 4, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[39626, 1283, 62, 1, 43, "Input"],
Cell[39691, 1286, 258, 4, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[39986, 1295, 59, 1, 43, "Input"],
Cell[40048, 1298, 488, 7, 535, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[40573, 1310, 56, 1, 43, "Input"],
Cell[40632, 1313, 298, 4, 510, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[40967, 1322, 60, 1, 43, "Input"],
Cell[41030, 1325, 218, 3, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[41285, 1333, 49, 1, 41, "Input"],
Cell[41337, 1336, 1343, 23, 510, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[42717, 1364, 56, 1, 41, "Input"],
Cell[42776, 1367, 747, 11, 663, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[43560, 1383, 64, 1, 41, "Input"],
Cell[43627, 1386, 598, 9, 510, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[44262, 1400, 59, 1, 41, "Input"],
Cell[44324, 1403, 261, 4, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[44622, 1412, 58, 1, 41, "Input"],
Cell[44683, 1415, 243, 3, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[44963, 1423, 54, 1, 41, "Input"],
Cell[45020, 1426, 350, 6, 112, "Print",
 CellTags->"Info3626258528-1367978"]
}, Closed]],
Cell[CellGroupData[{
Cell[45407, 1437, 55, 1, 56, "Input"],
Cell[45465, 1440, 261, 4, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[45763, 1449, 50, 1, 43, "Input"],
Cell[45816, 1452, 235, 4, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[46088, 1461, 57, 1, 43, "Input"],
Cell[46148, 1464, 383, 5, 510, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[46568, 1474, 61, 1, 43, "Input"],
Cell[46632, 1477, 340, 5, 510, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[47009, 1487, 55, 1, 41, "Input"],
Cell[47067, 1490, 308, 4, 510, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[47412, 1499, 51, 1, 41, "Input"],
Cell[47466, 1502, 215, 3, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[47718, 1510, 50, 1, 43, "Input"],
Cell[47771, 1513, 219, 3, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[48027, 1521, 53, 1, 41, "Input"],
Cell[48083, 1524, 349, 5, 356, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[48469, 1534, 64, 1, 43, "Input"],
Cell[48536, 1537, 287, 4, 510, "Print"]
}, Closed]],
Cell[CellGroupData[{
Cell[48860, 1546, 60, 1, 41, "Input"],
Cell[48923, 1549, 411, 6, 356, "Print"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[49383, 1561, 62, 0, 33, "Subsection"],
Cell[CellGroupData[{
Cell[49470, 1565, 43, 0, 32, "Subsubsection"],
Cell[CellGroupData[{
Cell[49538, 1569, 303, 8, 383, "Input"],
Cell[49844, 1579, 7544, 170, 2570, "Output"]
}, Closed]],
Cell[CellGroupData[{
Cell[57425, 1754, 72, 1, 235, "Input"],
Cell[57500, 1757, 1272, 44, 383, "Output"]
}, Closed]],
Cell[58787, 1804, 70, 0, 175, "SolutionText"],
Cell[CellGroupData[{
Cell[58882, 1808, 548, 13, 235, "Input"],
Cell[59433, 1823, 7029, 139, 1495, "Output"]
}, Closed]],
Cell[CellGroupData[{
Cell[66499, 1967, 73, 1, 235, "Input"],
Cell[66575, 1970, 457, 16, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[67081, 1992, 35, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[67141, 1996, 111, 3, 56, "Input"],
Cell[67255, 2001, 289, 10, 53, "Output"]
}, Closed]],
Cell[CellGroupData[{
Cell[67581, 2016, 88, 2, 65, "Input"],
Cell[67672, 2020, 31, 0, 53, "Output"]
}, Closed]],
Cell[67718, 2023, 35, 0, 57, "Text"],
Cell[CellGroupData[{
Cell[67778, 2027, 110, 3, 56, "Input"],
Cell[67891, 2032, 286, 7, 43, "Message"],
Cell[68180, 2041, 111, 3, 56, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[68340, 2050, 38, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[68403, 2054, 68, 1, 235, "Input"],
Cell[68474, 2057, 34, 0, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[68557, 2063, 47, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[68629, 2067, 82, 1, 28, "Input"],
Cell[68714, 2070, 287, 5, 28, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[69050, 2081, 44, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[69119, 2085, 88, 1, 28, "Input"],
Cell[69210, 2088, 1804, 29, 165, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[71063, 2123, 94, 4, 26, "Subsubsection"],
Cell[71160, 2129, 368, 12, 487, "Input"],
Cell[CellGroupData[{
Cell[71553, 2145, 847, 25, 668, "Input"],
Cell[72403, 2172, 916, 25, 1145, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[73368, 2203, 38, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[73431, 2207, 69, 1, 235, "Input"],
Cell[73503, 2210, 37, 0, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[73589, 2216, 42, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[73656, 2220, 95, 2, 293, "Input"],
Cell[73754, 2224, 1294, 19, 952, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[75097, 2249, 31, 0, 26, "Subsubsection"],
Cell[75131, 2251, 154, 4, 235, "Input"],
Cell[CellGroupData[{
Cell[75310, 2259, 104, 2, 235, "Input"],
Cell[75417, 2263, 137, 4, 235, "Output"]
}, Closed]],
Cell[CellGroupData[{
Cell[75591, 2272, 128, 3, 235, "Input"],
Cell[75722, 2277, 211, 5, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[75982, 2288, 38, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[76045, 2292, 115, 3, 293, "Input"],
Cell[76163, 2297, 99, 2, 235, "Output"]
}, Closed]],
Cell[76277, 2302, 39, 0, 233, "Text"],
Cell[CellGroupData[{
Cell[76341, 2306, 125, 3, 293, "Input"],
Cell[76469, 2311, 81, 2, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[76599, 2319, 46, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[76670, 2323, 113, 2, 235, "Input"],
Cell[76786, 2327, 97, 2, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[76932, 2335, 41, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[76998, 2339, 269, 7, 383, "Input"],
Cell[77270, 2348, 46, 0, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[77365, 2354, 40, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[77430, 2358, 87, 2, 235, "Input"],
Cell[77520, 2362, 1185, 36, 272, "Output"]
}, Closed]],
Cell[78720, 2401, 68, 1, 235, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[78825, 2407, 36, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[78886, 2411, 59, 1, 53, "Input"],
Cell[78948, 2414, 1698, 44, 57, "Output"]
}, Closed]],
Cell[CellGroupData[{
Cell[80683, 2463, 64, 1, 53, "Input"],
Cell[80750, 2466, 5471, 142, 63, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[86270, 2614, 37, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[86332, 2618, 375, 8, 383, "Input"],
Cell[86710, 2628, 5336, 132, 3627, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[92095, 2766, 39, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[92159, 2770, 1077, 27, 952, "Input"],
Cell[93239, 2799, 1092, 28, 806, "Output"]
}, Closed]],
Cell[CellGroupData[{
Cell[94368, 2832, 221, 6, 235, "Input"],
Cell[94592, 2840, 1157, 31, 806, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[95798, 2877, 32, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[95855, 2881, 61, 1, 235, "Input"],
Cell[95919, 2884, 40, 0, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[96008, 2890, 43, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[96076, 2894, 318, 6, 383, "Input"],
Cell[96397, 2902, 1890, 34, 1797, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[98336, 2942, 37, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[98398, 2946, 129, 3, 235, "Input"],
Cell[98530, 2951, 668, 11, 531, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[99247, 2968, 33, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[99305, 2972, 368, 9, 235, "Input"],
Cell[99676, 2983, 675, 16, 2275, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[100400, 3005, 32, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[100457, 3009, 257, 8, 383, "Input"],
Cell[100717, 3019, 629, 14, 235, "Output"]
}, Closed]],
Cell[CellGroupData[{
Cell[101383, 3038, 107, 3, 235, "Input"],
Cell[101493, 3043, 64, 1, 235, "Output"]
}, Closed]],
Cell[CellGroupData[{
Cell[101594, 3049, 78, 2, 235, "Input"],
Cell[101675, 3053, 45, 1, 235, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[101769, 3060, 35, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[101829, 3064, 233, 7, 235, "Input"],
Cell[102065, 3073, 1304, 36, 1526, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[103418, 3115, 46, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[103489, 3119, 110, 3, 235, "Input"],
Cell[103602, 3124, 711, 20, 806, "Output"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[104362, 3150, 42, 0, 26, "Subsubsection"],
Cell[CellGroupData[{
Cell[104429, 3154, 135, 3, 235, "Input"],
Cell[104567, 3159, 1147, 31, 877, "Output"]
}, Closed]]
}, Closed]]
}, Closed]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
