(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 12.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 43325, 1173] NotebookOptionsPosition[ 41124, 1124] NotebookOutlinePosition[ 41466, 1139] CellTagsIndexPosition[ 41423, 1136] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[TextData[StyleBox["k-means (after Lloyd1957)", FontColor->RGBColor[1, 0, 0]]], "Subsubsection", CellChangeTimes->{{3.868246565233054*^9, 3.868246587004671*^9}, { 3.8692235736204863`*^9, 3.869223587215283*^9}, {3.8692236940462437`*^9, 3.869223696029348*^9}, {3.8697155515611396`*^9, 3.8697155542316585`*^9}},ExpressionUUID->"a7e919c3-a0a3-4e22-87ae-\ 8bc9957aab4c"], Cell[CellGroupData[{ Cell[TextData[Cell[BoxData[{ RowBox[{ RowBox[{ StyleBox["Input", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"data", " ", "set", " ", StyleBox["\[ScriptCapitalA]", FontColor->RGBColor[0, 0, 1]]}], " ", "\[Subset]", " ", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"concatenation", " ", "of", " ", "centers", " ", "CC"}], ";", " ", RowBox[{ RowBox[{"Using", " ", "LS", " ", "distance"}], "-", RowBox[{"like", " ", "function"}]}], ";"}], FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ StyleBox["Output", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"Vector", " ", "a"}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"concatenation", " ", "of", " ", "optimal", " ", StyleBox["c", FontColor->RGBColor[0, 0, 1]]}], "enters"}], FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"objective", " ", "function", " ", "value"}], ";"}], FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]", StyleBox[ RowBox[{ RowBox[{"If", " ", "Ind"}], "\[NotEqual]", RowBox[{ "0", "then", " ", "the", " ", "intermediate", " ", "steps", " ", "and", " ", "results", " ", "are", " ", "shown"}]}], FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", RowBox[{ StyleBox["Submodules", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"Fmin", "[", "]"}], FontColor->RGBColor[0, 0, 1]]}]}], "Text", CellChangeTimes->{{3.8208938752340946`*^9, 3.8208939165097227`*^9}, 3.8208939777537127`*^9, {3.82089402908541*^9, 3.8208940654953437`*^9}, { 3.820894178610306*^9, 3.8208942451936073`*^9}, {3.820894336841039*^9, 3.8208943606992674`*^9}, {3.8222252468201857`*^9, 3.8222252579121275`*^9}, {3.8222263768275585`*^9, 3.8222264735149126`*^9}, {3.8222267120062532`*^9, 3.8222267137917337`*^9}, 3.8222268123848886`*^9, {3.8223097789208064`*^9, 3.822309786698867*^9}}, FontSize-> 12,ExpressionUUID->"77035e17-b449-4b54-8a81-633c20b55192"]], "Subsection", CellChangeTimes->{{3.868246254366021*^9, 3.8682462755903225`*^9}, { 3.8690250273395615`*^9, 3.869025042552888*^9}, {3.8690251065488477`*^9, 3.8690251608816423`*^9}, {3.8690252701815977`*^9, 3.8690253041100616`*^9}, { 3.869025338348714*^9, 3.869025367855494*^9}, {3.8690254160584574`*^9, 3.869025451124421*^9}, {3.8690257613911047`*^9, 3.8690259124606857`*^9}, { 3.8690260429489784`*^9, 3.8690260783487635`*^9}, {3.8690261091553082`*^9, 3.86902611662175*^9}, {3.8690261500525312`*^9, 3.8690261500525312`*^9}, { 3.8692238122505145`*^9, 3.869223814172742*^9}, {3.8692240092192554`*^9, 3.869224074852889*^9}, {3.86922411960163*^9, 3.869224188242962*^9}, { 3.8692242408008556`*^9, 3.8692242430647197`*^9}, {3.8692243024510727`*^9, 3.8692243029859285`*^9}, {3.869462822966714*^9, 3.8694629480014563`*^9}},ExpressionUUID->"1e469795-d260-48ff-9ce6-\ 569b8da61807"], Cell[BoxData[ RowBox[{ RowBox[{"kMeansLoyd", "[", RowBox[{"A_", ",", "CC_", ",", "Ind_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"m", "=", RowBox[{"Length", "[", "A", "]"}]}], ",", RowBox[{"k", "=", RowBox[{"Length", "[", "CC", "]"}]}], ",", RowBox[{"it", "=", "0"}], ",", " ", RowBox[{"IT", "=", "50"}], ",", RowBox[{"cen", "=", "CC"}], ",", "a", ",", "C1", ",", "n1", ",", RowBox[{"eps", "=", "0.005"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"F0", "=", RowBox[{"Fmin", "[", RowBox[{"A", ",", "CC"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Blue", ",", "14"}], "]"}], ",", RowBox[{"Style", "[", RowBox[{"it", ",", "Blue", ",", "14"}], "]"}], ",", "\"\<: CC=\>\"", ",", RowBox[{"CC", "//", "N"}], ",", "\"\<; Fmin(CC)=\>\"", ",", RowBox[{"F0", "//", "N"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"it", "=", RowBox[{"it", "+", "1"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"a", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "A", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Norm", "[", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "-", RowBox[{"cen", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "<", " ", RowBox[{"Norm", "[", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "-", RowBox[{"cen", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}]}], "]"}]}], ",", RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "j"}]}], "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"i", ",", "m"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", "\t\t\t", RowBox[{"(*", " ", RowBox[{"Determining", " ", "the", " ", "new", " ", "center"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"C1", "=", RowBox[{"n1", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"C1", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"C1", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}], "+", RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"n1", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"n1", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}], "+", "1"}]}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"i", ",", "m"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"C1", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{ RowBox[{"C1", "[", RowBox[{"[", "j", "]"}], "]"}], "/", RowBox[{"n1", "[", RowBox[{"[", "j", "]"}], "]"}]}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"F1", "=", RowBox[{ RowBox[{"Fmin", "[", RowBox[{"A", ",", "C1"}], "]"}], "//", "N"}]}], ";", "\[IndentingNewLine]", RowBox[{"Err", "=", RowBox[{ RowBox[{"(", RowBox[{"F0", "-", "F1"}], ")"}], "/", "F0"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Ind", "\[NotEqual]", "0"}], ",", RowBox[{"Print", "[", RowBox[{"it", ",", "\"\<. C1=\>\"", ",", RowBox[{"C1", "//", "N"}], ",", "\"\<; Fmin=\>\"", ",", "F1", ",", "\"\<; Err = \>\"", ",", "Err"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"Err", ">", "eps"}], " ", "&&", " ", RowBox[{"it", "<", "IT"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"cen", "=", "C1"}], ";", RowBox[{"F0", "=", "F1"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"a", ",", "C1", ",", "F1", ",", "it"}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.869224298278249*^9, 3.8692243272590322`*^9}, { 3.8692293681571045`*^9, 3.869229368938336*^9}, {3.8692294613539467`*^9, 3.869229462073348*^9}, 3.869715570989431*^9},ExpressionUUID->"b66c8dbf-f21d-4e4a-801b-\ 36ad5a1cce48"] }, Open ]], Cell[CellGroupData[{ Cell["Example", "Section", CellChangeTimes->{{3.8692243385106626`*^9, 3.869224346991825*^9}},ExpressionUUID->"2dc7f864-19ba-40a4-b917-\ 793924649555"], Cell[CellGroupData[{ Cell["Modules", "Subsubsection", CellChangeTimes->{{3.869229237805785*^9, 3.8692292444386983`*^9}},ExpressionUUID->"9e6fbe29-51c7-4274-8bc7-\ 0c7b96144507"], Cell[BoxData[{ RowBox[{ RowBox[{"Needs", "[", "\"\\"", "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"kMeansLoyd", "[", RowBox[{"A_", ",", "CC_", ",", "Ind_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"m", "=", RowBox[{"Length", "[", "A", "]"}]}], ",", RowBox[{"k", "=", RowBox[{"Length", "[", "CC", "]"}]}], ",", RowBox[{"it", "=", "0"}], ",", " ", RowBox[{"IT", "=", "50"}], ",", RowBox[{"cen", "=", "CC"}], ",", "a", ",", "C1", ",", "n1", ",", RowBox[{"eps", "=", "0.005"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"F0", "=", RowBox[{"Fmin", "[", RowBox[{"A", ",", "CC"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Blue", ",", "14"}], "]"}], ",", RowBox[{"Style", "[", RowBox[{"it", ",", "Blue", ",", "14"}], "]"}], ",", "\"\<: CC=\>\"", ",", RowBox[{"CC", "//", "N"}], ",", "\"\<; Fmin(CC)=\>\"", ",", RowBox[{"F0", "//", "N"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"it", "=", RowBox[{"it", "+", "1"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"a", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "A", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Norm", "[", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "-", RowBox[{"cen", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "<", " ", RowBox[{"Norm", "[", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "-", RowBox[{"cen", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}]}], "]"}]}], ",", RowBox[{ RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "j"}]}], "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"i", ",", "m"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", "\t\t\t", RowBox[{"(*", " ", RowBox[{"Determining", " ", "the", " ", "new", " ", "center"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"C1", "=", RowBox[{"n1", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"C1", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"C1", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}], "+", RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"n1", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"n1", "[", RowBox[{"[", RowBox[{"a", "[", RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}], "+", "1"}]}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"i", ",", "m"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"C1", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{ RowBox[{"C1", "[", RowBox[{"[", "j", "]"}], "]"}], "/", RowBox[{"n1", "[", RowBox[{"[", "j", "]"}], "]"}]}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"F1", "=", RowBox[{ RowBox[{"Fmin", "[", RowBox[{"A", ",", "C1"}], "]"}], "//", "N"}]}], ";", "\[IndentingNewLine]", RowBox[{"Err", "=", RowBox[{ RowBox[{"(", RowBox[{"F0", "-", "F1"}], ")"}], "/", "F0"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Ind", "\[NotEqual]", "0"}], ",", RowBox[{"Print", "[", RowBox[{"it", ",", "\"\<. C1=\>\"", ",", RowBox[{"C1", "//", "N"}], ",", "\"\<; Fmin=\>\"", ",", "F1", ",", "\"\<; Err = \>\"", ",", "Err"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"Err", ">", "eps"}], " ", "&&", " ", RowBox[{"it", "<", "IT"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"cen", "=", "C1"}], ";", RowBox[{"F0", "=", "F1"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"a", ",", "C1", ",", "F1", ",", "it"}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Fmin", "[", RowBox[{"A_", ",", "c_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"m", "=", RowBox[{"Length", "[", "A", "]"}]}], ",", RowBox[{"k", "=", RowBox[{"Length", "[", "c", "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Sum", "[", RowBox[{ RowBox[{"Min", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Norm", "[", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], "-", RowBox[{"c", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "m"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.8130666982373514`*^9, 3.813066705794552*^9}, { 3.813066767254447*^9, 3.813066777883563*^9}, {3.866784231104415*^9, 3.866784231511183*^9}, {3.8667843998530054`*^9, 3.8667844006492405`*^9}, { 3.8692244345804415`*^9, 3.8692244363308425`*^9}, {3.8692244781910667`*^9, 3.8692245168097115`*^9}, {3.869224558944442*^9, 3.8692245602190685`*^9}, { 3.8692292045222235`*^9, 3.8692292064756765`*^9}, {3.869229265024296*^9, 3.8692292675557547`*^9}, {3.8692293421681557`*^9, 3.869229343370677*^9}, { 3.8692294739645996`*^9, 3.869229474510635*^9}, 3.869715599128451*^9}, CellLabel->"In[1]:=",ExpressionUUID->"929fe0ab-2073-4be7-9d39-e89f4c29852d"] }, Closed]], Cell[CellGroupData[{ Cell["Data1", "Subsubsection", CellChangeTimes->{{3.869229228884322*^9, 3.8692292329484425`*^9}, 3.8692742402214675`*^9},ExpressionUUID->"75432bb8-8f47-4598-b645-\ 6f7b8e2e1750"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"A", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "8"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CC", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "4"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"AG", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "10"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vor0", "=", RowBox[{"DiagramPlot", "[", "CC", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "Blue", ",", "14"}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"slCC", "=", RowBox[{"ListPlot", "[", RowBox[{"CC", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"PointSize", "[", ".06", "]"}], ",", RowBox[{"Opacity", "[", ".5", "]"}]}], "}"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Show", "[", RowBox[{ RowBox[{"ListPlot", "[", RowBox[{"A", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"PointSize", "[", ".02", "]"}], "}"}]}]}], "]"}], ",", "slCC", ",", "vor0", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"PlotRange", "\[Rule]", "AG"}], ",", RowBox[{"ImageSize", "\[Rule]", "Small"}]}], "]"}], "]"}]}], "Input", CellChangeTimes->{{3.869274313976087*^9, 3.8692743149602194`*^9}, { 3.8697157092008934`*^9, 3.869715709841365*^9}}, CellLabel->"In[4]:=",ExpressionUUID->"a6051c36-3a02-4c05-a023-8e3c8b4c28d5"], Cell[CellGroupData[{ Cell[BoxData[ StyleBox["\<\"Data set A, Initial centers and the Voronoi diagram:\"\>", StripOnInput->False, LineColor->RGBColor[0, 0, 1], FrontFaceColor->RGBColor[0, 0, 1], BackFaceColor->RGBColor[0, 0, 1], GraphicsColor->RGBColor[0, 0, 1], FontSize->14, FontColor->RGBColor[0, 0, 1]]], "Print", CellChangeTimes->{3.869224399146058*^9, 3.8692292185368156`*^9, 3.8692292506896043`*^9, 3.869274220843408*^9, 3.8692743191302013`*^9, 3.869274380998042*^9, 3.869715738505043*^9}, CellLabel-> "During evaluation of \ In[4]:=",ExpressionUUID->"d73b60cd-f694-4aaf-915a-544b18de2a63"], Cell[BoxData[ GraphicsBox[{{{}, { {RGBColor[0.368417, 0.506779, 0.709798], PointSize[0.02], AbsoluteThickness[1.6], PointBox[{{1., 9.}, {2., 9.}, {2., 6.}, {1., 3.}, {5., 3.}, {6., 4.}, { 4., 6.}, {7., 7.}, {8., 6.}, {9., 8.}}]}, { {RGBColor[0.368417, 0.506779, 0.709798], PointSize[0.02], AbsoluteThickness[1.6]}, {}}, { {RGBColor[0.368417, 0.506779, 0.709798], PointSize[0.02], AbsoluteThickness[1.6]}, {}}}, {{}, {}}}, {{}, { {RGBColor[1, 0, 0], PointSize[0.06], AbsoluteThickness[1.6], Opacity[ 0.5], PointBox[{{2., 6.}, {5., 4.}, {6., 4.}}]}, { {RGBColor[1, 0, 0], PointSize[0.06], AbsoluteThickness[1.6], Opacity[ 0.5]}, {}}, { {RGBColor[1, 0, 0], PointSize[0.06], AbsoluteThickness[1.6], Opacity[ 0.5]}, {}}}, {{}, {}}}, {{InsetBox["1", {2, 6}], InsetBox["2", {5, 4}], InsetBox["3", {6, 4}]}, {PointSize[0.012], PointBox[NCache[{Rational[11, 2], 8}, {5.5, 8}]]}, {Thickness[0.003], LineBox[NCache[{{Rational[11, 2], 8}, {Rational[3, 2], 2}}, {{5.5, 8}, { 1.5, 2}}]], LineBox[NCache[{{Rational[11, 2], 8}, {Rational[15, 2], 12}}, {{ 5.5, 8}, {7.5, 12}}]], LineBox[NCache[{{Rational[11, 2], 8}, {Rational[11, 2], 3}}, {{5.5, 8}, { 5.5, 3}}]], LineBox[NCache[{{Rational[11, 2], 8}}, {{5.5, 8}}]], LineBox[NCache[{{Rational[11, 2], 8}}, {{5.5, 8}}]], LineBox[NCache[{{Rational[11, 2], 8}}, {{5.5, 8}}]]}}}, AspectRatio->Automatic, Axes->{True, True}, AxesLabel->{None, None}, AxesOrigin->{0, 0}, DisplayFunction->Identity, Frame->True, FrameLabel->{{None, None}, {None, None}}, FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}}, GridLines->Automatic, GridLinesStyle->Directive[ GrayLevel[0.5, 0.4]], ImageSize->Small, Method->{ "OptimizePlotMarkers" -> True, "CoordinatesToolOptions" -> {"DisplayFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& ), "CopiedValueFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& )}}, PlotRange->{{0, 10}, {0, 10}}, PlotRangeClipping->True, PlotRangePadding->{{ Scaled[0.02], Scaled[0.02]}, { Scaled[0.02], Scaled[0.05]}}, Ticks->{Automatic, Automatic}]], "Print", CellChangeTimes->{3.869224399146058*^9, 3.8692292185368156`*^9, 3.8692292506896043`*^9, 3.869274220843408*^9, 3.8692743191302013`*^9, 3.869274380998042*^9, 3.8697157388955994`*^9}, CellLabel-> "During evaluation of \ In[4]:=",ExpressionUUID->"32cf4eca-189d-4369-a964-dfd599a4f5ae"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Data2", "Subsubsection", CellChangeTimes->{{3.869229228884322*^9, 3.8692292329484425`*^9}, { 3.8692742402214675`*^9, 3.8692742570794506`*^9}},ExpressionUUID->"de68dd97-537c-4473-8bdb-\ ba933b1840e4"], Cell[BoxData[{ RowBox[{"SeedRandom", "[", "13", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"m", "=", "200"}], ";", " ", RowBox[{"k", "=", "5"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"A", "=", RowBox[{"RandomReal", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"m", ",", "2"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CC", "=", RowBox[{"RandomReal", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "2"}], "}"}]}], "]"}]}], ";"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "Blue", ",", "14"}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"AG", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "10"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vor0", "=", RowBox[{"DiagramPlot", "[", "CC", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"slCC", "=", RowBox[{"ListPlot", "[", RowBox[{"CC", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"PointSize", "[", ".06", "]"}], ",", RowBox[{"Opacity", "[", ".5", "]"}]}], "}"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Show", "[", RowBox[{ RowBox[{"ListPlot", "[", RowBox[{"A", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"PointSize", "[", ".02", "]"}], "}"}]}]}], "]"}], ",", "slCC", ",", "vor0", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"PlotRange", "\[Rule]", "AG"}], ",", RowBox[{"ImageSize", "\[Rule]", "Small"}]}], "]"}], "]"}]}], "Input", CellChangeTimes->{{3.869715753857461*^9, 3.8697157550438786`*^9}},ExpressionUUID->"6ce949b9-aa20-46e6-8f27-\ da729884f64f"] }, Closed]], Cell[CellGroupData[{ Cell["Execution", "Subsubsection", CellChangeTimes->{{3.8692292750949564`*^9, 3.8692292818621416`*^9}},ExpressionUUID->"54f1c360-4113-4dec-81b0-\ 8bb541a922b6"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"Ind", "=", "0"}], ";", RowBox[{"km", "=", RowBox[{"kMeansLoyd", "[", RowBox[{"A", ",", "CC", ",", "Ind"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Print", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Blue", ",", "14"}], "]"}], ",", RowBox[{"Style", "[", RowBox[{ RowBox[{"km", "[", RowBox[{"[", "4", "]"}], "]"}], ",", "Blue", ",", "14"}], "]"}], ",", RowBox[{"Style", "[", RowBox[{"\"\<. Optimal centroids:\\n\>\"", ",", "Blue", ",", "14"}], "]"}], ",", RowBox[{ RowBox[{"km", "[", RowBox[{"[", "2", "]"}], "]"}], "//", "N"}], ",", RowBox[{"Style", "[", RowBox[{ "\"\<\\nObjective LS-function value = \>\"", ",", "Blue", ",", "14"}], "]"}], ",", RowBox[{ RowBox[{"km", "[", RowBox[{"[", "3", "]"}], "]"}], "//", "N"}]}], "]"}], ";"}], "\[IndentingNewLine]", "\t\t\t\t", RowBox[{"(*", " ", RowBox[{"Optimal", " ", "partition", " ", "PI1"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"PI1", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", RowBox[{"km", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Do", "[", "\[IndentingNewLine]", "\t", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"km", "[", RowBox[{"[", RowBox[{"1", ",", "i"}], "]"}], "]"}], "\[Equal]", "j"}], ",", RowBox[{ RowBox[{"PI1", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{"Append", "[", RowBox[{ RowBox[{"PI1", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}]}], "]"}]}]}], "]"}], " ", "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", RowBox[{"km", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "A", "]"}]}], "}"}]}], "]"}], ";"}], "\[IndentingNewLine]", "\t\t\t\t\t", RowBox[{"(*", " ", "Figure", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"boja", "=", RowBox[{"{", RowBox[{ "Blue", ",", "Green", ",", "Brown", ",", "Red", ",", "Yellow", ",", "Orange", ",", "Purple"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vor1", "=", RowBox[{"DiagramPlot", "[", RowBox[{"km", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"slC1", "=", RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"km", "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"PointSize", "[", ".06", "]"}], ",", RowBox[{"Opacity", "[", ".5", "]"}]}], "}"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"ListPlot", "[", RowBox[{"PI1", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"PointSize", "[", ".035", "]"}], "}"}]}]}], "]"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Show", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"PI1", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"boja", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"PointSize", "[", ".035", "]"}]}], "}"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", RowBox[{"km", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", "slC1", ",", "vor1", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"PlotRange", "\[Rule]", "AG"}], ",", RowBox[{"ImageSize", "\[Rule]", "Small"}]}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Ind", "\[NotEqual]", "0"}], ",", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "PI1"}], "]"}]}], "]"}]}], "Input", CellChangeTimes->{{3.869229503452603*^9, 3.869229562956674*^9}, 3.8697158006479588`*^9},ExpressionUUID->"7e05e433-cbfe-46d3-af75-\ 46bcf868a2e3"], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{ StyleBox["\<\"it \"\>", StripOnInput->False, LineColor->RGBColor[0, 0, 1], FrontFaceColor->RGBColor[0, 0, 1], BackFaceColor->RGBColor[0, 0, 1], GraphicsColor->RGBColor[0, 0, 1], FontSize->14, FontColor->RGBColor[0, 0, 1]], "\[InvisibleSpace]", StyleBox["0", StripOnInput->False, LineColor->RGBColor[0, 0, 1], FrontFaceColor->RGBColor[0, 0, 1], BackFaceColor->RGBColor[0, 0, 1], GraphicsColor->RGBColor[0, 0, 1], FontSize->14, FontColor->RGBColor[0, 0, 1]], "\[InvisibleSpace]", "\<\": CC=\"\>", "\[InvisibleSpace]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2.`", ",", "6.`"}], "}"}], ",", RowBox[{"{", RowBox[{"5.`", ",", "4.`"}], "}"}], ",", RowBox[{"{", RowBox[{"6.`", ",", "4.`"}], "}"}]}], "}"}], "\[InvisibleSpace]", "\<\"; Fmin(CC)=\"\>", "\[InvisibleSpace]", "77.`"}], SequenceForm[ Style["it ", RGBColor[0, 0, 1], 14], Style[0, RGBColor[0, 0, 1], 14], ": CC=", {{2., 6.}, {5., 4.}, {6., 4.}}, "; Fmin(CC)=", 77.], Editable->False]], "Print", CellChangeTimes->{ 3.869224530344666*^9, 3.869229285861294*^9, {3.8692295337090535`*^9, 3.86922956550424*^9}, 3.869274220859029*^9, 3.8692743400979824`*^9, 3.869274383974195*^9}, CellLabel-> "During evaluation of \ In[51]:=",ExpressionUUID->"f5ea6b5a-05c6-4dfc-8de6-714d631cf8e9"], Cell[BoxData[ InterpretationBox[ RowBox[{ StyleBox["\<\"it \"\>", StripOnInput->False, LineColor->RGBColor[0, 0, 1], FrontFaceColor->RGBColor[0, 0, 1], BackFaceColor->RGBColor[0, 0, 1], GraphicsColor->RGBColor[0, 0, 1], FontSize->14, FontColor->RGBColor[0, 0, 1]], "\[InvisibleSpace]", StyleBox["3", StripOnInput->False, LineColor->RGBColor[0, 0, 1], FrontFaceColor->RGBColor[0, 0, 1], BackFaceColor->RGBColor[0, 0, 1], GraphicsColor->RGBColor[0, 0, 1], FontSize->14, FontColor->RGBColor[0, 0, 1]], "\[InvisibleSpace]", StyleBox["\<\". Optimal centroids:\\n\"\>", StripOnInput->False, LineColor->RGBColor[0, 0, 1], FrontFaceColor->RGBColor[0, 0, 1], BackFaceColor->RGBColor[0, 0, 1], GraphicsColor->RGBColor[0, 0, 1], FontSize->14, FontColor->RGBColor[0, 0, 1]], "\[InvisibleSpace]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2.`", ",", "6.6`"}], "}"}], ",", RowBox[{"{", RowBox[{"5.5`", ",", "3.5`"}], "}"}], ",", RowBox[{"{", RowBox[{"8.`", ",", "7.`"}], "}"}]}], "}"}], "\[InvisibleSpace]", StyleBox["\<\"\\nObjective LS-function value = \"\>", StripOnInput->False, LineColor->RGBColor[0, 0, 1], FrontFaceColor->RGBColor[0, 0, 1], BackFaceColor->RGBColor[0, 0, 1], GraphicsColor->RGBColor[0, 0, 1], FontSize->14, FontColor->RGBColor[0, 0, 1]], "\[InvisibleSpace]", "36.2`"}], SequenceForm[ Style["it ", RGBColor[0, 0, 1], 14], Style[3, RGBColor[0, 0, 1], 14], Style[". Optimal centroids:\n", RGBColor[0, 0, 1], 14], {{2., 6.6}, {5.5, 3.5}, {8., 7.}}, Style["\nObjective LS-function value = ", RGBColor[0, 0, 1], 14], 36.2], Editable->False]], "Print", CellChangeTimes->{ 3.869224530344666*^9, 3.869229285861294*^9, {3.8692295337090535`*^9, 3.86922956550424*^9}, 3.869274220859029*^9, 3.8692743400979824`*^9, 3.869274383974195*^9}, CellLabel-> "During evaluation of \ In[51]:=",ExpressionUUID->"ae6f5d0d-1a6e-49ad-9ee5-4d9abfdb29ef"], Cell[BoxData[ GraphicsBox[{{{}, { {RGBColor[0, 0, 1], PointSize[0.035], AbsoluteThickness[1.6], PointBox[{{1., 9.}, {2., 9.}, {2., 6.}, {1., 3.}, {4., 6.}}]}, { {RGBColor[0, 0, 1], PointSize[0.035], AbsoluteThickness[1.6]}, {}}, { {RGBColor[0, 0, 1], PointSize[0.035], AbsoluteThickness[ 1.6]}, {}}}, {{}, {}}}, {{}, { {RGBColor[0, 1, 0], PointSize[0.035], AbsoluteThickness[1.6], PointBox[{{5., 3.}, {6., 4.}}]}, { {RGBColor[0, 1, 0], PointSize[0.035], AbsoluteThickness[1.6]}, {}}, { {RGBColor[0, 1, 0], PointSize[0.035], AbsoluteThickness[ 1.6]}, {}}}, {{}, {}}}, {{}, { {RGBColor[0.6, 0.4, 0.2], PointSize[0.035], AbsoluteThickness[1.6], PointBox[{{7., 7.}, {8., 6.}, {9., 8.}}]}, { {RGBColor[0.6, 0.4, 0.2], PointSize[0.035], AbsoluteThickness[ 1.6]}, {}}, { {RGBColor[0.6, 0.4, 0.2], PointSize[0.035], AbsoluteThickness[ 1.6]}, {}}}, {{}, {}}}, {{}, { {RGBColor[1, 0, 0], PointSize[0.06], AbsoluteThickness[1.6], Opacity[ 0.5], PointBox[{{2., 6.6}, {5.5, 3.5}, {8., 7.}}]}, { {RGBColor[1, 0, 0], PointSize[0.06], AbsoluteThickness[1.6], Opacity[ 0.5]}, {}}, { {RGBColor[1, 0, 0], PointSize[0.06], AbsoluteThickness[1.6], Opacity[ 0.5]}, {}}}, {{}, {}}}, {{ InsetBox["1", NCache[{2, Rational[33, 5]}, {2, 6.6}]], InsetBox["2", NCache[{Rational[11, 2], Rational[7, 2]}, {5.5, 3.5}]], InsetBox["3", {8, 7}]}, {PointSize[0.012], PointBox[NCache[{Rational[5021, 1000], Rational[1297, 200]}, {5.021, 6.485}]]}, {Thickness[0.003], LineBox[NCache[{{Rational[5021, 1000], Rational[1297, 200]}, { Rational[13, 20], Rational[31, 20]}}, {{5.021, 6.485}, {0.65, 1.55}}]], LineBox[NCache[{{Rational[5021, 1000], Rational[1297, 200]}, { Rational[5021, 1000] - (Rational[25210441, 1000000] + Rational[1, 226] ( Rational[-2848779833, 500000] + ( Rational[21, 500] Rational[113, 2]^Rational[1, 2] + Rational[2, 5] 226^Rational[1, 2])^2))^Rational[1, 2], Rational[34, 5] - 15 (Rational[21, 1000] - (Rational[25210441, 1000000] + Rational[1, 226] ( Rational[-2848779833, 500000] + ( Rational[21, 500] Rational[113, 2]^Rational[1, 2] + Rational[2, 5] 226^Rational[1, 2])^2))^Rational[1, 2])}}, {{ 5.021, 6.485}, {4.600000000000001, 12.799999999999976`}}]], LineBox[NCache[{{Rational[5021, 1000], Rational[1297, 200]}, { Rational[41, 4], Rational[11, 4]}}, {{5.021, 6.485}, {10.25, 2.75}}]], LineBox[NCache[{{Rational[5021, 1000], Rational[1297, 200]}}, {{5.021, 6.485}}]], LineBox[NCache[{{Rational[5021, 1000], Rational[1297, 200]}}, {{5.021, 6.485}}]], LineBox[NCache[{{Rational[5021, 1000], Rational[1297, 200]}}, {{5.021, 6.485}}]]}}}, AspectRatio->Automatic, Axes->{True, True}, AxesLabel->{None, None}, AxesOrigin->{0.9375000000000003, 0}, DisplayFunction->Identity, Frame->True, FrameLabel->{{None, None}, {None, None}}, FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}}, GridLines->Automatic, GridLinesStyle->Directive[ GrayLevel[0.5, 0.4]], ImageSize->Small, Method->{ "OptimizePlotMarkers" -> True, "CoordinatesToolOptions" -> {"DisplayFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& ), "CopiedValueFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& )}}, PlotRange->{{0, 10}, {0, 10}}, PlotRangeClipping->True, PlotRangePadding->{{ Scaled[0.02], Scaled[0.02]}, { Scaled[0.02], Scaled[0.05]}}, Ticks->{Automatic, Automatic}]], "Print", CellChangeTimes->{ 3.869224530344666*^9, 3.869229285861294*^9, {3.8692295337090535`*^9, 3.86922956550424*^9}, 3.869274220859029*^9, 3.8692743400979824`*^9, 3.8692743840367203`*^9}, CellLabel-> "During evaluation of \ In[51]:=",ExpressionUUID->"46d16050-7f5f-4219-b855-f2cb1796ff14"] }, Open ]] }, Open ]] }, Closed]] }, Open ]] }, WindowSize->{804, 766}, WindowMargins->{{Automatic, 75}, {Automatic, 17}}, FrontEndVersion->"12.0 for Microsoft Windows (64-bit) (April 8, 2019)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 379, 6, 44, "Subsubsection",ExpressionUUID->"a7e919c3-a0a3-4e22-87ae-8bc9957aab4c"], Cell[CellGroupData[{ Cell[962, 30, 3660, 95, 81, "Subsection",ExpressionUUID->"1e469795-d260-48ff-9ce6-569b8da61807"], Cell[4625, 127, 6406, 163, 580, "Input",ExpressionUUID->"b66c8dbf-f21d-4e4a-801b-36ad5a1cce48"] }, Open ]], Cell[CellGroupData[{ Cell[11068, 295, 154, 3, 67, "Section",ExpressionUUID->"2dc7f864-19ba-40a4-b917-793924649555"], Cell[CellGroupData[{ Cell[11247, 302, 160, 3, 44, "Subsubsection",ExpressionUUID->"9e6fbe29-51c7-4274-8bc7-0c7b96144507"], Cell[11410, 307, 8093, 201, 713, "Input",ExpressionUUID->"929fe0ab-2073-4be7-9d39-e89f4c29852d"] }, Closed]], Cell[CellGroupData[{ Cell[19540, 513, 183, 3, 36, "Subsubsection",ExpressionUUID->"75432bb8-8f47-4598-b645-6f7b8e2e1750"], Cell[CellGroupData[{ Cell[19748, 520, 2677, 79, 162, "Input",ExpressionUUID->"a6051c36-3a02-4c05-a023-8e3c8b4c28d5"], Cell[CellGroupData[{ Cell[22450, 603, 600, 14, 25, "Print",ExpressionUUID->"d73b60cd-f694-4aaf-915a-544b18de2a63"], Cell[23053, 619, 2653, 63, 192, "Print",ExpressionUUID->"32cf4eca-189d-4369-a964-dfd599a4f5ae"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[25767, 689, 211, 4, 36, "Subsubsection",ExpressionUUID->"de68dd97-537c-4473-8bdb-ba933b1840e4"], Cell[25981, 695, 2272, 67, 200, "Input",ExpressionUUID->"6ce949b9-aa20-46e6-8f27-da729884f64f"] }, Closed]], Cell[CellGroupData[{ Cell[28290, 767, 164, 3, 36, "Subsubsection",ExpressionUUID->"54f1c360-4113-4dec-81b0-8bb541a922b6"], Cell[CellGroupData[{ Cell[28479, 774, 4926, 143, 390, "Input",ExpressionUUID->"7e05e433-cbfe-46d3-af75-46bcf868a2e3"], Cell[CellGroupData[{ Cell[33430, 921, 1435, 42, 22, "Print",ExpressionUUID->"f5ea6b5a-05c6-4dfc-8de6-714d631cf8e9"], Cell[34868, 965, 2067, 59, 59, "Print",ExpressionUUID->"ae6f5d0d-1a6e-49ad-9ee5-4d9abfdb29ef"], Cell[36938, 1026, 4134, 92, 192, "Print",ExpressionUUID->"46d16050-7f5f-4219-b855-f2cb1796ff14"] }, Open ]] }, Open ]] }, Closed]] }, Open ]] } ] *)