Real-world problems are rarely modelled by a single ADT. Complex information has multiple dimensions that are best captured by combining multiple ADTs, each handling a different aspect of the data.
KEY TAKEAWAY: Complex problems require composite data models. The skill is identifying which aspects of the problem each ADT models and how they interact.
Problem: Represent a social network where each person has attributes (name, age, location) and connections to friends.
Combination:
- Graph ADT: Each node = a person; edges = friendships (undirected)
- Dictionary ADT: Each node value = dictionary mapping attribute names to values
graph = {
'Alice': [('Bob', 1), ('Carol', 1)],
'Bob': [('Alice', 1)],
'Carol': [('Alice', 1)]
}
person_data = {
'Alice': {'age': 25, 'city': 'Melbourne'},
'Bob': {'age': 30, 'city': 'Sydney'},
'Carol': {'age': 22, 'city': 'Melbourne'}
}
Dijkstra’s algorithm itself uses a combination of ADTs:
- Graph ADT: Store the network (vertices, weighted edges)
- Priority Queue ADT: Always select the closest unvisited vertex
- Dictionary ADT: Store known shortest distances from source
- Set ADT: Track which vertices have been finalised
Each ADT serves a specific role in the algorithm — none could replace another.
Problem: Schedule tasks where some tasks must complete before others, and tasks have priorities.
Combination:
- Graph ADT (DAG): Model dependencies (task A → task B means A must precede B)
- Priority Queue ADT: Among tasks with all prerequisites met, process highest priority first
- Set ADT: Track which tasks have been completed
Problem: Manage patients arriving at an emergency department, with triage priority, patient records, and wait-time tracking.
Combination:
- Priority Queue ADT: Triage patients by urgency
- Dictionary ADT: Map patient ID → patient record (name, diagnosis, medications)
- Queue ADT: Patients at the same priority level are seen in arrival order
- List ADT: Ordered history of treatments for each patient
When communicating a combined ADT design, specify:
1. Which ADTs are used
2. What each ADT represents in the problem domain
3. How they interact (what connects them)
4. Why each ADT was chosen (what operations it supports)
EXAM TIP: VCAA exam questions may ask you to “describe how complex information can be represented by a combination of ADTs.” Structure your answer: (1) list each ADT used, (2) state what it models, (3) explain how they connect, (4) mention key operations.