Created
September 1, 2014 20:45
-
-
Save lnicola/2871fd18db99ae103ad4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Content-type: application/vnd.wolfram.mathematica *) | |
(*** Wolfram Notebook File ***) | |
(* http://www.wolfram.com/nb *) | |
(* CreatedBy='Mathematica 10.0' *) | |
(*CacheID: 234*) | |
(* Internal cache information: | |
NotebookFileLineBreakTest | |
NotebookFileLineBreakTest | |
NotebookDataPosition[ 158, 7] | |
NotebookDataLength[ 4573, 132] | |
NotebookOptionsPosition[ 4184, 114] | |
NotebookOutlinePosition[ 4527, 129] | |
CellTagsIndexPosition[ 4484, 126] | |
WindowFrame->Normal*) | |
(* Beginning of Notebook Content *) | |
Notebook[{ | |
Cell[BoxData[ | |
RowBox[{ | |
RowBox[{"f", "[", "n_", "]"}], ":=", | |
RowBox[{"Apply", "[", | |
RowBox[{"Or", ",", | |
RowBox[{"Table", "[", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"CountDistinct", "[", | |
RowBox[{"Table", "[", | |
RowBox[{ | |
RowBox[{"RandomInteger", "[", | |
RowBox[{"{", | |
RowBox[{"1", ",", "6"}], "}"}], "]"}], ",", | |
RowBox[{"{", "6", "}"}]}], "]"}], "]"}], "\[Equal]", "6"}], ",", | |
RowBox[{"{", "n", "}"}]}], "]"}]}], "]"}]}]], "Input", | |
CellChangeTimes->{{3.6185848891094*^9, 3.6185849026694*^9}, { | |
3.6185850037534*^9, 3.6185850041464*^9}, {3.6185852282693996`*^9, | |
3.6185852473654003`*^9}, {3.6185854681864*^9, 3.6185854944424*^9}, { | |
3.6185857262014*^9, 3.6185858323724003`*^9}, {3.6185858982734003`*^9, | |
3.6185859810034*^9}, {3.6185861363344*^9, 3.6185861387834*^9}, { | |
3.6185867242130733`*^9, 3.6185867539649963`*^9}, {3.618586787457041*^9, | |
3.61858679015485*^9}, {3.6185868455054502`*^9, 3.618586853134738*^9}, { | |
3.6185869400908175`*^9, 3.618586955195363*^9}}], | |
Cell[BoxData[ | |
RowBox[{ | |
RowBox[{"g", "[", "e_", "]"}], ":=", | |
RowBox[{"ListLinePlot", "[", | |
RowBox[{"Table", "[", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"Count", "[", | |
RowBox[{ | |
RowBox[{"Table", "[", | |
RowBox[{ | |
RowBox[{"f", "[", "i", "]"}], ",", | |
RowBox[{"{", "e", "}"}]}], "]"}], ",", "True"}], "]"}], "/", "e"}], | |
"*", "100"}], ",", | |
RowBox[{"{", | |
RowBox[{"i", ",", "1", ",", "100"}], "}"}]}], "]"}], "]"}]}]], "Input", | |
CellChangeTimes->{{3.6185865167914*^9, 3.6185865260424*^9}, { | |
3.6185865906134*^9, 3.6185866067914*^9}, {3.6185866377124*^9, | |
3.6185866857355337`*^9}, 3.6185867607940445`*^9, {3.6185876282116694`*^9, | |
3.6185876713099785`*^9}, {3.6185877019810457`*^9, | |
3.6185877295227995`*^9}, {3.618587848677714*^9, 3.6185878637082167`*^9}}], | |
Cell[CellGroupData[{ | |
Cell[BoxData[ | |
RowBox[{"g", "[", "1000", "]"}]], "Input", | |
CellChangeTimes->{{3.6185879509569407`*^9, 3.6185879527991247`*^9}}], | |
Cell[BoxData[ | |
GraphicsBox[{{}, {{}, {}, | |
{RGBColor[0.368417, 0.506779, 0.709798], PointSize[0.01388888888888889], | |
AbsoluteThickness[1.6], LineBox[CompressedData[" | |
1:eJxdkrtKA1EQhg8iYmEhKKJg4Y3g/RYvSbzkRBMTzSYm2c2tE1FbCyu7rXwB | |
K30AX8DKbisrfQBfwMpCEAQ7jfNNYHMgDF/++WfmzNnx08vKeZcx5uzv14py | |
PpMX/+c7yR/29aV1uq1gL3GI2G8lX3mQ/FF42N7ftc4kPEp+BB6DZ+AJ4hxx | |
ykb/zwIcIX8RnkZfgmfpF4XnmWcFXsS/AS8Lv2/CK+IfUV7Fn4Cjwk4cXpP+ | |
jzF4Hf8WvEH+NryJnoRjzLMLx6ln4YTwlTJ1bQre5r578A73Uda6yknqKVvy | |
08K+pT9sUuSrnpJ+zYN2XblfBn1P6j3AZl/0viz6PvOrnma/1PPT9CffZNAP | |
0TP0z6EfUF912DlCz3boWZkvonoOHfZzUv+NfHNI/zw6/wewwWdVP6Keg57n | |
+4T9PHoR3eE+qjvMr3qBeWC/wPzH6EXeR/Vih04MiP4x711AL/H94bcl7qv1 | |
SuF6gepav8x7l/DDPWX8ZZn/CT2AR9BNRfJvYFuR+wyovyJxDA7If1a/G+5n | |
Xal/rX70B/W7HX5P+n2p32vPLdEL5wee1I8zl6lKPIFtVfbzAfsdelDlPdVf | |
Yx/qr7X3IP4a34uLv8Z+YFMX/4/666Lfovv19p7Ej+6qvxGexyqrvxGuHzTY | |
h/qb7N+zv0ZvicA= | |
"]]}}, {}}, | |
AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], | |
Axes->{True, True}, | |
AxesLabel->{None, None}, | |
AxesOrigin->{0, 0}, | |
DisplayFunction->Identity, | |
Frame->{{False, False}, {False, False}}, | |
FrameLabel->{{None, None}, {None, None}}, | |
FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}}, | |
GridLines->{None, None}, | |
GridLinesStyle->Directive[ | |
GrayLevel[0.5, 0.4]], | |
Method->{}, | |
PlotRange->{{0., 100.}, {0, 80.1}}, | |
PlotRangeClipping->True, | |
PlotRangePadding->{{ | |
Scaled[0.02], | |
Scaled[0.02]}, { | |
Scaled[0.02], | |
Scaled[0.05]}}, | |
Ticks->{Automatic, Automatic}]], "Output", | |
CellChangeTimes->{3.618588037450589*^9}] | |
}, Open ]] | |
}, | |
WindowSize->{1028, 853}, | |
WindowMargins->{{Automatic, 307}, {64, Automatic}}, | |
FrontEndVersion->"10.0 for Microsoft Windows (64-bit) (July 1, 2014)", | |
StyleDefinitions->"Default.nb" | |
] | |
(* End of Notebook Content *) | |
(* Internal cache information *) | |
(*CellTagsOutline | |
CellTagsIndex->{} | |
*) | |
(*CellTagsIndex | |
CellTagsIndex->{} | |
*) | |
(*NotebookFileOutline | |
Notebook[{ | |
Cell[558, 20, 1056, 23, 31, "Input"], | |
Cell[1617, 45, 849, 21, 31, "Input"], | |
Cell[CellGroupData[{ | |
Cell[2491, 70, 127, 2, 31, "Input"], | |
Cell[2621, 74, 1547, 37, 277, "Output"] | |
}, Open ]] | |
} | |
] | |
*) | |
(* End of internal cache information *) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment