Sub topic 4
Mapping Entities and Relations Between Domains
Assume you can describe a problem in plain language and understand basic problem-solving steps. This chapter adds a more precise method: represent an analogy as a mapping between entities and the relations connecting them.
From source to target
An analogy has two domains:
- The source domain is the familiar problem or system that offers a useful idea.
- The target domain is the problem you want to solve.
Suppose you want to improve software deployment. A possible source domain is a restaurant kitchen. The kitchen has orders, ingredients, preparation steps, quality checks, and delivery. The deployment system has requests, code changes, build steps, tests, and release.
The useful question is not “What looks like what?” It is “Which roles and relationships correspond?”
A mapping usually contains two parts:
- Entity correspondences, such as
order → code change. - Relation correspondences, such as
preparation precedes quality check → build precedes testing.
An entity is a distinct thing, role, or state in the problem. A relation is a connection or action involving entities, such as “precedes,” “contains,” or “checks.”
Build an explicit mapping
Start by listing the important entities and relations in the source. Then propose target counterparts. Keep the mapping small at first. Mapping every detail encourages accidental similarities.
| Source entity or relation | Target counterpart | Confidence |
|---|---|---|
| customer order | code change request | High |
| preparation | build process | Medium |
| quality check | automated tests | High |
| kitchen timing | deployment scheduling | Low |
The confidence column matters because an analogy is a hypothesis, not proof. A kitchen can delay an order because an ingredient is missing. A build can fail because a dependency is incompatible. These events share a general pattern, but their causes and remedies may differ.
The following program transfers relations mechanically. It creates candidate claims; it does not establish that those claims are true.
# Source domain: planets orbiting a sun
source_relations = [
("attracts", "sun", "planet"),
("more_massive_than", "sun", "planet"),
("orbits", "planet", "sun"),
]
# Proposed entity mapping to a target domain
mapping = {"sun": "nucleus", "planet": "electron"}
def transfer(relations, entity_map):
"""Rewrite source relations using target entities."""
return [
(relation, entity_map[first], entity_map[second])
for relation, first, second in relations
]
candidates = transfer(source_relations, mapping)
for candidate in candidates:
print(candidate)The output includes “electron orbits nucleus.” That wording may be a useful starting point, but it can mislead if it suggests a miniature planetary system. The target requires a different physical model. The mapping transfers a relationship pattern, not every property of the source.
Check the mapping before using it
For each proposed correspondence, ask:
- Do the entities play similar roles?
- Does the relation have the same direction?
- Does the relation have the same meaning or only a similar name?
- What target constraints make the correspondence fail?
- Which source details should be discarded?
A relation such as “A checks B before B is released” may transfer well from a kitchen to deployment. A relation such as “A has a physical temperature” probably does not. Mapping the wrong relation produces an analogy that sounds persuasive but gives poor decisions.
A practical mapping routine
Use this sequence when borrowing an idea:
- Name the target problem without proposing a solution.
- List three to five important target entities and relations.
- Find a source with a similar relationship pattern.
- Write entity pairs and relation pairs explicitly.
- Transfer only the source rules supported by those pairs.
- Test each candidate against target constraints.
- Keep, modify, or reject each transferred idea.
Exercise
A team wants to reduce defects in a data-import pipeline. It compares the pipeline with airport security. What relation is more useful to map: “both involve people” or “items are checked before entering a controlled area”?
Show answer
“Items are checked before entering a controlled area” is more useful because it describes a structural relation that can suggest validation before data reaches the main system.