<?xml version="1.0" encoding="UTF-8"?>
<Worksheet>
<Version major="11" minor="0"/>
<Label-Scheme value="2" prefix=""/>
<View-Properties presentation="false"><Zoom percentage="150"/></View-Properties>
<MapleNet-Properties warnlevel="3" longdelim="true" plotoptions="" echo="1" errorcursor="false" elisiontermsthreshold="10000" elisiontermsbefore="100" errorbreak="1" prettyprint="3" prompt="&gt; " latexwidth="6.0" useclientjvm="true" ansi="false" screenheight="25" labelwidth="20" plotdevice="inline" typesetting="standard" displayprecision="2" indentamount="4" elisiondigitsthreshold="10000" quiet="false" plotoutput="terminal" rtablesize="10" preplot="" showassumed="1" plotdriver="openviz" elisiontermsafter="100" labelling="true" postplot="" screenwidth="79" elisiondigitsbefore="100" elisiondigitsafter="100" verboseproc="1" imaginaryunit="I" ShowLabels="true"/>
<Styles><Font name="Heading 4" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 5" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 1" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Bullet Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Equation Label" background="[255,255,255]" bold="true" executable="false" family="Monospaced" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Author" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Diagnostic" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[40,120,40]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 2" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="16" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Page Number" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 3" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Plot" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Normal" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Inert Output" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[144,144,144]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dictionary Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[147,0,15]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Dash Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 3" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="List Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Input" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Line Printed Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input Placeholder" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[200,0,200]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Math" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Error" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Warning" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 1" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 2" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,128,128]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Layout name="Ordered List 5" alignment="left" bullet="ROMAN" firstindent="0" leftmargin="144" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Heading 4" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Text Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="newline" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 1" alignment="left" bullet="numeric" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Annotation Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Bullet Item" alignment="left" bullet="dot" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Author" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="8" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Dash Item" alignment="left" bullet="dash" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 3" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Diagnostic" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 4" alignment="left" bullet="ALPHABETIC" firstindent="0" leftmargin="108" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Maple Output" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.3" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Line Printed Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="List Item" alignment="left" bullet="indent" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 2" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="2" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 3" alignment="left" bullet="roman" firstindent="0" leftmargin="72" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Error" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Plot" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Warning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 1" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="4" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 2" alignment="left" bullet="alphabetic" firstindent="0" leftmargin="36" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Normal" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Pencil-style name="Pencil 3" pen-color="[0,0,0]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 1" pen-color="[0,0,0]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 5" pen-color="[255,0,0]" pen-height="5.0" pen-width="5.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 2" pen-color="[0,0,255]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 4" pen-color="[0,0,255]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Highlighter-style name="Highlighter 2" pen-color="[255,204,0]" pen-height="14.0" pen-width="14.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 4" pen-color="[0,255,255]" pen-height="32.0" pen-width="32.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 3" pen-color="[51,255,0]" pen-height="24.0" pen-width="24.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 1" pen-color="[255,153,255]" pen-height="12.0" pen-width="8.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 5" pen-color="[255,255,0]" pen-height="48.0" pen-width="48.0" pen-opacity="0.8"/>
</Styles>
<Task-table>
    <Task-category name="&lt;default&gt;">
    </Task-category>
</Task-table>
<Annotation-table>
    <Annotation-category name="&lt;default&gt;">
    </Annotation-category>
</Annotation-table>
<Task>
</Task>
<Group labelreference="L104" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L105" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">This code calculates the Shapley value for an arbitrary n-person cooperative game in characteristic function form. The second part of the code calculates the Nucleolus for the game. The example we use is from problem 5.19 regarding the fair scheduling problem for doctors Moe-Larry-Curly and Shemp.</Text-field>
</Input>
</Group>
<Group labelreference="L1" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">restart:N:={1,2,3,4};#Set up the Players.</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkiTkc2IjwmIiIiIiIjIiIkIiIl">PCYiIiIiIiMiIiQiIiU=</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L106" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">np:=nops(N); #number of players</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkjbnBHNiIiIiU=">IiIl</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L2" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">with(combinat):#We need this to find all the possible coalitions.</Text-field>
</Input>
</Group>
<Group labelreference="L3" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">L:=powerset(N):M:=convert(L,list);# All possible coalitions</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkiTUc2IjcyPCI8JiIiIiIiIyIiJCIiJTwlRilGKkYrPCRGKkYrPCVGKEYqRis8I0YrPCRGKEYrPCRGKUYrPCVGKEYpRis8I0YoPCNGKTwkRihGKTwjRio8JEYoRio8JEYpRio8JUYoRilGKg==">NzI8IjwmIiIiIiIjIiIkIiIlPCVGJkYnRig8JEYnRig8JUYlRidGKDwjRig8JEYlRig8JEYmRig8JUYlRiZGKDwjRiU8I0YmPCRGJUYmPCNGJzwkRiVGJzwkRiZGJzwlRiVGJkYn</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L4" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">K:=nops(L);# Number of coalitions</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkiS0c2IiIjOw==">IiM7</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L8" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">M:=sort(M,length);</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkiTUc2IjcyPCI8IyIiJTwjIiIiPCMiIiM8IyIiJDwkRi5GKDwkRipGKDwkRixGKDwkRipGLDwkRipGLjwkRixGLjwlRixGLkYoPCVGKkYuRig8JUYqRixGKDwlRipGLEYuPCZGKkYsRi5GKA==">NzI8IjwjIiIlPCMiIiI8IyIiIzwjIiIkPCRGK0YlPCRGJ0YlPCRGKUYlPCRGJ0YpPCRGJ0YrPCRGKUYrPCVGKUYrRiU8JUYnRitGJTwlRidGKUYlPCVGJ0YpRis8JkYnRilGK0Yl</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L83" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">The Characteristic function is defined here, coalition by coalition.</Text-field>
</Input>
</Group>
<Group labelreference="L9" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">for k from 1 to K do if nops(M[k])&lt;=1 then v(M[k]):=0; end if;end do;</Text-field>
</Input>
</Group>
<Group labelreference="L10" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">v({1,2}):=4:v({1,3}):=4:v({2,3}):=6:v({1,4}):=3:v({2,4}):=2:v({3,4}):=2:
v({1,2,3}):=10:v({1,3,4}):=7:v({2,3,4}):=8:v({1,2,4}):=7:v({1,2,3,4}):=13:</Text-field>
</Input>
</Group>
<Group labelreference="L11" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L12" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L13" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L14" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L84" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Procedure to calculate Shapley</Text-field>
</Input>
</Group>
<Group labelreference="L16" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">shapleyval:=proc(v,x,N)
local i,k,shapley;
for i from 1 to nops(N) 
do 
x[i]:=0:
for k from 1 to K do
 if member(i,M[k]) and nops(M[k])&gt;=1 then 
 x[i]:=x[i]+(v(M[k])-v(M[k] minus {i}))*
          ((nops(M[k])-1)!*(nops(N)-nops(M[k]))!)/nops(N)!
 end if;
end do;
lprint(shapley[i]=x[i]);
end do:
end proc:</Text-field>
</Input>
<Input>
<Text-field prompt="&gt; " style="Maple Input" linebreak="space" spaceabove="0" rightmargin="0" bullet="none" firstindent="0" bulletsuffix="" linespacing="0.0" pagebreak-before="false" leftmargin="0" alignment="left" initial="0" spacebelow="0"></Text-field>
</Input>
</Group>
<Group labelreference="L23" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L22" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L80" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">shapleyval(v,x,N);</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">shapley[1] = 10/3
shapley[2] = 23/6
shapley[3] = 23/6
shapley[4] = 2</Text-field>
</Output>
</Group>
<Group labelreference="L72" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L69" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L85" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L86" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Part 2: Calculate the Nucleolus</Text-field>
</Input>
</Group>
<Group labelreference="L65" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L108" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L109" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Step 1: For each coalition S=M[k] set up sum_{i in S}y_i</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L24" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L110" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
<Input>
<Text-field prompt="&gt; " style="Maple Input" linebreak="space" spaceabove="0" rightmargin="0" bullet="none" firstindent="0" bulletsuffix="" linespacing="0.0" pagebreak-before="false" leftmargin="0" alignment="left" initial="0" spacebelow="0">for k from 1 to nops(M) 
do 
z[k]:=0:
for i from 1 to np do
 if member(i,M[k]) and M[k]&lt;&gt;N and M[k]&lt;&gt;{} then 
 z[k]:=z[k]+y||i
 end if;
end do;
end do:</Text-field>
</Input>
</Group>
<Group labelreference="L107" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L25" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">lprint(seq(z[i],i=1..16));</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">0, y4, y1, y2, y3, y3+y4, y1+y4, y2+y4, y1+y2, y1+y3, y2+y3, y2+y3+y4, y1+y3+y4, y1+y2+y4, y1+y2+y3, 0</Text-field>
</Output>
</Group>
<Group labelreference="L111" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Step 2: Now set up the excess functions for each coalition:</Text-field>
</Input>
</Group>
<Group labelreference="L27" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">excess:=k-&gt;v(M[k])-z[k]:lprint(seq(excess(k),k=1..K));</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">0, -y4, -y1, -y2, -y3, 2-y3-y4, 3-y1-y4, 2-y2-y4, 4-y1-y2, 4-y1-y3, 6-y2-y3, 8-y2-y3-y4, 7-y1-y3-y4, 7-y1-y2-y4, 10-y1-y2-y3, 13</Text-field>
</Output>
</Group>
<Group labelreference="L112" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L87" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Step 3: setup for the first least core:</Text-field>
</Input>
</Group>
<Group labelreference="L28" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">C:={}:for k from 1 to K do
if M[k]&lt;&gt;{} and M[k]&lt;&gt; N then C:=C union {excess(k)&lt;=a[1]};
end if;
C:=C union {add(y||i,i=1..nops(N))=v(N)};
end do:</Text-field>
</Input>
</Group>
<Group labelreference="L29" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L88" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Find the smallest a[1] so that C(a[1]) is not empty:</Text-field>
</Input>
</Group>
<Group labelreference="L30" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">with(simplex):</Text-field>
</Input>
</Group>
<Group labelreference="L33" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">minimize(a[1],C);</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">PCcvSSN5NEc2IiMiIiQiIiMvSSN5MUdGJSMiIihGKC9JI3kyR0YlIyIiKkYoL0kjeTNHRiVGKy8mSSJhR0YlNiMiIiIjISIkRig=</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L113" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">We may replace a[1] with -3/2 as the smallest epsilon, but not the y's:</Text-field>
</Input>
</Group>
<Group labelreference="L34" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">a[1]:=-3/2;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJImFHNiI2IyIiIiMhIiQiIiM=">IyEiJCIiIw==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L74" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">y||np:=v(N)-add(y||j,j=1..nops(N)-1);</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkjeTRHNiIsKiIjOCIiIkkjeTFHRiQhIiJJI3kyR0YkRilJI3kzR0YkRik=">LCoiIzgiIiJJI3kxRzYiISIiSSN5MkdGJkYnSSN5M0dGJkYn</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L45" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L114" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Here is the least core, but not in reduced form:</Text-field>
</Input>
</Group>
<Group labelreference="L46" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">C:={}:for k from 1 to K do
if M[k]&lt;&gt;{} and M[k]&lt;&gt; N then C:=C union {excess(k)&lt;=a[1]};
end if;
end do;C;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUkobWZlbmNlZEc2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUklbXJvd0dGJDZALUYsNigtRiw2Ki1JI21pR0YkNiVRI3kxRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUkjbW9HRiQ2LVEiK0YnL0Y6USdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGRC8lKXN0cmV0Y2h5R0ZELyUqc3ltbWV0cmljR0ZELyUobGFyZ2VvcEdGRC8lLm1vdmFibGVsaW1pdHNHRkQvJSdhY2NlbnRHRkQvJSdsc3BhY2VHUSwwLjIyMjIyMjJlbUYnLyUncnNwYWNlR0ZTLUYzNiVRI3kyRidGNkY5RjwtRjM2JVEjeTNGJ0Y2RjkvJStmb3JlZ3JvdW5kR1EoWzAsMCwwXUYnLyUpcmVhZG9ubHlHRkRGQC1GPTYtUSUmbGU7RidGQEZCRkVGR0ZJRktGTUZPL0ZSUSwwLjI3Nzc3NzhlbUYnL0ZVRl9vLUkmbWZyYWNHRiQ2KC1JI21uR0YkNiRRIzIzRidGQC1GZW82JFEiMkYnRkAvJS5saW5ldGhpY2tuZXNzR1EiMUYnLyUrZGVub21hbGlnbkdRJ2NlbnRlckYnLyUpbnVtYWxpZ25HRmBwLyUpYmV2ZWxsZWRHRkRGZm5GaW5GQC1GPTYtUSIsRidGQEZCL0ZGRjhGR0ZJRktGTUZPL0ZSUSYwLjBlbUYnL0ZVUSwwLjMzMzMzMzNlbUYnLUYsNigtRiw2Jy1GPTYtUSomdW1pbnVzMDtGJ0ZARkJGRUZHRklGS0ZNRk9GUUZURjJ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ARkAvJSVvcGVuR1EifGZyRicvJSZjbG9zZUdRInxockYn">PDAxLChJI3kxRzYiIiIiSSN5MkdGJkYnSSN5M0dGJkYnIyIjQiIiIzEsJEYlISIiIyEiJEYsMSwkRihGL0YwMSwkRilGL0YwMSwmRiVGL0YoRi8jISM2RiwxLCZGJUYvRilGL0Y4MSwmRihGL0YpRi8jISM6RiwxRiUjIiIoRiwxRigjIiIqRiwxRilGRDEsKEYlRi9GKEYvRilGLyMhI0JGLDEsJkYlRidGKEYnIyIjPkYsMSwmRihGJ0YpRicjIiM8RiwxLCZGJUYnRilGJ0ZN</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L35" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Step 4:</Text-field>
<Text-field style="Text" layout="Normal">To find out if C has more than one allocation, Solve the inequalities :</Text-field>
</Input>
</Group>
<Group labelreference="L43" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">with(SolveTools:-Inequality):</Text-field>
</Input>
</Group>
<Group labelreference="L102" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L115" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L116" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">glc:=LinearMultivariateSystem(C,[y1,y2,y3]);</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkkZ2xjRzYiPCc3JTwjL0kjeTFHRiQiIiQ8Iy9JI3kyR0YkIiIlPCMvSSN5M0dGJCMiIioiIiM3JTwkMUYpIyIiKEY0MkYqRik8JDFGLUYyMiwmRjkiIiJGKSEiIkYtPCMvRjEsKEYpRkBGLUZAIyIjQkY0Rj83JTwkRjoyRilGODwjL0YtRj5GLzclPCMvRilGODwjL0YtRjhGLzclRic8JEY8MkYuRi08Iy9GMSwmIyIjPEY0Rj9GLUZA">PCc3JTwjL0kjeTFHNiIiIiQ8Iy9JI3kyR0YnIiIlPCMvSSN5M0dGJyMiIioiIiM3JTwkMUYmIyIiKEYyMkYoRiY8JDFGK0YwMiwmRjciIiJGJiEiIkYrPCMvRi8sKEYmRj5GK0Y+IyIjQkYyRj03JTwkRjgyRiZGNjwjL0YrRjxGLTclPCMvRiZGNjwjL0YrRjZGLTclRiQ8JEY6MkYsRis8Iy9GLywmIyIjPEYyRj1GK0Y+</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L119" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L122" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">The only set of inequalities that are all consistent with the others is the one requiring y3=-y1-y2+23/2, so we set</Text-field>
</Input>
</Group>
<Group labelreference="L79" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L75" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">y3:=23/2-y1-y2;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkjeTNHNiIsKEkjeTFHRiQhIiJJI3kyR0YkRicjIiNCIiIjIiIi">LChJI3kxRzYiISIiSSN5MkdGJEYlIyIjQiIiIyIiIg==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L47" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L76" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Step 5: Recalculate C and the excess functions, deleting the excess functions which are now constants.</Text-field>
</Input>
</Group>
<Group labelreference="L48" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">
C:={}:y||nops(N):=v(N)-add(y||j,j=1..nops(N)-1):for k from 1 to K do
if M[k]&lt;&gt;{} and M[k]&lt;&gt; N and  
(y1 in indets(excess(k)) or y2 in indets(excess(k)))
then lprint(k,&quot;excess(&quot;,k,&quot;)=&quot;,excess(k));
C:=C union {excess(k)&lt;=a[2]};
end if;
end do:</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">3, &quot;excess(&quot;, 3, &quot;)=&quot;, -y1
4, &quot;excess(&quot;, 4, &quot;)=&quot;, -y2
5, &quot;excess(&quot;, 5, &quot;)=&quot;, y1+y2-23/2
6, &quot;excess(&quot;, 6, &quot;)=&quot;, -11+y1+y2
7, &quot;excess(&quot;, 7, &quot;)=&quot;, 3/2-y1
8, &quot;excess(&quot;, 8, &quot;)=&quot;, 1/2-y2
9, &quot;excess(&quot;, 9, &quot;)=&quot;, -y1-y2+4
10, &quot;excess(&quot;, 10, &quot;)=&quot;, -15/2+y2
11, &quot;excess(&quot;, 11, &quot;)=&quot;, -11/2+y1
12, &quot;excess(&quot;, 12, &quot;)=&quot;, -5+y1
13, &quot;excess(&quot;, 13, &quot;)=&quot;, -6+y2
14, &quot;excess(&quot;, 14, &quot;)=&quot;, 11/2-y1-y2</Text-field>
</Output>
</Group>
<Group labelreference="L90" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">The next set for the next least core is:</Text-field>
</Input>
</Group>
<Group labelreference="L49" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">C;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUkobWZlbmNlZEc2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUklbXJvd0dGJDY8LUYsNigtRiw2KS1JI21vR0YkNi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<Group labelreference="L89" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L50" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">minimize(a[2],C);</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">PCUvSSN5MUc2IiMiIzgiIiUvJkkiYUdGJTYjIiIjIyEiKEYoL0kjeTJHRiVGKA==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L91" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Now we know the second least core with a[2]:</Text-field>
</Input>
</Group>
<Group labelreference="L77" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">a[2]:=-7/4; C;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJImFHNiI2IyIiIyMhIigiIiU=">IyEiKCIiJQ==</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUkobWZlbmNlZEc2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUklbXJvd0dGJDY8LUYsNigtSSNtaUdGJDYlUSN5MUYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JI21vR0YkNi1RJSZsZTtGJy9GOFEnbm9ybWFsRicvJSZmZW5jZUdRJmZhbHNlRicvJSpzZXBhcmF0b3JHRkIvJSlzdHJldGNoeUdGQi8lKnN5bW1ldHJpY0dGQi8lKGxhcmdlb3BHRkIvJS5tb3ZhYmxlbGltaXRzR0ZCLyUnYWNjZW50R0ZCLyUnbHNwYWNlR1EsMC4yNzc3Nzc4ZW1GJy8lJ3JzcGFjZUdGUS1JJm1mcmFjR0YkNigtSSNtbkdGJDYkUSMxNUYnRj4tRlg2JFEiNEYnRj4vJS5saW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YsNigtRiw2J0ZkcUYwRmJvRmVvRj5GOkZockZib0Zlb0Y+RmdvLUYsNihGW3VGOi1GLDYnRmRxRmFwRmJvRmVvRj5GYm9GZW9GPkZnby1GLDYoRmZyRjotRiw2J0ZkcS1GVTYoLUZYNiRRIjlGJ0Y+RmVuRmhuRltvRl5vRmBvRmJvRmVvRj5GYm9GZW9GPkZnby1GLDYoRmJxRjotRiw2J0ZkcUZkdEZib0Zlb0Y+RmJvRmVvRj5GYm9GZW9GPkY+LyUlb3BlbkdRInxmckYnLyUmY2xvc2VHUSJ8aHJGJw==">PC4xSSN5MUc2IiMiIzoiIiUxRiQjIiM4RigxSSN5MkdGJSMiIzxGKDEsJkYkISIiRi1GMiMhI0hGKDEsJEYtRjIjISIoRigxLCZGJCIiIkYtRjsjIiNSRigxRjojIiNQRigxRi0jIiNCRigxLCRGJEYyRjcxRkUjISM4RigxRjYjISIqRigxRjEjISNCRig=</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L51" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L53" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L92" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Solve the ineqs to see that y1=13/4:</Text-field>
</Input>
</Group>
<Group labelreference="L81" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">glc:=LinearMultivariateSystem(C,[y1,y2]);</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkkZ2xjRzYiPCM3JDwjL0kjeTFHRiQjIiM4IiIlPCQxRixJI3kyR0YkMUYvIyIjPEYs">PCM3JDwjL0kjeTFHNiIjIiM4IiIlPCQxIiIlSSN5Mkc2IjFJI3kyRzYiIyIjPCIiJQ==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L54" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">y1:=13/4;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkjeTFHNiIjIiM4IiIl">IyIjOCIiJQ==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L93" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Step 6: Since this set still has more than one point we set up the third least core:</Text-field>
</Input>
</Group>
<Group labelreference="L55" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">C:={}:for k from 1 to K do
if M[k]&lt;&gt;{} and M[k]&lt;&gt; N and (y2 in indets(excess(k)))
 then lprint(excess(k));
C:=C union {excess(k)&lt;=a[3]};
end if;
end do:</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">-y2
-33/4+y2
-31/4+y2
1/2-y2
3/4-y2
-15/2+y2
-6+y2
9/4-y2</Text-field>
</Output>
</Group>
<Group labelreference="L94" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Here is the 3rd least core:</Text-field>
</Input>
</Group>
<Group labelreference="L56" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">C;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUkobWZlbmNlZEc2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUklbXJvd0dGJDY0LUYsNigtRiw2KC1JJm1mcmFjR0YkNigtSSNtbkdGJDYkUSIxRicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYnLUY2NiRRIjJGJ0Y5LyUubGluZXRoaWNrbmVzc0dRIjFGJy8lK2Rlbm9tYWxpZ25HUSdjZW50ZXJGJy8lKW51bWFsaWduR0ZELyUpYmV2ZWxsZWRHUSZmYWxzZUYnLUkjbW9HRiQ2LVEoJm1pbnVzO0YnRjkvJSZmZW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y5RmlvRl9wRmRvRmdvRjlGXXEtRiw2KC1GLDYpRmJyLUYzNigtRjY2JFEjMzNGJ0Y5RltyRj9GQkZFRkdGanJGW29GZG9GZ29GOUZpb0ZfcEZkb0Znb0Y5Rl1xLUYsNigtRiw2KUZici1GMzYoLUY2NiRRIzMxRidGOUZbckY/RkJGRUZHRmpyRltvRmRvRmdvRjlGaW9GX3BGZG9GZ29GOUZkb0Znb0Y5RjkvJSVvcGVuR1EifGZyRicvJSZjbG9zZUdRInxockYn">PCoxLCYjIiIiIiIjRiZJI3kyRzYiISIiJkkiYUdGKTYjIiIkMSwmI0YuIiIlRiZGKEYqRisxLCYjISM6RidGJkYoRiZGKzEsJiMiIipGMkYmRihGKkYrMSwmISInRiZGKEYmRisxLCRGKEYqRisxLCYjISNMRjJGJkYoRiZGKzEsJiMhI0pGMkYmRihGJkYr</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L95" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">We look for the smallest a[3] so this set is nonempty:</Text-field>
</Input>
</Group>
<Group labelreference="L57" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">minimize(a[3],C);</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">PCQvJkkiYUc2IjYjIiIkIyEjOiIiKS9JI3kyR0YmIyIjTEYr</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L58" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">a[3]:=-15/8;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJImFHNiI2IyIiJCMhIzoiIik=">IyEjOiIiKQ==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L59" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L60" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">glc:=LinearMultivariateSystem(C,[y2]);</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkkZ2xjRzYiPCM3IzwjL0kjeTJHRiQjIiNMIiIp">PCM3IzwjL0kjeTJHNiIjIiNMIiIp</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L96" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Finally we are left with one point:</Text-field>
</Input>
</Group>
<Group labelreference="L82" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">y2:=33/8;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PkkjeTJHNiIjIiNMIiIp">IyIjTCIiKQ==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L61" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L97" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">The Nucleolus!!!!!!!!!!!!!!!</Text-field>
</Input>
</Group>
<Group labelreference="L62" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">print(seq(y||i,i=1..4));</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">NiYjIiM4IiIlIyIjTCIiKUYmIyIiJCIiIw==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L98" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">The Shapley value!!!!!!!!!!!!</Text-field>
</Input>
</Group>
<Group labelreference="L63" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">print(seq(x[i],i=1..4));</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">NiYjIiM1IiIkIyIjQiIiJ0YmIiIj</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L64" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L123" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">To set up the schedules for each player calculate the minutes each player saves under each allocation:</Text-field>
</Input>
</Group>
<Group labelreference="L99" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">First: Hours worked:</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L101" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">h[1]:=5;h[2]:=7;h[3]:=6;h[4]:=3;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJImhHNiI2IyIiIiIiJg==">IiIm</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJImhHNiI2IyIiIyIiKA==">IiIo</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJImhHNiI2IyIiJCIiJw==">IiIn</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJImhHNiI2IyIiJSIiJA==">IiIk</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L124" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">The minutes each player must work is then the original time to work minus the amount of time saved under each allocation:</Text-field>
</Input>
</Group>
<Group labelreference="L103" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">for i from 1 to 4 do nmins[i]=evalf((h[i]-y||i)*60); smins[i]:=evalf((h[i]-x[i])*60); end do;</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">LyZJJm5taW5zRzYiNiMiIiIkIiQwIiIiIQ==</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJJnNtaW5zRzYiNiMiIiIkIiQrIiIiIQ==">JCIkKyIiIiE=</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">LyZJJm5taW5zRzYiNiMiIiMkIisrKytEPCEiKA==</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJJnNtaW5zRzYiNiMiIiMkIiQhPiIiIQ==">JCIkIT4iIiE=</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">LyZJJm5taW5zRzYiNiMiIiQkIisrKytENiEiKA==</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJJnNtaW5zRzYiNiMiIiQkIiRJIiIiIQ==">JCIkSSIiIiE=</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">LyZJJm5taW5zRzYiNiMiIiUkIiMhKiIiIQ==</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="PiZJJnNtaW5zRzYiNiMiIiUkIiNnIiIh">JCIjZyIiIQ==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L100" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Worksheet>