(From Daily Life to Math, Step by Step)
QUBO is not about math first.
QUBO is about thinking clearly.
Goal of this chapter
- Learn a repeatable method to convert real problems into QUBO
- Understand how to think in variables, objectives, and constraints
- Practice with everyday, non-technical examples
1. The Universal QUBO Thinking Process

No matter how complex a problem looks, QUBO modeling always follows the same steps:
- List choices (Yes / No decisions)
- Create binary variables for each choice
- Decide what you want to optimize (objective)
- List rules you must follow (constraints)
- Convert rules into penalties
- Combine everything into one formula
Now let’s apply every step explicitly.
Example 1: Choose Exactly One Drink
You have 3 drinks: Coke, Milk Tea, Orange Juice
You want to choose exactly one.
Step 1: List the Choices
Ask yourself:
What are the Yes / No decisions?
Choices:
- Choose Coke?
- Choose Milk Tea?
- Choose Orange Juice?
That’s it. No math yet.
Step 2: Create Binary Variables
Turn each choice into a variable:
C, M, O ∈ {0,1}
Meaning:
- 1 → chosen
- 0 → not chosen
So:
- C = 1 means Coke is chosen
- M = 1 means Milk Tea is chosen
- O = 1 means Orange Juice is chosen
Step 3: Decide What You Want to Optimize
In this example:
- You don’t care which drink
- You just want one drink
So the objective can be zero:
Objective = 0
This is normal. Not every problem needs rewards.
Step 4: List the Rules
Rule in human language:
You must choose exactly one drink
Translate to math:
C + M + O = 1
Still not QUBO yet.
Step 5: Convert the Rule into a Penalty
QUBO cannot say “forbidden”. It only says:
Break the rule → pay a cost
We do this by squaring:
(C + M + O — 1)²
Why this works:
- Rule satisfied → value = 0 (no penalty)
- Rule broken → value > 0 (penalty)
We multiply by a penalty weight P:
P(C + M + O - 1)²
Step 6: Combine Everything into One Formula
Final QUBO:
Q = P(C + M + O — 1)²
This single formula fully describes the problem.
A solver will try all combinations and pick:
- exactly one variable = 1
- others = 0
Example 2: Prefer One Option
Now let’s add preference.
You like Coke more than the others.
Step 1 and Step 2 are same as Example 1 so let’s jump to Step 3.
Step 3: Objective (Preference)
You like Coke, so reward it:
Objective = -3C
Negative = good.
Step 4: Rule
Choose exactly one:
C + M + O = 1
Step 5: Penalty
P(C + M + O — 1)²
Step 6: Final QUBO
Q = -3C + P(C + M + O — 1)²
Now the solver:
- Must choose one drink
- Will prefer Coke if possible
Example 3: Multiple Rules
- You preference Coke -> Orange juice -> Milk Tea
- You can choose at most 2 drinks
- You cannot choose Coke and Orange juice together
Step 1 and Step 2 are same as Example 1 & 2 so let’s jump to Step 3.
Step 3: Objective (Multiple rules)
Objective = -5C -3M -4O
Step 4: Rules
- At most 2 drinks:
C + M+ O ≤ 2 - Coke and Orange juice cannot both be chosen:
C + O ≤ 1
Step 5: Penalties
Convert rules:
P₁ for Rule 1:
(C + M + O — 2)²
P₂ for Rule 2:
(C + O — 1)²
Step 6: Final QUBO
Q = -5C -3M -4O + P₁(C + M + O- 2)² + P₂(C + O - 1)²
Mental Shortcut (Very Important)
Whenever you face a new problem, ask:
- What are my Yes / No choices?
- What do I want more or less of?
- What must never happen?
- Which option do I prefer more than the others?
If you can answer these three questions, you are already 80% done.
Final Thought
You’re no longer memorizing formulas. You’re thinking in patterns.
In the next chapter, we’ll:
- Visualize QUBO as graphs
- Understand interactions intuitively
- Prepare for real solvers
Keep going 👍



