Searcharxiv⌕ Search

arXiv subjects

Zohair Raza Hassan

Publications and source records attributed to Zohair Raza Hassan.

9 recordsLinked to original sources

RamseyGadgets: A Graph Construction Dataset for LLMs

Constructing special graphs is an important task within graph theory and computer science. Many popular graph constructions are the result of a comprehensive exploration of relevant graphs and human ingenuity. Given the rise of generative AI usage in mathematics, it is natural to test whether LLMs are able to construct graphs with specified properties using their reasoning capabilities. Unfortunately, many natural graph construction problems, such as finding extremal Ramsey-good graphs (i.e., avoiding specific monochromatic subgraphs), have been explored extensively in the literature, making it difficult to ascertain whether a construction is the product of an LLM's reasoning capabilities or its recollection from training data. In this work, we introduce \textbf{RamseyGadgets}, a novel dataset of 70 underexplored graph construction problems that require finding Ramsey-good graphs with special properties (e.g., containing an edge with a fixed color). These problems have reasonably sized solutions (at most 10 vertices) that can be verified by SAT solvers, making them suitable for automatic evaluation. Our dataset is easily expandable, as one can simply change the monochromatic subgraphs being avoided to obtain a new set of problems. We evaluate the performance of five open-source LLMs on our dataset and report the results. Our findings show that LLMs achieve only 37.70% accuracy on the hard-tier problems in our dataset, with Gemma-4-31B achieving the highest performance out of the five. We also showcase how our dataset allows us to ascertain what kind of hints help LLMs perform better at this task.

cs.CL↗

On Small Folkman Graphs Arrowing $K_2$ or $K_3$

For a graph $G$ and integers $a_i \geq 1$, we say that $G \xrightarrow[]{} (a_1, \ldots, a_k)^v$ if in any $k$-coloring of $G$'s vertices there exists a monochromatic $a_i$-clique for some color $i \in \{1,\ldots,k\}$. $G \xrightarrow[]{} (a_1, \ldots, a_k)^e$ is defined similarly, but for edge colorings. The Folkman number $F_v(a_1, \ldots, a_k; H)$ is the smallest number of vertices for which an $H$-free graph arrowing $(a_1, \ldots, a_k)^v$ exists. $F_e(a_1, \ldots, a_k; H)$ is defined similarly for edge-arrowing. In this work, we present new bounds for Folkman numbers where $a_i \in \{2,3\}$ and $k \leq 4$, while avoiding $K_n$, $J_n$, for $n \in \{4,5,6\}$, where $K_n$ is the complete graph on $n$ vertices and $J_n$ is $K_n$ missing an edge. We also present results for $C_4$-free and $W_5$-free graphs, where $C_4$ is the cycle on four vertices and $W_5$ is the wheel graph on five vertices. Notably, we prove the existence of $F_e(3,3;W_5)$, leaving only one graph, $\overline{P_2 \cup P_3}$, on five vertices for which the existence problem of $F_e(3,3;H)$ remains open. We provide some theoretical results that should aid in uncovering the existence of $F_v(3,3; \overline{P_2 \cup P_3})$. Our new bounds are the result of a variety of methods involving filters, extension, semi-polycirculant graphs, locally linear graphs, and the modification of special graphs. Most of our bounds are from the semi-polycirculant graph generator, showcasing its efficacy for finding witness Folkman graphs.

math.CO↗

On the Parallelizability of Approval-Based Committee Rules

Approval-Based Committee (ABC) rules are an important tool for choosing a fair set of candidates when given the preferences of a collection of voters. Though finding a winning committee for many ABC rules is NP-hard, natural variations for these rules with polynomial-time algorithms exist. The recently introduced Method of Equal Shares, an important ABC rule with desirable properties, is also computable in polynomial time. However, when working with very large elections, polynomial time is not enough and parallelization may be necessary. We show that computing a winning committee using these polynomial-time ABC rules (including the Method of Equal Shares) is P-hard, thus showing they cannot be parallelized. In contrast, we show that finding a winning committee can be parallelized when the votes are single-peaked or single-crossing for the important ABC rule Chamberlin-Courant.

cs.GT↗

The Complexity of (P3, H)-Arrowing and Beyond

Often regarded as the study of how order emerges from randomness, Ramsey theory has played an important role in mathematics and computer science, giving rise to applications in numerous domains such as logic, parallel processing, and number theory. The core of graph Ramsey theory is arrowing: For fixed graphs $F$ and $H$, the $(F, H)$-Arrowing problem asks whether a given graph, $G$, has a red/blue coloring of the edges of $G$ such that there are no red copies of $F$ and no blue copies of $H$. For some cases, the problem has been shown to be coNP-complete, or solvable in polynomial time. However, a more systematic approach is needed to categorize the complexity of all cases. We focus on $(P_3, H)$-Arrowing as $F = P_3$ is the simplest meaningful case for which the complexity question remains open, and the hardness for this case likely extends to general $(F, H)$-Arrowing for nontrivial $F$. In this pursuit, we also gain insight into the complexity of a class of matching removal problems, since $(P_3, H)$-Arrowing is equivalent to $H$-free Matching Removal. We show that $(P_3, H)$-Arrowing is coNP-complete for all $2$-connected $H$ except when $H = K_3$, in which case the problem is in P. We introduce a new graph invariant to help us carefully combine graphs when constructing the gadgets for our reductions. Moreover, we show how $(P_3,H)$-Arrowing hardness results can be extended to other $(F,H)$-Arrowing problems. This allows for more intuitive and palatable hardness proofs instead of ad-hoc constructions of SAT gadgets, bringing us closer to categorizing the complexity of all $(F, H)$-Arrowing problems.

cs.CC↗

The Complexity of $(P_k, P_\ell)$-Arrowing

For fixed nonnegative integers $k$ and $\ell$, the $(P_k, P_\ell)$-Arrowing problem asks whether a given graph, $G$, has a red/blue coloring of $E(G)$ such that there are no red copies of $P_k$ and no blue copies of $P_\ell$. The problem is trivial when $\max(k,\ell) \leq 3$, but has been shown to be coNP-complete when $k = \ell = 4$. In this work, we show that the problem remains coNP-complete for all pairs of $k$ and $\ell$, except $(3,4)$, and when $\max(k,\ell) \leq 3$. Our result is only the second hardness result for $(F,H)$-Arrowing for an infinite family of graphs and the first for 1-connected graphs. Previous hardness results for $(F, H)$-Arrowing depended on constructing graphs that avoided the creation of too many copies of $F$ and $H$, allowing easier analysis of the reduction. This is clearly unavoidable with paths and thus requires a more careful approach. We define and prove the existence of special graphs that we refer to as ``transmitters.'' Using transmitters, we construct gadgets for three distinct cases: 1) $k = 3$ and $\ell \geq 5$, 2) $\ell > k \geq 4$, and 3) $\ell = k \geq 4$. For $(P_3, P_4)$-Arrowing we show a polynomial-time algorithm by reducing the problem to 2SAT, thus successfully categorizing the complexity of all $(P_k, P_\ell)$-Arrowing problems.

cs.CC↗

Computing Graph Descriptors on Edge Streams

Feature extraction is an essential task in graph analytics. These feature vectors, called graph descriptors, are used in downstream vector-space-based graph analysis models. This idea has proved fruitful in the past, with spectral-based graph descriptors providing state-of-the-art classification accuracy. However, known algorithms to compute meaningful descriptors do not scale to large graphs since: (1) they require storing the entire graph in memory, and (2) the end-user has no control over the algorithm's runtime. In this paper, we present streaming algorithms to approximately compute three different graph descriptors capturing the essential structure of graphs. Operating on edge streams allows us to avoid storing the entire graph in memory, and controlling the sample size enables us to keep the runtime of our algorithms within desired bounds. We demonstrate the efficacy of the proposed descriptors by analyzing the approximation error and classification accuracy. Our scalable algorithms compute descriptors of graphs with millions of edges within minutes. Moreover, these descriptors yield predictive accuracy comparable to the state-of-the-art methods but can be computed using only 25% as much memory.

cs.LG↗

On Some Generalized Vertex Folkman Numbers

For a graph $G$ and integers $a_i\ge 1$, the expression $G \rightarrow (a_1,\dots,a_r)^v$ means that for any $r$-coloring of the vertices of $G$ there exists a monochromatic $a_i$-clique in $G$ for some color $i \in \{1,\cdots,r\}$. The vertex Folkman numbers are defined as $F_v(a_1,\dots,a_r;H) = \min\{|V(G)| : G$ is $H$-free and $G \rightarrow (a_1,\dots,a_r)^v\}$, where $H$ is a graph. Such vertex Folkman numbers have been extensively studied for $H=K_s$ with $s>\max\{a_i\}_{1\le i \le r}$. If $a_i=a$ for all $i$, then we use notation $F_v(a^r;H)=F_v(a_1,\dots,a_r;H)$. Let $J_k$ be the complete graph $K_k$ missing one edge, i.e. $J_k=K_k-e$. In this work we focus on vertex Folkman numbers with $H=J_k$, in particular for $k=4$ and $a_i\le 3$. A result by Nešetřil and Rödl from 1976 implies that $F_v(3^r;J_4)$ is well defined for any $r\ge 2$. We present a new and more direct proof of this fact. The simplest but already intriguing case is that of $F_v(3,3;J_4)$, for which we establish the upper bound of 135 by using the $J_4$-free process. We obtain the exact values and bounds for a few other small cases of $F_v(a_1,\dots,a_r;J_4)$ when $a_i \le 3$ for all $1 \le i \le r$, including $F_v(2,3;J_4)=14$, $F_v(2^4;J_4)=15$, and $22 \le F_v(2^5;J_4) \le 25$. Note that $F_v(2^r;J_4)$ is the smallest number of vertices in any $J_4$-free graph with chromatic number $r+1$. Most of the results were obtained with the help of computations, but some of the upper bound graphs we found are interesting by themselves.

math.CO↗

Estimating Descriptors for Large Graphs

Embedding networks into a fixed dimensional feature space, while preserving its essential structural properties is a fundamental task in graph analytics. These feature vectors (graph descriptors) are used to measure the pairwise similarity between graphs. This enables applying data mining algorithms (e.g classification, clustering, or anomaly detection) on graph-structured data which have numerous applications in multiple domains. State-of-the-art algorithms for computing descriptors require the entire graph to be in memory, entailing a huge memory footprint, and thus do not scale well to increasing sizes of real-world networks. In this work, we propose streaming algorithms to efficiently approximate descriptors by estimating counts of sub-graphs of order $k\leq 4$, and thereby devise extensions of two existing graph comparison paradigms: the Graphlet Kernel and NetSimile. Our algorithms require a single scan over the edge stream, have space complexity that is a fraction of the input size, and approximate embeddings via a simple sampling scheme. Our design exploits the trade-off between available memory and estimation accuracy to provide a method that works well for limited memory requirements. We perform extensive experiments on real-world networks and demonstrate that our algorithms scale well to massive graphs.

cs.DB↗