TOPSIS Algorithm
The Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) is a multi-criteria decision analysis method. It suggests that the chosen alternative should have the shortest geometric distance from the positive ideal solution and the longest geometric distance from the negative ideal solution.
Mathematical Steps:
\[ X = (x_{ij})_{m \times n} \]
\[ r_{ij} = \frac{x_{ij}}{\sqrt{\sum_{i=1}^{m} x_{ij}^2}} \]
\[ v_{ij} = w_j \times r_{ij} \]
\[ A^* = \{ \max(v_{ij} | j \in J), \min(v_{ij} | j \in J’) \} \] \[ A^- = \{ \min(v_{ij} | j \in J), \max(v_{ij} | j \in J’) \} \]
\[ S_i^* = \sqrt{\sum (v_{ij} – v_j^*)^2} , \quad S_i^- = \sqrt{\sum (v_{ij} – v_j^-)^2} \]
\[ C_i^* = \frac{S_i^-}{S_i^* + S_i^-} \]
Real-World Application: Selecting a Smartphone
Goal: Select the best smartphone among 4 alternatives based on 4 criteria: Price (Cost), Battery (Benefit), RAM (Benefit), and Camera (Benefit).
| Model | Price ($) | Battery (mAh) | RAM (GB) | Camera (MP) |
|---|---|---|---|---|
| Phone A | 800 | 4000 | 8 | 48 |
| Phone B | 600 | 5000 | 6 | 64 |
| Phone C | 1200 | 4500 | 12 | 108 |
| Phone D | 500 | 3500 | 4 | 32 |
The Calculation Result:
After applying normalization and weighing (Equal weights of 0.25), we calculate the Performance Score (C):
- Phone C (Best performance but expensive)
- Phone B (Great battery/price balance)
In this scenario, Phone B often wins because it is closest to the ideal battery life while being far from the “worst” price.
Interactive TOPSIS Calculator
Enter values for 4 alternatives and 4 attributes.
| Weights → | ||||
|---|---|---|---|---|
| Alt \ Attr | Attr 1 | Attr 2 | Attr 3 | Attr 4 |
| Alt 1 | ||||
| Alt 2 | ||||
| Alt 3 | ||||
| Alt 4 |
Designed by: Dr. M.U. Mirza
Mathematical Researcher & Educator