(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 48698, 1316] NotebookOptionsPosition[ 46201, 1232] NotebookOutlinePosition[ 46684, 1251] CellTagsIndexPosition[ 46641, 1248] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell["Marcel D\[EAcute]l\[EGrave]ze", "Text"], Cell[CellGroupData[{ Cell["\<\ SUDOKU, avec \[EAcute]tapes interm\[EAcute]diaires\ \>", "Subtitle"], Cell[CellGroupData[{ Cell["Mode d'emploi", "Subsection"], Cell[TextData[{ "1.\tModifier la grille des donn\[EAcute]es (recopier la grille vierge sur \ la grille de donn\[EAcute]es et entrer les donn\[EAcute]es).\n2.\t\ Ex\[EAcute]cuter le programme ", StyleBox["Mathematica", FontSlant->"Italic"], " (Noyau / Evaluer le cahier).\n3.\tV\[EAcute]rifier que la grille des donn\ \[EAcute]es soit correcte (premi\[EGrave]re grille de la liste des \ r\[EAcute]sultats).\n4.\tPrendre connaissance des r\[EAcute]sultats. Le r\ \[EAcute]sultat final se trouve sur la derni\[EGrave]re ligne.\n\t\ Usuellement, il devrait y avoir une et une seule grille compl\[EGrave]te sur \ la derni\[EGrave]re ligne.\n\tSi la grille sur la derni\[EGrave]re ligne est \ incompl\[EGrave]te (ou les grilles de la derni\[EGrave]re ligne sont incompl\ \[EGrave]tes), le probl\[EGrave]me n'a pas de solution.\n\tSi plusieurs \ grilles compl\[EGrave]tes apparaissent sur la derni\[EGrave]re ligne, il y a \ plusieurs solutions." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Entr\[EAcute]e des donn\[EAcute]es", "Subsection"], Cell["\<\ Grille vierge (\[AGrave] recopier sur la grille \"donnee\" pour entrer une \ nouvelle grille):\ \>", "Text"], Cell[BoxData[ RowBox[{GridBox[{ {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"} }], ";"}]], "Input"], Cell["Grille de donn\[EAcute]es (\[AGrave] remplir):", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"donnee", "=", GridBox[{ {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "9", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "6"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "7", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "1"}, {"\[Placeholder]", "\[Placeholder]", "5", "\[Placeholder]", "2", "8", "3", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "9", "8", "1", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"\[Placeholder]", "7", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "3", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "4", "9", "8", "\[Placeholder]"}, {"\[Placeholder]", "\[Placeholder]", "3", "5", "4", "\[Placeholder]", "6", "\[Placeholder]", "\[Placeholder]"}, {"1", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "3", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}, {"2", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "9", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"} }]}], ";"}]], "Input"], Cell["\<\ Repr\[EAcute]sentation interne des grilles:\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"donnee", "=", RowBox[{"Apply", "[", RowBox[{"sdk", ",", RowBox[{"donnee", "/.", RowBox[{"{", RowBox[{"\[Placeholder]", "\[Rule]", "Null"}], "}"}]}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"sdk", "[", RowBox[{ RowBox[{"{", RowBox[{ "Null", ",", "Null", ",", "Null", ",", "9", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{ "Null", ",", "Null", ",", "Null", ",", "7", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ "Null", ",", "Null", ",", "5", ",", "Null", ",", "2", ",", "8", ",", "3", ",", "Null", ",", "Null"}], "}"}], ",", RowBox[{"{", RowBox[{ "Null", ",", "9", ",", "8", ",", "1", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "Null"}], "}"}], ",", RowBox[{"{", RowBox[{ "Null", ",", "7", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "3", ",", "Null"}], "}"}], ",", RowBox[{"{", RowBox[{ "Null", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "4", ",", "9", ",", "8", ",", "Null"}], "}"}], ",", RowBox[{"{", RowBox[{ "Null", ",", "Null", ",", "3", ",", "5", ",", "4", ",", "Null", ",", "6", ",", "Null", ",", "Null"}], "}"}], ",", RowBox[{"{", RowBox[{ "1", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "3", ",", "Null", ",", "Null", ",", "Null"}], "}"}], ",", RowBox[{"{", RowBox[{ "2", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "9", ",", "Null", ",", "Null", ",", "Null"}], "}"}]}], "]"}]], "Output", CellChangeTimes->{3.4743790529219666`*^9}] }, Open ]], Cell["Affichage d'une grille:", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"affiche", "[", "grille_sdk", "]"}], ":=", RowBox[{ RowBox[{"FrameBox", "[", RowBox[{"GridBox", "[", RowBox[{ RowBox[{ RowBox[{"Apply", "[", RowBox[{"List", ",", "grille"}], "]"}], "/.", RowBox[{"{", RowBox[{"Null", "\[Rule]", "\"\<\[CenterDot]\>\""}], "}"}]}], ",", RowBox[{"RowLines", "\[Rule]", RowBox[{"{", RowBox[{ "False", ",", "False", ",", "True", ",", "False", ",", "False", ",", "True", ",", "False", ",", "False"}], "}"}]}], ",", RowBox[{"ColumnLines", "\[Rule]", RowBox[{"{", RowBox[{ "False", ",", "False", ",", "True", ",", "False", ",", "False", ",", "True", ",", "False", ",", "False"}], "}"}]}]}], "]"}], "]"}], "//", "DisplayForm"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"affiche", "[", "g_List", "]"}], ":=", RowBox[{"Map", "[", RowBox[{"affiche", ",", "g"}], "]"}]}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["R\[EAcute]solution", "Subsection"], Cell[CellGroupData[{ Cell["\<\ D\[EAcute]termination des chiffres possibles\ \>", "Subsubsection"], Cell["\<\ Extractions de lignes, de colonnes et de carr\[EAcute]s:\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"ligne", "[", RowBox[{"grille_sdk", ",", "i_"}], "]"}], ":=", RowBox[{"grille", "[", RowBox[{"[", "i", "]"}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"colonne", "[", RowBox[{"grille_sdk", ",", "j_"}], "]"}], ":=", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"Apply", "[", RowBox[{"List", ",", "grille"}], "]"}], "]"}], "[", RowBox[{"[", "j", "]"}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"carre", "[", RowBox[{"grille_sdk", ",", "i_", ",", "j_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"ib", ",", "jb", ",", "ic", ",", "jc"}], "}"}], ",", RowBox[{ RowBox[{"ib", "=", RowBox[{ RowBox[{"3", RowBox[{"Quotient", "[", RowBox[{ RowBox[{"i", "-", "1"}], ",", "3"}], "]"}]}], "+", "1"}]}], ";", RowBox[{"jb", "=", RowBox[{ RowBox[{"3", RowBox[{"Quotient", "[", RowBox[{ RowBox[{"j", "-", "1"}], ",", "3"}], "]"}]}], "+", "1"}]}], ";", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"grille", "[", RowBox[{"[", RowBox[{ RowBox[{"ib", "+", "ic"}], ",", RowBox[{"jb", "+", "jc"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"ic", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"jc", ",", "0", ",", "2"}], "}"}]}], "]"}], ",", "1"}], "]"}]}]}], "]"}]}]], "Input"], Cell["\<\ Pour une case vide, les chiffres possibles (qu'on pourrait essayer) sont ceux \ qui ne se trouvent ni dans la ligne, ni dans la colonne, ni dans le carr\ \[EAcute]:\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"case", "[", RowBox[{"grille_sdk", ",", "i_", ",", "j_"}], "]"}], ":=", RowBox[{ RowBox[{"grille", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "/;", RowBox[{"IntegerQ", "[", RowBox[{"grille", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"case", "[", RowBox[{"grille_sdk", ",", "i_", ",", "j_"}], "]"}], ":=", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", "9"}], "]"}], ",", RowBox[{"ligne", "[", RowBox[{"grille", ",", "i"}], "]"}], ",", RowBox[{"colonne", "[", RowBox[{"grille", ",", "j"}], "]"}], ",", RowBox[{"carre", "[", RowBox[{"grille", ",", "i", ",", "j"}], "]"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"possible", "[", "grille_sdk", "]"}], ":=", RowBox[{"Apply", "[", RowBox[{"sdk", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"case", "[", RowBox[{"grille", ",", "i", ",", "j"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}]}], ";"}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ R\[EAcute]duction parmi les chiffres possibles\ \>", "Subsubsection"], Cell[TextData[{ StyleBox["R\[EAcute]duction", FontWeight->"Bold"], "\nSi un chiffre possible pour une case n'appara\[IHat]t pas ailleurs dans \ la ligne, alors la case peut se r\[EAcute]duire \[AGrave] ce chiffre;\nSi un \ chiffre possible pour une case n'appara\[IHat]t pas ailleurs dans la colonne, \ alors la case peut se r\[EAcute]duire \[AGrave] ce chiffre;\nSi un chiffre \ possible pour une case n'appara\[IHat]t pas ailleurs dans le carr\[EAcute], \ alors la case peut se r\[EAcute]duire \[AGrave] ce chiffre." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"donnee", "[", RowBox[{"g", ",", "i"}], "]"}], ",", "1", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}]], "Input"], Cell[BoxData["True"], "Output", CellChangeTimes->{3.474379052949967*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"verifie", "[", "g_sdk", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", "j", ",", "k"}], "}"}], ",", RowBox[{"And", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"ligne", "[", RowBox[{"g", ",", "i"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"colonne", "[", RowBox[{"g", ",", "j"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"j", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"g", ",", "2", ",", "2"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"g", ",", "2", ",", "5"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"g", ",", "2", ",", "8"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"g", ",", "5", ",", "2"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"g", ",", "5", ",", "5"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"g", ",", "5", ",", "8"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"g", ",", "8", ",", "2"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"g", ",", "8", ",", "5"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"g", ",", "8", ",", "8"}], "]"}], ",", "k", ",", RowBox[{"{", "1", "}"}]}], "]"}], "<", "2"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}]}], "]"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"reduis", "[", "grille_sdk", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"g", ",", "t", ",", "i", ",", "j"}], "}"}], ",", RowBox[{ RowBox[{"g", "=", "grille"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"g", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], "\[Equal]", "1"}], ",", RowBox[{ RowBox[{"g", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "=", RowBox[{"First", "[", RowBox[{"g", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", "1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "9"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Head", "[", RowBox[{"grille", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], "===", "List"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"t", "=", RowBox[{"Intersection", "[", RowBox[{ RowBox[{"grille", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], ",", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", "9"}], "]"}], ",", RowBox[{"Flatten", "[", RowBox[{"Delete", "[", RowBox[{ RowBox[{"ligne", "[", RowBox[{"grille", ",", "i"}], "]"}], ",", "j"}], "]"}], "]"}]}], "]"}]}], "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "t", "]"}], ">", "0"}], ",", RowBox[{ RowBox[{"g", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "=", RowBox[{"First", "[", "t", "]"}]}]}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", "1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "9"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Head", "[", RowBox[{"grille", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], "===", "List"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"t", "=", RowBox[{"Intersection", "[", RowBox[{ RowBox[{"grille", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], ",", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", "9"}], "]"}], ",", RowBox[{"Flatten", "[", RowBox[{"Delete", "[", RowBox[{ RowBox[{"colonne", "[", RowBox[{"grille", ",", "j"}], "]"}], ",", "i"}], "]"}], "]"}]}], "]"}]}], "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "t", "]"}], ">", "0"}], ",", RowBox[{ RowBox[{"g", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "=", RowBox[{"First", "[", "t", "]"}]}]}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", "1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "9"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Head", "[", RowBox[{"grille", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], "===", "List"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"t", "=", RowBox[{"Intersection", "[", RowBox[{ RowBox[{"grille", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], ",", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", "9"}], "]"}], ",", RowBox[{"Flatten", "[", RowBox[{"Delete", "[", RowBox[{ RowBox[{"carre", "[", RowBox[{"grille", ",", "i", ",", "j"}], "]"}], ",", RowBox[{ RowBox[{"3", " ", RowBox[{"Mod", "[", RowBox[{ RowBox[{"i", "-", "1"}], ",", "3"}], "]"}]}], "+", RowBox[{"Mod", "[", RowBox[{ RowBox[{"j", "-", "1"}], ",", "3"}], "]"}], "+", "1"}]}], "]"}], "]"}]}], "]"}]}], "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "t", "]"}], ">", "0"}], ",", RowBox[{ RowBox[{"g", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "=", RowBox[{"First", "[", "t", "]"}]}]}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", "1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "9"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"sdk", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"IntegerQ", "[", RowBox[{"g", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], ",", RowBox[{"g", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], ",", "Null"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "9"}], "}"}]}], "]"}]}], "]"}]}]}], "]"}]}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ D\[EAcute]termination des grilles qui comportent un chiffre de plus\ \>", "Subsubsection"], Cell["\<\ Tester les impasses. Former la grille suivante, ou plusieurs grilles lorsqu'il y a plusieurs \ possibilit\[EAcute]s, comme suit: *\tchoisir une case pour laquelle la liste des chiffres \[AGrave] essayer est \ de longueur minimale; *\tpour chaque chiffre \[AGrave] essayer, former une grille comportant ce \ chiffre\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"suivant", "[", "grille_sdk", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "p", ",", "e", ",", "n", ",", "nPoss", ",", "i", ",", "j", ",", "k", ",", "li", ",", "lj"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", RowBox[{"Count", "[", RowBox[{"grille", ",", "_Integer", ",", RowBox[{"{", "2", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{"(*", " ", "si", " ", "*)"}], " ", RowBox[{ RowBox[{"n", "\[Equal]", "81"}], ",", RowBox[{"(*", "fini", "*)"}], "\[IndentingNewLine]", "grille", ",", "\[IndentingNewLine]", RowBox[{"(*", " ", "si", " ", "*)"}], " ", RowBox[{ RowBox[{"p", "=", RowBox[{"possible", "[", "grille", "]"}]}], ";", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"p", ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "2", "}"}]}], "]"}], "\[Or]", RowBox[{"Not", "[", RowBox[{"verifie", "[", "grille", "]"}], "]"}]}]}], ",", RowBox[{"(*", " ", "impasse", " ", "*)"}], "\[IndentingNewLine]", RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", "si", " ", "*)"}], " ", RowBox[{ RowBox[{"e", "=", RowBox[{"reduis", "[", "p", "]"}]}], ";", " ", RowBox[{ RowBox[{"Count", "[", RowBox[{"e", ",", "_Integer", ",", RowBox[{"{", "2", "}"}]}], "]"}], ">", "n"}]}], ",", RowBox[{"(*", " ", RowBox[{"un", " ", "seul", " ", "successeur"}], " ", "*)"}], "\[IndentingNewLine]", " ", "e", ",", "\[IndentingNewLine]", RowBox[{"(*", " ", "si", " ", "*)"}], " ", "True", ",", RowBox[{"(*", " ", RowBox[{"plusieurs", " ", "successeurs"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"nPoss", "=", "10"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"1", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{"p", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], "<", "nPoss"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"li", "=", "i"}], ";", RowBox[{"lj", "=", "j"}], ";", RowBox[{"nPoss", "=", RowBox[{"Length", "[", RowBox[{"p", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}]}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", "1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "9"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"ReplacePart", "[", RowBox[{"grille", ",", RowBox[{ RowBox[{"p", "[", RowBox[{"[", RowBox[{"li", ",", "lj"}], "]"}], "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"li", ",", "lj"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "nPoss"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"suivant", "[", "g_List", "]"}], ":=", RowBox[{"Flatten", "[", RowBox[{"Map", "[", RowBox[{"suivant", ",", "g"}], "]"}], "]"}]}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["It\[EAcute]ration", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"avanceQ", "[", "x_sdk", "]"}], ":=", RowBox[{ RowBox[{"Count", "[", RowBox[{"x", ",", "_Integer", ",", RowBox[{"{", "2", "}"}]}], "]"}], "<", "81"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"avanceQ", "[", "x_List", "]"}], ":=", RowBox[{"Apply", "[", RowBox[{"Or", ",", RowBox[{"Map", "[", RowBox[{"avanceQ", ",", "x"}], "]"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"resous", "[", "grille_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "acc"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "=", "grille"}], ";", RowBox[{"acc", "=", RowBox[{"{", "x", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"avanceQ", "[", "x", "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "=", RowBox[{"suivant", "[", "x", "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"UnsameQ", "[", RowBox[{"x", ",", RowBox[{"{", "}"}]}], "]"}], ",", RowBox[{"AppendTo", "[", RowBox[{"acc", ",", "x"}], "]"}]}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", "acc"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"r", "=", RowBox[{"resous", "[", "donnee", "]"}]}], ";"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Length", "[", "r", "]"}]], "Input"], Cell[BoxData["11"], "Output", CellChangeTimes->{3.474379053097967*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"TableForm", "[", RowBox[{"affiche", "[", "r", "]"}], "]"}]], "Input"], Cell[BoxData[ TagBox[ TagBox[GridBox[{ { TagBox[ FrameBox[GridBox[{ {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "9", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "6"}, {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "7", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "1"}, {"\[CenterDot]", "\[CenterDot]", "5", "\[CenterDot]", "2", "8", "3", "\[CenterDot]", "\[CenterDot]"}, {"\[CenterDot]", "9", "8", "1", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]"}, {"\[CenterDot]", "7", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "3", "\[CenterDot]"}, {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "4", "9", "8", "\[CenterDot]"}, {"\[CenterDot]", "\[CenterDot]", "3", "5", "4", "\[CenterDot]", "6", "\[CenterDot]", "\[CenterDot]"}, {"1", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "3", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]"}, {"2", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "9", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "9", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "6"}, {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "7", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "1"}, {"\[CenterDot]", "1", "5", "4", "2", "8", "3", "\[CenterDot]", "\[CenterDot]"}, {"\[CenterDot]", "9", "8", "1", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "6", "\[CenterDot]"}, {"\[CenterDot]", "7", "\[CenterDot]", "\[CenterDot]", "9", "\[CenterDot]", "1", "3", "\[CenterDot]"}, {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "3", "\[CenterDot]", "4", "9", "8", "\[CenterDot]"}, {"\[CenterDot]", "8", "3", "5", "4", "\[CenterDot]", "6", "\[CenterDot]", "\[CenterDot]"}, {"1", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "3", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]"}, {"2", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "9", "\[CenterDot]", "\[CenterDot]", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "9", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "6"}, {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "7", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "1"}, {"6", "1", "5", "4", "2", "8", "3", "\[CenterDot]", "\[CenterDot]"}, {"3", "9", "8", "1", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "6", "\[CenterDot]"}, {"\[CenterDot]", "7", "\[CenterDot]", "8", "9", "\[CenterDot]", "1", "3", "\[CenterDot]"}, {"\[CenterDot]", "\[CenterDot]", "1", "3", "\[CenterDot]", "4", "9", "8", "\[CenterDot]"}, {"\[CenterDot]", "8", "3", "5", "4", "\[CenterDot]", "6", "\[CenterDot]", "\[CenterDot]"}, {"1", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "3", "\[CenterDot]", "\[CenterDot]", "8"}, {"2", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "9", "\[CenterDot]", "\[CenterDot]", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "9", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "6"}, {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "7", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "1"}, {"6", "1", "5", "4", "2", "8", "3", "\[CenterDot]", "\[CenterDot]"}, {"3", "9", "8", "1", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "6", "\[CenterDot]"}, {"\[CenterDot]", "7", "\[CenterDot]", "8", "9", "\[CenterDot]", "1", "3", "\[CenterDot]"}, {"5", "\[CenterDot]", "1", "3", "\[CenterDot]", "4", "9", "8", "\[CenterDot]"}, {"\[CenterDot]", "8", "3", "5", "4", "\[CenterDot]", "6", "\[CenterDot]", "\[CenterDot]"}, {"1", "\[CenterDot]", "\[CenterDot]", "2", "\[CenterDot]", "3", "\[CenterDot]", "\[CenterDot]", "8"}, {"2", "\[CenterDot]", "\[CenterDot]", "6", "8", "9", "\[CenterDot]", "\[CenterDot]", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "9", "1", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "6"}, {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "7", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "1"}, {"6", "1", "5", "4", "2", "8", "3", "\[CenterDot]", "\[CenterDot]"}, {"3", "9", "8", "1", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "6", "\[CenterDot]"}, {"4", "7", "\[CenterDot]", "8", "9", "\[CenterDot]", "1", "3", "\[CenterDot]"}, {"5", "\[CenterDot]", "1", "3", "\[CenterDot]", "4", "9", "8", "\[CenterDot]"}, {"\[CenterDot]", "8", "3", "5", "4", "1", "6", "\[CenterDot]", "\[CenterDot]"}, {"1", "\[CenterDot]", "\[CenterDot]", "2", "7", "3", "\[CenterDot]", "\[CenterDot]", "8"}, {"2", "\[CenterDot]", "\[CenterDot]", "6", "8", "9", "\[CenterDot]", "1", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"\[CenterDot]", "3", "\[CenterDot]", "9", "1", "5", "\[CenterDot]", "\[CenterDot]", "6"}, {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "7", "3", "\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "1"}, {"6", "1", "5", "4", "2", "8", "3", "\[CenterDot]", "\[CenterDot]"}, {"3", "9", "8", "1", "5", "7", "\[CenterDot]", "6", "4"}, {"4", "7", "\[CenterDot]", "8", "9", "\[CenterDot]", "1", "3", "\[CenterDot]"}, {"5", "\[CenterDot]", "1", "3", "6", "4", "9", "8", "7"}, {"\[CenterDot]", "8", "3", "5", "4", "1", "6", "\[CenterDot]", "\[CenterDot]"}, {"1", "\[CenterDot]", "\[CenterDot]", "2", "7", "3", "\[CenterDot]", "\[CenterDot]", "8"}, {"2", "\[CenterDot]", "\[CenterDot]", "6", "8", "9", "\[CenterDot]", "1", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"\[CenterDot]", "3", "\[CenterDot]", "9", "1", "5", "\[CenterDot]", "\[CenterDot]", "6"}, {"\[CenterDot]", "\[CenterDot]", "\[CenterDot]", "7", "3", "6", "\[CenterDot]", "\[CenterDot]", "1"}, {"6", "1", "5", "4", "2", "8", "3", "7", "9"}, {"3", "9", "8", "1", "5", "7", "2", "6", "4"}, {"4", "7", "6", "8", "9", "2", "1", "3", "5"}, {"5", "2", "1", "3", "6", "4", "9", "8", "7"}, {"\[CenterDot]", "8", "3", "5", "4", "1", "6", "\[CenterDot]", "\[CenterDot]"}, {"1", "6", "\[CenterDot]", "2", "7", "3", "\[CenterDot]", "\[CenterDot]", "8"}, {"2", "\[CenterDot]", "\[CenterDot]", "6", "8", "9", "\[CenterDot]", "1", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"\[CenterDot]", "3", "\[CenterDot]", "9", "1", "5", "\[CenterDot]", "\[CenterDot]", "6"}, {"\[CenterDot]", "4", "\[CenterDot]", "7", "3", "6", "\[CenterDot]", "\[CenterDot]", "1"}, {"6", "1", "5", "4", "2", "8", "3", "7", "9"}, {"3", "9", "8", "1", "5", "7", "2", "6", "4"}, {"4", "7", "6", "8", "9", "2", "1", "3", "5"}, {"5", "2", "1", "3", "6", "4", "9", "8", "7"}, {"7", "8", "3", "5", "4", "1", "6", "\[CenterDot]", "2"}, {"1", "6", "\[CenterDot]", "2", "7", "3", "\[CenterDot]", "\[CenterDot]", "8"}, {"2", "5", "\[CenterDot]", "6", "8", "9", "7", "1", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"8", "3", "7", "9", "1", "5", "\[CenterDot]", "\[CenterDot]", "6"}, {"9", "4", "\[CenterDot]", "7", "3", "6", "\[CenterDot]", "\[CenterDot]", "1"}, {"6", "1", "5", "4", "2", "8", "3", "7", "9"}, {"3", "9", "8", "1", "5", "7", "2", "6", "4"}, {"4", "7", "6", "8", "9", "2", "1", "3", "5"}, {"5", "2", "1", "3", "6", "4", "9", "8", "7"}, {"7", "8", "3", "5", "4", "1", "6", "9", "2"}, {"1", "6", "9", "2", "7", "3", "\[CenterDot]", "\[CenterDot]", "8"}, {"2", "5", "4", "6", "8", "9", "7", "1", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"8", "3", "7", "9", "1", "5", "4", "2", "6"}, {"9", "4", "2", "7", "3", "6", "8", "\[CenterDot]", "1"}, {"6", "1", "5", "4", "2", "8", "3", "7", "9"}, {"3", "9", "8", "1", "5", "7", "2", "6", "4"}, {"4", "7", "6", "8", "9", "2", "1", "3", "5"}, {"5", "2", "1", "3", "6", "4", "9", "8", "7"}, {"7", "8", "3", "5", "4", "1", "6", "9", "2"}, {"1", "6", "9", "2", "7", "3", "\[CenterDot]", "\[CenterDot]", "8"}, {"2", "5", "4", "6", "8", "9", "7", "1", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]}, { TagBox[ FrameBox[GridBox[{ {"8", "3", "7", "9", "1", "5", "4", "2", "6"}, {"9", "4", "2", "7", "3", "6", "8", "5", "1"}, {"6", "1", "5", "4", "2", "8", "3", "7", "9"}, {"3", "9", "8", "1", "5", "7", "2", "6", "4"}, {"4", "7", "6", "8", "9", "2", "1", "3", "5"}, {"5", "2", "1", "3", "6", "4", "9", "8", "7"}, {"7", "8", "3", "5", "4", "1", "6", "9", "2"}, {"1", "6", "9", "2", "7", "3", "5", "4", "8"}, {"2", "5", "4", "6", "8", "9", "7", "1", "3"} }, GridBoxDividers->{ "Columns" -> { False, False, False, True, False, False, True, False, {False}, False}, "ColumnsIndexed" -> {}, "Rows" -> { False, False, False, True, False, False, True, False, {False}, False}, "RowsIndexed" -> {}}]], DisplayForm]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], Function[BoxForm`e$, TableForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.474379053111967*^9}] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{963, 647}, WindowMargins->{{80, Automatic}, {Automatic, 1}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, PrintingOptions->{"PrintingMargins"->{{72, 36}, {36, 36}}}, ShowSelection->True, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[568, 21, 45, 0, 29, "Text"], Cell[CellGroupData[{ Cell[638, 25, 78, 2, 49, "Subtitle"], Cell[CellGroupData[{ Cell[741, 31, 35, 0, 36, "Subsection"], Cell[779, 33, 956, 16, 137, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[1772, 54, 56, 0, 36, "Subsection"], Cell[1831, 56, 118, 3, 29, "Text"], Cell[1952, 61, 1675, 29, 148, "Input"], Cell[3630, 92, 62, 0, 29, "Text"], Cell[3695, 94, 1391, 26, 148, "Input"], Cell[5089, 122, 67, 2, 29, "Text"], Cell[CellGroupData[{ Cell[5181, 128, 222, 7, 31, "Input"], Cell[5406, 137, 1535, 39, 107, "Output"] }, Open ]], Cell[6956, 179, 39, 0, 29, "Text"], Cell[6998, 181, 841, 22, 72, "Input"], Cell[7842, 205, 149, 4, 31, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[8028, 214, 40, 0, 36, "Subsection"], Cell[CellGroupData[{ Cell[8093, 218, 77, 2, 28, "Subsubsection"], Cell[8173, 222, 80, 2, 29, "Text"], Cell[8256, 226, 173, 5, 31, "Input"], Cell[8432, 233, 275, 8, 31, "Input"], Cell[8710, 243, 1116, 34, 52, "Input"], Cell[9829, 279, 188, 4, 29, "Text"], Cell[10020, 285, 359, 11, 31, "Input"], Cell[10382, 298, 474, 13, 31, "Input"], Cell[10859, 313, 462, 14, 31, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[11358, 332, 79, 2, 28, "Subsubsection"], Cell[11440, 336, 534, 9, 83, "Text"], Cell[CellGroupData[{ Cell[11999, 349, 402, 12, 31, "Input"], Cell[12404, 363, 73, 1, 30, "Output"] }, Open ]], Cell[12492, 367, 6173, 165, 332, "Input"], Cell[18668, 534, 6738, 185, 352, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[25443, 724, 100, 2, 28, "Subsubsection"], Cell[25546, 728, 338, 8, 83, "Text"], Cell[25887, 738, 3532, 87, 332, "Input"], Cell[29422, 827, 185, 5, 31, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[29644, 837, 42, 0, 28, "Subsubsection"], Cell[29689, 839, 213, 6, 31, "Input"], Cell[29905, 847, 210, 6, 31, "Input"], Cell[30118, 855, 873, 24, 112, "Input"], Cell[30994, 881, 106, 3, 31, "Input"], Cell[CellGroupData[{ Cell[31125, 888, 59, 1, 31, "Input"], Cell[31187, 891, 71, 1, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[31295, 897, 96, 2, 31, "Input"], Cell[31394, 901, 14755, 325, 1640, "Output"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)