We propose schemes to generate cluster state and Greenberger-Horne-Zeilinger(GHZ) state with a single-mode cavity and atoms, and generalize the schemes toN atoms case. Beside, we consider the success probability of the schemes in thecase of the cavity decay and the atomic spontaneous emission. We introduce anauxiliary atom in the resonant interaction between a single-mode cavity and atoms,the final state of the auxiliary atom is unchanged. The atoms for generating clusterstate need not go through the cavity simultaneously, so the schemes are feasible inexperiment. |