Skip to main content
deleted 365 characters in body
Source Link
High Performance Mark
  • 78.7k
  • 7
  • 109
  • 168

Your computation of the naive algorithm's complexity is wonky, it should be O(n(n-1)/2), which reduces to O(n^2). Computing the distance between two vectors is O(k) where k is the number of elements in the vector; this still gives a complexity well below O(n!).

And just how do you propose to find a maximum distance without computing every distance ? In other words, the answer to your question is that a correct understanding of the complexity of the algorithm provides you with a much more efficient solution than you thought you had, but that there is an irreducible minimum complexity when dealing with n^2 elements.

Your computation of the naive algorithm's complexity is wonky, it should be O(n(n-1)/2), which reduces to O(n^2). Computing the distance between two vectors is O(k) where k is the number of elements in the vector; this still gives a complexity well below O(n!).

And just how do you propose to find a maximum distance without computing every distance ? In other words, the answer to your question is that a correct understanding of the complexity of the algorithm provides you with a much more efficient solution than you thought you had, but that there is an irreducible minimum complexity when dealing with n^2 elements.

Your computation of the naive algorithm's complexity is wonky, it should be O(n(n-1)/2), which reduces to O(n^2). Computing the distance between two vectors is O(k) where k is the number of elements in the vector; this still gives a complexity well below O(n!).

edited body
Source Link
Andrew Tomazos
  • 69.3k
  • 46
  • 208
  • 348

Your computation of the naive algorithm's complexity is wonky, it should be O(n(n-1)/2), which reduces to O(n^2). Computing the distance between two vectors is O(k) where k is the number of elements in the vector; this still gives a complexity well below O(n!).

And just how do you propose to find a minimummaximum distance without computing every distance ? In other words, the answer to your question is that a correct understanding of the complexity of the algorithm provides you with a much more efficient solution than you thought you had, but that there is an irreducible minimum complexity when dealing with n^2 elements.

Your computation of the naive algorithm's complexity is wonky, it should be O(n(n-1)/2), which reduces to O(n^2). Computing the distance between two vectors is O(k) where k is the number of elements in the vector; this still gives a complexity well below O(n!).

And just how do you propose to find a minimum distance without computing every distance ? In other words, the answer to your question is that a correct understanding of the complexity of the algorithm provides you with a much more efficient solution than you thought you had, but that there is an irreducible minimum complexity when dealing with n^2 elements.

Your computation of the naive algorithm's complexity is wonky, it should be O(n(n-1)/2), which reduces to O(n^2). Computing the distance between two vectors is O(k) where k is the number of elements in the vector; this still gives a complexity well below O(n!).

And just how do you propose to find a maximum distance without computing every distance ? In other words, the answer to your question is that a correct understanding of the complexity of the algorithm provides you with a much more efficient solution than you thought you had, but that there is an irreducible minimum complexity when dealing with n^2 elements.

deleted 2 characters in body
Source Link
High Performance Mark
  • 78.7k
  • 7
  • 109
  • 168

Your computation of the naive algorithm's complexity is wonky, it should be O(n(n-1)/2), which reduces to O(n^2). Computing the distance between two vectors is O(k^2k) where k is the number of elements in the vector; this still gives a complexity well below O(n!).

And just how do you propose to find a minimum distance without computing every distance ? In other words, the answer to your question is that a correct understanding of the complexity of the algorithm provides you with a much more efficient solution than you thought you had, but that there is an irreducible minimum complexity when dealing with n^2 elements.

Your computation of the naive algorithm's complexity is wonky, it should be O(n(n-1)/2), which reduces to O(n^2). Computing the distance between two vectors is O(k^2) where k is the number of elements in the vector; this still gives a complexity well below O(n!).

And just how do you propose to find a minimum distance without computing every distance ? In other words, the answer to your question is that a correct understanding of the complexity of the algorithm provides you with a much more efficient solution than you thought you had, but that there is an irreducible minimum complexity when dealing with n^2 elements.

Your computation of the naive algorithm's complexity is wonky, it should be O(n(n-1)/2), which reduces to O(n^2). Computing the distance between two vectors is O(k) where k is the number of elements in the vector; this still gives a complexity well below O(n!).

And just how do you propose to find a minimum distance without computing every distance ? In other words, the answer to your question is that a correct understanding of the complexity of the algorithm provides you with a much more efficient solution than you thought you had, but that there is an irreducible minimum complexity when dealing with n^2 elements.

Source Link
High Performance Mark
  • 78.7k
  • 7
  • 109
  • 168
Loading