スキル一覧に戻る
pluginagentmarketplace

complexity-analysis

by pluginagentmarketplace

Computer Science fundamentals roadmap plugin for Claude

1🍴 0📅 2026年1月5日
GitHubで見るManusで実行

SKILL.md


name: complexity-analysis description: Analyze algorithm complexity, understand Big O notation, computability theory, NP-completeness, and computational limits. sasmp_version: "1.3.0" bonded_agent: 04-complexity-theory-expert bond_type: PRIMARY_BOND

Complexity Analysis Skill

Skill Metadata

skill_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]

Quick Start

Scientifically measure algorithm performance and understand computational limits.

Asymptotic Notation

Big O (Upper Bound)

  • f(n) = O(g(n)) if f(n) ≤ c·g(n) eventually
  • Describes worst-case behavior
  • Example: Insertion sort is O(n²)

Theta (Tight Bound)

  • f(n) = θ(g(n)) if c₁·g(n) ≤ f(n) ≤ c₂·g(n)
  • Exact growth rate
  • Example: Merge sort is θ(n log n)

Omega (Lower Bound)

  • f(n) = Ω(g(n)) if f(n) ≥ c·g(n) eventually
  • Describes best-case behavior

Common Complexity Classes

O(1) < O(log n) < O(n) < O(n log n) < O(n²) < O(n³) < O(2ⁿ) < O(n!)

Master Theorem

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))

Complexity Classes

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


Troubleshooting

IssueRoot CauseResolution
Wrong Big-OHidden loops ignoredTrace all operations
Master Theorem failsConditions not metUse substitution method
Empirical mismatchHidden constantsCount operations precisely

Practical Complexity

ComplexitySize nAlgorithm
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ⁿ)20Exponential

NP-Complete Problems

Famous examples:

  • 3-SAT: Boolean satisfiability
  • TSP: Traveling salesman
  • Knapsack: 0/1 knapsack
  • Clique: Find complete subgraph
  • Vertex cover: Cover all edges

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です