»
Factorial complexity O(n!): A real nightmare of complexity because of the
large number of possible combinations between the elements. Just imagine:
If your input is 100 objects and an operation on your computer takes 10
-6
seconds (a reasonable speed for every computer, nowadays), you will need
about 10
140
years to complete the task successfully (an impossible amount of
time since the age of the universe is estimated as being 10
14
years). A famous
factorial complexity problem is the traveling salesman problem, in which a
salesman has to find the shortest route for visiting many cities and coming
back to the starting city (presented in Chapter 18).
CHAPTER 3
Do'stlaringiz bilan baham: |