Quickest Path Distances on Context-Free Labeled Graphs PHILLIP G. BRADFORD The University of Alabama Department of Computer Science Box 870290 Tuscaloosa, AL 35487-0290 USA pgb@cs.ua.edu Abstract: Given σ units of data and a digraph G =(V,E) whose edges have delays, bandwidth constraints, and are labeled by terminals from a CFG (context-free grammar) G . A path p adheres to G ’s path constraints iff the concatenation of all terminals along p forms a word of the language generated by G . The all-pairs quickest CFG labeled-path distance problem is: for all pairs of vertices, find the minimum path-cost to send σ data units ac- counting for edge delays while adhering to labeled path and bandwidth constraints. This paper iteratively applies dynamic programming-based labeled path algorithms to CFG-labeled bandwidth-stratified induced subgraphs of an input graph. More precisely, we use Rosen, Sun and Xue’s quickest-path algorithm [14] as a framework giv- ing bandwidth-stratified induced subgraphs. This approach is far more efficient than naively applying dynamic programming-based labeled path algorithms to bandwidth-augmented CFG-labeled graphs from algorithms such as Chen and Chin’s [4]. Although, bandwidth-augmented graph algorithms, like Chen and Chin’s, have merit for other applications of dynamic programming. Key–Words: quickest path, context-free grammar, labeled graph, dynamic programming, algorithm design. 1 Introduction Consider a digraph G =(V,E) whose edges are la- beled with the terminals of a CFG G and each edge has one of r bandwidths b r > ··· >b 1 > 0. Let G ’s non- terminals be in the set N and rules in the set R. As- sume G is in Chomsky normal form. By combining a CFG labeled all-pairs shortest-path algorithm of Bar- rett, Jacob, and Marathe [1] with a quickest path algo- rithm of Rosen, Sun, and Xue [14] this paper gives an O(r(|E| + |V | 3 |N ||R|)) or O(|E| 2 + |E||V | 3 |N ||R|) all-pairs quickest CFG-labeled path distances algo- rithm, since r ≤|E|. This assumes the edge weights or delays are non-negative. For DAGs (directed acyclic graphs) labeled by Dyck and semi-Dyck CFGs [8] with a constant num- ber of terminals, combining Rosen, et al.’s algorithm with Bradford and Choppella’s [2] gives an O(|E| 2 + |E||V | ω log |V |) quickest path algorithm, where ω is the matrix multiplication exponent for multiplying a |V |×|V | by a |V |×|V | matrix. Bradford and Thomas [3] give a shortest path algorithm for graphs * An extended version of this paper is also being submitted to a Journal. with positive and negative edge weights whose unla- beled versions have no negative cycles. They use a Johnson-style edge re-weighting and then apply Bar- rett, et al.’s O(|V | 3 |N ||R|) algorithm to solve the all- pairs shortest path problem on this class of labeled graphs. Bradford and Thomas’ algorithm has cost dominated by the O(|V | 3 |N ||R|) time for invoking Barrett, et al.’s algorithm. Our motivation is driven by a cryptographic con- strained routing problem: In optimizing cryptographic routing, different cryptographic protocols generally do not commute. Let m be the plaintext and c be a ciphertext, then two cryptographic functions E and E commute iff c = E k 1 [E k 2 [m]] = E k 2 [E k 1 [m]], m = D k 1 [D k 2 [c]] = D k 2 [D k 1 [c]], for all valid keys k 1 for E and all valid keys k 2 for E . Several public key protocols are commutative, for example two RSA public key systems using the same modulus commute [6, p. 8]. Of course, for every encryption there must be a symmetric decryption. This paper does not deal with 6th WSEAS International Conference on Information Security and Privacy, Tenerife, Spain, December 14-16, 2007 22