
λ¬΄κ² μ§ν©:
μ΄μ΅ μ§ν©:
μ΅λ μμ© λ¬΄κ²:
(Knapsack μ©λ)
λͺ©ν:
μ΄ λ¬΄κ²κ° λ₯Ό λμ§ μμΌλ©΄μ, μ΄μ΅(profit)μ΄ μ΅λκ° λλλ‘ μμ΄ν
μ§ν© μ ν
μ΄ μ¬λΌμ΄λμμλ 0/1 Knapsack λ¬Έμ μμμ Backtrackingκ³Ό Bounding Function μ€κ³λ₯Ό λ€λ£¨κ³ μμ΄μ. μμ μ 리ν΄μ€κ²μ:
Promising functionμ΄λ?
νμμ κ³μν μ§ λ§μ§ νλ¨νλ κΈ°μ€ ν¨μ.
νμ¬ weight > W β νμ₯ μ€μ§(νμ¬ weight + λ€μ μμ΄ν
weight) > W β stop(νμ¬ weight + λ€μ μμ΄ν
λ€μ μ΄ν©) < W β stopβ μ¦, λ λ£μ΄λ΄λ Wλ₯Ό λμ§ λͺ»νλ©΄ νμ₯ν νμκ° μμ.
β μ΄κ² λ°λ‘ Nonpromising, μ¦ λ μ΄μ μ λ§νμ§ μμ.
β³οΈ μ¬κΈ°μ λ§νλ κ²μ²λΌ:
Nonpromising function β Bounding function μΌλ‘ λ΄λ λ¨.
bound(g+h) < BEST(νμ¬κΉμ§ μ»μ μ΅μ μ μ΄μ΅) β λ νμ μ ν¨ (nonpromising)
| μ©μ΄ | μλ―Έ |
|---|---|
| Promising | μ λ§ν΄μ κ³μ νμν κ°μΉκ° μμ |
| Nonpromising | λ νμν΄λ μ΅μ ν΄μ λͺ» λ―ΈμΉ¨ β Prune |
| Bound Function | νμ¬ μ΄μ΅ + λ―Έλ μ΅λ μΆμ μ΄μ΅ |
| g + h < BEST | νμ¬ κ²½λ‘λ λ λ³Ό νμ μμ |
Promising functionμ΄λ?
νμμ κ³μν μ§ λ§μ§ νλ¨νλ κΈ°μ€ ν¨μ.
쑰건 1:
νμ¬ weight > Wβ νμ₯ μ€μ§
쑰건 2:(νμ¬ weight + λ€μ μμ΄ν weight) > Wβ stop
쑰건 3:(νμ¬ weight + λ€μ μμ΄ν λ€μ μ΄ν©) < Wβ stop
β μ¦, λ λ£μ΄λ΄λ Wλ₯Ό λμ§ λͺ»νλ©΄ νμ₯ν νμκ° μμ.
β μ΄κ² λ°λ‘ Nonpromising, μ¦ λ μ΄μ μ λ§νμ§ μμ.
β³οΈ μ¬κΈ°μ λ§νλ κ²μ²λΌ:
Nonpromising function β Bounding function μΌλ‘ λ΄λ λ¨.
λ°±νΈλνΉμμ promising νλ¨ κΈ°μ€ = bound function
μ μ:
νλ¨ κΈ°μ€:
β Non-promising
g: item_1 ~ item_i κΉμ§μ μ΄μ΅ ν©
h: item_i+1 ~ item_k κΉμ§ μ΄μ΅ ν©
item_k+1 μΌλΆλ§ λ΄μ μ μλ€κ³ κ°μ νκ³ λΉμ¨ κ³μ°p_k+1 / w_k+1 * λ¨μ 무κ²
Q. λ₯Ό ν¬κ² μΆμ νλ©΄ pruningμ΄ λ μ λ κΉ?

μλ Backtracking μΌλ‘ νΌ κ²μ΄λ€ ( λΉ¨κ° β νλ β νν¬ )
λ€μμΌλ‘ Branch and Bound (B&B) μκ³ λ¦¬μ¦μ μ¬μ©ν΄μ νμ΄λ³΄μ


Branch and Bound with Best-First (Search)
νκ° ν¨μ:
(g: νμ¬κΉμ§ λΉμ©, h: ν΄λ¦¬μ€ν± μμΈ‘)
μ°μ μμκ° κ°μ₯ μ’μ(hκ° μ μΌ ν°) λ Έλλ₯Ό λ¨Όμ νμ₯νλ λ°©μ
Best-first Branch and Bound
A μκ³ λ¦¬μ¦ (μΈκ³΅μ§λ₯μμ μ¬μ©λ¨)

μ΄ κ²½μ° h = 98 λ‘ κ°μ₯ ν° λ
Έλλ₯Ό μ μΌ λ¨Όμ μννλ€
"λͺ¨λ λ°©λ²λ€μ all enumerations κ°λ₯"
β λͺ¨λ κ°λ₯ν κ²½μ°μ μ(μ΄κ±°)λ₯Ό λ€ νμν μ μλ ꡬ쑰λΌλ λ»μ
λλ€.