Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher...
-
Upload
katrina-little -
Category
Documents
-
view
220 -
download
0
Transcript of Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher...
![Page 1: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/1.jpg)
Periods of Coefficients of Ehrhart
Quasipolynomials of 2-Dimensional
PolytopesBy Christopher O’Neill and Anastasia Chavez
![Page 2: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/2.jpg)
Topics
•Review of Preliminary Topics / Problem
•Proof of Formula used in Program
•Overview of Pari
•Overview of the Code
•Final Remaining Steps
![Page 3: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/3.jpg)
Review of Topic
•Definition(s) of a Polytope and equivalence
•Lattice point counting
•Dilates of Polytopes
•Ehrhart Quasipolynomial
•Ehrhart Series (new)
![Page 4: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/4.jpg)
Computing the Ehrhart Quasipolynomial
•g(z)/h(z) = sum(t >= 0 of f(t)*z^t)
•[g(z), h(z) polynomials, deg(g) < deg(h), all roots of h(z) are pth roots of unity, at least one them has multiplicity d+1] => f(t) is a quasipolynomial
![Page 5: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/5.jpg)
Overview of Pari
•Command-line algebraic simplification
•Pari vs. Maple
•Time
•Proper simplification
•Piping through stdin
![Page 6: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/6.jpg)
Overview of Pari
•Notes on use:• Reading GPRC: /etc/gprc ...Done.
GP/PARI CALCULATOR Version 2.1.6 (released)...parisize = 4000000, primelimit = 500000
? (t+1)*(t+2)%1 = t^2 + 3*t + 2? \qGood bye!
•Don’t want all this garbage, use -q option
![Page 7: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/7.jpg)
Overview of Pari
•With -q option:? (t+1)*(t+2)t^2 + 3*t + 2? \q
•Much better, but still colored: use -test
•Final output:? (t+1)*(t+2)t^2 + 3*t + 2? \q
![Page 8: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/8.jpg)
Overview of Pari
•temp.lat.rat from Latte:(((((((1) + (-1)*t^1) * (((1) + (-1)*t^1) * (-183)))^1) * (412)) + ((-1) * ((((1) + (-1)*t^1) * ((((1) + (-1)*t^1) * (-16653)) + ((191) * (-183)))) + ((229) * (((1) + (-1)*t^1) * (-183)))) * (1))) / ((((1) + (-1)*t^1) * (((1) + (-1)*t^1) * (-183)))^2)) + ((-1) * (((((((1) + (-1)*t^1) * ((-183) * ((1) + (-1)*t^1)))^1) * (229)) + ((-1) * ((((1) + (-1)*t^1) * (((-183) * (8)) + ((-16653) * ((1) + (-1)*t^1)))) + ((46) * ((-183) * ((1) + (-1)*t^1)))) * (1))) / ((((1) + (-1)*t^1) * ((-183) * ((1) + (-1)*t^1)))^2)))
•Output from ‘gp -q -test < temp.lat.rat’:(-t - 1)/(t^3 - 3*t^2 + 3*t - 1)
•Much easier to deal with!
![Page 9: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/9.jpg)
Overview of Code
•Coded in C, using gcc
•Split into parts:
•Generate random 2D Polytope
•Create its Vertex file for CDD
![Page 10: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/10.jpg)
Overview of Code
•Split into parts (continued):
•Run CDD, convert file to Latte format
•Run Ehrhart, simplify output with Pari
•Extract quasipolynomial from series
•Extract periods of Coefficients
![Page 11: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/11.jpg)
Overview of Code•Generating 2D polytope:
•User supplies # vertices, min/max values
•Generate random vertices (x1/x2, y1/y2), where min <= x1, x2, y1, y2 <= max
•Store in structure and return
•Find denominator as maximal period
![Page 12: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/12.jpg)
Overview of Code
•Can also specify a specific 2D polytope
•Our example: (0,0), (1,2/3), (3,0)
(0,0(0,0))
(3,0(3,0))
(1,2/3(1,2/3))
![Page 13: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/13.jpg)
Overview of Code
•Create vertex file for CDD by outputting the vertices into a file in the correct format
•Sample file:V-representationbegin3 3 rational1 0/1 0/11 1/1 2/31 3/1 0/1end
•Run CDD to get hyperplane file
![Page 14: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/14.jpg)
Overview of Code
•Output file from CDD:* cdd+: Double Description Method in C++:Version 0.77dev1 (Jan. 25, 2000)* Copyright (C) 1999, Komei Fukuda, [email protected]* Compiled for Rational Exact Arithmetic with GMP...*Total processor time = 0 seconds* = 0h 0m 0s*Since hull computation is chosen, the output is a minimal inequality system*FINAL RESULT:*Number of Facets = 3H-representationbegin3 3 rational 3 -1 -3 0 0 1 0 1 -3/2end
![Page 15: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/15.jpg)
Overview of Code
•Convert CDD file for use with Latte
•Remove garbage
•Convert to integers
•Converted file:3 3 3 -1 -3 0 0 1 0 2 -3
•Run ehrhart command, get unsimplified file
![Page 16: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/16.jpg)
Overview of Code
•Unsimplified file:x := (t^1 / ((((1) + (-1)*t^1) * (((1) + (-1)*t^1) * ((1) + (-1)*t^1)))^1)) + ((-1) * (t^2 / ((((1) + (-1)*t^1) * (((1) + (-1)*t^3) * ((1) + (-1)*t^1)))^1))) + ((-1) * (((((((1) + (-1)*t^1) * (((1) + (-1)*t^1) * (-152)))^1) * (152)) + ((-1) * ((((1) + (-1)*t^1) * ((((1) + (-1)*t^1) * (-11476)) + ((-238)*t^1 * (-152)))) + ((-1185)*t^1 * (((1) + (-1)*t^1) * (-152)))) * (1))) / ((((1) + (-1)*t^1) * (((1) + (-1)*t^1) * (-152)))^2))) + (t^2 / ((((1) + (-1)*t^1) * (((1) + (-1)*t^3) * ((1) + (-1)*t^1)))^1)) + ((((((-152) * (((1) + (-1)*t^1) * ((1) + (-1)*t^1)))^1) * (0)) + ((-1) * (((-152) * ((((1) + (-1)*t^1) * (-881)*t^1) + ((-390)*t^1 * ((1) + (-1)*t^1)))) + ((-11476) * (((1) + (-1)*t^1) * ((1) + (-1)*t^1)))) * (1))) / (((-152) * (((1) + (-1)*t^1) * ((1) + (-1)*t^1)))^2)):
•Modify file for Pari:(t^1 / ((((1) + (-1)*t^1) * (((1) + (-1)*t^1) * ((1) + (-1)*t^1)))^1)) + ((-1) * (t^2 / ((((1) + (-1)*t^1) * (((1) + (-1)*t^3) * ((1) + (-1)*t^1)))^1))) + ((-1) * (((((((1) + (-1)*t^1) * (((1) + (-1)*t^1) * (-152)))^1) * (152)) + ((-1) * ((((1) + (-1)*t^1) * ((((1) + (-1)*t^1) * (-11476)) + ((-238)*t^1 * (-152)))) + ((-1185)*t^1 * (((1) + (-1)*t^1) * (-152)))) * (1))) / ((((1) + (-1)*t^1) * (((1) + (-1)*t^1) * (-152)))^2))) + (t^2 / ((((1) + (-1)*t^1) * (((1) + (-1)*t^3) * ((1) + (-1)*t^1)))^1)) + ((((((-152) * (((1) + (-1)*t^1) * ((1) + (-1)*t^1)))^1) * (0)) + ((-1) * (((-152) * ((((1) + (-1)*t^1) * (-881)*t^1) + ((-390)*t^1 * ((1) + (-1)*t^1)))) + ((-11476) * (((1) + (-1)*t^1) * ((1) + (-1)*t^1)))) * (1))) / (((-152) * (((1) + (-1)*t^1) * ((1) + (-1)*t^1)))^2))
![Page 17: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/17.jpg)
Overview of Code
•Simplified file from Pari:(t + 1)/(-t^3 + 3*t^2 - 3*t + 1)
•Expanded g(z) polynomial:t^7 + 4*t^6 + 9*t^5 + 13*t^4 + 13*t^3 + 9*t^2 + 4*t + 1
•Quasipolynomial constituents1/1*t^2 2/1*t^1 1/1*t^0 1/1*t^2 2/1*t^1 1/1*t^0 1/1*t^2 2/1*t^1 1/1*t^0
•Lack of pretty print only temporary!
![Page 18: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/18.jpg)
Overview of Code
•Find periods of each coefficient
•Starting at 1, loop through divisors of denominator
•Stop when we find a valid period
•C code given on next slidevoid getPeriods(Polynomial *subPolys, int *p0, int *p1, int period)
![Page 19: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/19.jpg)
Overview of Code• per0 = 1;
while(per0 < period) { matchFound = 1; for(j = 0;j < per0;j++) { initial = subPolys[j].coefficients[2]; frac = subPolys[j].fractions[2]; for(k = 0;k < period / per0;k++) { if (subPolys[(k * per0) + j].coefficients[2] != initial || subPolys[(k * per0) + j].fractions[2] != frac) { matchFound = 0; } } } if (matchFound) { break; } per0++; while(period % per0 != 0 && per0 < period) per0++; }
![Page 20: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/20.jpg)
Overview of Code•For our example, both periods are 1,
since all 3 constituents of the quasipolynomial are the same polynomial
•Worst-case running time: O(d^2), where d is the denominator of the polytope
•Final line of output from program:NumVerts: 3, Verts: (0/1, 0/1), (1/1, 2/3), (3/1, 0/1), Periods: p0 = 1, p1 = 1, denom = 3...
![Page 21: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/21.jpg)
Possible Improvements
•Pretty print
•Simplifying fractions
•Eliminate unnecessary vertices (CDD)
•Saving data to a database rather than printing a lot of garbage to cmd line
•Add cmd line options (verbosity, quiet, etc.)
![Page 22: Periods of Coefficients of Ehrhart Quasipolynomials of 2- Dimensional Polytopes By Christopher O’Neill and Anastasia Chavez.](https://reader036.fdocuments.in/reader036/viewer/2022062309/5697bf7c1a28abf838c840ad/html5/thumbnails/22.jpg)
Expected Results
•Next steps:
•Run program a massive # of times to produce a ton of random polytopes
•Check data for period collapse, look for period combinations that don’t appear