Is There a Difference Between Average Case Complexity and Expected Running Time?

Click For Summary
Average case complexity and expected running time are distinct concepts in algorithm analysis. Average case complexity refers to the expected running time of a deterministic algorithm, such as quicksort, when inputs are randomly chosen. In contrast, expected running time typically applies to randomized algorithms, like Karger's algorithm, and represents the expected runtime for a specific input. Additionally, the term expected worst case running time can be used to describe the worst-case scenario of expected running time across all inputs of a given size. Understanding these differences is crucial for accurately analyzing algorithm performance.
naftali
Messages
30
Reaction score
0
Hi,

I am not sure if I understand well : is there a difference between avarage case complexity to expectation of running time?

thank you

Naftali
 
Technology news on Phys.org
Well, different authors might use them in different ways, but here's how I learned it...
"Average case" running time is for a deterministic algorithm (the most familiar example that you use average case runtime for is quicksort). It is the expected value of the running time that the algorithm would have if inputs were chosen randomly.

"Expected" running time is usually for a randomized algorithm (for example, Karger's algorithm). It is the expected value for the runtime of the algorithm on a particular input. You might also speak of expected worst case running time, which would be the worst case of the expected running time over all inputs of a certain size.
 
Thanks
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 11 ·
Replies
11
Views
821
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 5 ·
Replies
5
Views
1K
Replies
14
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
593
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K