From 12724ca7faf3e3f0bb43cffeea77970e4d3b5977 Mon Sep 17 00:00:00 2001 From: Yue Ren Date: Sat, 11 Jan 2025 08:44:26 +0000 Subject: [PATCH 1/3] PolyhedralGeometry: added tutte_lifting(::Graph) --- .../Polyhedra/constructions.md | 1 + .../Polyhedron/standard_constructions.jl | 37 +++++++++++++++++++ src/exports.jl | 1 + 3 files changed, 39 insertions(+) diff --git a/docs/src/PolyhedralGeometry/Polyhedra/constructions.md b/docs/src/PolyhedralGeometry/Polyhedra/constructions.md index c382387c72f9..2a947635d5e6 100644 --- a/docs/src/PolyhedralGeometry/Polyhedra/constructions.md +++ b/docs/src/PolyhedralGeometry/Polyhedra/constructions.md @@ -190,6 +190,7 @@ rss_associahedron signed_permutahedron stable_set_polytope transportation_polytope +tutte_lifting zonotope zonotope_vertices_fukuda_matrix ``` diff --git a/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl b/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl index 99a1c3e228b3..069c9260be44 100644 --- a/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl +++ b/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl @@ -2455,3 +2455,40 @@ function vertex_figure(P::Polyhedron{T}, n::Int; cutoff=nothing) where {T<:scala Polymake.polytope.vertex_figure(pm_object(P), n - 1; opts...), coefficient_field(P) ) end + +@doc raw""" + tutte_lifting(G::Graph{Undirected}) + +Compute a realization of `G` in $\mathbb{R}^3$, i.e., a polyhedron whose edge graph is `G`. Assumes that `G` is planar, 3-connected, and that is has a triangular facet. + +# Examples +```jldoctest +julia> G = edgegraph(simplex(3)) +Undirected graph with 4 nodes and the following edges: +(2, 1)(3, 1)(3, 2)(4, 1)(4, 2)(4, 3) + +julia> pG = tutte_lifting(G) +Polytope in ambient dimension 3 + +julia> vertices(pG) +4-element SubObjectIterator{PointVector{QQFieldElem}}: + [0, 0, 0] + [1, 0, 1//3] + [0, 1, 0] + [1//3, 1//3, 0] + +julia> faces(IncidenceMatrix,pG,1) +6×4 IncidenceMatrix +[1, 2] +[1, 3] +[1, 4] +[2, 3] +[2, 4] +[3, 4] + +``` +""" +function tutte_lifting(G::Graph{Undirected}) + pmG = Polymake.graph.Graph{Undirected}(; ADJACENCY=G) + return polyhedron(Polymake.polytope.tutte_lifting(pmG)) +end diff --git a/src/exports.jl b/src/exports.jl index 0dd3e2c74f0f..efc4e0b3c4e6 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -1638,6 +1638,7 @@ export tropical_variety export truncate export turn_denominator_into_polyhedron export tutte_connectivity +export tutte_lifting export tutte_polynomial export twist export twisting_sheaf From 0c9f32dfe7479b9a5c8efe766d7888531b008d7a Mon Sep 17 00:00:00 2001 From: Yue Ren Date: Mon, 13 Jan 2025 09:05:46 +0000 Subject: [PATCH 2/3] Update src/PolyhedralGeometry/Polyhedron/standard_constructions.jl Co-authored-by: Benjamin Lorenz --- src/PolyhedralGeometry/Polyhedron/standard_constructions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl b/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl index 069c9260be44..98be32f5450d 100644 --- a/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl +++ b/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl @@ -2463,7 +2463,7 @@ Compute a realization of `G` in $\mathbb{R}^3$, i.e., a polyhedron whose edge gr # Examples ```jldoctest -julia> G = edgegraph(simplex(3)) +julia> G = vertex_edge_graph(simplex(3)) Undirected graph with 4 nodes and the following edges: (2, 1)(3, 1)(3, 2)(4, 1)(4, 2)(4, 3) From df009d98a74160029f18e0614ca9aa037c7f9c09 Mon Sep 17 00:00:00 2001 From: Benjamin Lorenz Date: Mon, 13 Jan 2025 10:36:48 +0100 Subject: [PATCH 3/3] Update src/PolyhedralGeometry/Polyhedron/standard_constructions.jl --- src/PolyhedralGeometry/Polyhedron/standard_constructions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl b/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl index 98be32f5450d..742fddfb53d9 100644 --- a/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl +++ b/src/PolyhedralGeometry/Polyhedron/standard_constructions.jl @@ -2490,5 +2490,5 @@ julia> faces(IncidenceMatrix,pG,1) """ function tutte_lifting(G::Graph{Undirected}) pmG = Polymake.graph.Graph{Undirected}(; ADJACENCY=G) - return polyhedron(Polymake.polytope.tutte_lifting(pmG)) + return Polyhedron{QQFieldElem}(Polymake.polytope.tutte_lifting(pmG), QQ) end