-2

My idea of the program is :

Input = n sets

objective function ObjFn equals to O(n^3)

Output = the order of n sets

Steps:

  1. Applying ObjFn to all n sets
  2. Choose the n of the Minimum ObjFn to be ordered first
  3. Eliminate the chosen n
  4. Repeat steps 1:3 for the rest n-1 sets Note: If there are more than same minimum ObjFn for more than one of the n-1 , clustering all available solutions

I need to check the time complexity of this type of clustering and the overall time complexity of the method.

In addition if there any reference for a similar optimization method to study it.

Thanks in advance.

Example: If n= 4 and the ObjFns are n1= 30 , n2=50, n3=50, n4=60 then the outputs are n1 n2 n3 n4 and n1 n3 n2 n4 .

1234
  • 1
  • 1

1 Answers1

0

Seems $O(n^5)$ since the obj function needs to be evaluated $O(n)$ times for each of the remaining sets (of which there are $n$ at the start). I'm assuming your objective function changes as you add selected sets (i.e. you can't calculate the obj function once per set and store it).

TickaJules
  • 81
  • 1
  • 4
  • what about the time complexity of the unknown clustering solutions in this case? – 1234 Nov 27 '21 at 20:26
  • and What if the calculated Objective function is fixed for all n ? is it still O(n^3)? – 1234 Nov 27 '21 at 20:37
  • I think it would help if the question were more specifically stated. I'm just inferring from what you wrote. I'm thinking about it as you can value how well a set $S$ fits in the current (partial) solution but it costs you $O(n^3)$ to calculate the value. But more formally laying out your problem statement would help to know how it all goes together, and allow people to make more directed suggestions. – TickaJules Nov 27 '21 at 21:55