10. A tangible computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for generating a product recommendation, the method comprising: receiving graph data indicating vertices and edges of the graph, wherein the vertices represent customers and products and the edges represent purchases; receiving a query of the graph to determine a product recommendation; generating a finite-state machine (FSM) based on the query; executing the query; determining whether a current state of the FSM is a traversal state; in response to the current state being a traversal state, generating a traversal FSM; searching the traversal FSM for a nearest future traversal state; generating a bitmask for the future traversal state; and utilizing the generated bitmask when executing the future traversal state to generate the product recommendation.
10. A tangible computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for generating a product recommendation, the method comprising: receiving graph data indicating vertices and edges of the graph, wherein the vertices represent customers and products and the edges represent purchases; receiving a query of the graph to determine a product recommendation; generating a finite-state machine (FSM) based on the query; executing the query; determining whether a current state of the FSM is a traversal state; in response to the current state being a traversal state, generating a traversal FSM; searching the traversal FSM for a nearest future traversal state; generating a bitmask for the future traversal state; and utilizing the generated bitmask when executing the future traversal state to generate the product recommendation. 14. The computer-readable storage medium of claim 10 , wherein generating the bitmask comprises setting bit flags associated with vertex ranges according to an equation └(ID(v)−v min-src )/n┘==p, wherein ID(v) is an identifier value for vertex v, v min-src , is a minimum identifier value of a set of source vertices, n is average number of vertices assigned to each processor, and p is an identifier value for a processor.