You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ This package implements generic tensor networks to compute *solution space prope
8
8
The *solution space properties* include
9
9
* The maximum/minimum solution sizes,
10
10
* The number of solutions at certain sizes,
11
-
* The enumeration of solutions at certian sizes.
12
-
* The direct sampling of solutions at certian sizes.
11
+
* The enumeration of solutions at certain sizes.
12
+
* The direct sampling of solutions at certain sizes.
13
13
14
14
The solvable problems include [Independent set problem](@ref), [Maximal independent set problem](@ref), [Cutting problem (Spin-glass problem)](@ref), [Vertex matching problem](@ref), [Binary paint shop problem](@ref), [Coloring problem](@ref), [Dominating set problem](@ref), [Set packing problem](@ref) and [Set covering problem](@ref).
# The return value has type [`CountingTropical`](@ref), while its counting field having type [`ConfigEnumerator`](@ref). The `data` field of a [`ConfigEnumerator`](@ref) instance contains a vector of bit strings.
# The first case corresponds to all the neighbourhood vertices of ``v`` are not in ``I_{m}``, then ``v`` must be in ``I_{m}`` and contribute a factor ``x_{v}^{w_v}``,
37
+
# The first case corresponds to all the neighborhood vertices of ``v`` are not in ``I_{m}``, then ``v`` must be in ``I_{m}`` and contribute a factor ``x_{v}^{w_v}``,
38
38
# where ``w_v`` is the weight of vertex ``v``.
39
-
# Otherwise, if any of the neighbouring vertices of ``v`` is in ``I_{m}``, ``v`` must not be in ``I_{m}`` by the independence requirement.
39
+
# Otherwise, if any of the neighboring vertices of ``v`` is in ``I_{m}``, ``v`` must not be in ``I_{m}`` by the independence requirement.
40
40
41
41
# Its contraction time space complexity of a [`MaximalIS`](@ref) instance is no longer determined by the tree-width of the original graph ``G``.
42
42
# It is often harder to contract this tensor network than to contract the one for regular independent set problem.
# and the goal becomes a min-cut problem defined on black edges.
35
35
36
36
# ## Generic tensor network representation
37
-
# Let us contruct the problem instance as bellow.
37
+
# Let us construct the problem instance as bellow.
38
38
problem =PaintShop(sequence);
39
39
40
40
# ### Theory (can skip)
41
41
# Type [`PaintShop`](@ref) can be used for constructing the tensor network with optimized contraction order for solving a binary paint shop problem.
42
42
# To obtain its tensor network representation, we associating car ``c_i`` (the ``i``-th character in our example) with a degree of freedom ``s_{c_i} \in \{0, 1\}``,
43
43
# where we use ``0`` to denote the first appearance of a car is colored red and ``1`` to denote the first appearance of a car is colored blue.
44
-
# For each black edges ``(i, i+1)``, we define an edge tensor labeld by ``(s_{c_i}, s_{c_{i+1}})`` as follows:
44
+
# For each black edges ``(i, i+1)``, we define an edge tensor labeled by ``(s_{c_i}, s_{c_{i+1}})`` as follows:
45
45
# If both cars on this edge are their first or second appearance
Copy file name to clipboardExpand all lines: examples/Satisfiability.jl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
# ## Problem definition
7
7
# In logic and computer science, the [boolean satisfiability problem](https://en.wikipedia.org/wiki/Boolean_satisfiability_problem) is the problem of determining if there exists an interpretation that satisfies a given boolean formula.
8
-
# One can specify a satisfiable problem in the [conjuctive normal form](https://en.wikipedia.org/wiki/Conjunctive_normal_form).
8
+
# One can specify a satisfiable problem in the [conjunctive normal form](https://en.wikipedia.org/wiki/Conjunctive_normal_form).
9
9
# In boolean logic, a formula is in conjunctive normal form (CNF) if it is a conjunction (∧) of one or more clauses,
10
10
# where a clause is a disjunction (∨) of literals.
11
11
using GenericTensorNetworks
@@ -26,7 +26,7 @@ satisfiable(cnf, assignment)
26
26
problem =Satisfiability(cnf);
27
27
28
28
# ### Theory (can skip)
29
-
# We can contruct a [`Satisfiability`](@ref) problem to solve the above problem.
29
+
# We can construct a [`Satisfiability`](@ref) problem to solve the above problem.
30
30
# To generate a tensor network, we map a boolean variable ``x`` and its negation ``\neg x`` to a degree of freedom (label) ``s_x \in \{0, 1\}``,
31
31
# where 0 stands for variable ``x`` having value `false` while 1 stands for having value `true`.
32
32
# Then we map a clause to a tensor. For example, a clause ``¬x ∨ y ∨ ¬z`` can be mapped to a tensor labeled by ``(s_x, s_y, s_z)``.
# Open degrees of freedom is useful when the graph under consideration is an induced subgraph of another graph.
3
+
# The vertices connected to the rest part of the parent graph can not be summed over directly, which can be specified with the `openvertices` keyword argument in the graph problem constructor.
2
4
# Let us use the maximum independent set problem on Petersen graph as an example.
3
5
#
4
6
using GenericTensorNetworks, Graphs
@@ -10,10 +12,5 @@ problem = IndependentSet(graph; openvertices=[1,2,3])
10
12
11
13
mis_tropical_tensor =solve(problem, SizeMax())
12
14
13
-
# The MIS tropical tensor shows the MIS size under different configuration of open vertices.
14
-
# It is useful in MIS tropical tensor analysis.
15
-
# We can compatify (reference to be added) this MIS-Tropical tensor by typing
16
-
17
-
mis_compactify!(mis_tropical_tensor)
18
-
19
-
# It will eliminate some entries having no contribution to the MIS size when embeding this local graph into a larger one.
15
+
# The return value is a rank-3 tensor, with its elements being the MIS sizes under different configuration of open vertices.
16
+
# For the maximum independent set problem, this tensor is also called the MIS tropical tensor, which can be useful in the MIS tropical tensor analysis (reference to be added).
0 commit comments