01 / 20

Word Problems to
Discrete Structures

Learn how to translate real-world scenarios into graphs, sets, and relations: the foundational skill for solving discrete math problems.

Discrete Math

What Are Discrete Structures?

Discrete structures are mathematical models used to represent objects and the relationships between them. Unlike continuous math (calculus), discrete math deals with countable, distinct elements.

Graphs
Vertices connected by edges: model friendships, routes, dependencies.
Sets
Collections of distinct objects: model groups, categories, membership.
Relations
Ordered pairs linking elements: model ordering, equivalence, mapping.

Why Translate Word Problems?

Word problems describe real situations in natural language. To solve them rigorously, we need to extract the mathematical structure hidden inside the words. This lets us apply algorithms, theorems, and proofs that only work on formal objects.

The Three Core Structures

Graph A B C
\( G = (V, E) \)
Set 1 2 3 4 5 A B
\( A \cap B = \{3\} \)
Relation x y z
\( R \subseteq A \times B \)

Formal Definitions

1
Graph: \( G = (V, E) \) where \( V \) is a set of vertices and \( E \subseteq \binom{V}{2} \) is a set of edges (unordered pairs). A directed graph uses \( E \subseteq V \times V \).
2
Set: A well-defined collection of distinct objects, \( S = \{a, b, c, \ldots\} \). Key operations: \( \cup \) (union), \( \cap \) (intersection), \( \setminus \) (difference), \( \subseteq \) (subset).
3
Relation: \( R \subseteq A \times B \). If \( (a, b) \in R \), we say \( a \) is related to \( b \). Properties include reflexivity, symmetry, and transitivity.

Modeling with Graphs

Alice Bob Cara Dan Eve Solid = friends Dashed = acquaintances

Modeling with Sets

Chess Math Ali Bo Sam Jo Max Liz
\( \text{Chess} \cap \text{Math} = \{\text{Sam, Jo}\} \)

Graphs vs. Sets vs. Relations

Graph Set Relation
Focus Connections Membership Ordered pairs
Notation \( G = (V, E) \) \( S = \{a, b, \ldots\} \) \( R \subseteq A \times B \)
Direction Optional (digraph) None Always directed
Key Question "Who connects to whom?" "Who belongs where?" "What maps to what?"
Example Road network Student rosters Course prerequisites

How to Translate: Step-by-Step

1
Identify the objects. What are the "things" in the problem? People, cities, tasks, items? These become vertices or set elements.
2
Identify the relationships. Are objects connected (graph)? Grouped (set)? Ordered (relation)? Look for keywords like "knows," "belongs to," "comes before."
3
Choose the structure. If connections matter: graph. If grouping or counting matters: set. If order or mapping matters: relation.
4
Write the formal definition. List \( V, E \) for graphs; enumerate set elements with \( \{ \} \); list ordered pairs for relations.
5
Verify against the problem. Does every fact in the word problem have a counterpart in your structure? If not, refine.

Example 1: Graph from a Network

Problem: "Four computers (P, Q, R, S) are networked. P connects to Q and R. Q connects to S. R connects to S." Model this as a graph.

P Q R S P-Q P-R Q-S R-S

Example 2: Sets from Surveys

Problem: "In a class of 30 students, 18 study Spanish, 14 study French, and 6 study both. How many study neither?"

Spanish French 12 6 8 4 Neither

Example 3: Relations from Prerequisites

Problem: "To take Calculus, you need Algebra. To take Algebra, you need Pre-Algebra. To take Statistics, you need Algebra." Model as a relation.

Pre-Algebra Algebra Calculus Statistics prereq prereq prereq

Keyword Signals for Each Structure

Keyword in Problem Structure What to Build
"is friends with," "connects to" Graph (undirected) Edge \( \{u,v\} \)
"reports to," "leads to" Graph (directed) Arc \( (u,v) \)
"belongs to," "is a member of" Set \( x \in S \)
"how many in both / neither" Set operations \( |A \cap B|, |A \cup B| \)
"must come before," "is required for" Relation \( (a,b) \in R \)
"is equivalent to," "is the same as" Equivalence relation \( a \sim b \)

Relation Properties to Identify

Reflexive
\( \forall a \in A: (a,a) \in R \). "Every element relates to itself." Example: \( x \le x \).
Symmetric
If \( (a,b) \in R \), then \( (b,a) \in R \). "Friendship is mutual." Undirected graphs encode this.
Transitive
If \( (a,b) \in R \) and \( (b,c) \in R \), then \( (a,c) \in R \). "If A beats B and B beats C, then A beats C."

Common Mistakes

✕ Confusing Edges with Arcs
Using an undirected graph when the problem requires direction (e.g., "A reports to B" needs a directed edge, not undirected).
✕ Double-Counting in Sets
Forgetting to subtract \( |A \cap B| \) in inclusion-exclusion. If 10 play soccer and 8 play basketball with 3 in both, the union is \( 10 + 8 - 3 = 15 \), not 18.
✕ Missing Self-Loops
Forgetting reflexive pairs when modeling equivalence relations. "Is the same age as" requires every person to relate to themselves: \( (a,a) \).

Translation Summary

Step Action Output
1 Read and identify objects List of nouns / entities
2 Identify relationships Connections, groupings, or orderings
3 Choose structure Graph, Set, or Relation
4 Formalize \( G=(V,E) \), \( S=\{\ldots\} \), or \( R \subseteq A \times B \)
5 Verify Check every fact maps to the structure

Question 1 of 5

"Five cities are connected by highways. City A connects to B and C. City B connects to D. City C connects to D and E." What is the degree of vertex D?

Question 2 of 5

In a survey, \( |A| = 20 \), \( |B| = 15 \), and \( |A \cup B| = 28 \). What is \( |A \cap B| \)?

Question 3 of 5

"Task X must be done before Task Y, and Task Y must be done before Task Z." Which discrete structure best models this?

Question 4 of 5

A relation \( R \) on set \( \{1,2,3\} \) is defined as \( R = \{(1,1),(2,2),(3,3),(1,2),(2,1)\} \). Which properties does \( R \) have?

Question 5 of 5

"A school has 40 students. 25 are in Band, 20 are in Choir, and 10 are in both. A student is chosen at random. What is the probability they are in neither Band nor Choir?"