Benedict Cumberbatch distantly related to Alan Turing LOS ANGELES, Nov. 13 (UPI) -- Benedict Cumberbatch shares a common ancestor with Alan Turing. The 38-year-old actor and WWII codebreaker are 17th cousins, according to researchers at genealogy website Ancestry. Cumberbatch and Turing are both related to John Beaufort, first Earl of Somerset, who was the son of John of Gaunt, first Duke of Lancaster, of the House of Plantagenet. "It would seem that there is a flair for espionage and bravery that has descended down multiple generations of Benedict Cumberbatch's family tree," content manager Miriam Silverman said. It's amazing to think that when stepping into the role of Alan Turing, he would not only be portraying a world class codebreaker but a real life relation. Cumberbatch will portray Turing in new historical thriller The Imitation Game. The logician helped to break the Nazi Enigma code during WWII, and although his work contributed greatly to Allied success, he was criminally prosecuted for homosexuality in 1952. He chose to be chemically castrated in lieu of prison, and died of an apparent suicide at age 41 in 1954. The Imitation Game is directed by Morten Tyldum, and co-stars Keira Knightley as cryptanalyst Joan Clarke, Matthew Goode as cryptanalyst Hugh Alexander, Mark Strong as Maj. Gen. Stewart Menzies and Charles Dance as Cdr. Alastair Denniston. The film opens in theaters Nov. 28.