Editing Talk:399: Travelling Salesman Problem
Please sign your posts with ~~~~ |
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 23: | Line 23: | ||
:I find it more curious that you think O(n!) is equivalent to O(n log(n))… it most certainly isn’t. O(n log(n)) is (provably) the optimal complexity of a {{w|Comparison sort}}; O(n!) is the complexity of {{w|Bogosort}}, one of the stupidest sorting algorithms imaginable. —[[Special:Contributions/162.158.90.162|162.158.90.162]] 21:23, 23 August 2015 (UTC) | :I find it more curious that you think O(n!) is equivalent to O(n log(n))… it most certainly isn’t. O(n log(n)) is (provably) the optimal complexity of a {{w|Comparison sort}}; O(n!) is the complexity of {{w|Bogosort}}, one of the stupidest sorting algorithms imaginable. —[[Special:Contributions/162.158.90.162|162.158.90.162]] 21:23, 23 August 2015 (UTC) | ||
::This is so, but when one examines the theory of big O notation, one finds that they are mathemticaly equivalent. The point, therefore, is that the difference is purely in form. To illustrate: A list has O(n!) permutations possible. A sorting algorithm can therefore never sort a worst-case random list with less than O(n!) comparisons, as this is the minimum required to get the list in the correct order for the best case, when we assume the worst possible list for the algorithm. It is possible to prove that O(n!) is O(n log(n)) re-expressed. Therefore the difference seems merely to exist to highlight the general behaviour to humans. Agreed, however, that until the advent of the wavefunction-based "quantum" computer, the bogosort is as bad as it gets. This does not change the fact that any comparison sort must distinguish between O(n!) lists, and therefore can never do that with less than O(n! -1)=O(n!) comparisons. The proof of the n log n barrier rests on this, and n log n is merely a nicer-looking way of writing n! here. Unless I have encountered a flawed proof, this should hold, and even then, the number of possibilities that must be distinguished should bound it... Provided of course that this idea, too, is not logically flawed. If so, how, and if not, then why the notation? Is this somehow applying the same logic that distinguishes a binary sort from a linear one to the set of possible orderings? If so, it must be functionally pre-sorted, by some logic... Where have I erred, if I have erred, and, should I have erred, how might the correct solution be explained? | ::This is so, but when one examines the theory of big O notation, one finds that they are mathemticaly equivalent. The point, therefore, is that the difference is purely in form. To illustrate: A list has O(n!) permutations possible. A sorting algorithm can therefore never sort a worst-case random list with less than O(n!) comparisons, as this is the minimum required to get the list in the correct order for the best case, when we assume the worst possible list for the algorithm. It is possible to prove that O(n!) is O(n log(n)) re-expressed. Therefore the difference seems merely to exist to highlight the general behaviour to humans. Agreed, however, that until the advent of the wavefunction-based "quantum" computer, the bogosort is as bad as it gets. This does not change the fact that any comparison sort must distinguish between O(n!) lists, and therefore can never do that with less than O(n! -1)=O(n!) comparisons. The proof of the n log n barrier rests on this, and n log n is merely a nicer-looking way of writing n! here. Unless I have encountered a flawed proof, this should hold, and even then, the number of possibilities that must be distinguished should bound it... Provided of course that this idea, too, is not logically flawed. If so, how, and if not, then why the notation? Is this somehow applying the same logic that distinguishes a binary sort from a linear one to the set of possible orderings? If so, it must be functionally pre-sorted, by some logic... Where have I erred, if I have erred, and, should I have erred, how might the correct solution be explained? | ||
− | + | [[Special:Contributions/108.162.249.183|108.162.249.183]] 11:21, 2 September 2015 (UTC) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |