<P> In computer science, applications of this type arise in instruction scheduling, ordering of formula cell evaluation when recomputing formula values in spreadsheets, logic synthesis, determining the order of compilation tasks to perform in makefiles, data serialization, and resolving symbol dependencies in linkers . It is also used to decide in which order to load tables with foreign keys in databases . </P> <Table> <Tr> <Td> </Td> <Td> The graph shown to the left has many valid topological sorts, including: <Ul> <Li> 5, 7, 3, 11, 8, 2, 9, 10 (visual left - to - right, top - to - bottom) </Li> <Li> 3, 5, 7, 8, 11, 2, 9, 10 (smallest - numbered available vertex first) </Li> <Li> 5, 7, 3, 8, 11, 10, 9, 2 (fewest edges first) </Li> <Li> 7, 5, 11, 3, 10, 8, 9, 2 (largest - numbered available vertex first) </Li> <Li> 5, 7, 11, 2, 3, 8, 9, 10 (attempting top - to - bottom, left - to - right) </Li> <Li> 3, 7, 8, 5, 11, 10, 2, 9 (arbitrary) </Li> </Ul> </Td> </Tr> </Table> <Tr> <Td> </Td> <Td> The graph shown to the left has many valid topological sorts, including: <Ul> <Li> 5, 7, 3, 11, 8, 2, 9, 10 (visual left - to - right, top - to - bottom) </Li> <Li> 3, 5, 7, 8, 11, 2, 9, 10 (smallest - numbered available vertex first) </Li> <Li> 5, 7, 3, 8, 11, 10, 9, 2 (fewest edges first) </Li> <Li> 7, 5, 11, 3, 10, 8, 9, 2 (largest - numbered available vertex first) </Li> <Li> 5, 7, 11, 2, 3, 8, 9, 10 (attempting top - to - bottom, left - to - right) </Li> <Li> 3, 7, 8, 5, 11, 10, 2, 9 (arbitrary) </Li> </Ul> </Td> </Tr> <Ul> <Li> 5, 7, 3, 11, 8, 2, 9, 10 (visual left - to - right, top - to - bottom) </Li> <Li> 3, 5, 7, 8, 11, 2, 9, 10 (smallest - numbered available vertex first) </Li> <Li> 5, 7, 3, 8, 11, 10, 9, 2 (fewest edges first) </Li> <Li> 7, 5, 11, 3, 10, 8, 9, 2 (largest - numbered available vertex first) </Li> <Li> 5, 7, 11, 2, 3, 8, 9, 10 (attempting top - to - bottom, left - to - right) </Li> <Li> 3, 7, 8, 5, 11, 10, 2, 9 (arbitrary) </Li> </Ul>

The vertices in a graph may only have one topological order