Part 1 of the Star Trek episode “Cause And Effect”. Season 5, Episode 18 of the Next Generation Series.