Ready to begin
No records have been processed. Start with Next step.

Follow the dictionary as its keys and values change. Predict each lookup or update before revealing the next step.
Ready
No records have been processed. Start with Next step.
Predict the next key, whether it already exists, and the value that will be stored.
Use indices only as local labels: 1 Abhinav, 2 Akshaya, 3 Ahmed, 4 Srivatsan, 5 Advaith, 6 Vignesh. These are not bill numbers or permanent customer IDs. Hold one row fixed and advance the column; then move to the next row. Rows and columns now represent the SAME customer set, unlike the customer-by-category profile table.
| Row / column | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| 1 | — | 7 | 20 | 13 | 10 | 16 |
| 2 | — | — | 17 | 12 | 17 | 19 |
| 3 | — | — | — | 13 | 18 | 22 |
| 4 | — | — | — | — | 15 | 19 |
| 5 | — | — | — | — | — | 10 |
| 6 | — | — | — | — | — | — |
Only the upper triangle is stored here. A dash means “not stored in this triangular representation”, not zero distance and not missing source data. The omitted diagonal would be zero; the lower triangle would mirror the upper triangle. The lecturing discussion contains some spoken table slips; these entries are recomputed from the original five-category profiles.
foreach i in [1,2,3,4,5,6] {
foreach j in [1,2,3,4,5,6] {
if (i < j) {
record(i,j,distance(profile[i],profile[j]))
}
}
}Why is the count 15 rather than 30?
The 30 ordered non-self comparisons include both A–B and B–A. Each unordered pair is kept once.
Why exclude i=j?
It compares a customer with themselves and adds no information about similarity between distinct customers.
What does the entry row 2, column 4 mean?
Akshaya versus Srivatsan has Manhattan distance 12 in this five-category row-count representation.