  A novel code construction algorithm is presented to find all the possible
code families for code reconfiguration in an OCDMA system. The algorithm is
developed through searching all the complete subgraphs of a constructed graph.
The proposed algorithm is flexible and practical for constructing optical
orthogonal codes (OOCs) of arbitrary requirement. Simulation results show that
one should choose an appropriate code length in order to obtain sufficient
number of code families for code reconfiguration with reasonable cost.
