全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Worst-case, best-case and average-case cost?

又称: worst-case cost · best-case cost · average-case cost

Definition 13.6 University Computer Science — Year 1 · 第 13 章 — Asymptotic Analysis and Recurrences

For an algorithm whose cost on an input xx is C(x)C(x), and InI_n the finite set of inputs of size nn considered, the worst-case cost is max⁡x∈InC(x)\max_{x \in I_n} C(x), the best-case cost is min⁡x∈InC(x)\min_{x \in I_n} C(x), and the average-case cost is 1∣In∣∑x∈InC(x)\frac{1}{|I_n|}\sum_{x \in I_n} C(x).

在原文中阅读 →