I would have to say that although I can't cite exactly which "ancient myth" it is based on, that episodes 4, 5, & 6 borrow from some very common themes. Daddy issues, redemption, and mythical quest are just three, there's probably more. See this link or Google "Seven Stories" for a better explanation than I can give here https://en.wikipedia.org/wiki/The_Seven_Basic_Plots