Time Complexity of k-means is given by

o(mn)
o(tkn)
o(kn)
o(t2kn)

The correct answer is C. o(kn).

K-means is an iterative algorithm that partitions n observations into k clusters in which each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster. This results in a partitioning of the data space into Voronoi cells.

The time complexity of k-means is O(kn), where k is the number of clusters and n is the number of observations. This is because each observation must be compared to all other observations to find the nearest mean.

Option A, O(mn), is the time complexity of matrix multiplication, which is not relevant to k-means.

Option B, O(tkn), is the time complexity of the algorithm if the distance function is a time-consuming function. However, the distance function is typically a simple function, such as the Euclidean distance, which is not time-consuming.

Option D, O(t2kn), is the time complexity of the algorithm if the distance function is a quadratic function. However, the distance function is typically a linear function, such as the Euclidean distance, which is not quadratic.

Exit mobile version