if we have an algorithm that average running time of randomized algorithm A for input of size n is equal to $\theta(n^2)$.
why there would be an input data such that A solve it in $\Omega(n^{3n})$?
if we have an algorithm that average running time of randomized algorithm A for input of size n is equal to $\theta(n^2)$.
why there would be an input data such that A solve it in $\Omega(n^{3n})$?
Copyright © 2021 JogjaFile Inc.
Because $\Theta\left(n^2\right)$ is characterizing average running time across all possible inputs, - it just means that your algorithm runs extremely well on vast majority of inputs but has a small margin of pathological cases.
EDIT Note that in such a case, the worst-case complexity would be $\Omega \left(n^{3n}\right)$, but that does not contradict that average-case complexity is quadratic - you could be dividing by a large denominator when taking the average...