f8b21af4be
10_Wiki/Topics 대규모 정리: - 오류 캡처/미완성 stub 문서 227개 제거 - 교차폴더 중복 43클러스터 병합 (63파일 → redirect) - 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건 - 카테고리 MOC 6개 신규 생성 - Graph 섹션 미해결 related-keyword 링크 10,058건 제거 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
185 lines
6.4 KiB
Markdown
185 lines
6.4 KiB
Markdown
---
|
|
id: wiki-2026-0508-complexity-theory
|
|
title: Complexity Theory
|
|
category: 10_Wiki/Topics
|
|
status: verified
|
|
canonical_id: self
|
|
aliases: [Complex Systems, Complexity Science]
|
|
duplicate_of: none
|
|
source_trust_level: A
|
|
confidence_score: 0.85
|
|
verification_status: applied
|
|
tags: [complexity, systems, emergence, cynefin]
|
|
raw_sources: []
|
|
last_reinforced: 2026-05-10
|
|
github_commit: pending
|
|
tech_stack:
|
|
language: agnostic
|
|
framework: agnostic
|
|
---
|
|
|
|
# Complexity Theory
|
|
|
|
## 매 한 줄
|
|
> **"매 system 의 behavior 가 매 part 의 sum 보다 크다 — 매 emergence, nonlinearity, feedback."**. Complexity theory는 Santa Fe Institute (1984~) 가 정립한 cross-disciplinary field. Software 에서는 Cynefin framework (Snowden), Brooks 의 essential vs accidental complexity, Promise Theory, distributed systems 의 emergent behavior 로 산다. 2026년 ML systems 의 emergent capabilities 도 매 핵심 case.
|
|
|
|
## 매 핵심
|
|
|
|
### 매 complex vs complicated
|
|
| Complicated | Complex |
|
|
|---|---|
|
|
| Many parts, knowable | Many parts, emergent |
|
|
| Aircraft, watch | Ecosystem, market, brain, microservices fleet |
|
|
| Decompose & analyze | Probe → sense → respond |
|
|
| Predictable | Unpredictable in detail |
|
|
|
|
### 매 Cynefin (Snowden)
|
|
- **Clear (Simple)**: cause→effect 자명. Best practice.
|
|
- **Complicated**: expert analysis 필요. Good practice.
|
|
- **Complex**: emergent, retrospective coherence. Probe → sense → respond.
|
|
- **Chaotic**: no cause→effect. Act → sense → respond.
|
|
- **Confusion** (Disorder): which domain unclear.
|
|
|
|
### 매 essential vs accidental complexity (Brooks)
|
|
- **Essential**: 매 problem itself 의 complexity (irreducible).
|
|
- **Accidental**: tools, languages, infra 가 만든 complexity (reducible).
|
|
- 매 silver bullet 없음 → essential complexity 의 tackling.
|
|
|
|
### 매 emergent properties
|
|
- Self-organization (ant colonies, market prices).
|
|
- Phase transitions (water → ice, network connectivity).
|
|
- Power laws (Zipf, scale-free networks).
|
|
- Adaptive feedback (immune systems, ML training dynamics).
|
|
|
|
### 매 응용 in software
|
|
1. Microservice fleet behavior (cascading failures, retry storms).
|
|
2. ML emergent capabilities (in-context learning at scale).
|
|
3. Distributed consensus (CAP, FLP impossibility).
|
|
4. Tech debt accumulation (compound complexity).
|
|
5. Team scaling (Brooks' law as complexity manifestation).
|
|
|
|
## 💻 패턴
|
|
|
|
### Cynefin-driven decision (in code review)
|
|
```python
|
|
def categorize_problem(problem):
|
|
if known_solution(problem):
|
|
return "Clear: apply best practice"
|
|
if expertise_resolves(problem):
|
|
return "Complicated: expert analysis"
|
|
if requires_experimentation(problem):
|
|
return "Complex: probe-sense-respond"
|
|
if no_cause_effect(problem):
|
|
return "Chaotic: act-sense-respond"
|
|
return "Disorder: clarify first"
|
|
```
|
|
|
|
### Probe → sense → respond (chaos engineering)
|
|
```typescript
|
|
// Netflix Chaos Monkey style — controlled probe of complex system
|
|
import { ChaosClient } from '@netflix/chaos';
|
|
|
|
const chaos = new ChaosClient();
|
|
await chaos.experiment({
|
|
name: 'kill-random-pod-payment-svc',
|
|
hypothesis: 'system handles single pod loss within 30s',
|
|
blast_radius: 'one pod',
|
|
rollback_on: 'p99 > 500ms',
|
|
observe: ['error_rate', 'latency_p99', 'saturation'],
|
|
});
|
|
```
|
|
|
|
### Reduce accidental complexity — replace shell with compiled tool
|
|
```python
|
|
# Accidental: bash script with 5 sed/awk/jq pipes
|
|
# Essential: extract user emails from JSON
|
|
|
|
# After: simple, type-checked
|
|
import json
|
|
from pathlib import Path
|
|
|
|
emails = [
|
|
user["email"]
|
|
for user in json.loads(Path("users.json").read_text())
|
|
if user.get("active")
|
|
]
|
|
```
|
|
|
|
### Feedback loop modeling (system dynamics)
|
|
```python
|
|
# Tech debt feedback loop — simple ODE
|
|
import numpy as np
|
|
from scipy.integrate import odeint
|
|
|
|
def tech_debt(state, t, capacity, debt_growth, paydown_rate):
|
|
debt, velocity = state
|
|
d_debt = debt_growth - paydown_rate * velocity
|
|
d_velocity = capacity * (1 - debt / 100) - velocity * 0.1
|
|
return [d_debt, d_velocity]
|
|
|
|
# Emergent: nonlinear collapse when debt > capacity
|
|
sol = odeint(tech_debt, [10, 5], np.linspace(0, 100, 200),
|
|
args=(10, 2, 0.5))
|
|
```
|
|
|
|
### Power-law detection (scale-free service dependency)
|
|
```python
|
|
import numpy as np
|
|
import powerlaw
|
|
|
|
# In-degree of microservice call graph
|
|
in_degrees = compute_in_degrees(service_graph)
|
|
fit = powerlaw.Fit(in_degrees)
|
|
print(f"alpha={fit.power_law.alpha:.2f}") # ~2-3 → scale-free
|
|
# Implication: targeted attack on hubs is catastrophic
|
|
```
|
|
|
|
### Promise Theory (Burgess) — autonomous agents
|
|
```yaml
|
|
# Each service makes promises, others assess
|
|
service: payment-svc
|
|
promises:
|
|
- id: p99_latency_under_300ms
|
|
conditions: [load < 1000rps]
|
|
valid_until: 2026-12-31
|
|
- id: idempotent_charge_endpoint
|
|
conditions: []
|
|
```
|
|
|
|
## 매 결정 기준
|
|
| 상황 | Approach |
|
|
|---|---|
|
|
| Clear problem | Apply best practice, automate |
|
|
| Complicated | Expert review, formal analysis |
|
|
| Complex (emergent) | Probe with chaos engineering, observability |
|
|
| Chaotic (incident) | Act first, stabilize, then sense |
|
|
| Tech debt | Distinguish essential vs accidental |
|
|
|
|
**기본값**: Most production distributed systems 매 Complex domain 매 산다 → SLO + chaos + observability + post-incident review.
|
|
|
|
## 🔗 Graph
|
|
- 부모: [[Systems Theory]] · [[Cybernetics Foundations|Cybernetics]]
|
|
- 변형: [[Chaos Engineering]]
|
|
- 응용: [[Distributed Systems]] · [[Microservices]] · [[SRE]]
|
|
- Adjacent: [[Conceptual Integrity]] · [[Emergent Behavior]]
|
|
|
|
## 🤖 LLM 활용
|
|
**언제**: incident retrospective, architecture decision in distributed system, tech debt classification, organizational design, ML system behavior analysis.
|
|
**언제 X**: simple CRUD app design, single-node algorithm, bounded local logic.
|
|
|
|
## ❌ 안티패턴
|
|
- **Best-practice in complex domain**: clear-domain solution 을 complex domain 에 강제.
|
|
- **Ignoring accidental complexity**: 매 essential 처럼 취급 → tooling 의 미개선.
|
|
- **Predicting emergent behavior**: complex system 의 detail prediction 시도 — probe 가 답.
|
|
- **No feedback loops in design**: system dynamics 무시 → 매 surprise outage.
|
|
|
|
## 🧪 검증 / 중복
|
|
- Verified (Brooks "No Silver Bullet" / Snowden Cynefin / Mitchell "Complexity: A Guided Tour" / Burgess "Thinking in Promises").
|
|
- 신뢰도 A-.
|
|
|
|
## 🕓 Changelog
|
|
| 날짜 | 변경 |
|
|
|---|---|
|
|
| 2026-05-08 | Phase 1 |
|
|
| 2026-05-10 | Manual cleanup — Cynefin + Brooks essential/accidental + chaos engineering |
|