1. A method comprising: a computer analyzing a first plurality of software instructions, wherein the first plurality of software instructions is configured to perform a plurality of breadth-first searches to determine a particular result, wherein each breadth-first search originates at each of a plurality of vertices of a graph, wherein each breadth-first search is encoded for independent execution; based on the analyzing, the computer generating a second plurality of software instructions that is configured to perform a multi-source breadth-first search to determine the particular result, wherein each of the plurality of vertices is a source of the multi-source breadth-first search.