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

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

(* CreatedBy='Wolfram 15.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       154,          7]
NotebookDataLength[     48912,       1280]
NotebookOptionsPosition[     38083,       1082]
NotebookOutlinePosition[     40375,       1135]
CellTagsIndexPosition[     40297,       1130]
WindowTitle->EditVariants
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[GridBox[{
   {GridBox[{
      {
       ItemBox[Cell[BoxData[
         RowBox[{
          TemplateBox[{12},
           "Spacer1"], Cell[
          "WOLFRAM INSTITUTE/ PUZZLES SYMBOL", "PacletNameCell",
           TextAlignment->Center,ExpressionUUID->
           "6ed50ebc-9075-411f-bb84-2c6cebedda7e"], 
          TemplateBox[{8},
           "Spacer1"]}]],
         TextAlignment->Center,ExpressionUUID->
         "4f04d218-a9f1-43ec-891e-ba0d7e6ea53e"],
        Background->LightDarkSwitched[
          RGBColor[0.490196, 0.576471, 0.690196]],
        ItemSize->Full], ""}
     },
     GridBoxAlignment->{"Rows" -> {{Center}}},
     GridBoxItemSize->{"Columns" -> {Full, 
         Scaled[0.02]}, "Rows" -> {{2.5}}}], Cell[TextData[{
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "See Also",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "5ae30a1a-4929-461e-ba66-2dec935f1a6c"]
         }],ExpressionUUID->"6547c872-a3f4-4d6a-b51d-c2c1cea1d54e"],
         StripOnInput->False],{
        StyleBox[
          "\"DamerauLevenshteinDistance\"", "SeeAlsoRelated", StripOnInput -> 
           False] :> Documentation`HelpLookup[
          "paclet:ref/DamerauLevenshteinDistance"], 
         StyleBox[
          "\"EditDistance\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup["paclet:ref/EditDistance"], Delimiter, 
         StyleBox[
          "\"Functions\"", "SeeAlsoSection", FontSize -> 14, FontSlant -> 
           "Italic", StripOnInput -> False] :> 
         NotebookFind[EvaluationNotebook[], "SeeAlsoSection", All, CellStyle],
          StyleBox[
          StyleBox[
           "\"TextVariants\"", "SeeAlsoRelated", StripOnInput -> False], 
           "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/TextVariants"], 
         StyleBox[
          StyleBox[
           "\"CandidateEnumeration\"", "SeeAlsoRelated", StripOnInput -> 
            False], "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/CandidateEnumeration"], 
         StyleBox[
          StyleBox[
           "\"CandidateSweep\"", "SeeAlsoRelated", StripOnInput -> False], 
           "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/CandidateSweep"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"SeeAlso"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "05f62bd0-12bf-44d4-87ed-86822d1ba0b9"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "Related Guides",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "230ac447-8832-47fb-b262-29d7d8bd3803"]
         }],ExpressionUUID->"2a0df9b8-725c-4ee1-bbe8-db726b30beaf"],
         StripOnInput->False],{
        "\"Search\"" :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/guide/Search"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"MoreAbout"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "8753928c-e17b-43b6-b695-9770cbed2eb4"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "URL",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "9ad3562c-354f-49f9-8ce5-851562f65d6a"]
         }],ExpressionUUID->"23b89bfc-2bc7-45a2-8f1b-1cafb5133f1b"],
         StripOnInput->False],{
        "\"WolframInstitute/Puzzles/ref/EditVariants\"" :> None, 
         "\"Copy Wolfram Documentation Center URL\"" :> 
         CopyToClipboard["WolframInstitute/Puzzles/ref/EditVariants"], 
         Delimiter, "\"Copy web URL\"" :> 
         Module[{DocumentationSearch`Private`nb$}, 
           DocumentationSearch`Private`nb$ = 
            NotebookPut[
             Notebook[{
               Cell[BoxData[
                 MakeBoxes[
                  Hyperlink[
                   "http://reference.wolfram.com/language/WolframInstitute/\
Puzzles/ref/EditVariants.html"], StandardForm]], "Input", TextClipboardType -> 
                 "PlainText"]}, Visible -> False]]; 
           SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; 
           FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; 
           NotebookClose[DocumentationSearch`Private`nb$]; Null], 
         "\"Go to web URL\"" :> 
         FrontEndExecute[{
           NotebookLocate[{
             URL[If[TrueQ[False], 
                 "http://reference.wolfram.com/system-modeler/", 
                 "http://reference.wolfram.com/language/"] <> 
               "WolframInstitute/Puzzles/ref/EditVariants" <> ".html"], 
              None}]}]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"URLMenu"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "ed5f8730-b8a2-4594-ad5b-74a31e550cda"]
    }], "AnchorBar",
     CacheGraphics->False,ExpressionUUID->
     "e277224a-de46-4100-874f-6280f7b5b0c7"]}
  }]], "AnchorBarGrid",
 CellID->1,ExpressionUUID->"1c9179a7-15df-44b6-b76a-56e528716814"],

Cell["WolframInstitute`Puzzles`", "ContextNameCell",ExpressionUUID->"7bea2893-ba2d-447f-a46e-281afbbfea99"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {Cell[TextData[{
     Cell[
     "EditVariants", "ObjectName",ExpressionUUID->
      "2c1e271d-2f9c-4016-821c-e491e3814833"],
     Cell[BoxData[
      TemplateBox[{8},
       "Spacer1"]],ExpressionUUID->"3c171d7a-fb8d-468d-b1a9-15b2b0477ea5"],
     Cell[BoxData[
     ""], "ObjectNameTranslation",ExpressionUUID->
      "b0925d81-2d73-40a2-80da-a7da046ceff0"]
    }],ExpressionUUID->"a052c285-e08e-4a83-aa30-3989fc4cff2c"], 
    "\[SpanFromLeft]"}
  }]], "ObjectNameGrid",ExpressionUUID->"40d71aa0-7f92-4c32-9bda-\
635e676a2365"],

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["EditVariants"]], 
         "paclet:WolframInstitute/Puzzles/ref/EditVariants", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], 
       "[", "\"\<\!\(\*StyleBox[\"text\", \"TI\"]\)\>\"", "]"}]], 
      "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "d4bcaeab-5e3c-4585-94ee-576e178253e7"],
     "\[LineSeparator]",
     "gives the strings at Damerau-Levenshtein distance 1 from \"",
     StyleBox["text", "TI"],
     "\", using the distinct characters of \"",
     StyleBox["text", "TI"],
     "\" as the insertion and substitution alphabet."
    }],ExpressionUUID->"dd8a7b2a-85cf-4a60-97a5-fcdf3a7ea276"]},
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["EditVariants"]], 
         "paclet:WolframInstitute/Puzzles/ref/EditVariants", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       RowBox[{"\"\<\!\(\*StyleBox[\"text\", \"TI\"]\)\>\"", ",", 
        " ", "\"\<\!\(\*StyleBox[\"alphabet\", \"TI\"]\)\>\""}], "]"}]], 
      "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "0f624bfb-d6c6-48f1-b422-be19d7ef559f"],
     "\[LineSeparator]",
     "uses the distinct characters of \"",
     StyleBox["alphabet", "TI"],
     "\" instead."
    }],ExpressionUUID->"816fb1ff-c7f7-4a7e-8745-a6bcf204e162"]}
  }]], "Usage",ExpressionUUID->"d6c6d4e1-870d-4b63-98bf-376c0b92f2c0"]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[Cell[BoxData[Cell[TextData[{
  Cell[BoxData[
   DynamicBox[ToBoxes[
     If[CurrentValue[
        EvaluationCell[], "CellGroupOpen"] =!= Closed, 
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], 
      Rotate[
       Style[
        Graphics[{
          Thickness[0.18], 
          RGBColor[0.8509803921568627, 0.396078431372549, 0], 
          Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
         PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
        0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
    ImageSizeCache->{
     13.600000000000001`, {-0.1685058593749993, 13.768505859375}}]],
   ExpressionUUID->"72216f11-aca1-440d-9e35-568812ecf083"],
  Cell[BoxData[
   TemplateBox[{1},
    "Spacer1"]],ExpressionUUID->"b52cbced-6bb8-419a-ac61-d83e519bf4f6"],
  "Details and Options"
 }], "NotesFrameText",ExpressionUUID->
  "45e843a5-a11b-44de-b067-cb845298e430"]],ExpressionUUID->"47ca1bbe-1b09-\
4a45-a7be-9b51593c8d8e"]], "NotesSection",
 ShowGroupOpener->"Thumbnail",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CacheGraphics->False,
 CellID->1467995151,ExpressionUUID->"f31eda8b-57d0-470c-94c9-dab27993f6d4"],

Cell["\<\
The variants are the single deletions, the single substitutions by an \
alphabet character, the single insertions of an alphabet character, and the \
single transpositions of an adjacent pair.\
\>", "Notes",ExpressionUUID->"57dfd4c9-457b-44be-ab6f-04598933c6b1"],

Cell[TextData[{
 "Every variant is at ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["DamerauLevenshteinDistance"]], 
    "paclet:ref/DamerauLevenshteinDistance"},
   "RefLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "d48e7f5f-e474-4b40-9f3a-b0dc64650664"],
 " exactly 1 from the text, and every string at distance 1 whose changed \
character lies in the alphabet is present."
}], "Notes",ExpressionUUID->"43ff283e-ef46-46c8-b3c9-27293d5297fd"],

Cell[TextData[{
 "\"",
 StyleBox["text", "TI"],
 "\" itself is never among the variants, and the result carries no duplicates."
}], "Notes",ExpressionUUID->"fc8f7a8c-7fc0-4946-8e44-d04879225642"],

Cell["\<\
The order is fixed: deletions, then substitutions, then insertions, then \
transpositions, each left to right.\
\>", "Notes",ExpressionUUID->"6de1b7e9-2755-4206-9bdf-1aa6953480e4"],

Cell["\<\
With the default alphabet the neighbourhood is the one reachable without \
introducing a character the text does not already use, which is the right \
space for a transcription slip in a fixed-alphabet string such as a WIF key \
or an address.\
\>", "Notes",ExpressionUUID->"cc6ca096-1081-485a-8448-e3f69915e2d2"],

Cell[TextData[{
 "For a text of length ",
 StyleBox["n", "TI"],
 " over an alphabet of ",
 StyleBox["m", "TI"],
 " characters the neighbourhood has at most ",
 StyleBox["n", "TI"],
 " + ",
 StyleBox["n", "TI"],
 "(",
 StyleBox["m", "TI"],
 " - 1) + (",
 StyleBox["n", "TI"],
 " + 1)",
 StyleBox["m", "TI"],
 " + (",
 StyleBox["n", "TI"],
 " - 1) members, so distance 1 over the 26 lowercase letters is a few hundred \
candidates and distance 1 over the 58-character Base58 alphabet is a few \
thousand."
}], "Notes",ExpressionUUID->"2942ce76-5c52-4c92-817d-45b108863eab"],

Cell["\<\
Distance 2 is the composition of the generator with itself; it is not \
produced directly, because the space grows to millions and is better swept \
than materialised.\
\>", "Notes",ExpressionUUID->"f97782c3-46c7-4d01-ad5c-356fdc98263d"],

Cell["\<\
Anything but a string matches no definition and the call is returned \
unevaluated.\
\>", "Notes",ExpressionUUID->"d113ec05-05b9-4324-9194-0bb34ac6b6de"]
}, Closed]],

Cell["", "PageDelimiter",ExpressionUUID->"2f97462a-c148-4453-be13-e17e123199b8"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[
     MatchQ[
      CurrentValue[
       EvaluationNotebook[], {
       TaggingRules, "Openers", "PrimaryExamplesSection"}, Open], 
      Alternatives[True, Open]], 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
   ImageSizeCache->{
    13.600000000000001`, {4.251494140625001, 9.348505859375}}]],
  ExpressionUUID->"529ca699-7335-40ed-acf7-85d85205a477"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"3432e947-0d1e-4f1c-850e-f9033229f80e"],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(14)", "ExampleCount",ExpressionUUID->
  "38a2286d-75fb-4a88-8a0e-b9e815504e87"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->154882474,ExpressionUUID->"64b2cccc-3306-47a0-ac94-6b2bd71ed6cc"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<WolframInstitute`Puzzles`\>\"", "]"}]], "Input", \
"ExampleInitialization",
 CellLabel->"In[1]:=",
 CellID->1969679695,ExpressionUUID->"eb889e29-7769-4804-9321-05fca6386aa6"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "74a80293-930d-46bd-b093-53998c8d4033"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"35a4eee9-719c-45ff-8dd0-3f579250a9ae"],
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "5b1e3461-9e90-437c-8a7b-55a77f3e7e4d"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->359560354,ExpressionUUID->"dd0f74be-d3a1-446a-93db-83e9008708c5"],

Cell["\<\
The single-edit neighbourhood of a short word, over its own letters:\
\>", "ExampleText",
 CellTags->
  "TextAnnotation",ExpressionUUID->"d1aaaca4-0ccb-40b0-8f70-d99362312232"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"EditVariants", "[", "\"\<abc\>\"", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"4adcca9b-12ab-404e-b1a7-308672e9608f"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"bc\"\>", ",", "\<\"ac\"\>", ",", "\<\"ab\"\>", 
   ",", "\<\"bbc\"\>", ",", "\<\"cbc\"\>", ",", "\<\"aac\"\>", 
   ",", "\<\"acc\"\>", ",", "\<\"aba\"\>", ",", "\<\"abb\"\>", 
   ",", "\<\"aabc\"\>", ",", "\<\"babc\"\>", ",", "\<\"cabc\"\>", 
   ",", "\<\"abbc\"\>", ",", "\<\"acbc\"\>", ",", "\<\"abac\"\>", 
   ",", "\<\"abcc\"\>", ",", "\<\"abca\"\>", ",", "\<\"abcb\"\>", 
   ",", "\<\"bac\"\>", ",", "\<\"acb\"\>"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"6b9bfb70-329b-46d9-b734-bc1987cf5757"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "d5985007-6785-4a64-887d-1562b2a2b3a7"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"e8536ec8-0769-470d-\
8d13-f2b5e36291d1"],

Cell["Over a wider alphabet the neighbourhood is larger:", "ExampleText",ExpressionUUID->"16985270-58e9-4d4e-a736-42bf80f8ecbe"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", 
  RowBox[{"EditVariants", "[", 
   RowBox[{"\"\<abc\>\"", ",", " ", "\"\<abcdefghijklmnopqrstuvwxyz\>\""}], 
   "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"1f53fcff-7e45-4340-8435-fad6583ceab9"],

Cell[BoxData["181"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"03e9854a-e685-49d7-b2bb-f57912afdd47"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "92f2f835-2e1f-4028-ae61-1b4a484ce417"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"54a04f1d-c786-4e77-\
8eb6-14c20707fb0a"],

Cell["Every variant really is one edit away:", "ExampleText",ExpressionUUID->"797c8d2d-be7f-47b7-b4d4-90526718fdb4"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Union", "[", 
  RowBox[{"Map", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"DamerauLevenshteinDistance", "[", 
      RowBox[{"\"\<passphrase\>\"", ",", " ", "#"}], "]"}], " ", "&"}], ",", 
    " ", 
    RowBox[{"EditVariants", "[", "\"\<passphrase\>\"", "]"}]}], "]"}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"3626fc9f-4514-41b9-ab05-58d3e7531221"],

Cell[BoxData[
 RowBox[{"{", "1", "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"705a4c16-e92a-443f-a802-7b22454e5f56"]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "319181ef-a433-4015-9143-48d63b7b5a43"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"2ceb65e9-e19c-4711-845d-252b8eb12a76"],
 "Scope",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(4)", "ExampleCount",ExpressionUUID->
  "4e9ebbcc-bb3a-4b69-89c8-b89e14e6eca7"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1293636265,ExpressionUUID->"83a31622-d724-4806-919f-5f371f5fa02a"],

Cell["A single character has a deletion and the insertions:", "ExampleText",ExpressionUUID->"085f6fd5-457b-4182-9584-cd4930f25a63"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"EditVariants", "[", 
  RowBox[{"\"\<a\>\"", ",", " ", "\"\<ab\>\""}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"d951a9e3-922e-4c1e-bf30-16ef15a49a99"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"\"\>", ",", "\<\"b\"\>", ",", "\<\"aa\"\>", ",", "\<\"ba\"\>", 
   ",", "\<\"ab\"\>"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"35c61223-0c3e-4cbe-be2c-11cfc9b375c2"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "807b74fe-f931-44e6-b30b-9ac67627ea82"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"7458cf99-c465-4012-\
a2ee-18aef5e3dd15"],

Cell[TextData[{
 "An adjacent transposition is part of the neighbourhood, which plain ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["EditDistance"]], "paclet:ref/EditDistance"},
   "RefLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "3407f3ed-5f5a-4a4d-b6ce-e5ba92c823ef"],
 " would count as two edits:"
}], "ExampleText",ExpressionUUID->"2010cfaa-a043-4137-9060-4648dd76f9bc"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MemberQ", "[", 
  RowBox[{
   RowBox[{"EditVariants", "[", "\"\<ab\>\"", "]"}], ",", " ", "\"\<ba\>\""}],
   "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"67e67929-eb1b-4d5a-a257-ff965042b77a"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"1faf80c8-6b86-418b-80ab-afbaebf2cfde"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "f19d3061-768d-4375-8a37-4cb17b2f82e3"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"115ba991-8775-4fbb-\
a292-9d5662bae03c"],

Cell["A Base58 alphabet is the right one for a mistyped key:", "ExampleText",ExpressionUUID->"8d9d403d-d992-460b-a50e-80030302232b"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", 
  RowBox[{"EditVariants", "[", 
   RowBox[{"\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\"", ",", 
    " ", "\"\<123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\>\""}\
], "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"7b19797f-87c8-4097-8d4a-3ed5ea35620d"],

Cell[BoxData["4001"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"9fc08f28-85cd-4a1b-98eb-36aad36e62ad"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "1943daf4-4c19-4427-80a9-b0c1e86824f3"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"fe463c20-efbf-4050-\
a3d6-daf162432577"],

Cell["\<\
Distance 2 is the composition, and its size is why it is not offered directly:\
\>", "ExampleText",ExpressionUUID->"57fa53eb-bba2-420b-a1e2-b11c7c75d0f3"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", 
  RowBox[{"DeleteDuplicates", "[", 
   RowBox[{"Catenate", "[", 
    RowBox[{"Map", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"EditVariants", "[", 
        RowBox[{"#", ",", " ", "\"\<abc\>\""}], "]"}], " ", "&"}], ",", " ", 
      RowBox[{"EditVariants", "[", "\"\<abc\>\"", "]"}]}], "]"}], "]"}], 
   "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"4291f017-0394-4482-b8c1-dd3b75172d1d"],

Cell[BoxData["138"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"db028867-ba1f-4711-85d6-637ad392b9e3"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "99226f84-5494-46d5-ae17-f91795ba8ef2"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"081d5616-9019-4273-942b-ba503880084d"],
 "Applications",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "bded63c5-bb78-4c67-8c9a-a406970d2bd9"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->258228157,ExpressionUUID->"3d0cb325-ab3e-4123-9bbb-a83313766d6a"],

Cell["The neighbourhood feeds straight into a candidate space:", "ExampleText",ExpressionUUID->"d79c8fb3-76a6-470e-b274-135755c0e387"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", 
  RowBox[{"CandidateEnumeration", "[", 
   RowBox[{"EditVariants", "[", 
    RowBox[{"\"\<battery staple\>\"", ",", 
     " ", "\"\<abcdefghijklmnopqrstuvwxyz \>\""}], "]"}], "]"}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"1b7f0706-d2d7-4f33-8203-8c3ce7072ca1"],

Cell[BoxData["780"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"75adc061-987b-4ebe-b6d7-1fd144609faa"]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "7a5422a6-4bba-49be-bf81-9524eb1f766d"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"916fabba-695b-45bc-af77-57a12b633a7d"],
 "Properties & Relations",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "6cb19568-d173-4ce3-8de1-6dba061da4ad"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->2123667759,ExpressionUUID->"f685d5ff-12f5-4547-88dc-ccb4242ca367"],

Cell["\<\
The constructed neighbourhood is exactly the brute-force one over the same \
alphabet:\
\>", "ExampleText",ExpressionUUID->"be2390e7-7b54-4843-b6d5-d565295bda26"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"Sort", "[", 
   RowBox[{"EditVariants", "[", 
    RowBox[{"\"\<ab\>\"", ",", " ", "\"\<ab\>\""}], "]"}], "]"}], " ", "===", 
  " ", 
  RowBox[{"Sort", "[", 
   RowBox[{"Select", "[", 
    RowBox[{
     RowBox[{"Map", "[", 
      RowBox[{"StringJoin", ",", " ", 
       RowBox[{"Catenate", "[", 
        RowBox[{"Map", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"Tuples", "[", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{"\"\<a\>\"", ",", " ", "\"\<b\>\""}], "}"}], ",", " ", 
             "#"}], "]"}], " ", "&"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"1", ",", " ", "2", ",", " ", "3"}], "}"}]}], "]"}], 
        "]"}]}], "]"}], ",", " ", 
     RowBox[{
      RowBox[{
       RowBox[{"DamerauLevenshteinDistance", "[", 
        RowBox[{"\"\<ab\>\"", ",", " ", "#"}], "]"}], " ", "===", " ", "1"}], 
      " ", "&"}]}], "]"}], "]"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"3d9463e5-165c-4a8b-9dc9-467c22ee9e6a"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"f11504d9-d99b-49a0-a7fa-2333612433fb"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "7ce817be-c1e3-41a3-ad54-957d6556f7b3"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"cd8a52aa-779b-4946-\
97bd-7c633cc0e8e5"],

Cell["The text itself is at distance 0, so it is excluded:", "ExampleText",ExpressionUUID->"0140db93-6a03-446f-aa3d-86aa836557fa"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MemberQ", "[", 
  RowBox[{
   RowBox[{"EditVariants", "[", "\"\<passphrase\>\"", "]"}], ",", 
   " ", "\"\<passphrase\>\""}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"b8fc87dd-0631-476a-8064-b42c674b0a44"],

Cell[BoxData["False"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"43e57e65-5060-4e3b-9c84-47598bfa44a6"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "32cc9cd2-f41d-4f17-9d1f-3b161d749638"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"c727f407-232a-420c-\
9214-b8144d6295bb"],

Cell[TextData[{
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["TextVariants"]], 
    "paclet:WolframInstitute/Puzzles/ref/TextVariants", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "9bab14ae-6d21-4f5b-a545-171d24e994c8"],
 " is the other bounded mutation generator, and covers a different kind of \
difference:"
}], "ExampleText",ExpressionUUID->"7a93b478-8405-4f93-a7b4-d340676e557d"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", 
  RowBox[{"TextVariants", "[", "\"\<passphrase\>\"", "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"950191f5-795e-495f-a325-807c5be7b707"],

Cell[BoxData["3"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"4a16236a-7953-4cad-81dc-27f9adf8b15a"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "0f296807-94fc-4642-bcf7-cab6cfffb285"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"3a804fe8-429e-4c41-8627-3ad354c02829"],
 "Possible Issues",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "71a6b2ea-33ac-4e75-82fc-dd0152c71ea2"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1305812373,ExpressionUUID->"33eb0f0c-4b87-49f8-a894-52b6207bbeba"],

Cell["\<\
The default alphabet cannot introduce a character the text does not use, so a \
missing letter is not reachable:\
\>", "ExampleText",ExpressionUUID->"e5a7e518-66bb-40a0-af75-dcb6a0684330"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MemberQ", "[", 
  RowBox[{
   RowBox[{"EditVariants", "[", "\"\<ab\>\"", "]"}], ",", 
   " ", "\"\<azb\>\""}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"adae2910-1781-4321-9264-f4f874ae7d0e"],

Cell[BoxData["False"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"03a57233-91cd-4c1c-8551-f90de8a0a8dc"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "671c8d6b-9a0b-4cb5-a70c-2f6cc9c28722"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"77488e14-3c34-4e72-\
a575-2605ee6db30d"],

Cell["\<\
The empty string has no deletions and no transpositions, only insertions:\
\>", "ExampleText",ExpressionUUID->"7195f6e7-a06e-464c-ab83-a0de09af6ed7"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"EditVariants", "[", 
  RowBox[{"\"\<\>\"", ",", " ", "\"\<ab\>\""}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"812edb79-e90d-4653-a18a-d1e6e36b68af"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"a\"\>", ",", "\<\"b\"\>"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"af2bd75f-8c48-4991-a929-c7af1ee85577"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "86c336dd-0e73-45e5-8dfc-109e79ef9721"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"1f724512-971c-400f-\
ae05-5292fd91d260"],

Cell["A non-string matches no definition:", "ExampleText",ExpressionUUID->"708a5c98-d207-4fcd-bf6c-2541a48cf1bc"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"EditVariants", "[", "12345", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"aba7a9f0-f94a-4dab-a745-e1bd4e8a4083"],

Cell[BoxData[
 RowBox[{"EditVariants", "[", "12345", "]"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"e980f070-854b-4eff-af49-ef3b76d33756"]
}, Open  ]]
}, Open  ]]
}, Closed]]
}, Open  ]],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, 
       "RelatedFunction.png"]]], GridBox[{
      {
       StyleBox[
        RowBox[{"See", " ", "Also"}], "SeeAlsoSection"]},
      {Cell[TextData[{
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["TextVariants"]], 
           "paclet:WolframInstitute/Puzzles/ref/TextVariants", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "7eb0c7d5-2bda-41a7-8b57-af3de08a94fc"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["CandidateEnumeration"]], 
           "paclet:WolframInstitute/Puzzles/ref/CandidateEnumeration", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "b1245e16-c071-4cfc-9e19-fa937e698131"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["CandidateSweep"]], 
           "paclet:WolframInstitute/Puzzles/ref/CandidateSweep", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "c5b74eb6-9c10-40c1-8968-a254c1f267c4"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["DamerauLevenshteinDistance"]], 
           "paclet:ref/DamerauLevenshteinDistance"},
          "RefLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "40135c7a-aef3-4ebe-aaea-b7cf19f3cd5e"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["EditDistance"]], "paclet:ref/EditDistance"},
          "RefLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "d7ad8109-2923-4d36-9fdb-06635d8db005"]
       }], "SeeAlso",ExpressionUUID->"53984cf0-19ab-4c2d-8de3-13fc01b1d21c"]}
     }]}
  }]], "SeeAlsoSection",ExpressionUUID->"ba2ac918-0585-41ae-9673-\
1599a4e9243f"],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, 
       "RelatedGuide.png"]]], GridBox[{
      {
       StyleBox[
        RowBox[{"Related", " ", "Guides"}], "MoreAboutSection"]},
      {
       RowBox[{"\[FilledVerySmallSquare]", Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["Search"]], 
           "paclet:WolframInstitute/Puzzles/guide/Search"},
          "RefLinkPlain",
          BaseStyle->{"MoreAbout"}]], "MoreAbout",ExpressionUUID->
         "c0d04eff-1ef7-4d1b-b9c2-38d3b9e1628f"]}]}
     }]}
  }]], "MoreAboutSection",ExpressionUUID->"106d6021-5c8d-4e97-95e6-\
eb6935a3a1ac"],

Cell[" ", "FooterCell",ExpressionUUID->"6397971f-7411-4510-bfa3-2e9c6eb6ff37"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{900, 830},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
WindowTitle->"EditVariants",
TaggingRules->{
 "ModificationHighlight" -> False, "ColorType" -> "", "LinkTrails" -> "", 
  "ExampleCounter" -> 1, 
  "Openers" -> {
   "PrimaryExamplesSection" -> Open, "ExampleSection" -> {"0" -> Open}, 
    "AllOptsTable" -> Closed}, "NewStyles" -> True, 
  "CitationPopupData" -> $Failed, "ShowCitation" -> False, "HasOptions" -> 
  True, "RootCaptions" -> "", "HeaderCoreAreaLink" -> {}, 
  "Metadata" -> {
   "built" -> "{2026, 8, 27, 0, 11, 32.389536}", 
    "history" -> {"XX", "", "", ""}, "context" -> "WolframInstitute`Puzzles`",
     "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Wolfram Institute/ Puzzles Symbol", "language" -> "en", "paclet" -> 
    "WolframInstitute/Puzzles", "status" -> "None", "summary" -> 
    "PackageLink[EditVariants,paclet : \
WolframInstitute/Puzzles/ref/EditVariants, WolframInstitute/Puzzles Package \
Symbol][text] gives the strings at Damerau-Levenshtein distance 1 from text, \
using the distinct characters of text as the insertion and substitution \
alphabet. PackageLink[EditVariants,paclet : \
WolframInstitute/Puzzles/ref/EditVariants, WolframInstitute/Puzzles Package \
Symbol][text,  alphabet] uses the distinct characters of alphabet instead.", 
    "synonyms" -> {}, "tabletags" -> {}, "title" -> "EditVariants", 
    "titlemodifier" -> "", "metadescription" -> "", "windowtitle" -> 
    "EditVariants", "type" -> "Symbol", "uri" -> 
    "WolframInstitute/Puzzles/ref/EditVariants", "WorkflowDockedCell" -> ""}, 
  "SearchTextTranslated" -> ""},
CellContext->CellGroup,
FrontEndVersion->"15.0 for Mac OS X ARM (64-bit) (May 19, 2026)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "Reference.nb"],
ExpressionUUID->"545eff05-a180-4ab1-b247-0a9a9480c7c1"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "TextAnnotation"->{
  Cell[16250, 438, 186, 4, 70, "ExampleText",ExpressionUUID->"d1aaaca4-0ccb-40b0-8f70-d99362312232",
   CellTags->"TextAnnotation"]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"TextAnnotation", 40140, 1124}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[580, 21, 6232, 152, 70, "AnchorBarGrid",ExpressionUUID->"1c9179a7-15df-44b6-b76a-56e528716814",
 CellID->1],
Cell[6815, 175, 107, 0, 70, "ContextNameCell",ExpressionUUID->"7bea2893-ba2d-447f-a46e-281afbbfea99"],
Cell[CellGroupData[{
Cell[6947, 179, 555, 14, 70, "ObjectNameGrid",ExpressionUUID->"40d71aa0-7f92-4c32-9bda-635e676a2365"],
Cell[7505, 195, 1732, 44, 70, "Usage",ExpressionUUID->"d6c6d4e1-870d-4b63-98bf-376c0b92f2c0"]
}, Open  ]],
Cell[CellGroupData[{
Cell[9274, 244, 1444, 34, 70, "NotesSection",ExpressionUUID->"f31eda8b-57d0-470c-94c9-dab27993f6d4",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->1467995151],
Cell[10721, 280, 272, 4, 70, "Notes",ExpressionUUID->"57dfd4c9-457b-44be-ab6f-04598933c6b1"],
Cell[10996, 286, 544, 14, 70, "Notes",ExpressionUUID->"43ff283e-ef46-46c8-b3c9-27293d5297fd"],
Cell[11543, 302, 195, 4, 70, "Notes",ExpressionUUID->"fc8f7a8c-7fc0-4946-8e44-d04879225642"],
Cell[11741, 308, 190, 3, 70, "Notes",ExpressionUUID->"6de1b7e9-2755-4206-9bdf-1aa6953480e4"],
Cell[11934, 313, 323, 5, 70, "Notes",ExpressionUUID->"cc6ca096-1081-485a-8448-e3f69915e2d2"],
Cell[12260, 320, 571, 20, 70, "Notes",ExpressionUUID->"2942ce76-5c52-4c92-817d-45b108863eab"],
Cell[12834, 342, 247, 4, 70, "Notes",ExpressionUUID->"f97782c3-46c7-4d01-ad5c-356fdc98263d"],
Cell[13084, 348, 163, 3, 70, "Notes",ExpressionUUID->"d113ec05-05b9-4324-9194-0bb34ac6b6de"]
}, Closed]],
Cell[13262, 354, 80, 0, 70, "PageDelimiter",ExpressionUUID->"2f97462a-c148-4453-be13-e17e123199b8"],
Cell[CellGroupData[{
Cell[13367, 358, 1401, 37, 70, "PrimaryExamplesSection",ExpressionUUID->"64b2cccc-3306-47a0-ac94-6b2bd71ed6cc",
 CellID->154882474],
Cell[14771, 397, 216, 4, 70, "Input",ExpressionUUID->"eb889e29-7769-4804-9321-05fca6386aa6",
 CellID->1969679695],
Cell[CellGroupData[{
Cell[15012, 405, 1235, 31, 70, "ExampleSection",ExpressionUUID->"dd0f74be-d3a1-446a-93db-83e9008708c5",
 CellID->359560354],
Cell[16250, 438, 186, 4, 70, "ExampleText",ExpressionUUID->"d1aaaca4-0ccb-40b0-8f70-d99362312232",
 CellTags->"TextAnnotation"],
Cell[CellGroupData[{
Cell[16461, 446, 202, 3, 70, "Input",ExpressionUUID->"4adcca9b-12ab-404e-b1a7-308672e9608f"],
Cell[16666, 451, 562, 9, 70, "Output",ExpressionUUID->"6b9bfb70-329b-46d9-b734-bc1987cf5757"]
}, Open  ]],
Cell[CellGroupData[{
Cell[17265, 465, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"e8536ec8-0769-470d-8d13-f2b5e36291d1"],
Cell[17492, 472, 128, 0, 70, "ExampleText",ExpressionUUID->"16985270-58e9-4d4e-a736-42bf80f8ecbe"],
Cell[CellGroupData[{
Cell[17645, 476, 301, 6, 70, "Input",ExpressionUUID->"1f53fcff-7e45-4340-8435-fad6583ceab9"],
Cell[17949, 484, 109, 1, 70, "Output",ExpressionUUID->"03e9854a-e685-49d7-b2bb-f57912afdd47"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[18107, 491, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"54a04f1d-c786-4e77-8eb6-14c20707fb0a"],
Cell[18334, 498, 116, 0, 70, "ExampleText",ExpressionUUID->"797c8d2d-be7f-47b7-b4d4-90526718fdb4"],
Cell[CellGroupData[{
Cell[18475, 502, 440, 11, 70, "Input",ExpressionUUID->"3626fc9f-4514-41b9-ab05-58d3e7531221"],
Cell[18918, 515, 129, 2, 70, "Output",ExpressionUUID->"705a4c16-e92a-443f-a802-7b22454e5f56"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[19108, 524, 1227, 31, 70, "ExampleSection",ExpressionUUID->"83a31622-d724-4806-919f-5f371f5fa02a",
 CellID->1293636265],
Cell[20338, 557, 131, 0, 70, "ExampleText",ExpressionUUID->"085f6fd5-457b-4182-9584-cd4930f25a63"],
Cell[CellGroupData[{
Cell[20494, 561, 237, 4, 70, "Input",ExpressionUUID->"d951a9e3-922e-4c1e-bf30-16ef15a49a99"],
Cell[20734, 567, 228, 4, 70, "Output",ExpressionUUID->"35c61223-0c3e-4cbe-be2c-11cfc9b375c2"]
}, Open  ]],
Cell[CellGroupData[{
Cell[20999, 576, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"7458cf99-c465-4012-a2ee-18aef5e3dd15"],
Cell[21226, 583, 476, 12, 70, "ExampleText",ExpressionUUID->"2010cfaa-a043-4137-9060-4648dd76f9bc"],
Cell[CellGroupData[{
Cell[21727, 599, 276, 6, 70, "Input",ExpressionUUID->"67e67929-eb1b-4d5a-a257-ff965042b77a"],
Cell[22006, 607, 110, 1, 70, "Output",ExpressionUUID->"1faf80c8-6b86-418b-80ab-afbaebf2cfde"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[22165, 614, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"115ba991-8775-4fbb-a292-9d5662bae03c"],
Cell[22392, 621, 132, 0, 70, "ExampleText",ExpressionUUID->"8d9d403d-d992-460b-a50e-80030302232b"],
Cell[CellGroupData[{
Cell[22549, 625, 367, 7, 70, "Input",ExpressionUUID->"7b19797f-87c8-4097-8d4a-3ed5ea35620d"],
Cell[22919, 634, 110, 1, 70, "Output",ExpressionUUID->"9fc08f28-85cd-4a1b-98eb-36aad36e62ad"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[23078, 641, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"fe463c20-efbf-4050-a3d6-daf162432577"],
Cell[23305, 648, 164, 2, 70, "ExampleText",ExpressionUUID->"57fa53eb-bba2-420b-a1e2-b11c7c75d0f3"],
Cell[CellGroupData[{
Cell[23494, 654, 500, 12, 70, "Input",ExpressionUUID->"4291f017-0394-4482-b8c1-dd3b75172d1d"],
Cell[23997, 668, 109, 1, 70, "Output",ExpressionUUID->"db028867-ba1f-4711-85d6-637ad392b9e3"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[24167, 676, 1233, 31, 70, "ExampleSection",ExpressionUUID->"3d0cb325-ab3e-4123-9bbb-a83313766d6a",
 CellID->258228157],
Cell[25403, 709, 134, 0, 70, "ExampleText",ExpressionUUID->"d79c8fb3-76a6-470e-b274-135755c0e387"],
Cell[CellGroupData[{
Cell[25562, 713, 367, 8, 70, "Input",ExpressionUUID->"1b7f0706-d2d7-4f33-8203-8c3ce7072ca1"],
Cell[25932, 723, 109, 1, 70, "Output",ExpressionUUID->"75adc061-987b-4ebe-b6d7-1fd144609faa"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[26090, 730, 1244, 31, 70, "ExampleSection",ExpressionUUID->"f685d5ff-12f5-4547-88dc-ccb4242ca367",
 CellID->2123667759],
Cell[27337, 763, 172, 3, 70, "ExampleText",ExpressionUUID->"be2390e7-7b54-4843-b6d5-d565295bda26"],
Cell[CellGroupData[{
Cell[27534, 770, 1070, 29, 70, "Input",ExpressionUUID->"3d9463e5-165c-4a8b-9dc9-467c22ee9e6a"],
Cell[28607, 801, 110, 1, 70, "Output",ExpressionUUID->"f11504d9-d99b-49a0-a7fa-2333612433fb"]
}, Open  ]],
Cell[CellGroupData[{
Cell[28754, 807, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"cd8a52aa-779b-4946-97bd-7c633cc0e8e5"],
Cell[28981, 814, 130, 0, 70, "ExampleText",ExpressionUUID->"0140db93-6a03-446f-aa3d-86aa836557fa"],
Cell[CellGroupData[{
Cell[29136, 818, 293, 6, 70, "Input",ExpressionUUID->"b8fc87dd-0631-476a-8064-b42c674b0a44"],
Cell[29432, 826, 111, 1, 70, "Output",ExpressionUUID->"43e57e65-5060-4e3b-9c84-47598bfa44a6"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[29592, 833, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"c727f407-232a-420c-9214-b8144d6295bb"],
Cell[29819, 840, 545, 14, 70, "ExampleText",ExpressionUUID->"7a93b478-8405-4f93-a7b4-d340676e557d"],
Cell[CellGroupData[{
Cell[30389, 858, 242, 4, 70, "Input",ExpressionUUID->"950191f5-795e-495f-a325-807c5be7b707"],
Cell[30634, 864, 107, 1, 70, "Output",ExpressionUUID->"4a16236a-7953-4cad-81dc-27f9adf8b15a"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[30802, 872, 1237, 31, 70, "ExampleSection",ExpressionUUID->"33eb0f0c-4b87-49f8-a894-52b6207bbeba",
 CellID->1305812373],
Cell[32042, 905, 198, 3, 70, "ExampleText",ExpressionUUID->"e5a7e518-66bb-40a0-af75-dcb6a0684330"],
Cell[CellGroupData[{
Cell[32265, 912, 278, 6, 70, "Input",ExpressionUUID->"adae2910-1781-4321-9264-f4f874ae7d0e"],
Cell[32546, 920, 111, 1, 70, "Output",ExpressionUUID->"03a57233-91cd-4c1c-8551-f90de8a0a8dc"]
}, Open  ]],
Cell[CellGroupData[{
Cell[32694, 926, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"77488e14-3c34-4e72-a575-2605ee6db30d"],
Cell[32921, 933, 159, 2, 70, "ExampleText",ExpressionUUID->"7195f6e7-a06e-464c-ab83-a0de09af6ed7"],
Cell[CellGroupData[{
Cell[33105, 939, 236, 4, 70, "Input",ExpressionUUID->"812edb79-e90d-4653-a18a-d1e6e36b68af"],
Cell[33344, 945, 168, 3, 70, "Output",ExpressionUUID->"af2bd75f-8c48-4991-a929-c7af1ee85577"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[33561, 954, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"1f724512-971c-400f-ae05-5292fd91d260"],
Cell[33788, 961, 113, 0, 70, "ExampleText",ExpressionUUID->"708a5c98-d207-4fcd-bf6c-2541a48cf1bc"],
Cell[CellGroupData[{
Cell[33926, 965, 196, 3, 70, "Input",ExpressionUUID->"aba7a9f0-f94a-4dab-a745-e1bd4e8a4083"],
Cell[34125, 970, 149, 2, 70, "Output",ExpressionUUID->"e980f070-854b-4eff-af49-ef3b76d33756"]
}, Open  ]]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[34325, 978, 2978, 79, 70, "SeeAlsoSection",ExpressionUUID->"ba2ac918-0585-41ae-9673-1599a4e9243f"],
Cell[37306, 1059, 692, 19, 70, "MoreAboutSection",ExpressionUUID->"106d6021-5c8d-4e97-95e6-eb6935a3a1ac"],
Cell[38001, 1080, 78, 0, 70, "FooterCell",ExpressionUUID->"6397971f-7411-4510-bfa3-2e9c6eb6ff37"]
}
]
*)

(* End of internal cache information *)

