docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
---
|
||||
id: wiki-2026-0508-problem-solving
|
||||
title: Problem Solving
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [Problem Solving, 문제 해결, decomposition]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [methodology, meta, decomposition, heuristics]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: meta
|
||||
framework: methodology
|
||||
---
|
||||
|
||||
# Problem Solving
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 큰 문제를 매 작은 문제로 매 쪼개고 매 합쳐라"**. Problem Solving은 매 ill-defined situation을 매 well-defined sub-problem 으로 매 decompose 하고 매 solve → compose 하는 매 universal methodology. Polya (1945) 부터 매 modern algorithmic thinking, 매 LLM tool-use planning 까지 매 backbone.
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 4-step (Polya)
|
||||
1. **Understand**: input/output/constraint 매 명확화.
|
||||
2. **Plan**: 매 known problem과 매 mapping, 매 sub-goal 분해.
|
||||
3. **Execute**: 매 plan 매 step-by-step.
|
||||
4. **Review**: 매 verify, 매 generalize.
|
||||
|
||||
### 매 Heuristic toolkit
|
||||
- **Decomposition**: divide-and-conquer.
|
||||
- **Analogy**: 매 known problem → 매 transform.
|
||||
- **Working backward**: goal에서 매 출발.
|
||||
- **Invariant**: 매 변하지 않는 property 매 식별.
|
||||
- **Specialization**: 매 simpler case 먼저.
|
||||
- **Generalization**: 매 더 일반 case로 매 abstract.
|
||||
|
||||
### 매 응용
|
||||
1. Algorithm design.
|
||||
2. System architecture (decomposition into services).
|
||||
3. Debugging (Problem Solving Skills 참고).
|
||||
4. LLM agent planning (ReAct, ToT).
|
||||
5. Research project scoping.
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### Decomposition template
|
||||
```python
|
||||
# 매 1. Restate
|
||||
# Goal: 매 sort N items by key with stable + in-place
|
||||
# Inputs: list[T]; Outputs: list[T] sorted
|
||||
# Constraints: stable, O(1) extra space, T comparable
|
||||
|
||||
# 매 2. Plan — sub-problems
|
||||
# (a) partition pivot (in-place quicksort)
|
||||
# (b) but quicksort 매 unstable → swap to merge sort?
|
||||
# (c) merge sort 매 not in-place → block merge sort (Wikisort)
|
||||
|
||||
# 매 3. Execute — pick block merge sort
|
||||
def block_merge_sort(a): ... # 매 implement
|
||||
|
||||
# 매 4. Review — invariants, edge cases (empty, dupes, all-equal)
|
||||
```
|
||||
|
||||
### Working backward (puzzle solving)
|
||||
```python
|
||||
# Find x such that f(g(h(x))) == target
|
||||
# Backward: y = f^-1(target); z = g^-1(y); x = h^-1(z)
|
||||
def backward(target, inverses):
|
||||
cur = target
|
||||
for inv in reversed(inverses):
|
||||
cur = inv(cur)
|
||||
return cur
|
||||
```
|
||||
|
||||
### Invariant-based proof (loop)
|
||||
```python
|
||||
def gcd(a, b):
|
||||
# 매 Invariant: gcd(a0, b0) == gcd(a, b) at every iteration
|
||||
while b:
|
||||
a, b = b, a % b
|
||||
return a
|
||||
```
|
||||
|
||||
### Specialization → Generalization
|
||||
```python
|
||||
# 매 Step 1 — special case: 매 sorted list, no duplicates
|
||||
def find_special(arr, t):
|
||||
lo, hi = 0, len(arr)-1
|
||||
while lo <= hi:
|
||||
mid = (lo+hi)//2
|
||||
if arr[mid] == t: return mid
|
||||
if arr[mid] < t: lo = mid+1
|
||||
else: hi = mid-1
|
||||
return -1
|
||||
|
||||
# 매 Step 2 — generalize: 매 with duplicates → leftmost binary search
|
||||
def find_general(arr, t):
|
||||
lo, hi = 0, len(arr)
|
||||
while lo < hi:
|
||||
mid = (lo+hi)//2
|
||||
if arr[mid] < t: lo = mid+1
|
||||
else: hi = mid
|
||||
return lo if lo < len(arr) and arr[lo] == t else -1
|
||||
```
|
||||
|
||||
### LLM agent decomposition (ReAct loop)
|
||||
```python
|
||||
# 매 Pseudo-ReAct
|
||||
def solve(task, llm, tools, max_steps=10):
|
||||
history = [{"role": "user", "content": task}]
|
||||
for _ in range(max_steps):
|
||||
out = llm.chat(history) # Thought + Action
|
||||
if out.is_final: return out.answer
|
||||
result = tools[out.action](out.args) # Observation
|
||||
history += [out.message, {"role": "tool", "content": result}]
|
||||
return None
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Algorithm puzzle | Polya + decomposition |
|
||||
| System design | Component decomposition + interface |
|
||||
| Debugging | [[Problem Solving Skills]] (repro/bisect) |
|
||||
| Research | Specialization → generalization |
|
||||
| LLM agent | ReAct / Tree-of-Thoughts |
|
||||
|
||||
**기본값**: Understand → Decompose → Solve smallest → Compose → Review.
|
||||
|
||||
## 🔗 Graph
|
||||
- 변형: [[Polya-Method]]
|
||||
- 응용: [[System-Architecture]]
|
||||
- Adjacent: [[Problem Solving Skills]] · [[Heuristic]] · [[ReAct]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: ill-defined task scoping, 매 multi-step planning, 매 agentic workflow 설계.
|
||||
**언제 X**: 매 1-line trivial task.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **매 Skip understanding**: 매 problem 매 명확하지 않은 채 매 코딩 시작.
|
||||
- **매 Premature optimization**: 매 sub-problem 매 미해결인데 매 perf tune.
|
||||
- **매 No review**: 매 동작하면 매 commit, 매 generalization 안 함.
|
||||
- **매 Cargo-cult algorithm**: 매 비슷한 문제의 매 solution 매 무비판 복붙.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Polya "How to Solve It" 1945, Schoenfeld "Mathematical Problem Solving" 1985).
|
||||
- 신뢰도 A.
|
||||
- 관련: [[Problem Solving Skills]] (debugging-focused sibling).
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — Polya + heuristic toolkit + algorithmic patterns |
|
||||
Reference in New Issue
Block a user