fig:envelope\]. In this way, we ensure that the error shown for such “single-level methods” has been obtained with the smallest computational error possible. Again, this is not a computationally practical method but is taken as a reference for what a sparse grids Stochastic Collocation method with optimal balancing of the space and stochastic discretization errors could achieve.

![Envelope of SGSC convergence curves for the test case with $d=3$ and $N=10$.[]{data-label="fig:envelope"}](COOK_d3_N10.pdf){width="70.00000%"}

Implementation details {#ss:impl}
----------------------

To implement MISC, we need two components:

1.  Given a profit level parameter, $\epsilon$, we build the quasi-optimal set $\mathcal I$ based on , and . One method to achieve this is to exploit the fact that this set is downward closed and use the following recursive algorithm.

        FUNCTION BuildSet(epsilon, multiIndex)
            FOR i = 1 to (D+N)
                IF Profit(multiIndex + e_i) > epsilon
                THEN
                    ADD multiIndex+e_i to FinalSet
                    CALL BuildSet(epsilon, multiIndex+e_i)
                END IF
            END FOR
        END FUNCTION
          

2.  Given the set, $\mathcal I(L)$, we evaluate. Here we have two choices:

    -   Evaluate the individual terms ${{\ensuremath{{\boldsymbol \Delta}}}}[{F_{{{\ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}}}]$ for every ${{\ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}\in \mathcal I$. To do so, we use the operator defined in  along each stochastic and spatial direction. By storing the values of these terms, we can evaluate the MISC with different index sets (contained in $\mathcal I(L)$), which might be required to test the convergence of the MISC method. Moreover, this implementation is suitable for adaptive methods that expand the index set based on some criteria and reevaluate the MISC estimator. On the other hand, this implementation has a computational overhead since most computed values of ${F_{{{\ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}}}$ will actually not contribute to the final value of
fig: envelope\ ]. In this way, we ensure that the error shown for such “ individual - degree methods ” has been obtained with the smallest computational erroneousness possible. Again, this is not a computationally practical method acting but is taken as a reference for what a sparse grids Stochastic Collocation method with optimum reconciliation of the space and stochastic discretization errors could achieve. 

! [ Envelope of SGSC overlap curves for the test sheath with $ d=3 $ and $ N=10$.[]{data - label="fig: envelope"}](COOK_d3_N10.pdf){width="70.00000% " } 

 execution details { # ss: impl } 
 ---------------------- 

 To enforce MISC, we need two components: 

 1.   contribute a profit level parameter, $ \epsilon$, we build up the quasi - optimal set $ \mathcal I$ based on  , and  . One method acting to achieve this is to exploit the fact that this bent is downward closed and use the following recursive algorithm. 

         FUNCTION BuildSet(epsilon, multiIndex) 
             FOR i = 1 to (D+N) 
                 IF Profit(multiIndex + e_i) > epsilon 
                 THEN 
                     total multiIndex+e_i to FinalSet 
                     CALL BuildSet(epsilon, multiIndex+e_i) 
                 END IF 
             END FOR 
         END FUNCTION 
          

 2.   Given the set, $ \mathcal I(L)$, we evaluate. Here we have two choices: 

     -    measure the individual terminus $ { { \ensuremath{{\boldsymbol \Delta}}}}[{F_{{{\ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}}}]$ for every $ { { \ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}\in \mathcal I$. To do so, we use the operator defined in    along each stochastic and spatial direction. By storing the values of these terms, we can measure the MISC with unlike index sets (contained in $ \mathcal I(L)$), which might be command to test the convergence of the MISC method. furthermore, this implementation is desirable for adaptive methods that expand the index jell based on some criteria and reevaluate the MISC estimator. On the other hand, this implementation has a computational overhead since most computed value of $ { F_{{{\ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}}}$ will actually not lend to the final value of
fig:fnvelope\]. In this way, we tnsure that the etrir shoxn for auch “sinele-level methods” has been obvainwd wiuk the smallest compugational vrror poswiblt. Again, this is not a comibtatikkally 'ractical methoc but is tdken as a refesevcz for what a sparse grids Stochastic Collocstlon method witr opuimwl bzlancing of the space and stochastjc discgetization errors could achieve.

![Envelope of DGSC convergence curved for the tgat sqse with $d=3$ avd $N=10$.[]{data-label="fig:enveloke"}](COOK_d3_N10.pdf){width="70.00000%"}

Implementation ddtailx {#ss:impl}
----------------------

To inplfkent MISC, wx need two componekns:

1.  Givan a prpfit level parsmever, $\wpsilon$, we build the xuasi-optimal set $\mwthcal I$ taaed on , and . One merhid to achheve rhir ia vo sxploih tie fact thaf this set us downward closed snq use the follkwing wesursive algorithm.

        FUNCTION BuildVet(spsilon, multiIndex)
            FOR i = 1 to (D+N)
                IF Profit(multiIndex + e_i) > epsilon
                VHDN
                    ADD multiIndex+e_i to FinalSet
                    CALJ BuildSet(elsllpg, multiIndex+e_k)
                END IF
            END DOR
        ENC FUNCTION
          

2.  Given the set, $\matkcao I(L)$, we evaluate. Hzre we have cwo chpices:

    -   Evaluate the indnviduam terms ${{\enskremath{{\bomasymbol \Delta}}}}[{F_{{{\enrurvmatv{{{\ensuremath{{\boldsymbol \alphw}}}}}}},{{\ensuremavh{{{\ensbremath{{\buldsimbol \bqta}}}}}}}}}]$ for evfry ${{\ekvuremath{{{\ensuremath{{\holdsimbol \dlpha}}}}}}},{{\ensurfmath{{{\ensuremath{{\boldsymbol \beta}}}}}}}\ii \mathcal I$. Tp go vo, we usz the pperator defiged in  along ecch stockastic and spatizl dirertion. By stowing the valuad of these txrms, we cwn ecaluqte the OISC with diffrrent indvx setw (contained in $\matmcal K(M)$), which might bz twquired to tesy tfe sojvxrgensa of the MISW meghoa. Moreuver, this inolemrntation is suitable for adaptive methods yhwt expane the inqex set based on some criteria wnd rxevaluete thr MYSC estimator. On the other hans, this imoleientation haf a gompotational orerhead since most computed values of ${F_{{{\eisuremath{{{\ensuremath{{\boldwymbol \alpha}}}}}}},{{\ensuremctm{{{\ensuremath{{\bpldsyibol \beta}}}}}}}}}$ will actually not cintribute to the ninal value of
fig:envelope\]. In this way, we ensure that shown such “single-level has been obtained possible. this is not computationally practical method is taken as a reference for a sparse grids Stochastic Collocation method with optimal balancing of the space and discretization errors could achieve. ![Envelope of SGSC convergence curves for the test case $d=3$ $N=10$.[]{data-label="fig:envelope"}](COOK_d3_N10.pdf){width="70.00000%"} details ---------------------- To implement MISC, we need two components: 1. Given a profit level parameter, $\epsilon$, we the quasi-optimal set $\mathcal I$ based on , . One method to this is to exploit the that set is closed use following recursive algorithm. BuildSet(epsilon, multiIndex) FOR i = 1 to (D+N) IF Profit(multiIndex + e_i) > epsilon THEN ADD multiIndex+e_i FinalSet CALL END IF FOR FUNCTION Given the set, we evaluate. Here we have two the individual terms ${{\ensuremath{{\boldsymbol \Delta}}}}[{F_{{{\ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}}}]$ for ${{\ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \mathcal I$. To do so, we the operator defined in along each stochastic and direction. By storing the values of these terms, we can evaluate the MISC with different (contained in $\mathcal I(L)$), might be required test convergence the method. Moreover, implementation is suitable for adaptive methods that expand the index set on some criteria and reevaluate the MISC estimator. On the this has a computational since most computed values ${F_{{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}}}$ will actually not the value
fig:envelope\]. In this way, we ensUre that the Error ShoWn fOr Such “SingLe-level methods” HAs beEn obtained with the smallEst coMpUTatiONaL erroR possibLE. AGAIn, tHiS iS noT a COmPutatIonAlly praCtical methOd bUt Is taken as a reFErEnce for whaT a sParse grids StOchAstic COlLocATion mEthOd witH optimAL balanCing of the SpACe and sTOchastiC DIsCretIzation errors coulD AcHIeve.

![Envelope of sGSC coNvERgENCe cUrvEs for the teSt Case wITh $d=3$ and $N=10$.[]{DAtA-LABel="FIg:envelope"}](COOk_d3_N10.pdf){width="70.00000%"}

iMplEmentaTiOn dETails {#sS:impl}
----------------------

to IMplEment MISC, we Need Two componEnts:

1.  GiVEn a profIT level pArametEr, $\ePsiLon$, wE BuIlD thE qUAsi-OPtImaL Set $\Mathcal I$ BaSeD on , anD . One METHOd to AchIeve This iS to exploit the FacT thaT ThiS set iS downWard ClOsed aNd use tHe folLoWing recursive alGoriThm.

        FUNCTIoN BUiLdSEt(EpsilON, multiindEx)
            FoR i = 1 to (D+N)
                iF ProfiT(MulTiiNDEx + E_i) > epsilon
                THEN
                    ADD muLtIiNdEx+e_i to FiNalSet
                    caLl BUIldSet(epSiLon, MultIiNdex+e_I)
                END if
            EnD FOR
        END fUNCTIon
          

2.  GIvEn the seT, $\mAthcal i(L)$, We eValUate. HERe we Have twO choices:

    -   evaluATe the individuaL Terms ${{\ensuremaTH{{\bOLDsYMbol \delTa}}}}[{F_{{{\ensuremaTh{{{\enSUremAth{{\bOLdSymBOl \alpHa}}}}}}},{{\ensUrEMaTH{{{\ensuremath{{\boldsymbOl \Beta}}}}}}}}}]$ foR everY ${{\ensuremath{{{\enSuremath{{\boLDSYmbol \alpHa}}}}}}},{{\enSUrEMath{{{\ensuremath{{\BoldsYmbol \beta}}}}}}}\iN \Mathcal I$. to do sO, we use thE operator DEFined in  aLonG eaCh sTocHAStIc and spatial dIREctiOn. by storiNg tHe valueS of TheSe tErmS, wE can evaluAte the MIsC WiTh DiFfeRent iNDex sets (cOnTaiNeD in $\MathcAL I(L)$), whiCh migHt be ReQuIRed To test tHE cONVergEnCe Of thE MIsC MethoD. MorEOveR, this imPlementatIon IS suiTaBlE for adaPtive methods tHaT expand the InDex Set basED On some crIteria and reevaluate the MisC estimAtoR. On thE othEr hand, thiS imPlemenTatIOn has a ComputAtionAl OveRHEad siNCE mOst CoMputed valuES Of ${F_{{{\EnsurEmAth{{{\eNsuremaTh{{\boldsymbol \alpha}}}}}}},{{\eNSurEmath{{{\ensuremaTh{{\bOldsYMBoL \beTA}}}}}}}}}$ wILl aCtUAllY NOt contribute to tHe final valUe OF
fig:envelope\]. In this wa y, we ensu re th atthe  e rror  sho wn for such “s i ngle -level methods” has be en ob ta i nedw it h the  smalle s tc o mpu ta ti ona le rr or po ssi ble. Ag ain, thisisno t a computat i on ally pract ica l method but  is  taken  a s a refer enc e for  whata  spars e grids S to c hastic Colloca t i on  met hod with optimalb al a ncing of the s pace a nd st o c has tic  discretiz at ion e r rors co u ld a c hie v e.

![Envelop e of SGSC c o nve rgence  c urv e s forthe t es t  ca se with $d= 3$ a nd $N=10$ .[]{da t a-label = "fig:en velope "}] (CO OK_d 3 _N 10 .pd f) { wid t h= "70 . 000 00%"}

I mp le menta tion d e t ails  {# ss:i mpl}------------- --- ---- - -
To im pleme nt M IS C, we  needtwo c om ponents:

1.  G iven  a profit  le ve l p ar amete r , $\ep sil on$ , we bu ild the qua si - o p ti mal set $\mathcalI$ b as ed on ,and .O ne  m e thod toac hie ve t h i s isto e x pl oit thefact t h at  t his set  i s down wa rdclo sed a n d us e thefollowin g rec u rsive algorith m .

        FU N CT I O NB uild Set (epsilon, m ulti I ndex )
       FO R i =  1 to (D+N)
              IF Pr ofit( multiIndex +e_i) > eps i l o n
           THEN
                  AD D  multiIn dex+e _i to Fi nalSet
              C ALL B ui ldSet(epsilon , mult iI ndex+e_ i)            END  I F
           END  F OR 
     END FUNCTION 
      

2.  Given  theset,  $ \m a thc al I(L) $ ,w e  eva lu at e. H ere  w e hav e tw o  ch oices:
    -  Eva l uate  t he  indivi dual terms ${ {\ ensuremath {{ \bo ldsymb o l  \Delta} }}}[{F_{{{\ensuremath{{ { \ensure mat h{{\b olds ymbol \al pha }}}}}} },{ { \ensur emath{ {{\en su rem a t h{{\b o l ds ymb ol  \beta}}}} } } }}} ]$ fo rever y ${{\e nsuremath{{{\ensur e mat h{{\boldsymbo l \ alph a } }} }}} } ,{ { \en su r ema t h {{{\ensuremath{ {\boldsymb ol \b eta}}}}}}} \ in\m athcalI$. Todo so ,  we use  the oper ator defi ne d in alo ng each st ochastic  and spat i al di r ec tion.  By  stori ng  th e val ues of the se te rms, w ecan ev aluat ethe MISC  with different index s ets (c ontai ned  in $\mat hca l  I( L)$), whi ch m ight be re qui red  to t est the c onve r ge nce of th e MI S C method. Mo reo v e r,  this imple m e n tat ion i s s u itable  for  adaptive methods that expand th e in d e x s etb ased  o n some criteri a a nd r eevaluat ethe MISC es timator.  O n  theotherhand,this im p l em e ntatio n ha s a  computat ion al overhea dsi n ce mos t co mp uted v alueso f ${ F _ {{{\ensuremath{{ {\ens u r emath { {\b oldsy mb ol \alp h a}}} }}}},{{\en suremath{{{ \ensur emat h{{\b oldsymb ol  \beta }}} }} }}}}$ will actuallynot c ontribu te  tothe  final  val u e  of
fig:envelope\]. In_this way,_we ensure that the_error shown_for_such “single-level_methods”_has been obtained_with the smallest_computational error possible. Again,_this is not_a_computationally practical method but is taken as a reference for what a sparse grids_Stochastic_Collocation method_with_optimal_balancing of the space and_stochastic discretization errors could achieve.

![Envelope_of SGSC_convergence curves for the test case with $d=3$_and_$N=10$.[]{data-label="fig:envelope"}](COOK_d3_N10.pdf){width="70.00000%"}

Implementation details {#ss:impl}
----------------------

To_implement MISC, we need two components:

1.  Given a_profit level parameter, $\epsilon$, we build_the quasi-optimal set_$\mathcal_I$_based on , and . One_method to achieve this is to_exploit the fact that this set_is downward closed and use the following_recursive algorithm.

    _   FUNCTION BuildSet(epsilon,_multiIndex)
 _    _  _ _FOR i =_1 to (D+N)
   _  _     __  IF_Profit(multiIndex_+_e_i) >_epsilon
  __ __     __  THEN
    _   __   _    _ ADD multiIndex+e_i to FinalSet
 _ _ _          _   CALL BuildSet(epsilon, multiIndex+e_i)
_   _ __  __ _  END IF
   _ _     _END FOR
  __    END FUNCTION
_     _   

2. _Given_the_set, $\mathcal I(L)$, we evaluate._Here we have two choices:

 _  -_  Evaluate the individual terms ${{\ensuremath{{\boldsymbol_\Delta}}}}[{F_{{{\ensuremath{{{\ensuremath{{\boldsymbol_\alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}}}]$ for every ${{\ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol_\beta}}}}}}}\in_\mathcal I$. To do so, we_use_the_operator defined in  along each_stochastic and spatial direction. By storing_the values of these terms, we can evaluate the_MISC with different_index sets (contained in $\mathcal_I(L)$),_which_might be required to test the convergence of the MISC_method. Moreover,_this implementation is_suitable for adaptive methods that expand the index set based_on some criteria and reevaluate the MISC_estimator. On the other hand, this implementation has a computational overhead_since most computed values of ${F_{{{\ensuremath{{{\ensuremath{{\boldsymbol \alpha}}}}}}},{{\ensuremath{{{\ensuremath{{\boldsymbol \beta}}}}}}}}}$_will actually not contribute to the final_value of