The colored edges in the breakpoint graph of P and Q are given by ColoredEdges(P) together with ColoredEdges(Q). Note that some edges in these two sets may connect the same two nodes, which results in trivial cycles.

We will find it helpful to implement a function converting a genome graph back into a genome.

GraphToGenome(GenomeGraph) P ← an empty set of chromosomes for each cycle Nodes in GenomeGraph Chromosome ← CycleToChromosome(Nodes) add Chromosome to P returnP

Graph To Genome Problem

Solve the Graph To Genome Problem.

Given: The colored edges of a genome graph.

Return: A genome corresponding to the genome graph.