(I’ve developed a new app and a DSL for “drawing” a bar model of Singapore Maths)
The following is the word problem in page 5 of Dr. Yeap Ban Har’s book “Bar Modeling-A problem-solving tool” (Thanks Dr. Yeap for allowing me to reference the examples in the book).
Jake is 3 years older than Kyla and 2 years younger than Larry. The total of their ages is 41 years. Find Jake’s age.
Now let’s draw a bar model by writing script with BarModelMaker. First add a bar for each of the 3 persons.
add bar title="Jake's age" add bar title="Kyla's age" add bar title="Larry's age"
Now add a box to each of the 3 bars to represent their ages. (We add a label above the box of the first bar with the question mark “?” as the title)
add box with label title=? position=above to bar[1]
add box to bar[2] add box to bar[3]
Add a box to the second bar to represent the 3 years that Jake is older than Kyla. Add a label above the box with the title of “3”.
add box size=3 stroke-style=dashed to bar[2] with label title=3 position=above
Add a constraint statement specifying that Jake is 3 years older than Kyla.
box[1] = box[2,1] + 3
Add a box to the third bar to represent the 2 years that Jake is younger than Larray. Add a label above the box with the title of “2”.
add box size=2 to bar[3] with label title=2 position=above
Add a constraint statement specifying that Jake is 2 years younger than Larry.
box[1] = box[3] - 2
Add a constraint statement specifying that their total age is 41. Note that Kyla’s age is represented by box[2,1]
box[1] + box[2,1] + box[3] = 41
Finally add a label to the 3 bars.
add label title=41 to bar[1 to 3]
We’ve drawn a bar model with 12 statements!
In this example, we’ve used only 4 types of statements:
- Add bar
- Add box
- Add label, and
- Constraint statement
Here is the script of the bar model:
add bar title="Jake's age" add bar title="Kyla's age" add bar title="Larry's age" add box with label title=? position=above to bar[1] add box to bar[2] add box size=3 stroke-style=dashed to bar[2] with label title=3 position=above add box to bar[3] box[1] = box[2,1] + 3 add box size=2 to bar[3] with label title=2 position=above box[1] = box[3] - 2 box[1] + box[2, 1] + box[3] = 41 add label title=41 to bar[1 to 3]

Leave a comment