Austin Schuh | 405fa6c | 2015-09-06 18:13:55 -0700 | [diff] [blame^] | 1 | (************** Content-type: application/mathematica ************** |
| 2 | |
| 3 | Mathematica-Compatible Notebook |
| 4 | |
| 5 | This notebook can be used with any Mathematica-compatible |
| 6 | application, such as Mathematica, MathReader or Publicon. The data |
| 7 | for the notebook starts with the line containing stars above. |
| 8 | |
| 9 | To get the notebook into a Mathematica-compatible application, do |
| 10 | one of the following: |
| 11 | |
| 12 | * Save the data starting with the line of stars above into a file |
| 13 | with a name ending in .nb, then open the file inside the |
| 14 | application; |
| 15 | |
| 16 | * Copy the data starting with the line of stars above to the |
| 17 | clipboard, then use the Paste menu command inside the application. |
| 18 | |
| 19 | Data for notebooks contains only printable 7-bit ASCII and can be |
| 20 | sent directly in email or through ftp in text mode. Newlines can be |
| 21 | CR, LF or CRLF (Unix, Macintosh or MS-DOS style). |
| 22 | |
| 23 | NOTE: If you modify the data for this notebook not in a Mathematica- |
| 24 | compatible application, you must delete the line below containing |
| 25 | the word CacheID, otherwise Mathematica-compatible applications may |
| 26 | try to use invalid cache data. |
| 27 | |
| 28 | For more information on notebooks and Mathematica-compatible |
| 29 | applications, contact Wolfram Research: |
| 30 | web: http://www.wolfram.com |
| 31 | email: info@wolfram.com |
| 32 | phone: +1-217-398-0700 (U.S.) |
| 33 | |
| 34 | Notebook reader applications are available free of charge from |
| 35 | Wolfram Research. |
| 36 | *******************************************************************) |
| 37 | |
| 38 | (*CacheID: 232*) |
| 39 | |
| 40 | |
| 41 | (*NotebookFileLineBreakTest |
| 42 | NotebookFileLineBreakTest*) |
| 43 | (*NotebookOptionsPosition[ 14720, 468]*) |
| 44 | (*NotebookOutlinePosition[ 16078, 512]*) |
| 45 | (* CellTagsIndexPosition[ 15906, 504]*) |
| 46 | (*WindowFrame->Normal*) |
| 47 | |
| 48 | |
| 49 | |
| 50 | Notebook[{ |
| 51 | Cell[TextData[{ |
| 52 | StyleBox["cddmathlink", |
| 53 | FontColor->RGBColor[0.0557107, 0.137819, 0.517113]], |
| 54 | "\nConvex Hull and Vertex Enumeration by ", |
| 55 | StyleBox["MathLink", |
| 56 | FontSlant->"Italic", |
| 57 | FontColor->RGBColor[0.0146487, 0.461387, 0.0967727]], |
| 58 | " to ", |
| 59 | StyleBox["cddlib", |
| 60 | FontColor->RGBColor[0.517113, 0.0273594, 0.0273594]], |
| 61 | "\nby Komei Fukuda\nApril 17, 2001" |
| 62 | }], "Title", |
| 63 | ImageRegion->{{0, 1}, {0, 1}}], |
| 64 | |
| 65 | Cell[CellGroupData[{ |
| 66 | |
| 67 | Cell["Connecting cddmathlink", "Subsection", |
| 68 | InitializationCell->True, |
| 69 | ImageRegion->{{0, 1}, {0, 1}}], |
| 70 | |
| 71 | Cell[CellGroupData[{ |
| 72 | |
| 73 | Cell[TextData[{ |
| 74 | "You just put the compiled cddmathlink for your computer in some directory. \ |
| 75 | In this example, the name of the directory is ", |
| 76 | StyleBox["\"~/Math\".", |
| 77 | FontFamily->"Courier", |
| 78 | FontWeight->"Bold"] |
| 79 | }], "Text", |
| 80 | InitializationCell->True, |
| 81 | ImageRegion->{{0, 1}, {0, 1}}], |
| 82 | |
| 83 | Cell["Off[General::spell1]; Off[General::spell];", "Input", |
| 84 | InitializationCell->True, |
| 85 | ImageRegion->{{0, 1}, {0, 1}}], |
| 86 | |
| 87 | Cell[CellGroupData[{ |
| 88 | |
| 89 | Cell["\<\ |
| 90 | cddml= |
| 91 | Install[\"~/Math/cddmathlink\"]\ |
| 92 | \>", "Input", |
| 93 | InitializationCell->True, |
| 94 | ImageRegion->{{0, 1}, {0, 1}}], |
| 95 | |
| 96 | Cell[BoxData[ |
| 97 | \(LinkObject["/Users/fukuda/Math/cddmathlink", 9, 8]\)], "Output"] |
| 98 | }, Open ]] |
| 99 | }, Open ]] |
| 100 | }, Closed]], |
| 101 | |
| 102 | Cell[CellGroupData[{ |
| 103 | |
| 104 | Cell["Generating All Vertices ", "Subsection", |
| 105 | ImageRegion->{{0, 1}, {0, 1}}], |
| 106 | |
| 107 | Cell[CellGroupData[{ |
| 108 | |
| 109 | Cell["?AllVertices", "Input", |
| 110 | ImageRegion->{{0, 1}, {0, 1}}], |
| 111 | |
| 112 | Cell[BoxData[ |
| 113 | \("AllVertices[m,d+1,A] generates all extreme points (vertices) and \ |
| 114 | extreme rays of the convex polyhedron in R^(d+1) given as the solution set to \ |
| 115 | an inequality system A x >= 0 where A is an m*(d+1) matrix and \ |
| 116 | x=(1,x1,...,xd). The output is {{extlist, linearity}, ecdlist} where extlist \ |
| 117 | is the extreme point list and ecdlist is the incidence list. Each vertex \ |
| 118 | (ray) has the first component 1 (0). If the convex polyhedron is nonempty \ |
| 119 | and has no vertices, extlist is a (nonunique) set of generators of the \ |
| 120 | polyhedron where those generators in the linearity list are considered as \ |
| 121 | linearity space (of points satisfying A (0, x1, x2, ...., xd) = 0) \ |
| 122 | generators."\)], "Print", |
| 123 | CellTags->"Info3249106863-2654627"], |
| 124 | |
| 125 | Cell["\<\ |
| 126 | Let's try this function with a 3-dimenstional cube defined by 6 \ |
| 127 | inequalities (facets); |
| 128 | x1 >= 0, x2 >=0, x3 >= 0, 1 - x1 >= 0, 1 - x2 >= 0 and 1 - x3 >= 0. We \ |
| 129 | write these six inequalities as A x >= 0 and x=(1, x1, x2, x3).\ |
| 130 | \>", \ |
| 131 | "Text", |
| 132 | ImageRegion->{{0, 1}, {0, 1}}], |
| 133 | |
| 134 | Cell[CellGroupData[{ |
| 135 | |
| 136 | Cell["\<\ |
| 137 | MatrixForm[a={{0,1,0,0},{0,0,1,0},{0,0,0,1}, |
| 138 | \t{1,-1,0,0},{1,0,-1,0},{1,0,0,-1}}]\ |
| 139 | \>", "Input", |
| 140 | ImageRegion->{{0, 1}, {0, 1}}], |
| 141 | |
| 142 | Cell[BoxData[ |
| 143 | TagBox[ |
| 144 | RowBox[{"(", "\[NoBreak]", GridBox[{ |
| 145 | {"0", "1", "0", "0"}, |
| 146 | {"0", "0", "1", "0"}, |
| 147 | {"0", "0", "0", "1"}, |
| 148 | {"1", \(-1\), "0", "0"}, |
| 149 | {"1", "0", \(-1\), "0"}, |
| 150 | {"1", "0", "0", \(-1\)} |
| 151 | }], "\[NoBreak]", ")"}], |
| 152 | Function[ BoxForm`e$, |
| 153 | MatrixForm[ BoxForm`e$]]]], "Output"], |
| 154 | |
| 155 | Cell[CellGroupData[{ |
| 156 | |
| 157 | Cell["{m,d1}=Dimensions[a]", "Input", |
| 158 | ImageRegion->{{0, 1}, {0, 1}}], |
| 159 | |
| 160 | Cell[BoxData[ |
| 161 | \({6, 4}\)], "Output"] |
| 162 | }, Open ]], |
| 163 | |
| 164 | Cell[CellGroupData[{ |
| 165 | |
| 166 | Cell["\<\ |
| 167 | {{vertices, linearity}, \ |
| 168 | incidences}=AllVertices[m,d1,Flatten[a]]\ |
| 169 | \>", "Input", |
| 170 | ImageRegion->{{0, 1}, {0, 1}}], |
| 171 | |
| 172 | Cell[BoxData[ |
| 173 | \({{{{1.`, 1.`, 1.`, 0.`}, {1.`, 0.`, 1.`, 0.`}, {1.`, 0.`, 0.`, |
| 174 | 0.`}, {1.`, 1.`, 0.`, 0.`}, {1.`, 0.`, 0.`, 1.`}, {1.`, 1.`, 0.`, |
| 175 | 1.`}, {1.`, 0.`, 1.`, 1.`}, {1.`, 1.`, 1.`, 1.`}}, {}}, {{3, 4, |
| 176 | 5}, {1, 3, 5}, {1, 2, 3}, {2, 3, 4}, {1, 2, 6}, {2, 4, 6}, {1, 5, |
| 177 | 6}, {4, 5, 6}}}\)], "Output"] |
| 178 | }, Open ]] |
| 179 | }, Open ]] |
| 180 | }, Open ]] |
| 181 | }, Closed]], |
| 182 | |
| 183 | Cell[CellGroupData[{ |
| 184 | |
| 185 | Cell["Generating the Graph Structure", "Subsection", |
| 186 | ImageRegion->{{0, 1}, {0, 1}}], |
| 187 | |
| 188 | Cell[CellGroupData[{ |
| 189 | |
| 190 | Cell["?AllVerticesWithAdjacency", "Input", |
| 191 | ImageRegion->{{0, 1}, {0, 1}}], |
| 192 | |
| 193 | Cell[BoxData[ |
| 194 | \("AllVerticesWithAdjacency[m,d+1,A] generates all extreme points \ |
| 195 | (vertices) and extreme rays of the convex polyhedron in R^(d+1) given as the \ |
| 196 | solution set to an inequality system A x >= 0 where A is an m*(d+1) matrix \ |
| 197 | and x=(1,x1,...,xd). The output is {{extlist, linearity}, ecdlist, eadlist, \ |
| 198 | icdlist, iadlist} where extlist, ecdlist, eadlist are the extreme point list, \ |
| 199 | the incidence list, the adjacency list (of extreme points and rays), and \ |
| 200 | icdlist, iadlist are the incidence list, the adjacency list (of \ |
| 201 | inequalities). Each vertex (ray) has the first component 1 (0). If the \ |
| 202 | convex polyhedron is nonempty and has no vertices, extlist is a (nonunique) \ |
| 203 | set of generators of the polyhedron where those generators in the linearity \ |
| 204 | list are considered as linearity space (of points satisfying A (0, x1, x2, \ |
| 205 | ...., xd) = 0) generators."\)], "Print", |
| 206 | CellTags->"Info3249106869-2272285"], |
| 207 | |
| 208 | Cell[CellGroupData[{ |
| 209 | |
| 210 | Cell["\<\ |
| 211 | {{vertices,linearity},ecd,ead,icd,iad}= |
| 212 | \tAllVerticesWithAdjacency[m,d1,Flatten[a]]\ |
| 213 | \>", "Input", |
| 214 | ImageRegion->{{0, 1}, {0, 1}}], |
| 215 | |
| 216 | Cell[BoxData[ |
| 217 | \({{{{1.`, 1.`, 1.`, 0.`}, {1.`, 0.`, 1.`, 0.`}, {1.`, 0.`, 0.`, |
| 218 | 0.`}, {1.`, 1.`, 0.`, 0.`}, {1.`, 0.`, 0.`, 1.`}, {1.`, 1.`, 0.`, |
| 219 | 1.`}, {1.`, 0.`, 1.`, 1.`}, {1.`, 1.`, 1.`, 1.`}}, {}}, {{3, 4, |
| 220 | 5}, {1, 3, 5}, {1, 2, 3}, {2, 3, 4}, {1, 2, 6}, {2, 4, 6}, {1, 5, |
| 221 | 6}, {4, 5, 6}}, {{2, 4, 8}, {1, 3, 7}, {2, 4, 5}, {1, 3, 6}, {3, 6, |
| 222 | 7}, {4, 5, 8}, {2, 5, 8}, {1, 6, 7}}, {{2, 3, 5, 7}, {3, 4, 5, |
| 223 | 6}, {1, 2, 3, 4}, {1, 4, 6, 8}, {1, 2, 7, 8}, {5, 6, 7, |
| 224 | 8}, {}}, {{2, 3, 5, 6}, {1, 3, 4, 6}, {1, 2, 4, 5}, {2, 3, 5, |
| 225 | 6}, {1, 3, 4, 6}, {1, 2, 4, 5}, {}}}\)], "Output"] |
| 226 | }, Open ]] |
| 227 | }, Open ]], |
| 228 | |
| 229 | Cell[TextData[{ |
| 230 | "The graph structure is output as the adjacency list ", |
| 231 | StyleBox["ead. ", |
| 232 | FontFamily->"Courier", |
| 233 | FontWeight->"Bold"], |
| 234 | "For example, the first list {2, 4 ,8} represents the neighbour vertices of \ |
| 235 | the first vertex 1. The adjacency of input is given by\nthe list ", |
| 236 | StyleBox["iad.", |
| 237 | FontFamily->"Courier", |
| 238 | FontWeight->"Bold"] |
| 239 | }], "Text", |
| 240 | ImageRegion->{{0, 1}, {0, 1}}] |
| 241 | }, Closed]], |
| 242 | |
| 243 | Cell[CellGroupData[{ |
| 244 | |
| 245 | Cell["Convex Hull (Facet Generation)", "Subsection", |
| 246 | ImageRegion->{{0, 1}, {0, 1}}], |
| 247 | |
| 248 | Cell[CellGroupData[{ |
| 249 | |
| 250 | Cell["?AllFacets", "Input", |
| 251 | ImageRegion->{{0, 1}, {0, 1}}], |
| 252 | |
| 253 | Cell[BoxData[ |
| 254 | \("AllFacets[n,d+1,G] generates all facet inequalities of the convex \ |
| 255 | polyhedron in R^(d+1) generated by points and rays given in the rows of an \ |
| 256 | n*(d+1) matrix G. Each point (ray) must have 1 (0) in the first coordinate. \ |
| 257 | The output is {{faclist, equalities}, icdlist} where faclist is the facet \ |
| 258 | list and icdlist is the incidence list. If the convex polyhedron is not \ |
| 259 | full-dimensional, extlist is a (nonunique) set of inequalities of the \ |
| 260 | polyhedron where those inequalities in the equalities list are considered as \ |
| 261 | equalities."\)], "Print", |
| 262 | CellTags->"Info3249106877-5554290"], |
| 263 | |
| 264 | Cell["\<\ |
| 265 | We have computed all the vertices of a 3-cube. Let's try the \ |
| 266 | reverse operation. First check the size of the list of vertics. It should \ |
| 267 | reconstruct the facets we have started with.\ |
| 268 | \>", "Text", |
| 269 | ImageRegion->{{0, 1}, {0, 1}}], |
| 270 | |
| 271 | Cell[CellGroupData[{ |
| 272 | |
| 273 | Cell["{n, d1}=Dimensions[vertices]", "Input", |
| 274 | ImageRegion->{{0, 1}, {0, 1}}], |
| 275 | |
| 276 | Cell[BoxData[ |
| 277 | \({8, 4}\)], "Output"] |
| 278 | }, Open ]], |
| 279 | |
| 280 | Cell[CellGroupData[{ |
| 281 | |
| 282 | Cell["\<\ |
| 283 | |
| 284 | {{facets,equalities}, fincidences}= AllFacets[n,d1,Flatten[vertices]]\ |
| 285 | \>", \ |
| 286 | "Input", |
| 287 | ImageRegion->{{0, 1}, {0, 1}}], |
| 288 | |
| 289 | Cell[BoxData[ |
| 290 | \({{{{0.`, 0.`, 0.`, 1.`}, {0.`, 1.`, 0.`, 0.`}, {0.`, 0.`, 1.`, |
| 291 | 0.`}, {1.`, 0.`, 0.`, \(-1.`\)}, {1.`, 0.`, \(-1.`\), |
| 292 | 0.`}, {1.`, \(-1.`\), 0.`, 0.`}}, {}}, {{1, 2, 3, 4}, {2, 3, 5, |
| 293 | 7}, {3, 4, 5, 6}, {5, 6, 7, 8}, {1, 2, 7, 8}, {1, 4, 6, |
| 294 | 8}}}\)], "Output"] |
| 295 | }, Open ]], |
| 296 | |
| 297 | Cell[TextData[{ |
| 298 | "We can compute how the facets are connected by using ", |
| 299 | StyleBox["AllFacetsWithAdjacency", |
| 300 | FontWeight->"Bold"], |
| 301 | " function." |
| 302 | }], "Text", |
| 303 | ImageRegion->{{0, 1}, {0, 1}}], |
| 304 | |
| 305 | Cell[CellGroupData[{ |
| 306 | |
| 307 | Cell["\<\ |
| 308 | |
| 309 | {{facets,equalities}, icd,iad, ecd,ead}= |
| 310 | \tAllFacetsWithAdjacency[n,d1,Flatten[vertices]]\ |
| 311 | \>", "Input", |
| 312 | ImageRegion->{{0, 1}, {0, 1}}], |
| 313 | |
| 314 | Cell[BoxData[ |
| 315 | \({{{{0.`, 0.`, 0.`, 1.`}, {0.`, 1.`, 0.`, 0.`}, {0.`, 0.`, 1.`, |
| 316 | 0.`}, {1.`, 0.`, 0.`, \(-1.`\)}, {1.`, 0.`, \(-1.`\), |
| 317 | 0.`}, {1.`, \(-1.`\), 0.`, 0.`}}, {}}, {{1, 2, 3, 4}, {2, 3, 5, |
| 318 | 7}, {3, 4, 5, 6}, {5, 6, 7, 8}, {1, 2, 7, 8}, {1, 4, 6, 8}}, {{2, |
| 319 | 3, 5, 6}, {1, 3, 4, 5}, {1, 2, 4, 6}, {2, 3, 5, 6}, {1, 2, 4, |
| 320 | 6}, {1, 3, 4, 5}}, {{1, 5, 6}, {1, 2, 5}, {1, 2, 3}, {1, 3, 6}, {2, |
| 321 | 3, 4}, {3, 4, 6}, {2, 4, 5}, {4, 5, 6}}, {{2, 4, 8}, {1, 3, 7}, {2, |
| 322 | 4, 5}, {1, 3, 6}, {3, 6, 7}, {4, 5, 8}, {2, 5, 8}, {1, 6, |
| 323 | 7}}}\)], "Output"] |
| 324 | }, Open ]] |
| 325 | }, Open ]], |
| 326 | |
| 327 | Cell[CellGroupData[{ |
| 328 | |
| 329 | Cell["\<\ |
| 330 | If you want to compute an inequality description of the \ |
| 331 | one-dimensional cone in R^3 with a vertex at origin and containing the \ |
| 332 | direction (1,1,1), you must set up the input (generator) data as:\ |
| 333 | \>", "Text",\ |
| 334 | |
| 335 | ImageRegion->{{0, 1}, {0, 1}}], |
| 336 | |
| 337 | Cell[CellGroupData[{ |
| 338 | |
| 339 | Cell["coneGenerators={{1,0,0,0},{0,1,1,1}}", "Input", |
| 340 | ImageRegion->{{0, 1}, {0, 1}}], |
| 341 | |
| 342 | Cell[BoxData[ |
| 343 | \({{1, 0, 0, 0}, {0, 1, 1, 1}}\)], "Output"] |
| 344 | }, Open ]], |
| 345 | |
| 346 | Cell[CellGroupData[{ |
| 347 | |
| 348 | Cell["\<\ |
| 349 | {{cfacets,cequalities}, cfincidences}= |
| 350 | \tAllFacets[2,4,Flatten[coneGenerators]]\ |
| 351 | \>", "Input", |
| 352 | ImageRegion->{{0, 1}, {0, 1}}], |
| 353 | |
| 354 | Cell[BoxData[ |
| 355 | \({{{{1.`, 0.`, 0.`, 0.`}, {0.`, 1.`, 0.`, 0.`}, {0.`, \(-1.`\), 1.`, |
| 356 | 0.`}, {0.`, \(-1.`\), 0.`, 1.`}}, {3, 4}}, {{2}, {1}, {1, 2}, {1, |
| 357 | 2}}}\)], "Output"] |
| 358 | }, Open ]], |
| 359 | |
| 360 | Cell["\<\ |
| 361 | Since the equalities list contains 3 and 4, of the four output \ |
| 362 | inequalities , the third and the forth must be considered as equalities. It \ |
| 363 | is important to note that this cone can have infinitely many different \ |
| 364 | minimal inequality descriptions, since it is not full-dimensional.\ |
| 365 | \>", \ |
| 366 | "Text", |
| 367 | ImageRegion->{{0, 1}, {0, 1}}] |
| 368 | }, Open ]] |
| 369 | }, Closed]], |
| 370 | |
| 371 | Cell[CellGroupData[{ |
| 372 | |
| 373 | Cell["A Larger Example (Random 0/1 Polytopes)", "Subsection", |
| 374 | ImageRegion->{{0, 1}, {0, 1}}], |
| 375 | |
| 376 | Cell["\<\ |
| 377 | Let's compute the convex hull of 0/1 points in R^d. First generate \ |
| 378 | 0/1 points. Below each point with the first component 0 is considered as a \ |
| 379 | direction that must be included in the convex hull.\ |
| 380 | \>", "Text", |
| 381 | ImageRegion->{{0, 1}, {0, 1}}, |
| 382 | FontSize->13], |
| 383 | |
| 384 | Cell["n=30; d1=8;", "Input", |
| 385 | ImageRegion->{{0, 1}, {0, 1}}], |
| 386 | |
| 387 | Cell[CellGroupData[{ |
| 388 | |
| 389 | Cell["\<\ |
| 390 | points=Table[Prepend[Table[Random[Integer,{0,1}],{d1-1}],0],{n}]\ |
| 391 | \>\ |
| 392 | ", "Input", |
| 393 | ImageRegion->{{0, 1}, {0, 1}}], |
| 394 | |
| 395 | Cell[BoxData[ |
| 396 | \({{0, 0, 1, 1, 0, 1, 1, 1}, {0, 1, 0, 0, 1, 1, 0, 0}, {0, 1, 0, 1, 0, 0, |
| 397 | 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1}, {0, 0, 1, 1, 0, 1, 1, 1}, {0, 1, 0, |
| 398 | 1, 0, 1, 1, 1}, {0, 0, 1, 1, 0, 0, 0, 0}, {0, 1, 0, 0, 1, 1, 0, |
| 399 | 1}, {0, 0, 0, 0, 1, 0, 1, 1}, {0, 0, 1, 0, 0, 0, 1, 1}, {0, 0, 1, 0, |
| 400 | 0, 0, 1, 0}, {0, 0, 0, 0, 1, 0, 1, 0}, {0, 0, 0, 0, 0, 1, 0, 0}, {0, |
| 401 | 0, 0, 0, 1, 0, 0, 0}, {0, 1, 0, 0, 1, 1, 0, 1}, {0, 0, 0, 1, 1, 1, 0, |
| 402 | 0}, {0, 0, 1, 1, 1, 0, 0, 1}, {0, 1, 1, 0, 0, 1, 1, 0}, {0, 0, 1, 1, |
| 403 | 0, 0, 0, 1}, {0, 1, 0, 1, 1, 0, 1, 0}, {0, 1, 1, 1, 0, 1, 0, 1}, {0, |
| 404 | 1, 1, 1, 1, 0, 1, 1}, {0, 0, 0, 0, 1, 0, 0, 1}, {0, 1, 1, 0, 0, 0, 1, |
| 405 | 1}, {0, 0, 1, 0, 1, 1, 0, 1}, {0, 1, 0, 0, 0, 1, 1, 1}, {0, 1, 0, 0, |
| 406 | 0, 1, 1, 1}, {0, 0, 0, 1, 0, 0, 0, 1}, {0, 0, 1, 0, 1, 1, 0, 0}, {0, |
| 407 | 0, 0, 0, 1, 0, 1, 1}}\)], "Output"] |
| 408 | }, Open ]], |
| 409 | |
| 410 | Cell[CellGroupData[{ |
| 411 | |
| 412 | Cell["Dimensions[points]", "Input", |
| 413 | ImageRegion->{{0, 1}, {0, 1}}], |
| 414 | |
| 415 | Cell[BoxData[ |
| 416 | \({30, 8}\)], "Output"] |
| 417 | }, Open ]], |
| 418 | |
| 419 | Cell["\<\ |
| 420 | |
| 421 | {CPUtime, {{facets,equalities}, inc}}= |
| 422 | \tTiming[AllFacets[n,d1,Flatten[points]]];\ |
| 423 | \>", "Input", |
| 424 | ImageRegion->{{0, 1}, {0, 1}}], |
| 425 | |
| 426 | Cell[CellGroupData[{ |
| 427 | |
| 428 | Cell["{CPUtime,Length[facets]}", "Input", |
| 429 | ImageRegion->{{0, 1}, {0, 1}}], |
| 430 | |
| 431 | Cell[BoxData[ |
| 432 | \({0.`\ Second, 33}\)], "Output"] |
| 433 | }, Open ]], |
| 434 | |
| 435 | Cell["\<\ |
| 436 | Usually facets of 0/1 polytopes are very pretty and their \ |
| 437 | coefficients are small integers.\ |
| 438 | \>", "Text", |
| 439 | ImageRegion->{{0, 1}, {0, 1}}], |
| 440 | |
| 441 | Cell[CellGroupData[{ |
| 442 | |
| 443 | Cell["Take[facets,5]", "Input", |
| 444 | ImageRegion->{{0, 1}, {0, 1}}], |
| 445 | |
| 446 | Cell[BoxData[ |
| 447 | \({{0.`, 0.`, 0.`, 1.`, 0.`, 0.`, 0.`, 0.`}, {0.`, \(-1.`\), 0.`, 1.`, |
| 448 | 0.`, 1.`, 0.`, 1.`}, {0.`, \(-1.`\), \(-1.`\), 1.`, 0.`, 1.`, 1.`, |
| 449 | 1.`}, {0.`, 0.`, 0.`, 0.`, 0.`, 0.`, 0.`, 1.`}, {0.`, 0.`, 1.`, 0.`, |
| 450 | 1.`, 0.`, \(-1.`\), 1.`}}\)], "Output"] |
| 451 | }, Open ]] |
| 452 | }, Closed]], |
| 453 | |
| 454 | Cell[CellGroupData[{ |
| 455 | |
| 456 | Cell["Disconnecting cddmathlink", "Subsection", |
| 457 | ImageRegion->{{0, 1}, {0, 1}}], |
| 458 | |
| 459 | Cell[CellGroupData[{ |
| 460 | |
| 461 | Cell["Uninstall[cddml]", "Input", |
| 462 | ImageRegion->{{0, 1}, {0, 1}}], |
| 463 | |
| 464 | Cell[BoxData[ |
| 465 | \("/Users/fukuda/Math/cddmathlink"\)], "Output"] |
| 466 | }, Open ]] |
| 467 | }, Closed]] |
| 468 | }, |
| 469 | FrontEndVersion->"4.1 for Macintosh", |
| 470 | ScreenRectangle->{{0, 1152}, {0, 746}}, |
| 471 | AutoGeneratedPackage->None, |
| 472 | WindowToolbars->{}, |
| 473 | CellGrouping->Manual, |
| 474 | WindowSize->{583, 634}, |
| 475 | WindowMargins->{{17, Automatic}, {Automatic, 41}}, |
| 476 | PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, |
| 477 | ShowCellLabel->True, |
| 478 | ShowCellTags->False, |
| 479 | RenderingOptions->{"ObjectDithering"->True, |
| 480 | "RasterDithering"->False} |
| 481 | ] |
| 482 | |
| 483 | (******************************************************************* |
| 484 | Cached data follows. If you edit this Notebook file directly, not |
| 485 | using Mathematica, you must remove the line containing CacheID at |
| 486 | the top of the file. The cache data will then be recreated when |
| 487 | you save this file from within Mathematica. |
| 488 | *******************************************************************) |
| 489 | |
| 490 | (*CellTagsOutline |
| 491 | CellTagsIndex->{ |
| 492 | "Info3249106863-2654627"->{ |
| 493 | Cell[3168, 111, 753, 11, 183, "Print", |
| 494 | CellTags->"Info3249106863-2654627"]}, |
| 495 | "Info3249106869-2272285"->{ |
| 496 | Cell[5701, 192, 930, 13, 231, "Print", |
| 497 | CellTags->"Info3249106869-2272285"]}, |
| 498 | "Info3249106877-5554290"->{ |
| 499 | Cell[8119, 252, 613, 9, 151, "Print", |
| 500 | CellTags->"Info3249106877-5554290"]} |
| 501 | } |
| 502 | *) |
| 503 | |
| 504 | (*CellTagsIndex |
| 505 | CellTagsIndex->{ |
| 506 | {"Info3249106863-2654627", 15561, 491}, |
| 507 | {"Info3249106869-2272285", 15678, 494}, |
| 508 | {"Info3249106877-5554290", 15795, 497} |
| 509 | } |
| 510 | *) |
| 511 | |
| 512 | (*NotebookFileOutline |
| 513 | Notebook[{ |
| 514 | Cell[1705, 50, 423, 12, 348, "Title"], |
| 515 | |
| 516 | Cell[CellGroupData[{ |
| 517 | Cell[2153, 66, 106, 2, 46, "Subsection", |
| 518 | InitializationCell->True], |
| 519 | |
| 520 | Cell[CellGroupData[{ |
| 521 | Cell[2284, 72, 295, 8, 50, "Text", |
| 522 | InitializationCell->True], |
| 523 | Cell[2582, 82, 120, 2, 27, "Input", |
| 524 | InitializationCell->True], |
| 525 | |
| 526 | Cell[CellGroupData[{ |
| 527 | Cell[2727, 88, 124, 5, 42, "Input", |
| 528 | InitializationCell->True], |
| 529 | Cell[2854, 95, 84, 1, 27, "Output"] |
| 530 | }, Open ]] |
| 531 | }, Open ]] |
| 532 | }, Closed]], |
| 533 | |
| 534 | Cell[CellGroupData[{ |
| 535 | Cell[2999, 103, 79, 1, 30, "Subsection"], |
| 536 | |
| 537 | Cell[CellGroupData[{ |
| 538 | Cell[3103, 108, 62, 1, 27, "Input"], |
| 539 | Cell[3168, 111, 753, 11, 183, "Print", |
| 540 | CellTags->"Info3249106863-2654627"], |
| 541 | Cell[3924, 124, 299, 7, 68, "Text"], |
| 542 | |
| 543 | Cell[CellGroupData[{ |
| 544 | Cell[4248, 135, 139, 4, 42, "Input"], |
| 545 | Cell[4390, 141, 392, 11, 117, "Output"], |
| 546 | |
| 547 | Cell[CellGroupData[{ |
| 548 | Cell[4807, 156, 70, 1, 27, "Input"], |
| 549 | Cell[4880, 159, 40, 1, 27, "Output"] |
| 550 | }, Open ]], |
| 551 | |
| 552 | Cell[CellGroupData[{ |
| 553 | Cell[4957, 165, 124, 4, 42, "Input"], |
| 554 | Cell[5084, 171, 356, 5, 91, "Output"] |
| 555 | }, Open ]] |
| 556 | }, Open ]] |
| 557 | }, Open ]] |
| 558 | }, Closed]], |
| 559 | |
| 560 | Cell[CellGroupData[{ |
| 561 | Cell[5513, 184, 85, 1, 30, "Subsection"], |
| 562 | |
| 563 | Cell[CellGroupData[{ |
| 564 | Cell[5623, 189, 75, 1, 27, "Input"], |
| 565 | Cell[5701, 192, 930, 13, 231, "Print", |
| 566 | CellTags->"Info3249106869-2272285"], |
| 567 | |
| 568 | Cell[CellGroupData[{ |
| 569 | Cell[6656, 209, 141, 4, 42, "Input"], |
| 570 | Cell[6800, 215, 670, 9, 155, "Output"] |
| 571 | }, Open ]] |
| 572 | }, Open ]], |
| 573 | Cell[7497, 228, 412, 11, 68, "Text"] |
| 574 | }, Closed]], |
| 575 | |
| 576 | Cell[CellGroupData[{ |
| 577 | Cell[7946, 244, 85, 1, 30, "Subsection"], |
| 578 | |
| 579 | Cell[CellGroupData[{ |
| 580 | Cell[8056, 249, 60, 1, 27, "Input"], |
| 581 | Cell[8119, 252, 613, 9, 151, "Print", |
| 582 | CellTags->"Info3249106877-5554290"], |
| 583 | Cell[8735, 263, 244, 5, 50, "Text"], |
| 584 | |
| 585 | Cell[CellGroupData[{ |
| 586 | Cell[9004, 272, 78, 1, 27, "Input"], |
| 587 | Cell[9085, 275, 40, 1, 27, "Output"] |
| 588 | }, Open ]], |
| 589 | |
| 590 | Cell[CellGroupData[{ |
| 591 | Cell[9162, 281, 130, 5, 57, "Input"], |
| 592 | Cell[9295, 288, 323, 5, 75, "Output"] |
| 593 | }, Open ]], |
| 594 | Cell[9633, 296, 196, 6, 32, "Text"], |
| 595 | |
| 596 | Cell[CellGroupData[{ |
| 597 | Cell[9854, 306, 149, 5, 57, "Input"], |
| 598 | Cell[10006, 313, 633, 9, 139, "Output"] |
| 599 | }, Open ]] |
| 600 | }, Open ]], |
| 601 | |
| 602 | Cell[CellGroupData[{ |
| 603 | Cell[10688, 328, 255, 6, 50, "Text"], |
| 604 | |
| 605 | Cell[CellGroupData[{ |
| 606 | Cell[10968, 338, 86, 1, 27, "Input"], |
| 607 | Cell[11057, 341, 62, 1, 27, "Output"] |
| 608 | }, Open ]], |
| 609 | |
| 610 | Cell[CellGroupData[{ |
| 611 | Cell[11156, 347, 138, 4, 42, "Input"], |
| 612 | Cell[11297, 353, 196, 3, 43, "Output"] |
| 613 | }, Open ]], |
| 614 | Cell[11508, 359, 342, 7, 68, "Text"] |
| 615 | }, Open ]] |
| 616 | }, Closed]], |
| 617 | |
| 618 | Cell[CellGroupData[{ |
| 619 | Cell[11899, 372, 94, 1, 30, "Subsection"], |
| 620 | Cell[11996, 375, 272, 6, 48, "Text"], |
| 621 | Cell[12271, 383, 61, 1, 27, "Input"], |
| 622 | |
| 623 | Cell[CellGroupData[{ |
| 624 | Cell[12357, 388, 124, 4, 42, "Input"], |
| 625 | Cell[12484, 394, 913, 12, 171, "Output"] |
| 626 | }, Open ]], |
| 627 | |
| 628 | Cell[CellGroupData[{ |
| 629 | Cell[13434, 411, 68, 1, 27, "Input"], |
| 630 | Cell[13505, 414, 41, 1, 27, "Output"] |
| 631 | }, Open ]], |
| 632 | Cell[13561, 418, 141, 5, 57, "Input"], |
| 633 | |
| 634 | Cell[CellGroupData[{ |
| 635 | Cell[13727, 427, 74, 1, 27, "Input"], |
| 636 | Cell[13804, 430, 51, 1, 27, "Output"] |
| 637 | }, Open ]], |
| 638 | Cell[13870, 434, 149, 4, 32, "Text"], |
| 639 | |
| 640 | Cell[CellGroupData[{ |
| 641 | Cell[14044, 442, 64, 1, 27, "Input"], |
| 642 | Cell[14111, 445, 291, 4, 59, "Output"] |
| 643 | }, Open ]] |
| 644 | }, Closed]], |
| 645 | |
| 646 | Cell[CellGroupData[{ |
| 647 | Cell[14451, 455, 81, 1, 30, "Subsection"], |
| 648 | |
| 649 | Cell[CellGroupData[{ |
| 650 | Cell[14557, 460, 66, 1, 27, "Input"], |
| 651 | Cell[14626, 463, 66, 1, 27, "Output"] |
| 652 | }, Open ]] |
| 653 | }, Closed]] |
| 654 | } |
| 655 | ] |
| 656 | *) |
| 657 | |
| 658 | |
| 659 | |
| 660 | (******************************************************************* |
| 661 | End of Mathematica Notebook file. |
| 662 | *******************************************************************) |
| 663 | |