SearcharxivSearch

arXiv subjects

Kshitij Gajjar

Publications and source records attributed to Kshitij Gajjar.

13 recordsLinked to original sources

Shortest Paths with Linear Edge Weights

We study shortest paths in directed graphs whose edge weights are of the form $$ \mathsf{wt}(e) = a_{e,1} \lambda_1 + a_{e,2} \lambda_2 + a_{e,3} \lambda_3 + \cdots + a_{e,d} \lambda_d + a_{e,d+1}.$$ Here, each $a_{e,i}\in\mathbb{R}$ is a fixed constant for each edge $e$, whereas each $\lambda_i\in\mathbb{R}$ is common across the entire graph. So, there could be different shortest paths in the graph for different values of the $\lambda_i$'s. This is called the Parametric Shortest Paths problem, and has been studied since the 1980s. For $d=1$, Carstensen (1983) showed that the number of shortest paths in $n$-vertex graphs is at most $n^{O(\log n)}$. She also proved a matching lower bound of $n^{\Omega(\log n)}$, later refined by Mulmuley & Shah (2001). For $d=2$, Gajjar & Radhakrishnan (2019) showed an upper bound of $n^{O(\log^2 n)}$. Barth, Funke & Proissl (2022) generalized their result to prove an upper bound of $n^{O_d(\log^d n)}$ for all positive integers $d$. The lower bound did not undergo any improvement over the years. In this paper, we close this long line of research by showing an $n^{O(d\log n)}$ upper bound for all positive integers $d$, exponentially improving the previous upper bound. We observe that a matching lower bound of $n^{\Omega(d\log n)}$ can be obtained from earlier works. We also show that our proof can be adapted to work for undirected graphs with positive edge weights. Furthermore, for directed graphs whose edge weights are univariate polynomials of degree at most $q$, we prove an upper bound of $n^{O(\log{n}+\log{q})}$. Finally, building upon work on the Point Location problem by Ezra, Har-Peled, Kaplan & Sharir (2020), we construct a Shortest Path Oracle which takes as input a point $\overline{x}\in \mathbb{R}^d$, and outputs a shortest path at $\overline{\lambda}=\overline{x}$ in sublinear time (for a wide regime of $d$).

cs.DS

Permutation Match Puzzles: How Young Tanvi Learned About Computational Complexity

We study a family of sorting match puzzles on grids, which we call permutation match puzzles. In this puzzle, each row and column of a $n \times n$ grid is labeled with an ordering constraint -- ascending (A) or descending (D) -- and the goal is to fill the grid with the numbers 1 through $n^2$ such that each row and column respects its constraint. We provide a complete characterization of solvable puzzles: a puzzle admits a solution if and only if its associated constraint graph is acyclic, which translates to a simple "at most one switch" condition on the A/D labels. When solutions exist, we show that their count is given by a hook length formula. For unsolvable puzzles, we present an $O(n)$ algorithm to compute the minimum number of label flips required to reach a solvable configuration. Finally, we consider a generalization where rows and columns may specify arbitrary permutations rather than simple orderings, and establish that finding minimal repairs in this setting is NP-complete by a reduction from feedback arc set.

cs.DS

Parameterized Shortest Path Reconfiguration

An st-shortest path, or st-path for short, in a graph G is a shortest (induced) path from s to t in G. Two st-paths are said to be adjacent if they differ on exactly one vertex. A reconfiguration sequence between two st-paths P and Q is a sequence of adjacent st-paths starting from P and ending at Q. Deciding whether there exists a reconfiguration sequence between two given $st$-paths is known to be PSPACE-complete, even on restricted classes of graphs such as graphs of bounded bandwidth (hence pathwidth). On the positive side, and rather surprisingly, the problem is polynomial-time solvable on planar graphs. In this paper, we study the parameterized complexity of the Shortest Path Reconfiguration (SPR) problem. We show that SPR is W[1]-hard parameterized by k + \ell, even when restricted to graphs of bounded (constant) degeneracy; here k denotes the number of edges on an st-path, and \ell denotes the length of a reconfiguration sequence from P to Q. We complement our hardness result by establishing the fixed-parameter tractability of SPR parameterized by \ell and restricted to nowhere-dense classes of graphs. Additionally, we establish fixed-parameter tractability of SPR when parameterized by the treedepth, by the cluster-deletion number, or by the modular-width of the input graph.

cs.CC

Monotone Classes Beyond VNP

In this work, we study the natural monotone analogues of various equivalent definitions of VPSPACE: a well studied class (Poizat 2008, Koiran and Perifel 2009, Malod 2011, Mahajan and Rao 2013) that is believed to be larger than VNP. We observe that these monotone analogues are not equivalent unlike their non-monotone counterparts, and propose monotone VPSPACE (mVPSPACE) to be defined as the monotone analogue of Poizat's definition. With this definition, mVPSPACE turns out to be exponentially stronger than mVNP and also satisfies several desirable closure properties that the other analogues may not. Our initial goal was to understand the monotone complexity of transparent polynomials, a concept that was recently introduced by Hrubeš and Yehudayoff (2021). In that context, we show that transparent polynomials of large sparsity are hard for the monotone analogues of all the known definitions of VPSPACE, except for the one due to Poizat.

cs.CC

Recognizing Geometric Intersection Graphs Stabbed by a Line

In this paper, we determine the computational complexity of recognizing two graph classes, \emph{grounded L}-graphs and \emph{stabbable grid intersection} graphs. An L-shape is made by joining the bottom end-point of a vertical ($\vert$) segment to the left end-point of a horizontal ($-$) segment. The top end-point of the vertical segment is known as the {\em anchor} of the L-shape. Grounded L-graphs are the intersection graphs of L-shapes such that all the L-shapes' anchors lie on the same horizontal line. We show that recognizing grounded L-graphs is NP-complete. This answers an open question asked by Jel{\'ı}nek \& T{ö}pfer (Electron. J. Comb., 2019). Grid intersection graphs are the intersection graphs of axis-parallel line segments in which two vertical (similarly, two horizontal) segments cannot intersect. We say that a (not necessarily axis-parallel) straight line $\ell$ stabs a segment $s$, if $s$ intersects $\ell$. A graph $G$ is a stabbable grid intersection graph ($StabGIG$) if there is a grid intersection representation of $G$ in which the same line stabs all its segments. We show that recognizing $StabGIG$ graphs is $NP$-complete, even on a restricted class of graphs. This answers an open question asked by Chaplick \etal (\textsc{O}rder, 2018).

cs.DM

Sum Labelling Graphs of Maximum Degree Two

The concept of sum labelling was introduced in 1990 by Harary. A graph is a sum graph if its vertices can be labelled by distinct positive integers in such a way that two vertices are connected by an edge if and only if the sum of their labels is the label of another vertex in the graph. It is easy to see that every sum graph has at least one isolated vertex, and every graph can be made a sum graph by adding at most $n^2$ isolated vertices to it. The minimum number of isolated vertices that need to be added to a graph to make it a sum graph is called the sum number of the graph. The sum number of several prominent graph classes (e.g., cycles, trees, complete graphs) is already well known. We examine the effect of taking the disjoint union of graphs on the sum number. In particular, we provide a complete characterization of the sum number of graphs of maximum degree two, since every such graph is the disjoint union of paths and cycles.

math.CO

The Space Complexity of Sum Labelling

A graph is called a sum graph if its vertices can be labelled by distinct positive integers such that there is an edge between two vertices if and only if the sum of their labels is the label of another vertex of the graph. Most papers on sum graphs consider combinatorial questions like the minimum number of isolated vertices that need to be added to a given graph to make it a sum graph. In this paper, we initiate the study of sum graphs from the viewpoint of computational complexity. Notice that every $n$-vertex sum graph can be represented by a sorted list of $n$ positive integers where edge queries can be answered in $O(\log n)$ time. Therefore, limiting the size of the vertex labels also upper-bounds the space complexity of storing the graph in the database. We show that every $n$-vertex, $m$-edge, $d$-degenerate graph can be made a sum graph by adding at most $m$ isolated vertices to it, such that the size of each vertex label is at most $O(n^2d)$. This enables us to store the graph using $O(m\log n)$ bits of memory. For sparse graphs (graphs with $O(n)$ edges), this matches the trivial lower bound of $Ω(n\log n)$. Since planar graphs and forests have constant degeneracy, our result implies an upper bound of $O(n^2)$ on their label size. The previously best known upper bound on the label size of general graphs with the minimum number of isolated vertices was $O(4^n)$, due to Kratochvíl, Miller & Nguyen. Furthermore, their proof was existential, whereas our labelling can be constructed in polynomial time.

cs.DS

Reconfiguring Shortest Paths in Graphs

Reconfiguring two shortest paths in a graph means modifying one shortest path to the other by changing one vertex at a time so that all the intermediate paths are also shortest paths. This problem has several natural applications, namely: (a) revamping road networks, (b) rerouting data packets in synchronous multiprocessing setting, (c) the shipping container stowage problem, and (d) the train marshalling problem. When modelled as graph problems, (a) is the most general case while (b), (c) and (d) are restrictions to different graph classes. We show that (a) is intractable, even for relaxed variants of the problem. For (b), (c) and (d), we present efficient algorithms to solve the respective problems. We also generalize the problem to when at most $k$ (for a fixed integer $k\geq 2$) contiguous vertices on a shortest path can be changed at a time.

cs.DS

Generalized Parametric Path Problems

Parametric path problems arise independently in diverse domains, ranging from transportation to finance, where they are studied under various assumptions. We formulate a general path problem with relaxed assumptions, and describe how this formulation is applicable in these domains. We study the complexity of the general problem, and a variant of it where preprocessing is allowed. We show that when the parametric weights are linear functions, algorithms remain tractable even under our relaxed assumptions. Furthermore, we show that if the weights are allowed to be non-linear, the problem becomes NP-hard. We also study the mutli-dimensional version of the problem where the weight functions are parameterized by multiple parameters. We show that even with two parameters, the problem is NP-hard.

cs.DS

Finding Geometric Representations of Apex Graphs is NP-Hard

Planar graphs can be represented as intersection graphs of different types of geometric objects in the plane, e.g., circles (Koebe, 1936), line segments (Chalopin \& Gon{ç}alves, 2009), \textsc{L}-shapes (Gon{ç}alves et al, 2018). For general graphs, however, even deciding whether such representations exist is often $NP$-hard. We consider apex graphs, i.e., graphs that can be made planar by removing one vertex from them. We show, somewhat surprisingly, that deciding whether geometric representations exist for apex graphs is $NP$-hard. More precisely, we show that for every positive integer $k$, recognizing every graph class $\mathcal{G}$ which satisfies $\textsc{PURE-2-DIR} \subseteq \mathcal{G} \subseteq \textsc{1-STRING}$ is $NP$-hard, even when the input graphs are apex graphs of girth at least $k$. Here, $PURE-2-DIR$ is the class of intersection graphs of axis-parallel line segments (where intersections are allowed only between horizontal and vertical segments) and \textsc{1-STRING} is the class of intersection graphs of simple curves (where two curves share at most one point) in the plane. This partially answers an open question raised by Kratochv{\'ı}l \& Pergel (2007). Most known $NP$-hardness reductions for these problems are from variants of 3-SAT. We reduce from the \textsc{PLANAR HAMILTONIAN PATH COMPLETION} problem, which uses the more intuitive notion of planarity. As a result, our proof is much simpler and encapsulates several classes of geometric graphs.

cs.CG

Parametric Shortest Paths in Planar Graphs

We construct a family of planar graphs $\{G_n\}_{n\geq 4}$, where $G_n$ has $n$ vertices including a source vertex $s$ and a sink vertex $t$, and edge weights that change linearly with a parameter $λ$ such that, as $λ$ varies in $(-\infty,+\infty)$, the piece-wise linear cost of the shortest path from $s$ to $t$ has $n^{Ω(\log n)}$ pieces. This shows that lower bounds obtained earlier by Carstensen (1983) and Mulmuley \& Shah (2001) for general graphs also hold for planar graphs, thereby refuting a conjecture of Nikolova (2009). Gusfield (1980) and Dean (2009) showed that the number of pieces for every $n$-vertex graph with linear edge weights is $n^{\log n + O(1)}$. We generalize this result in two ways. (i) If the edge weights vary as a polynomial of degree at most $d$, then the number of pieces is $n^{\log n + (α(n)+O(1))^d}$, where $α(n)$ is the slow growing inverse Ackermann function. (ii) If the edge weights are linear forms of three parameters, then the number of pieces, appropriately defined for $\mathbb{R}^3$, is $n^{(\log n)^2+O(\log n)}$.

cs.CC

Minimizing Branching Vertices in Distance-preserving Subgraphs

It is $\mathsf{NP}$-hard to determine the minimum number of branching vertices needed in a single-source distance-preserving subgraph of an undirected graph. We show that this problem can be solved in polynomial time if the input graph is an interval graph. In earlier work, it was shown that every interval graph with $k$ terminal vertices admits an all-pairs distance-preserving subgraph with $O(k\log k)$ branching vertices. We consider graphs that can be expressed as the strong product of two interval graphs, and present a polynomial time algorithm that takes such a graph with $k$ terminals as input, and outputs an all-pairs distance-preserving subgraph of it with $O(k^2)$ branching vertices. This bound is tight.

cs.DS

Distance-preserving Subgraphs of Interval Graphs

We consider the problem of finding small distance-preserving subgraphs of undirected, unweighted interval graphs with $k$ terminal vertices. To start with, we show that finding an optimal distance-preserving subgraph is $\mathsf{NP}$-hard for general graphs. Then, we show that every interval graph admits a subgraph with $O(k)$ branching vertices that approximates pairwise terminal distances up to an additive term of $+1$. We also present an interval graph $G_{\mathrm{int}}$ for which the $+1$ approximation is necessary to obtain the $O(k)$ upper bound on the number of branching vertices. In particular, any distance-preserving subgraph of $G_{\mathrm{int}}$ has $Ω(k\log k)$ branching vertices. Furthermore, we prove that every interval graph admits a distance-preserving subgraph with $O(k\log k)$ branching vertices, implying that the $Ω(k\log k)$ lower bound for interval graphs is tight. To conclude, we show that there exists an interval graph such that every optimal distance-preserving subgraph of it has $O(k)$ branching vertices and $Ω(k\log k)$ branching edges, thereby providing a separation between branching vertices and branching edges. The $O(k)$ bound for distance-approximating subgraphs follows from a naïve analysis of shortest paths in interval graphs. $G_{\mathrm{int}}$ is constructed using bit-reversal permutation matrices. The $O(k\log k)$ bound for distance-preserving subgraphs uses a divide-and-conquer approach. Finally, the separation between branching vertices and branching edges employs Hansel's lemma for graph covering.

cs.DS