Ask Your Question

kdilks's profile - activity

2018-05-02 08:32:23 -0600 received badge  Nice Answer (source)
2016-02-17 14:17:45 -0600 received badge  Teacher (source)
2016-02-17 07:17:38 -0600 answered a question Can sage compute the h* vector of a polytope?

Sage doesn't have a direct 'print out the h* vector' command. It's not too difficult to manipulate the Ehrhart polynomial to get it, though I'm not sure my way could be cleanly implemented into Sage proper.

Let's say P is your polytope, of dimension n=P.dimension(), with Ehrhart polynomial p=P.ehrhart_polynomial() . Also, let t=p.parent().gen() . We need a polynomial ring to work over, and this let's us work over the same polynomial ring as p. Now, compute the first n+2 terms of the Ehrhart series (or more, if you want to be safe)

X=0
for i in range(0,n+10):
    X+=p(i)*t^i
print(X)

Now, look at X*(1-t)^(n+1) . If X were the entire infinite Ehrhart series, we would get exactly the h* vector. But since we took sufficiently many terms of the Ehrhart series, we'll get lower order terms corresponding to the h* vector, and higher order error terms that can be discarded.

2015-06-22 05:19:37 -0600 answered a question Building Sage on 32-bit Fedora 22; build errors

Hi,

I had the same problem trying to build Sage on my Chromebook. It is a permissions issue. You have to make sure that nobody other than your account (and root) have write access to /opt/sage.

In my situation, the directory was in the group 'users', which had write access. I chose to change the group for the directory to the singleton group consisting of my main user account, though I also could have changed the permissions for the folder so that the group 'users' didn't have write access.