Fifty eight days for one ranking.
transcript
A photo contest has a thousand entries. Editors compare two photos at a time. One comparison takes ten seconds. How long does the ranking take?
The first idea compares every pair. Photo thirty one meets all three others. Four photos make six pairs. It works, and it ranks the photos.
Six pairs for four photos. Four thousand nine hundred fifty for a hundred. Almost five hundred thousand for a thousand. The count grows with n squared.
Almost five hundred thousand comparisons. Ten seconds each. That is nearly fifty eight days. Almost two months of work for the editors. The contest closes this week.
No method can use fewer than eight thousand five hundred thirty. Binary insertion needs at most eight thousand nine hundred seventy seven. That is about twenty five hours of editor time. Fifty eight days become one day. That is a plan the editors can finish.
Do not compare every pair. Full breakdown in the lecture.