Analyze algorithm complexity, understand Big O notation, computability theory, NP-completeness, and computational limits.
Analyzes algorithmic complexity using Big O notation, the Master Theorem, and complexity classes (P, NP, NP-complete). Triggers when evaluating algorithm performance, comparing solutions, or determining if a problem is computationally tractable.
/plugin marketplace add pluginagentmarketplace/custom-plugin-computer-science/plugin install computer-science-plugin@pluginagentmarketplace-computer-scienceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/complexity_classes.yamlreferences/COMPLEXITY_THEORY_GUIDE.mdscripts/np_checker.pyskill_config:
version: "1.0.0"
category: theoretical
prerequisites: [cs-foundations, algorithms]
estimated_time: "4-6 weeks"
difficulty: advanced
parameter_validation:
analysis_type:
type: string
enum: [time, space, both]
default: both
notation:
type: string
enum: [big-o, theta, omega]
retry_config:
max_attempts: 3
backoff_strategy: exponential
initial_delay_ms: 500
observability:
log_level: INFO
metrics: [analysis_accuracy, master_theorem_usage]
Scientifically measure algorithm performance and understand computational limits.
Big O (Upper Bound)
Theta (Tight Bound)
Omega (Lower Bound)
O(1) < O(log n) < O(n) < O(n log n) < O(n²) < O(n³) < O(2ⁿ) < O(n!)
For T(n) = a·T(n/b) + f(n):
Case 1: f(n) < n^log_b(a) → T(n) = O(n^log_b(a))
Case 2: f(n) = n^log_b(a) → T(n) = O(n^log_b(a) · log n)
Case 3: f(n) > n^log_b(a) → T(n) = O(f(n))
P (Polynomial): Solvable in polynomial time NP (Nondeterministic Polynomial): Solutions verifiable in polynomial time NP-Complete: Hardest in NP NP-Hard: At least as hard as NP-complete
| Issue | Root Cause | Resolution |
|---|---|---|
| Wrong Big-O | Hidden loops ignored | Trace all operations |
| Master Theorem fails | Conditions not met | Use substitution method |
| Empirical mismatch | Hidden constants | Count operations precisely |
| Complexity | Size n | Algorithm |
|---|---|---|
| O(log n) | 10⁸ | Binary search |
| O(n) | 10⁷ | Linear scan |
| O(n log n) | 10⁶ | Good sort |
| O(n²) | 10⁴ | Slow sort |
| O(2ⁿ) | 20 | Exponential |
Famous examples:
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.