73.5k views
5 votes
While playing a real-time strategy game, Dan created military units for battle : long swordsmen, spearmen, and crossbowmen. Long swordsman require 20 units of food and 10 units of gold. Spearmen require 35 units of food and 40 units of wood. Crossbowmen require 40 units of wood and 30 units of gold. If Dan used 1300 units of gold, 2400 units of wood and 1375 units of food to create the units, how many of each type of military unit did he create?

1 Answer

4 votes

We can set up a system of equations to represent the number of each type of unit Dan created. Let x be the number of long swordsmen, y be the number of spearmen, and z be the number of crossbowmen. We know that the total number of units of each resource used to create the units must equal the amount of that resource that Dan has. We can write the following system of equations to represent this:

20x + 35y + 40z = 1375 (1)

10x + 40y + 30z = 2400 (2)

30z + 40z = 1300 (3)

Equation (1) represents the total number of units of food used to create the units, equation (2) represents the total number of units of wood used, and equation (3) represents the total number of units of gold used.

To solve this system of equations, we can use substitution. First, we'll solve for z in equation (3) by dividing both sides by 70:

z = 1300 / 70

z = 18.57

Since z represents the number of crossbowmen, it must be an integer. Since 18 is the largest integer less than 18.57, we know that Dan created 18 crossbowmen.

Now we can substitute 18 for z in equation (1) to find the number of long swordsmen Dan created:

20x + 35y + 40(18) = 1375

20x + 35y + 720 = 1375

20x + 35y = 655

We can divide both sides of this equation by 55 to solve for y:

(20x + 35y) / 55 = 655 / 55

y = 19

Since y represents the number of spearmen, it must be an integer. Since 19 is the largest integer less than 19.57, we know that Dan created 19 spearmen.

Now we can substitute 18 for z and 19 for y in equation (2) to find the number of long swordsmen Dan created:

10x + 40(19) + 30(18) = 2400

10x + 760 + 540 = 2400

10x = 1200

x = 120

Since x represents the number of long swordsmen, it must be an integer. Therefore, we know that Dan created 120 long swordsmen.

In total, Dan created 120 long swordsmen, 19 spearmen, and 18 crossbowmen.

User Keoros
by
4.7k points