Alternation of generations (also known as metagenesis or heterogenesis) is the type of life cycle that occurs in those plants and algae in the Archaeplastida and the Heterokontophyta that have distinct haploid sexual and diploid asexual stages. In these groups, a multicellular haploid gametophyte with "n" chromosomes alternates with a multicellular diploid sporophyte with 2"n" chromosomes, made up of "n" pairs. A mature sporophyte produces haploid spores by meiosis, a process which reduces the number of chromosomes to half, from 2"n" to "n".