(* 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[     25858,        654]
NotebookOptionsPosition[     21708,        575]
NotebookOutlinePosition[     23793,        622]
CellTagsIndexPosition[     23750,        619]
WindowTitle->QuagmireSolve
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->
           "5175ff55-93f7-4551-879e-442a2328e284"], 
          TemplateBox[{8},
           "Spacer1"]}]],
         TextAlignment->Center,ExpressionUUID->
         "1fadb5a8-6f55-420d-99bd-0226930d0396"],
        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->
           "b45ca7c1-0055-4e0c-90fc-1a3c787e5d87"]
         }],ExpressionUUID->"fdedad83-4015-43f8-a76a-93bcf9cb397e"],
         StripOnInput->False],{
        StyleBox[
          "\"VigenereSolve\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/VigenereSolve"], 
         StyleBox[
          "\"VigenereCipher\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/VigenereCipher"], 
         StyleBox[
          "\"KeyedAlphabet\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/KeyedAlphabet"], 
         StyleBox["\"BifidSolve\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BifidSolve"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"SeeAlso"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "3625e32e-bded-4203-8817-647bcb13f963"],
     "\[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->
           "6727b4c0-0e2e-46dd-b679-988a8bc067ca"]
         }],ExpressionUUID->"668f0cc5-a72b-4bd1-a607-1a2f069275f2"],
         StripOnInput->False],{
        "\"Search\"" :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/guide/Search"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"MoreAbout"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "7c3d8ddd-85ba-44fe-af12-ef651b0d9d8b"],
     "\[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->
           "a22119e6-07e4-4990-bfeb-442c05f5edb5"]
         }],ExpressionUUID->"91a4dd88-affe-4e81-939e-bc1219fd3426"],
         StripOnInput->False],{
        "\"WolframInstitute/Puzzles/ref/QuagmireSolve\"" :> None, 
         "\"Copy Wolfram Documentation Center URL\"" :> 
         CopyToClipboard["WolframInstitute/Puzzles/ref/QuagmireSolve"], 
         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/QuagmireSolve.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/QuagmireSolve" <> ".html"], 
              None}]}]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"URLMenu"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "a373f998-801b-4402-a9cf-f77a9c99a304"]
    }], "AnchorBar",
     CacheGraphics->False,ExpressionUUID->
     "bbe84c4f-34cf-439e-ad44-0dfda1227c77"]}
  }]], "AnchorBarGrid",
 CellID->1,ExpressionUUID->"5241a85b-5e3c-4a79-b9ca-c13d69be4173"],

Cell["WolframInstitute`Puzzles`", "ContextNameCell",ExpressionUUID->"6217ff2e-a134-4579-a75d-133f05c7d240"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {Cell[TextData[{
     Cell[
     "QuagmireSolve", "ObjectName",ExpressionUUID->
      "09738bbc-4433-49cd-96d7-cd7e11a90093"],
     Cell[BoxData[
      TemplateBox[{8},
       "Spacer1"]],ExpressionUUID->"6d991b48-fa91-4dd1-b57c-3f8720cdb725"],
     Cell[BoxData[
     ""], "ObjectNameTranslation",ExpressionUUID->
      "0878a38c-58d7-4711-b834-12e902b58a56"]
    }],ExpressionUUID->"14eada13-a921-446b-87c2-0accc2a5e026"], 
    "\[SpanFromLeft]"}
  }]], "ObjectNameGrid",ExpressionUUID->"1ffdc1b6-9873-4e3d-bebd-\
ca6a79ab2eb6"],

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["QuagmireSolve"]], 
         "paclet:WolframInstitute/Puzzles/ref/QuagmireSolve", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       StyleBox["text", "TI"], "]"}]], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "133e2106-bfff-4eb5-b241-cefa36f28a7e"],
     "\[LineSeparator]",
     "recovers a periodic Quagmire cipher - a ",
     Cell[BoxData[
      TemplateBox[{
        Cell[
         TextData["VigenereCipher"]], 
        "paclet:WolframInstitute/Puzzles/ref/VigenereCipher", 
        "WolframInstitute/Puzzles Package Symbol"},
       "PackageLink",
       BaseStyle->"InlineFormula"]], "InlineFormula",
      FontFamily->"Source Sans Pro",ExpressionUUID->
      "44a5e58f-6441-439c-9fe0-944a81e87b3f"],
     " over a mixed (keyed) alphabet - from ciphertext alone, giving an \
Association with the best ",
     Cell[BoxData["\"\<Plaintext\>\""], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "86a82d36-6a63-49e5-a481-7380bc93dea4"],
     ", ",
     Cell[BoxData["\"\<Alphabet\>\""], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "e33aae29-6298-4306-8478-1990b5945051"],
     ", ",
     Cell[BoxData["\"\<Offsets\>\""], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "77d4db9e-4ca7-4ad7-8451-3f1777a8c29d"],
     ", ",
     Cell[BoxData["\"\<Period\>\""], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "4f3914be-df16-4e7f-95cf-ae42bbc2b407"],
     ", ",
     Cell[BoxData["\"\<Variant\>\""], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "1b969650-9f99-4a46-8e7d-36164a82a6a8"],
     " and ",
     Cell[BoxData["\"\<Score\>\""], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "6efc13f8-a637-4977-8d4f-b7e8d32a0048"],
     "."
    }],ExpressionUUID->"60317c63-dc81-4cd4-8479-80b4fb3c9fa6"]}
  }]], "Usage",ExpressionUUID->"788e79ea-33a6-4dd7-9cfe-1a439850c5d6"]
}, 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->"091dc020-8c97-494a-8f8d-dbd7a2792379"],
  Cell[BoxData[
   TemplateBox[{1},
    "Spacer1"]],ExpressionUUID->"1ca69e97-8b02-4654-abe8-f873934d291b"],
  "Details and Options"
 }], "NotesFrameText",ExpressionUUID->
  "08df7e96-5423-4514-9bc5-29714040f906"]],ExpressionUUID->"e6c1e25c-7251-\
4f13-9997-6b5cd3b1f1a7"]], "NotesSection",
 ShowGroupOpener->"Thumbnail",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CacheGraphics->False,
 CellID->426370180,ExpressionUUID->"a3b1baed-d582-4714-85db-dd25cfe4debd"],

Cell[TextData[{
 "Unlike a plain Vigenere, a Quagmire scrambles the tableau through a keyed \
alphabet, so recovering the period is not enough - the 26-letter mixed \
alphabet has to be found too. ",
 Cell[BoxData["QuagmireSolve"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "6ff2d97e-1832-4dac-988d-a927d53bcee2"],
 " hill-climbs that alphabet on quadgram fitness while choosing each column's \
offset by its best monogram fit, through the LibraryLink C accelerator (",
 Cell["LibraryResources/Source/wlqcrack.c", "InlineCode",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "2277409e-730d-491e-9c09-cbd9d15c96e6"],
 ")."
}], "Notes",ExpressionUUID->"b9e1941c-fee4-4565-87f8-fba88b24a286"],

Cell[TextData[{
 "Because a keyword-derived alphabet is the usual case, the search is ",
 StyleBox["seeded", "TI"],
 " from keyed alphabets rather than started at random. The option ",
 Cell[BoxData["\<\"Keywords\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "464f4c9f-8c3f-449a-85c2-153182596cf7"],
 " gives the seeds - a list of words (each turned into a ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["KeyedAlphabet"]], 
    "paclet:WolframInstitute/Puzzles/ref/KeyedAlphabet", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "842918b9-5d92-4a49-a412-954e99008838"],
 ") or ready-made 26-letter alphabets. Automatic uses a small built-in list; \
pass ",
 Cell[BoxData[
  RowBox[{"WordList", "[", "]"}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "ad7b13bd-b3b4-4d71-bcd5-56b779d0e155"],
 " for an exhaustive dictionary search."
}], "Notes",ExpressionUUID->"86b2366c-dd91-4104-9816-baa2b1b7f21d"],

Cell[TextData[{
 "The option ",
 Cell[BoxData["\<\"Variant\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "c9482cc9-05b8-48c0-a1fe-6f230d5307d7"],
 " selects 1 (Quagmire I: plaintext keyed, ciphertext straight), 2 (Quagmire \
II: the reverse) or 3 (Quagmire III: both keyed, as in Kryptos K1/K2), or \
Automatic to try all three."
}], "Notes",ExpressionUUID->"5735e329-5235-4fac-9721-af5298b35b04"],

Cell[TextData[{
 Cell[BoxData["\<\"Period\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "9761e706-eb33-4946-8bbe-50661498c2b8"],
 " (Automatic tries 3 through 12) sets the key period, ",
 Cell[BoxData["\<\"Restarts\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "1a0fd36b-56a2-4c67-8372-250c34e148f2"],
 " adds random restarts beyond the seeds, and ",
 Cell[BoxData["\<\"Iterations\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "d1748764-b1b2-40cf-959d-d3d59b94d82a"],
 " sets the hill-climb length."
}], "Notes",ExpressionUUID->"966bde3a-b7db-4b65-a3c0-6eb3023a7fa9"]
}, Closed]],

Cell["", "PageDelimiter",ExpressionUUID->"a638fae8-3a5f-453f-b5c8-ffc63a51a215"],

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->"b67e6a12-6443-41ea-8d2b-c420a759d8be"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"1d0e83a2-6f68-4dc6-aae5-224eccaa0c08"],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "7c097fdb-e104-4025-bc8b-6a520651ad4d"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1998168868,ExpressionUUID->"2b0a8bb5-c576-49eb-b92e-6f512f5cfdfd"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<WolframInstitute`Puzzles`\>\"", "]"}]], "Input", \
"ExampleInitialization",
 CellLabel->"In[1]:=",
 CellID->1969679695,ExpressionUUID->"faaa1d02-6b56-4a5b-b525-dd625ade74cd"],

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->
  "24d8470f-f072-4848-9193-631a828ad92b"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"899e744e-7077-4c0a-b014-2315cf7d2dda"],
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "f63f5d53-540f-40bc-be2c-613817fdf5dd"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->874892690,ExpressionUUID->"0dc97b9d-d5d8-43e8-885f-fb49ac8b0d99"],

Cell["\<\
Recover a Quagmire III (the Kryptos arrangement) with only its keyword as a \
hint:\
\>", "ExampleText",ExpressionUUID->"4f35de4f-1e3f-47f6-8932-752a0b431414"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{
  "pt", " ", "=", 
   " ", "\"\<\
THEQUICKBROWNFOXJUMPSOVERTHELAZYDOGWHILETHENUANCEOFILLUSIONBETWEENSUBTLESHADIN\
GANDTHEABSENCEOFLIGHTLIESTHETRUTHOFTHEMATTERINPLAINVIEW\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"ct", " ", "=", " ", 
   RowBox[{"VigenereCipher", "[", 
    RowBox[{
    "pt", ",", " ", "\"\<MELON\>\"", ",", " ", "\"\<Encrypt\>\"", ",", " ", 
     RowBox[{"\"\<PlaintextAlphabet\>\"", " ", "->", " ", 
      RowBox[{"KeyedAlphabet", "[", "\"\<KRYPTOS\>\"", "]"}]}], ",", " ", 
     RowBox[{"\"\<CiphertextAlphabet\>\"", " ", "->", " ", 
      RowBox[{"KeyedAlphabet", "[", "\"\<KRYPTOS\>\"", "]"}]}]}], "]"}]}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"QuagmireSolve", "[", 
    RowBox[{"ct", ",", " ", 
     RowBox[{"\"\<Period\>\"", " ", "->", " ", "5"}], ",", " ", 
     RowBox[{"\"\<Variant\>\"", " ", "->", " ", "3"}], ",", " ", 
     RowBox[{"\"\<Keywords\>\"", " ", "->", " ", 
      RowBox[{"{", "\"\<KRYPTOS\>\"", "}"}]}]}], "]"}], 
   "[", "\"\<Plaintext\>\"", "]"}], " ", "===", " ", "pt"}]}], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"5ee71966-8c50-46b3-b993-9a2bb45e1b5f"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"01ce626a-fbc3-42b4-9d89-6276f3a17a9e"]
}, Open  ]]
}, Open  ]]
}, 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["VigenereSolve"]], 
           "paclet:WolframInstitute/Puzzles/ref/VigenereSolve", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "89221f6d-d7ae-4d5e-ac19-51d42aab1a35"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["VigenereCipher"]], 
           "paclet:WolframInstitute/Puzzles/ref/VigenereCipher", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "93643942-e5bd-404e-81e0-10963a5c7370"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["KeyedAlphabet"]], 
           "paclet:WolframInstitute/Puzzles/ref/KeyedAlphabet", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "8796aa96-3349-4992-9cab-18b663a64dc7"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BifidSolve"]], 
           "paclet:WolframInstitute/Puzzles/ref/BifidSolve", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "7f1dc56e-77f3-4d0a-a818-c68a6f5ab22d"]
       }], "SeeAlso",ExpressionUUID->"370fd770-60c8-48ab-a11a-dd688d7d1dda"]}
     }]}
  }]], "SeeAlsoSection",ExpressionUUID->"86907c89-fb27-4004-adc5-\
5a71f108f810"],

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->
         "ffab57f2-38a0-484d-ad6f-d0da4a173c31"]}]}
     }]}
  }]], "MoreAboutSection",ExpressionUUID->"a6688c34-b6f1-4802-aa2e-\
cd59c05cdd0a"],

Cell[" ", "FooterCell",ExpressionUUID->"c0b7b1b7-cfa7-4852-912f-933212894b95"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{900, 830},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
WindowTitle->"QuagmireSolve",
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, 47.299077}", 
    "history" -> {"XX", "", "", ""}, "context" -> "WolframInstitute`Puzzles`",
     "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Wolfram Institute/ Puzzles Symbol", "language" -> "en", "paclet" -> 
    "WolframInstitute/Puzzles", "status" -> "None", "summary" -> 
    "PackageLink[QuagmireSolve,paclet : \
WolframInstitute/Puzzles/ref/QuagmireSolve, WolframInstitute/Puzzles Package \
Symbol][text] recovers a periodic Quagmire cipher - a \
PackageLink[VigenereCipher, paclet : \
WolframInstitute/Puzzles/ref/VigenereCipher, WolframInstitute/Puzzles Package \
Symbol] over a mixed (keyed) alphabet - from ciphertext alone, giving an \
Association with the best Plaintext, Alphabet, Offsets, Period, Variant and \
Score.", "synonyms" -> {}, "tabletags" -> {}, "title" -> "QuagmireSolve", 
    "titlemodifier" -> "", "metadescription" -> "", "windowtitle" -> 
    "QuagmireSolve", "type" -> "Symbol", "uri" -> 
    "WolframInstitute/Puzzles/ref/QuagmireSolve", "WorkflowDockedCell" -> ""},
   "SearchTextTranslated" -> ""},
CellContext->CellGroup,
FrontEndVersion->"15.0 for Mac OS X ARM (64-bit) (May 19, 2026)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "Reference.nb"],
ExpressionUUID->"dacfd958-1abf-4c5c-9f9f-ef00c6c8ad85"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[581, 21, 5588, 138, 70, "AnchorBarGrid",ExpressionUUID->"5241a85b-5e3c-4a79-b9ca-c13d69be4173",
 CellID->1],
Cell[6172, 161, 107, 0, 70, "ContextNameCell",ExpressionUUID->"6217ff2e-a134-4579-a75d-133f05c7d240"],
Cell[CellGroupData[{
Cell[6304, 165, 556, 14, 70, "ObjectNameGrid",ExpressionUUID->"1ffdc1b6-9873-4e3d-bebd-ca6a79ab2eb6"],
Cell[6863, 181, 2402, 60, 70, "Usage",ExpressionUUID->"788e79ea-33a6-4dd7-9cfe-1a439850c5d6"]
}, Open  ]],
Cell[CellGroupData[{
Cell[9302, 246, 1443, 34, 70, "NotesSection",ExpressionUUID->"a3b1baed-d582-4714-85db-dd25cfe4debd",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->426370180],
Cell[10748, 282, 746, 14, 70, "Notes",ExpressionUUID->"b9e1941c-fee4-4565-87f8-fba88b24a286"],
Cell[11497, 298, 1138, 27, 70, "Notes",ExpressionUUID->"86b2366c-dd91-4104-9816-baa2b1b7f21d"],
Cell[12638, 327, 453, 9, 70, "Notes",ExpressionUUID->"5735e329-5235-4fac-9721-af5298b35b04"],
Cell[13094, 338, 735, 16, 70, "Notes",ExpressionUUID->"966bde3a-b7db-4b65-a3c0-6eb3023a7fa9"]
}, Closed]],
Cell[13844, 357, 80, 0, 70, "PageDelimiter",ExpressionUUID->"a638fae8-3a5f-453f-b5c8-ffc63a51a215"],
Cell[CellGroupData[{
Cell[13949, 361, 1401, 37, 70, "PrimaryExamplesSection",ExpressionUUID->"2b0a8bb5-c576-49eb-b92e-6f512f5cfdfd",
 CellID->1998168868],
Cell[15353, 400, 216, 4, 70, "Input",ExpressionUUID->"faaa1d02-6b56-4a5b-b525-dd625ade74cd",
 CellID->1969679695],
Cell[CellGroupData[{
Cell[15594, 408, 1235, 31, 70, "ExampleSection",ExpressionUUID->"0dc97b9d-d5d8-43e8-885f-fb49ac8b0d99",
 CellID->874892690],
Cell[16832, 441, 169, 3, 70, "ExampleText",ExpressionUUID->"4f35de4f-1e3f-47f6-8932-752a0b431414"],
Cell[CellGroupData[{
Cell[17026, 448, 1201, 27, 70, "Input",ExpressionUUID->"5ee71966-8c50-46b3-b993-9a2bb45e1b5f"],
Cell[18230, 477, 110, 1, 70, "Output",ExpressionUUID->"01ce626a-fbc3-42b4-9d89-6276f3a17a9e"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[18379, 483, 2549, 67, 70, "SeeAlsoSection",ExpressionUUID->"86907c89-fb27-4004-adc5-5a71f108f810"],
Cell[20931, 552, 692, 19, 70, "MoreAboutSection",ExpressionUUID->"a6688c34-b6f1-4802-aa2e-cd59c05cdd0a"],
Cell[21626, 573, 78, 0, 70, "FooterCell",ExpressionUUID->"c0b7b1b7-cfa7-4852-912f-933212894b95"]
}
]
*)

(* End of internal cache information *)

