Question: why are ulysses and diomedes in the same flame?
Answer: As Dante approaches the eighth pouch of the eighth circle of hell, he sees sinners in flames; he knows he'll find Ulysses among these “fireflies that glimmer in the valley.” The man is tied up in a flame with Diomed, both of them being punished for their ruse at Troy.