Margaret Hamilton as the Wicked Witch and Judy Garland as Dorothy Gale in 'The Wizard of Oz', 1939. Photo / Getty Images
Ask a critic to name the most influential film of all time and Citizen Kane might top the list. Ask an algorithm, and the answer is The Wizard of Oz.
Researchers at the University of Turin have developed a computer programme that measures the success of a film not by box office takings but by how many times it is referenced in other films and how many spin-offs it has engendered.
They assessed more than 47,000 films and found that The Wizard of Oz, starring Judy Garland and released in 1939, topped the list. It was followed by the original Star Wars film and Alfred Hitchcock's Psycho.
The algorithm used the Internet Movie Database (IMDb) website as its source material.
"The success of a film is usually measured through its box office revenue or through the opinion of professional critics; such measures, however, may be influenced by external factors, such as advertisements or trends, and are not able to capture the impact of a film over time," the researchers said, adding that their method challenged the idea that "the best movies are simply the ones that sell more, like any other product."
They based their study on the "key intuition" that "a successful movie will be probably known and referenced by some of the successive ones, for honouring it or for trying to reproduce its outstanding performance".
The Wizard of Oz has been re-made dozens of times in various forms, from a Tom and Jerry cartoon to the 1978 musical The Wiz, which starred Michael Jackson and Diana Ross.
It has been referenced nearly 3,000 times in other films and television programmes.
James Stewart sang Over the Rainbow in The Philadelphia Story and, recently, Lady Gaga hummed it in A Star Is Born. Dorothy's famous line, "I've a feeling we're not in Kansas any more," makes appearances in countless films, including Avatar, Sex and the City 2 and Honey, I Shrunk the Kids.
The top 10 films by this measure also include Psycho, King Kong and the controversial 1915 release The Birth of A Nation. The latter's racist subject matter has tarnished its reputation, but its cinematic techniques influenced generations of film-makers.
According to IMDb it is referenced, either directly or indirectly, in Citizen Kane, Forrest Gump, Apocalypse Now and The Lord of the Rings: The Twin Towers.
The Turin study, published today in the journal Applied Science Network, also ranked actors according to the number of appearances they made in films ranked as influential.
Samuel L Jackson topped the table after a career that has included 82 films, among them Pulp Fiction.
The researchers cautioned that IMDb data was strongly biased towards films produced in Western countries - Bollywood films, for example, are not included in the study.
Dr Livio Bioglio, lead researcher, said the study had identified "films that inspire other important ones, and for this reason have had a highly influential role in the history of cinema."
Cinema classics: The 20 most influential movies 1 The Wizard of Oz (1939) 2 Star Wars (1977) 3 Psycho (1960) 4 King Kong (1933) 5 2001: A Space Odyssey (1968) 6 Metropolis (1927) 7 Citizen Kane (1941) 8 The Birth of a Nation (1915) 9Frankenstein (1931) 10 Snow White and the Seven Dwarfs (1937) 11 Casablanca (1942) 12 Dracula (1931) 13 The Godfather (1972) 14 Jaws (1975) 15 Nosferatu (1922) 16 The Searchers (1956) 17 Cabiria (1914) 18 Dr Strangelove (1964) 19 Gone With the Wind (1939) 20 Battleship Potemkin (1925)