alphaFeedback

WorksMathematics

Algorithms for Short Human-Verifiable Proofs of Non-Word-Representability

AI contributions
Not recorded for this paper
View details
Ancillary data
1 code link
View

Abstract

A graph is word-representable if it can be represented using alternation of letters in words. The class of word-representable graphs generalizes several important graph families and admits a characterization via semi-transitive orientations. Recognizing word-representability is an NP-complete problem, and a major bottleneck in the theory of word-representable graphs is providing efficient justifications of non-word-representability of graphs, rather than merely referring to software verification. Recently, Kitaev and Sun initiated the development of methods for the automatic generation of human-verifiable proofs of non-word-representability. They introduced three algorithms and evaluated their performance on the 25 connected non-word-representable graphs on seven vertices, which constitute a fairly small sample set. In this paper, we confirm their ranking of the algorithms by testing them on all non-word-representable graphs on eight and nine vertices. We further introduce three new algorithms, one of which significantly outperforms the previously best method on graphs with at most nine vertices, producing substantially shorter proofs. We apply this algorithm to shorten a known proof of non-word-representability of the Shrikhande graph and to produce a proof of non-word-representability of a certain subgraph of the Kneser graph K(8,3)K(8,3). This subgraph is the first known example of a triangle-free non-word-representable graph, presented in the literature with reference only to a computational proof. As a by-product of our study, we correct an error in the repeatedly published list of the 25 connected non-word-representable graphs on seven vertices.

Introduction

There is an extensive body of literature devoted to the theory of word-representable graphs (see, e.g., [6, 7] and the references therein). The interest in this class stems from its connections to algebra, graph theory, computer science, combinatorics on words, and scheduling [7]. In particular, word-representable graphs generalize several fundamental graph classes, including circle graphs, 3-colorable graphs, and comparability graphs.

Two distinct letters xx and yy are said to alternate in a word ww if after deleting from ww all letters except xx and yy the resulting word is of the form xyxy⋯xyxy\cdots or yxyx⋯yxyx\cdots, of either even or odd length. A graph G=(V,E)G=(V,E) is word-representable if and only if there exists a word ww over the alphabet VV such that, for distinct x,y∈Vx,y\in V, the letters xx and yy alternate in ww if and only if xy∈Exy\in E. In this case, we say that ww represents GG. A graph is word-representable if and only if each of its connected components is word-representable [7]. Therefore, without loss of generality, we may restrict our attention to connected graphs.

The smallest non-word-representable graph (in terms of the number of vertices) has six vertices; it is the wheel graph W5W_5 (obtained from Graph 1 in Figure 4 by removing vertex 7). In contrast, there are 25 connected non-word-representable graphs on seven vertices [7]. The numbers of such graphs on eight to eleven vertices are 929, 54957, 4880093, and 650856040, respectively. This sequence took three years to compute and is listed as A290814 in the OEIS [13].

Figure 4. All connected non-word-representable graphs on seven vertices

An orientation of a graph is semi-transitive if it is acyclic (i.e., there are no directed cycles) and satisfies the following condition: for every directed path

v0→v1→⋯→vk,v_0 \to v_1 \to\cdots\to v_k,

either there is no edge between v0v_0 and vkv_k, or vi→vjv_i\to v_j is an edge for all 0≤i<j≤k0\le i<j\le k. An induced subgraph on vertices {v0,v1,…,vk}\{v_0,v_1,\ldots,v_k\} of an oriented graph is a shortcut if its orientation is acyclic and non-transitive, and it contains both the directed path v0→v1→⋯→vkv_0\to v_1\to\cdots\to v_k and the edge v0→vkv_0\to v_k, which is referred to as the shortcutting edge. Equivalently, a semi-transitive orientation can be defined as an acyclic orientation containing no shortcuts. A fundamental result in the area is the following characterization.

Theorem 1 ([5]). A graph is word-representable if and only if it admits a semi-transitive orientation.

The following known results are important for our paper.

Lemma 1 ([9]). Suppose that an undirected graph GG has a cycle C=x1x2⋯xmx1C=x_1x_2\cdots x_mx_1, where m≥4m\ge4 and the vertices in {x1,x2,…,xm}\{x_1,x_2,\ldots,x_m\} do not induce a clique in GG. If GG is oriented semi-transitively, and m−2m-2 edges of CC are oriented in the same direction (i.e., from xix_i to xi+1x_{i+1} or vice versa, where the index m+1:=1m+1:=1) then the remaining two edges of CC are oriented in the opposite direction.

Theorem 2 [11]. Suppose that a graph GG is word-representable and that vv is a vertex of GG. Then there exists a semi-transitive orientation of GG in which vv is a source (that is, all edges incident with vv are oriented away from vv). Likewise, there exists a semi-transitive orientation of GG in which vv is a sink (that is, all edges incident with vv are oriented toward vv).

Recognizing word-representability of a graph is NP-complete [7]. A major practical difficulty in the theory of word-representable graphs is providing convincing and efficient proofs of non-word-representability, particularly when references to software (even publicly available and user-friendly tools such as [2]) are undesirable. In contrast, word-representability can be certified by exhibiting a semi-transitive orientation, which can be verified in polynomial time [7].

Proving non-word-representability

A comparability graph is an undirected graph that admits a transitive orientation. It is known (see [8]) that the neighbourhood of every vertex in a word-representable graph is a comparability graph, and recognizing comparability graphs can be done in polynomial time [3]. Therefore, we obtain a polynomial-time test for non-word-representability of a graph GG: for each vertex, verify whether its neighbourhood induces a comparability graph; if a neighbourhood that is not a comparability graph is found, then GG is not word-representable. On the other hand, if all neighbourhoods are comparability graphs, the test is inconclusive, as the graph may or may not be word-representable [7].

Thus, if the test above fails and no known non-word-representable induced subgraph is found in the given graph, then, prior to [11], the possible approaches to justify non-word-representability were the following:

  • (a) To produce some kind of ad-hoc (preferably elegant) argument that assumes the existence of a semi-transitive orientation and derives a contradiction. This approach is preferable, but such arguments are usually difficult to construct.

  • (b) To examine all O(2#edges)O(2^{\#\mathrm{edges}}) orientations and justify that none of them is semi-transitive. Symmetries can be exploited to reduce the search space; in particular, any given edge may be assumed to have a fixed orientation. A variation of this approach is implemented in some existing software [2, 14]. It proceeds as follows: orient an edge e1e_1 in a given graph GG, then select an as yet unoriented edge e2e_2 and branch on it, creating two copies of the partially oriented graph by orienting e2e_2 in the two possible ways; then branch on e3e_3, and so on. At each step, one ensures that no directed cycles or shortcuts are created (if they are, the corresponding branch is discarded). In any case, even if a computer were to output all these orientations (or the entire branching process) and indicate a directed cycle or a shortcut in each orientation, such a proof would be essentially unverifiable by a human, as it would typically be far too long.

(c) To examine all O(#vertices2)O(\#\mathrm{vertices}^{2})-length words in which each vertex label occurs the same number of times and to verify that none of them has the required alternation properties (if a graph with nn vertices is word-representable, then there exists a representing word of length at most 2n22n^{2} [5]). This approach requires checking a vast number of words. However, constraint programming can be used to speed up the process [15]. In either case, it is impossible to convincingly demonstrate non-word-representability in this way without referring to software.

(d) Simply refer to publicly available software [2, 14, 15], which is less desirable, but still a valid option.

A game-changing approach that significantly increases the variety of non-word-representable graphs for which we can justify non-word-representability in a human-verifiable way was suggested in [11] by Kitaev and Sun. The basic idea in [11] is to modify the branching process using Lemma 1, which helps avoid unnecessary branching through certain preprocessing steps. This modification enabled the development of software [14] that can automatically generate human-verifiable proofs of non-word-representability. The primary criterion for the efficiency of an algorithm is the number of “lines” (in the sense specified below) in the proof it produces; the secondary criterion is the running time of the algorithm. The latter is not discussed in this paper, as it is less relevant to our goals (the problem is NP-complete, and our focus is on proof length). In fact, the approach in [11] is not novel: several papers, including [9], use it or a simpler version of it (considering cycles of length 3 and 4 only) to justify non-word-representability. However, [11] is the first paper to discuss the automated search for human-verifiable proofs of non-word-representability of graphs, which led to the development of publicly available, user-friendly software [14].

Theorem 2 provides a further dramatic reduction in the size of proofs of non-word-representability and thereby further enlarges the class of non-word-representable graphs for which we can provide “short” proofs in a fully automatic manner. Indeed, selecting a vertex of maximum degree in a given non-word-representable graph, assuming it to be a source, and then running the branching process typically results in a much shorter proof. However, there are cases in which assuming a vertex of smaller degree to be a source leads to a shorter proof.

Our contributions

The paper [11] introduces three algorithms based on Lemma 1 to generate shorter proofs of non-word-representability. These algorithms were tested and ranked (by average performance) only on the 25 non-word-representable graphs on seven vertices, which is a rather small sample. We tested the algorithms on all non-word-representable graphs on eight and nine vertices and confirmed their ranking. Moreover, we propose three additional algorithms to address the problem, one of which significantly outperforms the best known algorithm so far, while the other two may be useful for particular graphs. In Section 2, we sketch all six algorithms and discuss their observed performance, and we provide pseudocode for the empirically best-performing one. We note that in our tests we chose not to use Theorem 2; employing this theorem and considering all possible assumptions about a source could lead to different results in the comparison of the algorithms.

The paper [11] used software [14] as a proof of concept to find automatically generated “short” proofs of non-word-representability for the Shrikhande graph on 16 vertices and 48 edges (see Figure 2), and the Clebsch graph on 16 vertices and 40 edges. The latter graph has the even-cardinality subsets of {1,2,3,4,5}\{1, 2, 3, 4, 5\} as vertices, with two subsets adjacent if and only if their symmetric difference has cardinality four. While our best-performing algorithm (on average) does not improve the length of the proof for the Clebsch graph, it reduces the proof length by one third for the Shrikhande graph. The publicly available software [17] can be used to confirm our results.

Figure 2. The Shrikhande graph and its minimal non-word-representable subgraph SS (with the original labelling and the labelling used in our proof)

For any two integers k≥1k \ge1 and n≥kn \ge k, the Kneser graph K(n,k)K(n, k) is the graph whose vertices correspond to the kk-element subsets of the set {1,2,…,n}\{1, 2, \ldots, n\}, where two vertices are adjacent if and only if the corresponding sets are disjoint. Kneser graphs are vertex-transitive and edge-transitive, and they are named after Martin Kneser, who first investigated them in 1955. The subgraph SS of the Kneser graph K(8,3)K(8,3) presented in [10] and displayed in Figure 3 is the first explicit example of a triangle-free non-word-representable graph; the existence of such graphs was established via Erdős’s theorem in [4]. A systematic study of the word-representability of triangle-free graphs was conducted in [9]. Unfortunately, the non-word-representability of SS was established in [10] only computationally (by referring to the software [2]). We are now in a position to provide a human-verifiable proof of the non-word-representability of SS; see § 3 for further details.

Figure 3. A minimal non-word-representable subgraph SS of the Kneser graph K(8,3)K(8,3). Name of a vertex is in bold, and the corresponding 3-element subset is in parentheses.

Finally, the list of all 25 connected non-word-representable graphs on seven vertices has been published multiple times, for example in [7]. The paper [11] corrected two graphs in the list. However, we observed that the list presented in [11] still contains one incorrect graph. This graph, called Graph 20 in [11], is the undirected version of the semi-transitively oriented graph shown in Figure 1. We leave it to the reader as a straightforward exercise to verify that the orientation in Figure 1 is indeed semi-transitive. The correct list of the 25 connected non-word-representable graphs on seven vertices can be found in Figure 4, and a proof of non-word-representability of the updated Graph 20 follows from the easy-to-check fact that the neighborhood of vertex 1 is not a comparability graph. A proof for this graph, viewed as the line graph of the triangular book

Figure 1. The undirected version of this graph was assumed to be non-word-representable in the list of 25 non-word-representable graphs in [11], although it is actually word-representable, as witnessed by the semi-transitive orientation shown in the figure. This graph is referred to as Graph 20 in [11].

graph with three pages, is also given in [12 Lemma 10].

Six algorithms for producing proofs

In this section, we describe three known algorithms and three new algorithms for finding proofs of non-word-representability of graphs. All of these algorithms rely on the observation that the branching process should not involve any edges that do not belong to a cycle, since such edges can be oriented arbitrarily without affecting the semi-transitivity of the rest of the graph’s orientation. Moreover, all three algorithms assume that, to produce a shorter proof, branching should be performed on edges that belong to many cycles, which tends to increase the number of applications of Lemma 1. In any case, we begin by explaining the format of a proof of non-word-representability of a graph and give a small example below; see also [11]. A completed exhaustive search is conclusive: either all branches close, proving non-word-representability, or a surviving terminal partial orientation can be completed semi-transitively. At such a terminal state, all edges belonging to non-clique cycles are already oriented. Orienting the remaining edges according to a topological ordering preserves acyclicity and cannot create a shortcut, since the path and shortcutting edge of any shortcut form a non-clique cycle. A search stopped before either outcome is established is inconclusive.

We write uvuv for the undirected edge {u,v}\{u,v\} and u→vu \to v for an assigned direction. For lexicographic comparisons, vertex labels are ordered numerically and each edge uvuv is represented by the pair (u,v)(u,v) with u<vu < v, irrespective of any assigned direction. A cycle is represented by the lexicographically smallest vertex sequence among its cyclic shifts and their reversals.

The format of a proof

By a “line” of a proof, we mean a sequence of instructions that directs the orientation of a partially oriented graph and necessarily ends with a contradiction showing that this particular orientation branch will not produce a semi-transitive orientation. The idea is that if no branch produces a semi-transitive orientation, then the graph is not word-representable.

Each proof begins with assumptions on the orientations of certain edges, and there are four types of instructions:

  • “Ba→ba \to b (Copy xx)” means “Branch on edge abab, orient the edge as a→ba \to b, create a copy of the current version of the graph with the edge abab oriented as b→ab \to a, and call the new copy xx; leave Copy xx aside and continue to follow the instructions.” The instruction B occurs when no application of Lemma 1 is possible in the partially oriented graph.

  • “MCxx” means “Move to Copy xx,” where Copy xx is a partially oriented version of the graph created at some point in the branching process. This

instruction is always followed by an oriented edge a→ba \to b to remind the reader of the directed edge obtained after branching.

  • “Oa→b(Cabc)Oa \to b (Cabc)” means orient the edge abab as a→ba \to b in the cycle abcabc to avoid a directed cycle. If the cycle is longer than a triangle, this represents an application of Lemma 1 to produce a cycle where all but two edges are oriented in one direction, and one of the remaining two edges is oriented in the opposite direction.

  • “Oa→b  Oc→d(Cxyz⋯ )Oa \to b \; Oc \to d (Cxyz \cdots)” means that Lemma 1 is applied to cycle xyz⋯xyz \cdots to create new directed edges a→ba \to b and c→dc \to d.

Each line ends with either “S: xx-yy-⋯\cdots-zz,” indicating a shortcut with directed path x→y→⋯→zx \to y \to\cdots\to z and shortcutting edge x→zx \to z, or “E: xx-yy-⋯\cdots-zz,” indicating an orientation contradiction on the displayed cycle. Besides a directed cycle, this includes a non-clique cycle with directed path x→y→⋯→zx \to y \to\cdots\to z and the edge xzxz still unoriented: either direction of xzxz creates a directed cycle or a shortcut.

For example, consider the six-vertex wheel W5W_5 with hub 1 and rim 2-3-4-5-6-2. By Theorem 2, we may assume that vertex 1 is a source, so 1→i1 \to i for 2≤i≤62 \le i \le6. The following is a two-line proof:

  1. B2→32 \to3 (Copy 2) O2→62 \to6 (C1-3-2-6) O5→65 \to6 (C1-2-6-5) O5→45 \to4 (C1-4-5-6) O3→43 \to4 (C1-3-4-5) S:1-2-3-4

  2. MC2  3→22 \; 3 \to2 O6→26 \to2 (C1-3-2-6) O6→56 \to5 (C1-2-6-5) O4→54 \to5 (C1-4-5-6) O4→34 \to3 (C1-3-4-5) S:1-4-3-2.

The first line assumes 2→32 \to3 and saves the alternative 3→23 \to2 as Copy 2. Each O instruction follows from Lemma 1 on the indicated four-cycle. The line ends with 1→2→3→41 \to2 \to3 \to4 and 1→41 \to4, a shortcut because 24 is not an edge. The second line returns to Copy 2 and closes the other branch with the shortcut 1→4→3→21 \to4 \to3 \to2, again using the missing edge 24. Thus both orientations of 23 are excluded.

To print a proof for a single adjacency-matrix file graph.txt, run the software [17] with

python3 proof_lines.py --txt graph.txt --algorithm 6.

The --zip option reports proof-length statistics for a collection of graphs instead.

Algorithm 1 in [11]

Algorithm 1 sorts the edges according to the number of cycles they belong to and then branches on an edge that belongs to the largest number of cycles (whenever branching is required). If there are two or more such edges, the branching choice is made lexicographically.

Algorithm 2 (Best-Performing in [11]

Algorithm 2 selects a cycle CC with the smallest number of unoriented edges. The unoriented edges in CC are then sorted, as in Algorithm 1, according to the number of cycles they belong to, and branching is performed on an edge that belongs to the largest number of cycles. If there are two or more such edges, the branching choice is made lexicographically.

Algorithm 3 in [11]

Algorithm 3 is similar to Algorithm 2, but it selects a cycle that has the largest number NN of edges oriented in the same direction. Among the cycles with the same value of NN, Algorithm 3 selects a cycle CC with the smallest number of unoriented edges. Then, as in Algorithm 2, the unoriented edges in CC are sorted according to the number of cycles they belong to, and branching is performed on an edge that belongs to the largest number of cycles. If there are two or more such edges, the branching choice is made lexicographically.

Algorithm 4 (New)

Algorithm 4 attempts to improve the previously best-performing Algorithm 2 by keeping track of the length of the longest directed path in the current partially oriented graph (the idea being that longer directed paths may lead to more frequent applications of Lemma 1).

Algorithm 4 selects a cycle CC with the smallest number of unoriented edges. Among the cycles with the same minimum number of unoriented edges, the choice is made lexicographically. If CC contains exactly one unoriented edge, branching is performed on this edge.

Otherwise, for each unoriented edge e∈Ce \in C, Algorithm 4 temporarily orients ee in both possible directions and evaluates the resulting increase in the length of the longest directed path in the current partial orientation. For each edge, the maximum increase over the two possible orientations is recorded. The algorithm then selects an edge that maximizes this increase.

If several edges yield the same maximum increase, they are sorted in decreasing order according to the number of cycles they belong to, and branching is performed on the lexicographically smallest among them. If no edge produces a positive increase, Algorithm 4 falls back to the selection rule of Algorithm 3.

Algorithm 5 (New)

Algorithm 5 is another attempt to improve the previously best-performing Algorithm 2. Algorithm 5 selects a cycle CC with the smallest number of unoriented edges. Among the cycles with the same minimum number of unoriented edges, the choice is made lexicographically. The unoriented edges in CC are then sorted according to the following criteria:

  1. decreasing number of cycles the edge belongs to;

  1. decreasing sum of the degrees of its endpoints;

  1. lexicographic order.

Branching is performed on the first edge in this ordering.

Algorithm 6 (New, Best-Performing)

Algorithm 6 selects the branching edge using a deterministic one-step lookahead procedure. Unlike the previous algorithms, which rely only on local cycle information, Algorithm 6 explicitly simulates the immediate consequences of each candidate branching decision before selecting an edge.

The procedure consists of the following stages.

  1. Selection of critical cycles. Among all non-clique cycles (as defined by Lemma 1), we consider only those cycles that contain at least one unoriented edge. For each such cycle, we compute the number of its unoriented edges in the current partial orientation.

We then restrict our attention to the cycles with the minimum number of unoriented edges. These cycles are the most constrained and are closest to being fully oriented. All further branching decisions are derived only from this subset of cycles.

  1. Construction of candidate edges. From the selected cycles, we collect all unoriented edges and remove duplicates. These edges form the candidate branching set. If this set contains only one edge, that edge is selected immediately.

  1. One-step simulation. For each candidate edge e=uve = uv with u<vu < v, both possible orientations are examined:

  • Orient u→vu \to v;

  • Orient v→uv \to u.

For each orientation:

  1. The current state is copied and the copy is updated by orienting ee in the chosen direction.

  1. All forced propagation rules are applied: Lemma 1, triangle rule, contradiction detection (directed cycles, shortcuts, or a non-clique cycle whose final unoriented edge would create one of these).

If a contradiction is detected during propagation, the branch is considered immediately closed. Otherwise, we measure the remaining unresolved structure by counting the total number of unoriented cycle-edge incidences in the resulting state, with each edge counted once for each non-clique cycle containing it.

For each candidate edge, we therefore obtain:

  • The number of non-contradictory orientations,

  • The worst remaining unresolved count among its valid orientations.

  • The total remaining unresolved count over its valid orientations.

4. Edge comparison and selection. Candidate edges are compared using a fixed priority order:

  1. Prefer edges with fewer non-contradictory orientations (i.e., edges that close more branches immediately).

  2. Among those, prefer edges with smaller worst-case remaining unresolved structure.

  3. If still tied, prefer edges with smaller total remaining unresolved structure.

  4. If still tied, prefer edges that appear in more cycles.

  5. If still tied, prefer edges whose endpoints have larger degree sum.

  6. Finally, choose the lexicographically smallest edge, using the canonical pairs defined at the start of this section.

The edge that is best under this ordered comparison is selected for branching.

Interpretation. Algorithm 6 can be understood as a deterministic greedy lookahead rule. Instead of choosing an edge based solely on static structural properties, it evaluates the immediate impact of each branching decision and selects the edge with the best score in the stated priority order.

For the pseudocode, let UT(C)U_T(C) be the number of unoriented edges of cycle CC in state TT, and let

R(T)=∑C∈CUT(C).R(T) = \sum_{C \in\mathcal{C}} U_T(C).

Thus R(T)R(T) counts unoriented cycle-edge incidences, rather than distinct edges. The algorithm performs only one level of simulation and therefore remains computationally manageable while incorporating global structural information. Since this algorithm turns out to be the best-performing on average among all six algorithms, as shown by the experimental results in § 2.8, we present its pseudocode in Algorithm 6.

The following observation gives a formal guarantee for the lookahead rule.

Proposition 3. Suppose that a candidate edge has aa trial orientations not closed by propagation and that each surviving trial state has at most rr unoriented cycle-edge incidences, taking r=0r=0 when a=0a=0. The search subtree following this branching choice has at most

2−a+a2r2-a+a2^r

terminal branches. Algorithm 6 minimizes the number aa, then the worst residual count rr, and then the sum of the residual counts, among the candidate edges. Its branching rule preserves the soundness of the proof search.

Algorithm 6 One-step lookahead branching

Require: SS ▷ Current partial orientation state Require: CC ▷ Set of non-clique cycles Require: count⁡(e)\operatorname{count}(e) ▷ Number of cycles containing each edge Ensure: e∗e^{*} ▷ Selected branching edge, or None

  1. critical_cycles←{C∈C∣US(C)>0}\textit{critical\_cycles} \leftarrow\{C \in\mathcal{C} \mid U_{S}(C) > 0\}

  2. if critical_cycles=∅\textit{critical\_cycles} = \varnothing then

  3. &nbsp;&nbsp;&nbsp;&nbsp;return None

  4. end if

  5. t←min⁡{US(C)∣C∈critical_cycles}t \leftarrow\min\{U_{S}(C) \mid C \in\textit{critical\_cycles}\}

  6. C∗←{C∈critical_cycles∣US(C)=t}C^{*} \leftarrow\{C \in\textit{critical\_cycles} \mid U_{S}(C) = t\}

  7. candidates←\textit{candidates} \leftarrow set of all unoriented edges in cycles in C∗C^{*}

  8. if ∣candidates∣=1\lvert\textit{candidates}\rvert= 1 then

  9. &nbsp;&nbsp;&nbsp;&nbsp;return the unique edge in candidates\textit{candidates} as e∗e^{*}

  10. end if

  11. for each edge e=uve = uv in candidates\textit{candidates}, with u<vu < v do

  12. &nbsp;&nbsp;&nbsp;&nbsp;unresolved←0\textit{unresolved} \leftarrow0

  13. &nbsp;&nbsp;&nbsp;&nbsp;worst_residual←0\textit{worst\_residual} \leftarrow0

  14. &nbsp;&nbsp;&nbsp;&nbsp;residual_sum←0\textit{residual\_sum} \leftarrow0

  15. &nbsp;&nbsp;&nbsp;&nbsp;for each direction d∈{u→v,v→u}d \in\{u \to v, v \to u\} do

  16. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scopy←clone⁡(S)S_{\textit{copy}} \leftarrow\operatorname{clone}(S)

  17. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update ScopyS_{\textit{copy}} by orienting ee according to dd

  18. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Apply all forced propagation rules to ScopyS_{\textit{copy}}

  19. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if a contradiction occurs then

  20. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue with the next direction in the inner loop

  21. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if

  22. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unresolved←unresolved+1\textit{unresolved} \leftarrow\textit{unresolved} + 1

  23. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r←R(Scopy)r \leftarrow R(S_{\textit{copy}})

  24. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;residual_sum←residual_sum+r\textit{residual\_sum} \leftarrow\textit{residual\_sum} + r

  25. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;worst_residual←max⁡(worst_residual,r)\textit{worst\_residual} \leftarrow\max(\textit{worst\_residual}, r)

  26. &nbsp;&nbsp;&nbsp;&nbsp;end for

  27. &nbsp;&nbsp;&nbsp;&nbsp;Assign ee the lexicographic score: &nbsp;&nbsp;&nbsp;&nbsp;(unresolved,worst_residual,residual_sum,−count⁡(e),−deg⁡(u)−deg⁡(v),e)(\textit{unresolved}, \textit{worst\_residual}, \textit{residual\_sum}, -\operatorname{count}(e), -\deg(u) - \deg(v), e).

  28. end for

  29. e∗←e^{*} \leftarrow edge with minimal lexicographic score

  30. return e∗e^{*}

Proof. The 2−a2-a immediately closed orientations each contribute one terminal branch. In a surviving trial state, the number of distinct unoriented edges belonging to non-clique cycles is at most rr. Each subsequent branching step orients one of these edges, so the resulting binary subtree has depth at most rr and at most 2r2^r terminal branches. This proves the bound. The minimization claim follows from the first three entries of the score. Finally, branching considers both directions, forced orientations are necessary in any semi-transitive extension, and branches are closed only by a directed cycle, a shortcut, or a non-clique cycle whose final unoriented edge would create one of these.

This is a local guarantee; the residual count does not determine the eventual proof length. In particular, it does not establish that Algorithm 6 always gives shorter proofs than the other algorithms. The comparisons below are empirical.

Ranking of algorithms

As noted in [11], making general statements about the efficiency of the algorithms, either in terms of the number of lines they produce or their time complexity, does not seem feasible. However, some indication of the algorithms’ efficiency can be obtained by examining their performance on small non-word-representable graphs. Unfortunately, the first three algorithms were tested in [11] only on non-word-representable graphs with up to seven vertices, which is a very small set. It was observed that Algorithms 2 and 3 have similar performance, with Algorithm 2 being slightly better (and hence used in the software [14]), while Algorithm 1 was much worse.

In Table 1 we confirm the ranking of Algorithms 1–3 on graphs with up to nine vertices and extend the comparison by including Algorithms 4–6. On average, a clear winner is Algorithm 6, with Algorithms 2–5 performing similarly and Algorithm 1 being much worse (on nine vertices, the performance difference between the best and worst algorithms is a factor of about 2.09, and between the best and the next-best algorithms a factor of about 1.31).

Alg. 1Alg. 2Alg. 3Alg. 4Alg. 5Alg. 6
6 vertices1088888
7 vertices12.8808.0808.2808.0008.0808.880
8 vertices16.63712.13912.37412.25212.1359.688
9 vertices22.35014.04614.21814.25614.04510.703

Table 1. Average proof length produced by the algorithms on graphs with six to nine vertices, without assuming a particular source vertex. The best-performing algorithm for graphs with seven or more vertices is highlighted in grey.

Interestingly, in the worst-case scenario (when the longest proofs are produced), Algorithm 6 significantly outperforms all other algorithms (on nine vertices, the performance difference ratio is between about 2.18 and 2.68), while Algorithm 1 is not the worst in the worst-case scenario on eight and nine vertices. We refer to Table 2 for the recorded observations and to Figure 5, where the graphs requiring long proofs are presented (their names come from the database [16]).

Worst 7graphsWorst 8graphsWorst 9graphs
Alg. 12815632, 39, 367, 4932005338
Alg. 2121, 66084522854062
Alg. 31419528451856392
Alg. 41215284518846392
Alg. 5121, 66084522854062
Alg. 612123149, 818855813

Table 2. Longest proofs produced by the implemented algorithms. “Worst X” refers to the length of the longest proof output by an algorithm on a graph with X vertices, and “graphs” refers to the graph(s) on which these proofs are achieved. The graphs can be found in Figure 5 and are numbered as in the database [16].

Fifteen graph diagrams arranged in five rows of three, labelled Graph 1 (21 in Fig. 4), Graph 6 (22 in Fig. 4), Graph 19 (18 in Fig. 4), Graph 32, Graph 39, Graph 367, Graph 493, Graph 845, Graph 149, Graph 818, Graph 5338, Graph 54062, Graph 6392, Graph 46392, and Graph 5813

Figure 5. Graphs in Table 2 that yield the longest proofs for the respective algorithms. The graph names come from the database [16]. Note that the top three graphs also appear in Figure 4.

Algorithm 6 was implemented in software [17].

Applications of Algorithm 6

The Shrikhande graph and the Clebsch graph were used in [11] as a proof of concept for automatically generating proofs of non-word-representability for rather large graphs, for which finding proofs would otherwise be considered a challenging problem. A 10-line proof of non-word-representability of a certain minimal non-word-representable subgraph CC of the Clebsch graph using Algorithm 2 was produced in [11]. Algorithm 6 also produces a 10-line proof (both on CC and on the entire Clebsch graph); hence, we omit the discussion of the Clebsch graph here.

However, Algorithm 6 does shorten the 6-line proof given in [11] of non-word-representability of the minimal non-word-representable subgraph SS of the Shrikhande graph. Both of these graphs are presented in Figure 2. By applying the same assumption on SS that vertex 1 is a source (as done in [11]), Algorithm 6 produces the following 4-line proof.

  1. B2→3 (Copy 2) O4→3 (C1-2-3-4) O4→5 (C1-3-4-5) O6→5 (C1-4-5-6) B6→9 (Copy 3) O5→9 (C1-5-9-6) O8→9 O4→8 (C4-5-9-8) O3→8 (C1-3-8-4) O7→9 O2→7 (C2-3-8-9-7) O7→5 (C5-6-9-7) S:1-2-7-5

  2. MC3 9→6 O9→7 O7→5 (C5-6-9-7) O9→5 (C1-5-9-6) O7→2 (C1-2-7-5) O8→3 O9→8 (C2-3-8-9-7) O4→8 (C4-5-9-8) S:1-4-8-3

  3. MC2 3→2 O3→4 (C1-2-3-4) O5→4 (C1-3-4-5) O5→6 (C1-4-5-6) B6→9 (Copy 4) O7→9 O5→7 (C5-6-9-7) O5→9 (C1-5-9-6) O2→7 (C1-2-7-5) O3→8 O8→9 (C2-3-8-9-7) O8→4 (C4-5-9-8) S:1-3-8-4

  4. MC4 9→6 O9→5 (C1-5-9-6) O9→8 O8→4 (C4-5-9-8) O8→3 (C1-3-8-4) O9→7 O7→2 (C2-3-8-9-7) O5→7 (C5-6-9-7) S:1-5-7-2.

As for the subgraph SS of the Kneser graph K(8,3)K(8, 3) in Figure 3, for which no published proof of non-word-representability exists so far, one can use the software [14] and assume that vertex 1 is a source to produce (in 25 seconds) a 136-line proof. However, with the same assumption, Algorithm 6 gives a much shorter proof of 110 lines, which we do not include in this paper because of its size (it would take about four pages); instead, we post the proof online at [17].

Concluding remarks

In this paper, we introduced an algorithm that significantly outperforms the best algorithm presented in [11] for automatically generating proofs of non-word-representability of graphs that can be verified by a human. The algorithm was implemented in publicly available software [17], which substantially enlarges the set of graphs for which robust, human-verifiable proofs of non-word-representability can be produced. This advancement is expected to have a notable impact on future developments in the theory of word-representable graphs.

We leave it as an open problem to further improve Algorithm 6. A natural starting point for generating ideas is to analyze the graphs in Figure 5 that require long proofs (for Algorithm 6, these are Graphs 1, 149, 818, and 5813) and to investigate whether different choices of branching vertices can reduce proof length. For example, for Graph 5813, is it possible to produce a proof shorter than 85 lines? This question is interesting in itself: constructing a shorter, ad-hoc proof for Graph 5813 could indicate that Algorithm 6 can indeed be improved.

We conclude by reiterating the following points from [11]: estimating the average efficiency of our algorithms, or of future algorithms, based on certain graph parameters (such as the number of cycles) is a challenging theoretical problem. Likewise, the time complexity of our algorithms presents an intriguing and challenging direction for research, which we have not addressed here because, as in [11], our focus was on producing short proofs.

References

  1. [2]M. Glen. Software available at https://spider-v.science.strath.ac.uk/sergey.kitaev/word-representable-graphs.html
  2. [3]M. C. Golumbic. The complexity of Comparability Graph Recognition and Coloring, Computing 18 (1977) 199–208.DOI
  3. [4]M. M. Halldórsson, S. Kitaev, A. Pyatkin. Alternation graphs, Lect. Notes in Comp. Sci. 6986 (2011) 191–202. Proceedings of the 37th International Workshop on Graph-Theoretic Concepts in Computer Science, WG 2011, Tepla Monastery, Czech Republic, June 21–24, 2011.DOI
  4. [5]M. M. Halldórsson, S. Kitaev, A. Pyatkin. Semi-transitive orientations and word-representable graphs, Discr. Appl. Math. 201 (2016) 164–171.arxiv.org/abs/1501.07108
  5. [6]S. Kitaev. A Comprehensive Introduction to the Theory of Word-Representable Graphs. Lect. Notes in Comp. Sci. 10396 (2017) 36–67.arxiv.org/abs/1705.05924
  6. [7]S. Kitaev and V. Lozin. Words and Graphs, Springer, 2015.
  7. [8]S. Kitaev, A. Pyatkin. On representable graphs. J. Autom., Lang. and Combin. 13 (2008) 1, 45–54.
  8. [9]S. Kitaev and A. Pyatkin. On semi-transitive orientability of triangle-free graphs. Discussiones Mathematicae Graph Theory 43 (2023), ID: 4621, page 533.
  9. [10]S. Kitaev, A. Saito. On semi-transitive orientability of Kneser graphs and their complements, Discr. Math. 343 (2020) 8, 111909.arxiv.org/abs/1903.02777
  10. [11]S. Kitaev and H. Sun. Human-verifiable proofs in the theory of word-representable graphs, Theor. Inform. Appl. (RAIRO) 58 (2024), Special Issue: Randomness and Combinatorics - Edited by Luca Ferrari & Paolo Massazza, Art. 10, 10pp.arxiv.org/abs/2110.05405
  11. [12]K. Mozhui and K. V. Krishna. Word-Representation of Melon Graphs, Graphs and Combinatorics 42 (2026), Article 36. DOI: 10.1007/s00373-026-03029-5.DOI
  12. [13]N. J. A. Sloane, The on-line encyclopedia of integer sequences, published electronically at http://oeis.org.
  13. [14]H. Sun. Software available at https://spider-v.science.strath.ac.uk/sergey.kitaev/human-verifiable-proofs.html
  14. [15]H. Zantema. Software REPRNR to compute the representation number of a graph, 2018. Available at https://www.win.tue.nl/~hzantema/reprnr.html.
  15. [16]J. Zhong. All connected non-word-representable graphs up to 9 vertices. https://spider-v.science.strath.ac.uk/sergey.kitaev/nwr-graphs.zip
  16. [17]J. Zhong. Software available at https://github.com/jtzjt/NWR_prooflines.git

Paper details

vlnc:W_ypq6an67
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 1

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Mathematics

Not recorded for this paper · View statement →

Looking for related papers…
Contents