Master Theorem Calculator
Free online master theorem calculator. Enter your values and get instant results with the formula, step-by-step working, a worked example and FAQs — everything runs locally in your browser on Calcton, no signup required.
中文版:主定理计算器
原理:主定理比较递归功 f(n) 与叶子功 n^(log_b a) 的增速——f 更小则叶子主导(情形 1),同阶则每层均摊(情形 2),更大且满足正则条件 a·f(n/b) ≤ c·f(n) 则根主导(情形 3)。
步骤:① 输入 a、b 与 f(n) = n^p 的指数 p;② 读临界指数 log_b(a) 与情形判定;③ 取解。
示例:a = 2、b = 2、p = 1 时 log₂2 = 1 与 p 相等,情形 2,解 Θ(n log n)——归并排序与快速排序的平均情形;a = 3、b = 2、p = 1 时临界指数 1.584962500721,情形 1,解 Θ(n^1.585)——Karatsuba 乘法。
注意事项:主定理只覆盖 f(n) 为多项式型(或与 n^crit 差出多项式因子)的情形,p 介于 crit 与 crit+ε 之间时需要 Akra-Bazzi 等扩展工具;情形 3 还需验证正则条件。
相关:大 O 记号计算器解释本工具用到的增长阶记号;对数计算与指数增长工具补充 log_b(a) 的计算细节。
How to use the Master Theorem Calculator
- Fill in the inputs with your own numbers — every field shows what it expects.
- The result updates instantly as you type; no "Calculate" click needed.
- Read the result card for the main figure, the step-by-step formula, and practical notes.
Frequently asked questions
Is the Master Theorem Calculator free?
Yes — all math calculators on Calcton are free, with no sign-up required. Your inputs are processed in your browser and never sent to a server.
Is there a Chinese version of this tool?
Yes. Use the Chinese version link above — it is the same calculator with the interface in Simplified Chinese.
References
Formulas and benchmarks used by this calculator follow these published sources.
KevinContent LeadCalcton Editorial Team · Last updated 2026-10-04
Kevin maintains Calcton's formula verification and content: every calculator cites the standard it implements, worked examples are recomputed programmatically, and health benchmarks follow WHO and international guidelines.
Related calculators
More in this category: Math calculators
About math calculators
Free online math calculators for algebra, statistics, number theory and everyday arithmetic — from quadratic equations and matrices to percentages, fractions and prime factorization, each with step-by-step formulas.