In graph theory, the modular decomposition is a decomposition of a graph into subsets of vertices called modules. A module is a generalization of a connected component of a graph. Unlike connected components, however, one module can be a proper subset of another. Modules therefore lead to a recursive (hierarchical) decomposition of the graph, instead of just a partition. There are variants of modular decomposition for undirected graphs and directed graphs. For each undirected graph, this decomposition is unique. This notion can be generalized to other structures (for example directed graphs) and is useful to design efficient algorithms for the recognition of some graph classes, for finding transitive orientations of comparability graphs, for optimization problems on graphs, and for graph drawing. Modules As the notion of modules has been rediscovered in many areas, modules have also been called autonomous sets, homogeneous sets, stable sets, clumps, committees, externally related sets, intervals, nonsimplifiable subnetworks, and partitive sets . Perhaps the earliest reference to them, and the first description of modular quotients and the graph decomposition they give rise to appeared in (Gallai 1967). A module of a graph is a generalization of a connected component. A connected component has the property that it is a set of vertices such that every member of is a non-neighbor of every vertex not in . (It is a union of connected components if and only if it has this property.) More generally, is a module if, for each vertex , either every member of is a non-neighbor of or every member of is a neighbor of . Equivalently, is a module if all members of have the same set of neighbors among vertices not in . Contrary to the connected components, the modules of a graph are the same as the modules of its complement, and modules can be "nested": one module can be a proper subset of another. Note that the set of vertices of a graph is a module, as are its one-element subsets and the empty set; these are called the trivial modules. A graph may or may not have other modules. A graph is called prime if all of its modules are trivial. Despite these differences, modules preserve a desirable property of connected components, which is that many properties of the subgraph induced by a connected component are independent of the rest of the graph. A similar phenomenon also applies to