(* 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[ 7605, 218] NotebookOptionsPosition[ 7241, 201] NotebookOutlinePosition[ 7589, 216] CellTagsIndexPosition[ 7546, 213] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Choice of the core point in the set \[ScriptCapitalA] , based on ", FontColor->RGBColor[1, 0, 0]], Cell[BoxData[ FormBox[ SubscriptBox["It", "0"], TraditionalForm]], FontColor->RGBColor[1, 0, 0], ExpressionUUID -> "f2269f00-5480-4d09-bf89-2cd90ed3a629"], StyleBox[" random choices", FontColor->RGBColor[1, 0, 0]], " " }], "Subsubsection", CellChangeTimes->{{3.7595897272266884`*^9, 3.759589735224825*^9}, { 3.820976958092887*^9, 3.820977018519949*^9}, {3.820977785836401*^9, 3.820977792545973*^9}, {3.820978092301695*^9, 3.8209782577467656`*^9}, { 3.8209782897159843`*^9, 3.8209783925540857`*^9}, {3.820978714340776*^9, 3.820978776743942*^9}, {3.8222870804902368`*^9, 3.8222870809534626`*^9}}, ExpressionUUID -> "ddae7d7d-3604-45a5-bb12-3a36ad7a4d42"], 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", " ", "\[ScriptCapitalA]"}], " ", "\[Subset]", " ", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"\[Epsilon]", " ", ">", " ", "0"}], FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"number", " ", "of", " ", "random", " ", "choices", " ", SubscriptBox["It", "0"]}], ";"}], 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[{"core", " ", "point", " ", StyleBox[ SubscriptBox["c", "p"], FontSlant->"Italic"]}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{ RowBox[{"number", " ", "of", " ", "points"}], " ", "|", StyleBox[ SubscriptBox["C", "p"], FontSlant->"Italic"], "|", " ", RowBox[{ RowBox[{"in", " ", "\[Epsilon]"}], "-", RowBox[{ "neighborhood", " ", "of", " ", "the", " ", "core", " ", "point", " ", StyleBox[ SubscriptBox["c", "p"], FontSlant->"Italic"]}]}]}], ";"}], FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ StyleBox["Submodules", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"none", " ", "needed"}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[" ", FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]"}], "Text", CellChangeTimes->{{3.8209778228824396`*^9, 3.8209778718310347`*^9}, { 3.820978420869752*^9, 3.8209784322561293`*^9}, {3.8209784775086145`*^9, 3.8209785325791683`*^9}, {3.8209788221489606`*^9, 3.820978935290902*^9}, { 3.8209789671914663`*^9, 3.8209790445752287`*^9}, {3.820979081296913*^9, 3.820979084603058*^9}, 3.820979912083341*^9, {3.8222870049070325`*^9, 3.822287014617408*^9}, {3.822287065507713*^9, 3.822287066054982*^9}}, FontSize->12, ExpressionUUID -> "29e56ac3-3e31-49af-8698-19b57305572e"], Cell[BoxData[ RowBox[{ RowBox[{"CorePoint", "[", RowBox[{"A_", ",", "eps_", ",", "It0_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"kk", "=", "1"}], ",", "rc", ",", "Ne", ",", "B", ",", "br", ",", "br1", ",", "rep", ",", "Rep"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rc", "=", RowBox[{"RandomChoice", "[", "A", "]"}]}], ";", " ", RowBox[{"Ne", "=", RowBox[{"Neps", "[", RowBox[{"A", ",", "rc", ",", "eps"}], "]"}]}], ";", " ", RowBox[{"br", "=", RowBox[{"Length", "[", "Ne", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"rep", " ", "-", " ", RowBox[{"chosen", " ", "point"}]}], ";", " ", RowBox[{"Rep", " ", "-", " ", RowBox[{ "number", " ", "of", " ", "points", " ", "in", " ", "the", " ", "neighborhood", " ", "of", " ", "point", " ", "rep"}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"rep", "=", "rc"}], ";", RowBox[{"Rep", "=", "Ne"}], ";", RowBox[{"kk", "=", "1"}], ";", RowBox[{"B", "=", RowBox[{"Complement", "[", RowBox[{"A", ",", RowBox[{"{", "rc", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"kk", "<", "It0"}], ",", RowBox[{ RowBox[{"kk", "=", RowBox[{"kk", "+", "1"}]}], ";", "\[IndentingNewLine]", RowBox[{"rc", "=", RowBox[{"RandomChoice", "[", "B", "]"}]}], ";", RowBox[{"Ne", "=", RowBox[{"Neps", "[", RowBox[{"B", ",", "rc", ",", "eps"}], "]"}]}], ";", " ", RowBox[{"br1", "=", RowBox[{"Length", "[", "Ne", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"br1", ">", "br"}], ",", " ", RowBox[{ RowBox[{"br", "=", "br1"}], ";", RowBox[{"rep", "=", "rc"}], ";", RowBox[{"Rep", "=", "Ne"}]}]}], "]"}]}]}], "\[IndentingNewLine]", "\t", "]"}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"rep", ",", RowBox[{"Length", "[", "Rep", "]"}]}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{ 3.803996839606488*^9, {3.803996880772684*^9, 3.8039968845324955`*^9}, { 3.8039969452880983`*^9, 3.80399702877054*^9}, {3.8039971384832907`*^9, 3.8039971657781754`*^9}, {3.8039973434261513`*^9, 3.8039973955631742`*^9}, {3.8039978149885945`*^9, 3.8039978308141346`*^9}, {3.803997891097745*^9, 3.8039978986620502`*^9}, 3.803998710932787*^9, 3.8040429994092426`*^9, {3.804044930910961*^9, 3.8040449459228907`*^9}, {3.8160917040603385`*^9, 3.816091704838705*^9}, 3.8161384055929213`*^9, 3.820976829788107*^9, {3.8209778950283732`*^9, 3.820977904137167*^9}, 3.8209785524078503`*^9, 3.8209786367872314`*^9, { 3.8209791142282715`*^9, 3.820979140525277*^9}, {3.8209791791519957`*^9, 3.820979272276266*^9}}, ExpressionUUID -> "ca9aeaa2-e00c-4dd3-805f-a38345e7e09e"] }, Open ]] }, WindowSize->{1536, 779}, WindowMargins->{{-8, Automatic}, {Automatic, -8}}, FrontEndVersion->"11.0 for Microsoft Windows (64-bit) (September 21, 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 808, 17, 39, "Subsubsection"], Cell[1391, 41, 2725, 84, 85, "Text"], Cell[4119, 127, 3106, 71, 202, "Input"] }, Open ]] } ] *)