(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.2' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 5344694, 138727]*) (*NotebookOutlinePosition[ 5376607, 139538]*) (* CellTagsIndexPosition[ 5372086, 139384]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["\<\ Control policies for 421, a stochastic game of life\ \>", "Title", TextAlignment->Center, CellTags->"c:1"], Cell[TextData[{ "Pierre Albar\[EGrave]de\n ", ButtonBox["http://pierre.albarede.free.fr", ButtonData:>{ URL[ "http://pierre.albarede.free.fr"], None}, ButtonStyle->"Hyperlink"] }], "Subtitle", TextAlignment->Center, TextJustification->0], Cell[CellGroupData[{ Cell["Abstract", "Outline2", TextAlignment->Center], Cell[TextData[{ "We treat a stochastic control problem, inspired by a popular dice game, \ known as 421 [", ButtonBox["1", ButtonData:>"references", ButtonStyle->"Hyperlink"], "]. Tools are realized, especially for combination algebra and quotient \ algebra modulo face permutations. Linear growth Markovian fate trees are \ evaluated. A Markovian utility-strategy format is introduced, along with \ purifying, forcing and pruning techniques. Backward induction programs are \ realized: - an optimal policy, ", StyleBox["mean-max", "Program"], ", - a Markovian strategy judging program, ", StyleBox["mean-mean", "Program"], ". The latter is also used, numerically, to evaluate probabilities, by \ solving Kolmogorov equation, and, symbolically, to display strategies. A \ constant-goal ratchet stratagem is found and most probably successful \ strategy final state probabilities are compiled, using dynamic \ self-similarity. Goal-driven policies (cheaper than ", StyleBox["mean-max", "Program"], ") are inferred, depending on compiled probabilities and three parameters: \ ", StyleBox["serendipity", FontSlant->"Italic"], " [", ButtonBox["2", ButtonData:>"references", ButtonStyle->"Hyperlink"], "], horizon and dynamism. Eight goal-driven policies are applied to \ seventeen utility functions and most resulting stategies, not all Markovian, \ are exactly judged. Empiric laws of policy utility are inferred, confirming \ the utility of serendipity [", ButtonBox["2", ButtonData:>"references", ButtonStyle->"Hyperlink"], "]. Meta-policy is introduced. Technically, ", StyleBox["Mathematica", FontSlant->"Italic"], " ", "allows choosing between the \[Lambda] (anonymous), functional and \ procedural programming styles, depending on evaluation and naming \ constraints. " }], "Text", TextAlignment->Left, TextJustification->0], Cell["\<\ Key words: utility, strategy, policy, insufficient reason, backward \ induction, goal, ratchet, serendipity, horizon, dynamism, meta-policy.\ \>", \ "Text", TextAlignment->Left, TextJustification->0] }, Open ]], Cell[CellGroupData[{ Cell["Introduction", "Section", CellTags->"c:2"], Cell[CellGroupData[{ Cell["Playing against providence", "Subsection", CellTags->"c:3"], Cell[TextData[{ "Within the 421 game, which is fully described in [", ButtonBox["1", ButtonData:>"references", ButtonStyle->"Hyperlink"], "], only a round is treated (when one player alone is opposed to \ providence). As providence is not exactly a player, a round is not exactly a \ game, but a stochastic control problem. A ", StyleBox["combination", FontSlant->"Italic"], " is a list, the order of which does not matter, or a finite set possibly \ with repetitions. A ", StyleBox["state", FontSlant->"Italic"], " is a combination of dice that have been irreversibly pushed away from the \ dice board; an ", StyleBox["event", FontSlant->"Italic"], " is a combination of dice that have just been cast. The cast number \ (initially zero) serves as a discrete date. After each event, a new state is \ chosen. ", StyleBox["Fate", FontSlant->"Italic"], " is an alternate sequence state-event-state\[Ellipsis] ending with some \ state having some utility, which may depend on final date and state but not \ on history. A set of possible fates, along with event probabilities and final \ utilities, appears as a ", StyleBox["fate tree", FontSlant->"Italic"], ". " }], "Text"], Cell[TextData[{ "A ", StyleBox["strategy", FontSlant->"Italic"], " is a (generally probabilistic) determination of all possible choices. A \ ", StyleBox["policy", FontSlant->"Italic"], " is a program evaluating exactly one strategy. Distinct policies can \ evaluate the same strategy." }], "Text"], Cell[TextData[{ "The ", StyleBox["Von Neumann-Morgenstern ", FontSlant->"Italic"], " or \"", StyleBox["mean-max", "Program"], "\"", StyleBox[" theorem", FontSlant->"Italic"], " [", ButtonBox["3", ButtonData:>"references", ButtonStyle->"Hyperlink"], "]:\n- utility exactly expresses preference, that is, choice maximizes \ utility,\n- the utility of present state is the expected utility of next \ random events." }], "Text"], Cell[TextData[{ "If many states are most useful (as in Buridan's donkey story), then, \ according to the principle of insufficient reason [", ButtonBox["1", ButtonData:>"references", ButtonStyle->"Hyperlink"], ", ", ButtonBox["4", ButtonData:>"references", ButtonStyle->"Hyperlink"], "],", StyleBox[" ", FontSlant->"Italic"], "completely", StyleBox[" equiprobale ", FontSlant->"Italic"], "choice (among all most useful states) is assumed. From this and the von \ Neumann-Morgenstern theorem, there exists exactly one complete most useful \ strategy, non-pure in general and evaluatable by \"backward induction\" [", ButtonBox["3", ButtonData:>"references", ButtonStyle->"Hyperlink"], "]." }], "Text"], Cell["\<\ As dice are independent and, by insufficient reason, unloaded, the \ probabilities depending on face combinations are invariant by global face \ permutations.\ \>", "Text"], Cell[TextData[{ "There are ", Cell[BoxData[ \(TraditionalForm\`d\)]], " dice each with ", Cell[BoxData[ \(TraditionalForm\`f\)]], " faces. A player casts the dice at most ", Cell[BoxData[ \(TraditionalForm\`j\)]], " times. The parameters of the control problem are thus ", Cell[BoxData[ \(TraditionalForm\`d, f, j\)]], " and some utility function (a functional parameter). Normally," }], "Text"], Cell[BoxData[ \({d = 3, f = 6, j = 3}\)], "Input", Evaluatable->False], Cell[TextData[{ "although next players begin to play with smaller ", Cell[BoxData[ \(TraditionalForm\`j\)]], ". Moreover, smaller ", Cell[BoxData[ \(TraditionalForm\`d, f, j\)]], ", like" }], "Text"], Cell[BoxData[ \({d = 2, f = 3, j = 3}\)], "Input", Evaluatable->False], Cell["provide small-scale cases, useful for program development.", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Conventions and data", "Subsection", CellTags->"c:4"], Cell["\<\ \[LeftGuillemet] \[WarningSign] \[RightGuillemet] introduces agenda \ (things to do), \[LeftGuillemet] \[Wolf] \[RightGuillemet] introduces some \ hopefully clever remarks.\ \>", "Text"], Cell[TextData[{ "In text, ", StyleBox["loose", FontSlant->"Italic"], " sign conventions are used, that is, \n- \[GreaterEqual] is greater, > is \ strictly greater,\n- zero is both positive and negative, \n- a constant \ function is both increasing and decreasing, \n- present is both past and \ future,\n\[Ellipsis]" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \($Version\)], "Input"], Cell[BoxData[ \("5.2 for Mac OS X (June 20, 2005)"\)], "Output"] }, Open ]], Cell[TextData[{ "After initializing, every ", StyleBox["numbered", FontSlant->"Italic"], " section of the present notebook can be evaluated independently in a \ meaningful way. A section usually consists of three parts: one for \ developing, one for defining and one for testing some function. Keep the \ environment clean by evaluating clearing commands as well!" }], "Text"], Cell["Parameters will be often grouped as in", "Text"], Cell[BoxData[ \(action_[conditions__]@object__\)], "Input", Evaluatable->False], Cell["This grouping simplifies mapping, as in", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Block[{power1}, power1[n_]@x_ := Power[x, n]; \[IndentingNewLine]Print[\(Power[#, 3] &\) /@ Range@3]; \[IndentingNewLine]Print[ (*simpler\ \(\(syntax\)\(:\)\)*) power1@3 /@ Range@3]\[IndentingNewLine]]\)], "Input"], Cell[BoxData[ \({1, 8, 27}\)], "Print"], Cell[BoxData[ \({1, 8, 27}\)], "Print"] }, Open ]], Cell[TextData[{ StyleBox["make", "Input"], " (like the unix command) is used to hide parameters that are too big to \ show (or that would take too much time to evaluate from a compact form). ", StyleBox["make", "Input"], " is not supposed to evaluate anything, but to affect variables: this is \ procedural programming and it appears as a consequence of evaluation \ constraints. \[Wolf] If ", StyleBox["this", "Input"], " already has a value, it will be affected instead of ", StyleBox["this", "Input"], ". " }], "Text"], Cell[BoxData[ \(make[implicit___]@this[explicit__] := \(this@explicit = function1[implicit, explicit]\)\)], "Input", Evaluatable->False], Cell[TextData[{ "Probability and strategy utility files should accompany the present \ notebook. Otherwise, probability files will be automatically regenerated when \ needed; the strategy utility files can be regenerated by evaluating section ", CounterBox["Section", "section1"], ".", CounterBox["Subsection", "section1"], " (not so quietly because of some hard cases)." }], "Text"], Cell[BoxData[{ \(<< AuthorTools`\), "\n", \(\(SetDirectory@\(NotebookFolder@InputNotebook[]\);\)\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(FileNames[{"\", "\<*trategyUtility*\>"}]\)], "Input"], Cell[BoxData[ \({"maxStrategyUtility.txt", "probability1_2_3.txt", "probability2_3_3.txt", "probability2_3_4.txt", "probability2_4_3.txt", "probability3_6_3.txt", "probability3_6_3V.txt", "randomStrategyUtility.txt", "strategyUtility1.txt", "strategyUtility.txt"}\)], "Output"] }, Open ]], Cell["\<\ \[WarningSign] This beeps once for unknown reason but works all the \ same.\ \>", "Text"], Cell[BoxData[{ \(\(Utilities`Notation`AutoLoadNotationPalette = False;\)\), "\[IndentingNewLine]", \(<< Utilities`Notation`\)}], "Input", InitializationCell->True] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Tools", "Section", CellTags->"c:5"], Cell[CellGroupData[{ Cell["Evaluation constraints", "Subsection", CellTags->"c:6"], Cell[CellGroupData[{ Cell["Timing", "Subsubsection", CellTags->"c:7"], Cell[BoxData[ \(clock := Apply[StringJoin, \(ToString /@ {#[\([1]\)], "\", #[\([2]\)], \ "\", NumberForm[#[\([3]\)], {3, 1}], "\"} &\)@ Take[Date[], \(-3\)]]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(clock\)], "Input"], Cell[BoxData[ \("13h:48min:22.0s"\)], "Output"] }, Open ]], Cell["This lacks sensitivity:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(First@\(Timing@Expand[\((1 + _)\)^15]\)\)], "Input"], Cell[BoxData[ \(0.`\ Second\)], "Output"] }, Open ]], Cell["Repeat for sensitivity:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(First@zoomTiming[Expand[\((1 + _)\)^15], 5000]/5000\)], "Input"], Cell[BoxData[ \(0.00013000000000000115`\ Second\)], "Output"] }, Open ]], Cell[TextData[{ "\[WarningSign] Try ", StyleBox["AbsoluteTiming", "Input"], ". " }], "Text"], Cell[BoxData[{ \(\(ClearAll@zoomTiming;\)\), "\[IndentingNewLine]", \(\(Attributes@zoomTiming = {HoldAll};\)\), "\[IndentingNewLine]", \(\(zoomTiming@expression_ := Timing@expression;\)\), "\[IndentingNewLine]", \(\(zoomTiming[expression_, testNumber_Integer] := Timing[Do[expression, {testNumber - 1}]; expression];\)\)}], "Input", InitializationCell->True], Cell["\<\ Try and compare many expressions (with the help of R\[EAcute]mi \ Barr\[EGrave]re):\ \>", "Text"], Cell[BoxData[ \(zoomTiming[expression__, testNumber_] := Transpose@{ReleaseHold[ Map[Hold, Hold@expression] /. Hold@x_ \[RuleDelayed] zoomTiming[x, testNumber]]}\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(First@ zoomTiming[Expand[\((1 + _)\)^15], Expand[\((1 + _)\)^30], 500]\)], "Input"], Cell[BoxData[ \({0.05999999999999872`\ Second, 0.120000000000001`\ Second}\)], "Output"] }, Open ]], Cell[BoxData[ \(\(compare = If[SameQ@##, {"\", #1}, "\"] &;\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(zoomTiming[expression__, testNumber_, compare] := MapAt[compare @@ # &, Transpose@{ReleaseHold[ Map[Hold, Hold@expression] /. Hold@x_ \[RuleDelayed] zoomTiming[x, testNumber]]}, \(-1\)]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[Expand[\((1 + _)\)^15], Expand[\((1 + _)\)^30], 500, compare]\)], "Input"], Cell[BoxData[ \({{0.07000000000000028`\ Second, 0.09999999999999432`\ Second}, "not same"}\)], "Output"] }, Open ]], Cell["A few instructive cases:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[ Plus @@ Range@1000, (*much\ \(\(faster\)\(:\)\)*) Total@\(Range@1000\), 1000, compare]\)], "Input"], Cell[BoxData[ \({{0.4099999999999966`\ Second, 0.04999999999999716`\ Second}, {"same", 500500}}\)], "Output"] }, Open ]], Cell["Pattern matching is faster (but less general) than testing.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[ Reverse@\(Sort@Select[{2, 1, 5, 0, 6, 1, 0}, # \[NotEqual] 0 &]\), Reverse@\(Sort@DeleteCases[{2, 1, 5, 0, 6, 1, 0}, 0]\), 3000, compare]\)], "Input"], Cell[BoxData[ \({{0.09999999999999432`\ Second, 0.060000000000002274`\ Second}, True}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[\({#, x} &\) /@ Range@10, Distribute[{Range@10, x}, List], 10000, compare]\)], "Input"], Cell[BoxData[ \({{0.46000000000000085`\ Second, 0.25`\ Second}, {"same", {{1, x}, {2, x}, {3, x}, {4, x}, {5, x}, {6, x}, {7, x}, {8, x}, {9, x}, {10, x}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[function1 /@ Range@10, Distribute[{Range@10}, List, List, List, function1], 20000, compare]\)], "Input"], Cell[BoxData[ \({{0.5100000000000016`\ Second, 0.5`\ Second}, {"same", {function1[1], function1[2], function1[3], function1[4], function1[5], function1[6], function1[7], function1[8], function1[9], function1[10]}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[ Distribute[{{11, 12, 13}, {21, 22, 23}}, List, List, List, f2], Flatten@Outer[f2, {11, 12, 13}, {21, 22, 23}], 10000, compare]\)], "Input"], Cell[BoxData[ \({{0.14000000000000057`\ Second, 0.3100000000000005`\ Second}, {"same", {f2[11, 21], f2[11, 22], f2[11, 23], f2[12, 21], f2[12, 22], f2[12, 23], f2[13, 21], f2[13, 22], f2[13, 23]}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(With[{list1 = #}, zoomTiming[Flatten[list1, 1], Join @@ list1, 30000, compare]] &\) /@ {{{1, 2}, {3, 4, 5}, {}, {6, 7, 8, 9, 10}}, {Range@20, Range@5}}\)], "Input"], Cell[BoxData[ \({{{0.18000000000000682`\ Second, 0.22000000000002728`\ Second}, {"same", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}}, {{0.2300000000000182`\ Second, 0.2599999999999909`\ Second}, {"same", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[Part[{{1, 2}, {2, 4}, {1, 5}, {4, 5}, {1, 1}}, {2, 4}], Extract[{{1, 2}, {2, 4}, {1, 5}, {4, 5}, {1, 1}}, {{2}, {4}}], 500000, compare]\)], "Input"], Cell[BoxData[ \({{1.0299999999999727`\ Second, 0.9800000000000182`\ Second}, {"same", {{2, 4}, {4, 5}}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Spacing", "Subsubsection", CellTags->"c:8"], Cell["To be adapted to hardware (presently: 521 Mbytes).", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \($maxMemory = 300\ 10^6\)], "Input", InitializationCell->True], Cell[BoxData[ \(300000000\)], "Output"] }, Open ]], Cell["\<\ 33 is the greatest power of 2 evaluated in less than one byte. \ \[Wolf] This may be hardware or version dependent.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(MemoryConstrained[2^33, 1]\), "\[IndentingNewLine]", \(MemoryConstrained[2^34, 1]\)}], "Input"], Cell[BoxData[ \(8589934592\)], "Output"], Cell[BoxData[ \($Aborted\)], "Output"] }, Open ]], Cell[TextData[{ StyleBox["MemoryConstrained", "Input"], " does count the space occupied by the value." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(ByteCount@%%\)], "Input"], Cell[BoxData[ \(32\)], "Output"] }, Open ]], Cell["Requires 32 bytes:", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(MemoryConstrained[2^2 + 1, 31]\), "\n", \(MemoryConstrained[2^2 + 1, 32]\)}], "Input"], Cell[BoxData[ \($Aborted\)], "Output"], Cell[BoxData[ \(5\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(ByteCount@%\)], "Input"], Cell[BoxData[ \(16\)], "Output"] }, Open ]], Cell["Dichotomic search of minimum spacing.", "Text"], Cell[BoxData[ \(\(expr = Unevaluated[2^2 + 1];\)\)], "Input"], Cell[BoxData[ \(\(guess = 10;\)\)], "Input"], Cell[BoxData[ \(n1 = 1; n2 = guess;\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(Switch[{MemoryConstrained[expr, n1], MemoryConstrained[expr, n2]}, {$Aborted, $Aborted}, (*under*) {n2, 2 n2}, {$Aborted, _}, (*between*) With[{n3 = Floor[\((n1 + n2)\)/2]}, Switch[MemoryConstrained[expr, n3], $Aborted, {n3, n2}, _, {n1, n3}]], _, (*above*) {Floor[n1/2], n1}]\)], "Input"], Cell[BoxData[ \({10, 20}\)], "Output"] }, Open ]], Cell[BoxData[ \(\(shoot = With[{n1 = First@#, n2 = Last@#}, Switch[{MemoryConstrained[expr, n1], MemoryConstrained[expr, n2]}, {$Aborted, $Aborted}, (*under*) {n2, 2 n2}, {$Aborted, _}, (*between*) With[{n3 = Floor[\((n1 + n2)\)/2]}, Switch[MemoryConstrained[expr, n3], $Aborted, {n3, n2}, _, {n1, n3}]], _, (*above*) {Floor[n1/2], n1}]] &;\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(NestList[shoot, {1, guess}, 8]\)], "Input"], Cell[BoxData[ \({{1, 10}, {10, 20}, {20, 40}, {30, 40}, {30, 35}, {30, 32}, {31, 32}, {31, 32}, {31, 32}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Last@FixedPoint[shoot, {1, guess}]\)], "Input"], Cell[BoxData[ \(32\)], "Output"] }, Open ]], Cell[BoxData[ \(\({expr, guess, n1, n2, shoot} =. ;\)\)], "Input"], Cell[TextData[{ "(Named like ", StyleBox["Timing", "Input"], ".)" }], "Text"], Cell[BoxData[ \(Clear@spacing; Attributes@spacing = {HoldFirst}; spacing[expr_, guess_Integer: 1000] := ByteCount@expr + Last@FixedPoint[ With[{n1 = First@#, n2 = Last@#}, Switch[{MemoryConstrained[expr, n1], MemoryConstrained[expr, n2]}, {$Aborted, $Aborted}, (*under*) {n2, 2 n2}, {$Aborted, _}, (*between*) With[{n3 = Floor[\((n1 + n2)\)/2]}, Switch[MemoryConstrained[expr, n3], $Aborted, {n3, n2}, _, {n1, n3}]], _, (*above*) {Floor[n1/2], n1}]] &, \ {Floor[2 guess/3], Floor[4 guess/3]}]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(spacing[2^2 + 1]\)], "Input"], Cell[BoxData[ \(48\)], "Output"] }, Open ]], Cell[TextData[{ "Unfortunately, ", StyleBox["spacing", "Input"], " itself needs more (time and) space than its input expression." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(spacing@spacing[2^2 + 1]\)], "Input"], Cell[BoxData[ \(1784\)], "Output"] }, Open ]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Lists", "Subsection", CellTags->"c:9"], Cell[CellGroupData[{ Cell["Only element filtering", "Subsubsection", CellTags->"c:10"], Cell["Check unicity.", "Text"], Cell[BoxData[{ \(Clear@only; only@{x_} := x;\), "\[IndentingNewLine]", \(\(only::emptyList = "\";\)\ \), "\[IndentingNewLine]", \(only@{} := Message[only::emptyList]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Print@\(only@{}\)\)], "Input"], Cell[BoxData[ \(Null\)], "Print"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(First@Position[{3, 2, 3, 5, 7, 4}, 3]\), "\[IndentingNewLine]", \(only@Position[{3, 2, 3, 5, 7, 4}, 3]\)}], "Input"], Cell[BoxData[ \({1}\)], "Output"], Cell[BoxData[ \(only[{{1}, {3}}]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(First@Position[{3, 2, 3, 5, 7, 4}, 7]\), "\n", \(only@Position[{3, 2, 3, 5, 7, 4}, 7]\)}], "Input"], Cell[BoxData[ \({5}\)], "Output"], Cell[BoxData[ \({5}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(only@Cases[{1, 2, f@2, 3}, f@_]\)], "Input"], Cell[BoxData[ \(f[2]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(only@Cases[{f@1, 2, f@2, 3}, f@_]\)], "Input"], Cell[BoxData[ \(only[{f[1], f[2]}]\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Elementary statistics", "Subsubsection", CellTags->"c:11"], Cell[BoxData[ \(<< DiscreteMath`Combinatorica`\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Mean@{x_, y_, z_}\)], "Input"], Cell[BoxData[ \(1\/3\ \((x_ + y_ + z_)\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(StandardDeviationMLE[{x_, y_, z_}]\)], "Input"], Cell[BoxData[ \(\@\(\((x_ + 1\/3\ \((\(-x_\) - y_ - z_)\))\)\^2 + \((y_ + 1\/3\ \ \((\(-x_\) - y_ - z_)\))\)\^2 + \((1\/3\ \((\(-x_\) - y_ - z_)\) + z_)\)\^2\)\ \/\@3\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(compare[StandardDeviation[{x_, y_, z_}], StandardDeviationMLE[{x_, y_, z_}]]\)], "Input"], Cell[BoxData[ \("not same"\)], "Output"] }, Open ]], Cell[BoxData[ \(\(myDispersionReport = {Mean@#, StandardDeviationMLE@#} &;\)\)], "Input",\ InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(myDispersionReport@Table[Random[], {100}]\)], "Input"], Cell[BoxData[ \({0.4947069540876893`, 0.2940650352205703`}\)], "Output"] }, Open ]], Cell["Exact standard deviation.", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(Sqrt@Integrate[\((x - 1/2)\)^2, {x, 0, 1}]\), "\[IndentingNewLine]", \(1. %\)}], "Input"], Cell[BoxData[ \(1\/\(2\ \@3\)\)], "Output"], Cell[BoxData[ \(0.2886751345948129`\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Reverse folding and history", "Subsubsection", CellTags->"c:12"], Cell["Classically, folding is from left to right", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(FoldList[Hold, 0, {1, 2}]\)], "Input"], Cell[BoxData[ \({0, Hold[0, 1], Hold[Hold[0, 1], 2]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(FoldList[Append[#1, \ #2] &, {0}, {1, 2, 3, 4}]\)], "Input"], Cell[BoxData[ \({{0}, {0, 1}, {0, 1, 2}, {0, 1, 2, 3}, {0, 1, 2, 3, 4}}\)], "Output"] }, Open ]], Cell["Inversely,", "Text"], Cell[BoxData[ \(Clear@reverseFoldList; reverseFoldList[function1_, list1_List, x_] := Reverse@FoldList[function1 @@ Reverse@{##} &, x, Reverse@list1]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(reverseFoldList[Hold, {2, 1}, 0]\)], "Input"], Cell[BoxData[ \({Hold[2, Hold[1, 0]], Hold[1, 0], 0}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(reverseFoldList[Append[#2, \ #1] &, {4, 3, 2, 1}, {0}]\)], "Input"], Cell[BoxData[ \({{0, 1, 2, 3, 4}, {0, 1, 2, 3}, {0, 1, 2}, {0, 1}, {0}}\)], "Output"] }, Open ]], Cell[BoxData[ \(Clear@history; history@list1_List := \(Take[list1, #] &\) /@ Range[0, Length@list1]\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[history@{1, 2, 3, 4}, 10000]\)], "Input"], Cell[BoxData[ \({0.46000000000000085`\ Second, {{}, {1}, {1, 2}, {1, 2, 3}, {1, 2, 3, 4}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(FoldList[Append[#1, \ #2] &, {}, {1, 2, 3, 4}]\)], "Input"], Cell[BoxData[ \({{}, {1}, {1, 2}, {1, 2, 3}, {1, 2, 3, 4}}\)], "Output"] }, Open ]], Cell["Equivalent but faster:", "Text"], Cell[BoxData[ \(Clear@history; history@list1_List := FoldList[Append[#1, \ #2] &, {}, list1]\)], "Input",\ InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[history@{1, 2, 3, 4}, 10000]\)], "Input"], Cell[BoxData[ \({0.19999999999999574`\ Second, {{}, {1}, {1, 2}, {1, 2, 3}, {1, 2, 3, 4}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Function determined by graph", "Subsubsection", CellTags->"c:13"], Cell["\<\ Cartesian graph of a function (not necessarily a \ permutation):\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(Rule @@ # &\) /@ {{1, 4}, {2, 5}, {3, 6}, {4, 1}, {5, 3}, {6, 2}}\)], "Input"], Cell[BoxData[ \({1 \[Rule] 4, 2 \[Rule] 5, 3 \[Rule] 6, 4 \[Rule] 1, 5 \[Rule] 3, 6 \[Rule] 2}\)], "Output"] }, Open ]], Cell[BoxData[{ \(\(Clear@transform;\)\), "\[IndentingNewLine]", \(transform[graph1_List]@list_List := ReplaceAll[list, \(Rule @@ # &\) /@ graph1]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(transform[{{1, 4}, {2, 5}, {3, 6}, {4, 1}, {5, 3}, {6, 2}}]@{5, 4, 4, 6, 6}\)], "Input"], Cell[BoxData[ \({3, 1, 1, 2, 2}\)], "Output"] }, Open ]], Cell["Inversion:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(transform[ Reverse /@ {{1, 4}, {2, 5}, {3, 6}, {4, 1}, {5, 3}, {6, 2}}]@\(transform[{{1, 4}, {2, 5}, {3, 6}, {4, 1}, {5, 3}, {6, 2}}]@{5, 4, 4, 6, 6}\)\ \[Equal] {5, 4, 4, 6, 6}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["ArgMax", "Subsubsection", CellTags->"c:14"], Cell["This is the core of any policy.", "Text"], Cell[BoxData[ \(list1 = {{2, 4}, {3, 1}, {1, 4}, {3, 3}}; function1 = Total;\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(antigraph = \({function1@#, #} &\) /@ list1\)], "Input"], Cell[BoxData[ \({{6, {2, 4}}, {4, {3, 1}}, {5, {1, 4}}, {6, {3, 3}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(max1 = Max[First /@ antigraph]\)], "Input"], Cell[BoxData[ \(6\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Cases[antigraph, {max1, ___}]\)], "Input"], Cell[BoxData[ \({{6, {2, 4}}, {6, {3, 3}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \({max1, Last /@ Cases[antigraph, {max1, ___}]}\)], "Input"], Cell[BoxData[ \({6, {{2, 4}, {3, 3}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(max1 =. ; antigraph =. ;\), "\n", \(With[{antigraph = \({function1@#, #} &\) /@ list1}, \[IndentingNewLine]With[{max1 = Max[First /@ antigraph]}, \[IndentingNewLine]{max1, Last /@ Cases[ antigraph, {max1, \ ___}]}\[IndentingNewLine]]\[IndentingNewLine]]\)}], "Input"], Cell[BoxData[ \({6, {{2, 4}, {3, 3}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(list1 =. ; function1 =. ;\)], "Input"], Cell[BoxData[{ \(\(Clear@maxAndArgMax;\)\), "\[IndentingNewLine]", \(maxAndArgMax[function1_, list1_List] := With[{antigraph = \({function1@#, #} &\) /@ list1}, \[IndentingNewLine]With[{max1 = Max[First /@ antigraph]}, \[IndentingNewLine]{max1, Last /@ Cases[ antigraph, {max1, ___}]}\[IndentingNewLine]]\ \[IndentingNewLine]]\)}], "Input", InitializationCell->True], Cell["Not needed eventually.", "Text"], Cell[BoxData[ \(\(argMax = Composition[Last, maxAndArgMax];\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(maxAndArgMax[Total, {{2, 4}, {3, 1}, {1, 4}, {3, 3}}]\)], "Input"], Cell[BoxData[ \({6, {{2, 4}, {3, 3}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(maxAndArgMax[Last, {{2, 4}, {3, 1}, {1, 4}, {3, 2}}]\)], "Input"], Cell[BoxData[ \({4, {{2, 4}, {1, 4}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(maxAndArgMax[First, {{2, 4}, {3, 1}, {1, 4}, {3, 2}}]\)], "Input"], Cell[BoxData[ \({3, {{3, 1}, {3, 2}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(maxAndArgMax[Last, {{2, 4}, {3, 1}, {1, 4}, {3, 2}}]\)], "Input"], Cell[BoxData[ \({4, {{2, 4}, {1, 4}}}\)], "Output"] }, Open ]], Cell["Consider only a sublist determined by positions.", "Text"], Cell[BoxData[{ \(\(list1 = {_, _, {2, 4}, {3, 1}, {1, 4}, _, {3, 2}};\)\), "\[IndentingNewLine]", \(\(position1 = {{3}, {4}, {5}, {7}};\)\)}], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(function1 =. ;\)\), "\[IndentingNewLine]", \(antigraph = Extract[MapIndexed[{#1, #2} &, list1], position1, MapAt[{function1@#, #} &, #, 1] &]\)}], "Input"], Cell[BoxData[ \({{{function1[{2, 4}], {2, 4}}, {3}}, {{function1[{3, 1}], {3, 1}}, {4}}, {{function1[{1, 4}], {1, 4}}, {5}}, {{function1[{3, 2}], {3, 2}}, {7}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[\(#[\([\(-1\), 1]\)] &\)@{{3, 2, 3}, {1, 2, 3}}, \(First@\(Last@#\) &\)@{{3, 2, 3}, {1, 2, 3}}, 300000]\)], "Input"], Cell[BoxData[ \({{0.9099999999999966`\ Second, 1.3300000000000054`\ Second}, {1, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(max1 = Max[\(#[\([1, 1]\)] &\) /@ antigraph]\)], "Input"], Cell[BoxData[ \(Max[function1[{1, 4}], function1[{2, 4}], function1[{3, 1}], function1[{3, 2}]]\)], "Output"] }, Open ]], Cell[BoxData[ \(\(function1 = First;\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(Cases[antigraph, {{max1, ___}, ___}]\)], "Input"], Cell[BoxData[ \({{{3, {3, 1}}, {4}}, {{3, {3, 2}}, {7}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \({\(MapAt[Last, #, 1] &\) /@ Cases[antigraph, {{max1, ___}, ___}], max1}\)], "Input"], Cell[BoxData[ \({{{{3, 1}, {4}}, {{3, 2}, {7}}}, 3}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(max1 =. ; antigraph =. ;\), "\n", \(With[{antigraph = Extract[MapIndexed[{#1, #2} &, list1], position1, MapAt[{function1@#, #} &, #, 1] &]}, \[IndentingNewLine]With[{max1 = Max[\(#[\([1, 1]\)] &\) /@ antigraph]}, \[IndentingNewLine]{max1, \(MapAt[Last, #, 1] &\) /@ Cases[antigraph, {{max1, ___}, ___}]}\[IndentingNewLine]]]\)}], \ "Input"], Cell[BoxData[ \({3, {{{3, 1}, {4}}, {{3, 2}, {7}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(function1 =. ; list1 =. ; position1 =. ;\)], "Input"], Cell[BoxData[{ \(\(Clear@subMaxAndArgMax;\)\), "\[IndentingNewLine]", \(subMaxAndArgMax[function1_, list1_List, position1_] := With[{antigraph = Extract[MapIndexed[{#1, #2} &, list1], position1, MapAt[{function1@#, #} &, #, 1] &]}, \[IndentingNewLine]With[{max1 = Max[\(#[\([1, 1]\)] &\) /@ antigraph]}, \[IndentingNewLine]{max1, \(MapAt[Last, #, 1] &\) /@ Cases[antigraph, {{max1, ___}, ___}]}\[IndentingNewLine]]]\), "\ \[IndentingNewLine]", \(subMaxAndArgMax[function1_, list1_List] := subMaxAndArgMax[function1, list1, \({#} &\) /@ Range@\(Length@list1\)]\)}], "Input", InitializationCell->True], Cell[BoxData[ \(\(argSubMax = Composition[Last, subMaxAndArgMax];\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(subMaxAndArgMax[ First, {{5, 1}, _, {2, 4}, {3, 1}, {1, 4}, _, {3, 2}, {3, 2}}, {{3}, {4}, {5}, {7}, {8}}]\)], "Input"], Cell[BoxData[ \({3, {{{3, 1}, {4}}, {{3, 2}, {7}}, {{3, 2}, {8}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(subMaxAndArgMax[#^2 &, {\(-1\), 3, 0, 2, 7, \(-4\)}, {{1}, {2}, {3}, {4}}]\)], "Input"], Cell[BoxData[ \({9, {{3, {2}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(subMaxAndArgMax[#^2 &, {\(-1\), 3, 0, 2, 7, \(-4\)}]\)], "Input"], Cell[BoxData[ \({49, {{7, {5}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(maxAndArgMax[#^2 &, {\(-1\), 3, 0, 2, 7, \(-4\)}]\)], "Input"], Cell[BoxData[ \({49, {7}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Quotient of list modulo function", "Subsubsection", CellTags->"c:15"], Cell[BoxData[{ \(\(list1 = {{3, 4, 1}, {2, 2, 2}, {2, 6, 3}, {2, 4, 4}};\)\), "\[IndentingNewLine]", \(\(function1 = #[\([2]\)] &;\)\)}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(antigraph = \({function1@#, #} &\) /@ list1\)], "Input"], Cell[BoxData[ \({{4, {3, 4, 1}}, {2, {2, 2, 2}}, {6, {2, 6, 3}}, {4, {2, 4, 4}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Split[Sort@antigraph, First@#1 \[Equal] First@#2 &]\)], "Input"], Cell[BoxData[ \({{{2, {2, 2, 2}}}, {{4, {2, 4, 4}}, {4, {3, 4, 1}}}, {{6, {2, 6, 3}}}}\)], "Output"] }, Open ]], Cell["Share isovalue.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\({#[\([1, 1]\)], Last /@ #} &\) /@ Split[Sort@antigraph, First@#1 \[Equal] First@#2 &]\)], "Input"], Cell[BoxData[ \({{2, {{2, 2, 2}}}, {4, {{2, 4, 4}, {3, 4, 1}}}, {6, {{2, 6, 3}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(antigraph =. ; list1 =. ; function1 =. ;\)], "Input"], Cell["\<\ Quotient of list modulo function, each class preceded by its \ isovalue. That is also the graph of the canonic injection or the level map.\ \ \>", "Text"], Cell[BoxData[{ \(\(Protect@withValues;\)\), "\[IndentingNewLine]", \(Clear@listQuotient; listQuotient[list1_List, function1_, withValues \[Rule] True] := With[{antigraph = \({function1@#, #} &\) /@ list1}, \({#[\([1, 1]\)], Last /@ #} &\) /@ Split[Sort[antigraph, OrderedQ[{First@#1, First@#2}] &], First@#1 \[Equal] First@#2 &]\[IndentingNewLine]]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(listQuotient[{{3, 4, 1}, {2, 2, 2}, {2, 6, 3}, {2, 4, 4}}, Part[#, 2] &, withValues \[Rule] True]\)], "Input"], Cell[BoxData[ \({{2, {{2, 2, 2}}}, {4, {{3, 4, 1}, {2, 4, 4}}}, {6, {{2, 6, 3}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(listQuotient[{1, \(-1\), 2, \(-2\)}, #^2 &, withValues \[Rule] True]\)], "Input"], Cell[BoxData[ \({{1, {1, \(-1\)}}, {4, {2, \(-2\)}}}\)], "Output"] }, Open ]], Cell["With repetition:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(listQuotient[{1, \(-1\), 2, \(-2\), 2}, #^2 &, withValues \[Rule] True]\)], "Input"], Cell[BoxData[ \({{1, {1, \(-1\)}}, {4, {2, \(-2\), 2}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{list1 = {1, 2, 7, 6, 5, 3, 5, 4, 3, 2, 1, 4, 5}}, First /@ listQuotient[list1, Identity, withValues \[Rule] True] \[Equal] Union@list1]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell["Without isovalues:", "Text"], Cell[BoxData[{ \(listQuotient[list1_List, function1_] := Split[Sort[list1, OrderedQ[{function1@#1, function1@#2}] &], function1@#1 \[Equal] function1@#2 &]\), "\[IndentingNewLine]", \(listQuotient[list1_List, function1_, withValues \[Rule] False] := listQuotient[list1, function1]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(listQuotient[{1, 2, 7, 6, 5, 3, 5, 4, 3, 2, 1, 4, 5}, Identity]\)], "Input"], Cell[BoxData[ \({{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5, 5}, {6}, {7}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(listQuotient[{{3, 5, 1}, {2, 2, 2}, {2, 6, 3}, {3, 4, 4}}, First, withValues \[Rule] False]\)], "Input"], Cell[BoxData[ \({{{2, 2, 2}, {2, 6, 3}}, {{3, 5, 1}, {3, 4, 4}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(listQuotient[{{3, 5, 1}, {2, 2, 2}, {2, 6, 3}, {3, 4, 4}}, First]\)], "Input"], Cell[BoxData[ \({{{2, 2, 2}, {2, 6, 3}}, {{3, 5, 1}, {3, 4, 4}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Last /@ listQuotient[{{3, 5, 1}, {2, 2, 2}, {2, 6, 3}, {3, 4, 4}}, First, withValues \[Rule] True]\)], "Input"], Cell[BoxData[ \({{{2, 2, 2}, {2, 6, 3}}, {{3, 5, 1}, {3, 4, 4}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[ listQuotient[{{3, 5, 1}, {2, 2, 2}, {2, 6, 3}, {3, 4, 4}}, First], Last /@ listQuotient[{{3, 5, 1}, {2, 2, 2}, {2, 6, 3}, {3, 4, 4}}, First, withValues \[Rule] True], 1000, compare]\)], "Input"], Cell[BoxData[ \({{0.0800000000000125`\ Second, 0.18000000000000682`\ Second}, {"same", {{{2, 2, 2}, {2, 6, 3}}, {{3, 5, 1}, {3, 4, 4}}}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Filling table from coordinates and values", "Subsubsection", CellTags->"c:16"], Cell["\<\ Coordinates are not necessarily positions. Some positions may not \ be filled.\ \>", "Text"], Cell[BoxData[ \(\(list1 = {{{x1, y1}, a11}, {{x1, y2}, a12}, {{x1, y3}, a13}, {{x2, y2}, a22}, {{x2, y3}, a23}};\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(Clear@function1; \(\((Evaluate[function1 @@ First@#] = Last@#)\) &\) /@ list1; \(?function1\)\)], "Input"], Cell["Global`function1", "Print", CellTags->"Info3341503991-8272511"], Cell[BoxData[ InterpretationBox[GridBox[{ {GridBox[{ {\(function1[x1, y1] = a11\)}, {" "}, {\(function1[x1, y2] = a12\)}, {" "}, {\(function1[x1, y3] = a13\)}, {" "}, {\(function1[x2, y2] = a22\)}, {" "}, {\(function1[x2, y3] = a23\)} }, GridBaseline->{Baseline, {1, 1}}, ColumnWidths->0.999, ColumnAlignments->{Left}]} }, GridBaseline->{Baseline, {1, 1}}, ColumnAlignments->{Left}], Definition[ "function1"], Editable->False]], "Print", CellTags->"Info3341503991-8272511"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Union /@ Transpose[First /@ list1]\)], "Input"], Cell[BoxData[ \({{x1, x2}, {y1, y2, y3}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(Outer[function1, ##] &\) @@ # &\)[ Union /@ Transpose[First /@ list1]]\)], "Input"], Cell[BoxData[ \({{a11, a12, a13}, {function1[x2, y1], a22, a23}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(MapAt[# /. function1@__ \[Rule] "\<\>" &, \({\(Outer[ function1, ##] &\) @@ #, #} &\)[ Union /@ Transpose[First /@ list1]], 1]\)], "Input"], Cell[BoxData[ \({{{a11, a12, a13}, {\*"\<\"\"\>", a22, a23}}, {{x1, x2}, {y1, y2, y3}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\(Clear@function1;\)\)], "Input"], Cell[TextData[{ "\[Wolf] Eliminating the variable ", StyleBox["function1", "Input"], " is possible but lengthy." }], "Text"], Cell[BoxData[ \(Clear@fill; fill@list1_List := Block[{function1}, \[IndentingNewLine]\(\((function1[#[\([1, 1]\)], #[\([1, \(-1\)]\)]] = Last@#)\) &\) /@ list1; \[IndentingNewLine]MapAt[# /. function1@__ \[Rule] "\<\>" &, \({\(Outer[function1, ##, 1, 1] &\) @@ #, #} &\)[ Union /@ Transpose[First /@ list1]], 1]\[IndentingNewLine]]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(fill@{{{x1, y1}, a11}, {{x1, y2}, a12}, {{x1, y3}, a13}, {{x2, y2}, a22}, {{x2, y3}, a23}}\)], "Input"], Cell[BoxData[ \({{{a11, a12, a13}, {\*"\<\"\"\>", a22, a23}}, {{x1, x2}, {y1, y2, y3}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(TableForm[First@#, TableHeadings \[Rule] Last@#] &\)@\(fill@{{{x1, y1}, a11}, {{x1, y2}, a12}, {{x1, y3}, a13}, {{x2, y2}, a22}, {{x2, y3}, a23}}\)\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"\"\>", "y1", "y2", "y3"}, {"x1", "a11", "a12", "a13"}, {"x2", "\<\"\"\>", "a22", "a23"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$, TableHeadings -> {{x1, x2}, {y1, y2, y3}}]]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(TableForm[First@#, TableHeadings \[Rule] Last@#] &\)@\(fill@{{{1, 1}, function1@a}, {{3, 3}, b}}\)\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"\"\>", "1", "3"}, {"1", \(function1[a]\), "\<\"\"\>"}, {"3", "\<\"\"\>", "b"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$, TableHeadings -> {{1, 3}, {1, 3}}]]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(function1 = #^2 &\)], "Input"], Cell[BoxData[ \(#1\^2 &\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(TableForm[First@#, TableHeadings \[Rule] Last@#] &\)@\(fill@{{{1, 1}, function1@a}, {{3, 3}, b}}\)\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"\"\>", "1", "3"}, {"1", \(a\^2\), "\<\"\"\>"}, {"3", "\<\"\"\>", "b"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$, TableHeadings -> {{1, 3}, {1, 3}}]]]], "Output"] }, Open ]], Cell[BoxData[ \(function1 =. \)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(fill@{{{1, 1, 1}, a}, {{3, 3, 3}, b}}\)], "Input"], Cell[BoxData[ \({{{{\*"\<\"\"\>", \*"\<\"\"\>"}, {\*"\<\"\"\>", \*"\<\"\"\>"}}, {{\*"\<\ \"\"\>", \*"\<\"\"\>"}, {\*"\<\"\"\>", \*"\<\"\"\>"}}}, {{1, 3}, {1, 3}, {1, 3}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Slicing", "Subsubsection", FontWeight->"Bold", CellTags->"c:17"], Cell["Cut a list into contiguous sublists, in some shape.", "Text"], Cell[BoxData[{ \(\(Clear@slice;\)\), "\[IndentingNewLine]", \(\(slice[{}]@{} = {};\)\), "\[IndentingNewLine]", \(slice[shape : {_Integer .. }]@list1_List /; Length@list1 \[Equal] Total@shape && Apply[And, \(# \[GreaterEqual] 0 &\) /@ shape] := Prepend[slice[Rest@shape]@Drop[list1, First@shape], Take[list1, First@shape]\[IndentingNewLine]]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(slice[{8, 2}]@{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}\)], "Input"], Cell[BoxData[ \({{1, 2, 3, 4, 5, 6, 7, 8}, {9, 10}}\)], "Output"] }, Open ]], Cell[TextData[{ "Generalizes ", StyleBox["Partition", "Input"], "." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(compare[slice[{5, 5}]@\(Range@10\), Partition[Range@10, 5]]\)], "Input"], Cell[BoxData[ \({"same", {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(slice[{3, 2, 5}]@\(Range@10\)\)], "Input"], Cell[BoxData[ \({{1, 2, 3}, {4, 5}, {6, 7, 8, 9, 10}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(slice[{3, 2, 0, 5}]@\(Range@10\)\)], "Input"], Cell[BoxData[ \({{1, 2, 3}, {4, 5}, {}, {6, 7, 8, 9, 10}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(slice[{1}]@{}\)], "Input"], Cell[BoxData[ \(\(slice[{1}]\)[{}]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(slice[{}]@{}\)], "Input"], Cell[BoxData[ \({}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(slice[{\(-1\), 5, 6}]@\(Range@10\)\)], "Input"], Cell[BoxData[ \(\(slice[{\(-1\), 5, 6}]\)[{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}]\)], "Output"] }, Open ]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Formats", "Subsection", CellTags->"c:18"], Cell[CellGroupData[{ Cell["Long table slicing", "Subsubsection", CellTags->"c:20"], Cell[BoxData[{ \(\(\(Clear@tableFormSlice;\)\(\[IndentingNewLine]\) \)\), "\n", \(\(\(\(tableFormSlice[shape_]\)[list1_, options___] := \(TableForm[#, options] &\) /@ slice[shape]@list1;\)\(\n\) \)\), "\[IndentingNewLine]", \(\(tableFormSlice[shape_]\)[list1_, options1___, TableHeadings \[Rule] headings_, options2___] := \[IndentingNewLine]MapThread[ TableForm[#1, options1, TableHeadings \[Rule] Prepend[Rest@headings, #2], options2] &, {slice[shape]@list1, slice[shape]@\(First@headings\)}]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint@\(tableFormSlice[{1, 2}]\)[{{1, 2}, {3, 4}, {5, 6}}]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"1", "2"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Print"], Cell[BoxData[ TagBox[GridBox[{ {"3", "4"}, {"5", "6"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Print"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(TableForm[{{1, 2}, {3, 4}, {5, 6}}, TableHeadings \[Rule] {{l1, l2, l3}, {c1, c2}}]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"\"\>", "c1", "c2"}, {"l1", "1", "2"}, {"l2", "3", "4"}, {"l3", "5", "6"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$, TableHeadings -> {{l1, l2, l3}, {c1, c2}}]]]], "Output"] }, Open ]], Cell["For long tables, one slice per page.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint@\(tableFormSlice[{1, 1, 1}]\)[{{1, 2}, {3, 4}, {5, 6}}, TableHeadings \[Rule] {{l1, l2, l3}, {c1, c2}}]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"\"\>", "c1", "c2"}, {"l1", "1", "2"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$, TableHeadings -> {{l1}, {c1, c2}}]]]], "Print"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"\"\>", "c1", "c2"}, {"l2", "3", "4"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$, TableHeadings -> {{l2}, {c1, c2}}]]]], "Print"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"\"\>", "c1", "c2"}, {"l3", "5", "6"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$, TableHeadings -> {{l3}, {c1, c2}}]]]], "Print"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Boxes", "Subsubsection", CellTags->"c:19"], Cell[BoxData[ \(\(scanPrint = Scan[Print, #] &;\)\)], "Input", InitializationCell->True], Cell["\<\ In the 421 game, combinations would be spelled in decreasing order \ (and no separator is needed between faces).\ \>", "Text"], Cell[BoxData[{ \(\(Clear@combinationBox;\)\), "\n", \(\(combinationBox@{} = DisplayForm@\[EmptySet];\)\), "\n", \(\(combinationBox@combination_ := DisplayForm@\(FrameBox@\(RowBox@\(Reverse@ combination\)\)\);\)\)}], "Input", InitializationCell->True], Cell[BoxData[{ \(\(Clear@grayCombinationBox;\)\), "\[IndentingNewLine]", \(\(grayCombinationBox@{} = DisplayForm@\[EmptySet];\)\), "\[IndentingNewLine]", \(\(grayCombinationBox@ combination_ := \(DisplayForm@ StyleBox[#, Background \[Rule] GrayLevel[0.5]] &\)@\(FrameBox@\(RowBox@\(Reverse@ combination\)\)\);\)\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint@ Through[{combinationBox, grayCombinationBox}@{1, 2}]\)], "Input"], Cell[BoxData[ TagBox[ FrameBox[\(2 1\)], DisplayForm]], "Print"], Cell[BoxData[ TagBox[ StyleBox[ FrameBox[\(2 1\)], Background->GrayLevel[0.500008]], DisplayForm]], "Print"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint@Through[{combinationBox, grayCombinationBox}@{}]\)], "Input"], Cell[BoxData[ TagBox["\[EmptySet]", DisplayForm]], "Print"], Cell[BoxData[ TagBox["\[EmptySet]", DisplayForm]], "Print"] }, Open ]], Cell[BoxData[{ \(\(noSymbol = If[NumberQ@#, #, Switch[#, False, False, True, True, _, "\"]] &;\)\), "\n", \(\(noRational = Switch[#, _Rational, If[Abs@# \[GreaterEqual] 0.001, PaddedForm[1. #, {4, 3}], ScientificForm[1. #, 1]], _, #] &;\)\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \({noSymbol[4/9], noSymbol@_}\)], "Input"], Cell[BoxData[ \({4\/9, "?"}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \({noRational[4/9], noRational@1, noRational@_, noRational[\(-1\)/23], noRational[1/3123]}\)], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ TagBox[ InterpretationBox["\<\" 0.444\"\>", 0.44444444444444442, AutoDelete->True], (PaddedForm[ #, {4, 3}]&)], ",", "1", ",", "_", ",", TagBox[ InterpretationBox["\<\"-0.043\"\>", -0.043478260869565216, AutoDelete->True], (PaddedForm[ #, {4, 3}]&)], ",", TagBox[ InterpretationBox[\("3."\[Times]10\^"-4"\), 0.00032020493115593977, AutoDelete->True], (ScientificForm[ #, 1]&)]}], "}"}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(noRational@noSymbol[4/9]\)], "Input"], Cell[BoxData[ TagBox[ InterpretationBox["\<\" 0.444\"\>", 0.44444444444444442, AutoDelete->True], (PaddedForm[ #, {4, 3}]&)]], "Output"] }, Open ]], Cell[TextData[{ StyleBox["\[Wolf] ", "Input", FontWeight->"Plain"], StyleBox["noRational", "Input"], " itself is a symbol." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(noSymbol@noRational[4/9]\)], "Input"], Cell[BoxData[ \("?"\)], "Output"] }, Open ]], Cell[BoxData[{ \(\(approximationBox = DisplayForm@ RowBox[{#, "\<\[TildeEqual]\>", noRational@#}] &;\)\), "\[IndentingNewLine]", \(\(smallBox = DisplayForm[ GridBox[{{#}}, ColumnWidths \[Rule] 20, ColumnAlignments \[Rule] Left]] &;\)\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[{ \(approximationBox[4/9]\), "\n", \(smallBox@Expand[\((1 + _)\)^15]\)}], "Input"], Cell[BoxData[ TagBox[ RowBox[{\(4\/9\), "\[TildeEqual]", TagBox[ InterpretationBox["\<\" 0.444\"\>", 0.44444444444444442, AutoDelete->True], (PaddedForm[ #, {4, 3}]&)]}], DisplayForm]], "Output"], Cell[BoxData[ TagBox[GridBox[{ {\(1 + 15\ _ + 105\ _\^2 + 455\ _\^3 + 1365\ _\^4 + 3003\ _\^5 + 5005\ _\^6 + 6435\ _\^7 + 6435\ _\^8 + 5005\ _\^9 + 3003\ _\^10 + 1365\ _\^11 + 455\ _\^12 + 105\ _\^13 + 15\ _\^14 + _\^15\)} }, ColumnWidths->20, ColumnAlignments->{Left}], DisplayForm]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Line labeling", "Subsubsection", CellTags->"c:21"], Cell[BoxData[ \(<< Utilities`FilterOptions`\)], "Input", InitializationCell->True], Cell[BoxData[{ \(ClearAll@labeledLine; Protect@cursor;\), "\n", \(Options@labeledLine = {cursor \[Rule] 1/2, Background \[Rule] White}; labeledLine[points_, label_, options___Rule] := {Line@points, Text[label, Dot[\({1 - cursor, cursor} /. {options}\) /. Options@labeledLine, points], FilterOptions[Text, options, Sequence@\(Options@labeledLine\)]]}\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[{ \(labeledLine[{{1, 2}, {2, 1}}, toto, cursor \[Rule] .2]\), "\[IndentingNewLine]", \(\(Show@\(Graphics@%\);\)\)}], "Input"], Cell[BoxData[ \({Line[{{1, 2}, {2, 1}}], Text[toto, {1.2000000000000002`, 1.8`}, Background \[Rule] GrayLevel[1]]}\)], "Output"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -0.928571 0.952381 -0.573889 0.588604 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g .5 Mabswid [ ] 0 setdash .02381 .60332 m .97619 .01472 L s 1 g .21429 .4856 -14 -6 Mabsadd m .21429 .4856 14 -6 Mabsadd L .21429 .4856 14 6 Mabsadd L .21429 .4856 -14 6 Mabsadd L fill 0 g gsave .21429 .4856 -75 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (toto) show 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{62, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg[ooooo0_l0000dooooo`00jOooool00ol0003oooooooooo`0dooooo`00 ioooool2o`0003Oooooo003Vooooo`03o`000?oooooooooo03Oooooo003Tooooo`;o0000>_ooool0 0>;ooooo0_l0000looooo`00hOooool00ol0003oooooooooo`0looooo`00goooool2o`0003oooooo 003Nooooo`03o`000?oooooooooo03oooooo003Looooo`;o0000@_ooool00=[ooooo0_l00014oooo o`00fOooool00ol0003oooooooooo`14ooooo`00eoooool2o`0004Oooooo003Eooooo`;o0000BOoo ool00=Cooooo00?o0000ooooooooool0BOooool00=;ooooo0_l0001ooooo`;o0000T?ooool008gooooo00?o0000ooooooooool0T?ooool008_ooooo0_l0002C ooooo`00ROooool2o`0009Gooooo0028ooooo`03o`000?oooooooooo09Gooooo0026ooooo`;o0000 V?ooool008Cooooo0_l0002Jooooo`00Poooool00ol0003oooooooooo`2Jooooo`00POooool2o`00 09gooooo0020ooooo`03o`000?oooooooooo09gooooo001nooooo`;o0000X?ooool007cooooo0_l0 002Rooooo`00Noooool00ol0003oooooooooo`2Rooooo`00NOooool2o`000:Gooooo001hooooo`03 o`000?oooooooooo0:Gooooo001fooooo`;o0000Z?ooool007Cooooo0_l0002Zooooo`00Loooool0 0ol0003oooooooooo`2Zooooo`00LOooool2o`000:gooooo001_ooooo`;o0000[oooool006kooooo 00?o0000ooooooooool0[oooool006cooooo0_l0002booooo`00Joooool00ol0003oooooooooo`2b ooooo`00JOooool2o`000;Gooooo001Wooooo`;o0000]oooool006Kooooo00?o0000ooooooooool0 ]oooool006Cooooo0_l0002jooooo`00H_ooool2o`000;cooooo001Qooooo`03o`000?oooooooooo 0;cooooo001Oooooo`;o0000_oooool005kooooo00?o0000ooooooooool0_oooool005cooooo0_l0 0032ooooo`00F_ooool2o`000kooooo000_ooooo`03o`000?oooooooooo0>kooooo000]oooo o`;o0000lOooool002_ooooo0_l0003cooooo`00:_ooool00ol0003oooooooooo`3cooooo`00:?oo ool2o`000?Kooooo000Wooooo`03o`000?oooooooooo0?Kooooo000Uooooo`;o0000nOooool002?o oooo0_l0003kooooo`008_ooool00ol0003oooooooooo`3kooooo`008?ooool2o`000?kooooo000N ooooo`;o0000ooooool1ooooo`007Oooool00ol0003oooooooooo`3oooooo`7ooooo000Kooooo`;o 0000ooooool4ooooo`006_ooool00ol0003oooooooooo`3oooooo`Cooooo000Hooooo`;o0000oooo ool7ooooo`005_ooool2o`000?oooooo2Oooool001Gooooo00?o0000ooooooooool0ooooool9oooo o`004oooool2o`000?oooooo3?ooool001;ooooo00?o0000ooooooooool0ooooool"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {0.973697, 0.974995, \ 0.00366761, 0.00593432}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(labeledLine[{{1, 2}, {3\/2, 3}}, 1\/3, cursor \[Rule] .2, Background \[Rule] Yellow, TextStyle \[Rule] {FontSize \[Rule] 20}]\), "\[IndentingNewLine]", \(\(Show@\(Graphics@%\);\)\)}], "Input"], Cell[BoxData[ \({Line[{{1, 2}, {3\/2, 3}}], Text[1\/3, {1.1`, 2.2`}, Background \[Rule] RGBColor[1, 1, 0], TextStyle \[Rule] {FontSize \[Rule] 20}, Background \[Rule] GrayLevel[1]]}\)], "Output"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -1.88095 1.90476 -1.16249 0.588604 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g .5 Mabswid [ ] 0 setdash .02381 .01472 m .97619 .60332 L s 1 1 0 r .21429 .13244 -14.25 -19.1875 Mabsadd m .21429 .13244 14.25 -19.1875 Mabsadd L .21429 .13244 14.25 19.1875 Mabsadd L .21429 .13244 -14.25 19.1875 Mabsadd L fill 0 g gsave .21429 .13244 -75.25 -23.1875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 46.375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 69.250 17.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 20.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 20.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 0.000 setrgbcolor 0.750 setlinewidth 66.375 23.625 moveto 17.625 0.000 rlineto stroke 69.250 41.062 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 20.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{62, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgooooo`03o`000?oooooooooo0?oooooo4?ooool000oooooo0_l0 003ooooooa3ooooo000Aooooo`;o0000ooooool>ooooo`004oooool00ol0003oooooooooo`3ooooo o`_ooooo000Dooooo`;o0000ooooool;ooooo`005_ooool00ol0003oooooooooo`3oooooo`Sooooo 000Gooooo`;o0000ooooool8ooooo`006Oooool2o`000?oooooo1_ooool001_ooooo00?o0000oooo ooooool0ooooool3ooooo`007?ooool2o`000?oooooo0oooool001kooooo00?o0000ooooooooool0 ooooool001oooooo0_l0000>oooooacoool0eOooool0027ooooo0_l0000oooo0003o`000?ooo`3oool000_oool0eOooool002oooooo3_ooo`000ol0003oool0 oooo000;oooo00;o0000doooool002oooooo3_ooo`000ol0003oool0oooo000;oooo00;ooooo00?o 0000ooooooooool0d?ooool002oooooo3_ooo`000ol0003oool0oooo000;oooo00?ooooo0_l0003@ ooooo`00;oooool>oooo0003o`000?ooo`3oool000_oool01Oooool2o`000oooo0003o`000?ooo`3oool000_oool03?ooool0 0ol0003oooooooooo`36ooooo`00;oooool;oooo0004o`000?l@403oEED0o`0000goool03Oooool2 o`000ooooo`03o`000?oooooooooo08oooooo002?ooooo`;o0000Soooool0097ooooo00?o 0000ooooooooool0S?ooool009;ooooo0_l0002ooooo`;o0000D?ooool00=3ooooo0_l0001>ooooo`00d_ooool00ol0003ooooooooo o`1;ooooo`00doooool2o`0004_ooooo003Eooooo`03o`000?oooooooooo04Sooooo003Fooooo`;o 0000B?ooool00=Sooooo0_l00016ooooo`00f_ooool00ol0003oooooooooo`13ooooo`00foooool2 o`0004?ooooo003Mooooo`;o0000@Oooool00=oooooo00?o0000ooooooooool0?_ooool00>3ooooo 0_l0000nooooo`00h_ooool00ol0003oooooooooo`0kooooo`00hoooool2o`0003_ooooo003Uoooo o`;o0000>Oooool00>Oooooo00?o0000ooooooooool0=_ooool00>Sooooo0_l0000fooooo`00j_oo ool00ol0003oooooooooo`0cooooo`00joooool2o`0003?ooooo003]ooooo`;o0000oo oooo00?o0000ooooooooool0;_ooool00?3ooooo0_l0000^ooooo`00l_ooool2o`0002cooooo003d ooooo`03o`000?oooooooooo02Wooooo003eooooo`;o0000:Oooool00?Oooooo00?o0000oooooooo ool09_ooool00?Sooooo0_l0000Vooooo`00n_ooool2o`0002Cooooo003looooo`03o`000?oooooo oooo027ooooo003mooooo`;o00008Oooool00?oooooo0_l0000Oooooo`00ooooool2ooooo`03o`00 0?oooooooooo01cooooo003oooooo`?ooooo0_l0000Looooo`00ooooool5ooooo`03o`000?oooooo oooo01Wooooo003oooooo`Kooooo0_l0000Iooooo`00ooooool8ooooo`;o00005oooool00?oooooo 2_ooool00ol0003oooooooooo`0Dooooo`00ooooool;ooooo`;o00005?ooool00?oooooo3Oooool0 0ol0003oooooooooo`0Aooooo`00ooooool>ooooo`;o00004Oooool00?oooooo4?ooool2o`0000oo oooo003ooooooa;ooooo00?o0000ooooooooool03?ooool00?oooooo4oooool2o`0000cooooo003o oooooaGooooo0_l0000:ooooo`00oooooolGooooo`03o`000?oooooooooo00Oooooo003ooooooaSo oooo00?o0000ooooooooool01_ooool00?oooooo8Oooool00?oooooo8Oooool00?oooooo8Oooool0 0?oooooo8Oooool00001\ \>"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {0.986849, 1.97499, \ 0.00183381, 0.00593432}}] }, Open ]] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Combinations", "Section", CellTags->"c:22"], Cell[CellGroupData[{ Cell["Generalizing finite set algebra", "Subsection", CellTags->"c:23"], Cell[CellGroupData[{ Cell["All combinations", "Subsubsection", CellTags->"c:24"], Cell[TextData[{ "Combinations are represented canonically as increasing lists, so that \ combination identity can be readilty checked with ", StyleBox["Identity", "Input"], " (without prior sorting). " }], "Text"], Cell[BoxData[{ \(\(Protect@combination;\)\), "\[IndentingNewLine]", \(branch[ combination \[Rule] combination1_] := \(Append[combination1, #] &\) /@ Range[Last@combination1, f]\)}], "Input"], Cell[BoxData[ \(\({d = 3, f = 4};\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(branch[combination \[Rule] {1, 2}]\)], "Input"], Cell[BoxData[ \({{1, 2, 2}, {1, 2, 3}, {1, 2, 4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[combination \[Rule] #] &\) /@ %\)], "Input"], Cell[BoxData[ \({{{1, 2, 2, 2}, {1, 2, 2, 3}, {1, 2, 2, 4}}, {{1, 2, 3, 3}, {1, 2, 3, 4}}, {{1, 2, 4, 4}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(NestList[ Flatten[\(branch[combination \[Rule] #] &\) /@ #, 1] &, {{1, 2}}, 2]\)], "Input"], Cell[BoxData[ \({{{1, 2}}, {{1, 2, 2}, {1, 2, 3}, {1, 2, 4}}, {{1, 2, 2, 2}, {1, 2, 2, 3}, {1, 2, 2, 4}, {1, 2, 3, 3}, {1, 2, 3, 4}, {1, 2, 4, 4}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Nest[Flatten[\(branch[combination \[Rule] #] &\) /@ #, 1] &, {{3}}, d - 1]\)], "Input"], Cell[BoxData[ \({{3, 3, 3}, {3, 3, 4}, {3, 4, 4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Flatten[\(With[{f1 = #}, Nest[Flatten[\(branch[combination \[Rule] #] &\) /@ #, 1] &, {{f1}}, d - 1]] &\) /@ Range@f, 1]\)], "Input"], Cell[BoxData[ \({{1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 1, 4}, {1, 2, 2}, {1, 2, 3}, {1, 2, 4}, {1, 3, 3}, {1, 3, 4}, {1, 4, 4}, {2, 2, 2}, {2, 2, 3}, {2, 2, 4}, {2, 3, 3}, {2, 3, 4}, {2, 4, 4}, {3, 3, 3}, {3, 3, 4}, {3, 4, 4}, {4, 4, 4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Union[Sort /@ Distribute[Table[Range@f, {d}], List]]\)], "Input"], Cell[BoxData[ \({{1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 1, 4}, {1, 2, 2}, {1, 2, 3}, {1, 2, 4}, {1, 3, 3}, {1, 3, 4}, {1, 4, 4}, {2, 2, 2}, {2, 2, 3}, {2, 2, 4}, {2, 3, 3}, {2, 3, 4}, {2, 4, 4}, {3, 3, 3}, {3, 3, 4}, {3, 4, 4}, {4, 4, 4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(\({d = 3, f = 6};\)\), "\n", \(zoomTiming[ Flatten[\(With[{f1 = #}, Nest[Flatten[\(branch[combination \[Rule] #] &\) /@ #, 1] &, {{f1}}, d - 1]] &\) /@ Range@f, 1], \[IndentingNewLine]Union[ Sort /@ Distribute[Table[Range@f, {d}], List]], \[IndentingNewLine]1000, compare]\), "\n", \(\({d =. , f =. };\)\)}], "Input"], Cell[BoxData[ \({{1.5300000000000011`\ Second, 0.8400000000000034`\ Second}, {"same", {{1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 1, 4}, {1, 1, 5}, {1, 1, 6}, {1, 2, 2}, {1, 2, 3}, {1, 2, 4}, {1, 2, 5}, {1, 2, 6}, {1, 3, 3}, {1, 3, 4}, {1, 3, 5}, {1, 3, 6}, {1, 4, 4}, {1, 4, 5}, {1, 4, 6}, {1, 5, 5}, {1, 5, 6}, {1, 6, 6}, {2, 2, 2}, {2, 2, 3}, {2, 2, 4}, {2, 2, 5}, {2, 2, 6}, {2, 3, 3}, {2, 3, 4}, {2, 3, 5}, {2, 3, 6}, {2, 4, 4}, {2, 4, 5}, {2, 4, 6}, {2, 5, 5}, {2, 5, 6}, {2, 6, 6}, {3, 3, 3}, {3, 3, 4}, {3, 3, 5}, {3, 3, 6}, {3, 4, 4}, {3, 4, 5}, {3, 4, 6}, {3, 5, 5}, {3, 5, 6}, {3, 6, 6}, {4, 4, 4}, {4, 4, 5}, {4, 4, 6}, {4, 5, 5}, {4, 5, 6}, {4, 6, 6}, {5, 5, 5}, {5, 5, 6}, {5, 6, 6}, {6, 6, 6}}}}\)], "Output"] }, Open ]], Cell["\<\ Not needed eventually but left only for the general idea of \ branching.\ \>", "Text"], Cell[BoxData[ \(branch[combination \[Rule] combination1_] =. ; Unprotect@combination;\)], "Input"], Cell[BoxData[ \(Clear@allCombinations; allCombinations[d_Integer, f_Integer] := Union[Sort /@ Distribute[Table[Range@f, {d}], List]]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[{ \(allCombinations[0, 0]\), "\[IndentingNewLine]", \(allCombinations[0, 1]\), "\[IndentingNewLine]", \(allCombinations[1, 0]\), "\[IndentingNewLine]", \(allCombinations[2, 0]\)}], "Input"], Cell[BoxData[ \({{}}\)], "Output"], Cell[BoxData[ \({{}}\)], "Output"], Cell[BoxData[ \({}\)], "Output"], Cell[BoxData[ \({}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint[\(allCombinations[#, 3] &\) /@ Range@3]\)], "Input"], Cell[BoxData[ \({{1}, {2}, {3}}\)], "Print"], Cell[BoxData[ \({{1, 1}, {1, 2}, {1, 3}, {2, 2}, {2, 3}, {3, 3}}\)], "Print"], Cell[BoxData[ \({{1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 2, 2}, {1, 2, 3}, {1, 3, 3}, {2, 2, 2}, {2, 2, 3}, {2, 3, 3}, {3, 3, 3}}\)], "Print"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"With", "[", RowBox[{\({d = 3, f = 6}\), ",", RowBox[{"compare", "[", RowBox[{\(Length@allCombinations[d, f]\), ",", StyleBox[\(Binomial[d + f - 1, d]\), FontColor->RGBColor[1, 0, 0]]}], "]"}]}], "]"}]], "Input"], Cell[BoxData[ \({"same", 56}\)], "Output"] }, Open ]], Cell["All subcombinations.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 3, f = 6}, \[IndentingNewLine]zoomTiming[\[IndentingNewLine]Flatten[\(\ allCombinations[#, f] &\) /@ Range[0, d], 1], Distribute[Table[Prepend[List /@ Range[f], {}], {d}], List, List, Union@{##} &, Composition[Sort, Join]], \(DeleteCases[#, 0] &\) /@ Union[Sort /@ Distribute[Table[Range[0, f], {d}], List]], 100, compare]\[IndentingNewLine]]\)], "Input"], Cell[BoxData[ \({{0.12999999999999545`\ Second, 0.3100000000000023`\ Second, 0.25`\ Second}, {"same", {{}, {1}, {2}, {3}, {4}, {5}, {6}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {2, 2}, {2, 3}, {2, 4}, {2, 5}, {2, 6}, {3, 3}, {3, 4}, {3, 5}, {3, 6}, {4, 4}, {4, 5}, {4, 6}, {5, 5}, {5, 6}, {6, 6}, {1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 1, 4}, {1, 1, 5}, {1, 1, 6}, {1, 2, 2}, {1, 2, 3}, {1, 2, 4}, {1, 2, 5}, {1, 2, 6}, {1, 3, 3}, {1, 3, 4}, {1, 3, 5}, {1, 3, 6}, {1, 4, 4}, {1, 4, 5}, {1, 4, 6}, {1, 5, 5}, {1, 5, 6}, {1, 6, 6}, {2, 2, 2}, {2, 2, 3}, {2, 2, 4}, {2, 2, 5}, {2, 2, 6}, {2, 3, 3}, {2, 3, 4}, {2, 3, 5}, {2, 3, 6}, {2, 4, 4}, {2, 4, 5}, {2, 4, 6}, {2, 5, 5}, {2, 5, 6}, {2, 6, 6}, {3, 3, 3}, {3, 3, 4}, {3, 3, 5}, {3, 3, 6}, {3, 4, 4}, {3, 4, 5}, {3, 4, 6}, {3, 5, 5}, {3, 5, 6}, {3, 6, 6}, {4, 4, 4}, {4, 4, 5}, {4, 4, 6}, {4, 5, 5}, {4, 5, 6}, {4, 6, 6}, {5, 5, 5}, {5, 5, 6}, {5, 6, 6}, {6, 6, 6}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(Clear@allSubcombinations; allSubcombinations[d_Integer, f_Integer] := Flatten[\(allCombinations[#, f] &\) /@ Range[0, d], 1]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(allSubcombinations[3, 6]\)], "Input"], Cell[BoxData[ \({{}, {1}, {2}, {3}, {4}, {5}, {6}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {2, 2}, {2, 3}, {2, 4}, {2, 5}, {2, 6}, {3, 3}, {3, 4}, {3, 5}, {3, 6}, {4, 4}, {4, 5}, {4, 6}, {5, 5}, {5, 6}, {6, 6}, {1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 1, 4}, {1, 1, 5}, {1, 1, 6}, {1, 2, 2}, {1, 2, 3}, {1, 2, 4}, {1, 2, 5}, {1, 2, 6}, {1, 3, 3}, {1, 3, 4}, {1, 3, 5}, {1, 3, 6}, {1, 4, 4}, {1, 4, 5}, {1, 4, 6}, {1, 5, 5}, {1, 5, 6}, {1, 6, 6}, {2, 2, 2}, {2, 2, 3}, {2, 2, 4}, {2, 2, 5}, {2, 2, 6}, {2, 3, 3}, {2, 3, 4}, {2, 3, 5}, {2, 3, 6}, {2, 4, 4}, {2, 4, 5}, {2, 4, 6}, {2, 5, 5}, {2, 5, 6}, {2, 6, 6}, {3, 3, 3}, {3, 3, 4}, {3, 3, 5}, {3, 3, 6}, {3, 4, 4}, {3, 4, 5}, {3, 4, 6}, {3, 5, 5}, {3, 5, 6}, {3, 6, 6}, {4, 4, 4}, {4, 4, 5}, {4, 4, 6}, {4, 5, 5}, {4, 5, 6}, {4, 6, 6}, {5, 5, 5}, {5, 5, 6}, {5, 6, 6}, {6, 6, 6}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Eulerian (occupation number) vector form", "Subsubsection", CellTags->"c:25"], Cell[TextData[{ "A dice system has a ", StyleBox["Lagrangian", FontSlant->"Italic"], " form, the face ", StyleBox["combination", FontSlant->"Italic"], ", and an ", StyleBox["Eulerian", FontSlant->"Italic"], " form, the face occupation number ", StyleBox["vector", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[{ \(\(Clear@combinationToVector;\)\), "\[IndentingNewLine]", \(combinationToVector@{} = {}; combinationToVector@combination_List := \(Count[combination, #] &\) /@ Range@\(Last@combination\)\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(combinationToVector@{2, 3, 3, 5, 5, 5}\)], "Input"], Cell[BoxData[ \({0, 1, 2, 0, 3}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(combinationToVector@{1, 2, 4}\)], "Input"], Cell[BoxData[ \({1, 1, 0, 1}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(combinationToVector@{}\)], "Input"], Cell[BoxData[ \({}\)], "Output"] }, Open ]], Cell[BoxData[ \(Clear@vectorToCombination; vectorToCombination@vector_List := Flatten[MapIndexed[Table[First@#2, {#1}] &, vector], 1]\)], "Input", InitializationCell->True], Cell["\<\ Check: both applications are reciprocal bijections to \ eachother.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(vectorToCombination@\(combinationToVector@{2, 2, 3, 4}\)\)], "Input"], Cell[BoxData[ \({2, 2, 3, 4}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(combinationToVector@\(vectorToCombination@{2, 2, 3, 4}\)\)], "Input"], Cell[BoxData[ \({2, 2, 3, 4}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Apply[ And, \(vectorToCombination@\(combinationToVector@#\) \[Equal] # &\) /@ allCombinations[4, 6]]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Apply[ And, \(vectorToCombination@\(combinationToVector@#\) \[Equal] # &\) /@ allCombinations[6, 2]]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Element query", "Subsubsection", CellTags->"c:26"], Cell[CellGroupData[{ Cell[BoxData[ \({4 \[Element] Integers, 4 \[Element] {1, 2, 3, 4}}\)], "Input"], Cell[BoxData[ \({True, 4 \[Element] {1, 2, 3, 4}}\)], "Output"] }, Open ]], Cell[BoxData[ \(myElement[x_, list1_List] := Not[Cases[list1, x] \[Equal] {}]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(0~myElement~{1}\)], "Input"], Cell[BoxData[ \(False\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(0~myElement~{0}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(4~myElement~{1, 4, 3, 7, 3, 4}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[Not[Cases[{1, 4, 3, 7, 3, 4}, 7] \[Equal] {}], Switch[Cases[{1, 4, 3, 7, 3, 4}, 7], {}, False, _, True], 100000, compare]\)], "Input"], Cell[BoxData[ \({{1.210000000000008`\ Second, 1.6399999999999864`\ Second}, True}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[Not[Cases[{1, 4, 3, 7, 3, 4}, \(-1\)] \[Equal] {}], Switch[Cases[{1, 4, 3, 7, 3, 4}, \(-1\)], {}, False, _, True], 100000, compare]\)], "Input"], Cell[BoxData[ \({{1.1100000000000136`\ Second, 1.1899999999999977`\ Second}, True}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Difference", "Subsubsection", CellTags->"c:27"], Cell["Not adequate for combinations:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Complement[{1, 1, 2, 3}, {1, 2, 4}]\)], "Input"], Cell[BoxData[ \({3}\)], "Output"] }, Open ]], Cell[BoxData[ RowBox[{"Notation", "[", RowBox[{ TagBox[\(combinationComplement[x_, y_]\), NotationBoxTag, TagStyle->"NotationTemplateStyle"], " ", "\[DoubleLongLeftRightArrow]", " ", TagBox[\(x_\[Backslash]\ y_\), NotationBoxTag, TagStyle->"NotationTemplateStyle"]}], "]"}]], "Input", InitializationCell->True], Cell[TextData[{ "\[WarningSign] ", StyleBox["Notation", "Input"], " interacts badly with infixing." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \({1, 2}~combinationComplement~{1}\)], "Input"], Cell[BoxData[ \(combinationComplement[{1, 2}, {1}]\)], "Output"] }, Open ]], Cell[BoxData[{ \(\(Clear@combinationComplement;\)\), "\[IndentingNewLine]", \(combinationComplement[combination1_List, combination2_List] := Switch[combination1, \[IndentingNewLine]{}, {}, \[IndentingNewLine]_, With[{f1 = First@combination1}, \[IndentingNewLine]If[ f1~myElement~ combination2, \[IndentingNewLine]combinationComplement[ Rest@combination1, Drop[combination2, First@Position[combination2, f1, 1, 1]]], \[IndentingNewLine]Prepend[ combinationComplement[Rest@combination1, combination2], f1]\[IndentingNewLine]]\[IndentingNewLine]]\[IndentingNewLine]]\ \)}], "Input"], Cell[BoxData[ \(test := {1, 1, 2, 3}\[Backslash]{1, 2, 4} \[Equal] {1, 3} && {1}\[Backslash]{1} \[Equal] {} && {1}\[Backslash]{1, 2} \[Equal] {} && {1, 2, 4, 4}\[Backslash]{1, 1, 3, 4, 6} \[Equal] {2, 4}\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[test, 1000]\)], "Input"], Cell[BoxData[ \({0.7000000000000028`\ Second, True}\)], "Output"] }, Open ]], Cell[BoxData[{ \(\(Clear@combinationComplement;\)\), "\[IndentingNewLine]", \(combinationComplement[combination1_List, combination2_List] := Block[{x, y, z, x1, z1}, First[{combination1, combination2} //. {{x___, y_, z___}, {x1___, y_, z1___}} \[Rule] \ {{x, z}, {x1, z1}}]]\)}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[test, 1000]\)], "Input"], Cell[BoxData[ \({0.5300000000000011`\ Second, True}\)], "Output"] }, Open ]], Cell[BoxData[ \(combination1 = {1, 1, 2, 3}; combination2 = {1, 2, 2, 4};\)], "Input"], Cell["\<\ In vector form, complement is simply difference except for a length \ mismatch that requires padding.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(combinationToVector /@ {combination1, combination2}\)], "Input"], Cell[BoxData[ \({{2, 1, 1}, {1, 2, 0, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\({#, Max[Length /@ #]} &\)[ combinationToVector /@ {combination1, combination2}]\)], "Input"], Cell[BoxData[ \({{{2, 1, 1}, {1, 2, 0, 1}}, 4}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(PadRight @@ ## &\) /@ Distribute[{#, Max[Length /@ #]}, List] &\)[ combinationToVector /@ {combination1, combination2}]\)], "Input"], Cell[BoxData[ \({{2, 1, 1, 0}, {1, 2, 0, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(vectorToCombination@ MapThread[ Max[0, #1 - #2] &, \(\(PadRight @@ ## &\) /@ Distribute[{#, Max[Length /@ #]}, List] &\)[ combinationToVector /@ {combination1, combination2}]]\)], "Input"], Cell[BoxData[ \({1, 3}\)], "Output"] }, Open ]], Cell[BoxData[ \(combination1 =. ; combination2 =. ;\)], "Input"], Cell[BoxData[{\(Clear@combinationComplement;\), "\[IndentingNewLine]", RowBox[{\(combinationComplement[combination1_List, combination2_List]\), ":=", RowBox[{"vectorToCombination", "@", RowBox[{"MapThread", "[", RowBox[{ StyleBox[\(Max[0, #1 - #2] &\), FontColor->RGBColor[1, 0, 0]], ",", \(\(\(PadRight @@ ## &\) /@ Distribute[{#, Max[Length /@ #]}, List] &\)[ combinationToVector /@ {combination1, combination2}]\)}], "]"}]}]}]}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[test, 1000]\)], "Input"], Cell[BoxData[ \({1.1299999999999955`\ Second, True}\)], "Output"] }, Open ]], Cell[BoxData[ \(combination1 = {1, 1, 2, 3}; combination2 = {1, 2, 2, 4};\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(DeleteCases[combination1, 1, 1, 1]\)], "Input"], Cell[BoxData[ \({1, 2, 3}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\({First@#, 1, Length@#} &\) /@ Split@combination2\)], "Input"], Cell[BoxData[ \({{1, 1, 1}, {2, 1, 2}, {4, 1, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(FoldList[ With[{combination = #1}, Apply[function1[combination, ##] &, #2]] &, combination1, \({First@#, 1, Length@#} &\) /@ Split@combination2]\)], "Input"], Cell[BoxData[ \({{1, 1, 2, 3}, function1[{1, 1, 2, 3}, 1, 1, 1], function1[function1[{1, 1, 2, 3}, 1, 1, 1], 2, 1, 2], function1[function1[function1[{1, 1, 2, 3}, 1, 1, 1], 2, 1, 2], 4, 1, 1]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(FoldList[ With[{combination = #1}, Apply[DeleteCases[combination, ##] &, #2]] &, combination1, \({First@#, 1, Length@#} &\) /@ Split@combination2]\)], "Input"], Cell[BoxData[ \({{1, 1, 2, 3}, {1, 2, 3}, {1, 3}, {1, 3}}\)], "Output"] }, Open ]], Cell[BoxData[ \(combination1 =. ; combination2 =. ;\)], "Input"], Cell[BoxData[{ \(\(Clear@combinationComplement;\)\), "\[IndentingNewLine]", \(combinationComplement[combination1_List, combination2_List] := Fold[With[{combination = #1}, Apply[DeleteCases[combination, ##] &, #2]] &, combination1, \({First@#, 1, Length@#} &\) /@ Split@combination2]\)}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[test, 1000]\)], "Input"], Cell[BoxData[ \({0.5`\ Second, True}\)], "Output"] }, Open ]], Cell[TextData[{ "Eliminate constant ", StyleBox["combination", "Input"], "." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(combination1 = {1, 1, 2, 3}; combination2 = {1, 2, 2, 4}; Block[{DeleteCases}, FoldList[Prepend[DeleteCases @@ #2, #1] &, combination1, \({First@#, 1, Length@#} &\) /@ Split@combination2]]\), "\[IndentingNewLine]", \(combination1 =. ; combination2 =. ;\)}], "Input"], Cell[BoxData[ \({{1, 1, 2, 3}, {1, 2, 3}, {1, 3}, {1, 3}}\)], "Output"] }, Open ]], Cell[BoxData[{ \(\(Clear@combinationComplement;\)\), "\[IndentingNewLine]", \(combinationComplement[combination1_List, combination2_List] := Block[{DeleteCases}, Fold[Prepend[DeleteCases @@ #2, #1] &, combination1, \({First@#, 1, Length@#} &\) /@ Split@combination2]]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[test, 1000]\)], "Input"], Cell[BoxData[ \({0.4100000000000037`\ Second, True}\)], "Output"] }, Open ]], Cell[BoxData[ \(\(test =. ;\)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Intersection", "Subsubsection", CellTags->"c:28"], Cell[BoxData[ \(combination1 = {2, 3, 3, 3, 4, 6, 7, 7, 7}; combination2 = {1, 3, 3, 7, 7, 7, 7, 8};\)], "Input"], Cell["Not adequate for combinations:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(combination1~Intersection~combination2\)], "Input"], Cell[BoxData[ \({3, 7}\)], "Output"] }, Open ]], Cell["From difference:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(combination1\[Backslash]\((combination1\[Backslash] combination2)\)\)], "Input"], Cell[BoxData[ \({3, 3, 7, 7, 7}\)], "Output"] }, Open ]], Cell["In Eulerian form:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"vectorToCombination", "@", RowBox[{"MapThread", "[", RowBox[{ StyleBox["Min", FontColor->RGBColor[1, 0, 0]], ",", \(\(\(PadRight @@ ## &\) /@ Distribute[{#, Max[Length /@ #]}, List] &\)[ combinationToVector /@ {combination1, combination2}]\)}], "]"}]}]], "Input"], Cell[BoxData[ \({3, 3, 7, 7, 7}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[\[IndentingNewLine]combination1\[Backslash]\((combination1\ \[Backslash]combination2)\), vectorToCombination@ MapThread[ Min, \(\(PadRight @@ ## &\) /@ Distribute[{#, Max[Length /@ #]}, List] &\)[ combinationToVector /@ {combination1, combination2}]], 1000, compare]\)], "Input"], Cell[BoxData[ \({{0.3100000000000023`\ Second, 0.44999999999998863`\ Second}, {"same", {3, 3, 7, 7, 7}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(combination1 =. ; combination2 =. ;\)], "Input"], Cell[BoxData[ \(Clear@combinationIntersection; combinationIntersection[combination1_, combination2_] := combination1\[Backslash]\((combination1\[Backslash] combination2)\)\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \({2, 3, 3, 3, 4, 6, 7, 7, 7}~ combinationIntersection~{1, 3, 3, 7, 7, 7, 7, 8}\)], "Input"], Cell[BoxData[ \({3, 3, 7, 7, 7}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Inclusion query", "Subsubsection", CellTags->"c:29"], Cell[BoxData[ \(combination1 = {2, 2, 3, 4}; combination2 = {2, 2, 2, 4, 5};\)], "Input"], Cell["From intersection:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(combination1~combinationIntersection~combination2 \[Equal] combination1\)], "Input"], Cell[BoxData[ \(False\)], "Output"] }, Open ]], Cell["In Eulerian form:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"And", "@@", RowBox[{"MapThread", "[", RowBox[{ StyleBox["LessEqual", FontColor->RGBColor[1, 0, 0]], ",", \(\(\(PadRight @@ ## &\) /@ Distribute[{#, Max[Length /@ #]}, List] &\)[ combinationToVector /@ {combination1, combination2}]\)}], "]"}]}]], "Input"], Cell[BoxData[ \(False\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Apply[ And, \(With[{f1 = #}, Apply[LessEqual, \(Count[#, f1] &\) /@ {combination1, combination2}]] &\) /@ combination1]\)], "Input"], Cell[BoxData[ \(False\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Apply[ And, \(Apply[ LessEqual, {Count[combination1, #], Count[combination2, #]}] &\) /@ combination1]\)], "Input"], Cell[BoxData[ \(False\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"zoomTiming", "[", "\[IndentingNewLine]", RowBox[{\(combination1~combinationIntersection~combination2 \[Equal] combination1\), ",", "\[IndentingNewLine]", RowBox[{"And", "@@", RowBox[{"MapThread", "[", RowBox[{ StyleBox["LessEqual", FontColor->RGBColor[1, 0, 0]], ",", \(\(\(PadRight @@ ## &\) /@ Distribute[{#, Max[Length /@ #]}, List] &\)[ combinationToVector /@ {combination1, combination2}]\)}], "]"}]}], ",", "\[IndentingNewLine]", \(Apply[ And, \[IndentingNewLine]\(With[{f1 = #}, Apply[LessEqual, \(Count[#, f1] &\) /@ {combination1, combination2}]]\[IndentingNewLine] &\) /@ combination1]\), ",", "\[IndentingNewLine]", \(Apply[ And, \(Apply[ LessEqual, {Count[combination1, #], Count[combination2, #]}] &\) /@ combination1]\), ",", "\[IndentingNewLine]", "1000", ",", "compare"}], "]"}]], "Input"], Cell[BoxData[ \({{0.18000000000000682`\ Second, 0.2600000000000193`\ Second, 0.21999999999999886`\ Second, 0.13999999999998636`\ Second}, True}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({combination1, combination2} =. ;\)\)], "Input"], Cell[BoxData[ \(Clear@subcombinationQ; subcombinationQ[combination1_, combination2_] := \[IndentingNewLine]Apply[ And, \(Apply[ LessEqual, {Count[combination1, #], Count[combination2, #]}] &\) /@ combination1]\)], "Input", InitializationCell->True], Cell["Check.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Not@subcombinationQ[{2, 2, 3, 4}, {2, 2, 2, 4, 5}] && \n Not@subcombinationQ[{2, 2, 3, 3, 4}, {2, 2, 2, 3, 4}] && \n subcombinationQ[{1, 2, 3, 7}, {1, 1, 2, 3, 3, 7}] && \n subcombinationQ[{1, 3, 7}, {1, 1, 2, 3, 3, 7}] && \n Not@subcombinationQ[{3, 3, 3}, {1, 1, 2, 3, 3}] && \n Apply[And, \(subcombinationQ[#, Range@6] &\) /@ Subsets@\(Range@6\)] && \n Apply[And, \(Not@subcombinationQ[Append[#, 7], Range@6] &\) /@ Subsets@\(Range@6\)]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Equivalence modulo face permutations", "Subsection", CellTags->"c:30"], Cell[CellGroupData[{ Cell["Face permutation", "Subsubsection", CellTags->"c:31"], Cell[BoxData[ \(permutation = {3, 2, 1, 4, 6, 5}; combination = {1, 2, 2, 4};\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(combinationToVector@combination\)], "Input"], Cell[BoxData[ \({1, 2, 0, 1}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(PadRight[combinationToVector@combination, Length@permutation]\)], "Input"], Cell[BoxData[ \({1, 2, 0, 1, 0, 0}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Permute[PadRight[combinationToVector@combination, Length@permutation], permutation]\)], "Input"], Cell[BoxData[ \({0, 2, 1, 1, 0, 0}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(vectorToCombination@ Permute[PadRight[combinationToVector@combination, Length@permutation], permutation]\)], "Input"], Cell[BoxData[ \({2, 2, 3, 4}\)], "Output"] }, Open ]], Cell[BoxData[ \(permutation =. ; combination =. ;\)], "Input"], Cell["\[WarningSign] Reuse for quotient algebra.", "Text"], Cell[BoxData[ \(Clear@permuteFaces; permuteFaces[permutation1_]@combination_ := vectorToCombination@ Permute[PadRight[combinationToVector@combination, Length@permutation1], permutation1]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(permuteFaces[{3, 2, 1, 4, 6, 5}] /@ {{1, 2, 3}, {4, 5, 6}, {1, 2, 3, 4}, {5, 5}}\)], "Input"], Cell[BoxData[ \({{1, 2, 3}, {4, 5, 6}, {1, 2, 3, 4}, {6, 6}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Combination representative", "Subsubsection", CellTags->"c:32"], Cell["\<\ Two combinations are equivalent modulo face permutations if and \ only if they have same occupation number combinations.\ \>", "Text"], Cell[BoxData[ \(Clear@vectorRepresentative; vectorRepresentative@vector_List := Reverse@\(Sort@DeleteCases[vector, 0]\)\)], "Input", InitializationCell->True], Cell["Diagonally:", "Text"], Cell[BoxData[ \(Clear@combinationToVectorRepresentative; combinationToVectorRepresentative@combination_List := Reverse@Sort[Length /@ Split@combination]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(vectorRepresentative@\(combinationToVector@{3, 5, 5}\)\)], "Input"], Cell[BoxData[ \({2, 1}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(combinationToVectorRepresentative@{3, 5, 5}\)], "Input"], Cell[BoxData[ \({2, 1}\)], "Output"] }, Open ]], Cell["\<\ Check: the diagonal way is equivalent to (and faster than) the side \ way.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[combinationToVectorRepresentative /@ allCombinations[3, 6], Composition[vectorRepresentative, combinationToVector] /@ allCombinations[3, 6], 300, compare]\)], "Input"], Cell[BoxData[ \({{0.7400000000000091`\ Second, 1.9099999999999966`\ Second}, True}\)], "Output"] }, Open ]], Cell["Least face sum representative, diagonally evaluated:", "Text"], Cell[BoxData[ \(\(representative = Composition[vectorToCombination, combinationToVectorRepresentative];\)\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(representative@{3, 5, 5}\)], "Input"], Cell[BoxData[ \({1, 1, 2}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(representative@{2, 2, 2, 4, 4, 6}\)], "Input"], Cell[BoxData[ \({1, 1, 1, 2, 2, 3}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Representing permutation", "Subsubsection", CellTags->"c:33"], Cell["\<\ It is a face permutation that transforms a combination into its \ representative.\ \>", "Text"], Cell[BoxData[ \(\(combination = {4, 4, 5, 6, 6};\)\)], "Input"], Cell["\<\ {{non-null occupation number, face}\[Ellipsis]}\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\({Length@#, First@#} &\) /@ Split@combination\)], "Input"], Cell[BoxData[ \({{2, 4}, {1, 5}, {2, 6}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(combinationToVectorRepresentative@combination\)], "Input"], Cell[BoxData[ \({2, 2, 1}\)], "Output"] }, Open ]], Cell["\<\ {{possible target faces, source face}\[Ellipsis]}\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(graph1 = \({\(Flatten@ Position[ combinationToVectorRepresentative@ combination, #] &\)@\(Length@#\), First@#} &\) /@ Split@combination\)], "Input"], Cell[BoxData[ \({{{1, 2}, 4}, {{3}, 5}, {{1, 2}, 6}}\)], "Output"] }, Open ]], Cell["Group mutually dependent target face choices.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(listQuotient[graph1, First]\)], "Input"], Cell[BoxData[ \({{{{3}, 5}}, {{{1, 2}, 4}, {{1, 2}, 6}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(MapIndexed[function1, #] &\) /@ listQuotient[graph1, First]\)], "Input"], Cell[BoxData[ \({{function1[{{3}, 5}, {1}]}, {function1[{{1, 2}, 4}, {1}], function1[{{1, 2}, 6}, {2}]}}\)], "Output"] }, Open ]], Cell["{{source face, target face}\[Ellipsis]}", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(graph2 = Flatten[\(MapIndexed[{Last@#1, Extract[ First@#1, #2]} &, #] &\) \ /@ \[IndentingNewLine]listQuotient[graph1, First], 1]\)], "Input"], Cell[BoxData[ \({{5, 3}, {4, 1}, {6, 2}}\)], "Output"] }, Open ]], Cell["\<\ Extend the permutation from faces not in the combination to faces \ not in its representative.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(f = Last@combination\)], "Input"], Cell[BoxData[ \(6\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(Range@f\[Backslash]# &\) /@ {\(First@# &\) /@ graph2, \(Last@# &\) /@ graph2}\)], "Input"], Cell[BoxData[ \({{1, 2, 3}, {4, 5, 6}}\)], "Output"] }, Open ]], Cell["\<\ Any bijection from the former to the latter is adequate but the \ only increasing one is chosen.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(graph3 = Transpose[\(Range@f\[Backslash]# &\) /@ {\(First@# &\) /@ graph2, \(Last@# &\) /@ graph2}]\)], "Input"], Cell[BoxData[ \({{1, 4}, {2, 5}, {3, 6}}\)], "Output"] }, Open ]], Cell[TextData[{ StyleBox["Permute", "Input"], " format:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Map[Last, Sort@Join[graph2, graph3]]\)], "Input"], Cell[BoxData[ \({4, 5, 6, 1, 3, 2}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({f, combination, graph1, graph2, graph3} =. ;\)\)], "Input"], Cell[BoxData[{\(Clear@ representativePermutationGraph;\), "\[IndentingNewLine]", \ \(representativePermutationGraph@{} = {};\), "\[IndentingNewLine]", RowBox[{\(representativePermutationGraph@combination_List\), ":=", RowBox[{"With", "[", RowBox[{\({vectorRepresentative1 = combinationToVectorRepresentative@combination}\), ",", RowBox[{"With", "[", RowBox[{\({graph1 = \({\(Flatten@ Position[ vectorRepresentative1, #] &\)@\(Length@#\), First@#} &\) /@ Split@combination}\), ",", "\[IndentingNewLine]", RowBox[{"With", "[", RowBox[{\({graph2 = Flatten[\(MapIndexed[{Last@#1, Extract[ First@#1, #2]} &, #] &\) \ /@ \[IndentingNewLine]listQuotient[graph1, First], 1]}\), ",", "\[IndentingNewLine]", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"graph3", "=", RowBox[{"Transpose", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Range", "@", StyleBox[\(Last@combination\), FontColor->RGBColor[1, 0, 0]]}], "\[Backslash]", "#"}], "&"}], "/@", \({\(First@# &\) /@ graph2, \(Last@# &\) /@ graph2}\)}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", \( (*\(Sort\)\(@\)*) \), \(Join[ graph2, graph3]\)}], "\[IndentingNewLine]", "]"}]}], "]"}]}], "]"}]}], "]"}]}]}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(representativePermutationGraph@{1, 2, 3}\)], "Input"], Cell[BoxData[ \({{1, 1}, {2, 2}, {3, 3}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(representativePermutationGraph@{4, 4, 5, 6, 6} \[Equal] {{5, 3}, {4, 1}, {6, 2}, {1, 4}, {2, 5}, {3, 6}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell["Check.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(transform[representativePermutationGraph@{4, 4, 5, 6, 6}]@{4, 4, 5, 6, 6}\)], "Input"], Cell[BoxData[ \({1, 1, 3, 2, 2}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Sort@\(transform[representativePermutationGraph@{4, 4, 5, 6, 6}]@{4, 4, 5, 6, 6}\) \[Equal] representative@{4, 4, 5, 6, 6}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Apply[ And, \(Sort@\(transform[representativePermutationGraph@#]@#\) \[Equal] representative@# &\) /@ allCombinations[3, 6]]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]], Cell["All representatives", "Subsubsection", CellTags->"c:34"], Cell[CellGroupData[{ Cell["Branching one leaf", "Outline2"], Cell[BoxData[{ \(\(Protect@vectorRepresentative;\)\), "\n", \(\(branch[d_, f_]\)[ vectorRepresentative \[Rule] vectorRepresentative1_List] := With[{\[IndentingNewLine]nextOccupationNumber = Switch[vectorRepresentative1, \[IndentingNewLine]{}, d, \[IndentingNewLine]_, Min[d - Total@vectorRepresentative1, Last@vectorRepresentative1]]}, \[IndentingNewLine]If[\ \[IndentingNewLine]nextOccupationNumber \[GreaterEqual] 1 && Length@vectorRepresentative1 < f, \(Append[vectorRepresentative1, #] &\) /@ Reverse@Range[1, nextOccupationNumber], \ \[IndentingNewLine]{vectorRepresentative1}\[IndentingNewLine]]\n]\)}], "Input"], Cell[BoxData[ \(\({d = 8, f = 5};\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(branch[d, f]\)[vectorRepresentative \[Rule] {}]\), "\n", \(\(branch[d, f]\)[vectorRepresentative \[Rule] {d}]\), "\n", \(Table[1, {Min[d, f] - 1}]\), "\n", \(\(branch[d, f]\)[vectorRepresentative \[Rule] %]\), "\n", \(Table[1, {Min[d, f]}]\), "\n", \(\(branch[d, f]\)[vectorRepresentative \[Rule] %]\), "\n", \(\(branch[d, f]\)[vectorRepresentative \[Rule] {d - 1}]\), "\n", \(\(branch[d, f]\)[vectorRepresentative \[Rule] {d - 2}]\), "\n", \(\(branch[d, f]\)[vectorRepresentative \[Rule] {2}]\)}], "Input"], Cell[BoxData[ \({{8}, {7}, {6}, {5}, {4}, {3}, {2}, {1}}\)], "Output"], Cell[BoxData[ \({{8}}\)], "Output"], Cell[BoxData[ \({1, 1, 1, 1}\)], "Output"], Cell[BoxData[ \({{1, 1, 1, 1, 1}}\)], "Output"], Cell[BoxData[ \({1, 1, 1, 1, 1}\)], "Output"], Cell[BoxData[ \({{1, 1, 1, 1, 1}}\)], "Output"], Cell[BoxData[ \({{7, 1}}\)], "Output"], Cell[BoxData[ \({{6, 2}, {6, 1}}\)], "Output"], Cell[BoxData[ \({{2, 2}, {2, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(FixedPointList[ Last[\(branch[d, f]\)[ vectorRepresentative \[Rule] #]] &, {2}]\), "\n", \(\(branch[d, f]\)[vectorRepresentative \[Rule] {d - 1, 1}]\), "\n", \(\(branch[0, f]\)[vectorRepresentative \[Rule] {}]\), "\n", \(\(branch[1, 0]\)[vectorRepresentative \[Rule] {}]\), "\n", \(\(branch[0, 0]\)[vectorRepresentative \[Rule] {}]\)}], "Input"], Cell[BoxData[ \({{2}, {2, 1}, {2, 1, 1}, {2, 1, 1, 1}, {2, 1, 1, 1, 1}, {2, 1, 1, 1, 1}}\)], "Output"], Cell[BoxData[ \({{7, 1}}\)], "Output"], Cell[BoxData[ \({{}}\)], "Output"], Cell[BoxData[ \({{}}\)], "Output"], Cell[BoxData[ \({{}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Branching deepest level", "Outline2"], Cell[CellGroupData[{ Cell[BoxData[ \({{d}, {d - 2}, Table[1, {Min[f, d]}]}\)], "Input"], Cell[BoxData[ \({{8}, {6}, {1, 1, 1, 1, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(branch[d, f]\)[vectorRepresentative \[Rule] #] &\) /@ %\)], "Input"], Cell[BoxData[ \({{{8}}, {{6, 2}, {6, 1}}, {{1, 1, 1, 1, 1}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(Protect@ vectorRepresentativeList; \(branch[d_, f_]\)[ vectorRepresentativeList \[Rule] vectorRepresentativeList1_List] := Flatten[\(\(branch[d, f]\)[vectorRepresentative \[Rule] #] &\) /@ vectorRepresentativeList1, 1]\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(branch[d, f]\)[ vectorRepresentativeList \[Rule] #] &\)@{{d}, {d - 1}, {d - 1, 1}, Table[1, {Min[f, d]}]}\)], "Input"], Cell[BoxData[ \({{8}, {7, 1}, {7, 1}, {1, 1, 1, 1, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[d, f]\)[vectorRepresentativeList \[Rule] {{}}]\)], "Input"], Cell[BoxData[ \({{8}, {7}, {6}, {5}, {4}, {3}, {2}, {1}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Branching completely", "Outline2"], Cell[TextData[{ "A fixed point is certainly reached after branching ", Cell[BoxData[ \(TraditionalForm\`Min[d, f]\)]], " times, the number of distinct faces in a combinaison of ", Cell[BoxData[ \(TraditionalForm\`d\)]], " dices with ", Cell[BoxData[ \(TraditionalForm\`f\)]], " faces." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Nest[\(branch[d, f]\)[vectorRepresentativeList \[Rule] #] &, {{}}, Min[d, f]]\)], "Input"], Cell[BoxData[ \({{8}, {7, 1}, {6, 2}, {6, 1, 1}, {5, 3}, {5, 2, 1}, {5, 1, 1, 1}, {4, 4}, {4, 3, 1}, {4, 2, 2}, {4, 2, 1, 1}, {4, 1, 1, 1, 1}, {3, 3, 2}, {3, 3, 1, 1}, {3, 2, 2, 1}, {3, 2, 1, 1, 1}, {3, 1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 1, 1}, {2, 2, 1, 1, 1}, {2, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}\)], "Output"] }, Open ]], Cell["Moreover, all dice must have been used.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Select[ Nest[\(branch[d, f]\)[vectorRepresentativeList \[Rule] #] &, {{}}, Min[d, f]], Total@# \[Equal] d &]\)], "Input"], Cell[BoxData[ \({{8}, {7, 1}, {6, 2}, {6, 1, 1}, {5, 3}, {5, 2, 1}, {5, 1, 1, 1}, {4, 4}, {4, 3, 1}, {4, 2, 2}, {4, 2, 1, 1}, {4, 1, 1, 1, 1}, {3, 3, 2}, {3, 3, 1, 1}, {3, 2, 2, 1}, {3, 2, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 1, 1}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d =. , f =. };\)\)], "Input"], Cell[BoxData[ \(Clear@allVectorRepresentatives; allVectorRepresentatives[d_Integer, f_Integer] := Select[Nest[\(branch[d, f]\)[ vectorRepresentativeList \[Rule] #] &, {{}}, Min[d, f]], Total@# \[Equal] d &]\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint[\(allVectorRepresentatives @@ ## &\) /@ {{3, 0}, {3, 1}, {3, 2}, {0, 0}, {0, 1}}]\)], "Input"], Cell[BoxData[ \({}\)], "Print"], Cell[BoxData[ \({{3}}\)], "Print"], Cell[BoxData[ \({{3}, {2, 1}}\)], "Print"], Cell[BoxData[ \({{}}\)], "Print"], Cell[BoxData[ \({{}}\)], "Print"] }, Open ]], Cell[TextData[{ Cell[BoxData[ \(TraditionalForm\`d\ = \ 3\ \[LessEqual] \ f\)]], " \[Rule] brelan (111), pair (211), sequence (321)." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint[\(allVectorRepresentatives @@ ## &\) /@ {{3, 3}, {3, 6}}]\)], "Input"], Cell[BoxData[ \({{3}, {2, 1}, {1, 1, 1}}\)], "Print"], Cell[BoxData[ \({{3}, {2, 1}, {1, 1, 1}}\)], "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Short cut with ", StyleBox["Partitions", "Input"] }], "Outline2"], Cell[CellGroupData[{ Cell[BoxData[ \(Partitions@3\)], "Input"], Cell[BoxData[ \({{3}, {2, 1}, {1, 1, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 5, f = 3}, \[IndentingNewLine]zoomTiming[ allVectorRepresentatives[d, f], Select[Partitions@d, Length@# \[LessEqual] f &], 1000, compare]\[IndentingNewLine]]\)], "Input"], Cell[BoxData[ \({{1.5300000000000011`\ Second, 0.6899999999999977`\ Second}, {"same", {{5}, {4, 1}, {3, 2}, {3, 1, 1}, {2, 2, 1}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 3, f = 6}, \[IndentingNewLine]zoomTiming[ allVectorRepresentatives[d, f], Select[Partitions@d, Length@# \[LessEqual] f &], 1000, compare]\[IndentingNewLine]]\)], "Input"], Cell[BoxData[ \({{0.8000000000000114`\ Second, 0.21999999999997044`\ Second}, {"same", {{3}, {2, 1}, {1, 1, 1}}}}\)], "Output"] }, Open ]], Cell["Not needed eventually.", "Text"], Cell[BoxData[{ \(\(branch[d_, f_]\)[ vectorRepresentative \[Rule] vectorRepresentative1_List] =. ; Unprotect@vectorRepresentative;\), "\n", \(\(\(branch[d_, f_]\)[ vectorRepresentativeList \[Rule] vectorRepresentativeList1_List] =. ;\)\), "\n", \(\(Unprotect@vectorRepresentativeList;\)\)}], "Input"], Cell[BoxData[ \(Clear@allVectorRepresentatives; allVectorRepresentatives[d_Integer, f_Integer] := Select[Partitions@d, Length@# \[LessEqual] f &]\)], "Input", InitializationCell->True], Cell[BoxData[ \(Clear@allRepresentatives; allRepresentatives[d_, f_] := vectorToCombination /@ allVectorRepresentatives[d, f]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint[\(allRepresentatives[#, 3] &\) /@ Range@3]\)], "Input"], Cell[BoxData[ \({{1}}\)], "Print"], Cell[BoxData[ \({{1, 1}, {1, 2}}\)], "Print"], Cell[BoxData[ \({{1, 1, 1}, {1, 1, 2}, {1, 2, 3}}\)], "Print"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint[\(allRepresentatives @@ ## &\) /@ {{3, 6}, {6, 3}, {0, 1}, {0, 0}, {1, 0}}]\)], "Input"], Cell[BoxData[ \({{1, 1, 1}, {1, 1, 2}, {1, 2, 3}}\)], "Print"], Cell[BoxData[ \({{1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 2}, {1, 1, 1, 1, 2, 2}, {1, 1, 1, 1, 2, 3}, {1, 1, 1, 2, 2, 2}, {1, 1, 1, 2, 2, 3}, {1, 1, 2, 2, 3, 3}}\)], "Print"], Cell[BoxData[ \({{}}\)], "Print"], Cell[BoxData[ \({{}}\)], "Print"], Cell[BoxData[ \({}\)], "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Conditional representative", "Subsubsection", CellTags->{"section10", "c:35"}], Cell["\<\ As a first step, class faces according to their occupation number \ in a combination,\ \>", "Text"], Cell[BoxData[ \(f = 8; combination = {2, 2, 2, 3, 3, 4, 5, 5, 6, 6};\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(With[{vector = combinationToVector@combination}, \(MapAt[ Flatten[Last /@ #, 1] &, #, \(-1\)] &\) /@ listQuotient[MapIndexed[List, PadRight[vector, f]], First, withValues \[Rule] True]]\)], "Input"], Cell[BoxData[ \({{0, {1, 7, 8}}, {1, {4}}, {2, {3, 5, 6}}, {3, {2}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Prepend[\(MapAt[Last /@ # &, #, \(-1\)] &\) /@ listQuotient[\({Length@#, First@#} &\) /@ Split@combination, First, withValues \[Rule] True], {0, Range@f\[Backslash]combination}]\)], "Input"], Cell[BoxData[ \({{0, {1, 7, 8}}, {1, {4}}, {2, {3, 5, 6}}, {3, {2}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[\[IndentingNewLine]\(MapAt[ Flatten[Last /@ #, 1] &, #, \(-1\)] &\) /@ listQuotient[ MapIndexed[List, PadRight[combinationToVector@combination, f]], First, withValues \[Rule] True], \[IndentingNewLine]Prepend[\(MapAt[ Last /@ # &, #, \(-1\)] &\) /@ listQuotient[\({Length@#, First@#} &\) /@ Split@combination, First, withValues \[Rule] True], {0, Range@f\[Backslash]combination}], \[IndentingNewLine]1000, compare]\)], "Input"], Cell[BoxData[ \({{0.6200000000000045`\ Second, 0.5399999999999636`\ Second}, {"same", {{0, {1, 7, 8}}, {1, {4}}, {2, {3, 5, 6}}, {3, {2}}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(f =. ; combination =. ;\)], "Input"], Cell["\<\ \[Wolf] Every face class is a strictly increasing list, as the \ combination itself is an increasing list.\ \>", "Text"], Cell[BoxData[ \(Clear@quotientByOccupationNumber; quotientByOccupationNumber[f_Integer]@combination_List := Prepend[\(MapAt[Last /@ # &, #, \(-1\)] &\) /@ listQuotient[\({Length@#, First@#} &\) /@ Split@combination, First, withValues \[Rule] True], {0, Range@f\[Backslash]combination}]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(quotientByOccupationNumber[6]@{}\)], "Input"], Cell[BoxData[ \({{0, {1, 2, 3, 4, 5, 6}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(quotientByOccupationNumber[6]@{1, 1}\)], "Input"], Cell[BoxData[ \({{0, {2, 3, 4, 5, 6}}, {2, {1}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(quotientByOccupationNumber[8]@{2, 2, 2, 3, 3, 4, 5, 5, 6, 6}\)], "Input"], Cell[BoxData[ \({{0, {1, 7, 8}}, {1, {4}}, {2, {3, 5, 6}}, {3, {2}}}\)], "Output"] }, Open ]], Cell["\<\ What is the representative of the second combination conditioned by \ the first one?\ \>", "Text"], Cell[BoxData[ \(combination1 = {2, 2, 2, 3, 3, 4, 5, 5, 6, 6}; combination2 = {2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 7, 8, 8};\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(quotientByOccupationNumber1 = quotientByOccupationNumber[Last@combination2]@combination1\)], "Input"], Cell[BoxData[ \({{0, {1, 7, 8}}, {1, {4}}, {2, {3, 5, 6}}, {3, {2}}}\)], "Output"] }, Open ]], Cell["\<\ Subcombinations of the second combination consisting of faces from \ the classes of the first combination.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(quotientByOccupationNumber2 = \(MapAt[ With[{class = #}, Select[combination2, #~myElement~class &]] &, #, \(-1\)] &\) /@ quotientByOccupationNumber1\)], "Input"], Cell[BoxData[ \({{0, {7, 8, 8}}, {1, {4, 4}}, {2, {3, 5, 5, 5, 6, 6}}, {3, {2, 2}}}\)], "Output"] }, Open ]], Cell["Otherwise, by pattern matching.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(quotientByOccupationNumber2 = \(MapAt[ With[{class = #}, Cases[combination2, Alternatives @@ class]] &, #, \(-1\)] &\) /@ quotientByOccupationNumber1\)], "Input"], Cell[BoxData[ \({{0, {7, 8, 8}}, {1, {4, 4}}, {2, {3, 5, 5, 5, 6, 6}}, {3, {2, 2}}}\)], "Output"] }, Open ]], Cell[TextData[{ "Eliminate constant ", StyleBox["class", "Input"], "." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(quotientByOccupationNumber2 = \(Transpose@{First /@ #, \(Cases[ combination2, Alternatives @@ #] &\) /@ \(Last /@ #\)} &\)@ quotientByOccupationNumber1\)], "Input"], Cell[BoxData[ \({{0, {7, 8, 8}}, {1, {4, 4}}, {2, {3, 5, 5, 5, 6, 6}}, {3, {2, 2}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[\[IndentingNewLine]\(MapAt[ With[{class = #}, Select[combination2, #~myElement~class &]] &, #, \(-1\)] &\) /@ quotientByOccupationNumber1, \[IndentingNewLine]\(MapAt[ With[{class = #}, Cases[combination2, Alternatives @@ class]] &, #, \(-1\)] &\) /@ quotientByOccupationNumber1, \[IndentingNewLine]\(Transpose@{First /@ \ #, \(Cases[combination2, Alternatives @@ #] &\) /@ \(Last /@ #\)} &\)@ quotientByOccupationNumber1, \[IndentingNewLine]1500, compare]\)], "Input"], Cell[BoxData[ \({{1.6999999999999886`\ Second, 0.34000000000003183`\ Second, 0.29999999999998295`\ Second}, {"same", {{0, {7, 8, 8}}, {1, {4, 4}}, {2, {3, 5, 5, 5, 6, 6}}, {3, {2, 2}}}}}\)], "Output"] }, Open ]], Cell["\<\ Subcombination representatives. They cannot be yet joined to make a \ conditional representative.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(quotientByOccupationNumber2\), "\[IndentingNewLine]", \(\(MapAt[representative, #, \(-1\)] &\) /@ quotientByOccupationNumber2\)}], "Input"], Cell[BoxData[ \({{0, {7, 8, 8}}, {1, {4, 4}}, {2, {3, 5, 5, 5, 6, 6}}, {3, {2, 2}}}\)], "Output"], Cell[BoxData[ \({{0, {1, 1, 2}}, {1, {1, 1}}, {2, {1, 1, 1, 2, 2, 3}}, {3, {1, 1}}}\)], "Output"] }, Open ]], Cell["\<\ Permute each subrepresentative back to its original face \ class.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(quotientByOccupationNumber1\), "\[IndentingNewLine]", \(graphList = \(Reverse /@ representativePermutationGraph@# &\) /@ \(Last /@ quotientByOccupationNumber1\)\)}], "Input"], Cell[BoxData[ \({{0, {1, 7, 8}}, {1, {4}}, {2, {3, 5, 6}}, {3, {2}}}\)], "Output"], Cell[BoxData[ \({{{1, 1}, {2, 7}, {3, 8}, {4, 2}, {5, 3}, {6, 4}, {7, 5}, {8, 6}}, {{1, 4}, {2, 1}, {3, 2}, {4, 3}}, {{1, 3}, {2, 5}, {3, 6}, {4, 1}, {5, 2}, {6, 4}}, {{1, 2}, {2, 1}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(scanPrint@ MapThread[ With[{graph1 = #2}, MapAt[function1[graph1, representative@#] &, #1, \(-1\)]] &, \ {quotientByOccupationNumber2, graphList}]\)], "Input"], Cell[BoxData[ \({0, function1[{{1, 1}, {2, 7}, {3, 8}, {4, 2}, {5, 3}, {6, 4}, {7, 5}, {8, 6}}, {1, 1, 2}]}\)], "Print"], Cell[BoxData[ \({1, function1[{{1, 4}, {2, 1}, {3, 2}, {4, 3}}, {1, 1}]}\)], "Print"], Cell[BoxData[ \({2, function1[{{1, 3}, {2, 5}, {3, 6}, {4, 1}, {5, 2}, {6, 4}}, {1, 1, 1, 2, 2, 3}]}\)], "Print"], Cell[BoxData[ \({3, function1[{{1, 2}, {2, 1}}, {1, 1}]}\)], "Print"] }, Open ]], Cell["\<\ \[Wolf] As each permutation already increases on its class, there \ is no need of sorting.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(quotientByOccupationNumber2\), "\n", \(MapThread[ With[{graph1 = #2}, MapAt[ (*\(Sort\)\(@\)*) transform[ graph1]@\(representative@#\) &, #1, \(-1\)]] &, \ {quotientByOccupationNumber2, graphList}]\)}], "Input"], Cell[BoxData[ \({{0, {7, 8, 8}}, {1, {4, 4}}, {2, {3, 5, 5, 5, 6, 6}}, {3, {2, 2}}}\)], "Output"], Cell[BoxData[ \({{0, {1, 1, 7}}, {1, {4, 4}}, {2, {3, 3, 3, 5, 5, 6}}, {3, {2, 2}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Sort[Flatten[Last /@ %, 1]]\)], "Input"], Cell[BoxData[ \({1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({quotientByOccupationNumber1, quotientByOccupationNumber2, graphList, combination1, combination2} =. ;\)\)], "Input"], Cell[BoxData[{ \(\(Clear@conditionalRepresentative;\)\), "\[IndentingNewLine]", \(\(conditionalRepresentative[_]@{} = {};\)\), "\[IndentingNewLine]", \(conditionalRepresentative[combination1_List]@combination2_List := With[{quotientByOccupationNumber1 = quotientByOccupationNumber[Last@combination2]@ combination1}, \[IndentingNewLine]Sort[ Flatten[Last /@ \[IndentingNewLine]MapThread[ With[{graph1 = #2}, MapAt[transform[ graph1]@\(representative@#\) &, #1, \(-1\)]] &, {\ \(Transpose@{First /@ #, \(Cases[combination2, Alternatives @@ #] &\) /@ \(Last /@ #\)} &\)@ quotientByOccupationNumber1, \(Reverse /@ representativePermutationGraph@# &\) /@ \(Last /@ quotientByOccupationNumber1\)}], 1]\[IndentingNewLine]]\[IndentingNewLine]]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(conditionalRepresentative[{3}]@{3, 4, 5}\)], "Input"], Cell[BoxData[ \({1, 2, 3}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(conditionalRepresentative[{2, 3}]@{3, 4, 5}\)], "Input"], Cell[BoxData[ \({1, 2, 4}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(conditionalRepresentative[{1, 2}]@{3, 4}\)], "Input"], Cell[BoxData[ \({3, 4}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(conditionalRepresentative[{1, 2, 3}]@{2, 3, 4}\)], "Input"], Cell[BoxData[ \({1, 2, 4}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(conditionalRepresentative[{1, 1, 1, 2, 2, 3, 4, 4, 5, 5}]@{1, 1, 2, 3, 3, 4, 4, 4, 5, 5} \[Equal] {1, 1, 2, 2, 2, 3, 3, 4, 4, 5}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(conditionalRepresentative[{1, 1, 1, 2, 2, 3, 4, 4, 6, 6}]@{1, 1, 2, 3, 3, 4, 4, 4, 6, 6} \[Equal] {1, 1, 2, 2, 2, 3, 3, 4, 4, 6}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell["\<\ Check: conditioning by empty combination amounts to no \ conditioning.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(conditionalRepresentative[{}]@{2, 3, 4}\)], "Input"], Cell[BoxData[ \({1, 2, 3}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Apply[ And, \(conditionalRepresentative[{}]@# \[Equal] representative@# &\) /@ allCombinations[4, 2]]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell["\<\ Check: every combination is its own representative, conditioned by \ itself.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Apply[ And, \(conditionalRepresentative[#]@# \[Equal] # &\) /@ allCombinations[4, 6]]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Birepresentative", "Subsubsection", CellTags->"c:36"], Cell["\<\ Two bicombinations are equivalent modulo face permutations if and \ only if they have the same occupation number couple combination.\ \>", "Text"], Cell[BoxData[ \(\(bicombination = {{1, 1, 3, 3, 5, 5}, {1, 2, 3, 3, 3, 5}};\)\)], "Input"], Cell["\<\ Global permutation transforming in particular the first component \ to its representative.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(graph1 = representativePermutationGraph@\(First@ bicombination\);\)\), "\[IndentingNewLine]", \({combination1, combination2} = \(Sort@\(transform[graph1]@#\) &\) /@ bicombination\)}], "Input"], Cell[BoxData[ \({{1, 1, 2, 2, 3, 3}, {1, 2, 2, 2, 3, 4}}\)], "Output"] }, Open ]], Cell["A bicombination birepresentative:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \({combination1, conditionalRepresentative[combination1]@combination2}\)], "Input"], Cell[BoxData[ \({{1, 1, 2, 2, 3, 3}, {1, 1, 1, 2, 3, 4}}\)], "Output"] }, Open ]], Cell["\[Wolf] Remember this:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(conditionalRepresentative[combination1]@combination1 \[Equal] combination1\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell["Eliminate constants.", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\({combination1, combination2, graph1} =. ;\)\), "\n", \(Apply[{#1, conditionalRepresentative[#1]@#2} &, \(Sort@\(transform[ representativePermutationGraph@\(First@ bicombination\)]@#\) &\) /@ bicombination]\)}], "Input"], Cell[BoxData[ \({{1, 1, 2, 2, 3, 3}, {1, 1, 1, 2, 3, 4}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\(bicombination =. ;\)\)], "Input"], Cell[BoxData[ \(Clear@birepresentative; birepresentative@bicombination_ := Apply[{#1, conditionalRepresentative[#1]@#2} &, \(Sort@\(transform[ representativePermutationGraph@\(First@ bicombination\)]@#\) &\) /@ bicombination]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(birepresentative@{{1, 1, 3, 3, 5, 5}, {1, 2, 3, 3, 3, 5}}\)], "Input"], Cell[BoxData[ \({{1, 1, 2, 2, 3, 3}, {1, 1, 1, 2, 3, 4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(birepresentative@{{1, 2, 6}, {1, 3, 6}}\)], "Input"], Cell[BoxData[ \({{1, 2, 3}, {1, 2, 4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(birepresentative@{{1, 2, 3}, {2, 3, 4}}\)], "Input"], Cell[BoxData[ \({{1, 2, 3}, {1, 2, 4}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["All conditional representatives and all birepresentatives", \ "Subsubsection", CellTags->"c:37"], Cell["Conditioning combination.", "Text"], Cell[BoxData[ \(f = 5; combination = {1, 2, 3, 3, 4, 4}; d = Length@combination;\)], "Input"], Cell["\<\ Distribute the dice of conditional representative on face classes, \ in all possible ways.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(quotientByOccupationNumber1 = quotientByOccupationNumber[f]@combination\), "\n", \(vectorRepresentativeList = \[IndentingNewLine]Flatten[\(Permutations@\ \[IndentingNewLine]PadRight[#, Length@quotientByOccupationNumber1]\[IndentingNewLine] &\) /@ allVectorRepresentatives[d, Length@quotientByOccupationNumber1], 1]\)}], "Input"], Cell[BoxData[ \({{0, {5}}, {1, {1, 2}}, {2, {3, 4}}}\)], "Output"], Cell[BoxData[ \({{6, 0, 0}, {0, 6, 0}, {0, 0, 6}, {5, 1, 0}, {5, 0, 1}, {1, 5, 0}, {1, 0, 5}, {0, 5, 1}, {0, 1, 5}, {4, 2, 0}, {4, 0, 2}, {2, 4, 0}, {2, 0, 4}, {0, 4, 2}, {0, 2, 4}, {4, 1, 1}, {1, 4, 1}, {1, 1, 4}, {3, 3, 0}, {3, 0, 3}, {0, 3, 3}, {3, 2, 1}, {3, 1, 2}, {2, 3, 1}, {2, 1, 3}, {1, 3, 2}, {1, 2, 3}, {2, 2, 2}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(Length /@ \(Last /@ quotientByOccupationNumber1\)\), "\[IndentingNewLine]", \(part1 = 23; vectorRepresentativeList[\([part1]\)]\)}], "Input"], Cell[BoxData[ \({1, 2, 2}\)], "Output"], Cell[BoxData[ \({3, 1, 2}\)], "Output"] }, Open ]], Cell["Cartesian product of subrepresentative sets.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\((\(MapThread[ allRepresentatives, {#, Length /@ \(Last /@ quotientByOccupationNumber1\)}] &\) /@ vectorRepresentativeList)\)[\([part1]\)]\)], "Input"], Cell[BoxData[ \({{{1, 1, 1}}, {{1}}, {{1, 1}, {1, 2}}}\)], "Output"] }, Open ]], Cell["\<\ Permute each subrepresentative back to its original face \ class.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(graphList = \(Reverse /@ representativePermutationGraph@# &\) /@ \(Last /@ quotientByOccupationNumber1\)\)], "Input"], Cell[BoxData[ \({{{1, 5}, {2, 1}, {3, 2}, {4, 3}, {5, 4}}, {{1, 1}, {2, 2}}, {{1, 3}, {2, 4}, {3, 1}, {4, 2}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\((Map[ MapThread[ With[{graph1 = #1}, \(function1[ graph1, #] &\) /@ #2] &, {graphList, #}] &, \ \(MapThread[allRepresentatives, {#, Length /@ \(Last /@ quotientByOccupationNumber1\)}] &\) /@ vectorRepresentativeList])\)[\([part1]\)]\)], "Input"], Cell[BoxData[ \({{function1[{{1, 5}, {2, 1}, {3, 2}, {4, 3}, {5, 4}}, {1, 1, 1}]}, {function1[{{1, 1}, {2, 2}}, {1}]}, {function1[{{1, 3}, {2, 4}, {3, 1}, {4, 2}}, {1, 1}], function1[{{1, 3}, {2, 4}, {3, 1}, {4, 2}}, {1, 2}]}}\)], "Output"] }, Open ]], Cell["\<\ \[Wolf] As before, no need of sorting.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\((Map[ MapThread[ With[{graph1 = #1}, (*\(Sort\)\(@\)*) \(transform[ graph1]@# &\) /@ #2] &, {graphList, #}] &, \ \(MapThread[allRepresentatives, {#, Length /@ \(Last /@ quotientByOccupationNumber1\)}] &\) /@ vectorRepresentativeList])\)[\([part1]\)]\)], "Input"], Cell[BoxData[ \({{{5, 5, 5}}, {{1}}, {{3, 3}, {3, 4}}}\)], "Output"] }, Open ]], Cell["Develop Cartesian product.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\((\(Distribute[#, List] &\) /@ \[IndentingNewLine]\((Map[ MapThread[ With[{graph1 = #1}, \(transform[ graph1]@# &\) /@ #2] &, {graphList, #}] &, \ \(MapThread[allRepresentatives, {#, Length /@ \(Last /@ quotientByOccupationNumber1\)}] &\) /@ vectorRepresentativeList])\)\[IndentingNewLine])\)[\([part1]\)\ ]\)], "Input"], Cell[BoxData[ \({{{5, 5, 5}, {1}, {3, 3}}, {{5, 5, 5}, {1}, {3, 4}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(part1 =. \)], "Input"], Cell["Join subrepresentatives and sort.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Flatten[ Map[Composition[Sort, Flatten] /@ Distribute[#, List] &, Map[MapThread[ With[{graph1 = #1}, \(transform[ graph1]@# &\) /@ #2] &, {graphList, #}] &, \ \(MapThread[allRepresentatives, {#, Length /@ \(Last /@ quotientByOccupationNumber1\)}] &\) /@ vectorRepresentativeList]], 1]\)], "Input"], Cell[BoxData[ \({{5, 5, 5, 5, 5, 5}, {1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 2}, {1, 1, 1, 1, 2, 2}, {1, 1, 1, 2, 2, 2}, {3, 3, 3, 3, 3, 3}, {3, 3, 3, 3, 3, 4}, {3, 3, 3, 3, 4, 4}, {3, 3, 3, 4, 4, 4}, {1, 5, 5, 5, 5, 5}, {3, 5, 5, 5, 5, 5}, {1, 1, 1, 1, 1, 5}, {1, 1, 1, 1, 2, 5}, {1, 1, 1, 2, 2, 5}, {3, 3, 3, 3, 3, 5}, {3, 3, 3, 3, 4, 5}, {3, 3, 3, 4, 4, 5}, {1, 1, 1, 1, 1, 3}, {1, 1, 1, 1, 2, 3}, {1, 1, 1, 2, 2, 3}, {1, 3, 3, 3, 3, 3}, {1, 3, 3, 3, 3, 4}, {1, 3, 3, 3, 4, 4}, {1, 1, 5, 5, 5, 5}, {1, 2, 5, 5, 5, 5}, {3, 3, 5, 5, 5, 5}, {3, 4, 5, 5, 5, 5}, {1, 1, 1, 1, 5, 5}, {1, 1, 1, 2, 5, 5}, {1, 1, 2, 2, 5, 5}, {3, 3, 3, 3, 5, 5}, {3, 3, 3, 4, 5, 5}, {3, 3, 4, 4, 5, 5}, {1, 1, 1, 1, 3, 3}, {1, 1, 1, 1, 3, 4}, {1, 1, 1, 2, 3, 3}, {1, 1, 1, 2, 3, 4}, {1, 1, 2, 2, 3, 3}, {1, 1, 2, 2, 3, 4}, {1, 1, 3, 3, 3, 3}, {1, 1, 3, 3, 3, 4}, {1, 1, 3, 3, 4, 4}, {1, 2, 3, 3, 3, 3}, {1, 2, 3, 3, 3, 4}, {1, 2, 3, 3, 4, 4}, {1, 3, 5, 5, 5, 5}, {1, 1, 1, 1, 3, 5}, {1, 1, 1, 2, 3, 5}, {1, 1, 2, 2, 3, 5}, {1, 3, 3, 3, 3, 5}, {1, 3, 3, 3, 4, 5}, {1, 3, 3, 4, 4, 5}, {1, 1, 1, 5, 5, 5}, {1, 1, 2, 5, 5, 5}, {3, 3, 3, 5, 5, 5}, {3, 3, 4, 5, 5, 5}, {1, 1, 1, 3, 3, 3}, {1, 1, 1, 3, 3, 4}, {1, 1, 2, 3, 3, 3}, {1, 1, 2, 3, 3, 4}, {1, 1, 3, 5, 5, 5}, {1, 2, 3, 5, 5, 5}, {1, 3, 3, 5, 5, 5}, {1, 3, 4, 5, 5, 5}, {1, 1, 1, 3, 5, 5}, {1, 1, 2, 3, 5, 5}, {1, 3, 3, 3, 5, 5}, {1, 3, 3, 4, 5, 5}, {1, 1, 1, 3, 3, 5}, {1, 1, 1, 3, 4, 5}, {1, 1, 2, 3, 3, 5}, {1, 1, 2, 3, 4, 5}, {1, 1, 3, 3, 3, 5}, {1, 1, 3, 3, 4, 5}, {1, 2, 3, 3, 3, 5}, {1, 2, 3, 3, 4, 5}, {1, 1, 3, 3, 5, 5}, {1, 1, 3, 4, 5, 5}, {1, 2, 3, 3, 5, 5}, {1, 2, 3, 4, 5, 5}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d, f, quotientByOccupationNumber1, graphList, vectorRepresentativeList, combination} =. ;\)\)], "Input"], Cell[BoxData[{ \(\(Clear@allConditionalRepresentatives;\)\), "\n", \(\(allConditionalRepresentatives[combination_]\)[d_, f_] := With[{quotientByOccupationNumber1 = quotientByOccupationNumber[f]@ combination}, \[IndentingNewLine]With[{vectorRepresentativeList \ = \[IndentingNewLine]Flatten[\(Permutations[ PadRight[#, Length@quotientByOccupationNumber1]] &\) /@ allVectorRepresentatives[d, Length@quotientByOccupationNumber1], 1], \[IndentingNewLine]graphList = \(Reverse /@ representativePermutationGraph@# &\) /@ \(Last /@ quotientByOccupationNumber1\)}, \[IndentingNewLine]Flatten[ Map[Composition[Sort, Flatten] /@ Distribute[#, List] &, Map[MapThread[ With[{graph1 = #1}, \(transform[ graph1]@# &\) /@ #2] &, {graphList, #}] &, \ \(MapThread[allRepresentatives, {#, Length /@ \(Last /@ quotientByOccupationNumber1\)}] &\) /@ vectorRepresentativeList]], 1]\[IndentingNewLine]]\[IndentingNewLine]]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(\(allConditionalRepresentatives[{1, 2, 3, 3, 4, 4}]\)[6, 5] \[Equal] {{5, 5, 5, 5, 5, 5}, {1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 2}, {1, 1, 1, 1, 2, 2}, {1, 1, 1, 2, 2, 2}, {3, 3, 3, 3, 3, 3}, {3, 3, 3, 3, 3, 4}, {3, 3, 3, 3, 4, 4}, {3, 3, 3, 4, 4, 4}, {1, 5, 5, 5, 5, 5}, {3, 5, 5, 5, 5, 5}, {1, 1, 1, 1, 1, 5}, {1, 1, 1, 1, 2, 5}, {1, 1, 1, 2, 2, 5}, {3, 3, 3, 3, 3, 5}, {3, 3, 3, 3, 4, 5}, {3, 3, 3, 4, 4, 5}, {1, 1, 1, 1, 1, 3}, {1, 1, 1, 1, 2, 3}, {1, 1, 1, 2, 2, 3}, {1, 3, 3, 3, 3, 3}, {1, 3, 3, 3, 3, 4}, {1, 3, 3, 3, 4, 4}, {1, 1, 5, 5, 5, 5}, {1, 2, 5, 5, 5, 5}, {3, 3, 5, 5, 5, 5}, {3, 4, 5, 5, 5, 5}, {1, 1, 1, 1, 5, 5}, {1, 1, 1, 2, 5, 5}, {1, 1, 2, 2, 5, 5}, {3, 3, 3, 3, 5, 5}, {3, 3, 3, 4, 5, 5}, {3, 3, 4, 4, 5, 5}, {1, 1, 1, 1, 3, 3}, {1, 1, 1, 1, 3, 4}, {1, 1, 1, 2, 3, 3}, {1, 1, 1, 2, 3, 4}, {1, 1, 2, 2, 3, 3}, {1, 1, 2, 2, 3, 4}, {1, 1, 3, 3, 3, 3}, {1, 1, 3, 3, 3, 4}, {1, 1, 3, 3, 4, 4}, {1, 2, 3, 3, 3, 3}, {1, 2, 3, 3, 3, 4}, {1, 2, 3, 3, 4, 4}, {1, 3, 5, 5, 5, 5}, {1, 1, 1, 1, 3, 5}, {1, 1, 1, 2, 3, 5}, {1, 1, 2, 2, 3, 5}, {1, 3, 3, 3, 3, 5}, {1, 3, 3, 3, 4, 5}, {1, 3, 3, 4, 4, 5}, {1, 1, 1, 5, 5, 5}, {1, 1, 2, 5, 5, 5}, {3, 3, 3, 5, 5, 5}, {3, 3, 4, 5, 5, 5}, {1, 1, 1, 3, 3, 3}, {1, 1, 1, 3, 3, 4}, {1, 1, 2, 3, 3, 3}, {1, 1, 2, 3, 3, 4}, {1, 1, 3, 5, 5, 5}, {1, 2, 3, 5, 5, 5}, {1, 3, 3, 5, 5, 5}, {1, 3, 4, 5, 5, 5}, {1, 1, 1, 3, 5, 5}, {1, 1, 2, 3, 5, 5}, {1, 3, 3, 3, 5, 5}, {1, 3, 3, 4, 5, 5}, {1, 1, 1, 3, 3, 5}, {1, 1, 1, 3, 4, 5}, {1, 1, 2, 3, 3, 5}, {1, 1, 2, 3, 4, 5}, {1, 1, 3, 3, 3, 5}, {1, 1, 3, 3, 4, 5}, {1, 2, 3, 3, 3, 5}, {1, 2, 3, 3, 4, 5}, {1, 1, 3, 3, 5, 5}, {1, 1, 3, 4, 5, 5}, {1, 2, 3, 3, 5, 5}, {1, 2, 3, 4, 5, 5}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(\(allConditionalRepresentatives[{}]\)[3, 6]\)\(\[Equal]\)\(allRepresentatives[3, 6]\)\(\ \)\)\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(allConditionalRepresentatives[{6}]\)[3, 6]\)], "Input"], Cell[BoxData[ \({{1, 1, 1}, {1, 1, 2}, {1, 2, 3}, {6, 6, 6}, {1, 1, 6}, {1, 2, 6}, {1, 6, 6}}\)], "Output"] }, Open ]], Cell[BoxData[{ \(\(Clear@allBirepresentatives;\)\), "\[IndentingNewLine]", \(allBirepresentatives[d_, f_] := Flatten[\(With[{representative1 = #}, \ \[IndentingNewLine]\({representative1, #} &\) /@ \ \(allConditionalRepresentatives[representative1]\)[d, f]] &\) /@ allRepresentatives[d, f], 1]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(allBirepresentatives[3, 6] \[Equal] {{{1, 1, 1}, {2, 2, 2}}, {{1, 1, 1}, {2, 2, 3}}, {{1, 1, 1}, {2, 3, 4}}, {{1, 1, 1}, {1, 1, 1}}, {{1, 1, 1}, {1, 2, 2}}, {{1, 1, 1}, {1, 2, 3}}, {{1, 1, 1}, {1, 1, 2}}, {{1, 1, 2}, {3, 3, 3}}, {{1, 1, 2}, {3, 3, 4}}, {{1, 1, 2}, {3, 4, 5}}, {{1, 1, 2}, {2, 2, 2}}, {{1, 1, 2}, {1, 1, 1}}, {{1, 1, 2}, {2, 3, 3}}, {{1, 1, 2}, {2, 3, 4}}, {{1, 1, 2}, {1, 3, 3}}, {{1, 1, 2}, {1, 3, 4}}, {{1, 1, 2}, {2, 2, 3}}, {{1, 1, 2}, {1, 1, 3}}, {{1, 1, 2}, {1, 2, 2}}, {{1, 1, 2}, {1, 1, 2}}, {{1, 1, 2}, {1, 2, 3}}, {{1, 2, 3}, {4, 4, 4}}, {{1, 2, 3}, {4, 4, 5}}, {{1, 2, 3}, {4, 5, 6}}, {{1, 2, 3}, {1, 1, 1}}, {{1, 2, 3}, {1, 1, 2}}, {{1, 2, 3}, {1, 2, 3}}, {{1, 2, 3}, {1, 4, 4}}, {{1, 2, 3}, {1, 4, 5}}, {{1, 2, 3}, {1, 1, 4}}, {{1, 2, 3}, {1, 2, 4}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell["\<\ A function of two combinations, globally invariant modulo face \ permutations, has at most\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Length@allBirepresentatives[3, 6]\)], "Input"], Cell[BoxData[ \(31\)], "Output"] }, Open ]], Cell["\<\ values. \[Wolf] Symbolic formula? Generalize to any number of \ combinations (not needed for Markovian probability functions).\ \>", "Text"] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Fate, utility and strategy", "Section", CellTags->"c:38"], Cell[CellGroupData[{ Cell["Linear growth Markovian fate tree", "Subsection", CellTags->"c:39"], Cell[CellGroupData[{ Cell["Branching one leaf", "Subsubsection", CellTags->"c:40"], Cell["\<\ Any state (face combination of dice that have been pushed \ away).\ \>", "Text"], Cell[BoxData[ \({d = 3, f = 3}; state1 = {_};\)], "Input"], Cell["Arrangements of dice not yet pushed away:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(arrangements = Distribute[Table[Range@f, {d - Length@state1}], List]\)], "Input"], Cell[BoxData[ \({{1, 1}, {1, 2}, {1, 3}, {2, 1}, {2, 2}, {2, 3}, {3, 1}, {3, 2}, {3, 3}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Map[Sort, history /@ arrangements, {2}]\)], "Input"], Cell[BoxData[ \({{{}, {1}, {1, 1}}, {{}, {1}, {1, 2}}, {{}, {1}, {1, 3}}, {{}, {2}, {1, 2}}, {{}, {2}, {2, 2}}, {{}, {2}, {2, 3}}, {{}, {3}, {1, 3}}, {{}, {3}, {2, 3}}, {{}, {3}, {3, 3}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(listQuotient[Map[Sort, history /@ arrangements, {2}], Last]\)], "Input"], Cell[BoxData[ \({{{{}, {1}, {1, 1}}}, {{{}, {1}, {1, 2}}, {{}, {2}, {1, 2}}}, {{{}, {1}, {1, 3}}, {{}, {3}, {1, 3}}}, {{{}, {2}, {2, 2}}}, {{{}, {2}, {2, 3}}, {{}, {3}, {2, 3}}}, {{{}, {3}, {3, 3}}}}\)], "Output"] }, Open ]], Cell["\<\ All full (greatest length) combinations and theirs subcombinations.\ \ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(Union @@ # &\) /@ listQuotient[Map[Sort, history /@ arrangements, {2}], Last]\)], "Input"], Cell[BoxData[ \({{{}, {1}, {1, 1}}, {{}, {1}, {2}, {1, 2}}, {{}, {1}, {3}, {1, 3}}, {{}, {2}, {2, 2}}, {{}, {2}, {3}, {2, 3}}, {{}, {3}, {3, 3}}}\)], "Output"] }, Open ]], Cell["\<\ As dice are discernible, arrangements are equiprobable. The \ probability of raising a face combination is its redundancy divided by the \ total number of arrangements.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(Length@#/Length@arrangements &\) /@ listQuotient[Map[Sort, history /@ arrangements, {2}], Last]\)], "Input"], Cell[BoxData[ \({1\/9, 2\/9, 2\/9, 1\/9, 2\/9, 1\/9}\)], "Output"] }, Open ]], Cell["\<\ {{probability of raising face combination, {possible state \ changes}}\[Ellipsis]}\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(branchState1 = \({Length@#/Length@arrangements, Union @@ #} &\) /@ listQuotient[Map[Sort, history /@ arrangements, {2}], Last]\)], "Input"], Cell[BoxData[ \({{1\/9, {{}, {1}, {1, 1}}}, {2\/9, {{}, {1}, {2}, {1, 2}}}, {2\/9, {{}, {1}, {3}, {1, 3}}}, {1\/9, {{}, {2}, {2, 2}}}, {2\/9, {{}, {2}, {3}, {2, 3}}}, {1\/9, {{}, {3}, {3, 3}}}}\)], "Output"] }, Open ]], Cell["\<\ {{{probability, event}, possible next states}\[Ellipsis]} Next states are restricted according to the rules of the game.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\({{First@#, Last@\(Last@#\)}, restrictNextStates[Map[Sort@Join[state1, #] &, Last@#]]} &\) /@ branchState1\)], "Input"], Cell[BoxData[ \({{{1\/9, {1, 1}}, restrictNextStates[{{_}, {1, _}, {1, 1, _}}]}, {{2\/9, {1, 2}}, restrictNextStates[{{_}, {1, _}, {2, _}, {1, 2, _}}]}, {{2\/9, {1, 3}}, restrictNextStates[{{_}, {1, _}, {3, _}, {1, 3, _}}]}, {{1\/9, {2, 2}}, restrictNextStates[{{_}, {2, _}, {2, 2, _}}]}, {{2\/9, {2, 3}}, restrictNextStates[{{_}, {2, _}, {3, _}, {2, 3, _}}]}, {{1\/9, {3, 3}}, restrictNextStates[{{_}, {3, _}, {3, 3, _}}]}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d, f, state1, arrangements, branchState1} =. ;\)\)], "Input"], Cell[BoxData[ \(Protect@ state; \(branch[d_Integer, f_Integer, restrictNextStates_]\)[ state \[Rule] state1_List] \ := \[IndentingNewLine]With[\[IndentingNewLine]{arrangements = Distribute[Table[Range@f, {d - Length@state1}], List]}, \[IndentingNewLine]Map[{{First@#, Last@\(Last@#\)}, restrictNextStates[ Map[Sort@Join[state1, #] &, Last@#]]} &, \({Length@#/ Length@arrangements, Union @@ #} &\) /@ \n\t\t\t\tlistQuotient[ Map[Sort, history /@ arrangements, {2}], Last]]\[IndentingNewLine]]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, Identity]\)[state \[Rule] {_}]\)], "Input"], Cell[BoxData[ \({{{1\/9, {1, 1}}, {{_}, {1, _}, {1, 1, _}}}, {{2\/9, {1, 2}}, {{_}, {1, _}, {2, _}, {1, 2, _}}}, {{2\/9, {1, 3}}, {{_}, {1, _}, {3, _}, {1, 3, _}}}, {{1\/9, {2, 2}}, {{_}, {2, _}, {2, 2, _}}}, {{2\/9, {2, 3}}, {{_}, {2, _}, {3, _}, {2, 3, _}}}, {{1\/9, {3, 3}}, {{_}, {3, _}, {3, 3, _}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, Identity]\)[state \[Rule] {0, 0, 0}]\)], "Input"], Cell[BoxData[ \({{{1, {}}, {{0, 0, 0}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, Drop[#, All] &]\)[state \[Rule] {0, 0, 0}]\)], "Input"], Cell[BoxData[ \({{{1, {}}, {}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[0, 1, Identity]\)[state \[Rule] {}]\)], "Input"], Cell[BoxData[ \({{{1, {}}, {{}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[0, 0, Identity]\)[state \[Rule] {}]\)], "Input"], Cell[BoxData[ \({{{1, {}}, {{}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[1, 0, Identity]\)[state \[Rule] {}]\)], "Input"], Cell[BoxData[ \({}\)], "Output"] }, Open ]], Cell[BoxData[ \(dropLast = Drop[#, \(-1\)] &; takeLast = Take[#, \(-1\)] &;\)], "Input",\ InitializationCell->True], Cell["Next players.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, dropLast]\)[state \[Rule] {_}]\)], "Input"], Cell[BoxData[ \({{{1\/9, {1, 1}}, {{_}, {1, _}}}, {{2\/9, {1, 2}}, {{_}, {1, _}, {2, _}}}, {{2\/9, {1, 3}}, {{_}, {1, _}, {3, _}}}, {{1\/9, {2, 2}}, {{_}, {2, _}}}, {{2\/9, {2, 3}}, {{_}, {2, _}, {3, _}}}, {{1\/9, {3, 3}}, {{_}, {3, _}}}}\)], "Output"] }, Open ]], Cell["At end of round (for all players), all dice are pushed away.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, takeLast]\)[state \[Rule] {_}]\)], "Input"], Cell[BoxData[ \({{{1\/9, {1, 1}}, {{1, 1, _}}}, {{2\/9, {1, 2}}, {{1, 2, _}}}, {{2\/9, {1, 3}}, {{1, 3, _}}}, {{1\/9, {2, 2}}, {{2, 2, _}}}, {{2\/9, {2, 3}}, {{2, 3, _}}}, {{1\/9, {3, 3}}, {{3, 3, _}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 4, takeLast]\)[state \[Rule] {4}]\)], "Input"], Cell[BoxData[ \({{{1\/16, {1, 1}}, {{1, 1, 4}}}, {{1\/8, {1, 2}}, {{1, 2, 4}}}, {{1\/8, {1, 3}}, {{1, 3, 4}}}, {{1\/8, {1, 4}}, {{1, 4, 4}}}, {{1\/16, {2, 2}}, {{2, 2, 4}}}, {{1\/8, {2, 3}}, {{2, 3, 4}}}, {{1\/8, {2, 4}}, {{2, 4, 4}}}, {{1\/16, {3, 3}}, {{3, 3, 4}}}, {{1\/8, {3, 4}}, {{3, 4, 4}}}, {{1\/16, {4, 4}}, {{4, 4, 4}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 4, takeLast]\)[state \[Rule] {2}]\)], "Input"], Cell[BoxData[ \({{{1\/16, {1, 1}}, {{1, 1, 2}}}, {{1\/8, {1, 2}}, {{1, 2, 2}}}, {{1\/8, {1, 3}}, {{1, 2, 3}}}, {{1\/8, {1, 4}}, {{1, 2, 4}}}, {{1\/16, {2, 2}}, {{2, 2, 2}}}, {{1\/8, {2, 3}}, {{2, 2, 3}}}, {{1\/8, {2, 4}}, {{2, 2, 4}}}, {{1\/16, {3, 3}}, {{2, 3, 3}}}, {{1\/8, {3, 4}}, {{2, 3, 4}}}, {{1\/16, {4, 4}}, {{2, 4, 4}}}}\)], "Output"] }, Open ]], Cell["Check: evaluate all combinations otherwise.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 4, f = 5}, allCombinations[d, f] \[Equal] Last /@ \(First /@ \(branch[d, f, Identity]\)[ state \[Rule] {}]\)]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Branching many leaves and sharing next states", "Subsubsection", CellTags->"c:41"], Cell[CellGroupData[{ Cell[BoxData[{ \({d = 3, f = 3}; stateList1 = {{1}, {1, 2}}; restrictNextStates = Identity;\), "\n", \(stateBranchList = \(\(branch[d, f, restrictNextStates]\)[ state \[Rule] #] &\) /@ stateList1\)}], "Input"], Cell[BoxData[ \({{{{1\/9, {1, 1}}, {{1}, {1, 1}, {1, 1, 1}}}, {{2\/9, {1, 2}}, {{1}, {1, 1}, {1, 2}, {1, 1, 2}}}, {{2\/9, {1, 3}}, {{1}, {1, 1}, {1, 3}, {1, 1, 3}}}, {{1\/9, {2, 2}}, {{1}, {1, 2}, {1, 2, 2}}}, {{2\/9, {2, 3}}, {{1}, {1, 2}, {1, 3}, {1, 2, 3}}}, {{1\/9, {3, 3}}, {{1}, {1, 3}, {1, 3, 3}}}}, {{{1\/3, {1}}, {{1, 2}, {1, 1, 2}}}, {{1\/3, {2}}, {{1, 2}, {1, 2, 2}}}, {{1\/3, {3}}, {{1, 2}, {1, 2, 3}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(nextStates = Union@Flatten[Last /@ Flatten[stateBranchList, 1], 1]\)], "Input"], Cell[BoxData[ \({{1}, {1, 1}, {1, 2}, {1, 3}, {1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 2, 2}, {1, 2, 3}, {1, 3, 3}}\)], "Output"] }, Open ]], Cell["Next states are followed by their unique positions.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \({Transpose@{stateList1, \(\(MapAt[\({#, only@Position[ nextStates, #]} &\) /@ # &, #, \(-1\)] &\) /@ \ # &\) /@ stateBranchList}, nextStates}\)], "Input"], Cell[BoxData[ \({{{{1}, {{{1\/9, {1, 1}}, {{{1}, {1}}, {{1, 1}, {2}}, {{1, 1, 1}, {5}}}}, {{2\/9, {1, 2}}, {{{1}, {1}}, {{1, 1}, {2}}, {{1, 2}, {3}}, {{1, 1, 2}, {6}}}}, {{2\/9, {1, 3}}, {{{1}, {1}}, {{1, 1}, {2}}, {{1, 3}, {4}}, {{1, 1, 3}, {7}}}}, {{1\/9, {2, 2}}, {{{1}, {1}}, {{1, 2}, {3}}, {{1, 2, 2}, {8}}}}, {{2\/9, {2, 3}}, {{{1}, {1}}, {{1, 2}, {3}}, {{1, 3}, {4}}, {{1, 2, 3}, {9}}}}, {{1\/9, {3, 3}}, {{{1}, {1}}, {{1, 3}, {4}}, {{1, 3, 3}, {10}}}}}}, {{1, 2}, {{{1\/3, {1}}, {{{1, 2}, {3}}, {{1, 1, 2}, {6}}}}, {{1\/3, {2}}, {{{1, 2}, {3}}, {{1, 2, 2}, {8}}}}, {{1\/3, {3}}, {{{1, 2}, {3}}, {{1, 2, 3}, {9}}}}}}}, {{1}, {1, 1}, {1, 2}, {1, 3}, {1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 2, 2}, {1, 2, 3}, {1, 3, 3}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d, f, stateList1, restrictNextStates, stateBranchList, nextStates} =. ;\)\)], "Input"], Cell[BoxData[{ \(\(Protect@stateList;\)\), "\[IndentingNewLine]", \(\(branch[d_, f_, restrictNextStates_]\)[ stateList \[Rule] stateList1_List] := With[{stateBranchList = \(\(branch[d, f, restrictNextStates]\)[ state \[Rule] #] &\) /@ stateList1}, \[IndentingNewLine]With[{nextStates = Union@Flatten[Last /@ Flatten[stateBranchList, 1], 1]}, {Transpose@{stateList1, \(\(MapAt[\({#, only@Position[ nextStates, #]} &\) /@ # &, #, \(-1\)] \ &\) /@ # &\) /@ stateBranchList}, nextStates}]]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, Identity]\)[ stateList \[Rule] {{1}, {1, 2}}] \[Equal] {{{{1}, {{{1\/9, {1, 1}}, {{{1}, {1}}, {{1, 1}, {2}}, {{1, 1, 1}, {5}}}}, {{2\/9, {1, 2}}, {{{1}, {1}}, {{1, 1}, {2}}, {{1, 2}, {3}}, {{1, 1, 2}, {6}}}}, {{2\/9, {1, 3}}, {{{1}, {1}}, {{1, 1}, {2}}, {{1, 3}, {4}}, {{1, 1, 3}, {7}}}}, {{1\/9, {2, 2}}, {{{1}, {1}}, {{1, 2}, {3}}, {{1, 2, 2}, {8}}}}, {{2\/9, {2, 3}}, {{{1}, {1}}, {{1, 2}, {3}}, {{1, 3}, {4}}, {{1, 2, 3}, {9}}}}, {{1\/9, {3, 3}}, {{{1}, {1}}, {{1, 3}, {4}}, {{1, 3, 3}, {10}}}}}}, {{1, 2}, {{{1\/3, {1}}, {{{1, 2}, {3}}, {{1, 1, 2}, {6}}}}, {{1\/3, {2}}, {{{1, 2}, {3}}, {{1, 2, 2}, {8}}}}, {{1\/3, {3}}, {{{1, 2}, {3}}, {{1, 2, 3}, {9}}}}}}}, {{1}, {1, 1}, {1, 2}, {1, 3}, {1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 2, 2}, {1, 2, 3}, {1, 3, 3}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, Drop[#, All] &]\)[ stateList \[Rule] {{1}, {1, 2}}] \[Equal] \ {{{{1}, {{{1\/9, {1, 1}}, {}}, {{2\/9, {1, 2}}, {}}, {{2\/9, {1, 3}}, {}}, {{1\/9, {2, 2}}, {}}, {{2\/9, {2, 3}}, {}}, {{1\/9, {3, 3}}, {}}}}, {{1, 2}, {{{1\/3, {1}}, {}}, {{1\/3, {2}}, {}}, {{1\/3, {3}}, \ {}}}}}, {}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[0, 3, Identity]\)[stateList \[Rule] {{}}]\)], "Input"], Cell[BoxData[ \({{{{}, {{{1, {}}, {{{}, {1}}}}}}}, {{}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[0, 3, dropLast]\)[stateList \[Rule] {{}}]\)], "Input"], Cell[BoxData[ \({{{{}, {{{1, {}}, {}}}}}, {}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[0, 0, Identity]\)[stateList \[Rule] {{}}]\)], "Input"], Cell[BoxData[ \({{{{}, {{{1, {}}, {{{}, {1}}}}}}}, {{}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[1, 0, Identity]\)[stateList \[Rule] {{}}]\)], "Input"], Cell[BoxData[ \({{{{}, {}}}, {}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, dropLast]\)[ stateList \[Rule] {{1}, {1, 2}}] \[Equal] {{{{1}, {{{1\/9, {1, 1}}, {{{1}, {1}}, {{1, 1}, {2}}}}, {{2\/9, {1, 2}}, {{{1}, {1}}, {{1, 1}, {2}}, {{1, 2}, {3}}}}, {{2\/9, {1, 3}}, {{{1}, {1}}, {{1, 1}, {2}}, {{1, 3}, {4}}}}, {{1\/9, {2, 2}}, {{{1}, {1}}, {{1, 2}, {3}}}}, {{2\/9, {2, 3}}, {{{1}, {1}}, {{1, 2}, {3}}, {{1, 3}, {4}}}}, {{1\/9, {3, 3}}, {{{1}, {1}}, {{1, 3}, {4}}}}}}, {{1, 2}, {{{1\/3, {1}}, {{{1, 2}, {3}}}}, {{1\/3, {2}}, {{{1, 2}, {3}}}}, {{1\/3, {3}}, {{{1, 2}, {3}}}}}}}, {{1}, {1, 1}, {1, 2}, {1, 3}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, takeLast]\)[stateList \[Rule] {{1}, {1, 2}}]\)], "Input"], Cell[BoxData[ \({{{{1}, {{{1\/9, {1, 1}}, {{{1, 1, 1}, {1}}}}, {{2\/9, {1, 2}}, {{{1, 1, 2}, {2}}}}, {{2\/9, {1, 3}}, {{{1, 1, 3}, {3}}}}, {{1\/9, {2, 2}}, {{{1, 2, 2}, {4}}}}, {{2\/9, {2, 3}}, {{{1, 2, 3}, {5}}}}, {{1\/9, {3, 3}}, {{{1, 3, 3}, {6}}}}}}, {{1, 2}, {{{1\/3, {1}}, {{{1, 1, 2}, {2}}}}, {{1\/3, {2}}, {{{1, 2, 2}, {4}}}}, {{1\/3, {3}}, {{{1, 2, 3}, {5}}}}}}}, {{1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 2, 2}, {1, 2, 3}, {1, 3, 3}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, Identity]\)[ stateList \[Rule] {{}}] \[Equal] \ {{{{}, {{{1\/27, {1, 1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {5}}, {{1, 1, 1}, {11}}}}, {{1\/9, {1, 1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 1}, {5}}, {{1, 2}, {6}}, {{1, 1, 2}, {12}}}}, {{1\/9, {1, 1, 3}}, {{{}, {1}}, {{1}, {2}}, {{3}, {4}}, {{1, 1}, {5}}, {{1, 3}, {7}}, {{1, 1, 3}, {13}}}}, {{1\/9, {1, 2, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {6}}, {{2, 2}, {8}}, {{1, 2, 2}, {14}}}}, {{2\/9, {1, 2, 3}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{3}, {4}}, {{1, 2}, {6}}, {{1, 3}, {7}}, {{2, 3}, {9}}, {{1, 2, 3}, {15}}}}, {{1\/9, {1, 3, 3}}, {{{}, {1}}, {{1}, {2}}, {{3}, {4}}, {{1, 3}, {7}}, {{3, 3}, {10}}, {{1, 3, 3}, {16}}}}, {{1\/27, {2, 2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {8}}, {{2, 2, 2}, {17}}}}, {{1\/9, {2, 2, 3}}, {{{}, {1}}, {{2}, {3}}, {{3}, {4}}, {{2, 2}, {8}}, {{2, 3}, {9}}, {{2, 2, 3}, {18}}}}, {{1\/9, {2, 3, 3}}, {{{}, {1}}, {{2}, {3}}, {{3}, {4}}, {{2, 3}, {9}}, {{3, 3}, {10}}, {{2, 3, 3}, {19}}}}, {{1\/27, {3, 3, 3}}, {{{}, {1}}, {{3}, {4}}, {{3, 3}, {10}}, {{3, 3, 3}, {20}}}}}}}, {{}, {1}, {2}, {3}, {1, 1}, {1, 2}, {1, 3}, {2, 2}, {2, 3}, {3, 3}, {1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 2, 2}, {1, 2, 3}, {1, 3, 3}, {2, 2, 2}, {2, 2, 3}, {2, 3, 3}, {3, 3, 3}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, Identity]\)[stateList \[Rule] {{1, 1, 1}}]\)], "Input"], Cell[BoxData[ \({{{{1, 1, 1}, {{{1, {}}, {{{1, 1, 1}, {1}}}}}}}, {{1, 1, 1}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[3, 3, takeLast]\)[stateList \[Rule] {}]\)], "Input"], Cell[BoxData[ \({{}, {}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[1, 2, Identity]\)[stateList \[Rule] {{}}]\)], "Input"], Cell[BoxData[ \({{{{}, {{{1\/2, {1}}, {{{}, {1}}, {{1}, {2}}}}, {{1\/2, {2}}, {{{}, \ {1}}, {{2}, {3}}}}}}}, {{}, {1}, {2}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Branching deepest level", "Subsubsection", CellTags->"c:42"], Cell["Initial states.", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \({d = 2, f = 2}; restrictNextStates = Identity; fateTree1 = {_, {0, {{}, {1}, {1, 2}}}}; j1 = fateTree1[\([\(-1\), 1]\)]\), "\[IndentingNewLine]", \(stateList1 = fateTree1[\([\(-1\), \(-1\)]\)]\)}], "Input"], Cell[BoxData[ \(0\)], "Output"], Cell[BoxData[ \({{}, {1}, {1, 2}}\)], "Output"] }, Open ]], Cell["\<\ Live states (that can have branches) are exactly non-full states.\ \ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[DeleteCases[stateList1, Table[_, {d}]], Select[stateList1, Length@# \[NotEqual] d &], Select[stateList1, Length@# =!= d &], 50000, compare]\)], "Input"], Cell[BoxData[ \({{1.1899999999999977`\ Second, 1.0300000000000296`\ Second, 1.0299999999999727`\ Second}, {"same", {{}, {1}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[d, f, restrictNextStates]\)[ stateList \[Rule] Select[stateList1, Length@# \[NotEqual] d &]]\)], "Input"], Cell[BoxData[ \({{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}}, {{}, {1}, {2}, {1, 1}, {1, 2}, {2, 2}}}\)], "Output"] }, Open ]], Cell["Separate dead states.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(MapAt[{#, Select[stateList1, Length@# \[Equal] d &]} &, \(branch[d, f, restrictNextStates]\)[ stateList \[Rule] Select[stateList1, Length@# \[NotEqual] d &]], 1]\)], "Input"], Cell[BoxData[ \({{{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}}, {{1, 2}}}, {{}, {1}, {2}, {1, 1}, {1, 2}, {2, 2}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(fateTree1\), "\n", \(Join[dropLast@fateTree1, Transpose@{{j1, j1 + 1}, \[IndentingNewLine]MapAt[{#, Select[stateList1, Length@# \[Equal] d &]} &, \(branch[d, f, restrictNextStates]\)[ stateList \[Rule] Select[stateList1, Length@# \[NotEqual] d &]], 1]\[IndentingNewLine]}]\)}], "Input"], Cell[BoxData[ \({_, {0, {{}, {1}, {1, 2}}}}\)], "Output"], Cell[BoxData[ \({_, {0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}}, {{1, 2}}}}, {1, {{}, {1}, {2}, {1, 1}, {1, 2}, {2, 2}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d, f, fateTree1, restrictNextStates, j1, stateList1} =. ;\)\)], "Input"], Cell[BoxData[{ \(\(Protect@fateTree;\)\), "\n", \(\(branch[d_Integer, f_, restrictNextStates_]\)[ fateTree \[Rule] {fateTree1___, {j1_, stateList1 : {__}}}] := \[IndentingNewLine]Join[{fateTree1}, Transpose@{{j1, j1 + 1}, MapAt[{#, Select[stateList1, Length@# \[Equal] d &]} &, \(branch[ d, f, restrictNextStates]\)[ stateList \[Rule] Select[stateList1, Length@# \[NotEqual] d &]], 1]\[IndentingNewLine]}]\), "\[IndentingNewLine]", \(\(branch::emptyStateList = "\";\)\), "\ \[IndentingNewLine]", \(\(branch[d_Integer, f_, restrictNextStates_]\)[ fateTree \[Rule] {fateTree1___, {j1_, {}}}] := \((Message[ branch::emptyStateList]; {fateTree1, {j1, {{}, {}}}, {j1 + 1, {}}})\)\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[1, 1, Identity]\)[fateTree \[Rule] {_, {0, {}}}]\)], "Input"], Cell[BoxData[ \({_, {0, {{}, {}}}, {1, {}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[1, 1, Identity]\)[fateTree \[Rule] {_, {0, {{}}}}]\)], "Input"], Cell[BoxData[ \({_, {0, {{{{}, {{{1, {1}}, {{{}, {1}}, {{1}, {2}}}}}}}, {}}}, {1, {{}, \ {1}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \({d = 2, f = 2}; \(branch[d, f, Identity]\)[ fateTree \[Rule] {_, {0, {{}, {1}, Range@d}}}]\)], "Input"], Cell[BoxData[ \({_, {0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}}, {{1, 2}}}}, {1, {{}, {1}, {2}, {1, 1}, {1, 2}, {2, 2}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[d, f, Identity]\)[fateTree \[Rule] %]\)], "Input"], Cell[BoxData[ \({_, {0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}}, {{1, 2}}}}, {1, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{2}, {3}}, {{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}, {{2, 2}, {6}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {2, {{}, {1}, {2}, {1, 1}, {1, 2}, {2, 2}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d =. , f =. };\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(branch[2, 3, Identity]\)[ fateTree \[Rule] {{0, {{}, {1}}}}]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1\/9, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {5}}}}, {{2\/9, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {6}}}}, {{2\/9, {1, 3}}, {{{}, {1}}, {{1}, {2}}, {{3}, {4}}, {{1, 3}, {7}}}}, {{1\/9, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {8}}}}, {{2\/9, {2, 3}}, {{{}, {1}}, {{2}, {3}}, {{3}, {4}}, {{2, 3}, {9}}}}, {{1\/9, {3, 3}}, {{{}, {1}}, {{3}, {4}}, {{3, 3}, {10}}}}}}, {{1}, {{{1\/3, {1}}, {{{1}, {2}}, {{1, 1}, {5}}}}, {{1\/3, {2}}, {{{1}, {2}}, {{1, 2}, {6}}}}, {{1\/3, {3}}, {{{1}, {2}}, {{1, 3}, {7}}}}}}}, {}}}, {1, {{}, {1}, {2}, {3}, {1, 1}, {1, 2}, {1, 3}, {2, 2}, {2, 3}, {3, 3}}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Branching completely", "Subsubsection", CellTags->"c:43"], Cell[CellGroupData[{ Cell[BoxData[ \({d = 2, f = 2, j = 3}; restrictNextStates = Identity; \(branch[d, f, restrictNextStates]\)[ fateTree \[Rule] {{0, {{}}}}]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}}, {}}}, {1, {{}, {1}, {2}, {1, 1}, {1, 2}, {2, 2}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Fold[\(branch[d, f, #2]\)[fateTree \[Rule] #1] &, {{0, {{}}}}, Join[Table[restrictNextStates, {j - 1}], {takeLast, takeLast}]]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}}, {}}}, {1, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{2}, {3}}, {{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}, {{2, 2}, {6}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {2, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {3, {{}, {{1, 1}, {1, 2}, {2, 2}}}}, {4, {}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree1 = dropLast@Fold[\(branch[d, f, #2]\)[fateTree \[Rule] #1] &, {{0, {{}}}}, Join[Table[restrictNextStates, {j - 1}], {takeLast, takeLast}]]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}}, {}}}, {1, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{2}, {3}}, {{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}, {{2, 2}, {6}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {2, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {3, {{}, {{1, 1}, {1, 2}, {2, 2}}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \({restrictNextStates, fateTree1} =. ; {d =. , f =. , j =. };\)], "Input"], Cell[BoxData[{ \(Unprotect@fateTree; Clear@fateTree;\), "\[IndentingNewLine]", \(fateTree[player_, d_, f_, j_Integer] /; j > 0 := \[IndentingNewLine]dropLast@ Fold[\(branch[d, f, #2]\)[fateTree \[Rule] #1] &, {{0, {{}}}}, Join[\[IndentingNewLine]Switch[player, \[IndentingNewLine]"\", Table[Identity, {j - 1}], \[IndentingNewLine]"\", Table[dropLast, {j - 1}]], {takeLast, takeLast}]]\), "\[IndentingNewLine]", \(\(Protect@fateTree;\)\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 0, 1, 2]\)], "Input"], Cell[BoxData[ \({{0, {{}, {{}}}}, {1, {{}, {}}}, {2, {{}, {}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 1, 0, 1]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {}}}, {}}}, {1, {{}, {}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 1, 1, 0]\)], "Input"], Cell[BoxData[ \(fateTree["p2", 1, 1, 0]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 0, 1, 1]\)], "Input"], Cell[BoxData[ \({{0, {{}, {{}}}}, {1, {{}, {}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 1, 1, 1]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1, {1}}, {{{1}, {1}}}}}}}, {}}}, {1, {{}, {{1}}}}}\)], \ "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 1, 1, 2]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1, {1}}, {{{}, {1}}}}}}}, {}}}, {1, {{{{}, {{{1, {1}}, \ {{{1}, {1}}}}}}}, {}}}, {2, {{}, {{1}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 2, 1, 3]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1, {1, 1}}, {{{}, {1}}, {{1}, {2}}}}}}}, {}}}, {1, {{{{}, \ {{{1, {1, 1}}, {{{}, {1}}, {{1}, {2}}}}}}, {{1}, {{{1, {1}}, \ {{{1}, {2}}}}}}}, {}}}, {2, {{{{}, {{{1, {1, 1}}, {{{1, 1}, {1}}}}}}, {{1}, {{{1, {1}}, {{{1, 1}, {1}}}}}}}, {}}}, {3, {{}, {{1, 1}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 2, 2, 2]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}}}}}}, {}}}, {1, {{{{}, {{{1\ \/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {}}}, {2, {{}, {{1, 1}, {1, 2}, {2, 2}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 2, 3, 1]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1\/9, {1, 1}}, {{{1, 1}, {1}}}}, {{2\/9, {1, 2}}, {{{1, 2}, {2}}}}, {{2\/9, {1, 3}}, {{{1, 3}, {3}}}}, {{1\/9, {2, 2}}, {{{2, 2}, {4}}}}, {{2\/9, {2, 3}}, {{{2, 3}, {5}}}}, {{1\/9, {3, 3}}, {{{3, 3}, {6}}}}}}}, {}}}, {1, {{}, {{1, 1}, {1, 2}, {1, 3}, {2, 2}, {2, 3}, {3, 3}}}}}\)], "Output"] }, Open ]], Cell["\<\ \[Wolf] Next state sharing, on one hand, makes fate tree growing \ only linearly with cast number, not exponentially; on the other hand, \ prevents remembering fate: fate tree is Markovian.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Normal case", "Outline2", FontWeight->"Bold"], Cell["Apple Powerbook G4, PPC 1 GHz", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \({d = 3, f = 6, j = 3}; Timing@\(ByteCount@fateTree["\", d, f, j]\)\)], "Input"], Cell[BoxData[ \({0.4399999999999977`\ Second, 407416}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(spacing[fateTree["\", d, f, j], Last@%]\)], "Input"], Cell[BoxData[ \(691856\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Timing@\(ByteCount@fateTree["\", d, f, j]\)\)], "Input"], Cell[BoxData[ \({0.28000000000002956`\ Second, 340056}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d =. , f =. , j =. };\)\)], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Markovian utility and strategy formats", "Subsection", CellTags->{"section4", "c:44"}], Cell[CellGroupData[{ Cell["\[Ellipsis]with utility", "Subsubsection", CellTags->"c:45"], Cell["Check unicity of initial state.", "Text"], Cell[BoxData[{ \(\(Clear@initial;\)\), "\[IndentingNewLine]", \(\(initial@{{_, {{{_, {x_, ___}}}, {}}}, ___} = Extract[only@{{{x}}}, {1, 1}];\)\)}], "Input", InitializationCell->True], Cell[TextData[{ StyleBox["Utility", FontColor->RGBColor[1, 0, 0]], " precedes a ", StyleBox["strategy piece", FontColor->RGBColor[0, 1, 0]], ", empty for immediate utility." }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"utilityAndStrategy1", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{\({}\), ",", RowBox[{"{", RowBox[{ StyleBox[\(-7\), FontColor->RGBColor[1, 0, 0]], ",", StyleBox[\({{{1, 1}, {{{1, 1}, {4}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{2, 2}, {6}}}}}\), FontColor->RGBColor[0, 1, 0]]}], "}"}]}], "}"}], "}"}], ",", \({}\)}], "}"}]}], "}"}], ",", \({1, {{{{}, {\(-17\), {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}}, {{1}, {\(-\(35\/2\)\), {{{1}, \ {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}}, {{2}, {\(-\(33\/2\)\), {{{1}, \ {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}\), ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"{", RowBox[{\({}\), ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{\({1, 1}\), ",", RowBox[{"{", RowBox[{\(-18\), ",", StyleBox[\({}\), FontColor->RGBColor[1, 0, 0]]}], "}"}]}], "}"}], ",", \({{1, 2}, {\(-17\), {}}}\), ",", \({{2, 2}, {\(-16\), {}}}\)}], "}"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(initial@utilityAndStrategy1\)], "Input"], Cell[BoxData[ \(\(-7\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(initial@\(Rest@utilityAndStrategy1\)\)], "Input"], Cell[BoxData[ \(initial[{{1, {{{{}, {\(-17\), {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}}, {{1}, {\(-\(35\/2\)\), {{{1}, \ {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}}, {{2}, {\(-\(33\/2\)\), {{{1}, \ {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}, {2, {{}, {{{1, 1}, {\(-18\), {}}}, {{1, 2}, {\(-17\), {}}}, {{2, 2}, {\(-16\), {}}}}}}}]\)], "Output"] }, Open ]], Cell[BoxData[ \(utilityAndStrategy1 =. \)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["\[Ellipsis]without utility", "Subsubsection", CellTags->"c:46"], Cell[BoxData[ \(Clear@extractStrategy; extractStrategy@ utilityAndStrategy1_List := \(MapAt[ Map[MapAt[Last, #, \(-1\)] &, #, {2}] &, #, \(-1\)] &\) /@ utilityAndStrategy1;\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(extractStrategy@{{0, {{{{}, {\(-7\), {{{1, 1}, {{{1, 1}, {4}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{2, 2}, {6}}}}}}}}, {}}}, {1, {{{{}, {\(-17\), \ {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}}, {{1}, {\(-\(35\/2\)\), {{{1}, \ {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}}, {{2}, {\(-\(33\/2\)\), {{{1}, \ {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}, {2, {{}, {{{1, 1}, {\(-18\), {}}}, {{1, 2}, {\(-17\), {}}}, {{2, 2}, {\(-16\), {}}}}}}} \[Equal] \ {{0, {{{{}, {{{1, 1}, {{{1, 1}, {4}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{2, 2}, {6}}}}}}}, {}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}, {2, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]], Cell["Utility function samples", "Subsubsection", CellTags->"c:47"], Cell[CellGroupData[{ Cell["Token transfer function", "Outline2"], Cell[TextData[{ "This is the only numeric function on face combinations appearing in the \ rules of the game. It is used ", StyleBox["unrealistically", FontSlant->"Italic"], " as a utility function." }], "Text"], Cell[BoxData[{ \(\(Clear@transfer36;\)\), "\[IndentingNewLine]", \(With[{d = 3, f = 6}, \[IndentingNewLine]\(\((transfer36@# = 1)\) &\) /@ allCombinations[d, f]; \[IndentingNewLine]\(\((transfer36[First@#] = Last@#)\) &\) /@ {{{1, 2, 4}, 10}, {{1, 1, 1}, 7}, {{1, 2, 3}, 2}, {{2, 3, 4}, 2}, {{3, 4, 5}, 2}, {{4, 5, 6}, 2}}; \[IndentingNewLine]\(\((transfer36[First@#] = Last@#)\) &\) /@ \[IndentingNewLine]Flatten[ Table[{{Table[f1, {d}], f1}, {{1, 1, f1}, f1}}, {f1, 2, f}], 1];]\)}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \({d = 3, f = 6}; TableForm[\({#, transfer36@#} &\) /@ allCombinations[d, f], TableDepth \[Rule] 2, TableDirections \[Rule] {Column, Row}]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {\({1, 1, 1}\), "7"}, {\({1, 1, 2}\), "2"}, {\({1, 1, 3}\), "3"}, {\({1, 1, 4}\), "4"}, {\({1, 1, 5}\), "5"}, {\({1, 1, 6}\), "6"}, {\({1, 2, 2}\), "1"}, {\({1, 2, 3}\), "2"}, {\({1, 2, 4}\), "10"}, {\({1, 2, 5}\), "1"}, {\({1, 2, 6}\), "1"}, {\({1, 3, 3}\), "1"}, {\({1, 3, 4}\), "1"}, {\({1, 3, 5}\), "1"}, {\({1, 3, 6}\), "1"}, {\({1, 4, 4}\), "1"}, {\({1, 4, 5}\), "1"}, {\({1, 4, 6}\), "1"}, {\({1, 5, 5}\), "1"}, {\({1, 5, 6}\), "1"}, {\({1, 6, 6}\), "1"}, {\({2, 2, 2}\), "2"}, {\({2, 2, 3}\), "1"}, {\({2, 2, 4}\), "1"}, {\({2, 2, 5}\), "1"}, {\({2, 2, 6}\), "1"}, {\({2, 3, 3}\), "1"}, {\({2, 3, 4}\), "2"}, {\({2, 3, 5}\), "1"}, {\({2, 3, 6}\), "1"}, {\({2, 4, 4}\), "1"}, {\({2, 4, 5}\), "1"}, {\({2, 4, 6}\), "1"}, {\({2, 5, 5}\), "1"}, {\({2, 5, 6}\), "1"}, {\({2, 6, 6}\), "1"}, {\({3, 3, 3}\), "3"}, {\({3, 3, 4}\), "1"}, {\({3, 3, 5}\), "1"}, {\({3, 3, 6}\), "1"}, {\({3, 4, 4}\), "1"}, {\({3, 4, 5}\), "2"}, {\({3, 4, 6}\), "1"}, {\({3, 5, 5}\), "1"}, {\({3, 5, 6}\), "1"}, {\({3, 6, 6}\), "1"}, {\({4, 4, 4}\), "4"}, {\({4, 4, 5}\), "1"}, {\({4, 4, 6}\), "1"}, {\({4, 5, 5}\), "1"}, {\({4, 5, 6}\), "2"}, {\({4, 6, 6}\), "1"}, {\({5, 5, 5}\), "5"}, {\({5, 5, 6}\), "1"}, {\({5, 6, 6}\), "1"}, {\({6, 6, 6}\), "6"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$, TableDepth -> 2, TableDirections -> {Column, Row}]]]], "Output"] }, Open ]], Cell[TextData[{ "Generalize to any ", Cell[BoxData[ \(TraditionalForm\`d, f\)]], " (with powers of 2)." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(NestList[Append[#, Total@#] &, {1}, d]\)], "Input"], Cell[BoxData[ \({{1}, {1, 1}, {1, 1, 2}, {1, 1, 2, 4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(Min[#, f] &\) /@ Rest@\(Last@NestList[Append[#, Total@#] &, {1}, d]\)\)], "Input"], Cell[BoxData[ \({1, 2, 4}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Append[\[IndentingNewLine]Flatten[\[IndentingNewLine]\(With[{\ vectorRepresentative1 = #}, \ \[IndentingNewLine]Which[\[IndentingNewLine]Length@ vectorRepresentative1 \[Equal] 1, \[IndentingNewLine]Table[{Table[f1, {d}], If[f1 \[Equal] 1, f + 1, f1]}, {f1, f}], \[IndentingNewLine]Length@ vectorRepresentative1 \[Equal] 2, \[IndentingNewLine]Table[\[IndentingNewLine]{Join[ Table[1, {First@vectorRepresentative1}], Table[f1, {Last@vectorRepresentative1}]], f1}, {f1, 2, f}], \[IndentingNewLine]True, \ \[IndentingNewLine]With[{state1 = vectorToCombination[ vectorRepresentative1]}, \[IndentingNewLine]\({state1 \ + #, 2} &\) /@ Range[0, f - Last@ state1]]\[IndentingNewLine]]\[IndentingNewLine]] \ &\) /@ allVectorRepresentatives[d, f], \[IndentingNewLine]1], \[IndentingNewLine]{\(Min[#, f] &\) /@ Rest@\(Last@NestList[Append[#, Total@#] &, {1}, d]\), d + f + 1}\[IndentingNewLine]]\)], "Input"], Cell[BoxData[ \({{{1, 1, 1}, 7}, {{2, 2, 2}, 2}, {{3, 3, 3}, 3}, {{4, 4, 4}, 4}, {{5, 5, 5}, 5}, {{6, 6, 6}, 6}, {{1, 1, 2}, 2}, {{1, 1, 3}, 3}, {{1, 1, 4}, 4}, {{1, 1, 5}, 5}, {{1, 1, 6}, 6}, {{1, 2, 3}, 2}, {{2, 3, 4}, 2}, {{3, 4, 5}, 2}, {{4, 5, 6}, 2}, {{1, 2, 4}, 10}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d =. , f =. };\)\)], "Input"], Cell[BoxData[ \(make@ transfer[d_Integer, f_Integer] := \[IndentingNewLine]\((\(\((transfer[d, f]@# = 1)\) &\) /@ allCombinations[d, f]; \(\((transfer[d, f]@\(First@#\) = Last@#)\) &\) /@ Append[Flatten[\(With[{vectorRepresentative1 = #}, \ \[IndentingNewLine]Which[\[IndentingNewLine]Length@ vectorRepresentative1 \[Equal] 1, \[IndentingNewLine]Table[{Table[f1, {d}], If[f1 \[Equal] 1, f + 1, f1]}, {f1, f}], \[IndentingNewLine]Length@ vectorRepresentative1 \[Equal] 2, \[IndentingNewLine]Table[\[IndentingNewLine]{Join[ Table[1, {First@vectorRepresentative1}], Table[f1, {Last@vectorRepresentative1}]], f1}, {f1, 2, f}], \[IndentingNewLine]True, \ \[IndentingNewLine]With[{state1 = vectorToCombination[ vectorRepresentative1]}, \ \[IndentingNewLine]\({state1 + #, 2} &\) /@ Range[0, f - Last@ state1]]\[IndentingNewLine]]\ \[IndentingNewLine]] &\) /@ allVectorRepresentatives[d, f], \[IndentingNewLine]1], \[IndentingNewLine]{\(Min[#, f] &\) /@ Rest@\(Last@NestList[Append[#, Total@#] &, {1}, d]\), d + f + 1}\[IndentingNewLine]];)\)\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Block[{transfer}, With[{d = 3, f = 6}, \[IndentingNewLine]make@transfer[d, f]; Apply[And, \(transfer[d, f]@# \[Equal] transfer36@# &\) /@ allCombinations[d, f]]]]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Uniformly random utility functions", "Outline2"], Cell[BoxData[ \(make@ randomUtility[d_Integer, f_Integer, j_Integer, seed_Integer] := \((SeedRandom[ seed]; \[IndentingNewLine]\(With[{j1 = #}, \ \[IndentingNewLine]\(With[{state1 = #}, \[IndentingNewLine]\(randomUtility[d, f, j, seed]\)[j1, state1] = \(Floor[# Random[]]/# &\)@ 101\[IndentingNewLine]] &\) /@ allCombinations[d, f]\[IndentingNewLine]] &\) /@ Range@j)\)\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Block[{randomUtility}, \[IndentingNewLine]With[{d = 2, f = 3, j = 3, seed = 280865}, \[IndentingNewLine]make@ randomUtility[d, f, j, seed]; \[IndentingNewLine]\(With[{j1 = #}, \ \[IndentingNewLine]\(With[{state1 = #}, \[IndentingNewLine]\(randomUtility[d, f, j, seed]\)[j1, state1]\[IndentingNewLine]] &\) /@ allCombinations[d, f]\[IndentingNewLine]] &\) /@ Range@j\[IndentingNewLine]]\[IndentingNewLine]]\)], "Input"], Cell[BoxData[ \({{51\/101, 65\/101, 72\/101, 20\/101, 70\/101, 2\/101}, {47\/101, 55\/101, 17\/101, 33\/101, 87\/101, 35\/101}, {73\/101, 0, 60\/101, 23\/101, 26\/101, 41\/101}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Making samples", "Outline2"], Cell[BoxData[ RowBox[{"Notation", "[", RowBox[{ TagBox[\(\[Delta][x_, y_]\), NotationBoxTag, TagStyle->"NotationTemplateStyle"], " ", "\[DoubleLongLeftRightArrow]", " ", TagBox[\(KroneckerDelta[x_, y_]\), NotationBoxTag, TagStyle->"NotationTemplateStyle"]}], "]"}]], "Input", InitializationCell->True], Cell[BoxData[ \(\(With[{d = 2, f = 3, j = 3}, \[IndentingNewLine]make@ transfer[d, f]; \[IndentingNewLine]make@ randomUtility[d, f, j, 280865]; \[IndentingNewLine]make@ randomUtility[d, f, j, 28086]; \[IndentingNewLine]make@ randomUtility[d, f, j, 2808]; \[IndentingNewLine]make@ randomUtility[d, f, j, 280]; \[IndentingNewLine]make@ randomUtility[d, f, j, 28]; \[IndentingNewLine]make@ randomUtility[d, f, j, 2]; \[IndentingNewLine]utilityList[d, f, j] = {\[IndentingNewLine]\[Delta][{1, 2}, #2] &, \[IndentingNewLine]\[Delta][{1, 2}, #2] + \[Delta][{2, 3}, #2] &, \[IndentingNewLine]\[Delta][{1, 1}, #2] + \[Delta][{2, 2}, #2] &, \[IndentingNewLine]\[Delta][{1, 1}, #2] + \[Delta][{1, 2}, #2] &, \[IndentingNewLine]transfer[d, f]@#2 &, \[IndentingNewLine]Max@#2 &, \ \[IndentingNewLine]Total@#2 &, \[IndentingNewLine]Apply[ Times, \(# - 1 &\) /@ #2] &, \[IndentingNewLine]Times @@ #2 &, \ \[IndentingNewLine]randomUtility[d, f, j, 280865], \[IndentingNewLine]randomUtility[d, f, j, 28086], \[IndentingNewLine]randomUtility[d, f, j, 2808], \[IndentingNewLine]randomUtility[d, f, j, 280], \[IndentingNewLine]randomUtility[d, f, j, 28], \[IndentingNewLine]randomUtility[d, f, j, 2]}];\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(With[{d = 3, f = 6, j = 3}, \[IndentingNewLine]make@ transfer[d, f]; \[IndentingNewLine]make@ randomUtility[d, f, j, 280865]; \[IndentingNewLine]make@ randomUtility[d, f, j, 28086]; \[IndentingNewLine]make@ randomUtility[d, f, j, 2808]; \[IndentingNewLine]make@ randomUtility[d, f, j, 280]; \[IndentingNewLine]make@ randomUtility[d, f, j, 28]; \[IndentingNewLine]make@ randomUtility[d, f, j, 2]; \[IndentingNewLine]utilityList[d, f, j] = {\[IndentingNewLine]\[Delta][{1, 2, 3}, #2] &, \[IndentingNewLine]\[Delta][{1, 2, 3}, #2] + \[Delta][{4, 5, 6}, #2] &, \[IndentingNewLine]\[Delta][{1, 2, 3}, #2] + \[Delta][{2, 3, 4}, #2] &, \[IndentingNewLine]\[Delta][{1, 1, 1}, #2] + \[Delta][{2, 2, 2}, #2] &, \[IndentingNewLine]\[Delta][{1, 2, 3}, #2] + \[Delta][{3, 4, 5}, #2] + \[Delta][{1, 5, 6}, #2] &, \[IndentingNewLine]\[Delta][{1, 1, 1}, #2] + \[Delta][{2, 2, 2}, #2] + \[Delta][{1, 1, 3}, #2] + \[Delta][{2, 2, 3}, #2] &, \[IndentingNewLine]transfer[d, f]@#2 &, \[IndentingNewLine]Max@#2 &, \ \[IndentingNewLine]Total@#2 &, \[IndentingNewLine]Apply[ Times, \(# - 1 &\) /@ #2] &, \[IndentingNewLine]Times @@ #2 &, \ \[IndentingNewLine]randomUtility[d, f, j, 280865], \[IndentingNewLine]randomUtility[d, f, j, 28086], \[IndentingNewLine]randomUtility[d, f, j, 2808], \[IndentingNewLine]randomUtility[d, f, j, 280], \[IndentingNewLine]randomUtility[d, f, j, 28], \[IndentingNewLine]randomUtility[d, f, j, 2]}];\)\)], "Input", InitializationCell->True] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Fate tree or strategy transformations", "Subsection", CellTags->"c:48"], Cell[CellGroupData[{ Cell["Purifying strategy", "Subsubsection", CellTags->"c:49"], Cell["\<\ This means eliminating random choices in a non-pure strategy:\ \>", \ "Text"], Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{\({}\), ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{\({1, 1}\), ",", StyleBox[\({{{}, {1}}, {{1}, {2}}}\), FontColor->RGBColor[1, 0, 0]]}], "}"}], ",", \({{1, 2}, {{{1, 2}, {5}}}}\), ",", \({{2, 2}, {{{}, {1}}, {{2}, {3}}}}\)}], "}"}]}], "}"}], "}"}], ",", \({}\)}], "}"}]}], "}"}], ",", \({1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}\), ",", \({2, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}\)}], "}"}], ";"}]], "Input"], Cell["Only first choices in canonical order are retained.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"MapAt", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"MapAt", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"MapAt", "[", RowBox[{ StyleBox[\(Take[#, 1] &\), FontColor->RGBColor[1, 0, 0]], ",", "#", ",", \(-1\)}], "]"}], "&"}], "/@", "#"}], "&"}], ",", "#", ",", \(-1\)}], "]"}], "&"}], "/@", "#"}], "&"}], ",", "#", ",", \({\(-1\), 1}\)}], "]"}], "&"}], "/@", "%"}]], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1, 1}, {{{}, {1}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{}, {1}}}}}}}, {}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}, {2, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(Clear@purify; purify@\(order1 : 1 | \(-1\)\) := \(MapAt[\(MapAt[\(MapAt[ Take[#, order1] &, #, \(-1\)] &\) /@ # &, #, \ \(-1\)] &\) /@ # &, #, {\(-1\), 1}] &\) /@ # &;\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(purify[ 1]@{{0, {{{{}, {{{1, 1}, {{{}, {1}}, {{1}, {2}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{}, {1}}, {{2}, {3}}}}}}}, {}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}, {2, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}}\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1, 1}, {{{}, {1}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{}, {1}}}}}}}, {}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}, {2, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(purify[\(-1\)]@{{0, {{{{}, {{{1, 1}, {{{}, {1}}, {{1}, {2}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{}, {1}}, {{2}, {3}}}}}}}, {}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}, {2, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}}\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1, 1}, {{{1}, {2}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{2}, {3}}}}}}}, {}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}, {2, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Forcing fate tree by some strategy", "Subsubsection", CellTags->"c:50"], Cell[TextData[{ "In fate tree branching, next states are restricted, so that exactly one \ strategy, ", StyleBox["not necessarily pure", FontColor->RGBColor[1, 0, 0]], ", is left." }], "Text"], Cell[BoxData[{\(fateTree1 = fateTree["\", 2, 2, 3];\), "\n", RowBox[{ RowBox[{"strategy1", " ", "=", RowBox[{"{", RowBox[{\({0, {{{{}, {{{1, 1}, {{{}, {1}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{}, {1}}}}}}}, {}}}\), ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{\({}\), ",", RowBox[{"{", RowBox[{\({{1, 1}, {{{}, {1}}}}\), ",", RowBox[{"{", RowBox[{\({1, 2}\), ",", RowBox[{"{", RowBox[{\({{1, 2}, {5}}\), StyleBox[",", FontColor->RGBColor[1, 0, 0]], StyleBox[\({{1}, {2}}\), FontColor->RGBColor[1, 0, 0]]}], "}"}]}], "}"}], ",", \({{2, 2}, {{{}, {1}}}}\)}], "}"}]}], "}"}], ",", \({{1}, {{{1}, {{{1}, {2}}}}, {{2}, {{{1, 2}, {5}}}}}}\), ",", \({{2}, {{{1}, {{{1, 2}, {5}}}}, {{2}, {{{2}, {3}}}}}}\)}], "}"}], ",", \({{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}\)}], "}"}]}], "}"}], ",", \({2, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}\), ",", \({3, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}\)}], "}"}]}], ";"}]}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(MapThread[\[IndentingNewLine]With[{strategyStep = #2}, \ \[IndentingNewLine]MapAt[ function1[#, strategyStep[\([\(-1\), 1]\)]] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]\)[\([2]\)]\)[\([\(-1\), 1]\)]\)], "Input"], Cell[BoxData[ \(function1[{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{2}, {3}}, {{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}, {{2, 2}, {6}}}}}}}, {{{}, {{{1, 1}, {{{}, {1}}}}, {{1, 2}, {{{1, 2}, {5}}, {{1}, {2}}}}, {{2, 2}, {{{}, {1}}}}}}, {{1}, {{{1}, {{{1}, {2}}}}, {{2}, {{{1, 2}, {5}}}}}}, {{2}, {{{1}, {{{1, 2}, {5}}}}, {{2}, {{{2}, {3}}}}}}}]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(MapThread[\[IndentingNewLine]With[{strategyStep = #2}, \ \[IndentingNewLine]MapAt[ MapThread[{First@#1, function1[Last@#1, Last@#2]} &, {#, strategyStep[\([\(-1\), 1]\)]}] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]\)[\([2]\)]\)[\([\(-1\), 1, 1, \(-1\)]\)]\)], "Input"], Cell[BoxData[ \(function1[{{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}, {{{1, 1}, {{{}, {1}}}}, {{1, 2}, {{{1, 2}, {5}}, {{1}, {2}}}}, {{2, 2}, {{{}, {1}}}}}]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(MapThread[\[IndentingNewLine]With[{strategyStep = #2}, \ \[IndentingNewLine]MapAt[ MapThread[\[IndentingNewLine]{First@#1, MapThread[ function1, {Last@#1, Last@#2}]}\[IndentingNewLine] &, {#, strategyStep[\([\(-1\), 1]\)]}] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]\)[\([2]\)]\)[\([\(-1\), 1, 1, \(-1\), 2]\)]\)], "Input"], Cell[BoxData[ \(function1[{{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1, 2}, {{{1, 2}, {5}}, {{1}, {2}}}}]\)], "Output"] }, Open ]], Cell["The forcing point is reached. ", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(MapThread[ With[{strategyStep = #2}, MapAt[MapThread[{First@#1, MapThread[{First@#1, force1[Last@#1, Last@#2]} &, {Last@#1, Last@#2}]} &, {#, strategyStep[\([\(-1\), 1]\)]}] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]\)[\([2]\)]\)], "Input"], Cell[BoxData[ \({1, {{{{}, {{{1\/4, {1, 1}}, force1[{{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}, {{{}, {1}}}]}, {{1\/2, {1, 2}}, force1[{{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}, {{{1, 2}, {5}}, {{1}, {2}}}]}, {{1\/4, {2, 2}}, force1[{{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}, {{{}, {1}}}]}}}, {{1}, {{{1\/2, {1}}, force1[{{{1}, {2}}, {{1, 1}, {4}}}, {{{1}, {2}}}]}, {{1\/2, {2}}, force1[{{{1}, {2}}, {{1, 2}, {5}}}, {{{1, 2}, {5}}}]}}}, {{2}, {{{1\/2, {1}}, force1[{{{2}, {3}}, {{1, 2}, {5}}}, {{{1, 2}, {5}}}]}, {{1\/2, {2}}, force1[{{{2}, {3}}, {{2, 2}, {6}}}, {{{2}, {3}}}]}}}}, {{1, 1}, {1, 2}, {2, 2}}}}\)], "Output"] }, Open ]], Cell["\<\ \[Wolf] State positions need not be identical in fate tree and \ strategy.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(With[{force1 = With[{stateList1 = First /@ #2}, \[IndentingNewLine]Select[#1, First@#~myElement~ stateList1 &]] &}, \[IndentingNewLine]MapThread[\ \[IndentingNewLine]With[{strategyStep = #2}, \[IndentingNewLine]MapAt[ MapThread[\[IndentingNewLine]With[{h1 = Last@#2}, MapAt[MapThread[ With[{h2 = Last@#2}, MapAt[force1[#, h2] &, #1, \(-1\)]] &, {#, h1}] &, #1, \(-1\)]] &, {#, strategyStep[\([\(-1\), 1]\)]}] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]]\)[\([2]\)]\)], "Input"], Cell[BoxData[ \({1, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}}}, {{1\/2, {1, 2}}, {{{1}, {2}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}}}, \ {{1\/2, {2}}, {{{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(With[{force1 = Cases[#1, Apply[Alternatives, \({First@#, _} &\) /@ #2]] &}, \ \[IndentingNewLine]MapThread[\[IndentingNewLine]With[{strategyStep = #2}, \ \[IndentingNewLine]MapAt[ MapThread[\[IndentingNewLine]With[{h1 = Last@#2}, MapAt[MapThread[ With[{h2 = Last@#2}, MapAt[force1[#, h2] &, #1, \(-1\)]] &, {#, h1}] &, #1, \(-1\)]] &, {#, strategyStep[\([\(-1\), 1]\)]}] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]]\)[\([2]\)]\)], "Input"], Cell[BoxData[ \({1, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}}}, {{1\/2, {1, 2}}, {{{1}, {2}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}}}, \ {{1\/2, {2}}, {{{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(zoomTiming[\[IndentingNewLine]With[{force1 = With[{stateList1 = First /@ #2}, \[IndentingNewLine]Select[#1, First@#~myElement~ stateList1 &]] &}, \[IndentingNewLine]MapThread[\ \[IndentingNewLine]With[{strategyStep = #2}, \[IndentingNewLine]MapAt[ MapThread[\[IndentingNewLine]With[{h1 = Last@#2}, MapAt[MapThread[ With[{h2 = Last@#2}, MapAt[force1[#, h2] &, #1, \(-1\)]] &, {#, h1}] &, #1, \(-1\)]] &, {#, strategyStep[\([\(-1\), 1]\)]}] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]], With[{force1 = Cases[#1, Apply[Alternatives, \({First@#, _} &\) /@ #2]] &}, \ \[IndentingNewLine]MapThread[\[IndentingNewLine]With[{strategyStep = #2}, \ \[IndentingNewLine]MapAt[ MapThread[\[IndentingNewLine]With[{h1 = Last@#2}, MapAt[MapThread[ With[{h2 = Last@#2}, MapAt[force1[#, h2] &, #1, \(-1\)]] &, {#, h1}] &, #1, \(-1\)]] &, {#, strategyStep[\([\(-1\), 1]\)]}] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]], 1000, compare]\)], "Input"], Cell[BoxData[ \({{2.1299999999999955`\ Second, 1.6499999999999773`\ Second}, {"same", {{0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}}}}}}, {}}}, {1, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}}}, {{1\/2, {1, 2}}, {{{1}, {2}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, \ {2}}}}, {{1\/2, {2}}, {{{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {2, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {3, {{}, {{1, 1}, {1, 2}, {2, 2}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{force1 = Cases[#1, Apply[Alternatives, \({First@#, _} &\) /@ #2]] &}, \ \[IndentingNewLine]MapThread[ With[{strategyStep = #2}, MapAt[MapThread[{First@#1, MapThread[{First@#1, force1[Last@#1, Last@#2]} &, {Last@#1, Last@#2}]} &, {#, strategyStep[\([\(-1\), 1]\)]}] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}}}}}}, {}}}, {1, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}}}, {{1\/2, {1, 2}}, {{{1}, {2}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, \ {2}}}}, {{1\/2, {2}}, {{{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {2, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {3, {{}, {{1, 1}, {1, 2}, {2, 2}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(strategy1[\([1]\)]\)], "Input"], Cell[BoxData[ \({0, {{{{}, {{{1, 1}, {{{}, {1}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{}, {1}}}}}}}, {}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({fateTree1, strategy1} =. ;\)\)], "Input"], Cell[BoxData[{ \(\(Clear@force;\)\), "\[IndentingNewLine]", \(force[strategy1_List]@fateTree1_List := With[{force1 = Cases[#1, Apply[Alternatives, \({First@#, _} &\) /@ #2]] &}, \ \[IndentingNewLine]MapThread[ With[{strategyStep = #2}, MapAt[MapThread[{First@#1, MapThread[{First@#1, force1[Last@#1, Last@#2]} &, {Last@#1, Last@#2}]} &, {#, strategyStep[\([\(-1\), 1]\)]}] &, #1, {\(-1\), 1}]] &, {fateTree1, strategy1}]]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(force[{{0, {{{{}, {{{1, 1}, {{{}, {1}}}}, {{1, 2}, {{{1, 2}, {5}}}}, {{2, 2}, {{{}, {1}}}}}}}, {}}}, {1, {{{{}, {{{1, 1}, {{{}, {1}}}}, {{1, 2}, {{{1, 2}, {5}}, {{1}, {2}}}}, {{2, 2}, {{{}, {1}}}}}}, {{1}, {{{1}, {{{1}, {2}}}}, \ {{2}, {{{1, 2}, {5}}}}}}, {{2}, {{{1}, {{{1, 2}, {5}}}}, {{2}, {{{2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}, {2, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}, {3, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}}]@{{0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}}, {}}}, {1, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, {2}}, \ {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{2}, {3}}, \ {{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}, {{2, 2}, {6}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {2, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {3, {{}, {{1, 1}, {1, 2}, {2, 2}}}}} \[Equal] {{0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}}}}}}, {}}}, {1, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}}}, {{1\/2, {1, 2}}, {{{1}, {2}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}}}}}, {{1}, {{{1\/2, {1}}, {{{1}, \ {2}}}}, {{1\/2, {2}}, {{{1, 2}, {5}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {5}}}}, {{1\/2, {2}}, {{{2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {2, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{1, 1}, {1, 2}, {2, 2}}}}, {3, {{}, {{1, 1}, {1, 2}, {2, 2}}}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Pruning fate tree according to some utility function", "Subsubsection", CellTags->"c:51"], Cell[TextData[{ "Def.: a dead state is ", StyleBox["vain", FontSlant->"Italic"], " if it is less useful than all simultaneous dead states; a live state is \ ", StyleBox["vain", FontSlant->"Italic"], " if all its dead descendants are vain." }], "Text"], Cell["\<\ A vain state will stay vain forever but any state can become vain \ because opportunities have been missed.\ \>", "Text"], Cell[TextData[{ "Pruning means to avoid choosing a vain state; it is a case a dominated \ strategy elimination [", ButtonBox["3", ButtonData:>"references", ButtonStyle->"Hyperlink"], "], like von Neumann's \"\[Alpha]-\[Beta]\" pruning for game trees.." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\({d = 2, f = 4, j = 3};\)\), "\n", \(\(utility = If[Last@#2 - First@#2 \[LessEqual] j - #1, #1, \(-#1\)] &;\)\), "\n", \(\(Table[utility[j1, #], {j1, 3}] &\) /@ {{1, 4}, {1, 3}, {1, 2}, {1, 1}}\)}], "Input"], Cell[BoxData[ \({{\(-1\), \(-2\), \(-3\)}, {1, \(-2\), \(-3\)}, {1, 2, \(-3\)}, {1, 2, 3}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(minUtilities = Min /@ Outer[utility, Range@j, allCombinations[d, f], 1]\)], "Input"], Cell[BoxData[ \({\(-1\), \(-2\), \(-3\)}\)], "Output"] }, Open ]], Cell["Dead descendants (superstates).", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(state1 = {1}; \(Sort@Join[state1, #] &\) /@ allCombinations[d - Length@state1, f]\)], "Input"], Cell[BoxData[ \({{1, 1}, {1, 2}, {1, 3}, {1, 4}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\(utility =. ;\)\)], "Input"], Cell["Non-vain condition:", "Text"], Cell[CellGroupData[{ Cell[BoxData[{\(j1 = 1;\), "\n", RowBox[{"Apply", "[", RowBox[{"Or", ",", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"With", "[", RowBox[{\({state2 = #}\), ",", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"Or", ",", RowBox[{ RowBox[{ RowBox[{\(utility[#, state2]\), StyleBox[">", FontColor->RGBColor[1, 0, 0]], \(minUtilities[\([#]\)]\)}], "&"}], "/@", \(Range[j1 + 1, j]\)}]}], "]"}]}], "\[IndentingNewLine]", "]"}], "&"}], ",", \(\(Sort@Join[state1, #] &\) /@ allCombinations[d - Length@state1, f]\)}], "]"}]}], "]"}]}], "Input"], Cell[BoxData[ \(utility[2, {1, 1}] > \(-2\) || utility[3, {1, 1}] > \(-3\) || utility[2, {1, 2}] > \(-2\) || utility[3, {1, 2}] > \(-3\) || utility[2, {1, 3}] > \(-2\) || utility[3, {1, 3}] > \(-3\) || utility[2, {1, 4}] > \(-2\) || utility[3, {1, 4}] > \(-3\)\)], "Output"] }, Open ]], Cell[BoxData[ \(j1 =. ; state1 =. ; {d =. , f =. , j =. };\)], "Input"], Cell[BoxData[{ \(\(Clear@notVainQ;\)\), "\[IndentingNewLine]", \(notVainQ[d_Integer, f_, j_Integer, j1_Integer, utility_]@state1_List := With[{minUtilities = Min /@ Outer[utility, Range@j, allCombinations[d, f], 1]}, \[IndentingNewLine]Switch[ Length@state1, \[IndentingNewLine]d, utility[j1, state1] > minUtilities[\([j1]\)], \[IndentingNewLine]_, Apply[Or, Map[With[{state2 = #}, \[IndentingNewLine]Apply[ Or, \(utility[#, state2] > minUtilities[\([#]\)] &\) /@ Range[j1 + 1, j]]\[IndentingNewLine]] &, \(Sort@ Join[state1, #] &\) /@ allCombinations[d - Length@state1, f]]]\[IndentingNewLine]]\[IndentingNewLine]]\)}], "Input", InitializationCell->True], Cell[BoxData[ \(Clear@dropVain; dropVain[d_, f_, j_, j1_, utility_]@stateList1_List := Select[stateList1, notVainQ[d, f, j, j1, utility]]\)], "Input", InitializationCell->True], Cell[BoxData[{ \(\({d = 2, f = 4, j = 3};\)\), "\n", \(\(utility = With[{j1 = #1, state = #2}, If[Last@state - First@state \[LessEqual] j - j1, j1, \(-j1\)]] &;\)\)}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(notVainQ[d, f, j, 1, utility]@{1}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(notVainQ[d, f, j, 1, utility]@{1, 3}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[notVainQ[d, f, j, j1, utility]@{2, 2}, {j1, 2}]\)], "Input"], Cell[BoxData[ \({True, True}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[notVainQ[d, f, j, j1, utility]@{1, 2}, {j1, 2}]\)], "Input"], Cell[BoxData[ \({True, True}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[notVainQ[d, f, j, j1, utility]@{1, 3}, {j1, 2}]\)], "Input"], Cell[BoxData[ \({True, False}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[notVainQ[d, f, j, j1, utility]@{3}, {j1, 2}]\)], "Input"], Cell[BoxData[ \({True, True}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(stateList1 = Union[Flatten[Last /@ \(branch[d, f, Identity]\)[state \[Rule] {}], 1]]\)], "Input"], Cell[BoxData[ \({{}, {1}, {2}, {3}, {4}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {2, 2}, {2, 3}, {2, 4}, {3, 3}, {3, 4}, {4, 4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(dropVain[d, f, j, 1, utility]@stateList1\)], "Input"], Cell[BoxData[ \({{}, {1}, {2}, {3}, {4}, {1, 1}, {1, 2}, {1, 3}, {2, 2}, {2, 3}, {2, 4}, {3, 3}, {3, 4}, {4, 4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(dropVain[d, f, j, 2, utility]@stateList1\)], "Input"], Cell[BoxData[ \({{}, {1}, {2}, {3}, {4}, {1, 1}, {1, 2}, {2, 2}, {2, 3}, {3, 3}, {3, 4}, {4, 4}}\)], "Output"] }, Open ]], Cell[BoxData[ \({d =. , f =. , j =. }; stateList1 =. ; utility =. ;\)], "Input"], Cell[TextData[{ "Adapt previous definition of ", StyleBox["fateTree", "Input"], "." }], "Text"], Cell[BoxData[{ \(\(Unprotect@fateTree;\)\), "\[IndentingNewLine]", \(fateTree[player_, d_, f_, j_Integer, utility_] /; j > 0 := \[IndentingNewLine]With[{minUtilities = Min /@ Outer[utility, Range@j, allCombinations[d, f], 1]}, \[IndentingNewLine]dropLast@ Fold[\(branch[d, f, #2]\)[fateTree \[Rule] #1] &, {{0, {{}}}}, Join[\[IndentingNewLine]Switch[ player, \[IndentingNewLine]"\", \(Composition[ dropVain[d, f, j, #, utility], Identity] &\) /@ Range[j - 1], \[IndentingNewLine]"\", \(Composition[ dropVain[d, f, j, #, utility], dropLast] &\) /@ Range[j - 1]\[IndentingNewLine]], \[IndentingNewLine]{takeLast, takeLast}]]\[IndentingNewLine]]\), "\[IndentingNewLine]", \(\(Protect@fateTree;\)\)}], "Input", InitializationCell->True], Cell["Check: for uniform utility, all states are vain.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 2, 3, 2, 0 &]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1\/9, {1, 1}}, {}}, {{2\/9, {1, 2}}, {}}, {{2\/9, {1, 3}}, {}}, {{1\/9, {2, 2}}, {}}, {{2\/9, {2, 3}}, {}}, {{1\/9, {3, 3}}, {}}}}}, {}}}, {1, {{}, {}}}, {2, {{}, {}}}}\)], \ "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 0, 3, 2, 0 &]\)], "Input"], Cell[BoxData[ \({{0, {{}, {{}}}}, {1, {{}, {}}}, {2, {{}, {}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fateTree["\", 2, 3, 3, \[Delta][{1, 2}, #2] &] \[Equal] {{0, {{{{}, {{{1\/9, {1, 1}}, {{{}, {1}}, {{1}, {2}}}}, {{2\/9, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {4}}}}, {{2\/9, {1, 3}}, {{{}, {1}}, {{1}, {2}}}}, {{1\/9, {2, 2}}, {{{}, {1}}, {{2}, {3}}}}, {{2\/9, {2, 3}}, {{{}, {1}}, {{2}, {3}}}}, {{1\/9, {3, 3}}, {{{}, {1}}}}}}}, {}}}, {1, {{{{}, {{{1\/9, {1, 1}}, {{{}, {1}}, {{1}, {2}}}}, {{2\/9, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {4}}}}, {{2\/9, {1, 3}}, {{{}, {1}}, {{1}, {2}}}}, {{1\/9, {2, 2}}, {{{}, {1}}, {{2}, {3}}}}, {{2\/9, {2, 3}}, {{{}, {1}}, {{2}, {3}}}}, {{1\/9, {3, 3}}, {{{}, {1}}}}}}, {{1}, {{{1\/3, {1}}, {{{1}, \ {2}}}}, {{1\/3, {2}}, {{{1}, {2}}, {{1, 2}, {4}}}}, {{1\/3, {3}}, {{{1}, {2}}}}}}, {{2}, \ {{{1\/3, {1}}, {{{2}, {3}}, {{1, 2}, {4}}}}, {{1\/3, {2}}, {{{2}, {3}}}}, {{1\/3, \ {3}}, {{{2}, {3}}}}}}}, {{1, 2}}}}, {2, {{{{}, {{{1\/9, {1, 1}}, {{{1, 1}, {1}}}}, {{2\/9, {1, 2}}, {{{1, 2}, {2}}}}, {{2\/9, {1, 3}}, {{{1, 3}, {3}}}}, {{1\/9, {2, 2}}, {{{2, 2}, {4}}}}, {{2\/9, {2, 3}}, {{{2, 3}, {5}}}}, {{1\/9, {3, 3}}, {{{3, 3}, {6}}}}}}, {{1}, {{{1\/3, {1}}, {{{1, 1}, {1}}}}, {{1\/3, {2}}, {{{1, 2}, {2}}}}, {{1\/3, {3}}, {{{1, 3}, {3}}}}}}, {{2}, {{{1\/3, {1}}, {{{1, 2}, {2}}}}, {{1\/3, {2}}, {{{2, 2}, {4}}}}, {{1\/3, {3}}, {{{2, 3}, {5}}}}}}}, {{1, 2}}}}, {3, {{}, {{1, 1}, {1, 2}, {1, 3}, {2, 2}, {2, 3}, {3, 3}}}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Take[ With[{j = 3}, \[IndentingNewLine]fateTree["\", 2, 3, j, If[Last@#2 - First@#2 \[LessEqual] j - #1, #1, \(-#1\)] &]\[IndentingNewLine]], 2] \[Equal] {{0, {{{{}, {{{1\/9, {1, 1}}, {{{}, {1}}, {{1}, {2}}}}, {{2\/9, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}}}, {{2\/9, \ {1, 3}}, {{{}, {1}}, {{1}, {2}}, {{3}, {4}}}}, {{1\/9, {2, 2}}, {{{}, {1}}, {{2}, {3}}}}, {{2\/9, {2, 3}}, {{{}, {1}}, {{2}, {3}}, {{3}, {4}}}}, {{1\/9, \ {3, 3}}, {{{}, {1}}, {{3}, {4}}}}}}}, {}}}, {1, {{{{}, {{{1\/9, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {5}}}}, {{2\/9, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {6}}}}, {{2\/9, {1, 3}}, {{{}, {1}}, {{1}, {2}}, {{3}, {4}}}}, {{1\/9, \ {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {7}}}}, {{2\/9, {2, 3}}, {{{}, {1}}, {{2}, {3}}, {{3}, {4}}, {{2, 3}, {8}}}}, {{1\/9, {3, 3}}, {{{}, {1}}, {{3}, {4}}, {{3, 3}, {9}}}}}}, {{1}, {{{1\/3, {1}}, {{{1}, {2}}, \ {{1, 1}, {5}}}}, {{1\/3, {2}}, {{{1}, {2}}, {{1, 2}, {6}}}}, {{1\/3, {3}}, {{{1}, {2}}}}}}, {{2}, \ {{{1\/3, {1}}, {{{2}, {3}}, {{1, 2}, {6}}}}, {{1\/3, {2}}, {{{2}, {3}}, {{2, 2}, {7}}}}, {{1\/3, {3}}, {{{2}, {3}}, {{2, 3}, {8}}}}}}, {{3}, {{{1\/3, {1}}, {{{3}, {4}}}}, \ {{1\/3, {2}}, {{{3}, {4}}, {{2, 3}, {8}}}}, {{1\/3, {3}}, {{{3}, {4}}, {{3, 3}, {9}}}}}}}, {}}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Backward induction programs", "Section", CellTags->"c:52"], Cell[CellGroupData[{ Cell["Mean-max policy", "Subsection", CellTags->{"section3", "c:53"}], Cell[CellGroupData[{ Cell["Fructifying", "Subsubsection", CellTags->"c:54"], Cell[BoxData[ \(Clear@fructify; fructify[utility_]@ fateTree1_List := \(With[{j1 = First@#}, MapAt[\({#, {utility[ j1, #], {}}} &\) /@ # &, #, {\(-1\), \(-1\)}]] &\) /@ fateTree1\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(fructify[utility]@fateTree["\", 2, 2, 2]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1\/4, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {5}}}}, {{1\/4, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {6}}}}}}}, {}}}, {1, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {utility[1, {1, 1}], {}}}, {{1, 2}, {utility[1, {1, 2}], {}}}, {{2, 2}, {utility[1, {2, 2}], {}}}}}}, {2, {{}, {{{1, 1}, {utility[2, {1, 1}], {}}}, {{1, 2}, {utility[2, {1, 2}], {}}}, {{2, 2}, {utility[2, {2, 2}], {}}}}}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Folding one state branch", "Subsubsection", CellTags->"c:55"], Cell[BoxData[ \(\(stateBranch = {{1}, {{{1\/2, {1}}, {{{1}, {1}}, {{1, 1}, {2}}}}, {{1\/2, {2}}, {{{1}, {1}}, {{1, 2}, {5}}}}}};\)\)], "Input"], Cell[BoxData[ \(\(fructifiedNextStates = {\[IndentingNewLine]{{1}, {utility[{1}]}}, \ \[IndentingNewLine]{{1, 1}, {utility[{1, 1}]}}, \[IndentingNewLine]{{2}, {utility[{2}]}}, \ \[IndentingNewLine]{{2, 2}, {utility[{2, 2}]}}, \[IndentingNewLine]{{1, 2}, {utility[{1, 2}]}}\[IndentingNewLine]};\)\)], "Input"], Cell["For each event, positions of possible next states:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Map[Last, Last /@ Last@stateBranch, {2}]\)], "Input"], Cell[BoxData[ \({{{1}, {2}}, {{1}, {5}}}\)], "Output"] }, Open ]], Cell["Maximize utility on possible next states.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(subMaxAndArgMax[#[\([\(-1\), 1]\)] &, fructifiedNextStates, \((Map[Last, Last /@ Last@stateBranch, {2}])\)[\([1]\)]]\)], "Input"], Cell[BoxData[ \({Max[utility[{1}], utility[{1, 1}]], {}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(\(utility = \(-10\) + Max@# &;\)\), "\[IndentingNewLine]", \(subMaxAndArgMax[#[\([\(-1\), 1]\)] &, fructifiedNextStates, \((Map[Last, Last /@ Last@stateBranch, {2}])\)[\([1]\)]]\)}], "Input"], Cell[BoxData[ \({\(-9\), {{{{1}, {\(-9\)}}, {1}}, {{{1, 1}, {\(-9\)}}, {2}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(MapAt[\(MapAt[function1, #, 1] &\) /@ # &, subMaxAndArgMax[#[\([\(-1\), 1]\)] &, fructifiedNextStates, \((Map[Last, Last /@ Last@stateBranch, {2}])\)[\([1]\)]], \(-1\)]\)], "Input"], Cell[BoxData[ \({\(-9\), {{function1[{{1}, {\(-9\)}}], {1}}, {function1[{{1, 1}, {\(-9\)}}], {2}}}}\)], "Output"] }, Open ]], Cell["\<\ {max utility, {{most useful next state, its position in next state \ list}\[Ellipsis]}}\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(MapAt[\(MapAt[First, #, 1] &\) /@ # &, subMaxAndArgMax[#[\([\(-1\), 1]\)] &, fructifiedNextStates, \((Map[Last, Last /@ Last@stateBranch, {2}])\)[\([1]\)]], \(-1\)]\)], "Input"], Cell[BoxData[ \({\(-9\), {{{1}, {1}}, {{1, 1}, {2}}}}\)], "Output"] }, Open ]], Cell["Repeat for all events:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(maxUtilities = \(MapAt[\(MapAt[First, #, 1] &\) /@ # &, subMaxAndArgMax[#[\([\(-1\), 1]\)] &, fructifiedNextStates, #], \(-1\)] &\) /@ Map[Last, Last /@ Last@stateBranch, {2}]\)], "Input"], Cell[BoxData[ \({{\(-9\), {{{1}, {1}}, {{1, 1}, {2}}}}, {\(-8\), {{{1, 2}, {5}}}}}\)], "Output"] }, Open ]], Cell["Von Neumann-Morgenstern theorem:", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \({First /@ maxUtilities, \(#[\([\)\(1, 1\)\(]\)] &\) /@ Last@stateBranch}\), "\n", \(\((First /@ maxUtilities)\) . \((\(#[\([\)\(1, 1\)\(]\)] &\) /@ Last@stateBranch)\)\)}], "Input"], Cell[BoxData[ \({{\(-9\), \(-8\)}, {1\/2, 1\/2}}\)], "Output"], Cell[BoxData[ \(\(-\(17\/2\)\)\)], "Output"] }, Open ]], Cell["\<\ {{event, {{most useful next state, its position in next state list}\ \[Ellipsis]}}\[Ellipsis]}\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Transpose@{\(#[\([1, \(-1\)]\)] &\) /@ Last@stateBranch, Last /@ maxUtilities}\)], "Input"], Cell[BoxData[ \({{{1}, {{{1}, {1}}, {{1, 1}, {2}}}}, {{2}, {{{1, 2}, {5}}}}}\)], "Output"] }, Open ]], Cell["{state, {utility, strategy piece providing this utility}}", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \({\[IndentingNewLine]First@ stateBranch, \[IndentingNewLine]{\[IndentingNewLine]\((First /@ maxUtilities)\) . \((\(#[\([1, 1]\)] &\) /@ Last@stateBranch)\), Transpose@{\(#[\([1, \(-1\)]\)] &\) /@ Last@stateBranch, Last /@ maxUtilities}\[IndentingNewLine]}\[IndentingNewLine]}\)], \ "Input"], Cell[BoxData[ \({{1}, {\(-\(17\/2\)\), {{{1}, {{{1}, {1}}, {{1, 1}, {2}}}}, {{2}, {{{1, 2}, {5}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(\(maxUtilities =. ;\)\), "\[IndentingNewLine]", \(With[{maxUtilities = \(MapAt[\(MapAt[First, #, 1] &\) /@ # &, \ \[IndentingNewLine]subMaxAndArgMax[#[\([\(-1\), 1]\)] &, fructifiedNextStates, #], \[IndentingNewLine]\(-1\)] &\) /@ Map[Last, Last /@ Last@ stateBranch, {2}]}, \ \[IndentingNewLine]{\[IndentingNewLine]First@ stateBranch, \[IndentingNewLine]{\[IndentingNewLine]\((First /@ maxUtilities)\) . \((\(#[\([1, 1]\)] &\) /@ Last@stateBranch)\), Transpose@{\(#[\([1, \(-1\)]\)] &\) /@ Last@stateBranch, Last /@ maxUtilities}\[IndentingNewLine]}\[IndentingNewLine]}]\)\ }], "Input"], Cell[BoxData[ \({{1}, {\(-\(17\/2\)\), {{{1}, {{{1}, {1}}, {{1, 1}, {2}}}}, {{2}, {{{1, 2}, {5}}}}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(stateBranch =. ; fructifiedNextStates =. ; utility =. ;\)], "Input"], Cell[BoxData[ \(Clear@meanMax; meanMax[stateBranch : {state1_, events_}, fructifiedNextStates_List] := \[IndentingNewLine]With[{maxUtilities = \ \(MapAt[\(MapAt[First, #, 1] &\) /@ # &, subMaxAndArgMax[#[\([\(-1\), 1]\)] &, fructifiedNextStates, #], \(-1\)] &\) /@ Map[Last, Last /@ events, {2}]}, \ \[IndentingNewLine]{\[IndentingNewLine]state1, \[IndentingNewLine]{\ \[IndentingNewLine]\((First /@ maxUtilities)\) . \((\(#[\([1, 1]\)] &\) /@ events)\), Transpose@{\(#[\([1, \(-1\)]\)] &\) /@ events, Last /@ maxUtilities}\[IndentingNewLine]}\[IndentingNewLine]}]\)], \ "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(meanMax[{{}, {\[IndentingNewLine]{{p11, {1, 1}}, {{{1}, {1}}, {{1, 1}, {3}}}}, \[IndentingNewLine]{{p12, {1, 2}}, {{{1}, {1}}, {{2}, {2}}, {{1, 2}, {4}}}}, \[IndentingNewLine]{{p22, {2, 2}}, {{{2}, {2}}, {{2, 2}, {5}}}}}}, \[IndentingNewLine]{\[IndentingNewLine]{{1}, \ {\(-17\)}}, \[IndentingNewLine]{{2}, {\(-16\)}}, \[IndentingNewLine]{{1, 1}, {\(-8\)}}, \[IndentingNewLine]{{1, 2}, {\(-7\)}}, \[IndentingNewLine]{{2, 2}, {\(-6\)}}\[IndentingNewLine]}]\)], "Input"], Cell[BoxData[ \({{}, {\(-8\)\ p11 - 7\ p12 - 6\ p22, {{{1, 1}, {{{1, 1}, {3}}}}, {{1, 2}, {{{1, 2}, {4}}}}, {{2, 2}, {{{2, 2}, {5}}}}}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Folding deepest level", "Subsubsection", CellTags->"c:56"], Cell[CellGroupData[{ Cell[BoxData[ \(lastTwo = Take[fructify[utility]@fateTree["\", 2, 2, 2], \(-2\)]\)], "Input"], Cell[BoxData[ \({{1, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {utility[1, {1, 1}], {}}}, {{1, 2}, {utility[1, {1, 2}], {}}}, {{2, 2}, {utility[1, {2, 2}], {}}}}}}, {2, {{}, {{{1, 1}, {utility[2, {1, 1}], {}}}, {{1, 2}, {utility[2, {1, 2}], {}}}, {{2, 2}, {utility[2, {2, 2}], {}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fructifiedNextStates = Flatten[lastTwo[\([\(-1\), \(-1\)]\)], 1]\)], "Input"], Cell[BoxData[ \({{{1, 1}, {utility[2, {1, 1}], {}}}, {{1, 2}, {utility[2, {1, 2}], {}}}, {{2, 2}, {utility[2, {2, 2}], {}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(lastTwo[\([1, \(-1\), 1]\)]\)], "Input"], Cell[BoxData[ \({{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(\(utility = \(-10\) #1 + Total@#2 &;\)\), "\n", \(MapAt[\(meanMax[#, fructifiedNextStates] &\) /@ # &, First@lastTwo, {\(-1\), 1}]\)}], "Input"], Cell[BoxData[ \({1, {{{{}, {\(-17\), {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}}, {{1}, {\(-\(35\/2\)\), {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}}, {{2}, {\(-\(33\/2\)\), {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({fructifiedNextStates, utility, lastTwo} =. ;\)\)], "Input"], Cell[BoxData[{ \(\(Clear@meanMaxStep;\)\), "\[IndentingNewLine]", \(meanMaxStep@\(lastTwo : {_List, _List}\) := MapAt[\(meanMax[#, Flatten[lastTwo[\([\(-1\), \(-1\)]\)], 1]] &\) /@ # &, First@lastTwo, {\(-1\), 1}]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(meanMaxStep@{{1, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}, {2, {{}, {{{1, 1}, {\(-18\), {}}}, {{1, 2}, {\(-17\), {}}}, {{2, 2}, {\(-16\), {}}}}}}}\)], "Input"], Cell[BoxData[ \({1, {{{{}, {\(-17\), {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}}, {{1}, {\(-\(35\/2\)\), {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}}, {{2}, {\(-\(33\/2\)\), {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 2, f = 2, j = 2, utility = \(-10. \) + Total@#2 &}, \n meanMaxStep@ Take[fructify[utility]@ fateTree["\", d, f, j], \(-2\)]]\)], "Input"], Cell[BoxData[ \({1, {{{{}, {\(-7.`\), {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}}, {{1}, {\(-7.5`\), {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}}, {{2}, {\(-6.5`\), {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}}, {{{1, 1}, {\(-8.`\), {}}}, {{1, 2}, {\(-7.`\), {}}}, {{2, 2}, {\(-6.`\), {}}}}}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Folding completely", "Subsubsection", CellTags->"c:57"], Cell["Time scheme.", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\({d = 2, f = 3, j = 3};\)\), "\[IndentingNewLine]", \(With[{fructifiedFateTree = Range[0, j]}, \[IndentingNewLine]reverseFoldList[ meanMaxStep@{#1, #2} &, dropLast@fructifiedFateTree, Last@fructifiedFateTree]]\)}], "Input"], Cell[BoxData[ \({meanMaxStep[{0, meanMaxStep[{1, meanMaxStep[{2, 3}]}]}], meanMaxStep[{1, meanMaxStep[{2, 3}]}], meanMaxStep[{2, 3}], 3}\)], "Output"] }, Open ]], Cell[BoxData[ \(utility = \(-10\) #1 + Total@#2 &; fructifiedFateTree = fructify[utility]@fateTree["\", d, f, j];\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(reverseFoldList[meanMaxStep@{#1, #2} &\ , dropLast@fructifiedFateTree, Last@fructifiedFateTree]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {\(-6\), {{{1, 1}, {{{1, 1}, {5}}}}, {{1, 2}, {{{1, 2}, {6}}}}, {{1, 3}, {{{1, 3}, {7}}}}, {{2, 2}, {{{2, 2}, {8}}}}, {{2, 3}, {{{2, 3}, {9}}}}, {{3, 3}, {{{3, 3}, {10}}}}}}}}, {}}}, {1, {{{{}, {\(-16\), {{{1, 1}, {{{1, 1}, {5}}}}, {{1, 2}, {{{1, 2}, {6}}}}, {{1, 3}, {{{1, 3}, {7}}}}, {{2, 2}, {{{2, 2}, {8}}}}, {{2, 3}, {{{2, 3}, {9}}}}, {{3, 3}, {{{3, 3}, {10}}}}}}}, {{1}, {\(-17\), {{{1}, {{{1, 1}, {5}}}}, {{2}, {{{1, 2}, {6}}}}, {{3}, {{{1, 3}, {7}}}}}}}, {{2}, {\(-16\), {{{1}, {{{1, 2}, {6}}}}, {{2}, {{{2, 2}, {8}}}}, {{3}, {{{2, 3}, {9}}}}}}}, {{3}, {\(-15\), {{{1}, {{{1, 3}, {7}}}}, {{2}, {{{2, 3}, {9}}}}, {{3}, {{{3, 3}, {10}}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{1, 3}, {\(-6\), {}}}, {{2, 2}, {\(-6\), {}}}, {{2, 3}, {\(-5\), {}}}, {{3, 3}, {\(-4\), {}}}}}}, {2, {{{{}, {\(-26\), {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{2, 2}, {{{2, 2}, {4}}}}, {{2, 3}, {{{2, 3}, {5}}}}, {{3, 3}, {{{3, 3}, {6}}}}}}}, {{1}, {\(-27\), {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}}}}, {{2}, {\(-26\), {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {4}}}}, {{3}, {{{2, 3}, {5}}}}}}}, {{3}, {\(-25\), {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {5}}}}, {{3}, {{{3, 3}, {6}}}}}}}}, {{{1, 1}, {\(-18\), {}}}, {{1, 2}, {\(-17\), {}}}, {{1, 3}, {\(-16\), {}}}, {{2, 2}, {\(-16\), {}}}, {{2, 3}, {\(-15\), {}}}, {{3, 3}, {\(-14\), {}}}}}}, {3, {{}, {{{1, 1}, {\(-28\), {}}}, {{1, 2}, {\(-27\), {}}}, {{1, 3}, {\(-26\), {}}}, {{2, 2}, {\(-26\), {}}}, {{2, 3}, {\(-25\), {}}}, {{3, 3}, {\(-24\), {}}}}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d, f, j, fructifiedFateTree, utility} =. ;\)\)], "Input"], Cell[BoxData[{ \(\(Clear@maxUtilityAndStrategy;\)\), "\[IndentingNewLine]", \(maxUtilityAndStrategy[fateTree1_, utility_] := With[{fructifiedFateTree = fructify[utility]@fateTree1}, \[IndentingNewLine]reverseFoldList[ meanMaxStep@{#1, #2} &, dropLast@fructifiedFateTree, Last@fructifiedFateTree]\[IndentingNewLine]]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(maxUtilityAndStrategy[ fateTree["\", 2, 3, 3], \(-10\)\ #1 + Total@#2 &] \[Equal] {{0, {{{{}, {\(-6\), {{{1, 1}, {{{1, 1}, {5}}}}, {{1, 2}, {{{1, 2}, {6}}}}, {{1, 3}, {{{1, 3}, {7}}}}, {{2, 2}, {{{2, 2}, {8}}}}, {{2, 3}, {{{2, 3}, {9}}}}, {{3, 3}, {{{3, 3}, {10}}}}}}}}, {}}}, {1, {{{{}, {\(-16\), {{{1, 1}, {{{1, 1}, {5}}}}, {{1, 2}, {{{1, 2}, {6}}}}, {{1, 3}, {{{1, 3}, {7}}}}, {{2, 2}, {{{2, 2}, {8}}}}, {{2, 3}, {{{2, 3}, {9}}}}, {{3, 3}, {{{3, 3}, {10}}}}}}}, {{1}, {\(-17\), {{{1}, {{{1, 1}, {5}}}}, {{2}, {{{1, 2}, {6}}}}, {{3}, {{{1, 3}, {7}}}}}}}, {{2}, {\(-16\), {{{1}, {{{1, 2}, {6}}}}, {{2}, {{{2, 2}, {8}}}}, {{3}, {{{2, 3}, {9}}}}}}}, {{3}, {\(-15\), {{{1}, {{{1, 3}, {7}}}}, {{2}, {{{2, 3}, {9}}}}, {{3}, {{{3, 3}, {10}}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{1, 3}, {\(-6\), {}}}, {{2, 2}, {\(-6\), {}}}, {{2, 3}, {\(-5\), {}}}, {{3, 3}, {\(-4\), {}}}}}}, {2, {{{{}, {\(-26\), {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{2, 2}, {{{2, 2}, {4}}}}, {{2, 3}, {{{2, 3}, {5}}}}, {{3, 3}, {{{3, 3}, {6}}}}}}}, {{1}, {\(-27\), {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}}}}, {{2}, {\(-26\), {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {4}}}}, {{3}, {{{2, 3}, {5}}}}}}}, {{3}, {\(-25\), {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {5}}}}, {{3}, {{{3, 3}, {6}}}}}}}}, {{{1, 1}, {\(-18\), {}}}, {{1, 2}, {\(-17\), {}}}, {{1, 3}, {\(-16\), {}}}, {{2, 2}, {\(-16\), {}}}, {{2, 3}, {\(-15\), {}}}, {{3, 3}, {\(-14\), {}}}}}}, {3, {{}, {{{1, 1}, {\(-28\), {}}}, {{1, 2}, {\(-27\), {}}}, {{1, 3}, {\(-26\), {}}}, {{2, 2}, {\(-26\), {}}}, {{2, 3}, {\(-25\), {}}}, {{3, 3}, {\(-24\), {}}}}}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(initial@ maxUtilityAndStrategy[ fateTree["\", 2, 3, 3], \(-10\)\ #1 + Total@#2 &]\)], "Input"], Cell[BoxData[ \(\(-6\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(extractStrategy@ maxUtilityAndStrategy[ fateTree["\", 2, 3, 3], \(-10\)\ #1 + Total@#2 &] \[Equal] {{0, {{{{}, {{{1, 1}, {{{1, 1}, {5}}}}, {{1, 2}, {{{1, 2}, {6}}}}, {{1, 3}, {{{1, 3}, {7}}}}, {{2, 2}, {{{2, 2}, {8}}}}, {{2, 3}, {{{2, 3}, {9}}}}, {{3, 3}, {{{3, 3}, {10}}}}}}}, {}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {5}}}}, {{1, 2}, {{{1, 2}, {6}}}}, {{1, 3}, {{{1, 3}, {7}}}}, {{2, 2}, {{{2, 2}, {8}}}}, {{2, 3}, {{{2, 3}, {9}}}}, {{3, 3}, {{{3, 3}, {10}}}}}}, {{1}, {{{1}, {{{1, 1}, {5}}}}, {{2}, {{{1, 2}, {6}}}}, {{3}, {{{1, 3}, {7}}}}}}, {{2}, {{{1}, {{{1, 2}, {6}}}}, {{2}, {{{2, 2}, {8}}}}, {{3}, {{{2, 3}, {9}}}}}}, {{3}, {{{1}, {{{1, 3}, {7}}}}, {{2}, {{{2, 3}, {9}}}}, {{3}, {{{3, 3}, {10}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{1, 3}, {}}, {{2, 2}, {}}, {{2, 3}, {}}, {{3, 3}, {}}}}}, {2, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{2, 2}, {{{2, 2}, {4}}}}, {{2, 3}, {{{2, 3}, {5}}}}, {{3, 3}, {{{3, 3}, {6}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {4}}}}, {{3}, {{{2, 3}, {5}}}}}}, {{3}, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {5}}}}, {{3}, {{{3, 3}, {6}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{1, 3}, {}}, {{2, 2}, {}}, {{2, 3}, {}}, {{3, 3}, {}}}}}, {3, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{1, 3}, {}}, {{2, 2}, {}}, {{2, 3}, {}}, {{3, 3}, {}}}}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Mean-mean Markovian strategy judging program", "Subsection", CellTags->"c:58"], Cell[CellGroupData[{ Cell["Folding one strategy state branch", "Subsubsection", CellTags->{"section12", "c:59"}], Cell[CellGroupData[{ Cell[BoxData[ \({d = 2, f = 4, j = 2}; j1 = 0; stateBranch = \(fateTree["\", d, f, j]\)[\([j1 + 1, \(-1\), 1, 1]\)]\)], "Input"], Cell[BoxData[ \({{}, {{{1\/16, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {6}}}}, {{1\/8, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {7}}}}, {{1\/8, {1, 3}}, {{{}, {1}}, {{1}, {2}}, {{3}, {4}}, {{1, 3}, {8}}}}, {{1\/8, {1, 4}}, {{{}, {1}}, {{1}, {2}}, {{4}, {5}}, {{1, 4}, {9}}}}, {{1\/16, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {10}}}}, {{1\/8, {2, 3}}, {{{}, {1}}, {{2}, {3}}, {{3}, {4}}, {{2, 3}, {11}}}}, {{1\/8, {2, 4}}, {{{}, {1}}, {{2}, {3}}, {{4}, {5}}, {{2, 4}, {12}}}}, {{1\/16, {3, 3}}, {{{}, {1}}, {{3}, {4}}, {{3, 3}, {13}}}}, {{1\/8, {3, 4}}, {{{}, {1}}, {{3}, {4}}, {{4}, {5}}, {{3, 4}, {14}}}}, {{1\/16, {4, 4}}, {{{}, {1}}, {{4}, {5}}, {{4, 4}, {15}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fructifiedNextStates = \({#, {utility[j1 + 1, #]}} &\) /@ allSubcombinations[d, f]\)], "Input"], Cell[BoxData[ \({{{}, {utility[1, {}]}}, {{1}, {utility[1, {1}]}}, {{2}, {utility[ 1, {2}]}}, {{3}, {utility[1, {3}]}}, {{4}, {utility[ 1, {4}]}}, {{1, 1}, {utility[1, {1, 1}]}}, {{1, 2}, {utility[1, {1, 2}]}}, {{1, 3}, {utility[1, {1, 3}]}}, {{1, 4}, {utility[1, {1, 4}]}}, {{2, 2}, {utility[1, {2, 2}]}}, {{2, 3}, {utility[1, {2, 3}]}}, {{2, 4}, {utility[1, {2, 4}]}}, {{3, 3}, {utility[1, {3, 3}]}}, {{3, 4}, {utility[1, {3, 4}]}}, {{4, 4}, {utility[1, {4, 4}]}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\((extractStrategy@ maxUtilityAndStrategy[ fateTree["\", d, f, j], \[Delta][Last@allRepresentatives[d, f], #2] &])\)[\([j1 + 1, \(-1\), 1, 1]\)]\)], "Input"], Cell[BoxData[ \({{}, {{{1, 1}, {{{1}, {2}}}}, {{1, 2}, {{{1, 2}, {7}}}}, {{1, 3}, {{{1}, {2}}}}, {{1, 4}, {{{1}, {2}}}}, {{2, 2}, {{{2}, {3}}}}, {{2, 3}, {{{2}, {3}}}}, {{2, 4}, {{{2}, {3}}}}, {{3, 3}, {{{}, {1}}}}, {{3, 4}, {{{}, {1}}}}, {{4, 4}, {{{}, {1}}}}}}\)], "Output"] }, Open ]], Cell["Try a non-pure strategy to work on many choices.", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"strategyStateBranch", "=", RowBox[{"{", RowBox[{\({}\), ",", RowBox[{"{", RowBox[{\({{1, 1}, {{{1}, {2}}}}\), ",", \({{1, 2}, {{{1, 2}, {7}}}}\), ",", \({{1, 3}, {{{1}, {2}}}}\), ",", \({{1, 4}, {{{1}, {2}}}}\), ",", \({{2, 2}, {{{2}, {3}}}}\), ",", \({{2, 3}, {{{2}, {3}}}}\), ",", \({{2, 4}, {{{2}, {3}}}}\), ",", \({{3, 3}, {{{}, {1}}}}\), ",", \({{3, 4}, {{{}, {1}}}}\), ",", RowBox[{"{", RowBox[{\({4, 4}\), ",", RowBox[{"{", RowBox[{\({{}, {1}}\), StyleBox[",", FontColor->RGBColor[1, 0, 0]], StyleBox[\({{2}, {3}}\), FontColor->RGBColor[1, 0, 0]]}], "}"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input"], Cell[BoxData[ \(\({d =. , f =. , j =. };\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(Map[Last, Last /@ Last@strategyStateBranch, {2}]\)], "Input"], Cell[BoxData[ \({{{2}}, {{7}}, {{2}}, {{2}}, {{3}}, {{3}}, {{3}}, {{1}}, {{1}}, {{1}, \ {3}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(Mean[\(#[\([\(-1\), 1]\)] &\) /@ Extract[fructifiedNextStates, #]] &\) /@ Map[Last, Last /@ Last@strategyStateBranch, {2}]\)], "Input"], Cell[BoxData[ \({utility[1, {1}], utility[1, {1, 2}], utility[1, {1}], utility[1, {1}], utility[1, {2}], utility[1, {2}], utility[1, {2}], utility[1, {}], utility[1, {}], 1\/2\ \((utility[1, {}] + utility[1, {2}])\)}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(#[\([1, 1]\)] &\) /@ Last@stateBranch\)], "Input"], Cell[BoxData[ \({1\/16, 1\/8, 1\/8, 1\/8, 1\/16, 1\/8, 1\/8, 1\/16, 1\/8, 1\/16}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\((\(#[\([1, 1]\)] &\) /@ Last@stateBranch)\) . \((\(Mean[\(#[\([\(-1\), 1]\)] &\) /@ Extract[fructifiedNextStates, #]] &\) /@ Map[Last, Last /@ Last@strategyStateBranch, {2}])\)\)], "Input"], Cell[BoxData[ \(3\/16\ utility[1, {}] + 5\/16\ utility[1, {1}] + 5\/16\ utility[1, {2}] + 1\/32\ \((utility[1, {}] + utility[1, {2}])\) + 1\/8\ utility[1, {1, 2}]\)], "Output"] }, Open ]], Cell[BoxData[ \(\({j1, stateBranch, fructifiedNextStates, strategyStateBranch} =. ;\)\)], "Input"], Cell[TextData[{ "\[Wolf] The timing constraint is now critical (as opposed to ", StyleBox["force", "Input"], "). Shared state positions in fructified next states and strategy state \ branch must be consistent, as if both were evaluated from the same fate \ tree." }], "Text"], Cell[BoxData[{ \(\(Clear@meanMean;\)\), "\[IndentingNewLine]", \(meanMean[stateBranch_List, fructifiedNextStates_List, strategyStateBranch_List] := Dot[\(#[\([1, 1]\)] &\) /@ Last@stateBranch, \(Mean[\(#[\([\(-1\), 1]\)] &\) /@ Extract[fructifiedNextStates, #]] &\) /@ Map[Last, Last /@ Last@strategyStateBranch, {2}]]\)}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(meanMean[{{}, {{{1\/16, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {6}}}}, {{1\/8, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {7}}}}, {{1\/8, {1, 3}}, {{{}, {1}}, {{1}, {2}}, {{3}, {4}}, {{1, 3}, {8}}}}, {{1\/8, {1, 4}}, {{{}, {1}}, {{1}, {2}}, {{4}, {5}}, {{1, 4}, {9}}}}, {{1\/16, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {10}}}}, {{1\/8, {2, 3}}, {{{}, {1}}, {{2}, {3}}, {{3}, {4}}, {{2, 3}, {11}}}}, {{1\/8, {2, 4}}, {{{}, {1}}, {{2}, {3}}, {{4}, {5}}, {{2, 4}, {12}}}}, {{1\/16, {3, 3}}, {{{}, {1}}, {{3}, {4}}, {{3, 3}, {13}}}}, {{1\/8, {3, 4}}, {{{}, {1}}, {{3}, {4}}, {{4}, {5}}, {{3, 4}, {14}}}}, {{1\/16, {4, 4}}, {{{}, {1}}, {{4}, {5}}, {{4, 4}, {15}}}}}}, {{{}, {utility[1, {}]}}, {{1}, {utility[ 1, {1}]}}, {{2}, {utility[1, {2}]}}, {{3}, {utility[ 1, {3}]}}, {{4}, {utility[1, {4}]}}, {{1, 1}, {utility[1, {1, 1}]}}, {{1, 2}, {utility[1, {1, 2}]}}, {{1, 3}, {utility[1, {1, 3}]}}, {{1, 4}, {utility[1, {1, 4}]}}, {{2, 2}, {utility[1, {2, 2}]}}, {{2, 3}, {utility[1, {2, 3}]}}, {{2, 4}, {utility[1, {2, 4}]}}, {{3, 3}, {utility[1, {3, 3}]}}, {{3, 4}, {utility[1, {3, 4}]}}, {{4, 4}, {utility[1, {4, 4}]}}}, {{}, {{{1, 1}, {{{1}, {2}}}}, {{1, 2}, {{{1, 2}, {7}}}}, {{1, 3}, {{{1}, {2}}}}, {{1, 4}, {{{1}, {2}}}}, {{2, 2}, {{{2}, {3}}}}, {{2, 3}, {{{2}, {3}}}}, {{2, 4}, {{{2}, {3}}}}, {{3, 3}, {{{}, {1}}}}, {{3, 4}, {{{}, {1}}}}, {{4, 4}, {{{}, {1}}, {{2}, {3}}}}}}]\)], "Input"], Cell[BoxData[ \(3\/16\ utility[1, {}] + 5\/16\ utility[1, {1}] + 5\/16\ utility[1, {2}] + 1\/32\ \((utility[1, {}] + utility[1, {2}])\) + 1\/8\ utility[1, {1, 2}]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(meanMean[{{1}, {{{1\/2, {1}}, {{{1}, {2}}, {{1, 1}, {4}}}}, {{1\/2, {2}}, {{{1}, {2}}, {{1, 2}, {5}}}}}}, {{{}, {utility[2, {}]}}, {{1}, {utility[ 2, {1}]}}, {{2}, {utility[2, {2}]}}, {{1, 1}, {utility[2, {1, 1}]}}, {{1, 2}, {utility[2, {1, 2}]}}, {{2, 2}, {utility[ 2, {2, 2}]}}}, {{1}, {{{1}, {{{1}, {2}}}}, {{2}, {{{1, 2}, {5}}}}}}]\)], "Input"], Cell[BoxData[ \(1\/2\ utility[2, {1}] + 1\/2\ utility[2, {1, 2}]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(meanMean[{{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{{1, 1}, {utility[2, {1, 1}]}}, {{1, 2}, {utility[2, {1, 2}]}}, {{2, 2}, {utility[ 2, {2, 2}]}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}]\)], "Input"], Cell[BoxData[ \(1\/2\ utility[2, {1, 1}] + 1\/2\ utility[2, {1, 2}]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(meanMean[{{1}, {{{1\/3, {1}}, {{{1}, {1}}, {{1, 1}, {2}}}}, {{2\/3, {2}}, {{{1}, {1}}, {{1, 2}, {3}}}}}}, {{{1}, {utility[{1}]}}, \ \[IndentingNewLine]{{1, 1}, {utility[{1, 1}]}}, \[IndentingNewLine]{{1, 2}, {utility[{1, 2}]}}, \[IndentingNewLine]{{2, 2}, {utility[{2, 2}]}}}, \[IndentingNewLine]{{1}, {{{1}, {{{1, 1}, {2}}, {{2, 2}, {4}}}}, {{2}, {{{1, 2}, {3}}}}}}]\)], "Input"], Cell[BoxData[ \(2\/3\ utility[{1, 2}] + 1\/6\ \((utility[{1, 1}] + utility[{2, 2}])\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(meanMean[{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{{1, 1}, {\(-28\), {}}}, {{1, 2}, {\(-27\), {}}}, {{2, 2}, {\(-26\), {}}}}, {{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}]\)], "Input"], Cell[BoxData[ \(\(-27\)\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Folding last step", "Subsubsection", CellTags->"c:60"], Cell[BoxData[ \(\({d = 2, f = 4, j = 2};\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(lastTwo = Take[fructify[utility]@fateTree["\", d, f, j], \(-2\)]\)], "Input"], Cell[BoxData[ \({{1, {{{{}, {{{1\/16, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/8, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/8, {1, 3}}, {{{1, 3}, {3}}}}, {{1\/8, {1, 4}}, {{{1, 4}, {4}}}}, {{1\/16, {2, 2}}, {{{2, 2}, {5}}}}, {{1\/8, {2, 3}}, {{{2, 3}, {6}}}}, {{1\/8, {2, 4}}, {{{2, 4}, {7}}}}, {{1\/16, {3, 3}}, {{{3, 3}, {8}}}}, {{1\/8, {3, 4}}, {{{3, 4}, {9}}}}, {{1\/16, {4, 4}}, {{{4, 4}, {10}}}}}}, {{1}, {{{1\/4, {1}}, {{{1, 1}, {1}}}}, {{1\/4, {2}}, {{{1, 2}, {2}}}}, {{1\/4, {3}}, {{{1, 3}, {3}}}}, {{1\/4, {4}}, {{{1, 4}, {4}}}}}}, {{2}, {{{1\/4, {1}}, {{{1, 2}, {2}}}}, {{1\/4, {2}}, {{{2, 2}, {5}}}}, {{1\/4, {3}}, {{{2, 3}, {6}}}}, {{1\/4, {4}}, {{{2, 4}, {7}}}}}}, {{3}, {{{1\/4, {1}}, {{{1, 3}, {3}}}}, {{1\/4, {2}}, {{{2, 3}, {6}}}}, {{1\/4, {3}}, {{{3, 3}, {8}}}}, {{1\/4, {4}}, {{{3, 4}, {9}}}}}}, {{4}, {{{1\/4, {1}}, {{{1, 4}, {4}}}}, {{1\/4, {2}}, {{{2, 4}, {7}}}}, {{1\/4, {3}}, {{{3, 4}, {9}}}}, {{1\/4, {4}}, {{{4, 4}, {10}}}}}}}, {{{1, 1}, {utility[1, {1, 1}], {}}}, {{1, 2}, {utility[1, {1, 2}], {}}}, {{1, 3}, {utility[1, {1, 3}], {}}}, {{1, 4}, {utility[1, {1, 4}], {}}}, {{2, 2}, {utility[1, {2, 2}], {}}}, {{2, 3}, {utility[1, {2, 3}], {}}}, {{2, 4}, {utility[1, {2, 4}], {}}}, {{3, 3}, {utility[1, {3, 3}], {}}}, {{3, 4}, {utility[1, {3, 4}], {}}}, {{4, 4}, {utility[1, {4, 4}], {}}}}}}, {2, {{}, {{{1, 1}, {utility[2, {1, 1}], {}}}, {{1, 2}, {utility[2, {1, 2}], {}}}, {{1, 3}, {utility[2, {1, 3}], {}}}, {{1, 4}, {utility[2, {1, 4}], {}}}, {{2, 2}, {utility[2, {2, 2}], {}}}, {{2, 3}, {utility[2, {2, 3}], {}}}, {{2, 4}, {utility[2, {2, 4}], {}}}, {{3, 3}, {utility[2, {3, 3}], {}}}, {{3, 4}, {utility[2, {3, 4}], {}}}, {{4, 4}, {utility[2, {4, 4}], {}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(strategyStep = \((extractStrategy@ maxUtilityAndStrategy[ fateTree["\", d, f, j], \[Delta][ Last@allRepresentatives[d, f], #2] &])\)[\([2]\)]\)], "Input"], Cell[BoxData[ \({1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{1, 4}, {{{1, 4}, {4}}}}, {{2, 2}, {{{2, 2}, {5}}}}, {{2, 3}, {{{2, 3}, {6}}}}, {{2, 4}, {{{2, 4}, {7}}}}, {{3, 3}, {{{3, 3}, {8}}}}, {{3, 4}, {{{3, 4}, {9}}}}, {{4, 4}, {{{4, 4}, {10}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}, {{4}, {{{1, 4}, {4}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {5}}}}, {{3}, {{{2, 3}, {6}}}}, {{4}, {{{2, 4}, {7}}}}}}, {{3}, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {6}}}}, {{3}, {{{3, 3}, {8}}}}, {{4}, {{{3, 4}, {9}}}}}}, {{4}, {{{1}, {{{1, 4}, {4}}}}, {{2}, {{{2, 4}, {7}}}}, {{3}, {{{3, 4}, {9}}}}, {{4}, {{{4, 4}, {10}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{1, 3}, {}}, {{1, 4}, {}}, {{2, 2}, {}}, {{2, 3}, {}}, {{2, 4}, {}}, {{3, 3}, {}}, {{3, 4}, {}}, {{4, 4}, {}}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d =. , f =. , j =. };\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(fructifiedNextStates = Flatten[lastTwo[\([\(-1\), \(-1\)]\)], 1]\)], "Input"], Cell[BoxData[ \({{{1, 1}, {utility[2, {1, 1}], {}}}, {{1, 2}, {utility[2, {1, 2}], {}}}, {{1, 3}, {utility[2, {1, 3}], {}}}, {{1, 4}, {utility[2, {1, 4}], {}}}, {{2, 2}, {utility[2, {2, 2}], {}}}, {{2, 3}, {utility[2, {2, 3}], {}}}, {{2, 4}, {utility[2, {2, 4}], {}}}, {{3, 3}, {utility[2, {3, 3}], {}}}, {{3, 4}, {utility[2, {3, 4}], {}}}, {{4, 4}, {utility[2, {4, 4}], {}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(lastTwo[\([1, \(-1\), 1]\)]\)], "Input"], Cell[BoxData[ \({{{}, {{{1\/16, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/8, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/8, {1, 3}}, {{{1, 3}, {3}}}}, {{1\/8, {1, 4}}, {{{1, 4}, {4}}}}, {{1\/16, {2, 2}}, {{{2, 2}, {5}}}}, {{1\/8, {2, 3}}, {{{2, 3}, {6}}}}, {{1\/8, {2, 4}}, {{{2, 4}, {7}}}}, {{1\/16, {3, 3}}, {{{3, 3}, {8}}}}, {{1\/8, {3, 4}}, {{{3, 4}, {9}}}}, {{1\/16, {4, 4}}, {{{4, 4}, {10}}}}}}, {{1}, {{{1\/4, {1}}, {{{1, 1}, {1}}}}, {{1\/4, {2}}, {{{1, 2}, {2}}}}, {{1\/4, {3}}, {{{1, 3}, {3}}}}, {{1\/4, {4}}, {{{1, 4}, {4}}}}}}, {{2}, {{{1\/4, {1}}, {{{1, 2}, {2}}}}, {{1\/4, {2}}, {{{2, 2}, {5}}}}, {{1\/4, {3}}, {{{2, 3}, {6}}}}, {{1\/4, {4}}, {{{2, 4}, {7}}}}}}, {{3}, {{{1\/4, {1}}, {{{1, 3}, {3}}}}, {{1\/4, {2}}, {{{2, 3}, {6}}}}, {{1\/4, {3}}, {{{3, 3}, {8}}}}, {{1\/4, {4}}, {{{3, 4}, {9}}}}}}, {{4}, {{{1\/4, {1}}, {{{1, 4}, {4}}}}, {{1\/4, {2}}, {{{2, 4}, {7}}}}, {{1\/4, {3}}, {{{3, 4}, {9}}}}, {{1\/4, {4}}, {{{4, 4}, {10}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(strategyStep[\([\(-1\), 1]\)]\)], "Input"], Cell[BoxData[ \({{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{1, 4}, {{{1, 4}, {4}}}}, {{2, 2}, {{{2, 2}, {5}}}}, {{2, 3}, {{{2, 3}, {6}}}}, {{2, 4}, {{{2, 4}, {7}}}}, {{3, 3}, {{{3, 3}, {8}}}}, {{3, 4}, {{{3, 4}, {9}}}}, {{4, 4}, {{{4, 4}, {10}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}, {{4}, {{{1, 4}, {4}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {5}}}}, {{3}, {{{2, 3}, {6}}}}, {{4}, {{{2, 4}, {7}}}}}}, {{3}, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {6}}}}, {{3}, {{{3, 3}, {8}}}}, {{4}, {{{3, 4}, {9}}}}}}, {{4}, {{{1}, {{{1, 4}, {4}}}}, {{2}, {{{2, 4}, {7}}}}, {{3}, {{{3, 4}, {9}}}}, {{4}, {{{4, 4}, {10}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(MapThread[ meanMean[#1, fructifiedNextStates, #2] &, {lastTwo[\([1, \(-1\), 1]\)], strategyStep[\([\(-1\), 1]\)]}]\)], "Input"], Cell[BoxData[ \({1\/16\ utility[2, {1, 1}] + 1\/8\ utility[2, {1, 2}] + 1\/8\ utility[2, {1, 3}] + 1\/8\ utility[2, {1, 4}] + 1\/16\ utility[2, {2, 2}] + 1\/8\ utility[2, {2, 3}] + 1\/8\ utility[2, {2, 4}] + 1\/16\ utility[2, {3, 3}] + 1\/8\ utility[2, {3, 4}] + 1\/16\ utility[2, {4, 4}], 1\/4\ utility[2, {1, 1}] + 1\/4\ utility[2, {1, 2}] + 1\/4\ utility[2, {1, 3}] + 1\/4\ utility[2, {1, 4}], 1\/4\ utility[2, {1, 2}] + 1\/4\ utility[2, {2, 2}] + 1\/4\ utility[2, {2, 3}] + 1\/4\ utility[2, {2, 4}], 1\/4\ utility[2, {1, 3}] + 1\/4\ utility[2, {2, 3}] + 1\/4\ utility[2, {3, 3}] + 1\/4\ utility[2, {3, 4}], 1\/4\ utility[2, {1, 4}] + 1\/4\ utility[2, {2, 4}] + 1\/4\ utility[2, {3, 4}] + 1\/4\ utility[2, {4, 4}]}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(utility = \[Delta][{3, 4}, #2] &; %\)], "Input"], Cell[BoxData[ \({1\/8, 0, 0, 1\/4, 1\/4}\)], "Output"] }, Open ]], Cell[TextData[{ "Evaluate all utilities and echo strategy, in ", StyleBox["maxUtilityAndStrategy", "Input"], " format." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(First /@ lastTwo[\([1, \(-1\), 1]\)]\)], "Input"], Cell[BoxData[ \({{}, {1}, {2}, {3}, {4}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Transpose", "@", RowBox[{"{", RowBox[{\(First /@ lastTwo[\([1, \(-1\), 1]\)]\), ",", RowBox[{"MapThread", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{\(meanMean[#1, fructifiedNextStates, #2]\), ",", StyleBox[\(Last@#2\), FontColor->RGBColor[1, 0, 0]]}], "}"}], "&"}], ",", \({lastTwo[\([1, \(-1\), 1]\)], strategyStep[\([\(-1\), 1]\)]}\)}], "]"}]}], "}"}]}]], "Input"], Cell[BoxData[ \({{{}, {1\/8, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{1, 4}, {{{1, 4}, {4}}}}, {{2, 2}, {{{2, 2}, {5}}}}, {{2, 3}, {{{2, 3}, {6}}}}, {{2, 4}, {{{2, 4}, {7}}}}, {{3, 3}, {{{3, 3}, {8}}}}, {{3, 4}, {{{3, 4}, {9}}}}, {{4, 4}, {{{4, 4}, {10}}}}}}}, {{1}, {0, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}, {{4}, {{{1, 4}, {4}}}}}}}, {{2}, {0, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {5}}}}, {{3}, {{{2, 3}, {6}}}}, {{4}, {{{2, 4}, {7}}}}}}}, {{3}, {1\/4, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {6}}}}, {{3}, {{{3, 3}, {8}}}}, {{4}, {{{3, 4}, {9}}}}}}}, {{4}, {1\/4, {{{1}, {{{1, 4}, {4}}}}, {{2}, {{{2, 4}, {7}}}}, {{3}, {{{3, 4}, {9}}}}, {{4}, {{{4, 4}, {10}}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(fructifiedNextStates =. ; With[\[IndentingNewLine]{fructifiedNextStates = Flatten[lastTwo[\([\(-1\), \(-1\)]\)], 1]}, \[IndentingNewLine]ReplacePart[\[IndentingNewLine]First@ lastTwo, \[IndentingNewLine]Transpose@{First /@ lastTwo[\([1, \(-1\), 1]\)], MapThread[{meanMean[#1, fructifiedNextStates, #2], Last@#2} &, {lastTwo[\([1, \(-1\), 1]\)], strategyStep[\([\(-1\), 1]\)]}]}, {\(-1\), 1}]\[IndentingNewLine]]\)], "Input"], Cell[BoxData[ \({1, {{{{}, {1\/8, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{1, 4}, {{{1, 4}, {4}}}}, {{2, 2}, {{{2, 2}, {5}}}}, {{2, 3}, {{{2, 3}, {6}}}}, {{2, 4}, {{{2, 4}, {7}}}}, {{3, 3}, {{{3, 3}, {8}}}}, {{3, 4}, {{{3, 4}, {9}}}}, {{4, 4}, {{{4, 4}, {10}}}}}}}, {{1}, {0, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}, {{4}, {{{1, 4}, {4}}}}}}}, {{2}, {0, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {5}}}}, {{3}, {{{2, 3}, {6}}}}, {{4}, {{{2, 4}, {7}}}}}}}, {{3}, {1\/4, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {6}}}}, {{3}, {{{3, 3}, {8}}}}, {{4}, {{{3, 4}, {9}}}}}}}, {{4}, {1\/4, {{{1}, {{{1, 4}, {4}}}}, {{2}, {{{2, 4}, {7}}}}, {{3}, {{{3, 4}, {9}}}}, {{4}, {{{4, 4}, {10}}}}}}}}, {{{1, 1}, {0, {}}}, {{1, 2}, {0, {}}}, {{1, 3}, {0, {}}}, {{1, 4}, {0, {}}}, {{2, 2}, {0, {}}}, {{2, 3}, {0, {}}}, {{2, 4}, {0, {}}}, {{3, 3}, {0, {}}}, {{3, 4}, {1, {}}}, {{4, 4}, {0, {}}}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({lastTwo, strategyStep, utility} =. ;\)\)], "Input"], Cell[TextData[{ "\[WarningSign] Find something faster than ", StyleBox["ReplacePart", "Input"], "." }], "Text"], Cell[BoxData[{ \(ClearAll@meanMeanStep; Protect@withStrategy;\), "\[IndentingNewLine]", \(\(Options@ meanMeanStep = {withStrategy \[Rule] False};\)\), "\[IndentingNewLine]", \(meanMeanStep[lastTwo_List, strategyStep_List, options___] \ := \[IndentingNewLine]ReplacePart[\[IndentingNewLine]First@ lastTwo, \[IndentingNewLine]Transpose@{First /@ lastTwo[\([1, \(-1\), 1]\)], MapThread[{meanMean[#1, Flatten[lastTwo[\([\(-1\), \(-1\)]\)], 1], #2], If[\(withStrategy /. {options}\) /. Options@meanMeanStep, Last@#2, {__}]} &, {lastTwo[\([1, \(-1\), 1]\)], strategyStep[\([\(-1\), 1]\)]}]}, {\(-1\), 1}]\)}], "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell["Test", "Outline2"], Cell[CellGroupData[{ Cell[BoxData[ \(meanMeanStep[{{1, {{{{}, {{{1\/16, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/8, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/8, {1, 3}}, {{{1, 3}, {3}}}}, {{1\/8, {1, 4}}, {{{1, 4}, {4}}}}, {{1\/16, {2, 2}}, {{{2, 2}, {5}}}}, {{1\/8, {2, 3}}, {{{2, 3}, {6}}}}, {{1\/8, {2, 4}}, {{{2, 4}, {7}}}}, {{1\/16, {3, 3}}, {{{3, 3}, {8}}}}, {{1\/8, {3, 4}}, {{{3, 4}, {9}}}}, {{1\/16, {4, 4}}, {{{4, 4}, {10}}}}}}, {{1}, {{{1\/4, {1}}, {{{1, 1}, {1}}}}, {{1\/4, {2}}, {{{1, 2}, {2}}}}, {{1\/4, {3}}, {{{1, 3}, {3}}}}, {{1\/4, {4}}, {{{1, 4}, {4}}}}}}, {{2}, {{{1\/4, {1}}, {{{1, 2}, {2}}}}, {{1\/4, {2}}, {{{2, 2}, {5}}}}, {{1\/4, {3}}, {{{2, 3}, {6}}}}, {{1\/4, {4}}, {{{2, 4}, {7}}}}}}, {{3}, {{{1\/4, {1}}, {{{1, 3}, {3}}}}, {{1\/4, {2}}, {{{2, 3}, {6}}}}, {{1\/4, {3}}, {{{3, 3}, {8}}}}, {{1\/4, {4}}, {{{3, 4}, {9}}}}}}, {{4}, {{{1\/4, {1}}, {{{1, 4}, {4}}}}, {{1\/4, {2}}, {{{2, 4}, {7}}}}, {{1\/4, {3}}, {{{3, 4}, {9}}}}, {{1\/4, {4}}, {{{4, 4}, {10}}}}}}}, {{{1, 1}, {0, {}}}, {{1, 2}, {0, {}}}, {{1, 3}, {0, {}}}, {{1, 4}, {0, {}}}, {{2, 2}, {0, {}}}, {{2, 3}, {0, {}}}, {{2, 4}, {0, {}}}, {{3, 3}, {0, {}}}, {{3, 4}, {1, {}}}, {{4, 4}, {0, {}}}}}}, {2, {{}, {{{1, 1}, {0, {}}}, {{1, 2}, {0, {}}}, {{1, 3}, {0, {}}}, {{1, 4}, {0, {}}}, {{2, 2}, {0, {}}}, {{2, 3}, {0, {}}}, {{2, 4}, {0, {}}}, {{3, 3}, {0, {}}}, {{3, 4}, {1, {}}}, {{4, 4}, {0, {}}}}}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{1, 4}, {{{1, 4}, {4}}}}, {{2, 2}, {{{2, 2}, {5}}}}, {{2, 3}, {{{2, 3}, {6}}}}, {{2, 4}, {{{2, 4}, {7}}}}, {{3, 3}, {{{3, 3}, {8}}}}, {{3, 4}, {{{3, 4}, {9}}}}, {{4, 4}, {{{4, 4}, {10}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}, {{4}, {{{1, 4}, {4}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {5}}}}, {{3}, {{{2, 3}, {6}}}}, {{4}, {{{2, 4}, {7}}}}}}, {{3}, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {6}}}}, {{3}, {{{3, 3}, {8}}}}, {{4}, {{{3, 4}, {9}}}}}}, {{4}, {{{1}, {{{1, 4}, {4}}}}, {{2}, {{{2, 4}, {7}}}}, {{3}, {{{3, 4}, {9}}}}, {{4}, {{{4, 4}, {10}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{1, 3}, {}}, {{1, 4}, {}}, {{2, 2}, {}}, {{2, 3}, {}}, {{2, 4}, {}}, {{3, 3}, {}}, {{3, 4}, {}}, {{4, 4}, {}}}}}] \[Equal] {1, {{{{}, {1\/8, {__}}}, {{1}, {0, \ {__}}}, {{2}, {0, {__}}}, {{3}, {1\/4, {__}}}, {{4}, {1\/4, {__}}}}, {{{1, 1}, {0, {}}}, {{1, 2}, {0, {}}}, {{1, 3}, {0, {}}}, {{1, 4}, {0, {}}}, {{2, 2}, {0, {}}}, {{2, 3}, {0, {}}}, {{2, 4}, {0, {}}}, {{3, 3}, {0, {}}}, {{3, 4}, {1, {}}}, {{4, 4}, {0, {}}}}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(meanMeanStep[{{1, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}, {2, {{}, {{{1, 1}, {\(-18\), {}}}, {{1, 2}, {\(-17\), {}}}, {{2, 2}, {\(-16\), {}}}}}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}] \[Equal] {1, {{{{}, {\(-17\), {__}}}, {{1}, \ {\(-\(35\/2\)\), {__}}}, {{2}, {\(-\(33\/2\)\), {__}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(meanMeanStep[{{1, {{{{}, {{{1\/4, {1, 1}}, {{{1, 1}, {1}}}}, {{1\/2, {1, 2}}, {{{1, 2}, {2}}}}, {{1\/4, {2, 2}}, {{{2, 2}, {3}}}}}}, {{1}, {{{1\/2, {1}}, {{{1, 1}, {1}}}}, {{1\/2, {2}}, {{{1, 2}, {2}}}}}}, {{2}, {{{1\/2, {1}}, {{{1, 2}, {2}}}}, {{1\/2, {2}}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}, {2, {{}, {{{1, 1}, {\(-18\), {}}}, {{1, 2}, {\(-17\), {}}}, {{2, 2}, {\(-16\), {}}}}}}}, {1, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{2, 2}, {}}}}}, withStrategy \[Rule] True]\)], "Input"], Cell[BoxData[ \({1, {{{{}, {\(-17\), {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{2, 2}, {{{2, 2}, {3}}}}}}}, {{1}, {\(-\(35\/2\)\), {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}}}}, {{2}, {\(-\(33\/2\)\), {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {3}}}}}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(meanMeanStep[{{0, {{{{}, {{{1\/16, {1, 1}}, {{{}, {1}}, {{1}, {2}}, {{1, 1}, {6}}}}, {{1\/8, {1, 2}}, {{{}, {1}}, {{1}, {2}}, {{2}, {3}}, {{1, 2}, {7}}}}, {{1\/8, {1, 3}}, {{{}, {1}}, {{1}, {2}}, {{3}, {4}}, {{1, 3}, {8}}}}, {{1\/8, {1, 4}}, {{{}, {1}}, {{1}, {2}}, {{4}, {5}}, {{1, 4}, {9}}}}, {{1\/16, {2, 2}}, {{{}, {1}}, {{2}, {3}}, {{2, 2}, {10}}}}, {{1\/8, {2, 3}}, {{{}, {1}}, {{2}, {3}}, {{3}, {4}}, {{2, 3}, {11}}}}, {{1\/8, {2, 4}}, {{{}, {1}}, {{2}, {3}}, {{4}, {5}}, {{2, 4}, {12}}}}, {{1\/16, {3, 3}}, {{{}, {1}}, {{3}, {4}}, {{3, 3}, {13}}}}, {{1\/8, {3, 4}}, {{{}, {1}}, {{3}, {4}}, {{4}, {5}}, {{3, 4}, {14}}}}, {{1\/16, {4, 4}}, {{{}, {1}}, {{4}, {5}}, {{4, 4}, {15}}}}}}}, {}}}, {1, {{{{}, {1\/8, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{1, 4}, {{{1, 4}, {4}}}}, {{2, 2}, {{{2, 2}, {5}}}}, {{2, 3}, {{{2, 3}, {6}}}}, {{2, 4}, {{{2, 4}, {7}}}}, {{3, 3}, {{{3, 3}, {8}}}}, {{3, 4}, {{{3, 4}, {9}}}}, {{4, 4}, {{{4, 4}, {10}}}}}}}, {{1}, {0, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}, {{4}, {{{1, 4}, {4}}}}}}}, {{2}, {0, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {5}}}}, {{3}, {{{2, 3}, {6}}}}, {{4}, {{{2, 4}, {7}}}}}}}, {{3}, {1\/4, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {6}}}}, {{3}, {{{3, 3}, {8}}}}, {{4}, {{{3, 4}, {9}}}}}}}, {{4}, {1\/4, {{{1}, {{{1, 4}, {4}}}}, {{2}, {{{2, 4}, {7}}}}, {{3}, {{{3, 4}, {9}}}}, {{4}, {{{4, 4}, {10}}}}}}}}, {{{1, 1}, {0, {}}}, {{1, 2}, {0, {}}}, {{1, 3}, {0, {}}}, {{1, 4}, {0, {}}}, {{2, 2}, {0, {}}}, {{2, 3}, {0, {}}}, {{2, 4}, {0, {}}}, {{3, 3}, {0, {}}}, {{3, 4}, {1, {}}}, {{4, 4}, {0, {}}}}}}}, {0, {{{{}, {{{1, 1}, {{{1}, {2}}}}, {{1, 2}, {{{1, 2}, {7}}}}, {{1, 3}, {{{1}, {2}}}}, {{1, 4}, {{{1}, {2}}}}, {{2, 2}, {{{2}, {3}}}}, {{2, 3}, {{{2}, {3}}}}, {{2, 4}, {{{2}, {3}}}}, {{3, 3}, {{{}, {1}}}}, {{3, 4}, {{{}, {1}}}}, {{4, 4}, {{{}, {1}}}}}}}, {}}}, withStrategy \[Rule] True] \[Equal] {0, {{{{}, {1\/32, {{{1, 1}, {{{1}, {2}}}}, {{1, 2}, {{{1, 2}, {7}}}}, {{1, 3}, {{{1}, {2}}}}, {{1, 4}, {{{1}, {2}}}}, {{2, 2}, {{{2}, {3}}}}, {{2, 3}, {{{2}, {3}}}}, {{2, 4}, {{{2}, {3}}}}, {{3, 3}, {{{}, {1}}}}, {{3, 4}, {{{}, {1}}}}, {{4, 4}, {{{}, {1}}}}}}}}, {}}}\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Folding completely", "Subsubsection", CellTags->"c:61"], Cell[TextData[{ "Time scheme. \[Wolf] ", StyleBox["meanMeanStep", "Input"], " must format utilities as in fate tree last level." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\({d = 2, f = 4, j = 3};\)\), "\n", \(With[{fructifiedFateTree = t /@ Range[0, j], strategy1 = s /@ Range[0, j]}, scanPrint@ reverseFoldList[meanMeanStep[{First@#1, #2}, Last@#1] &, Transpose[dropLast /@ {fructifiedFateTree, strategy1}], Last@fructifiedFateTree]]\)}], "Input"], Cell[BoxData[ \(meanMeanStep[{t[0], meanMeanStep[{t[1], meanMeanStep[{t[2], t[3]}, s[2]]}, s[1]]}, s[0]]\)], "Print"], Cell[BoxData[ \(meanMeanStep[{t[1], meanMeanStep[{t[2], t[3]}, s[2]]}, s[1]]\)], "Print"], Cell[BoxData[ \(meanMeanStep[{t[2], t[3]}, s[2]]\)], "Print"], Cell[BoxData[ \(t[3]\)], "Print"] }, Open ]], Cell[BoxData[{ \(j = 2; strategy1 = extractStrategy@ maxUtilityAndStrategy[ fateTree["\", d, f, j], \[Delta][{1, 2}, #2] &];\), "\[IndentingNewLine]", \(\(fructifiedFateTree = fructify[\[Delta][{3, 4}, #2] &]@ fateTree["\", d, f, j];\)\)}], "Input"], Cell[BoxData[ \(\({d =. , f =. , j =. };\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(reverseFoldList[ meanMeanStep[{First@#1, #2}, Last@#1, withStrategy \[Rule] True] &, Transpose[dropLast /@ {fructifiedFateTree, strategy1}], Last@fructifiedFateTree]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {1\/32, {{{1, 1}, {{{1}, {2}}}}, {{1, 2}, {{{1, 2}, {7}}}}, {{1, 3}, {{{1}, {2}}}}, {{1, 4}, {{{1}, {2}}}}, {{2, 2}, {{{2}, {3}}}}, {{2, 3}, {{{2}, {3}}}}, {{2, 4}, {{{2}, {3}}}}, {{3, 3}, {{{}, {1}}}}, {{3, 4}, {{{}, {1}}}}, {{4, 4}, {{{}, {1}}}}}}}}, {}}}, {1, {{{{}, {1\/8, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{1, 4}, {{{1, 4}, {4}}}}, {{2, 2}, {{{2, 2}, {5}}}}, {{2, 3}, {{{2, 3}, {6}}}}, {{2, 4}, {{{2, 4}, {7}}}}, {{3, 3}, {{{3, 3}, {8}}}}, {{3, 4}, {{{3, 4}, {9}}}}, {{4, 4}, {{{4, 4}, {10}}}}}}}, {{1}, {0, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}, {{4}, {{{1, 4}, {4}}}}}}}, {{2}, {0, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {5}}}}, {{3}, {{{2, 3}, {6}}}}, {{4}, {{{2, 4}, {7}}}}}}}, {{3}, {1\/4, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {6}}}}, {{3}, {{{3, 3}, {8}}}}, {{4}, {{{3, 4}, {9}}}}}}}, {{4}, {1\/4, {{{1}, {{{1, 4}, {4}}}}, {{2}, {{{2, 4}, {7}}}}, {{3}, {{{3, 4}, {9}}}}, {{4}, {{{4, 4}, {10}}}}}}}}, {{{1, 1}, {0, {}}}, {{1, 2}, {0, {}}}, {{1, 3}, {0, {}}}, {{1, 4}, {0, {}}}, {{2, 2}, {0, {}}}, {{2, 3}, {0, {}}}, {{2, 4}, {0, {}}}, {{3, 3}, {0, {}}}, {{3, 4}, {1, {}}}, {{4, 4}, {0, {}}}}}}, {2, {{}, {{{1, 1}, {0, {}}}, {{1, 2}, {0, {}}}, {{1, 3}, {0, {}}}, {{1, 4}, {0, {}}}, {{2, 2}, {0, {}}}, {{2, 3}, {0, {}}}, {{2, 4}, {0, {}}}, {{3, 3}, {0, {}}}, {{3, 4}, {1, {}}}, {{4, 4}, {0, {}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(meanMeanStep[{fructifiedFateTree[\([2]\)], fructifiedFateTree[\([3]\)]}, strategy1[\([2]\)], withStrategy \[Rule] True]\)], "Input"], Cell[BoxData[ \({1, {{{{}, {1\/8, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{1, 4}, {{{1, 4}, {4}}}}, {{2, 2}, {{{2, 2}, {5}}}}, {{2, 3}, {{{2, 3}, {6}}}}, {{2, 4}, {{{2, 4}, {7}}}}, {{3, 3}, {{{3, 3}, {8}}}}, {{3, 4}, {{{3, 4}, {9}}}}, {{4, 4}, {{{4, 4}, {10}}}}}}}, {{1}, {0, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}, {{4}, {{{1, 4}, {4}}}}}}}, {{2}, {0, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {5}}}}, {{3}, {{{2, 3}, {6}}}}, {{4}, {{{2, 4}, {7}}}}}}}, {{3}, {1\/4, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {6}}}}, {{3}, {{{3, 3}, {8}}}}, {{4}, {{{3, 4}, {9}}}}}}}, {{4}, {1\/4, {{{1}, {{{1, 4}, {4}}}}, {{2}, {{{2, 4}, {7}}}}, {{3}, {{{3, 4}, {9}}}}, {{4}, {{{4, 4}, {10}}}}}}}}, {{{1, 1}, {0, {}}}, {{1, 2}, {0, {}}}, {{1, 3}, {0, {}}}, {{1, 4}, {0, {}}}, {{2, 2}, {0, {}}}, {{2, 3}, {0, {}}}, {{2, 4}, {0, {}}}, {{3, 3}, {0, {}}}, {{3, 4}, {1, {}}}, {{4, 4}, {0, {}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(meanMeanStep[{fructifiedFateTree[\([1]\)], %}, strategy1[\([1]\)], withStrategy \[Rule] True]\)], "Input"], Cell[BoxData[ \({0, {{{{}, {1\/32, {{{1, 1}, {{{1}, {2}}}}, {{1, 2}, {{{1, 2}, {7}}}}, {{1, 3}, {{{1}, {2}}}}, {{1, 4}, {{{1}, {2}}}}, {{2, 2}, {{{2}, {3}}}}, {{2, 3}, {{{2}, {3}}}}, {{2, 4}, {{{2}, {3}}}}, {{3, 3}, {{{}, {1}}}}, {{3, 4}, {{{}, {1}}}}, {{4, 4}, {{{}, {1}}}}}}}}, {}}}\)], "Output"] }, Open ]], Cell["\<\ Check: when aiming at {1, 2}, reaching actually {3, 4} (a complete \ failure) implies raising at last cast {3, 4} after obtaining at first cast \ {3, 4} (prob. 1/8) or {3, 3} (prob. 1/16) or {4, 4}.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(1\/8\) 1\/8 + 2\ \(1\/16\) 1\/8 \[Equal] 1\/32\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[BoxData[ \(\({fructifiedFateTree, strategy1} =. ;\)\)], "Input"], Cell[TextData[{ "\[Wolf] Remember section ", CounterBox["Section", "section12"], ".", CounterBox["Subsection", "section12"], ".", CounterBox["Subsubsection", "section12"], ": shared state ", "positions", " in fate tree and strategy must be consistent. " }], "Text"], Cell[BoxData[ \(Clear@utilityAndStrategy; utilityAndStrategy[fateTree1_, utility_, options___]@strategy1_List := With[{fructifiedFateTree = fructify[utility]@fateTree1}, \[IndentingNewLine]reverseFoldList[ meanMeanStep[{First@#1, #2}, Last@#1, options] &, Transpose[dropLast /@ {fructifiedFateTree, strategy1}], Last@fructifiedFateTree]\[IndentingNewLine]]\)], "Input", InitializationCell->True], Cell["Check strategy echo.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 2, f = 2, j = 3}, \[IndentingNewLine]With[{fateTree1 = fateTree["\", d, f, j]}, \[IndentingNewLine]With[{strategy1 = extractStrategy@ maxUtilityAndStrategy[ fateTree1, \[Delta][ Last@allRepresentatives[d, f], #2] &]}, \[IndentingNewLine]Equal @@ \ {extractStrategy@\(utilityAndStrategy[fateTree1, \(-10\) #1 + Total@#2 &, withStrategy \[Rule] True]@strategy1\), strategy1}]]]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 2, f = 2, j = 3}, \[IndentingNewLine]With[{fateTree1 = fateTree["\", d, f, j]}, \[IndentingNewLine]With[{strategy1 = extractStrategy@ maxUtilityAndStrategy[ fateTree1, \[Delta][ Last@allRepresentatives[d, f], #2] &]}, \[IndentingNewLine]utilityAndStrategy[ fateTree1, \(-10\) #1 + Total@#2 &]@strategy1]]]\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {\(-\(29\/2\)\), {__}}}}, {}}}, {1, {{{{}, {\(-22\), \ {__}}}, {{1}, {\(-\(89\/4\)\), {__}}}, {{2}, {\(-\(87\/4\)\), {__}}}}, {{{1, 1}, {\(-8\), {}}}, {{1, 2}, {\(-7\), {}}}, {{2, 2}, {\(-6\), {}}}}}}, {2, {{{{}, {\(-27\), {__}}}, {{1}, {\(-\ \(55\/2\)\), {__}}}, {{2}, {\(-\(53\/2\)\), {__}}}}, {{{1, 1}, {\(-18\), {}}}, {{1, 2}, {\(-17\), {}}}, {{2, 2}, {\(-16\), {}}}}}}, {3, {{}, {{{1, 1}, {\(-28\), {}}}, {{1, 2}, {\(-27\), {}}}, {{2, 2}, {\(-26\), {}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 2, f = 2, j = 3}, \[IndentingNewLine]With[{fateTree1 = fateTree["\", d, f, j]}, \[IndentingNewLine]initial@\(utilityAndStrategy[ fateTree1, \(-10\) #1 + Total@#2 &]@\(extractStrategy@ maxUtilityAndStrategy[ fateTree1, \[Delta][ Last@allRepresentatives[d, f], #2] \ &]\)\)\[IndentingNewLine]]\[IndentingNewLine]]\)], "Input"], Cell[BoxData[ \(\(-\(29\/2\)\)\)], "Output"] }, Open ]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Consistency between mean-max and mean-mean", "Subsection", CellTags->{"section9", "c:62"}], Cell[CellGroupData[{ Cell["Checking mean-max utility from strategy, with mean-mean", \ "Subsubsection", CellTags->"c:63"], Cell["\[WarningSign] Try more cases.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 3, f = 2, j = 3}, With[{fateTree1 = fateTree["\", d, f, j]}, With[{utility = \[Delta][{1, 2, 2}, #2] &}, compare[initial@ maxUtilityAndStrategy[fateTree1, utility], \[IndentingNewLine]initial@\(utilityAndStrategy[ fateTree1, utility]@\(extractStrategy@ maxUtilityAndStrategy[fateTree1, utility]\)\)]]]]\)], "Input"], Cell[BoxData[ \({"same", 427\/512}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 3, f = 5, j = 3}, With[{fateTree1 = fateTree["\", d, f, j]}, With[{utility = \[Delta][{1, 2, 3}, #2] + \[Delta][{3, 4, 5}, #2] &}, compare[initial@ maxUtilityAndStrategy[fateTree1, utility], \[IndentingNewLine]initial@\(utilityAndStrategy[ fateTree1, utility]@\(extractStrategy@ maxUtilityAndStrategy[fateTree1, utility]\)\)]]]]\)], "Input"], Cell[BoxData[ \({"same", 380268\/1953125}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 2, f = 3, j = 3}, With[{fateTree1 = fateTree["\", d, f, j]}, \(With[{utility = #}, compare[initial@ maxUtilityAndStrategy[fateTree1, utility], \[IndentingNewLine]initial@\(utilityAndStrategy[ fateTree1, utility]@\(extractStrategy@ maxUtilityAndStrategy[fateTree1, utility]\)\)]] &\) /@ utilityList[d, f, j]]]\)], "Input"], Cell[BoxData[ \({{"same", 242\/729}, {"same", 454\/729}, {"same", 242\/729}, {"same", 146\/243}, {"same", 2999\/729}, {"same", 2107\/729}, {"same", 389\/81}, {"same", 146\/81}, {"same", 454\/81}, {"same", 3527\/8181}, {"same", 37997\/73629}, {"same", 49328\/73629}, {"same", 22535\/73629}, {"same", 12121\/24543}, {"same", 46448\/73629}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Mean-max strategy is more useful than other strategies", "Subsubsection", CellTags->"c:64"], Cell[CellGroupData[{ Cell[BoxData[ \(With[{d = 2, f = 3, j = 3}, And @@ Distribute[{{"\", "\"}, utilityList[d, f, j], utilityList[d, f, j]}, List, List, List, With[{fateTree1 = fateTree[#1, d, f, j]}, initial@maxUtilityAndStrategy[ fateTree1, #2] \[GreaterEqual] \ \[IndentingNewLine]initial@\(utilityAndStrategy[ fateTree1, #2]@\(extractStrategy@ maxUtilityAndStrategy[ fateTree1, #3]\)\)] &]]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(And @@ With[{d = 3, f = 6, j = 3}, With[{fateTree1 = fateTree["\", d, f, j]}, \(With[{utility = \(utilityList[d, f, j]\)[\([1]\)]}, initial@ maxUtilityAndStrategy[fateTree1, utility] \[GreaterEqual] \ \[IndentingNewLine]initial@\(utilityAndStrategy[fateTree1, utility]@\(extractStrategy@ maxUtilityAndStrategy[fateTree1, #]\)\)] &\) /@ utilityList[d, f, j]]]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Checking pure strategy utility with forcing and mean-max", \ "Subsubsection", CellTags->"c:65"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{\({d = 2, f = 2, j = 3}\), ";", \(fateTree1 = fateTree["\", d, f, j]\), ";", \(strategy1 = extractStrategy@ maxUtilityAndStrategy[ fateTree1, \[Delta][Last@allRepresentatives[d, f], #2] &]\), ";", RowBox[{ RowBox[{ RowBox[{"With", "[", RowBox[{\({utility = #}\), ",", RowBox[{ RowBox[{"initial", "@", RowBox[{"maxUtilityAndStrategy", "[", RowBox[{ RowBox[{ RowBox[{"force", "[", RowBox[{ StyleBox[\(purify[1]\), FontColor->RGBColor[1, 0, 0]], StyleBox["@", FontColor->RGBColor[1, 0, 0]], "strategy1"}], "]"}], "@", "fateTree1"}], ",", "utility"}], "]"}]}], "\[Equal]", \(initial@\(utilityAndStrategy[fateTree1, utility]@\(purify[1]@strategy1\)\)\)}]}], "]"}], "&"}], "/@", \({\[Delta][ Last@allRepresentatives[d, f], #2] &, \[IndentingNewLine]\(-10\) #1 + Total@#2 &, \[IndentingNewLine]Total@#2 &, \(-#1\) + Times @@ #2 &, \[IndentingNewLine]10 #1 + Times @@ #2 &}\)}]}]], "Input"], Cell[BoxData[ \({True, True, True, True, True}\)], "Output"] }, Open ]], Cell["The strategy is not pure:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(strategy1 \[Equal] purify[1]@strategy1\)], "Input"], Cell[BoxData[ \(False\)], "Output"] }, Open ]], Cell[TextData[{ "Without purifying, ", StyleBox["mean-max", "Program"], " might change the strategy:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(With[{utility = #}, initial@maxUtilityAndStrategy[force[strategy1]@fateTree1, utility] \[Equal] initial@\(utilityAndStrategy[fateTree1, utility]@ strategy1\)] &\) /@ {\[Delta][ Last@allRepresentatives[d, f], #2] &, \(-10\) #1 + Total@#2 &, Total@#2 &, \(-#1\) + Times @@ #2 &, 10 #1 + Times @@ #2 &}\)], "Input"], Cell[BoxData[ \({True, False, False, False, False}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \({d = 2, f = 3, j = 3}; fateTree1 = fateTree["\", d, f, j];\), "\n", \(\(strategy1 = extractStrategy@ maxUtilityAndStrategy[ fateTree1, \[Delta][ Last@allRepresentatives[d, f], #2] &];\)\), "\n", \(\(With[{utility = #}, initial@maxUtilityAndStrategy[force[strategy1]@fateTree1, utility] \[Equal] initial@\(utilityAndStrategy[fateTree1, utility]@ strategy1\)] &\) /@ utilityList[d, f, j]\)}], "Input"], Cell[BoxData[ \({True, True, True, True, True, True, True, True, True, True, True, True, True, True, True}\)], "Output"] }, Open ]], Cell["The strategy is not pure", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(strategy1 \[Equal] purify[1]@strategy1\)], "Input"], Cell[BoxData[ \(False\)], "Output"] }, Open ]], Cell[TextData[{ "but only because of vain states, that have no effect on ", StyleBox["maxUtilityAndStrategy", "Input"], "," }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(strategy1\)], "Input"], Cell[BoxData[ \({{0, {{{{}, {{{1, 1}, {{{1}, {2}}}}, {{1, 2}, {{{1, 2}, {6}}}}, {{1, 3}, {{{1}, {2}}}}, {{2, 2}, {{{2}, {3}}}}, {{2, 3}, {{{2}, {3}}}}, {{3, 3}, {{{}, {1}}}}}}}, {}}}, {1, {{{{}, {{{1, 1}, {{{1}, {2}}}}, {{1, 2}, {{{1, 2}, {6}}}}, {{1, 3}, {{{1}, {2}}}}, {{2, 2}, {{{2}, {3}}}}, {{2, 3}, {{{2}, {3}}}}, {{3, 3}, {{{}, {1}}}}}}, {{1}, {{{1}, {{{1}, {2}}}}, {{2}, \ {{{1, 2}, {6}}}}, {{3}, {{{1}, {2}}}}}}, {{2}, {{{1}, {{{1, 2}, {6}}}}, {{2}, {{{2}, {3}}}}, {{3}, {{{2}, \ {3}}}}}}, {{3}, {{{1}, {{{3}, {4}}, {{1, 3}, {7}}}}, {{2}, {{{3}, {4}}, {{2, 3}, {9}}}}, {{3}, {{{3}, {4}}, {{3, 3}, {10}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{1, 3}, {}}, {{2, 2}, {}}, {{2, 3}, {}}, {{3, 3}, {}}}}}, {2, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{2, 2}, {{{2, 2}, {4}}}}, {{2, 3}, {{{2, 3}, {5}}}}, {{3, 3}, {{{3, 3}, {6}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {4}}}}, {{3}, {{{2, 3}, {5}}}}}}, {{3}, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {5}}}}, {{3}, {{{3, 3}, {6}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{1, 3}, {}}, {{2, 2}, {}}, {{2, 3}, {}}, {{3, 3}, {}}}}}, {3, {{}, {{{1, 1}, {}}, {{1, 2}, {}}, {{1, 3}, {}}, {{2, 2}, {}}, {{2, 3}, {}}, {{3, 3}, {}}}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \({d =. , f =. , j =. }; utility =. ; strategy1 =. ; fateTree1 =. ;\)], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Displaying strategies with mean-mean and symbolic utility", "Subsection", CellTags->"c:71"], Cell[CellGroupData[{ Cell["Displaying one strategy state branch", "Subsubsection", CellTags->"c:72"], Cell[CellGroupData[{ Cell[BoxData[{ \(\({d = 2, f = 3};\)\), "\n", \(allSubcombinations[d, f]\)}], "Input"], Cell[BoxData[ \({{}, {1}, {2}, {3}, {1, 1}, {1, 2}, {1, 3}, {2, 2}, {2, 3}, {3, 3}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(\(utility = Point[{#1, \(Position[allSubcombinations[d, f], #2]\)[\([\)\(1, 1\)\(]\)]}] &;\)\), "\n", \(utility[2, {1, 1}]\)}], "Input"], Cell[BoxData[ \(Point[{2, 5}]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(j = 3; j1 = 2; stateBranch = \(fateTree["\", d, f, j]\)[\([j1 + 1, \(-1\), 1, 2]\)]\)], "Input"], Cell[BoxData[ \({{1}, {{{1\/3, {1}}, {{{1, 1}, {1}}}}, {{1\/3, {2}}, {{{1, 2}, {2}}}}, {{1\/3, {3}}, {{{1, 3}, {3}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(lastTwo = Take[fructify[utility]@fateTree["\", d, f, j], \(-2\)]\)], "Input"], Cell[BoxData[ \({{2, {{{{}, {{{1\/9, {1, 1}}, {{{1, 1}, {1}}}}, {{2\/9, {1, 2}}, {{{1, 2}, {2}}}}, {{2\/9, {1, 3}}, {{{1, 3}, {3}}}}, {{1\/9, {2, 2}}, {{{2, 2}, {4}}}}, {{2\/9, {2, 3}}, {{{2, 3}, {5}}}}, {{1\/9, {3, 3}}, {{{3, 3}, {6}}}}}}, {{1}, {{{1\/3, {1}}, {{{1, 1}, {1}}}}, {{1\/3, {2}}, {{{1, 2}, {2}}}}, {{1\/3, {3}}, {{{1, 3}, {3}}}}}}, {{2}, {{{1\/3, {1}}, {{{1, 2}, {2}}}}, {{1\/3, {2}}, {{{2, 2}, {4}}}}, {{1\/3, {3}}, {{{2, 3}, {5}}}}}}, {{3}, {{{1\/3, {1}}, {{{1, 3}, {3}}}}, {{1\/3, {2}}, {{{2, 3}, {5}}}}, {{1\/3, {3}}, {{{3, 3}, {6}}}}}}}, {{{1, 1}, {Point[{2, 5}], {}}}, {{1, 2}, {Point[{2, 6}], {}}}, {{1, 3}, {Point[{2, 7}], {}}}, {{2, 2}, {Point[{2, 8}], {}}}, {{2, 3}, {Point[{2, 9}], {}}}, {{3, 3}, {Point[{2, 10}], {}}}}}}, {3, {{}, {{{1, 1}, {Point[{3, 5}], {}}}, {{1, 2}, {Point[{3, 6}], {}}}, {{1, 3}, {Point[{3, 7}], {}}}, {{2, 2}, {Point[{3, 8}], {}}}, {{2, 3}, {Point[{3, 9}], {}}}, {{3, 3}, {Point[{3, 10}], {}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(j =. ; fructifiedNextStates = Flatten[lastTwo[\([\(-1\), \(-1\)]\)], 1]\)], "Input"], Cell[BoxData[ \({{{1, 1}, {Point[{3, 5}], {}}}, {{1, 2}, {Point[{3, 6}], {}}}, {{1, 3}, {Point[{3, 7}], {}}}, {{2, 2}, {Point[{3, 8}], {}}}, {{2, 3}, {Point[{3, 9}], {}}}, {{3, 3}, {Point[{3, 10}], {}}}}\)], "Output"] }, Open ]], Cell[BoxData[ \(lastTwo =. ; strategyStateBranch = {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}}};\)], "Input"], Cell["This is almost all what is needed for a graphics.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(meanMean[stateBranch, fructifiedNextStates, strategyStateBranch]\)], "Input"], Cell[BoxData[ \(1\/3\ Point[{3, 5}] + 1\/3\ Point[{3, 6}] + 1\/3\ Point[{3, 7}]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(?meanMean\)\)], "Input"], Cell["Global`meanMean", "Print", CellTags->"Info3351663954-8272511"], Cell[BoxData[ InterpretationBox[GridBox[{ {GridBox[{ {\(meanMean[stateBranch_List, fructifiedNextStates_List, strategyStateBranch_List] := \ \((#1\[LeftDoubleBracket]1, 1\[RightDoubleBracket] &)\) /@ Last[stateBranch] . \((Mean[\((#1\[LeftDoubleBracket]\ \(-1\), 1\[RightDoubleBracket] &)\) /@ Extract[fructifiedNextStates, #1]] &)\) /@ Map[Last, Last /@ Last[strategyStateBranch], {2}]\)} }, GridBaseline->{Baseline, {1, 1}}, ColumnWidths->0.999, ColumnAlignments->{Left}]} }, GridBaseline->{Baseline, {1, 1}}, ColumnAlignments->{Left}], Definition[ "meanMean"], Editable->False]], "Print", CellTags->"Info3351663954-8272511"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \({\(MapAt[utility[j1 + 1/2, #] &, First@#, \(-1\)] &\) /@ Last@stateBranch, \(\(#[\([\(-1\), 1]\)] &\) /@ Extract[fructifiedNextStates, #] &\) /@ Map[Last, Last /@ Last@strategyStateBranch, {2}]}\)], "Input"], Cell[BoxData[ \({{{1\/3, Point[{5\/2, 2}]}, {1\/3, Point[{5\/2, 3}]}, {1\/3, Point[{5\/2, 4}]}}, {{Point[{3, 5}]}, {Point[{3, 6}]}, {Point[{3, 7}]}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\({\(\(labeledLine[{Sequence @@ #1, Sequence @@ Last@#2}, First@#2] &\) @@ # &\) /@ Distribute[{utility[j1, First@stateBranch], First@#}, List], MapThread[\(\(Line[{Sequence @@ #1, Sequence @@ #2}] &\) @@ ## &\) /@ Distribute[{Last@#1, #2}, List] &, #]} &\)@{\(MapAt[ utility[j1 + 1/2, #] &, First@#, \(-1\)] &\) /@ Last@stateBranch, \(\(#[\([\(-1\), 1]\)] &\) /@ Extract[fructifiedNextStates, #] &\) /@ Map[Last, Last /@ Last@strategyStateBranch, {2}]}\)], "Input"], Cell[BoxData[ \({{{Line[{{2, 2}, {5\/2, 2}}], Text[1\/3, {9\/4, 2}, Background \[Rule] GrayLevel[1]]}, {Line[{{2, 2}, {5\/2, 3}}], Text[1\/3, {9\/4, 5\/2}, Background \[Rule] GrayLevel[1]]}, {Line[{{2, 2}, {5\/2, 4}}], Text[1\/3, {9\/4, 3}, Background \[Rule] GrayLevel[1]]}}, {{Line[{{5\/2, 2}, {3, 5}}]}, {Line[{{5\/2, 3}, {3, 6}}]}, {Line[{{5\/2, 4}, {3, 7}}]}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(Show[#, TextStyle \[Rule] {FontSize \[Rule] 10}, ImageSize \[Rule] 8\ 72] &\)@\(Graphics@{\({\(\(labeledLine[{Sequence @@ #1, Sequence @@ Last@#2}, InputForm@\(First@#2\), cursor \[Rule] 2/3] &\) @@ # &\) /@ Distribute[{utility[j1, First@stateBranch], First@#}, List], MapThread[\(\(Line[{Sequence @@ #1, Sequence @@ #2}] &\) @@ ## &\) /@ Distribute[{Last@#1, #2}, List] &, #]} &\)@{\(MapAt[ utility[j1 + 1/2, #] &, First@#, \(-1\)] &\) /@ Last@stateBranch, \(\(#[\([\(-1\), 1]\)] &\) /@ Extract[fructifiedNextStates, #] &\) /@ Map[Last, Last /@ Last@strategyStateBranch, {2}]}, \(Text[ combinationBox@#, Sequence @@ utility[j1 + 1, #], Background \[Rule] White] &\) /@ \(First /@ fructifiedNextStates\)}\);\)\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 %%ImageSize: 576 355.988 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -1.88095 0.952381 -0.132436 0.0735755 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g .5 Mabswid [ ] 0 setdash .02381 .01472 m .5 .01472 L s 1 g .34127 .01472 -12.8125 -6 Mabsadd m .34127 .01472 12.8125 -6 Mabsadd L .34127 .01472 12.8125 6 Mabsadd L .34127 .01472 -12.8125 6 Mabsadd L fill 0 g gsave .34127 .01472 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore .02381 .01472 m .5 .08829 L s 1 g .34127 .06377 -12.8125 -6 Mabsadd m .34127 .06377 12.8125 -6 Mabsadd L .34127 .06377 12.8125 6 Mabsadd L .34127 .06377 -12.8125 6 Mabsadd L fill 0 g gsave .34127 .06377 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore .02381 .01472 m .5 .16187 L s 1 g .34127 .11282 -12.8125 -6 Mabsadd m .34127 .11282 12.8125 -6 Mabsadd L .34127 .11282 12.8125 6 Mabsadd L .34127 .11282 -12.8125 6 Mabsadd L fill 0 g gsave .34127 .11282 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore .5 .01472 m .97619 .23544 L s .5 .08829 m .97619 .30902 L s .5 .16187 m .97619 .38259 L s 1 g .97619 .23544 -13.5 -6.875 Mabsadd m .97619 .23544 13.5 -6.875 Mabsadd L .97619 .23544 13.5 6.875 Mabsadd L .97619 .23544 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .23544 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .30902 -13.5 -6.875 Mabsadd m .97619 .30902 13.5 -6.875 Mabsadd L .97619 .30902 13.5 6.875 Mabsadd L .97619 .30902 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .30902 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .38259 -13.5 -6.96875 Mabsadd m .97619 .38259 13.5 -6.96875 Mabsadd L .97619 .38259 13.5 6.96875 Mabsadd L .97619 .38259 -13.5 6.96875 Mabsadd L fill 0 g gsave .97619 .38259 -74.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 85.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.750 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .45617 -13.5 -6.875 Mabsadd m .97619 .45617 13.5 -6.875 Mabsadd L .97619 .45617 13.5 6.875 Mabsadd L .97619 .45617 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .45617 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .52974 -13.5 -6.96875 Mabsadd m .97619 .52974 13.5 -6.96875 Mabsadd L .97619 .52974 13.5 6.96875 Mabsadd L .97619 .52974 -13.5 6.96875 Mabsadd L fill 0 g gsave .97619 .52974 -74.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 85.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.750 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .60332 -13.5 -6.96875 Mabsadd m .97619 .60332 13.5 -6.96875 Mabsadd L .97619 .60332 13.5 6.96875 Mabsadd L .97619 .60332 -13.5 6.96875 Mabsadd L fill 0 g gsave .97619 .60332 -74.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 85.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.750 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{576, 355.938}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgkooooo0_l0003ooooooa7ooooo000Wooooo`?o00005_ooool6o`000>[ooooo 0_l0003oooooo`oooooo000Zooooo`Co00006?ooool7o`000>Gooooo0_l0003oooooo`gooooo000^ ooooo`?o00007?ooool6o`000>7ooooo0ol0003oooooo`[ooooo000aooooo`?o00007oooool7o`00 0=gooooo0_l0003oooooo`Sooooo000dooooo`?o00008oooool6o`000=Wooooo0_l0003oooooo`Ko oooo000gooooo`?o00009_ooool7o`000=Cooooo0_l0003oooooo`Cooooo000jooooo`Co0000:Ooo ool6o`000=3ooooo0_l0003oooooo`;ooooo000nooooo`?o0000;?ooool7o`000<_ooooo0_l0003o ooooo`00@Oooool3o`00033ooooo1_l00037ooooo`;o0000oOooool004Cooooo0ol0000cooooo`Oo 0000`_ooool3o`000?[ooooo0017ooooo`?o0000=oooool6o`000;oooooo0_l0003hooooo`00B_oo ool4o`0003Wooooo1ol0002jooooo`;o0000m_ooool004kooooo0ol0000mooooo`Ko0000]_ooool2 o`000?Cooooo001Aooooo`?o0000@?ooool7o`000;7ooooo0_l0003booooo`00E?ooool3o`0004Co oooo1_l0002]ooooo`;o0000l?ooool005Oooooo0ol00017ooooo`Oo0000Z?ooool3o`000>gooooo 001Jooooo`Co0000B_ooool6o`000:Gooooo0_l0003[ooooo`00G_ooool3o`0004gooooo1ol0000= ooooo`03o`000?oooooooooo093ooooo0_l0003Yooooo`00HOooool3o`00057ooooo0_l00003oooo o`?o00001_ooool00ol0003oooooooooo`04ooooo`?o0000R_ooool2o`000>Oooooo001Tooooo`?o 0000E?ooool00ol0003oooooooooo`05ooooo`03o`000?oooooooooo00?ooooo00Go0000oooooooo ooooooooo`00002;ooooo`;o0000iOooool006Oooooo1?l0001@ooooo`03o`000?oooooooooo00Go oooo00?o0000ooooooooool01oooool00ol0003oooooooooo`2;ooooo`;o0000hoooool006_ooooo 0ol0001=ooooo`03o`000?oooooooooo00Kooooo00?o0000ooooooooool01?ooool2o`00093ooooo 0_l0003Qooooo`00K_ooool3o`0004[ooooo00?o0000ooooooooool01_ooool00ol0003ooooooooo o`06ooooo`04o`000?ooooooooooooooo`Co0000R_ooool3o`000=kooooo001aooooo`?o0000A_oo ool2o`0000Wooooo00Go0000ooooooooooooooooo`000003ooooo`03o`000?oooooooooo00Gooooo 1ol00026ooooo`;o0000g?ooool007Cooooo0ol00014ooooo`03o`000?oooooooooo00cooooo0ol0 000?ooooo`Ko0000P_ooool2o`000=[ooooo001gooooo`Co0000Ioooool7o`0007gooooo0_l0003H ooooo`00Noooool3o`0006_ooooo1_l0001iooooo`;o0000e_ooool007kooooo0ol0001^ooooo`Oo 0000M?ooool2o`000=Cooooo0021ooooo`?o0000L_ooool6o`00073ooooo0_l0003Booooo`00Q?oo ool3o`0007Gooooo1ol0001[ooooo`?o0000coooool008Oooooo1?l0001hooooo`Ko0000J?ooool2 o`000Sooooo0ol0001/ooooo`;o0000F?ooool2o`0008gooooo003[ooooo`?o0000Jooo ool2o`0005Sooooo0_l0002;ooooo`00k_ooool3o`0006[ooooo0_l0001Hooooo`?o0000R?ooool0 0?7ooooo1?l0001Xooooo`;o0000FOooool2o`0008Kooooo003eooooo`?o0000Ioooool3o`0005So oooo0_l00024ooooo`00n?ooool3o`0006Oooooo0_l0001Hooooo`;o0000P_ooool00?_ooooo0ol0 001Vooooo`;o0000F?ooool2o`00083ooooo003nooooo`?o0000IOooool2o`0005Sooooo0_l0001n ooooo`00ooooool2ooooo`Co0000Hoooool2o`0005Sooooo0_l0001looooo`00ooooool6ooooo`?o 0000H_ooool2o`0005Sooooo0ol0001iooooo`00ooooool9ooooo`?o0000HOooool2o`0005Wooooo 0_l0001gooooo`00oooooolooooo`00oooooollooooo`;o0000F_ooool2o`0005Wooooo 0_l0001ooooo`?o0000FOooool2o`00 05Gooooo003ooooooi7ooooo0_l0001Iooooo`;o0000Doooool00?ooooooToooool2o`0005Wooooo 0_l0001Aooooo`00oooooonEooooo`;o0000FOooool3o`0004kooooo003ooooooiOooooo0_l0001J ooooo`;o0000C?ooool00?ooooooVOooool2o`0005[ooooo0_l0001:ooooo`00oooooonKooooo`?o 0000FOooool2o`0004Sooooo003ooooooikooooo0_l0001Iooooo`;o0000A_ooool00?ooooooX?oo ool2o`0005Wooooo0_l00014ooooo`00oooooonRooooo`;o0000FOooool2o`0004;ooooo003ooooo ojCooooo0_l0001Iooooo`?o0000?oooool00?ooooooY_ooool2o`0005[ooooo0_l0000mooooo`00 oooooonXooooo`?o0000FOooool2o`0003_ooooo003ooooooj_ooooo0_l0001Iooooo`;o0000>Ooo ool00?oooooo[Oooool2o`0005Wooooo0_l0000gooooo`00oooooon_ooooo`;o0000FOooool2o`00 03Gooooo003ooooook7ooooo0_l0001Iooooo`?o0000<_ooool00?oooooo/oooool2o`0005[ooooo 0_l0000`ooooo`00ooooooneooooo`?o0000FOooool2o`0002kooooo003ooooookSooooo0_l0001I ooooo`;o0000;?ooool00?oooooo^_ooool2o`0005Wooooo0_l0000Zooooo`00oooooonlooooo`;o 0000FOooool2o`0002Sooooo003ooooookkooooo0_l0001Iooooo`;o00009_ooool00?oooooo`?oo ool2o`0005Wooooo0ol0000Sooooo`00ooooooo2ooooo`?o0000FOooool2o`00027ooooo003ooooo olGooooo0_l0001Iooooo`;o00007oooool00?ooooooaoooool2o`0005Wooooo0_l0000Mooooo`00 ooooooo9ooooo`;o0000FooooolHo`0000?ooooo003ooooool_ooooo0_l0001Iooooo`03o`000?oo oooooooo01Cooooo00?o0000ooooooooool00Oooool00?oooooocOooool2o`0005Oooooo00?o0000 ooooooooool05?ooool00ol0003oooooooooo`01ooooo`00ooooooo?ooooo`?o0000E?ooool00ol0 003oooooooooo`0Dooooo`03o`000?oooooooooo007ooooo003oooooom;ooooo0_l0001Booooo`03 o`000?oooooooooo00;ooooo1Ol00004ooooo`?o00001_ooool00ol0003oooooooooo`01ooooo`00 oooooooDooooo`;o0000D?ooool00ol0003oooooooooo`03ooooo`04o`000?ooooooooooo`0000Go oooo00?o0000ooooooooool01Oooool00ol0003oooooooooo`01ooooo`00oooooooFooooo`;o0000 C_ooool00ol0003oooooooooo`04ooooo`03o`000?oooooooooo00Gooooo00?o0000ooooooooool0 1Oooool00ol0003oooooooooo`01ooooo`00oooooooHooooo`;o0000C?ooool00ol0003ooooooooo o`05ooooo`03o`000?oooooooooo00Cooooo00?o0000ooooooooool01Oooool00ol0003ooooooooo o`01ooooo`00oooooooJooooo`;o0000B_ooool00ol0003oooooooooo`02ooooo`05o`000?oooooo ooooooooool000001Oooool00ol0003oooooooooo`05ooooo`03o`000?oooooooooo007ooooo003o ooooomcooooo0ol00017ooooo`03o`000?oooooooooo00;ooooo00Go0000ooooooooooooooooo`00 0004ooooo`;o00001oooool00ol0003oooooooooo`01ooooo`00oooooooOooooo`;o0000AOooool0 0ol0003oooooooooo`03ooooo`?o00001_ooool00ol0003oooooooooo`05ooooo`03o`000?oooooo oooo007ooooo003oooooon7ooooo0_l00013ooooo`03o`000?oooooooooo01Cooooo00?o0000oooo ooooool00Oooool00?oooooohoooool2o`00047ooooo6?l00003ooooo`00oooooooUooooo`;o0000 F_ooool00?ooooooioooool2o`0005Sooooo003oooooonWooooo0ol0001Eooooo`00ooooooo/oooo o`;o0000Doooool00?ooooook_ooool2o`00057ooooo003ooooooo3ooooo0_l0001?ooooo`00oooo ooobooooo`;o0000COooool00?oooooom?ooool2o`0004_ooooo003oooooooKooooo0ol00018oooo o`00oooooooiooooo`;o0000A_ooool00?oooooonoooool2o`0004Cooooo003ooooooogooooo0_l0 0012ooooo`00ooooooooooooo`;o0000@?ooool00?ooooooooooool2ooooo`;o0000?_ooool00?oo ooooooooool4ooooo`?o0000>oooool00?ooooooooooool7ooooo`;o0000>Oooool00?oooooooooo ool9ooooo`;o0000=oooool00?ooooooooooool;ooooo`;o0000=Oooool00?ooooooooooool=oooo o`;o0000"], ImageRangeCache->{{{0, 575}, {354.938, 0}} -> {1.97436, 1.79996, \ 0.00182832, 0.0236662}}] }, Open ]], Cell["Eliminate constants.", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \({d =. , f =. }; utility =. ; j1 =. ;\), "\n", \(\(\(Show[#, TextStyle \[Rule] {FontSize \[Rule] 10}, ImageSize \[Rule] 8\ 72] &\)@ With[{\[IndentingNewLine]d = Length@\(First@stateBranch\) + Length@stateBranch[\([\)\(\(-1\), 1, 1, \(-1\)\)\(]\)], f = stateBranch[\([\)\(\(-1\), \(-1\), 1, \(-1\), 1\)\(]\)], \[IndentingNewLine]j1 = fructifiedNextStates[\([\)\(1, \(-1\), 1, 1, 1\)\(]\)] - 1}, With[{utility = Point[{#1, \(Position[ allSubcombinations[d, f], #2]\)[\([\)\(1, 1\)\(]\)]}] &}, Graphics@{\({\(\(labeledLine[{Sequence @@ #1, Sequence @@ Last@#2}, InputForm@\(First@#2\), cursor \[Rule] 2/3] &\) @@ # &\) /@ Distribute[{utility[j1, First@stateBranch], First@#}, List], MapThread[\(\(Line[{Sequence @@ #1, Sequence @@ #2}] &\) @@ ## &\) /@ Distribute[{Last@#1, #2}, List] &, #]} &\)@{\(MapAt[ utility[j1 + 1/2, #] &, First@#, \(-1\)] &\) /@ Last@stateBranch, \(\(#[\([\)\(\(-1\), 1\)\(]\)] &\) /@ Extract[fructifiedNextStates, #] &\) /@ Map[Last, Last /@ Last@strategyStateBranch, {2}]}, \(Text[ combinationBox@#, Sequence @@ utility[j1 + 1, #], Background \[Rule] White] &\) /@ \(First /@ fructifiedNextStates\)}]];\)\)}], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 %%ImageSize: 576 355.988 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -1.88095 0.952381 -0.132436 0.0735755 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g .5 Mabswid [ ] 0 setdash .02381 .01472 m .5 .01472 L s 1 g .34127 .01472 -12.8125 -6 Mabsadd m .34127 .01472 12.8125 -6 Mabsadd L .34127 .01472 12.8125 6 Mabsadd L .34127 .01472 -12.8125 6 Mabsadd L fill 0 g gsave .34127 .01472 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore .02381 .01472 m .5 .08829 L s 1 g .34127 .06377 -12.8125 -6 Mabsadd m .34127 .06377 12.8125 -6 Mabsadd L .34127 .06377 12.8125 6 Mabsadd L .34127 .06377 -12.8125 6 Mabsadd L fill 0 g gsave .34127 .06377 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore .02381 .01472 m .5 .16187 L s 1 g .34127 .11282 -12.8125 -6 Mabsadd m .34127 .11282 12.8125 -6 Mabsadd L .34127 .11282 12.8125 6 Mabsadd L .34127 .11282 -12.8125 6 Mabsadd L fill 0 g gsave .34127 .11282 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore .5 .01472 m .97619 .23544 L s .5 .08829 m .97619 .30902 L s .5 .16187 m .97619 .38259 L s 1 g .97619 .23544 -13.5 -6.875 Mabsadd m .97619 .23544 13.5 -6.875 Mabsadd L .97619 .23544 13.5 6.875 Mabsadd L .97619 .23544 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .23544 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .30902 -13.5 -6.875 Mabsadd m .97619 .30902 13.5 -6.875 Mabsadd L .97619 .30902 13.5 6.875 Mabsadd L .97619 .30902 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .30902 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .38259 -13.5 -6.96875 Mabsadd m .97619 .38259 13.5 -6.96875 Mabsadd L .97619 .38259 13.5 6.96875 Mabsadd L .97619 .38259 -13.5 6.96875 Mabsadd L fill 0 g gsave .97619 .38259 -74.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 85.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.750 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .45617 -13.5 -6.875 Mabsadd m .97619 .45617 13.5 -6.875 Mabsadd L .97619 .45617 13.5 6.875 Mabsadd L .97619 .45617 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .45617 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .52974 -13.5 -6.96875 Mabsadd m .97619 .52974 13.5 -6.96875 Mabsadd L .97619 .52974 13.5 6.96875 Mabsadd L .97619 .52974 -13.5 6.96875 Mabsadd L fill 0 g gsave .97619 .52974 -74.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 85.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.750 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .60332 -13.5 -6.96875 Mabsadd m .97619 .60332 13.5 -6.96875 Mabsadd L .97619 .60332 13.5 6.96875 Mabsadd L .97619 .60332 -13.5 6.96875 Mabsadd L fill 0 g gsave .97619 .60332 -74.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 85.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.750 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{576, 355.938}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgkooooo0_l0003ooooooa7ooooo000Wooooo`?o00005_ooool6o`000>[ooooo 0_l0003oooooo`oooooo000Zooooo`Co00006?ooool7o`000>Gooooo0_l0003oooooo`gooooo000^ ooooo`?o00007?ooool6o`000>7ooooo0ol0003oooooo`[ooooo000aooooo`?o00007oooool7o`00 0=gooooo0_l0003oooooo`Sooooo000dooooo`?o00008oooool6o`000=Wooooo0_l0003oooooo`Ko oooo000gooooo`?o00009_ooool7o`000=Cooooo0_l0003oooooo`Cooooo000jooooo`Co0000:Ooo ool6o`000=3ooooo0_l0003oooooo`;ooooo000nooooo`?o0000;?ooool7o`000<_ooooo0_l0003o ooooo`00@Oooool3o`00033ooooo1_l00037ooooo`;o0000oOooool004Cooooo0ol0000cooooo`Oo 0000`_ooool3o`000?[ooooo0017ooooo`?o0000=oooool6o`000;oooooo0_l0003hooooo`00B_oo ool4o`0003Wooooo1ol0002jooooo`;o0000m_ooool004kooooo0ol0000mooooo`Ko0000]_ooool2 o`000?Cooooo001Aooooo`?o0000@?ooool7o`000;7ooooo0_l0003booooo`00E?ooool3o`0004Co oooo1_l0002]ooooo`;o0000l?ooool005Oooooo0ol00017ooooo`Oo0000Z?ooool3o`000>gooooo 001Jooooo`Co0000B_ooool6o`000:Gooooo0_l0003[ooooo`00G_ooool3o`0004gooooo1ol0000= ooooo`03o`000?oooooooooo093ooooo0_l0003Yooooo`00HOooool3o`00057ooooo0_l00003oooo o`?o00001_ooool00ol0003oooooooooo`04ooooo`?o0000R_ooool2o`000>Oooooo001Tooooo`?o 0000E?ooool00ol0003oooooooooo`05ooooo`03o`000?oooooooooo00?ooooo00Go0000oooooooo ooooooooo`00002;ooooo`;o0000iOooool006Oooooo1?l0001@ooooo`03o`000?oooooooooo00Go oooo00?o0000ooooooooool01oooool00ol0003oooooooooo`2;ooooo`;o0000hoooool006_ooooo 0ol0001=ooooo`03o`000?oooooooooo00Kooooo00?o0000ooooooooool01?ooool2o`00093ooooo 0_l0003Qooooo`00K_ooool3o`0004[ooooo00?o0000ooooooooool01_ooool00ol0003ooooooooo o`06ooooo`04o`000?ooooooooooooooo`Co0000R_ooool3o`000=kooooo001aooooo`?o0000A_oo ool2o`0000Wooooo00Go0000ooooooooooooooooo`000003ooooo`03o`000?oooooooooo00Gooooo 1ol00026ooooo`;o0000g?ooool007Cooooo0ol00014ooooo`03o`000?oooooooooo00cooooo0ol0 000?ooooo`Ko0000P_ooool2o`000=[ooooo001gooooo`Co0000Ioooool7o`0007gooooo0_l0003H ooooo`00Noooool3o`0006_ooooo1_l0001iooooo`;o0000e_ooool007kooooo0ol0001^ooooo`Oo 0000M?ooool2o`000=Cooooo0021ooooo`?o0000L_ooool6o`00073ooooo0_l0003Booooo`00Q?oo ool3o`0007Gooooo1ol0001[ooooo`?o0000coooool008Oooooo1?l0001hooooo`Ko0000J?ooool2 o`000Sooooo0ol0001/ooooo`;o0000F?ooool2o`0008gooooo003[ooooo`?o0000Jooo ool2o`0005Sooooo0_l0002;ooooo`00k_ooool3o`0006[ooooo0_l0001Hooooo`?o0000R?ooool0 0?7ooooo1?l0001Xooooo`;o0000FOooool2o`0008Kooooo003eooooo`?o0000Ioooool3o`0005So oooo0_l00024ooooo`00n?ooool3o`0006Oooooo0_l0001Hooooo`;o0000P_ooool00?_ooooo0ol0 001Vooooo`;o0000F?ooool2o`00083ooooo003nooooo`?o0000IOooool2o`0005Sooooo0_l0001n ooooo`00ooooool2ooooo`Co0000Hoooool2o`0005Sooooo0_l0001looooo`00ooooool6ooooo`?o 0000H_ooool2o`0005Sooooo0ol0001iooooo`00ooooool9ooooo`?o0000HOooool2o`0005Wooooo 0_l0001gooooo`00oooooolooooo`00oooooollooooo`;o0000F_ooool2o`0005Wooooo 0_l0001ooooo`?o0000FOooool2o`00 05Gooooo003ooooooi7ooooo0_l0001Iooooo`;o0000Doooool00?ooooooToooool2o`0005Wooooo 0_l0001Aooooo`00oooooonEooooo`;o0000FOooool3o`0004kooooo003ooooooiOooooo0_l0001J ooooo`;o0000C?ooool00?ooooooVOooool2o`0005[ooooo0_l0001:ooooo`00oooooonKooooo`?o 0000FOooool2o`0004Sooooo003ooooooikooooo0_l0001Iooooo`;o0000A_ooool00?ooooooX?oo ool2o`0005Wooooo0_l00014ooooo`00oooooonRooooo`;o0000FOooool2o`0004;ooooo003ooooo ojCooooo0_l0001Iooooo`?o0000?oooool00?ooooooY_ooool2o`0005[ooooo0_l0000mooooo`00 oooooonXooooo`?o0000FOooool2o`0003_ooooo003ooooooj_ooooo0_l0001Iooooo`;o0000>Ooo ool00?oooooo[Oooool2o`0005Wooooo0_l0000gooooo`00oooooon_ooooo`;o0000FOooool2o`00 03Gooooo003ooooook7ooooo0_l0001Iooooo`?o0000<_ooool00?oooooo/oooool2o`0005[ooooo 0_l0000`ooooo`00ooooooneooooo`?o0000FOooool2o`0002kooooo003ooooookSooooo0_l0001I ooooo`;o0000;?ooool00?oooooo^_ooool2o`0005Wooooo0_l0000Zooooo`00oooooonlooooo`;o 0000FOooool2o`0002Sooooo003ooooookkooooo0_l0001Iooooo`;o00009_ooool00?oooooo`?oo ool2o`0005Wooooo0ol0000Sooooo`00ooooooo2ooooo`?o0000FOooool2o`00027ooooo003ooooo olGooooo0_l0001Iooooo`;o00007oooool00?ooooooaoooool2o`0005Wooooo0_l0000Mooooo`00 ooooooo9ooooo`;o0000FooooolHo`0000?ooooo003ooooool_ooooo0_l0001Iooooo`03o`000?oo oooooooo01Cooooo00?o0000ooooooooool00Oooool00?oooooocOooool2o`0005Oooooo00?o0000 ooooooooool05?ooool00ol0003oooooooooo`01ooooo`00ooooooo?ooooo`?o0000E?ooool00ol0 003oooooooooo`0Dooooo`03o`000?oooooooooo007ooooo003oooooom;ooooo0_l0001Booooo`03 o`000?oooooooooo00;ooooo1Ol00004ooooo`?o00001_ooool00ol0003oooooooooo`01ooooo`00 oooooooDooooo`;o0000D?ooool00ol0003oooooooooo`03ooooo`04o`000?ooooooooooo`0000Go oooo00?o0000ooooooooool01Oooool00ol0003oooooooooo`01ooooo`00oooooooFooooo`;o0000 C_ooool00ol0003oooooooooo`04ooooo`03o`000?oooooooooo00Gooooo00?o0000ooooooooool0 1Oooool00ol0003oooooooooo`01ooooo`00oooooooHooooo`;o0000C?ooool00ol0003ooooooooo o`05ooooo`03o`000?oooooooooo00Cooooo00?o0000ooooooooool01Oooool00ol0003ooooooooo o`01ooooo`00oooooooJooooo`;o0000B_ooool00ol0003oooooooooo`02ooooo`05o`000?oooooo ooooooooool000001Oooool00ol0003oooooooooo`05ooooo`03o`000?oooooooooo007ooooo003o ooooomcooooo0ol00017ooooo`03o`000?oooooooooo00;ooooo00Go0000ooooooooooooooooo`00 0004ooooo`;o00001oooool00ol0003oooooooooo`01ooooo`00oooooooOooooo`;o0000AOooool0 0ol0003oooooooooo`03ooooo`?o00001_ooool00ol0003oooooooooo`05ooooo`03o`000?oooooo oooo007ooooo003oooooon7ooooo0_l00013ooooo`03o`000?oooooooooo01Cooooo00?o0000oooo ooooool00Oooool00?oooooohoooool2o`00047ooooo6?l00003ooooo`00oooooooUooooo`;o0000 F_ooool00?ooooooioooool2o`0005Sooooo003oooooonWooooo0ol0001Eooooo`00ooooooo/oooo o`;o0000Doooool00?ooooook_ooool2o`00057ooooo003ooooooo3ooooo0_l0001?ooooo`00oooo ooobooooo`;o0000COooool00?oooooom?ooool2o`0004_ooooo003oooooooKooooo0ol00018oooo o`00oooooooiooooo`;o0000A_ooool00?oooooonoooool2o`0004Cooooo003ooooooogooooo0_l0 0012ooooo`00ooooooooooooo`;o0000@?ooool00?ooooooooooool2ooooo`;o0000?_ooool00?oo ooooooooool4ooooo`?o0000>oooool00?ooooooooooool7ooooo`;o0000>Oooool00?oooooooooo ool9ooooo`;o0000=oooool00?ooooooooooool;ooooo`;o0000=Oooool00?ooooooooooool=oooo o`;o0000"], ImageRangeCache->{{{0, 575}, {354.938, 0}} -> {1.97436, 1.79996, \ 0.00182832, 0.0236662}}] }, Open ]], Cell[BoxData[ \(stateBranch =. ; fructifiedNextStates =. ; strategyStateBranch =. ;\)], "Input"], Cell["\<\ \[Wolf] Shared state positions in fate tree and strategy must be \ consistent. \[WarningSign] Avoid reprinting combination boxes for every state \ branch. \ \>", "Text"], Cell[BoxData[{\(Clear@ strategyStateBranchGraphics;\), "\[IndentingNewLine]", \(Protect@ withProbabilities;\), "\[IndentingNewLine]", \(Options@ strategyStateBranchGraphics = {withProbabilities \[Rule] True};\), "\[IndentingNewLine]", RowBox[{\(strategyStateBranchGraphics[stateBranch_List, fructifiedNextStates_List, strategyStateBranch_List, options___]\), ":=", RowBox[{"With", "[", RowBox[{\({\[IndentingNewLine]d = Length@\(First@stateBranch\) + Length@stateBranch[\([\(-1\), 1, 1, \(-1\)]\)], f = stateBranch[\([\(-1\), \(-1\), 1, \(-1\), 1]\)], \[IndentingNewLine]j1 = fructifiedNextStates[\([1, \(-1\), 1, 1, 1]\)] - 1}\), ",", RowBox[{"With", "[", RowBox[{\({utility = Point[{#1, \(Position[allSubcombinations[d, f], #2]\)[\([1, 1]\)]}] &}\), ",", RowBox[{"Graphics", "@", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{\(\(withProbabilities /. \ {options}\) /. Options@strategyStateBranchGraphics\), ",", RowBox[{"labeledLine", "[", RowBox[{\({Sequence @@ #1, Sequence @@ Last@#2}\), ",", \(InputForm@\(First@#2\)\), ",", RowBox[{"cursor", "\[Rule]", RowBox[{\(1/8\), "+", RowBox[{\(3/4\), RowBox[{ StyleBox["Random", FontColor->RGBColor[1, 0, 0]], "[", "]"}]}]}]}]}], "]"}], ",", \(Line@{Sequence @@ #1, Sequence @@ Last@#2}\)}], "]"}], "&"}], "@@", "#"}], "&"}], "/@", \(Distribute[{utility[j1, First@stateBranch], First@#}, List]\)}], ",", \(MapThread[\(\(Line[{Sequence @@ #1, Sequence @@ #2}] &\) @@ ## &\) /@ Distribute[{Last@#1, #2}, List] &, #]\)}], "}"}], "&"}], "@", \({\(MapAt[utility[j1 + 1/2, #] &, First@#, \(-1\)] &\) /@ Last@stateBranch, \(\(#[\([\(-1\), 1]\)] &\) /@ Extract[fructifiedNextStates, #] &\) /@ Map[Last, Last /@ Last@strategyStateBranch, {2}]}\)}], ",", RowBox[{\(Text[combinationBox@#, Sequence @@ utility[j1 + 1, #], Background \[Rule] White] &\), "/@", RowBox[{ StyleBox["allSubcombinations", FontColor->RGBColor[1, 0, 0]], "[", \(d, f\), "]"}]}]}], "}"}]}]}], "]"}]}], "]"}]}]}], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(Show[#, TextStyle \[Rule] {FontSize \[Rule] 12}, ImageSize \[Rule] 8\ 72] &\)@ strategyStateBranchGraphics[{{1}, {{{1\/3, {1}}, {{{1, 1}, {1}}}}, {{1\/3, {2}}, {{{1, 2}, {2}}}}, {{1\/3, {3}}, {{{1, 3}, {3}}}}}}, {{{1, 1}, {Point[{3, 5}], {}}}, {{1, 2}, {Point[{3, 6}], {}}}, {{1, 3}, {Point[{3, 7}], {}}}, {{2, 2}, {Point[{3, 8}], {}}}, {{2, 3}, {Point[{3, 9}], {}}}, {{3, 3}, {Point[{3, 10}], {}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}}}];\)\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 %%ImageSize: 576 355.988 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -1.88095 0.952381 0.0147151 0.0588604 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g .5 Mabswid [ ] 0 setdash .02381 .13244 m .5 .13244 L s 1 g .36005 .13244 -14.9688 -7 Mabsadd m .36005 .13244 14.9688 -7 Mabsadd L .36005 .13244 14.9688 7 Mabsadd L .36005 .13244 -14.9688 7 Mabsadd L fill 0 g gsave .36005 .13244 -75.9688 -11 Mabsadd m 1 1 Mabs scale currentpoint translate 0 22 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 14.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 72.375 14.000 moveto (\\220) show 81.750 14.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore .02381 .13244 m .5 .1913 L s 1 g .41539 .18084 -14.9688 -7 Mabsadd m .41539 .18084 14.9688 -7 Mabsadd L .41539 .18084 14.9688 7 Mabsadd L .41539 .18084 -14.9688 7 Mabsadd L fill 0 g gsave .41539 .18084 -75.9688 -11 Mabsadd m 1 1 Mabs scale currentpoint translate 0 22 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 14.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 72.375 14.000 moveto (\\220) show 81.750 14.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore .02381 .13244 m .5 .25016 L s 1 g .34208 .21112 -14.9688 -7 Mabsadd m .34208 .21112 14.9688 -7 Mabsadd L .34208 .21112 14.9688 7 Mabsadd L .34208 .21112 -14.9688 7 Mabsadd L fill 0 g gsave .34208 .21112 -75.9688 -11 Mabsadd m 1 1 Mabs scale currentpoint translate 0 22 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 14.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 72.375 14.000 moveto (\\220) show 81.750 14.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 1.000 setlinewidth grestore .5 .13244 m .97619 .30902 L s .5 .1913 m .97619 .36788 L s .5 .25016 m .97619 .42674 L s 1 g .97619 .07358 -5.59375 -7 Mabsadd m .97619 .07358 5.59375 -7 Mabsadd L .97619 .07358 5.59375 7 Mabsadd L .97619 .07358 -5.59375 7 Mabsadd L fill 0 g gsave .97619 .07358 -66.5938 -11 Mabsadd m 1 1 Mabs scale currentpoint translate 0 22 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 63.000 14.000 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (\\306) show 1.000 setlinewidth grestore 1 g .97619 .13244 -11 -8 Mabsadd m .97619 .13244 11 -8 Mabsadd L .97619 .13244 11 8 Mabsadd L .97619 .13244 -11 8 Mabsadd L fill 0 g gsave .97619 .13244 -72 -12 Mabsadd m 1 1 Mabs scale currentpoint translate 0 24 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 68.562 15.875 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.438 setlinewidth 63.188 5.188 moveto 80.812 5.188 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 80.812 18.812 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 63.188 5.188 lineto stroke 0.438 setlinewidth 80.812 18.812 moveto 80.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .1913 -11 -8 Mabsadd m .97619 .1913 11 -8 Mabsadd L .97619 .1913 11 8 Mabsadd L .97619 .1913 -11 8 Mabsadd L fill 0 g gsave .97619 .1913 -72 -12 Mabsadd m 1 1 Mabs scale currentpoint translate 0 24 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 68.562 15.875 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.438 setlinewidth 63.188 5.188 moveto 80.812 5.188 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 80.812 18.812 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 63.188 5.188 lineto stroke 0.438 setlinewidth 80.812 18.812 moveto 80.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .25016 -11 -8.09375 Mabsadd m .97619 .25016 11 -8.09375 Mabsadd L .97619 .25016 11 8.09375 Mabsadd L .97619 .25016 -11 8.09375 Mabsadd L fill 0 g gsave .97619 .25016 -72 -12.0938 Mabsadd m 1 1 Mabs scale currentpoint translate 0 24.1875 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 68.562 15.875 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 0.000 0.000 0.000 setrgbcolor 0.438 setlinewidth 63.188 5.188 moveto 80.812 5.188 lineto stroke 0.438 setlinewidth 63.188 19.000 moveto 80.812 19.000 lineto stroke 0.438 setlinewidth 63.188 19.000 moveto 63.188 5.188 lineto stroke 0.438 setlinewidth 80.812 19.000 moveto 80.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .30902 -16 -8 Mabsadd m .97619 .30902 16 -8 Mabsadd L .97619 .30902 16 8 Mabsadd L .97619 .30902 -16 8 Mabsadd L fill 0 g gsave .97619 .30902 -77 -12 Mabsadd m 1 1 Mabs scale currentpoint translate 0 24 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 68.562 15.875 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 75.750 15.875 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 78.875 15.875 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.438 setlinewidth 63.188 5.188 moveto 90.812 5.188 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 90.812 18.812 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 63.188 5.188 lineto stroke 0.438 setlinewidth 90.812 18.812 moveto 90.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .36788 -16 -8 Mabsadd m .97619 .36788 16 -8 Mabsadd L .97619 .36788 16 8 Mabsadd L .97619 .36788 -16 8 Mabsadd L fill 0 g gsave .97619 .36788 -77 -12 Mabsadd m 1 1 Mabs scale currentpoint translate 0 24 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 68.562 15.875 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 75.750 15.875 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 78.875 15.875 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.438 setlinewidth 63.188 5.188 moveto 90.812 5.188 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 90.812 18.812 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 63.188 5.188 lineto stroke 0.438 setlinewidth 90.812 18.812 moveto 90.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .42674 -16 -8.09375 Mabsadd m .97619 .42674 16 -8.09375 Mabsadd L .97619 .42674 16 8.09375 Mabsadd L .97619 .42674 -16 8.09375 Mabsadd L fill 0 g gsave .97619 .42674 -77 -12.0938 Mabsadd m 1 1 Mabs scale currentpoint translate 0 24.1875 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 68.562 15.875 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 75.750 15.875 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 78.875 15.875 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.438 setlinewidth 63.188 5.188 moveto 90.812 5.188 lineto stroke 0.438 setlinewidth 63.188 19.000 moveto 90.812 19.000 lineto stroke 0.438 setlinewidth 63.188 19.000 moveto 63.188 5.188 lineto stroke 0.438 setlinewidth 90.812 19.000 moveto 90.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .4856 -16 -8 Mabsadd m .97619 .4856 16 -8 Mabsadd L .97619 .4856 16 8 Mabsadd L .97619 .4856 -16 8 Mabsadd L fill 0 g gsave .97619 .4856 -77 -12 Mabsadd m 1 1 Mabs scale currentpoint translate 0 24 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 68.562 15.875 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 75.750 15.875 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 78.875 15.875 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.438 setlinewidth 63.188 5.188 moveto 90.812 5.188 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 90.812 18.812 lineto stroke 0.438 setlinewidth 63.188 18.812 moveto 63.188 5.188 lineto stroke 0.438 setlinewidth 90.812 18.812 moveto 90.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .54446 -16 -8.09375 Mabsadd m .97619 .54446 16 -8.09375 Mabsadd L .97619 .54446 16 8.09375 Mabsadd L .97619 .54446 -16 8.09375 Mabsadd L fill 0 g gsave .97619 .54446 -77 -12.0938 Mabsadd m 1 1 Mabs scale currentpoint translate 0 24.1875 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 68.562 15.875 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 75.750 15.875 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 78.875 15.875 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.438 setlinewidth 63.188 5.188 moveto 90.812 5.188 lineto stroke 0.438 setlinewidth 63.188 19.000 moveto 90.812 19.000 lineto stroke 0.438 setlinewidth 63.188 19.000 moveto 63.188 5.188 lineto stroke 0.438 setlinewidth 90.812 19.000 moveto 90.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .60332 -16 -8.09375 Mabsadd m .97619 .60332 16 -8.09375 Mabsadd L .97619 .60332 16 8.09375 Mabsadd L .97619 .60332 -16 8.09375 Mabsadd L fill 0 g gsave .97619 .60332 -77 -12.0938 Mabsadd m 1 1 Mabs scale currentpoint translate 0 24.1875 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 68.562 15.875 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 75.750 15.875 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 78.875 15.875 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 0.000 0.000 0.000 setrgbcolor 0.438 setlinewidth 63.188 5.188 moveto 90.812 5.188 lineto stroke 0.438 setlinewidth 63.188 19.000 moveto 90.812 19.000 lineto stroke 0.438 setlinewidth 63.188 19.000 moveto 63.188 5.188 lineto stroke 0.438 setlinewidth 90.812 19.000 moveto 90.812 5.188 lineto stroke 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{576, 355.938}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgooooo`00oooooooo oooooc7ooooo00CoEEEEoa0@4?lbGooooo0_l0003oooooo`gooooo000^ooooo`Co 00006oooool8o`000=oooooo0ol0003oooooo`[ooooo000booooo`Co00007oooool9o`000=Wooooo 0ol0003oooooo`Oooooo000fooooo`Co00009?ooool8o`000=Cooooo0_l0003oooooo`Gooooo000j ooooo`Co0000:?ooool8o`000Oooool8o`000;Sooooo0ol0 003fooooo`00C_ooool4o`0003gooooo2Ol0002booooo`?o0000loooool005;ooooo1?l00012oooo o`So0000[Oooool2o`000?7ooooo001Fooooo`Co0000A_ooool8o`000:Oooooo0ol0003^ooooo`00 F_ooool4o`0004[ooooo2?l0002Rooooo`?o0000joooool005kooooo1Ol0001=ooooo`Wo0000W?oo ool2o`000>Wooooo001Sooooo`Co0000D_ooool8o`0009Kooooo0ol0003Vooooo`00Ioooool4o`00 05Kooooo2?l0002Aooooo`?o0000hoooool006_ooooo1?l0001Jooooo`So0000S?ooool3o`000>3o oooo001_ooooo`Co0000G_ooool9o`0001;ooooo00?o8B4QomgMgOooool0LOooool2o`000=kooooo 001cooooo`Co0000Hoooool5o`0000?ooooo1Ol00005ooooo`03oiRHV?mEEEGooooo00Oooooo0ol0 001Yooooo`?o0000foooool007Oooooo1?l0001Yooooo`03o`000?oooooooooo00Kooooo00?o0000 omgMgOooool01Oooool01Ol0003ooooooooooooooooo000006_ooooo0ol0003Hooooo`00Noooool4 o`0006Gooooo00?o0000ooooooooool01_ooool2ogMgM`[ooooo00?o0000ooooooooool0K?ooool2 o`000;kooooo4_l00006ooooo`00Ooooool4o`00067ooooo00?o0000ooooooooool01_ooool00oo^ k^ko410@onk^kP09ooooo`03o`000?oooooooooo06kooooo0ol0002kooooo`03o`000?oooooooooo 00kooooo00?o0000ooooooooool01?ooool008?ooooo1?l0001Mooooo`03o`000?oooooooooo00Oo oooo00?oEEEEoiRHV?ooool01_ooool2o`0000Cooooo1_l0001Zooooo`?o0000^?ooool00ol0003o ooooooooo`0>ooooo`03o`000?oooooooooo00Cooooo0027ooooo`Co0000Eoooool00ol0003ooooo o`000009ooooo`03omgMgOl@413ooooo00Sooooo00?o0000ooooooooool01oooool8o`0006Gooooo 0_l0002fooooo`03o`000?oooooooooo00kooooo00?o0000ooooooooool01?ooool008_ooooo1?l0 001Dooooo`;o00002_ooool00omEEEGoV9RHooooo`03ooooo`05o`000?ooooooooooooooool00000 4Oooool9o`0005kooooo0ol0002cooooo`03o`000?oooooooooo00?ooooo1Ol00006ooooo`03o`00 0?oooooooooo00Cooooo002?ooooo`Co0000DOooool00ol0003oooooooooo`08ooooo`03okZj^_m4 A4Cooooo00Cooooo0ol0000Kooooo`So0000FOooool3o`000;3ooooo00?o0000ooooooooool00ooo ool01Ol0003ooooooooooooooooo000000Kooooo00?o0000ooooooooool01?ooool009?ooooo1Ol0 0024ooooo`Go0000Eoooool3o`000:gooooo00?o0000ooooooooool01?ooool00ol0003ooooooooo o`07ooooo`03o`000?oooooooooo00Cooooo002Hooooo`Co0000QOooool3o`0005Oooooo0_l0002[ ooooo`03o`000?oooooooooo00Gooooo00?o0000ooooooooool01_ooool00ol0003oooooooooo`04 ooooo`00W?ooool4o`0008Cooooo0ol0001Fooooo`?o0000Z?ooool00ol0003oooooooooo`06oooo o`03o`000?oooooooooo00Gooooo00?o0000ooooooooool01?ooool00:3ooooo1?l00023ooooo`;o 0000Eoooool3o`000:Gooooo00?o0000ooooooooool01oooool00ol0003oooooooooo`04ooooo`03 o`000?oooooooooo00Cooooo002Tooooo`Co0000POooool3o`0005Oooooo0_l0002Sooooo`03o`00 0?oooooooooo00?ooooo00Go0000ooooooooooooooooo`000006ooooo`03o`000?oooooooooo00Co oooo002Xooooo`Co0000P?ooool3o`0005Kooooo0ol0002Pooooo`03o`000?oooooooooo00Cooooo 0ol00007ooooo`03o`000?oooooooooo00Cooooo002/ooooo`Co0000Ooooool2o`0005Oooooo0ol0 002Mooooo`03o`000?oooooooooo00kooooo00?o0000ooooooooool01?ooool00;3ooooo1?l0001m ooooo`?o0000Eoooool2o`0009_ooooo4_l00006ooooo`00]?ooool00ol0003oooooooooo`1moooo o`?o0000E_ooool3o`000;3ooooo0032ooooo`03ob4Q8OoMgMgooooo07;ooooo0_l0001Gooooo`?o 0000[Oooool00;Sooooo1Ol00005ooooo`03oiRHV?mEEEGooooo00Oooooo0ol0001Zooooo`?o0000 Eoooool3o`000:[ooooo002jooooo`03o`000?oooooooooo00Kooooo00?o0000omgMgOooool01Ooo ool01Ol0003ooooooooooooooooo000006cooooo0ol0001Gooooo`;o0000Z?ooool00;[ooooo00?o 0000ooooooooool01_ooool2ogMgM`[ooooo00?o0000ooooooooool0KOooool2o`0005Oooooo0ol0 002Uooooo`00^_ooool00ol0003oooooooooo`06ooooo`03onk^k_l@413ok^k^00Wooooo00?o0000 ooooooooool0Koooool3o`0005Oooooo0ol0002Rooooo`00^_ooool00ol0003oooooooooo`07oooo o`03oeEEEOnHV9Sooooo00Kooooo0_l0001eooooo`?o0000Eoooool2o`000:3ooooo002hooooo`03 o`000?oooooo000000Wooooo00?ogMgMoa0@4?ooool02?ooool01?l0003oooooooooooooool2o`00 07;ooooo0_l0001Gooooo`?o0000WOooool00;Wooooo0_l0000:ooooo`03oeEEEOnHV9Sooooo00?o oooo00Go0000ooooooooooooooooo`000005ooooo`Co0000L?ooool3o`0005Oooooo0ol0002Joooo o`00^_ooool00ol0003oooooooooo`08ooooo`03okZj^_m4A4Cooooo00Cooooo0ol0000:ooooo`Co 0000Koooool3o`0005Oooooo0ol0002Gooooo`00gOooool4o`0006kooooo0ol0001Gooooo`;o0000 UOooool00>7ooooo1?l0001]ooooo`;o0000Eoooool3o`0009;ooooo003Uooooo`Co0000Joooool3 o`0005Oooooo0ol0002?ooooo`00jOooool4o`0006[ooooo0ol0001Gooooo`;o0000SOooool00>go oooo1?l0001Yooooo`;o0000Eoooool3o`0008[ooooo003aooooo`Co0000Ioooool3o`0005Oooooo 0ol00027ooooo`00mOooool4o`0006Kooooo0ol0001Gooooo`;o0000QOooool00?Wooooo1?l0001U ooooo`;o0000Eoooool3o`0008;ooooo003mooooo`Co0000Hoooool3o`0005Oooooo0ol0001ooooo o`00ooooool2ooooo`Go0000HOooool3o`0005Oooooo0ol0001Toooooa;o00001_ooool00?oooooo 1oooool4o`00063ooooo0_l0001Hooooo`;o0000H_ooool00ol0003oooooooooo`0>ooooo`03o`00 0?oooooooooo00Cooooo003oooooo`_ooooo1?l0001Nooooo`?o0000Eoooool3o`0005oooooo00?o 0000ooooooooool03_ooool00ol0003oooooooooo`04ooooo`00ooooool?ooooo`Co0000GOooool3 o`0005Oooooo0ol0001Looooo`03o`000?oooooooooo00kooooo00?o0000ooooooooool01?ooool0 0?oooooo4oooool4o`0005cooooo0_l0001Hooooo`;o0000F_ooool00ol0003oooooooooo`04oooo o`?o00001oooool00ol0003oooooooooo`04ooooo`00oooooolGooooo`Co0000F_ooool3o`0005Oo oooo0ol0001Gooooo`03o`000?oooooooooo00?ooooo00Go0000ooooooooooooooooo`000006oooo o`03o`000?oooooooooo00Cooooo003ooooooa_ooooo1?l0001Iooooo`?o0000Eoooool3o`0005Co oooo00?o0000ooooooooool01oooool00ol0003oooooooooo`04ooooo`03o`000?oooooooooo00Co oooo003ooooooaoooooo0ol0001Iooooo`;o0000F?ooool2o`0005;ooooo00?o0000ooooooooool0 1oooool00ol0003oooooooooo`04ooooo`03o`000?oooooooooo00Cooooo003oooooob;ooooo0ol0 001Hooooo`?o0000Eoooool3o`0004oooooo00?o0000ooooooooool01Oooool2o`0000Oooooo00?o 0000ooooooooool01?ooool00?oooooo9Oooool3o`0005Sooooo0ol0001Gooooo`?o0000C?ooool0 0ol0003oooooooooo`07ooooo`03o`000?oooooooooo00Cooooo00?o0000ooooooooool01?ooool0 0?oooooo:?ooool2o`0005Wooooo0_l0001Hooooo`?o0000BOooool00ol0003oooooooooo`03oooo o`05o`000?ooooooooooooooool000001_ooool00ol0003oooooooooo`04ooooo`00oooooolZoooo o`?o0000F?ooool3o`0005Sooooo0_l00017ooooo`03o`000?oooooooooo00Cooooo0ol00007oooo o`03o`000?oooooooooo00Cooooo003oooooobgooooo0ol0001Hooooo`?o0000Eoooool3o`0004Co oooo00?o0000ooooooooool03_ooool00ol0003oooooooooo`04ooooo`00ooooool`ooooo`;o0000 FOooool2o`0005Sooooo0ol00011ooooo`03o`000?oooooooooo00kooooo00?o0000ooooooooool0 1?ooool00?oooooo<_ooool3o`0005Sooooo0ol0001Hooooo`;o0000?ooooolBo`0000Kooooo003o ooooocGooooo0ol0001Hooooo`?o0000Eoooool3o`0005Cooooo003oooooocSooooo0_l0001Ioooo o`;o0000F?ooool3o`00057ooooo003ooooooc[ooooo0ol0001Hooooo`?o0000F?ooool2o`0004oo oooo003oooooocgooooo0ol0001Hooooo`?o0000Eoooool3o`0004cooooo003ooooood3ooooo0_l0 001Iooooo`;o0000F?ooool3o`0004Wooooo003ooooood;ooooo0ol0001Hooooo`?o0000F?ooool3 o`0004Kooooo003oooooodGooooo0ol0001Hooooo`?o0000F?ooool2o`0004Cooooo003oooooodSo oooo0_l0001Iooooo`;o0000F?ooool3o`00047ooooo003ooooood[ooooo0ol0001Hooooo`?o0000 F?ooool3o`0003kooooo003oooooodgooooo0ol0001Hooooo`?o0000F?ooool2o`0003cooooo003o oooooe3ooooo0ol0001Hooooo`?o0000Eoooool3o`0003Wooooo003ooooooe?ooooo0_l0001Ioooo o`;o0000F?ooool3o`0003Kooooo003ooooooeGooooo0ol0001Hooooo`?o0000F?ooool3o`0003?o oooo003ooooooeSooooo0ol0001Hooooo`?o0000F?ooool2o`00037ooooo003ooooooe_ooooo0_l0 001Iooooo`;o0000F?ooool3o`0002kooooo003ooooooegooooo0ol0001Hooooo`?o0000F?ooool3 o`0002_ooooo003oooooof3ooooo0ol0001Hooooo`?o0000F?ooool2o`0002Wooooo003oooooof?o oooo0_l0001Iooooo`;o0000F?ooool3o`0002Kooooo003oooooofGooooo0ol0001Hooooo`?o0000 F?ooool3o`0002?ooooo003oooooofSooooo0ol0001Hooooo`?o0000F?ooool2o`0000Cooooo7?l0 0001ooooo`00oooooom[ooooo`;o0000FOooool2o`0005Sooooo00Go0000ooooooooooooooooo`00 000Jooooo`7o00000Oooool00?ooooooKOooool3o`0005Sooooo0ol0001Iooooo`03o`000?oooooo oooo01Sooooo0Ol00001ooooo`00oooooom`ooooo`?o0000F?ooool3o`0005Kooooo00?o0000oooo ooooool06?ooool1o`00007ooooo003oooooog?ooooo0_l0001Iooooo`;o0000E?ooool00ol0003o ooooooooo`03ooooo`Go00001Oooool5o`0000Kooooo0Ol00001ooooo`00oooooomeooooo`?o0000 F?ooool3o`00057ooooo00?o0000ooooooooool01Oooool00ol0003oooooooooo`07ooooo`03o`00 0?oooooooooo00Kooooo0Ol00001ooooo`00oooooomhooooo`?o0000F?ooool3o`0004kooooo00?o 0000ooooooooool01Oooool00ol0003oooooooooo`07ooooo`03o`000?oooooooooo00Kooooo0Ol0 0001ooooo`00oooooomkooooo`;o0000FOooool2o`0004cooooo00?o0000ooooooooool01Oooool0 0ol0003oooooooooo`07ooooo`03o`000?oooooooooo00Kooooo0Ol00001ooooo`00oooooommoooo o`?o0000F?ooool3o`0004Wooooo00?o0000ooooooooool01Oooool00ol0003oooooooooo`07oooo o`03o`000?oooooooooo00Kooooo0Ol00001ooooo`00oooooon0ooooo`?o0000F?ooool3o`0004Ko oooo00?o0000ooooooooool00oooool00ol0003oooooo`000007ooooo`03o`000?oooooo000000So oooo0Ol00001ooooo`00oooooon3ooooo`;o0000FOooool2o`0004Cooooo00?o0000ooooooooool0 1?ooool2o`0000Sooooo0_l00008ooooo`7o00000Oooool00?ooooooQOooool3o`0005Sooooo0ol0 0011ooooo`03o`000?oooooooooo00Gooooo00?o0000ooooooooool01oooool00ol0003ooooooooo o`06ooooo`7o00000Oooool00?ooooooR?ooool3o`0005Sooooo0ol0000nooooo`03o`000?oooooo oooo01Sooooo0Ol00001ooooo`00oooooon;ooooo`;o0000FOooool2o`0003cooooo00?o0000oooo ooooool06?ooool1o`00007ooooo003oooooohgooooo0ol0001Hooooo`?o0000>OoooolLo`00007o oooo003ooooooi3ooooo0ol0001Hooooo`?o0000Doooool00?ooooooToooool2o`0005Wooooo0_l0 001Aooooo`00oooooonEooooo`?o0000F?ooool3o`0004kooooo003ooooooiSooooo0ol0001Hoooo o`?o0000Boooool00?ooooooVoooool2o`0005Wooooo0_l00019ooooo`00oooooonMooooo`?o0000 F?ooool3o`0004Kooooo003ooooooj3ooooo0ol0001Hooooo`?o0000@oooool00?ooooooXoooool2 o`0005Wooooo0_l00011ooooo`00oooooonUooooo`?o0000F?ooool3o`0003kooooo003oooooojSo oooo0ol0001Hooooo`?o0000>oooool00?ooooooZoooool3o`0005Sooooo0ol0000hooooo`00oooo oon^ooooo`;o0000FOooool2o`0003Kooooo003ooooook3ooooo0ol0001Hooooo`?o0000ooooo`03o`000?oooooooooo00Co oooo00?o0000ooooooooool02?ooool00ol0003oooooooooo`06ooooo`7o00000Oooool00?oooooo e_ooool2o`0004cooooo00?o0000ooooooooool01Oooool00ol0003oooooooooo`07ooooo`03o`00 0?oooooooooo00Kooooo0Ol00001ooooo`00oooooooHooooo`?o0000BOooool00ol0003ooooooooo o`06ooooo`03o`000?oooooooooo00Kooooo00?o0000ooooooooool01_ooool1o`00007ooooo003o ooooom_ooooo0ol00016ooooo`03o`000?oooooooooo00Oooooo00?o0000ooooooooool00oooool0 0ol0003oooooo`000008ooooo`7o00000Oooool00?oooooog_ooool2o`0004Cooooo00?o0000oooo ooooool00oooool01Ol0003ooooooooooooooooo000000Kooooo0_l00008ooooo`7o00000Oooool0 0?ooooooh?ooool3o`00047ooooo00?o0000ooooooooool01?ooool3o`0000Sooooo00?o0000oooo ooooool01_ooool1o`00007ooooo003oooooon?ooooo0ol0000nooooo`03o`000?oooooooooo01So oooo0Ol00001ooooo`00oooooooVooooo`;o0000??ooool00ol0003oooooooooo`0Hooooo`7o0000 0Oooool00?ooooooj?ooool3o`0003Wooooo7?l00001ooooo`00ooooooo[ooooo`?o0000Doooool0 0?ooooook_ooool2o`00057ooooo003ooooooo3ooooo0ol0001>ooooo`00ooooooocooooo`?o0000 Boooool00?oooooom_ooool2o`0004Wooooo003oooooooSooooo0ol00016ooooo`00oooooookoooo o`?o0000@oooool00?ooooooo_ooool2o`00047ooooo003ooooooooooooo0Oooool3o`0003kooooo 003ooooooooooooo1?ooool3o`0003_ooooo003ooooooooooooo1oooool3o`0003Sooooo003ooooo oooooooo2_ooool2o`0003Kooooo003ooooooooooooo3?ooool3o`0003?ooooo003ooooooooooooo 3oooool3o`00033ooooo003ooooooooooooo4_ooool2o`0002kooooo003ooooooooooooo5?ooool3 o`0002_ooooo003ooooooooooooo5oooool3o`0002Sooooo003ooooooooooooo6_ooool2o`0002Ko oooo003ooooooooooooo7?ooool3o`0002?ooooo003ooooooooooooo7oooool3o`0000?ooooo7?l0 0001ooooo`00ooooooooooooobGooooo00?o0000ooooooooool06?ooool1o`00007ooooo003ooooo oooooooo9Oooool00ol0003oooooooooo`0Hooooo`7o00000Oooool00?oooooooooooolUooooo`03 o`000?oooooooooo01Sooooo0Ol00001ooooo`00ooooooooooooobGooooo00?o0000ooooooooool0 1?ooool3o`0000Kooooo1Ol00006ooooo`7o00000Oooool00?oooooooooooolUooooo`03o`000?oo oooooooo00?ooooo00Go0000ooooooooooooooooo`000007ooooo`03o`000?oooooooooo00Kooooo 0Ol00001ooooo`00ooooooooooooobGooooo00?o0000ooooooooool01oooool00ol0003ooooooooo o`05ooooo`03o`000?oooooooooo00Kooooo0Ol00001ooooo`00ooooooooooooobGooooo00?o0000 ooooooooool01oooool00ol0003oooooooooo`05ooooo`03o`000?oooooooooo00Kooooo0Ol00001 ooooo`00ooooooooooooobGooooo00?o0000ooooooooool01Oooool2o`0000Sooooo00?o0000oooo ooooool01_ooool1o`00007ooooo003ooooooooooooo9Oooool00ol0003oooooooooo`07ooooo`03 o`000?oooooooooo00?ooooo00?o0000ooooool000002?ooool1o`00007ooooo003ooooooooooooo 9Oooool00ol0003oooooooooo`03ooooo`05o`000?ooooooooooooooool000001_ooool2o`0000So oooo0Ol00001ooooo`00ooooooooooooobGooooo00?o0000ooooooooool01?ooool3o`0000Sooooo 00?o0000ooooooooool01_ooool1o`00007ooooo003ooooooooooooo9Oooool00ol0003ooooooooo o`0Hooooo`7o00000Oooool00?oooooooooooolUooooo`03o`000?oooooooooo01Sooooo0Ol00001 ooooo`00ooooooooooooobGooooo7?l00001ooooo`00oooooooooooood;ooooo003ooooooooooooo @_ooool00?oooooooooooom2ooooo`00oooooooooooood;ooooo003ooooooooooooo@_ooool00?oo oooooooooom2ooooo`00oooooooooooood;ooooo003ooooooooooooo@_ooool00?oooooooooooom2 ooooo`00oooooooooooood;ooooo003ooooooooooooo@_ooool00?oooooooooooom2ooooo`00oooo oooooooood;ooooo003ooooooooooooo@_ooool00?oooooooooooom2ooooo`00oooooooooooood;o oooo003ooooooooooooo@_ooool00?oooooooooooom2ooooo`00oooooooooooood;ooooo003ooooo oooooooo9OoooolLo`00007ooooo003ooooooooooooo9Oooool00ol0003oooooooooo`0Hooooo`7o 00000Oooool00?oooooooooooolUooooo`03o`000?oooooooooo01Sooooo0Ol00001ooooo`00oooo ooooooooobGooooo00?o0000ooooooooool06?ooool1o`00007ooooo003ooooooooooooo9Oooool0 0ol0003oooooooooo`03ooooo`Go00001Oooool5o`0000Kooooo0Ol00001ooooo`00oooooooooooo obGooooo00?o0000ooooooooool00oooool01Ol0003ooooooooooooooooo000000Gooooo00Go0000 ooooooooooooooooo`000006ooooo`7o00000Oooool00?oooooooooooolUooooo`03o`000?oooooo oooo00Cooooo00?o0000ooooooooool01oooool00ol0003oooooooooo`07ooooo`7o00000Oooool0 0?oooooooooooolUooooo`03o`000?oooooooooo00Gooooo00?o0000ooooooooool01oooool00ol0 003oooooooooo`06ooooo`7o00000Oooool00?oooooooooooolUooooo`03o`000?oooooooooo00Ko oooo00?o0000ooooooooool01oooool00ol0003oooooooooo`05ooooo`7o00000Oooool00?oooooo oooooolUooooo`03o`000?oooooooooo00Oooooo00?o0000ooooooooool01oooool00ol0003ooooo ooooo`04ooooo`7o00000Oooool00?oooooooooooolUooooo`03o`000?oooooooooo00?ooooo00Go 0000ooooooooooooooooo`000005ooooo`05o`000?ooooooooooooooool000001_ooool1o`00007o oooo003ooooooooooooo9Oooool00ol0003oooooooooo`04ooooo`?o00001oooool3o`0000Oooooo 0Ol00001ooooo`00ooooooooooooobGooooo00?o0000ooooooooool06?ooool1o`00007ooooo003o oooooooooooo9OoooolLo`00007ooooo003ooooooooooooo@_ooool00?oooooooooooom2ooooo`00 oooooooooooood;ooooo003ooooooooooooo@_ooool00?oooooooooooom2ooooo`00oooooooooooo od;ooooo003ooooooooooooo@_ooool00?oooooooooooom2ooooo`00oooooooooooood;ooooo003o oooooooooooo@_ooool00?oooooooooooom2ooooo`00oooooooooooood;ooooo003ooooooooooooo @_ooool00?oooooooooooom2ooooo`00oooooooooooood;ooooo003ooooooooooooo@_ooool00?oo oooooooooom2ooooo`00oooooooooooood;ooooo003ooooooooooooo@_ooool00?oooooooooooolU oooooaco00000Oooool00?oooooooooooolUooooo`03o`000?oooooooooo01Sooooo0Ol00001oooo o`00ooooooooooooobGooooo00?o0000ooooooooool06?ooool1o`00007ooooo003ooooooooooooo 9Oooool00ol0003oooooooooo`0Hooooo`7o00000Oooool00?oooooooooooolUooooo`03o`000?oo oooooooo00Cooooo0ol00006ooooo`Go00001_ooool1o`00007ooooo003ooooooooooooo9Oooool0 0ol0003oooooooooo`03ooooo`05o`000?ooooooooooooooool000001Oooool01Ol0003ooooooooo oooooooo000000Kooooo0Ol00001ooooo`00ooooooooooooobGooooo00?o0000ooooooooool01ooo ool00ol0003oooooooooo`04ooooo`03o`000?oooooooooo00Oooooo0Ol00001ooooo`00oooooooo ooooobGooooo00?o0000ooooooooool01oooool00ol0003oooooooooo`05ooooo`03o`000?oooooo oooo00Kooooo0Ol00001ooooo`00ooooooooooooobGooooo00?o0000ooooooooool01Oooool2o`00 00Wooooo00?o0000ooooooooool01Oooool1o`00007ooooo003ooooooooooooo9Oooool00ol0003o ooooooooo`07ooooo`03o`000?oooooooooo00Oooooo00?o0000ooooooooool01?ooool1o`00007o oooo003ooooooooooooo9Oooool00ol0003oooooooooo`03ooooo`05o`000?ooooooooooooooool0 00001Oooool01Ol0003ooooooooooooooooo000000Kooooo0Ol00001ooooo`00ooooooooooooobGo oooo00?o0000ooooooooool01?ooool3o`0000Oooooo0ol00007ooooo`7o00000Oooool00?oooooo oooooolUooooo`03o`000?oooooooooo01Sooooo0Ol00001ooooo`00ooooooooooooobGooooo00?o 0000ooooooooool06?ooool1o`00007ooooo003ooooooooooooo9OoooolLo`00007ooooo003ooooo oooooooo@_ooool00?oooooooooooom2ooooo`00oooooooooooood;ooooo003ooooooooooooo@_oo ool00?oooooooooooom2ooooo`00oooooooooooood;ooooo003ooooooooooooo@_ooool00?oooooo oooooom2ooooo`00oooooooooooood;ooooo003ooooooooooooo@_ooool00?oooooooooooom2oooo o`00oooooooooooood;ooooo003ooooooooooooo@_ooool00?oooooooooooom2ooooo`00oooooooo oooood;ooooo003ooooooooooooo@_ooool00?oooooooooooom2ooooo`00oooooooooooood;ooooo 003ooooooooooooo@_ooool00?oooooooooooolUoooooaco00000Oooool00?oooooooooooolUoooo o`03o`000?oooooooooo01Sooooo0Ol00001ooooo`00ooooooooooooobGooooo00?o0000oooooooo ool06?ooool1o`00007ooooo003ooooooooooooo9Oooool00ol0003oooooooooo`0Hooooo`7o0000 0Oooool00?oooooooooooolUooooo`03o`000?oooooooooo00Cooooo0ol00007ooooo`?o00001ooo ool1o`00007ooooo003ooooooooooooo9Oooool00ol0003oooooooooo`03ooooo`05o`000?oooooo ooooooooool000001Oooool01Ol0003ooooooooooooooooo000000Kooooo0Ol00001ooooo`00oooo ooooooooobGooooo00?o0000ooooooooool01oooool00ol0003oooooooooo`07ooooo`03o`000?oo oooooooo00Cooooo0Ol00001ooooo`00ooooooooooooobGooooo00?o0000ooooooooool01oooool0 0ol0003oooooooooo`07ooooo`03o`000?oooooooooo00Cooooo0Ol00001ooooo`00oooooooooooo obGooooo00?o0000ooooooooool01Oooool2o`0000Sooooo0_l00007ooooo`7o00000Oooool00?oo oooooooooolUooooo`03o`000?oooooooooo00Oooooo00?o0000ooooooooool01oooool00ol0003o ooooooooo`04ooooo`7o00000Oooool00?oooooooooooolUooooo`03o`000?oooooooooo00?ooooo 00Go0000ooooooooooooooooo`000005ooooo`05o`000?ooooooooooooooool000001_ooool1o`00 007ooooo003ooooooooooooo9Oooool00ol0003oooooooooo`04ooooo`?o00001oooool3o`0000Oo oooo0Ol00001ooooo`00ooooooooooooobGooooo00?o0000ooooooooool06?ooool1o`00007ooooo 003ooooooooooooo9Oooool00ol0003oooooooooo`0Hooooo`7o00000Oooool00?oooooooooooolU oooooaco00000Oooool00?oooooooooooom2ooooo`00\ \>"], ImageRangeCache->{{{0, 575}, {354.938, 0}} -> {1.97436, -0.250053, \ 0.00182832, 0.0295828}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(Show[#, ImageSize \[Rule] 8\ 72] &\)@\n strategyStateBranchGraphics[{{1}, {{{1\/3, {1}}, {{{1}, {2}}, {{1, 1}, {5}}}}, {{1\/3, {2}}, {{{1}, {2}}, {{1, 2}, {6}}}}, {{1\/3, {3}}, {{{1}, {2}}, {{1, 3}, {7}}}}}}, {{{}, {Point[{2, 1}]}}, {{1}, {Point[{2, 2}]}}, {{2}, {Point[{2, 3}]}}, {{3}, {Point[{2, 4}]}}, {{1, 1}, {Point[{2, 5}]}}, {{1, 2}, {Point[{2, 6}]}}, {{1, 3}, {Point[{2, 7}]}}, {{2, 2}, {Point[{2, 8}]}}, {{2, 3}, {Point[{2, 9}]}}, {{3, 3}, {Point[{2, 10}]}}}, {{1}, {{{1}, {{{1}, {2}}, {{1, 1}, {5}}}}, {{2}, {{{1}, {2}}, {{1, 2}, {6}}}}, {{3}, {{{1}, {2}}, {{1, 3}, {7}}}}}}, withProbabilities \[Rule] False];\)\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 %%ImageSize: 576 355.988 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -0.928571 0.952381 0.0147151 0.0588604 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g .5 Mabswid [ ] 0 setdash .02381 .13244 m .5 .13244 L s .02381 .13244 m .5 .1913 L s .02381 .13244 m .5 .25016 L s .5 .13244 m .97619 .13244 L s .5 .13244 m .97619 .30902 L s .5 .1913 m .97619 .13244 L s .5 .1913 m .97619 .36788 L s .5 .25016 m .97619 .13244 L s .5 .25016 m .97619 .42674 L s 1 g .97619 .07358 -5 -6 Mabsadd m .97619 .07358 5 -6 Mabsadd L .97619 .07358 5 6 Mabsadd L .97619 .07358 -5 6 Mabsadd L fill 0 g gsave .97619 .07358 -66 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 63.000 13.000 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (\\306) show 1.000 setlinewidth grestore 1 g .97619 .13244 -9.5 -6.875 Mabsadd m .97619 .13244 9.5 -6.875 Mabsadd L .97619 .13244 9.5 6.875 Mabsadd L .97619 .13244 -9.5 6.875 Mabsadd L fill 0 g gsave .97619 .13244 -70.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 77.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 77.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 77.812 16.562 moveto 77.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .1913 -9.5 -6.875 Mabsadd m .97619 .1913 9.5 -6.875 Mabsadd L .97619 .1913 9.5 6.875 Mabsadd L .97619 .1913 -9.5 6.875 Mabsadd L fill 0 g gsave .97619 .1913 -70.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 77.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 77.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 77.812 16.562 moveto 77.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .25016 -9.5 -6.96875 Mabsadd m .97619 .25016 9.5 -6.96875 Mabsadd L .97619 .25016 9.5 6.96875 Mabsadd L .97619 .25016 -9.5 6.96875 Mabsadd L fill 0 g gsave .97619 .25016 -70.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 77.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 77.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 77.812 16.750 moveto 77.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .30902 -13.5 -6.875 Mabsadd m .97619 .30902 13.5 -6.875 Mabsadd L .97619 .30902 13.5 6.875 Mabsadd L .97619 .30902 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .30902 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .36788 -13.5 -6.875 Mabsadd m .97619 .36788 13.5 -6.875 Mabsadd L .97619 .36788 13.5 6.875 Mabsadd L .97619 .36788 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .36788 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .42674 -13.5 -6.96875 Mabsadd m .97619 .42674 13.5 -6.96875 Mabsadd L .97619 .42674 13.5 6.96875 Mabsadd L .97619 .42674 -13.5 6.96875 Mabsadd L fill 0 g gsave .97619 .42674 -74.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 85.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.750 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .4856 -13.5 -6.875 Mabsadd m .97619 .4856 13.5 -6.875 Mabsadd L .97619 .4856 13.5 6.875 Mabsadd L .97619 .4856 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .4856 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .54446 -13.5 -6.96875 Mabsadd m .97619 .54446 13.5 -6.96875 Mabsadd L .97619 .54446 13.5 6.96875 Mabsadd L .97619 .54446 -13.5 6.96875 Mabsadd L fill 0 g gsave .97619 .54446 -74.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 85.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.750 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .60332 -13.5 -6.96875 Mabsadd m .97619 .60332 13.5 -6.96875 Mabsadd L .97619 .60332 13.5 6.96875 Mabsadd L .97619 .60332 -13.5 6.96875 Mabsadd L fill 0 g gsave .97619 .60332 -74.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 85.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.750 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{576, 355.938}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgoooooooo0000ool0000Ko`0000;ooooo00?o0000ooooooooool01?ooool00ol0003o ooooooooo`05ooooo`03o`000?oooooooooo00Gooooo000Aooooo`[o0000ooooool7ooooo`?o0000 ooooool1ooooo`?o00000_ooool00ol0003oooooooooo`04ooooo`03o`000?oooooooooo00Gooooo 00?o0000ooooooooool01Oooool001Gooooo1?l00002ooooo`Wo0000ooooool1ooooo`?o0000m?oo ool9o`0000;ooooo00Co0000oooooooooooo00001Oooool2o`0000Oooooo00?o0000ooooooooool0 1Oooool001Wooooo1?l00007ooooo`So0000noooool2o`000>[ooooo2?l00007ooooo`Co00000ooo ool00ol0003oooooooooo`04ooooo`03o`000?oooooooooo00Gooooo00?o0000ooooooooool01Ooo ool001gooooo1?l0000;ooooo`So0000mOooool3o`000=oooooo2?l0000;ooooo`Co00001oooool0 0ol0003oooooooooo`0oooooo0ol0003Cooooo`Wo00003oooool4o`0000_ooooo4?l00007ooooo`009Oooool4o`0001Co oooo2?l0003Zooooo`?o0000b?ooool8o`0001Cooooo1?l0000Vooooo`00:Oooool5o`0001Oooooo 2?l0003Uooooo`;o0000__ooool8o`0001Oooooo1Ol0000Zooooo`00;_ooool4o`0001_ooooo2?l0 003Oooooo`?o0000/oooool8o`0001_ooooo1?l0000_ooooo`00<_ooool4o`0001oooooo2Ol0003I ooooo`?o0000Yoooool9o`0001oooooo1?l0000cooooo`00=_ooool4o`0002Cooooo2?l0003Doooo o`;o0000WOooool8o`0002Cooooo1?l0000gooooo`00>_ooool4o`0002Sooooo2?l0003>ooooo`?o 0000T_ooool8o`0002Sooooo1?l0000kooooo`00?_ooool4o`0002cooooo2?l00039ooooo`?o0000 Qoooool8o`0002cooooo1?l0000oooooo`00@_ooool4o`00033ooooo2Ol00033ooooo`;o0000O?oo ool9o`00033ooooo1?l00013ooooo`00A_ooool4o`0003Gooooo2?l0002mooooo`?o0000LOooool8 o`0003Gooooo1?l00017ooooo`00B_ooool4o`0003Wooooo2?l0002hooooo`?o0000I_ooool8o`00 03Wooooo1?l0001;ooooo`00C_ooool4o`0003gooooo2Ol0002booooo`?o0000F_ooool9o`0003go oooo1?l0001?ooooo`00D_ooool4o`0004;ooooo2?l0002]ooooo`;o0000D?ooool8o`0004;ooooo 1?l0001Cooooo`00E_ooool4o`0004Kooooo2?l0002Wooooo`?o0000AOooool8o`0004Kooooo1?l0 001Gooooo`00F_ooool4o`0004[ooooo2?l0002Rooooo`?o0000>_ooool8o`0004[ooooo1?l0001K ooooo`00G_ooool5o`0004gooooo2Ol0002Looooo`;o0000;oooool9o`0004gooooo1Ol0001Ooooo o`00Hoooool4o`0005;ooooo2?l0002Fooooo`?o00009?ooool8o`0005;ooooo1?l0001Tooooo`00 Ioooool4o`0005Kooooo2?l0002Aooooo`?o00006Oooool8o`0005Kooooo1?l0001Xooooo`00Jooo ool4o`0005[ooooo2?l0002oooool4o`0007Gooooo00?o0000oooooooo ool00_ooool5o`0000Gooooo00?o0000ooooooooool01Oooool008oooooo1?l00021ooooo`So0000 1oooool8o`0004[ooooo0ol0000dooooo`Co0000NOooool00ol0003oooooooooo`03ooooo`04o`00 0?ooooooooooo`0000Gooooo00?o0000ooooooooool01Oooool009?ooooo1Ol00024ooooo`Oo0000 EOooool3o`0002cooooo1Ol0001mooooo`03o`000?oooooooooo00Cooooo00?o0000ooooooooool0 1Oooool00ol0003oooooooooo`05ooooo`00V?ooool4o`0008Gooooo0ol0001Gooooo`;o00009_oo ool4o`0008;ooooo00?o0000ooooooooool01Oooool00ol0003oooooooooo`04ooooo`03o`000?oo oooooooo00Gooooo002Looooo`Co0000Q?ooool3o`0005Kooooo0ol0000Oooooo`Co0000Q_ooool0 0ol0003oooooooooo`02ooooo`05o`000?ooooooooooooooool000001Oooool00ol0003ooooooooo o`05ooooo`00X?ooool4o`0008?ooooo0_l0001Gooooo`?o00006?ooool4o`0008[ooooo00?o0000 ooooooooool00_ooool01Ol0003ooooooooooooooooo000000Gooooo00?o0000ooooooooool01Ooo ool00:Cooooo1?l00021ooooo`?o0000Eoooool2o`0001;ooooo1?l0002>ooooo`03o`000?oooooo oooo00?ooooo0ol00006ooooo`03o`000?oooooooooo00Gooooo002Xooooo`Co0000P?ooool3o`00 05Kooooo0ol0000;ooooo`Co0000T_ooool00ol0003oooooooooo`07ooooo1?l0001]ooooo`;o00001_ooool4o`0004gooooo0ol0002B ooooo`00iOooool4o`0006_ooooo1_l0001Dooooo`?o0000Soooool00>Wooooo1?l0001Uooooo`Co 000000Coooooo`000?l0003o0000Eoooool2o`0008gooooo003]ooooo`Co0000GOooool4o`0000So oooo0_l0001Gooooo`?o0000R_ooool00?7ooooo1?l0001Eooooo`Co00003_ooool3o`0005Oooooo 0ol00027ooooo`00mOooool4o`0004gooooo1?l0000Eooooo`?o0000Eoooool2o`0008Gooooo003i ooooo`Co0000AOooool4o`0001cooooo0_l0001Gooooo`?o0000P_ooool00?gooooo1?l0000moooo o`Co00008_ooool3o`0005Oooooo0ol0001oooooo`00ooooool2ooooo`Go0000oooool00?ooooooZoooool3o`0005Sooooo 0ol0000hooooo`00oooooon^ooooo`;o0000FOooool2o`0003Kooooo003ooooook3ooooo0ol0001H ooooo`?o0000oooool00?ooooooooooool7ooooo`?o0000>?ooool00?ooooooooooool:ooooo`;o0000=_oo ool00?ooooooooooool"], ImageRangeCache->{{{0, 575}, {354.938, 0}} -> {0.974359, -0.250053, \ 0.00182832, 0.0295828}}] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Displaying last step", "Subsubsection", CellTags->"c:73"], Cell[CellGroupData[{ Cell[BoxData[{ \({d = 2, f = 3, j = 3}; utility = Point[{#1, \(Position[allSubcombinations[d, f], #2]\)[\([\)\(1, 1\)\(]\)]}] &;\), "\n", \(lastTwo = Take[fructify[utility]@fateTree["\", d, f, j], \(-2\)]\)}], "Input"], Cell[BoxData[ \({{2, {{{{}, {{{1\/9, {1, 1}}, {{{1, 1}, {1}}}}, {{2\/9, {1, 2}}, {{{1, 2}, {2}}}}, {{2\/9, {1, 3}}, {{{1, 3}, {3}}}}, {{1\/9, {2, 2}}, {{{2, 2}, {4}}}}, {{2\/9, {2, 3}}, {{{2, 3}, {5}}}}, {{1\/9, {3, 3}}, {{{3, 3}, {6}}}}}}, {{1}, {{{1\/3, {1}}, {{{1, 1}, {1}}}}, {{1\/3, {2}}, {{{1, 2}, {2}}}}, {{1\/3, {3}}, {{{1, 3}, {3}}}}}}, {{2}, {{{1\/3, {1}}, {{{1, 2}, {2}}}}, {{1\/3, {2}}, {{{2, 2}, {4}}}}, {{1\/3, {3}}, {{{2, 3}, {5}}}}}}, {{3}, {{{1\/3, {1}}, {{{1, 3}, {3}}}}, {{1\/3, {2}}, {{{2, 3}, {5}}}}, {{1\/3, {3}}, {{{3, 3}, {6}}}}}}}, {{{1, 1}, {Point[{2, 5}], {}}}, {{1, 2}, {Point[{2, 6}], {}}}, {{1, 3}, {Point[{2, 7}], {}}}, {{2, 2}, {Point[{2, 8}], {}}}, {{2, 3}, {Point[{2, 9}], {}}}, {{3, 3}, {Point[{2, 10}], {}}}}}}, {3, {{}, {{{1, 1}, {Point[{3, 5}], {}}}, {{1, 2}, {Point[{3, 6}], {}}}, {{1, 3}, {Point[{3, 7}], {}}}, {{2, 2}, {Point[{3, 8}], {}}}, {{2, 3}, {Point[{3, 9}], {}}}, {{3, 3}, {Point[{3, 10}], {}}}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(strategyStep = \((extractStrategy@ maxUtilityAndStrategy[fateTree["\", d, f, j], 0 &])\)[\([3]\)]\)], "Input"], Cell[BoxData[ \({2, {{{{}, {{{1, 1}, {{{1, 1}, {1}}}}, {{1, 2}, {{{1, 2}, {2}}}}, {{1, 3}, {{{1, 3}, {3}}}}, {{2, 2}, {{{2, 2}, {4}}}}, {{2, 3}, {{{2, 3}, {5}}}}, {{3, 3}, {{{3, 3}, {6}}}}}}, {{1}, {{{1}, {{{1, 1}, {1}}}}, {{2}, {{{1, 2}, {2}}}}, {{3}, {{{1, 3}, {3}}}}}}, {{2}, {{{1}, {{{1, 2}, {2}}}}, {{2}, {{{2, 2}, {4}}}}, {{3}, {{{2, 3}, {5}}}}}}, {{3}, {{{1}, {{{1, 3}, {3}}}}, {{2}, {{{2, 3}, {5}}}}, {{3}, {{{3, 3}, {6}}}}}}}, {{{1, 1}, {}}, {{1, 2}, {}}, {{1, 3}, {}}, {{2, 2}, {}}, {{2, 3}, {}}, {{3, 3}, {}}}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(With[{stateBranch = lastTwo[\([1, \(-1\), 1, 1]\)]}, {d \[Equal] Length@\(First@stateBranch\) + Length@stateBranch[\([\(-1\), 1, 1, \(-1\)]\)], f \[Equal] stateBranch[\([\(-1\), \(-1\), 1, \(-1\), 1]\)]}]\)], "Input"], Cell[BoxData[ \({True, True}\)], "Output"] }, Open ]], Cell[BoxData[ \(\({d =. , f =. , j =. };\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(?meanMeanStep\)\)], "Input"], Cell["Global`meanMeanStep", "Print", CellTags->"Info3351666525-7612531"], Cell[BoxData[ InterpretationBox[GridBox[{ {GridBox[{ {\(meanMeanStep[lastTwo_List, strategyStep_List, options___] := ReplacePart[First[lastTwo], Transpose[{First /@ lastTwo\[LeftDoubleBracket]1, \(-1\), 1\[RightDoubleBracket], MapThread[{meanMean[#1, Flatten[ lastTwo\[LeftDoubleBracket]\(-1\), \(-1\)\ \[RightDoubleBracket], 1], #2], If[\(withStrategy \ /. \[InvisibleSpace]{options}\) /. \[InvisibleSpace]Options[meanMeanStep], Last[#2], {__}]} &, {lastTwo\ \[LeftDoubleBracket]1, \(-1\), 1\[RightDoubleBracket], strategyStep\[LeftDoubleBracket]\(-1\), 1\[RightDoubleBracket]}]}], {\(-1\), 1}]\)} }, GridBaseline->{Baseline, {1, 1}}, ColumnWidths->0.999, ColumnAlignments->{Left}]}, {" "}, {GridBox[{ {\(Options[meanMeanStep] = {withStrategy \[Rule] False}\)} }, GridBaseline->{Baseline, {1, 1}}, ColumnWidths->0.999, ColumnAlignments->{Left}]} }, GridBaseline->{Baseline, {1, 1}}, ColumnAlignments->{Left}], Definition[ "meanMeanStep"], Editable->False]], "Print", CellTags->"Info3351666525-7612531"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(Show[#, ImageSize \[Rule] 10\ 72] &\)@ MapThread[ strategyStateBranchGraphics[#1, Flatten[lastTwo[\([\(-1\), \(-1\)]\)], 1], #2] &, {lastTwo[\([1, \(-1\), 1]\)], strategyStep[\([\(-1\), 1]\)]}];\)\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 %%ImageSize: 720 444.984 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -1.88095 0.952381 0.0147151 0.0588604 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g .5 Mabswid [ ] 0 setdash .02381 .07358 m .5 .30902 L s 1 g .29477 .20755 -12.8125 -6 Mabsadd m .29477 .20755 12.8125 -6 Mabsadd L .29477 .20755 12.8125 6 Mabsadd L .29477 .20755 -12.8125 6 Mabsadd L fill 0 g gsave .29477 .20755 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (9) show 1.000 setlinewidth grestore .02381 .07358 m .5 .36788 L s 1 g .42942 .32426 -12.8125 -6 Mabsadd m .42942 .32426 12.8125 -6 Mabsadd L .42942 .32426 12.8125 6 Mabsadd L .42942 .32426 -12.8125 6 Mabsadd L fill 0 g gsave .42942 .32426 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (9) show 1.000 setlinewidth grestore .02381 .07358 m .5 .42674 L s 1 g .21264 .21362 -12.8125 -6 Mabsadd m .21264 .21362 12.8125 -6 Mabsadd L .21264 .21362 12.8125 6 Mabsadd L .21264 .21362 -12.8125 6 Mabsadd L fill 0 g gsave .21264 .21362 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (9) show 1.000 setlinewidth grestore .02381 .07358 m .5 .4856 L s 1 g .22541 .24801 -12.8125 -6 Mabsadd m .22541 .24801 12.8125 -6 Mabsadd L .22541 .24801 12.8125 6 Mabsadd L .22541 .24801 -12.8125 6 Mabsadd L fill 0 g gsave .22541 .24801 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (9) show 1.000 setlinewidth grestore .02381 .07358 m .5 .54446 L s 1 g .4055 .45101 -12.8125 -6 Mabsadd m .4055 .45101 12.8125 -6 Mabsadd L .4055 .45101 12.8125 6 Mabsadd L .4055 .45101 -12.8125 6 Mabsadd L fill 0 g gsave .4055 .45101 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (9) show 1.000 setlinewidth grestore .02381 .07358 m .5 .60332 L s 1 g .1982 .26757 -12.8125 -6 Mabsadd m .1982 .26757 12.8125 -6 Mabsadd L .1982 .26757 12.8125 6 Mabsadd L .1982 .26757 -12.8125 6 Mabsadd L fill 0 g gsave .1982 .26757 -73.8125 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show %%IncludeResource: font Mathematica2Mono %%IncludeFont: Mathematica2Mono /Mathematica2Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 70.812 13.000 moveto (\\220) show 78.625 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (9) show 1.000 setlinewidth grestore .5 .30902 m .97619 .30902 L s .5 .36788 m .97619 .36788 L s .5 .42674 m .97619 .42674 L s .5 .4856 m .97619 .4856 L s .5 .54446 m .97619 .54446 L s .5 .60332 m .97619 .60332 L s 1 g .97619 .07358 -5 -6 Mabsadd m .97619 .07358 5 -6 Mabsadd L .97619 .07358 5 6 Mabsadd L .97619 .07358 -5 6 Mabsadd L fill 0 g gsave .97619 .07358 -66 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 63.000 13.000 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (\\306) show 1.000 setlinewidth grestore 1 g .97619 .13244 -9.5 -6.875 Mabsadd m .97619 .13244 9.5 -6.875 Mabsadd L .97619 .13244 9.5 6.875 Mabsadd L .97619 .13244 -9.5 6.875 Mabsadd L fill 0 g gsave .97619 .13244 -70.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 77.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 77.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 77.812 16.562 moveto 77.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .1913 -9.5 -6.875 Mabsadd m .97619 .1913 9.5 -6.875 Mabsadd L .97619 .1913 9.5 6.875 Mabsadd L .97619 .1913 -9.5 6.875 Mabsadd L fill 0 g gsave .97619 .1913 -70.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 77.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 77.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 77.812 16.562 moveto 77.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .25016 -9.5 -6.96875 Mabsadd m .97619 .25016 9.5 -6.96875 Mabsadd L .97619 .25016 9.5 6.96875 Mabsadd L .97619 .25016 -9.5 6.96875 Mabsadd L fill 0 g gsave .97619 .25016 -70.5 -10.9688 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.9375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (3) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 77.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 77.812 16.750 lineto stroke 0.375 setlinewidth 63.188 16.750 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 77.812 16.750 moveto 77.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .30902 -13.5 -6.875 Mabsadd m .97619 .30902 13.5 -6.875 Mabsadd L .97619 .30902 13.5 6.875 Mabsadd L .97619 .30902 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .30902 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 67.625 14.125 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 73.625 14.125 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor ( ) show 76.250 14.125 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1) show 0.000 0.000 0.000 setrgbcolor 0.375 setlinewidth 63.188 5.188 moveto 85.812 5.188 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 85.812 16.562 lineto stroke 0.375 setlinewidth 63.188 16.562 moveto 63.188 5.188 lineto stroke 0.375 setlinewidth 85.812 16.562 moveto 85.812 5.188 lineto stroke 1.000 setlinewidth grestore 1 g .97619 .36788 -13.5 -6.875 Mabsadd m .97619 .36788 13.5 -6.875 Mabsadd L .97619 .36788 13.5 6.875 Mabsadd L .97619 .36788 -13.5 6.875 Mabsadd L fill 0 g gsave .97619 .36788 -74.5 -10.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 21.75 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind d