4x8.nb 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. (* Content-type: application/mathematica *)
  2. (*** Wolfram Notebook File ***)
  3. (* http://www.wolfram.com/nb *)
  4. (* CreatedBy='Mathematica 7.0' *)
  5. (*CacheID: 234*)
  6. (* Internal cache information:
  7. NotebookFileLineBreakTest
  8. NotebookFileLineBreakTest
  9. NotebookDataPosition[ 145, 7]
  10. NotebookDataLength[ 13953, 439]
  11. NotebookOptionsPosition[ 12723, 401]
  12. NotebookOutlinePosition[ 13060, 416]
  13. CellTagsIndexPosition[ 13017, 413]
  14. WindowFrame->Normal*)
  15. (* Beginning of Notebook Content *)
  16. Notebook[{
  17. Cell[BoxData[
  18. RowBox[{"a", ":=",
  19. RowBox[{"ArrayFlatten", "[",
  20. RowBox[{"{",
  21. RowBox[{
  22. RowBox[{"{",
  23. RowBox[{
  24. RowBox[{"IdentityMatrix", "[", "2", "]"}], ",",
  25. RowBox[{"Reverse", "[",
  26. RowBox[{"IdentityMatrix", "[", "2", "]"}], "]"}]}], "}"}], ",",
  27. RowBox[{"{",
  28. RowBox[{
  29. RowBox[{"Reverse", "[",
  30. RowBox[{"IdentityMatrix", "[", "2", "]"}], "]"}], ",",
  31. RowBox[{
  32. RowBox[{"-", "1"}], "*",
  33. RowBox[{"IdentityMatrix", "[", "2", "]"}]}]}], "}"}]}], "}"}],
  34. "]"}]}]], "Input"],
  35. Cell[BoxData[
  36. RowBox[{"v", ":=",
  37. RowBox[{
  38. RowBox[{"{",
  39. RowBox[{
  40. RowBox[{"{",
  41. RowBox[{"1", ",", "q0"}], "}"}], ",",
  42. RowBox[{"{",
  43. RowBox[{"0", ",", "1"}], "}"}]}], "}"}], ".",
  44. RowBox[{"{",
  45. RowBox[{
  46. RowBox[{"{",
  47. RowBox[{"1", ",", "0"}], "}"}], ",",
  48. RowBox[{"{",
  49. RowBox[{"p0", ",", "1"}], "}"}]}], "}"}], ".",
  50. RowBox[{"{",
  51. RowBox[{
  52. RowBox[{"{",
  53. RowBox[{"s0", ",", "0"}], "}"}], ",",
  54. RowBox[{"{",
  55. RowBox[{"0", ",", "s1"}], "}"}]}], "}"}]}]}]], "Input"],
  56. Cell[BoxData[
  57. RowBox[{"b", ":=",
  58. RowBox[{"ArrayFlatten", "[",
  59. RowBox[{"{",
  60. RowBox[{
  61. RowBox[{"{",
  62. RowBox[{
  63. RowBox[{"IdentityMatrix", "[", "2", "]"}], ",", "0"}], "}"}], ",",
  64. RowBox[{"{",
  65. RowBox[{"0", ",", "v"}], "}"}]}], "}"}], "]"}]}]], "Input"],
  66. Cell[BoxData[
  67. RowBox[{"p", ":=",
  68. RowBox[{
  69. RowBox[{"1", "/", "2"}], "*",
  70. RowBox[{"a", ".", "b", ".", "a"}]}]}]], "Input",
  71. CellChangeTimes->{{3.5457274814730635`*^9, 3.5457274902115636`*^9}, {
  72. 3.5457645859286633`*^9, 3.545764586958722*^9}, 3.5457683836240277`*^9, {
  73. 3.5710025182748747`*^9, 3.5710025200148706`*^9}}],
  74. Cell[BoxData[
  75. RowBox[{"vi", ":=",
  76. RowBox[{
  77. RowBox[{"{",
  78. RowBox[{
  79. RowBox[{"{",
  80. RowBox[{
  81. RowBox[{"1", "/", "s0"}], ",", "0"}], "}"}], ",",
  82. RowBox[{"{",
  83. RowBox[{"0", ",",
  84. RowBox[{"1", "/", "s1"}]}], "}"}]}], "}"}], ".",
  85. RowBox[{"{",
  86. RowBox[{
  87. RowBox[{"{",
  88. RowBox[{"1", ",", "0"}], "}"}], ",",
  89. RowBox[{"{",
  90. RowBox[{
  91. RowBox[{"-", "p0"}], ",", "1"}], "}"}]}], "}"}], ".",
  92. RowBox[{"{",
  93. RowBox[{
  94. RowBox[{"{",
  95. RowBox[{"1", ",",
  96. RowBox[{"-", "q0"}]}], "}"}], ",",
  97. RowBox[{"{",
  98. RowBox[{"0", ",", "1"}], "}"}]}], "}"}]}]}]], "Input"],
  99. Cell[BoxData[
  100. RowBox[{"c", ":=",
  101. RowBox[{"ArrayFlatten", "[",
  102. RowBox[{"{",
  103. RowBox[{
  104. RowBox[{"{",
  105. RowBox[{
  106. RowBox[{"IdentityMatrix", "[", "2", "]"}], ",", "0"}], "}"}], ",",
  107. RowBox[{"{",
  108. RowBox[{"0", ",", "vi"}], "}"}]}], "}"}], "]"}]}]], "Input",
  109. CellChangeTimes->{{3.5457683897333775`*^9, 3.5457683916024837`*^9}}],
  110. Cell[BoxData[
  111. RowBox[{"pi", ":=",
  112. RowBox[{
  113. RowBox[{"1", "/", "2"}], "*",
  114. RowBox[{"a", ".", "c", ".", "a"}]}]}]], "Input",
  115. CellChangeTimes->{{3.571002523512355*^9, 3.571002523934972*^9}}],
  116. Cell[BoxData[
  117. RowBox[{
  118. RowBox[{"dct", "[", "k_", "]"}], ":=",
  119. RowBox[{"Table", "[",
  120. RowBox[{
  121. RowBox[{
  122. RowBox[{"Sqrt", "[",
  123. RowBox[{"2", "/", "k"}], "]"}], "*",
  124. RowBox[{"Cos", "[",
  125. RowBox[{
  126. RowBox[{"(",
  127. RowBox[{"j", "+",
  128. RowBox[{"1", "/", "2"}]}], ")"}], "*", "i", "*",
  129. RowBox[{"\[Pi]", "/", "k"}]}], "]"}], "*",
  130. RowBox[{"If", "[",
  131. RowBox[{
  132. RowBox[{"i", "\[Equal]", "0"}], ",",
  133. RowBox[{"Sqrt", "[",
  134. RowBox[{"1", "/", "2"}], "]"}], ",", "1"}], "]"}]}], ",",
  135. RowBox[{"{",
  136. RowBox[{"i", ",", "0", ",",
  137. RowBox[{"k", "-", "1"}]}], "}"}], ",",
  138. RowBox[{"{",
  139. RowBox[{"j", ",", "0", ",",
  140. RowBox[{"k", "-", "1"}]}], "}"}]}], "]"}]}]], "Input"],
  141. Cell[BoxData[
  142. RowBox[{"d", ":=",
  143. RowBox[{"ArrayFlatten", "[",
  144. RowBox[{"{",
  145. RowBox[{"{",
  146. RowBox[{"0", ",", "0", ",",
  147. RowBox[{"dct", "[", "4", "]"}], ",", "0", ",", "0"}], "}"}], "}"}],
  148. "]"}]}]], "Input",
  149. CellChangeTimes->{{3.5457274768888016`*^9, 3.545727477021809*^9}, {
  150. 3.545764597801342*^9, 3.5457645985633855`*^9}, {3.5710024541962633`*^9,
  151. 3.5710024543097754`*^9}}],
  152. Cell[BoxData[
  153. RowBox[{"e", ":=",
  154. RowBox[{"ArrayFlatten", "[",
  155. RowBox[{"{",
  156. RowBox[{
  157. RowBox[{"{",
  158. RowBox[{"p", ",", "0"}], "}"}], ",",
  159. RowBox[{"{",
  160. RowBox[{"0", ",", "p"}], "}"}]}], "}"}], "]"}]}]], "Input",
  161. CellChangeTimes->{{3.571002462651284*^9, 3.5710024641600323`*^9}}],
  162. Cell[BoxData[
  163. RowBox[{"g", ":=",
  164. RowBox[{"d", ".", "e"}]}]], "Input",
  165. CellChangeTimes->{{3.570998941761642*^9, 3.5709989435531483`*^9}, {
  166. 3.571002488111019*^9, 3.571002488765444*^9}}],
  167. Cell[BoxData[
  168. RowBox[{"g", ":=", "d"}]], "Input",
  169. CellChangeTimes->{{3.571212961404491*^9, 3.5712129638152857`*^9}}],
  170. Cell[BoxData[
  171. RowBox[{"f", ":=",
  172. RowBox[{"ArrayFlatten", "[",
  173. RowBox[{"{",
  174. RowBox[{
  175. RowBox[{"{",
  176. RowBox[{"pi", ",", "0"}], "}"}], ",",
  177. RowBox[{"{",
  178. RowBox[{"0", ",", "pi"}], "}"}]}], "}"}], "]"}]}]], "Input",
  179. CellChangeTimes->{{3.545727624853265*^9, 3.5457276258753233`*^9}}],
  180. Cell[BoxData[
  181. RowBox[{"h", ":=",
  182. RowBox[{"f", ".",
  183. RowBox[{"Transpose", "[", "d", "]"}]}]}]], "Input",
  184. CellChangeTimes->{
  185. 3.545727661119339*^9, {3.570998950474485*^9, 3.570998955506845*^9}, {
  186. 3.571002495575822*^9, 3.5710024972395697`*^9}}],
  187. Cell[BoxData[
  188. RowBox[{"h", ":=",
  189. RowBox[{"Transpose", "[", "d", "]"}]}]], "Input",
  190. CellChangeTimes->{{3.571212967904696*^9, 3.5712129718431873`*^9}}],
  191. Cell[BoxData[
  192. RowBox[{
  193. RowBox[{"ar", "[",
  194. RowBox[{"k_", ",", "l_", ",", "r_"}], "]"}], ":=",
  195. RowBox[{"Table", "[",
  196. RowBox[{
  197. RowBox[{"r", "^",
  198. RowBox[{"(",
  199. RowBox[{
  200. RowBox[{"Abs", "[",
  201. RowBox[{"i", "-", "j"}], "]"}], "+", "l"}], ")"}]}], ",",
  202. RowBox[{"{",
  203. RowBox[{"i", ",", "k"}], "}"}], ",",
  204. RowBox[{"{",
  205. RowBox[{"j", ",", "k"}], "}"}]}], "]"}]}]], "Input",
  206. CellChangeTimes->{{3.5709963076204348`*^9, 3.570996308696827*^9}, {
  207. 3.570996439997653*^9, 3.570996443612042*^9}}],
  208. Cell[BoxData[
  209. RowBox[{"obj", ":=",
  210. RowBox[{"GeometricMean", "[",
  211. RowBox[{
  212. RowBox[{"Diagonal", "[",
  213. RowBox[{"g", ".",
  214. RowBox[{"ar", "[",
  215. RowBox[{"8", ",", "0", ",", "0.95"}], "]"}], ".",
  216. RowBox[{"Transpose", "[", "g", "]"}]}], "]"}], "*",
  217. RowBox[{"Diagonal", "[",
  218. RowBox[{
  219. RowBox[{"Transpose", "[", "h", "]"}], ".", "h"}], "]"}]}],
  220. "]"}]}]], "Input",
  221. CellChangeTimes->{{3.545727708950075*^9, 3.545727709848126*^9}, {
  222. 3.5457685118353615`*^9, 3.5457685872316737`*^9}, {3.5709963122201242`*^9,
  223. 3.57099631313066*^9}, {3.570998086041662*^9, 3.570998107501218*^9}}],
  224. Cell[BoxData[
  225. RowBox[{"cg", "=",
  226. RowBox[{
  227. RowBox[{"10", "*",
  228. RowBox[{"Log", "[",
  229. RowBox[{"10", ",",
  230. RowBox[{"1", "/", "obj"}]}], "]"}]}], "//.",
  231. RowBox[{"{",
  232. RowBox[{
  233. RowBox[{"s0", "\[Rule]",
  234. RowBox[{"85.0", "/", "64"}]}], ",",
  235. RowBox[{"s1", "\[Rule]",
  236. RowBox[{"75.0", "/", "64"}]}], ",",
  237. RowBox[{"p0", "\[Rule]",
  238. RowBox[{
  239. RowBox[{"-", "15.0"}], "/", "64"}]}], ",",
  240. RowBox[{"q0", "\[Rule]",
  241. RowBox[{"33.0", "/", "64"}]}]}], "}"}]}]}]], "Input",
  242. CellChangeTimes->{{3.545768594072065*^9, 3.545768618337453*^9}, {
  243. 3.5710002678245487`*^9, 3.571000272852866*^9}, {3.571262932527155*^9,
  244. 3.5712629510796137`*^9}}],
  245. Cell[BoxData["8.552326705311296"], "Input",
  246. CellChangeTimes->{{3.580608333636065*^9, 3.580608334667803*^9}}],
  247. Cell[BoxData[
  248. RowBox[{
  249. RowBox[{"ar2d", "[",
  250. RowBox[{"k_", ",", "r_"}], "]"}], ":=",
  251. RowBox[{"ArrayFlatten", "[",
  252. RowBox[{"Table", "[",
  253. RowBox[{
  254. RowBox[{"ar", "[",
  255. RowBox[{"k", ",",
  256. RowBox[{"Abs", "[",
  257. RowBox[{"i", "-", "j"}], "]"}], ",", "r"}], "]"}], ",",
  258. RowBox[{"{",
  259. RowBox[{"i", ",", "k"}], "}"}], ",",
  260. RowBox[{"{",
  261. RowBox[{"j", ",", "k"}], "}"}]}], "]"}], "]"}]}]], "Input",
  262. CellChangeTimes->{{3.571215344262658*^9, 3.571215350241576*^9},
  263. 3.571215796960052*^9, 3.5712164912715063`*^9, {3.571217517951624*^9,
  264. 3.57121752072649*^9}, 3.571217741460986*^9}],
  265. Cell[BoxData[
  266. RowBox[{
  267. RowBox[{"g2d", "[", "k_", "]"}], ":=",
  268. RowBox[{"ArrayFlatten", "[",
  269. RowBox[{"Table", "[",
  270. RowBox[{
  271. RowBox[{"If", "[",
  272. RowBox[{
  273. RowBox[{"i", "\[Equal]", "j"}], ",", "g", ",", "0"}], "]"}], ",",
  274. RowBox[{"{",
  275. RowBox[{"i", ",", "k"}], "}"}], ",",
  276. RowBox[{"{",
  277. RowBox[{"j", ",", "k"}], "}"}]}], "]"}], "]"}]}]], "Input",
  278. CellChangeTimes->{{3.571217377033023*^9, 3.5712174099145327`*^9}, {
  279. 3.5712175508007708`*^9, 3.571217558924345*^9}}],
  280. Cell[BoxData[
  281. RowBox[{
  282. RowBox[{"h2d", "[", "k_", "]"}], ":=",
  283. RowBox[{"ArrayFlatten", "[",
  284. RowBox[{"Table", "[",
  285. RowBox[{
  286. RowBox[{"If", "[",
  287. RowBox[{
  288. RowBox[{"i", "\[Equal]", "j"}], ",", "h", ",", "0"}], "]"}], ",",
  289. RowBox[{"{",
  290. RowBox[{"i", ",", "k"}], "}"}], ",",
  291. RowBox[{"{",
  292. RowBox[{"j", ",", "k"}], "}"}]}], "]"}], "]"}]}]], "Input",
  293. CellChangeTimes->{{3.57121768285324*^9, 3.571217702211115*^9}}],
  294. Cell[BoxData[
  295. RowBox[{
  296. RowBox[{"t2d", "[", "k_", "]"}], ":=",
  297. RowBox[{
  298. RowBox[{"IdentityMatrix", "[",
  299. RowBox[{"k", "*",
  300. RowBox[{"k", "/", "2"}]}], "]"}], "[",
  301. RowBox[{"[",
  302. RowBox[{"Flatten", "[",
  303. RowBox[{"Transpose", "[",
  304. RowBox[{"Partition", "[",
  305. RowBox[{
  306. RowBox[{"Range", "[",
  307. RowBox[{"k", "*",
  308. RowBox[{"k", "/", "2"}]}], "]"}], ",",
  309. RowBox[{"k", "/", "2"}]}], "]"}], "]"}], "]"}], "]"}],
  310. "]"}]}]], "Input",
  311. CellChangeTimes->{{3.571216514685655*^9, 3.571216535449212*^9}, {
  312. 3.571217837719702*^9, 3.571217852699953*^9}}],
  313. Cell[BoxData[
  314. RowBox[{"obj2d", ":=",
  315. RowBox[{"GeometricMean", "[",
  316. RowBox[{
  317. RowBox[{"Diagonal", "[",
  318. RowBox[{
  319. RowBox[{"g2d", "[", "4", "]"}], ".",
  320. RowBox[{"t2d", "[", "8", "]"}], ".",
  321. RowBox[{"g2d", "[", "8", "]"}], ".",
  322. RowBox[{"ar2d", "[",
  323. RowBox[{"8", ",", "0.95"}], "]"}], ".",
  324. RowBox[{"Transpose", "[",
  325. RowBox[{
  326. RowBox[{"g2d", "[", "4", "]"}], ".",
  327. RowBox[{"t2d", "[", "8", "]"}], ".",
  328. RowBox[{"g2d", "[", "8", "]"}]}], "]"}]}], "]"}], "*",
  329. RowBox[{"Diagonal", "[",
  330. RowBox[{
  331. RowBox[{"Transpose", "[",
  332. RowBox[{
  333. RowBox[{"h2d", "[", "8", "]"}], ".",
  334. RowBox[{"Transpose", "[",
  335. RowBox[{"t2d", "[", "8", "]"}], "]"}], ".",
  336. RowBox[{"h2d", "[", "4", "]"}]}], "]"}], ".",
  337. RowBox[{"h2d", "[", "8", "]"}], ".",
  338. RowBox[{"Transpose", "[",
  339. RowBox[{"t2d", "[", "8", "]"}], "]"}], ".",
  340. RowBox[{"h2d", "[", "4", "]"}]}], "]"}]}], "]"}]}]], "Input",
  341. CellChangeTimes->{{3.571217495222146*^9, 3.57121749695989*^9}, {
  342. 3.571217529685446*^9, 3.5712175379810658`*^9}, {3.571217568436331*^9,
  343. 3.571217574381446*^9}, {3.571217660893468*^9, 3.5712176794285927`*^9}, {
  344. 3.5712178183248453`*^9, 3.5712178224715137`*^9}, {3.5712178578153143`*^9,
  345. 3.571217899033683*^9}, {3.5712180481933937`*^9, 3.571218065866927*^9}, {
  346. 3.5712189138225317`*^9, 3.571218932628921*^9}, {3.571220575284101*^9,
  347. 3.571220575519759*^9}, {3.571262758598935*^9, 3.571262768217821*^9}, {
  348. 3.571263020604718*^9, 3.571263043386387*^9}, {3.580608292559409*^9,
  349. 3.580608303815544*^9}}],
  350. Cell[BoxData[
  351. RowBox[{
  352. RowBox[{"10", "*",
  353. RowBox[{"Log", "[",
  354. RowBox[{"10", ",",
  355. RowBox[{"1", "/", "obj2d"}]}], "]"}]}], "//.",
  356. RowBox[{"{",
  357. RowBox[{
  358. RowBox[{"s0", "\[Rule]",
  359. RowBox[{"85.0", "/", "64"}]}], ",",
  360. RowBox[{"s1", "\[Rule]",
  361. RowBox[{"75.0", "/", "64"}]}], ",",
  362. RowBox[{"p0", "\[Rule]",
  363. RowBox[{
  364. RowBox[{"-", "15.0"}], "/", "64"}]}], ",",
  365. RowBox[{"q0", "\[Rule]",
  366. RowBox[{"33.0", "/", "64"}]}]}], "}"}]}]], "Input",
  367. CellChangeTimes->{{3.570998180020094*^9, 3.5709982151810417`*^9},
  368. 3.570998891224902*^9, 3.571000287865662*^9, {3.57121160289865*^9,
  369. 3.5712116314831038`*^9}}],
  370. Cell[BoxData["17.10465341062255"], "Input",
  371. CellChangeTimes->{{3.5806083817030067`*^9, 3.5806083834949503`*^9}}]
  372. },
  373. WindowSize->{1424, 775},
  374. WindowMargins->{{0, Automatic}, {Automatic, 33}},
  375. FrontEndVersion->"7.0 for Linux x86 (64-bit) (February 25, 2009)",
  376. StyleDefinitions->"Default.nb"
  377. ]
  378. (* End of Notebook Content *)
  379. (* Internal cache information *)
  380. (*CellTagsOutline
  381. CellTagsIndex->{}
  382. *)
  383. (*CellTagsIndex
  384. CellTagsIndex->{}
  385. *)
  386. (*NotebookFileOutline
  387. Notebook[{
  388. Cell[545, 20, 565, 17, 32, "Input"],
  389. Cell[1113, 39, 552, 20, 32, "Input"],
  390. Cell[1668, 61, 290, 9, 32, "Input"],
  391. Cell[1961, 72, 331, 7, 32, "Input"],
  392. Cell[2295, 81, 655, 24, 32, "Input"],
  393. Cell[2953, 107, 361, 10, 32, "Input"],
  394. Cell[3317, 119, 198, 5, 32, "Input"],
  395. Cell[3518, 126, 777, 24, 32, "Input"],
  396. Cell[4298, 152, 404, 10, 32, "Input"],
  397. Cell[4705, 164, 312, 9, 32, "Input"],
  398. Cell[5020, 175, 190, 4, 32, "Input"],
  399. Cell[5213, 181, 118, 2, 32, "Input"],
  400. Cell[5334, 185, 314, 9, 32, "Input"],
  401. Cell[5651, 196, 253, 6, 32, "Input"],
  402. Cell[5907, 204, 154, 3, 32, "Input"],
  403. Cell[6064, 209, 543, 16, 32, "Input"],
  404. Cell[6610, 227, 625, 15, 32, "Input"],
  405. Cell[7238, 244, 704, 20, 32, "Input"],
  406. Cell[7945, 266, 109, 1, 32, InheritFromParent],
  407. Cell[8057, 269, 640, 17, 32, "Input"],
  408. Cell[8700, 288, 517, 14, 32, "Input"],
  409. Cell[9220, 304, 463, 13, 32, "Input"],
  410. Cell[9686, 319, 616, 18, 32, "Input"],
  411. Cell[10305, 339, 1629, 36, 55, "Input"],
  412. Cell[11937, 377, 666, 19, 32, "Input"],
  413. Cell[12606, 398, 113, 1, 32, InheritFromParent]
  414. }
  415. ]
  416. *)
  417. (* End of internal cache information *)