SDE
Interview Date
15-08-2026
Result
Rejected
Difficulty
Medium
Rounds
01
Drive Type
Off-Campus
Topics asked
Detailed experience
The interviewer opened with an advanced algebraic spectral graph theory and quantum random walk problem: "Given an undirected simple graph G with n vertices and m edges, determine whether G exhibits Perfect State Transfer (PST) between two designated vertices u and v—specifically, whether there exists a time tau > 0 such that the continuous-time quantum walk transition matrix U(t) = exp(-i * t * A) satisfies |U(tau)_{u, v}| = 1—in polynomial time via the spectral decomposition of the adjacency matrix A." I pointed out that numerical integration of the Schrödinger equation yields only approximations subject to truncation and phase drift, whereas PST is an exact algebraic condition. I proposed using Godsil's Spectral Characterization of Strongly Cospectral Vertices combined with Linear Form Logarithms / Kronecker's Approximations. The interviewer followed up: "What algebraic constraints must the eigenvalues and eigenvectors of A satisfy for PST to occur, and how do you reduce the existence of such a time tau to solving a system of integer ratio constraints on eigenvalue differences?" I explained that for PST to take place between u and v at time tau, two conditions are necessary and sufficient: (1) Vertices u and v must be strongly cospectral, meaning for every orthogonal projection matrix E_r corresponding to eigenvalue lambda_r of A, E_r e_u = pm E_r e_v. (2) The eigenvalue difference ratios must be rational. Let Lambda_{u, v} be the 'eigenvalue support' of u and v—the set of eigenvalues lambda_r for which E_r e_u != 0. For any four eigenvalues lambda_j, lambda_k, lambda_l, lambda_m in Lambda_{u, v} with lambda_l != lambda_m, the ratio (lambda_j - lambda_k) / (lambda_l - lambda_m) must be a rational number. If this ratio condition holds, there exists a square-free integer Delta such that all eigenvalues in the support can be expressed in the form (a_r + b_r * sqrt(Delta)) / 2 for integers a_r, b_r. Furthermore, the sign condition requires that exp(-i * tau * lambda_r) = gamma * sigma_r, where sigma_r in {+1, -1} is the parity sign from E_r e_u = sigma_r E_r e_v, and gamma is a global phase factor. We compute the exact characteristic polynomial of A in O(n^3) time via Faddeev-LeVerrier or Hessenberg reduction, isolate its algebraic roots, check the strong cospectrality projection vectors E_r = v_r v_r^T in O(n^3) time, and verify the parity congruence equations modulo 2 using Smith Normal Form over the rationalized eigenvalue relations. This certifies the existence of PST and computes the exact transfer time tau in deterministic polynomial time. He then shifted to a computational geometry and dynamic arrangements challenge: "Given n hyperplanes in R^d in general position, compute the exact number of bounded and unbounded d-dimensional polyhedral cells in the arrangement A(H) in O(n^d) time and O(n) working space without storing the exponential face lattice, and determine whether a given target polytope P is bounded." I pointed out that constructing the full Cell Complex or Zone of the arrangement using the incremental algorithm of Edelsbrunner-O'Rourke-Seidel requires Theta(n^d) memory words, which exceeds RAM limits even for d = 4 and n = 100. I proposed using Topological Sweep or Avis-Fukuda Reverse Search over the arrangement's dual vertices. The interviewer cut in: "Zaslavsky's Theorem gives the number of cells via the Whitney numbers of the intersection lattice, while Avis-Fukuda explores cells without storing visited states; walk me through the local pivot rule that turns the cell arrangement into an implicitly rooted tree." I explained that by Zaslavsky's Theorem, the total number of cells is (-1)^d * chi(-1) = sum_{k=0}^d sum_{|S|=k, dim(cap S)=d-k} 1, which evaluates via the characteristic polynomial of the arrangement's intersection poset. To enumerate every cell using strictly O(n * d) auxiliary space, Avis-Fukuda define a local objective function—a linear program maximize c^T x over the cell's closure. Since each full-dimensional cell is a convex polyhedron bounded by a subset of the n hyperplanes, its unique optimal vertex with respect to vector c serves as the 'sink' (local canonical representative) of the cell. We define a deterministic local pivot (such as the lexicographically smallest Bland pivot rule) that directs every vertex of the arrangement toward a globally unique root vertex. Reversing this pivot rule turns the arrangement's 1-skeleton into a spanning directed forest rooted at the global optimum. From any vertex, the algorithm checks all incident edges to verify if pivoting along that edge leads back to the current vertex under the canonical forward rule. If it does, the search steps forward; otherwise, it backtracks. This visits every vertex and cell in O(n^d) time while tracking only the current path of length at most n, achieving strict O(n * d) space complexity. For the final challenge, he introduced an algebraic string algorithm and grammar compression scenario: "Given an arbitrary string s of length n, construct its Smallest Grammar (the smallest Straight-Line Program / Context-Free Grammar producing exactly s and no other string) within an O(log(n / g*)) approximation factor in strict O(n) deterministic time, where g* is the size of the optimal grammar, without constructing all O(n^2) substring pairings." I noted that finding the absolute minimum grammar is NP-hard (Charikar et al.), while greedy heuristics like Sequitur or Re-Pair run in O(n) time but lack provable approximation guarantees. I proposed the Bisection / Recompression Framework of Jeż or the Rytter-Charikar AVL/LZ-based Balanced Grammar Transform. The interviewer challenged me: "Jeż's Recompression avoids global suffix lookups by alternating character substitutions and block compressions directly on the word; walk me through how compressing maximal runs a^k into single non-terminals followed by pairing non-adjacent characters preserves the optimal grammar size within O(log n)." I broke down Jeż's algebraic pipeline: the recompression technique modifies the string s through a sequence of local, deterministic alphabet morphisms: (1) Block Compression: For every maximal contiguous run of an identical symbol a^k (with k >= 2), we replace a^k by a fresh production rule A -> a^k (using binary splitting so large exponents k generate logarithmic-depth DAGs). After block compression, the string becomes strictly alternating (no two identical symbols are adjacent). (2) Pair Compression: We deterministically partition the active alphabet Sigma into two disjoint subsets L (left) and R (right) using deterministic coin-tossing or a local 2-coloring of the de Bruijn transition graph. For every adjacent occurrence of a pair (a, b) where a in L and b in R, we introduce a new rule C -> a b and replace all non-overlapping occurrences of a b with C. Because the string has no identical adjacent letters, a constant fraction (at least 1/4) of all string positions are guaranteed to belong to such valid pairs. Each phase reduces the length of the working string by a factor of (1 - epsilon), terminating in O(log n) rounds. Jeż proved that any optimal grammar generating s must also implicitly compress these blocks and pairs; hence, each round introduces at most O(1) rules per optimal non-terminal. Tracking active letters with bucket arrays and linked lists executes each reduction round in time proportional to the current length, summing to a geometric series: O(n + n/2 + n/4 + ...) = O(n) deterministic time and O(n) space, yielding an O(log(n / g*))-approximation.