diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 4590822c..8fdf1407 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-09-25T19:14:44","documenter_version":"1.0.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-09-25T20:20:03","documenter_version":"1.0.1"}} \ No newline at end of file diff --git a/dev/generated/Coloring/48da499f.svg b/dev/generated/Coloring/562ae81f.svg similarity index 95% rename from dev/generated/Coloring/48da499f.svg rename to dev/generated/Coloring/562ae81f.svg index fd22cab1..322090fa 100644 --- a/dev/generated/Coloring/48da499f.svg +++ b/dev/generated/Coloring/562ae81f.svg @@ -2,37 +2,37 @@ diff --git a/dev/generated/Coloring/e6ffa2e3.svg b/dev/generated/Coloring/beec6420.svg similarity index 95% rename from dev/generated/Coloring/e6ffa2e3.svg rename to dev/generated/Coloring/beec6420.svg index 73c23ee9..1d20316b 100644 --- a/dev/generated/Coloring/e6ffa2e3.svg +++ b/dev/generated/Coloring/beec6420.svg @@ -2,37 +2,37 @@ diff --git a/dev/generated/Coloring/6948b7a5.svg b/dev/generated/Coloring/c2dd93f2.svg similarity index 89% rename from dev/generated/Coloring/6948b7a5.svg rename to dev/generated/Coloring/c2dd93f2.svg index 3a129db8..06136c5f 100644 --- a/dev/generated/Coloring/6948b7a5.svg +++ b/dev/generated/Coloring/c2dd93f2.svg @@ -2,37 +2,37 @@ diff --git a/dev/generated/Coloring/index.html b/dev/generated/Coloring/index.html index 5cf44349..6fb3f464 100644 --- a/dev/generated/Coloring/index.html +++ b/dev/generated/Coloring/index.html @@ -5,7 +5,7 @@ locations = [[rot15(0.0, 2.0, i) for i=0:4]..., [rot15(0.0, 1.0, i) for i=0:4]...] -show_graph(graph; locs=locations, format=:svg)
We construct the tensor network for the 3-coloring problem as
problem = Coloring{3}(graph);
Type Coloring
can be used for constructing the tensor network with optimized contraction order for a coloring problem. Let us use 3-coloring problem defined on vertices as an example. For a vertex $v$, we define the degrees of freedom $c_v\in\{1,2,3\}$ and a vertex tensor labelled by it as
\[W(v) = \left(\begin{matrix} +show_graph(graph; locs=locations, format=:svg)
We construct the tensor network for the 3-coloring problem as
problem = Coloring{3}(graph);
Type Coloring
can be used for constructing the tensor network with optimized contraction order for a coloring problem. Let us use 3-coloring problem defined on vertices as an example. For a vertex $v$, we define the degrees of freedom $c_v\in\{1,2,3\}$ and a vertex tensor labelled by it as
\[W(v) = \left(\begin{matrix} 1\\ 1\\ 1 @@ -20,9 +20,9 @@ vertex_color_map = Dict(0=>"red", 1=>"green", 2=>"blue") show_graph(graph; locs=locations, format=:svg, vertex_colors=[vertex_color_map[Int(c)] - for c in single_solution.c.data])
Let us try to solve the same issue on its line graph, a graph that generated by mapping an edge to a vertex and two edges sharing a common vertex will be connected.
linegraph = line_graph(graph)
+ for c in single_solution.c.data])
Let us try to solve the same issue on its line graph, a graph that generated by mapping an edge to a vertex and two edges sharing a common vertex will be connected.
linegraph = line_graph(graph)
show_graph(linegraph; locs=[0.5 .* (locations[e.src] .+ locations[e.dst])
- for e in edges(graph)], format=:svg)
Let us construct the tensor network and see if there are solutions.
lineproblem = Coloring{3}(linegraph);
+ for e in edges(graph)], format=:svg)
Let us construct the tensor network and see if there are solutions.
lineproblem = Coloring{3}(linegraph);
-num_of_coloring = solve(lineproblem, CountingMax())[]
(28.0, 1800.0)โ
You will see the maximum size 28 is smaller than the number of edges in the linegraph
, meaning no solution for the 3-coloring on edges of a Petersen graph.
This page was generated using Literate.jl.
Settings
This document was generated with Documenter.jl version 1.0.1 on Monday 25 September 2023. Using Julia version 1.9.3.