・筑波大学へ. いや~, 遠かった.
想定外で3年ほど前に沖縄のSWoPPでニアミスしていた方と再開(じゃなくて初対面, でも一緒に仕事したことが...).
世の中狭い.
・↓3 直ったかも.
・『心の中にもっている問題』(長田弘)
"仕事は, 為事(しごと)だ. 仕えることではなく, 為す事なのだ." ほほう.
・疲れたので今日は寝ます. ああ, 明後日締め切りの原稿が... ごめんなさい.
input polynomials are: G[0]=abcdef G[1]=abcde + bcdef G[2]=abcd + bcde + cdef G[3]=abc + bcd + cde + def G[4]=ab + bc + cd + de + ef computing Groebner basis. result: G[0]=cd G[1]=ab + bc + de + ef G[2]=def G[3]=cef + bc G[4]=bef + ef G[5]=aef + bc + ef G[6]=bcf + bc G[7]=bde + de G[8]=ade + de G[9]=bce + bc
with(Ore_algebra):
A:=poly_algebra(a,b,c,d,e,f,g,h,
alg_relations={a^2+a,b^2+b,c^2+c,d^2+d,e^2+e,f^2+f},
characteristic=2);
with(Groebner):
T:=termorder(A,tdeg(a,b,c,d,e,f,g,h)):
G:=[a*b*c*d*e*f,
a*b*c*d*e + b*c*d*e*f,
a*b*c*d + b*c*d*e + c*d*e*f,
a*b*c + b*c*d + c*d*e + d*e*f,
a*b + b*c + c*d + d*e + e*f];
gbasis(G,T);
結果
G:=[abcdef, abcde + bcdef, abcd + bcde + cdef,
abc + bcd + cde + def, ab + bc + cd + de + ef]
>[cd, ab + bc + de + ef, def, cef + bc, cfb + bc, ebc + bc]
・『谷崎潤一郎随筆集』(篠田一士編)input polynomials. type .(period) if you want to stop. abcdef G[0]=abcdef abcde+bcdef G[1]=abcde + bcdef abcd+bcde+cdef G[2]=abcd + bcde + cdef abc+bcd+cde+def G[3]=abc + bcd + cde + def ab+bc+cd+de+ef G[4]=ab + bc + cd + de + ef . input end. computing Groebner basis. add poly:acde + acef + adef + cde + def add poly:acef + adef + acd + def + cd add poly:def add poly:cde + cd add poly:cef + bc add poly:cd add poly:bcf + bc result: G[0]=cd G[1]=ab + bc + de + ef G[2]=def G[3]=cef + bc G[4]=bcf + bc G[5]=bce + bc
F2poly f; istr >> asALPHABET >> f; cout << "f=" << f << endl; cout << asMAPLE << f << endl; cout << asSIMPLE << f << endl; cout << asALPHABET << f << endl;
x[1] * x[2] * x[4] * x[5] * x[6] + x[1] * x[2] * x[4] + x[1] * x[16] * x[19] + x[5] + 1 (1, 2, 4, 5, 6) + (1, 2, 4) + (1, 16, 19) + (5) + 1 abdef + abd + aps + e + 1・あ, ちゃんと仕事はしてるぞ. 今週は(独自のずぼら形式)動画受信再生部 for Win/Linux 開発開始. 昨日, アルファ版が動きだした. Win <-> Linux間でデータ再生しあって, ちょっと自己満足. UDP使うの初めて. LinuxとWindowsってバッファの管理の挙動がちゃうみたいで手間取った.
cout << "F is {" << endl;
for (int i = 0; i < F.size(); i++) {
cout << " F[" << i << "]=" << F[i] << "," << endl;
}
cout << "}" << endl;
cout << "F " << (F2poly::isGbase(F) ? "is" : "isn't")
<< " Groebner basis" << endl;
cout << "make Groebner basis" << endl;
F2poly::makeGbaseBy(F);
...
F is {
F[0]=x[2] * x[3] * x[7] + x[1] * x[2],
F[1]=x[3] * x[5] + 1,
F[2]=x[4],
}
F isn't Groebner basis
make Groebner basis
F is {
F[0]=x[2] * x[3] * x[7] + x[1] * x[2],
F[1]=x[3] * x[5] + 1,
F[2]=x[4],
F[3]=x[1] * x[2] * x[5] + x[2] * x[7],
F[4]=x[1] * x[2] + x[2] * x[7],
F[5]=x[2] * x[5] * x[7] + x[2] * x[7],
}
F is Groebner basis
F2poly f, g;
std::cout << "input f:"; std::cin >> f;
std::cout << "input g:"; std::cin >> g;
std::cout << "S(" << f << ", " << g << ") = "
<< F2poly::getSpoly(f, g) << std::endl;
出力(mod F2, mod Xi^2 - Xi)はこう.
input f: (2,3)+(1,4)+(1,2,4)+1
input g: (4,2,3)+(2,3)+(2,4)
S(x[1] * x[2] * x[4] + x[2] * x[3] + x[1] * x[4] + 1,
x[2] * x[3] * x[4] + x[2] * x[3] + x[2] * x[4])
= x[1] * x[2] * x[3] + x[1] * x[2] * x[4]
+ x[1] * x[3] * x[4] + x[2] * x[3] + x[3]
あってんのかな.
revBit8Init db 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80
revBit8Next db 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80
; init mm0, mm1
movq mm0, [revBit8Init]
movq mm1, [revBit8Next]
.lp:
pmovmskb eax, mm0 ; byte単位での各bitのMSBがalに代入
paddb mm0, mm1 ; byte単位でのラップアラウンド加算
...
(処理本体)
...
jmp .lp
によって255から128までの整数のビット反転シーケンスがeaxに代入されていくのが,
我ながらヒットだと思ってんねんけどどうやろう.
浮動小数版FFTでは普通MMX系レジスタは使わへんし.