$B%G!<%?9=B$$H%"%k%4%j%:%`!J#2#0#0#4G/EY!K(B

$B, www.kameda-lab.org 2004/08/16

$BK\

$BK\9V5A$O#2#0#0#4G/EY#13X4|$K!"(B $BC^GHBg3XBh;03X729)3X%7%9%F%`3XN`(B $B!JCNE*9)3X%7%9%F%`!&5!G=9)3X%7%9%F%` $BC4Ev!'55EDG=@.(B
$B65< $B$B$3$A$i(B$B$r;2>H2<$5$$!#(B

$B@.@SEy(B


$B%"%C%W%G!<%H(B

$B
  • $B%"%C%W%G!<%H>pJs(B

    $B2]Bj(B

    $B!aDs=PJ}K!$K$D$$$F!a(B

    $B;f%Y!<%9$G$b9=$$$^$;$s$,!"2DG=$J8B$jEE;R%a!<%k$G$NDs=P$r$*4j$$$7$^$9!#(B
    $B4pK\E*$K%W%m%0%i%`Ds=P$J$N$G!" $B%W%m%0%i%`%=!<%9$r%F%-%9%H%U%!%$%k$H$7$FEE;R%a!<%k$NK\J8$KF~$l$F$/$@$5$$!#(B
    HTML$B%a!<%k$dFCDj$N%"%W%j%1!<%7%g%s$K0MB8$9$k7A<0(B(Word$B$J$I(B)$B$O;HMQ$7$J$$$G(B $B2<$5$$!#(B
    $B!JI,MW$,$"$l$PE:IU%U%!%$%k$r;HMQ$7$F$b$h$$$G$9$,!"(B $B;d$,1\Mw$G$-$kJ]>Z$O$"$j$^$;$s!#!K(B
    $B2<5-$N>pJs$OI,?\$G$9$N$GI,$:IU2C$7$F$/$@$5$$!#(B
    • $B;aL>(B
    • $B3X@RHV9f!J#97e!K(B
    • $BCNE*9)3X%7%9%F%`(B,$B5!G=9)3X%7%9%F%`$NJL(B
    $B!ZEE;R%a!<%k![(B $BEE;R%a!<%k$G$N%l%]!<%HDs=P%5%s%W%k(B
    $B08@h(B(To)$B!'(B [email protected]
    $B7oL>(B(Subject)$B!'(B Algorithm Report 1.1 $B"+2<5-$N;XDj$7$?7oL>$G!*!J<+F0=hM}$9$k$N$G7oL>$,0[$J$k$H8+Mn$H$92DG=@-$,$"$j$^$9!K(B

    $B!aDs=P$K$"$?$C$F$N0lHLE*Cm0U!a(B

    • $BDy@Z8e$NDs=P$O:GBg$GDL>o$NH>J,DxEY$NI>2A$K$7$+$J$i$J$$$H;W$C$F$*$$$F2<$5$$!#(B
    • $B%W%m%0%i%_%s%0;~$K$*8_$$AjCL$9$k$N$O9=$$$^$;$s$,!"%W%m%0%i%`<+BN$O(B $B3F<+$GM}2r$7$F=q$$$F$B$h$&$K!#(B
    • $BAjCL$7$?>l9g$O!"65$($?B&$H65$($?B&$G$=$l$>$lC/$K65$($?!?(B $B65$($i$l$?$+$r=q$$$FCV$$$F2<$5$$!#$^$?!"$*8_$$$KAjCL$7$F;w$?$b$N$K(B $B$J$C$F$7$^$C$F$$$k>l9g$O!"C/$HAjCL$7$"$C$?$+$r=q$$$F$*$$$F2<$5$$!#(B $B;vA0?=9p$,$"$l$P!"$h$/;w$F$$$F$b$=$N$3$H$KBP$9$k8:E@$O$7$^$;$s!#(B $B!J65$($?B&$K$O2CE@$7$^$9!#!K(B

    $B!aDs=P;~$N5;=QE*Cm0U!a(B

    • $BEE;R%a!<%k$G$O!"K\J8$K(BC Program$B$N7A<0$GAw$C$F$/$@$5$$!#(B $B<+F0=hM}$G%3%a%s%H$NCj=P$d%3%s%Q%$%k$^$G9T$&$N$G!"2~9T$,L/$J(B $B$H$3$m$KF~$C$F$$$?$j!"A43Q%9%Z!<%9$,%W%m%0%i%`Cf$KKd$^$C$F$$$k$H(B $B%3%s%Q%$%k%(%i!<$K$J$j!"I>2A$,ITMx$K$J$k2DG=@-$,$"$j$^$9!#(B
    • Outlook/Outlook Express$B%f!<%6$X!'0lIt$N(B $B%W%m%0%i%`$G<+F0%3%s%Q%$%k$,Mn$A$F$$$k$N$O!"Aw?.;~$K%a!<%k$N@_Dj$,(B
      Content-Type: text/plain; charset="iso-2022-jp"
      Content-Transfer-Encoding: quoted-printable $B"+!V(B7bit$B!W$,@5$7$$(B
      $B$H$$$&$h$&$K!"(Bquoted-printable$B$K$J$C$F$$$k$?$a$G$9!#(B $B

      $B!a2]BjFbMF!a(B

      • $BBh#12s2]Bj(B$B!J%W%m%0%i%`#1$D$H9M;!#2$D!K(B
        $B!Z=PBj![(B2004/04/20(Tue)
        $B!ZDy@Z![(B2004/04/27(Tue),08:40 JST ($BE~CeI,?\(B) $B!y;f$N>l9g$O $B!Z7oL>![(BAlgorithm Report 1

        1. $B2]Bj#1!%#1!'?<$5M%@hC5:w%W%m%0%i%`$N=PNO2~NI!JI,=$!K(B
          $B?<$5M%@hC5:w(B(2004/04/20$B$N
        2. $B%W%m%0%i%`%=!<%9$rAw$k$3$H!#(B
        3. $B=PNO7k2L$r%W%m%0%i%`%=!<%9Fb$N%3%a%s%HFb$KD%$j9~$_!"(B $B4JC1$J2r@b$rIU$12C$($k$3$H!#(B

      $B%5%s%W%kL>(B SAMPLE A
      $BSAMPLE B
      edge[8][8]= {{0,1,0,0,1,0,0,0},
      {1,0,0,0,0,0,1,0},
      {0,0,0,1,0,0,1,0},
      {0,0,1,0,0,0,0,1},
      {1,0,0,0,0,1,0,0},
      {0,0,0,0,1,0,1,0},
      {0,1,1,0,0,1,0,1},
      {0,0,0,1,0,0,1,0}}
      {{0,1,0,0,1,0,1,0},
      {1,0,1,0,1,1,0,0},
      {0,1,0,1,0,0,1,0},
      {0,0,1,0,0,0,0,0},
      {1,1,0,0,0,0,0,0},
      {0,1,0,0,0,0,0,0},
      {1,0,1,0,0,0,0,1},
      {0,0,0,0,0,0,1,0}}
      $B=PNONc(B
      $B!J$3$NDL$j$G$"$kI,MW$OA4$/$J$$!K(B
      0 -> 1 -> 6 -> 2 -> 3 -> 7
      (6)-> 5 -> 4
      0 -> 1 -> 2 -> 3
      (2)-> 6 -> 7
      (1)-> 4
      (1)-> 5

    • $B2]Bj#1!%#2!'O"7k%0%i%UH=Dj%"%k%4%j%:%`!JI,=$!K(B
      $B?<$5M%@hC5:w%W%m%0%i%`$r1~MQ$9$l$P!"F~NO$5$l$?%0%i%U$,O"7k%0%i%U$G$"(B $B$k$+$I$&$+$rH=Dj$9$k%W%m%0%i%`$r:n@.$9$k$3$H$,$G$-$k!#$=$N%"%k%4%j(B $B%:%`$r9M$(!"5-=R$;$h!J<+M3=q<0!&F|K\8l$G$h$$!K!#(B
      • $B9M;!$O(B1.$B$N%W%m%0%i%`%=!<%9Fb$N%3%a%s%H$KD%$j9~$`$3$H!#(B
      • $B%W%m%0%i%`$r:n@.$7$?>l9g$O(B1.$B$H$N%W%m%0%i%`$H$N6-3&$rL@3N$K$7(B $B$?>e$G%a!<%kK\BN$K$D$1$FAw$k$3$H!#(B

    • $B2]Bj#1!%#3!'O"[email protected],%+%&%s%H%"%k%4%j%:%`!JI,=$!K(B
      $B?<$5M%@hC5:w%W%m%0%i%`$r1~MQ$9$l$P!"F~NO$5$l$?%0%i%U$KO"[email protected],$,(B $B4v$D$"$k$+?t$($k%W%m%0%i%`$r:n@.$9$k$3$H$b$G$-$k!#!JO"[email protected],$H$O!"(B mail protected],Fb$N$I$ND:E@$b4v$D$+$NJU$r7PM3$7$F$*8_$$$KE~C#$9$k$3$H$,$G(B $B$-$kItJ,%0%i%U$G$"$k!#!K$=$N%"%k%4%j%:%`$r9M$(!"5-=R$;$h!J<+M3=q<0!&(B $BF|K\8l$G$h$$!K!#(B
      • $B9M;!$O(B1.$B$N%W%m%0%i%`%=!<%9Fb$N%3%a%s%H$KD%$j9~$`$3$H!#(B
      • $B%W%m%0%i%`$r:n@.$7$?>l9g$O(B1., 2.$B$H$N%W%m%0%i%`$H$N6-3&$r(B $BL@3N$K$7$?>e$G%a!<%kK\BN$K$D$1$FAw$k$3$H!#(B

    • $BBh#22s2]Bj(B
      $B!Z=PBj![(B2004/05/11(Tue)
      $B!ZDy@Z![(B2004/05/18(Tue),08:40 JST ($BE~CeI,?\(B)
      $B!Z7oL>![2<5-;2>H(B

      1. $B2]Bj#2!%#1!'(B $B7PO)I=<($r4^$`(BFloyd$B%"%k%4%j%:%`$N
        $B!Z7oL>(B:Subject$B![(BAlgorithm Report 2.1
        $BA4E@BP$K$D$$$F!":G>.7PO)$r5a$a$k(BFloyd$B$N%"%k%4%j%:%`$r(BC$B$G:n@.$7!"(B $B
      2. $B$B

        SAMPLE weight matrix cost[i,j] div[i,j] $B7PO)I=<(Nc(B
        A (N=6)
        #define NC 999999 // Infinitely big number
        int w[N][N] = {
          {  0, NC, NC,  8, 15, NC},
          { 10,  0, 24, NC,  8, NC},
          { NC, NC,  0, NC, NC,  6},
          { NC, NC, NC,  0,  5, NC},
          { NC, NC, 12, NC,  0,  7},
          { NC, NC,  3, NC, NC,  0}};
         *  - 23  8 13 20 
        10  * 18 18  8 15 
         -  -  *  -  -  6 
         -  - 15  *  5 12 
         -  - 10  -  *  7 
         -  -  3  -  -  * 
         0 -1  5  0  3  4 
         1  1  5  0  1  4 
        -1 -1  2 -1 -1  2 
        -1 -1  5  3  3  4 
        -1 -1  5 -1  4  4 
        -1 -1  5 -1 -1  5 
         0 =>  1 [--]
         0 =>  2 [23]  0  3  4  5  2
         0 =>  3 [ 8]  0  3
         0 =>  4 [13]  0  3  4
         0 =>  5 [20]  0  3  4  5
         1 =>  0 [10]  1  0
         1 =>  2 [18]  1  4  5  2
        $B!J0J2
        
        B (N=12)
        #define NC 999999 // Infinitely big number
        int w[N][N] = {
          { 0, 4,NC,NC, 3,NC,NC,NC,NC,NC,NC,NC},
          { 4, 0, 1,NC,NC,NC, 2,NC,NC,NC,NC,NC},
          {NC, 1, 0, 1,NC,NC,NC, 2,NC,NC,NC,NC},
          {NC,NC, 1, 0,NC,NC,NC,NC,NC,NC,NC,NC},
          { 3,NC,NC,NC, 0, 1,NC,NC, 1,NC,NC,NC},
          {NC,NC,NC,NC, 1, 0, 2,NC,NC, 2, 3,NC},
          {NC, 2,NC,NC,NC, 2, 0,NC,NC,NC, 3,NC},
          {NC,NC, 2,NC,NC,NC,NC, 0,NC,NC,NC,NC},
          {NC,NC,NC,NC, 1,NC,NC,NC, 0,NC,NC,NC},
          {NC,NC,NC,NC,NC, 2,NC,NC,NC, 0,NC,NC},
          {NC,NC,NC,NC,NC, 3, 3,NC,NC,NC, 0, 1},
          {NC,NC,NC,NC,NC,NC,NC,NC,NC,NC, 1, 0}
        };
         *  4  5  6  3  4  6  7  4  6  7  8 
         4  *  1  2  5  4  2  3  6  6  5  6 
         5  1  *  1  6  5  3  2  7  7  6  7 
         6  2  1  *  7  6  4  3  8  8  7  8 
         3  5  6  7  *  1  3  8  1  3  4  5 
         4  4  5  6  1  *  2  7  2  2  3  4 
         6  2  3  4  3  2  *  5  4  4  3  4 
         7  3  2  3  8  7  5  *  9  9  8  9 
         4  6  7  8  1  2  4  9  *  4  5  6 
         6  6  7  8  3  2  4  9  4  *  5  6 
         7  5  6  7  4  3  3  8  5  5  *  1 
         8  6  7  8  5  4  4  9  6  6  1  * 
         0  0  1  2  0  4  1  2  4  5  5 10 
         1  1  1  2  5  6  1  2  4  5  6 10 
         1  2  2  2  5  6  1  2  4  5  6 10 
         1  2  3  3  5  6  1  2  4  5  6 10 
         4  6  1  2  4  4  5  2  4  5  5 10 
         4  6  1  2  5  5  5  2  4  5  5 10 
         1  6  1  2  5  6  6  2  4  5  6 10 
         1  2  7  2  5  6  1  7  4  5  6 10 
         4  6  1  2  8  4  5  2  8  5  5 10 
         4  6  1  2  5  9  5  2  4  9  5 10 
         4  6  1  2  5 10 10  2  4  5 10 10 
         4  6  1  2  5 10 10  2  4  5 11 11 
         0 =>  1 [ 4]  0  1
         0 =>  2 [ 5]  0  1  2
         0 =>  3 [ 6]  0  1  2  3
         0 =>  4 [ 3]  0  4
         0 =>  5 [ 4]  0  4  5
         0 =>  6 [ 6]  0  1  6
         0 =>  7 [ 7]  0  1  2  7
         0 =>  8 [ 4]  0  4  8
         0 =>  9 [ 6]  0  4  5  9
         0 => 10 [ 7]  0  4  5 10
         0 => 11 [ 8]  0  4  5 10 11
         1 =>  0 [ 4]  1  0
         1 =>  2 [ 1]  1  2
         1 =>  3 [ 2]  1  2  3
         1 =>  4 [ 5]  1  6  5  4
         1 =>  5 [ 4]  1  6  5
         1 =>  6 [ 2]  1  6
         1 =>  7 [ 3]  1  2  7
        $B!J0J2
        

      3. $B2]Bj#2!%#2!'(B $B3NN(@Q$r7PO)$H$7$F;}$D%0%i%U$KBP$9$k%W%m%0%i%`!J<+M3!K(B
        $B!Z7oL>(B:Subject$B![(BAlgorithm Report 2.2
        $B3NN(@Q$r7PO)$H$7$F;}$D%0%i%U$KBP$9$k!"(BFloyd$B%"%k%4%j%:%`$r(BC$B$G:n@.$7!"(B $Be(B1.0$B0J2<$H$9$k!#(B $BK\2]Bj$OI,=$$G$O$J$$!#(B
        • $B7PO)%3%9%H$O!"$=$N7PO)$r9=@.$9$kJU$N3NN($N(B$B@Q(B$B$G(B $BM?$($i$l$k!#(B
        • $B5a$a$k7PO)$O!"G$0UCOE@4V$N(B$B3NN(:GBg(B$B$N7PO)$G$"$k!#(B
        • $BDs=P$r@5$7$/;XDj$9$k$3$H!#(B
        • $B$B$BDj?t(BNC$B$,$J$<(B0.0$B$G$"$k$N$+$H!"(Bw[i,i]$B$,(B1.0$B$G$J$/$F$O$$$1$J$$(B $BM}M3$r=R$Y$h!#(B

        SAMPLE weight matrix cost[i,j] div[i,j] $B7PO)I=<(Nc(B
        A (N=6)
        #define NC 0.0
        float w[N][N] = {
          { 1.00,   NC,   NC, 0.08, 0.15,   NC},
          { 0.10, 1.00, 0.24,   NC, 0.80,   NC},
          {   NC,   NC, 1.00,   NC,   NC, 0.60},
          {   NC,   NC,   NC, 1.00, 0.50,   NC},
          {   NC,   NC, 0.12,   NC, 1.00, 0.70},
          {   NC,   NC, 0.30,   NC,   NC, 1.00}};
        ****** ------ 0.0315 0.0800 0.1500 0.1050 
        0.1000 ****** 0.2400 0.0080 0.8000 0.5600 
        ------ ------ ****** ------ ------ 0.6000 
        ------ ------ 0.1050 ****** 0.5000 0.3500 
        ------ ------ 0.2100 ------ ****** 0.7000 
        ------ ------ 0.3000 ------ ------ ****** 
         0 -1  5  0  0  4 
         1  1  1  0  1  4 
        -1 -1  2 -1 -1  2 
        -1 -1  5  3  3  4 
        -1 -1  5 -1  4  4 
        -1 -1  5 -1 -1  5 
         0 =>  1 [------]
         0 =>  2 [0.0315]  0  4  5  2
         0 =>  3 [0.0800]  0  3
         0 =>  4 [0.1500]  0  4
         0 =>  5 [0.1050]  0  4  5
         1 =>  0 [0.1000]  1  0
         1 =>  2 [0.2400]  1  2
         1 =>  3 [0.0080]  1  0  3
        $B!J0J2
        

    • $BBh#32s2]Bj(B
      $B!Z=PBj![(B2004/05/25(Tue)
      $B!ZDy@Z![(B2004/06/01(Tue),08:40 JST ($BE~CeI,?\(B)
      $B!Z7oL>![2<5-;2>H(B

      1. $B2]Bj#3!%#1!'(B N=6$B$K$*$1$k53;N$N<~M7%"%k%4%j%:%`$N
        $B!Z7oL>(B:Subject$B![(BAlgorithm Report 3.1
        $B53;N$N<~M7(B(Closed Knight's Tour)$B$H$O!"53;N$N=d2s$K2C$($F!"(B $B:G8e$N%^%9$+$i3+;O0LCV$K#1
      2. $B5a$a$?7PO)$rA4$F%W%m%0%i%`$N%3%a%s%H$KF~$l$kI,MW$O$J$$!#(B $B?tNc$N$_F~$l$k$3$H!#(B
      3. $B2r?t$O%3%a%s%H$H$7$F=q$-9~$`$3$H!#(B
      4. $B:#8e$N;29M$^$G$K!";HMQ4D6-$H$Bl9g!"Hs>o$K;~4V(B $B$,$+$+$k!J#53,7W;;5!<<$N#P#C$G#6!A#8;~4V!)!K$N$GCm0U$9$k$3$H!#(B

  • $B2]Bj#3!%#2!'(B N=6$B$K$*$1$k53;N$N<~M7%"%k%4%j%:%`$NI>2A2s?t%+%&%s%H!J<+M3!K(B
    $B!Z7oL>(B:Subject$B![(BAlgorithm Report 3.2
    • $B<~M77PO)$r5a$a$k:]$K!"Ht$S@h$NI>2A2s?t$,2?2s$K$J$C$?$+$r(B $B=PNO$9$k%W%m%0%i%`$r=q$$$F$BI>2A2s?t$r%3%a%s%H$H$7$F=q$-9~$`$3$H!#(B
    • $B2s?t$NCM$O!"DL>o$N(Bint$B7?$GI=<($G$-$k?t;z$h$jBg$-$JI=8=$K(B $B$J$k!#$I$N$h$&$J8+@Q$b$j!J$J$$$79)IW!K$r$7$FHs>o$KBg$-$J?t;z(B $B$KBP1~$G$-$k%W%m%0%i%`$K$7$?$+$r%3%a%s%HIt$K5-=R$;$h!#(B

  • $B;29M(B
    $B#69T#5Ns$N%5%$%:$G$O2r$O#1#6DL$j!"I>2A2s?t$O#82/2s
  • $BBh#42s2]Bj(B
    $B!Z=PBj![(B2004/06/08(Tue)
    $B!ZDy@Z![(B2004/06/15(Tue),08:40 JST ($BE~CeI,?\(B)
    $B!ZBjL\![(B$B!Z7oL>(B:Subject$B![(BAlgorithm Report 4

    $B2]Bj#4!'(B $B9TNs$N>h;;2s?t$N:G>.2=$r9T$$!"$=$N1i;;2aDx$r<($;!JI,=$!K(B
    $B>h;;=g=x$NI=<($O!"(B((A(BC))((DE)F))$B!"$^$?$O(B ((1(23))((45)6))$B$N$h$&$K$9$k$3$H!#$?$@$7!"$3$N$h$&$K3g8L(B $B$GI=8=$9$k$3$H$,:$Fq$G$"$l$P!"1i;;=g=x$,2?$i$+$N7A$GJ,$+(B $B$k$h$&$K=PNO$9$k$h$&$K$7$F$b$h$$!#(B $B:n@.$7$?%W%m%0%i%`$K N as[...] Amount Operation 6 30, 35, 15, 5, 10, 20, 25 15125 ((A(BC))((DE)F)) 7 20, 15, 30, 5, 300, 80, 21, 18 135840 ((A(BC))(((DE)F)G)) 11 20, 22, 31, 800, 15, 1700, 50, 20, 11, 2, 30, 400 339284 ((A(B(C(D(E(F(G(HI))))))))(JK)) 18 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 694 (A(((BC)((DE)((FG)((HI)((JK)((LM)((NO)(PQ))))))))R))

  • $BBh#52s2]Bj(B
    $B!Z=PBj![(B2004/06/22(Tue)
    $B!ZDy@Z![(B2004/07/02(Fri),17:00 JST ($BE~CeI,?\(B)
    $B!ZBjL\![2<5-;2>H(B

    1. $B2]Bj#5!%#1!'(B $B?<$5M%@hC5:w%"%k%4%j%:%`$r$b$H$K$7$?=d2s%;!<%k%9%^%sLdBj(B $B$N2rK!$N
      $B!Z7oL>(B:Subject$B![(BAlgorithm Report 5.1
      $B?<$5M%@hC5:w%"%k%4%j%:%`$r$b$H$K$7$F!"=d2s%;!<%k%9%^%sLd(B $BBj$r2r$/%W%m%0%i%`$r:n@.$;$h!#(B
      • $B2<5-Nc$KBP$7$F!":G>.%3%9%H$H5a$a$?%O%_%k%H%s7PO)$r<($9$3$H!#(B
      • $B9)IW$7$?E@$r%3%a%s%H$K5-=R$9$k$3$H!#(B

    2. $B2]Bj#5!%#2!'(B $B=d2s%;!<%k%9%^%sLdBj$KBP$9$k#26a;w%"%k%4%j%:%`$N
      $B!Z7oL>(B:Subject$B![(BAlgorithm Report 5.2
      $B:G>.%3%9%H%9%Q%K%s%0LZ$rMxMQ$7$?#26a;w%"%k%4%j%:%`$K$h$k(B $B%W%m%0%i%`$r:n@.$;$h!#(B
      • $B:G>.%3%9%H%9%Q%K%s%0LZ$r5a$a$kItJ,$b:n@.$9$k$3$H!#(B
      • $B:G>.%3%9%H%9%Q%K%s%0LZ$r5a$a$kItJ,$O(B $B$N%"%k%4%j%:%`$G$b$h$$!#(B
      • $BJU$N%=!<%F%#%s%0$K$D$$$F$O!"(B N^2$B$N7W;;%3%9%H$,$+$+$k%"%k%4%j%:%`$G$b$h$$!#(B
      • $B6a;w2r$H$=$N%O%_%k%H%s7PO)$r<($9$3$H!#(B
      • $B:GE,2r$H$NHf3S$r9T$C$?>l9g$O!"(B $B:GE,2r$H$=$N7PO)$K$D$$$F$b<($7!"(B $BK\

      • $BCm0U(B
        $BC10L$,$"$k>l9g$O%a!<%kCf$NL\N)$D$H$3$m(B $B$K!JA0$N$[$&$K!K$=$N;]$r?=9p$7$F$/$@$5$$!#(B

      • $B;29M(B
        12-15$BD:E@$K$h$k40A4%0%i%U$NNc$r5s$2$F$*$-$^$9!#(B 14$BD:E@0J>e$K$D$$$F$O!";X?t;~4V%W%m%0%i%`$N$[$&$N $B2]Bj(B5.1/5.2$BN>MQ(B SAMPLE_A
        #define N 12
        int w[N][N] = {
               A    B    C    D    E    F    G    H    I    J    K    L
        A  {   0, 205, 241,  32, 253,  27,  89, 280, 163, 189, 105, 130 },
        B  { 205,   0, 144,  16, 212, 133, 101, 272,  52, 295, 120,  67 },
        C  { 241, 144,   0, 295,  30, 156,  42, 192, 259, 224, 126, 166 },
        D  {  32,  16, 295,   0, 283, 180,  43, 186, 195, 180,  30,  59 },
        E  { 253, 212,  30, 283,   0, 162,  96, 191,  90, 168,   3, 156 },
        F  {  27, 133, 156, 180, 162,   0, 164, 152, 174, 207, 226, 235 },
        G  {  89, 101,  42,  43,  96, 164,   0,  55, 160,  86, 158, 200 },
        H  { 280, 272, 192, 186, 191, 152,  55,   0, 114, 249, 292,   8 },
        I  { 163,  52, 259, 195,  90, 174, 160, 114,   0, 295, 241, 246 },
        J  { 189, 295, 224, 180, 168, 207,  86, 249, 295,   0, 209, 234 },
        K  { 105, 120, 126,  30,   3, 226, 158, 292, 241, 209,   0,  37 },
        L  { 130,  67, 166,  59, 156, 235, 200,   8, 246, 234,  37,   0 }
        };
        	 
        $B2]Bj(B5.1/5.2$BN>MQ(B SAMPLE_12
        #define N 12
        int w[N][N] = {
          {   0, 122,  73,  54,  50, 140, 130, 100,  36,  85, 139,  73 },
          { 122,   0,  50,  70, 108,  28,  14,  89, 100, 100,  32, 166 },
          {  73,  50,   0,  20,  72,  73,  61,  81,  51,  81,  67, 127 },
          {  54,  70,  20,   0,  63,  92,  81,  85,  32,  81,  85, 114 },
          {  50, 108,  72,  63,   0, 117, 112,  54,  71,  36, 135,  58 },
          { 140,  28,  73,  92, 117,   0,  14,  85, 124, 100,  51, 175 },
          { 130,  14,  61,  81, 112,  14,   0,  86, 112,  99,  40, 170 },
          { 100,  89,  81,  85,  54,  85,  86,   0, 108,  20, 121, 100 },
          {  36, 100,  51,  32,  71, 124, 112, 108,   0,  98, 112, 108 },
          {  85, 100,  81,  81,  36, 100,  99,  20,  98,   0, 130,  81 },
          { 139,  32,  67,  85, 135,  51,  40, 121, 112, 130,   0, 192 },
          {  73, 166, 127, 114,  58, 175, 170, 100, 108,  81, 192,   0 }
        };
        	 
        $B2]Bj(B5.1/5.2$BN>MQ(B SAMPLE_13
        #define N 13
        int w[N][N] = {
          {   0, 120, 136,  91,  22,  32,  42, 104, 110, 108, 128, 120,  81 },
          { 120,   0,  91,  36, 130, 136,  98, 127,  10, 197,  92,  89, 100 },
          { 136,  91,   0,  73, 156, 130,  94, 197,  90, 240,  10, 173, 166 },
          {  91,  36,  73,   0, 104, 102,  63, 125,  28, 180,  71, 100,  94 },
          {  22, 130, 156, 104,   0,  50,  64,  89, 120,  86, 149, 114,  71 },
          {  32, 136, 130, 102,  50,   0,  40, 136, 126, 130, 121, 150, 112 },
          {  42,  98,  94,  63,  64,  40,   0, 130,  89, 150,  86, 130, 100 },
          { 104, 127, 197, 125,  89, 136, 130,   0, 120,  91, 193,  51,  32 },
          { 110,  10,  90,  28, 120, 126,  89, 120,   0, 188,  91,  85,  92 },
          { 108, 197, 240, 180,  86, 130, 150,  91, 188,   0, 233, 140, 102 },
          { 128,  92,  10,  71, 149, 121,  86, 193,  91, 233,   0, 171, 162 },
          { 120,  89, 173, 100, 114, 150, 130,  51,  85, 140, 171,   0,  45 },
          {  81, 100, 166,  94,  71, 112, 100,  32,  92, 102, 162,  45,   0 }
        };
        	 
        $B2]Bj(B5.1/5.2$BN>MQ(B SAMPLE_14
        #define N 14
        int w[N][N] = {
          {   0,  73, 156, 130,  94, 197,  90, 240,  10, 173, 166, 175, 227, 234 },
          {  73,   0, 104, 102,  63, 125,  28, 180,  71, 100,  94, 140, 170, 170 },
          { 156, 104,   0,  50,  64,  89, 120,  86, 149, 114,  71,  50,  71,  85 },
          { 130, 102,  50,   0,  40, 136, 126, 130, 121, 150, 112,  45, 112, 133 },
          {  94,  63,  64,  40,   0, 130,  89, 150,  86, 130, 100,  82, 135, 148 },
          { 197, 125,  89, 136, 130,   0, 120,  91, 193,  51,  32, 136,  95,  70 },
          {  90,  28, 120, 126,  89, 120,   0, 188,  91,  85,  92, 161, 180, 175 },
          { 240, 180,  86, 130, 150,  91, 188,   0, 233, 140, 102, 100,  20,  22 },
          {  10,  71, 149, 121,  86, 193,  91, 233,   0, 171, 162, 166, 219, 228 },
          { 173, 100, 114, 150, 130,  51,  85, 140, 171,   0,  45, 164, 141, 120 },
          { 166,  94,  71, 112, 100,  32,  92, 102, 162,  45,   0, 120, 100,  85 },
          { 175, 140,  50,  45,  82, 136, 161, 100, 166, 164, 120,   0,  81, 110 },
          { 227, 170,  71, 112, 135,  95, 180,  20, 219, 141, 100,  81,   0,  36 },
          { 234, 170,  85, 133, 148,  70, 175,  22, 228, 120,  85, 110,  36,   0 }
        };
        	 
        $B2]Bj(B5.1/5.2$BN>MQ(B SAMPLE_15
        #define N 15
        int w[N][N] = {
          {   0,  50,  64,  89, 120,  86, 149, 114,  71,  50,  71,  85,  22,  73,  86 },
          {  50,   0,  40, 136, 126, 130, 121, 150, 112,  45, 112, 133,  63,  76,  54 },
          {  64,  40,   0, 130,  89, 150,  86, 130, 100,  82, 135, 148,  63,  42,  92 },
          {  89, 136, 130,   0, 120,  91, 193,  51,  32, 136,  95,  70,  73, 104, 175 },
          { 120, 126,  89, 120,   0, 188,  91,  85,  92, 161, 180, 175, 102,  51, 180 },
          {  86, 130, 150,  91, 188,   0, 233, 140, 102, 100,  20,  22,  92, 150, 140 },
          { 149, 121,  86, 193,  91, 233,   0, 171, 162, 166, 219, 228, 142,  89, 163 },
          { 114, 150, 130,  51,  85, 140, 171,   0,  45, 164, 141, 120,  92,  92, 198 },
          {  71, 112, 100,  32,  92, 102, 162,  45,   0, 120, 100,  85,  50,  73, 156 },
          {  50,  45,  82, 136, 161, 100, 166, 164, 120,   0,  81, 110,  72, 110,  41 },
          {  71, 112, 135,  95, 180,  20, 219, 141, 100,  81,   0,  36,  81, 139, 120 },
          {  85, 133, 148,  70, 175,  22, 228, 120,  85, 110,  36,   0,  86, 141, 151 },
          {  22,  63,  63,  73, 102,  92, 142,  92,  50,  72,  81,  86,   0,  58, 106 },
          {  73,  76,  42, 104,  51, 150,  89,  92,  73, 110, 139, 141,  58,   0, 130 },
          {  86,  54,  92, 175, 180, 140, 163, 198, 156,  41, 120, 151, 106, 130,   0 }
        };
        	 

  • $B;n83(B
    $B

    $B9pCN(B

    $B2]Bj$=$N$b$N$KD>@\$*Ez$($O$G$-$^$;$s$,!"2]BjDs=P$K4X$o$k#C8@8l(B $B$N%W%m%0%i%_%s%0AjCL$r!"ITDj4|$J$,$i3+:E$7$^$9!#(BTA$B$,AjCL$K$N$j$^$9!#(B $B;~4V8BDj$G$9$N$GCm0U$7$F$/$@$5$$!#(B
    $B4uK>:j(B(tanishi)$B!";3K\(B(haruyosh)$B!"55ED(B(kameda)$B$K(B @image.esys.tsukuba.ac.jp$B$r$D$1$F2<$5$$!K$r$*4j$$$7$^$9!#(B
    • 2004/4/22(Thu), 17:00-18:00
      $B!!!!>l=j!'(B3L302$B!JI,MW$,$"$l$P(B5L502$B$K0\F0$9$k$3$H$b$"$j$^$9!K(B
      $B!!!!#T#A!'@>:j!JM}9)3X8&5f2J#1G/!KC4EvM=Dj(B

    • 2004/4/23(Fri), 16:30-18:00
      $B!!!!>l=j!'(B3L302$B!JI,MW$,$"$l$P(B5L502$B$K0\F0$9$k$3$H$b$"$j$^$9!K(B
      $B!!!!#T#A!';3K\!J%7%9%F%`>pJs3X8&5f2J#1G/!KC4EvM=Dj(B

    $B

    2004/08/16$B8=:_!#(B
    $B2JL\HV9f(B/$BCNE*9)3X(B  3206/S513111
    $B2JL\HV9f(B/$B5!G=9)3X(B  3240/S613111
    $B1QL>(B               Data Structure and Algorithm
    $BC4Ev6541(B           $B55EDG=@.(B
    $B8&5f<<(B             3M304
    $BEEOC(B               5256
    Office Hour        Weekday 10:00-18:00
    e-mail             [email protected]
    $B4XO"2JL\(B           $B7W;;5!=xO@(BII(S511024/S611024)
                       $B%W%m%0%i%_%s%0=xO@(B(S511034/S611034)
                       $B%0%i%UM}O@(B(S512041/S612041)
    $Bhttp://www.kameda-lab.org/lecture/course-a-j.html
    
    $B!|4XO">pJs!'(B
    
    $BF1L>$NCNE*9)3XG[Ev2JL\$H5!G=9)3XG[Ev2JL\$OF10l$l$NLdBj$K9g$o$;$F!"(B
    $B%W%m%0%i%_%s%0>e$GLdBj$r$I$N$h$&$KI=$9$Y$-$+!"pJs=hM}G=NO$HO@M}E*!&(B
    $B?t3XE*;W9M!&2r@OG=NO$r=,F@$7$F$b$i$&!#(B
    
    $B!|;HMQ652J=q!";29M=q!'(B
    
    $B652J=q$O;HMQ$7$J$$!#;29M=q$H$7$F$O2<5-$N$b$N$r5s$2$F$*$/!#(B
    $B!}%"%k%4%j%:%`$H%G!<%?9=B$!=2~D{(BC$B8@8lHG!JEE5$9)3XF~Lg%7%j!<%:!K(B
    $BJ?EDIYIW(B($BCx(B)$B?9KL=PHG(B(2002/09),ISBN:462772652X / 2,200$B1_(B
    $B!}%"%k%4%j%:%`%$%s%H%m%@%/%7%g%s!JA4;04,!K(B
    Thomas H. Cormen $BB>(B($B86Cx(B),$B@uLnE/IW(B $BB>(B($BK]Lu(B),$B6aBe2J3X(B($BK]Lu(B),$B6aBe2J3X
    
    $B!|C10L2A4p=`!'(B
    
    $B$[$\3V=5$G%l%]!<%H2]Bj$r=P$9!#:GDc(B6$B3d0J>eDs=P$9$k$3$H!#(B
    $B!:@Z$r2a$.$?Ds=P$KBP$7$F$O!"FbMF$,NI$/$H$bI>E@$OH>J,$7$+M?$($J$$!#(B
    $B@.@SI>2A$O86B'$H$7$F%l%]!<%H$N$_$G9T$$!"%l%]!<%H2]Bj$NI>E@Am7W$,(B6$B3d0J>e$G9g3J!J(B60%$B0J>e(B70%$BL$K~$r(BC$BI>2A!"(B70%$B0J>e(B80%$BL$K~$r(BB$BI>2A!"(B80%$B0J>e$r(BA$BI>2A!K$H$9$k!#(B
    60%$BL$K~$O(BD$BI>2A$H$7$FC10L$OG'Dj$7$J$$!#%l%]!<%H2]Bj$NI>2AeDs=P$9$k$3$H!#(B
    $B!:@Z$r2a$.$?Ds=P$KBP$7$F$O!"FbMF$,NI$/$H$bI>E@$OH>J,$7$+M?$($J$$!#(B
    $B@.@SI>2A$O86B'$H$7$F%l%]!<%H$N$_$G9T$&!#(B
    $B%l%]!<%H2]Bj$NI>E@Am7W$,(B6$B3d0J>e$G9g3J$H$9$k!#(B
    60%$B0J>e(B70%$BL$K~$r(BC$BI>2A!"(B
    70%$B0J>e(B80%$BL$K~$r(BB$BI>2A!"(B
    80%$B0J>e$r(BA$BI>2A$H$9$k!#(B
    60%$BL$K~$O(BD$BI>2A$H$7$FC10L$OG'Dj$7$J$$!#(B
    $B%l%]!<%H2]Bj$NI>2A
    
    $B!|$`$3$H!'(B
    
    $B%3%s%T%e!<%?$,$$$/$i9bB.$K$J$C$F$b!"0MA3$H$7$F2r$1$J$$LdBj$O?tB?$/$"$k$3$H$H!"8=e2A(B
    $B$$$m$$$m$J%"%k%4%j%:%`!?CV$-49$(!&6a;w(B
    $B!!LdBj$NCV49!&JQ49(B
    $B!!!!!!(BKnapsack=$B:GD97PO)LdBj(B
    $B!!lEM_K!(B
    $B!!!!!!(BFractional Knapsack
    $B!!!!!!(BKnapsack by Fully polynomial time approximation
    $B!!=d2s%;!<%k%9%^%sLdBj(B
    $B!!!!!!:GE,2r(B
    $B!!!!!!Fs6a;w%"%k%4%j%:%`(B
    

    $B!Z(B $B#2#0#0#4G/EY%7%i%P%9$N%3%T!<(B(PDF)$B![(B


    <[email protected]>