Ask Your Question
1

why I get huge number in H-representation in sage?

asked 2018-09-07 17:55:00 +0100

naghmeh_ms gravatar image

updated 2019-08-26 21:15:45 +0100

FrédéricC gravatar image

I have a set of vertices and I want to find a H-representation of them. I used sage to do that but I got weird number in the inequalities! here is my code:

vert2 = [[1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4,3,2,3,4,1,0,3,0,1],[1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4,3,2,3,4,1,0,3,0],[0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4,3,2,3,4,1,0,3],[3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4,3,2,3,4,1,0],[0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4,3,2,3,4,1],[1,0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4,3,2,3,4],[4,1,0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4,3,2,3],[3,4,1,0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4,3,2],[2,3,4,1,0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4,3],[3,2,3,4,1,0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7,4],
[4,3,2,3,4,1,0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6,7],[7,4,3,2,3,4,1,0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5,6],[6,7,4,3,2,3,4,1,0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4,5],[5,6,7,4,3,2,3,4,1,0,3,0,1,1,2,3,4,2,3,6,0,0,7,6,8,0,1,2,3,4],[4,5,6,7,4,3,2,3,4,1,0,3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ZZ^30 defined as the convex hull of 30 vertices
(An equation (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) x - 91 == 0, An inequality (0, -6643755617445331037202609358, -1115451987061522518725310169, -4620824246361587837443723580, -3077838211630051976366550554, -2958690652672660811230373721, -974408181934402275593859480, -3250586099217454711737435326, -1999390120369594790625124513, -1415422103472822894852139772, -2534807215524130595973233650, -2780858391260346768723034201, -4072521014492760746645432088, -1331138469264064061646992630, -4722885096499104848736533209, -3180475210961898948969228316, -3851685143879995858104878858, -3228011163515660410829231425, -3072642994521821646580427696, -1374868705058151838371429430, -4889037447034222629220355689, -2510460065219895800789661380, -2297947035840486945050864530, -3657717103544642567050992273, -3458628241192993528820697768, -295584745844116667823309878, -3868958368255490017832885737, -6000440427999093271578675404, 853080186343081392188416198, -2835167870342318913892483281) x + 260907258623794816872847788563 >= 0, An inequality (0, -3688248056685400306080899479, -853080186343081392188416198, -7496835803788412429391025556, -1968532173404603910913726367, -5473904432704669229632139778, -3930918397973133368554966752, -3811770839015742203418789919, -1827488368277483667782275678, -4103666285560536103925851524, -2852470306712676182813540711, -2268502289815904287040555970, -3387887401867211988161649848, -3633938577603428160911450399, -4925601200835842138833848286, -2184218655607145453835408828, -5575965282842186240924949407, -4033555397304980341157644514, -4704765330223077250293295056, -4081091349858741803017647623, -3925723180864903038768843894, -2227948891401233230559845628, -5742117633377304021408771887, -3363540251562977192978077578, -3151027222183568337239280728, -4510797289887723959239408471, -4311708427536074921009113966, -1148664932187198060011726076, -4722038554598571410021301935, -6853520614342174663767091602) x + 338537555581015223561993662581 >= 0,
edit retag flag offensive close merge delete

Comments

1 Answer

Sort by » oldest newest most voted
1

answered 2018-09-09 17:08:28 +0100

vdelecroix gravatar image

What do you expect? The transformation from V-representation to H-representation is not a trivial one. This coefficient blowup might already seen when looking at solution to linear equations

sage: M = matrix(5, 6, [[2,1,0,0,0,0],
....:                   [0,2,1,0,0,0],
....:                   [0,0,2,1,0,0],
....:                   [0,0,0,2,1,0],
....:                   [0,0,0,0,2,1]])
sage: M
[2 1 0 0 0 0]
[0 2 1 0 0 0]
[0 0 2 1 0 0]
[0 0 0 2 1 0]
[0 0 0 0 2 1]
sage: M.right_kernel()
Free module of degree 6 and rank 1 over Integer Ring
Echelon basis matrix:
[  1  -2   4  -8  16 -32]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-09-07 17:55:00 +0100

Seen: 317 times

Last updated: Sep 09 '18