Question

Difficulty: MediumSystems of Linear Inequalities in Two Variables

A software programmer is writing test cases for a new application. The programmer must write at least 15 test cases in total, consisting of xx unit tests and yy integration tests. Each unit test takes 10 minutes to write, and each integration test takes 30 minutes to write. If the programmer has at most 300 minutes to write all the test cases, what is the maximum number of integration tests the programmer can write?

Answer: 7

Answer

7

Step-by-Step Solution

1
Set up the system of inequalities representing the given constraints.
x+y15x + y \ge 15 and 10x+30y30010x + 30y \le 300
The total number of tests must be at least 15, and the total time taken by writing xx unit tests (10 minutes each) and yy integration tests (30 minutes each) cannot exceed 300 minutes.
2
Simplify the time inequality and combine it with the total test count constraint to isolate yy.
x+3y30x + 3y \le 30. Substituting x15yx \ge 15 - y into this inequality yields (15y)+3y30    15+2y30(15 - y) + 3y \le 30 \implies 15 + 2y \le 30.
Simplification and substitution help find the upper bound for the number of integration tests.
3
Solve for yy and determine the maximum integer value.
2y15    y7.52y \le 15 \implies y \le 7.5. The largest integer satisfying this inequality is 7.
The number of integration tests must be a whole number, so we round down to the nearest integer.
4
Verify that a valid integer number of unit tests (xx) exists when y=7y = 7.
When y=7y = 7, we get x157    x8x \ge 15 - 7 \implies x \ge 8 and x+3(7)30    x9x + 3(7) \le 30 \implies x \le 9. The integers x=8x = 8 and x=9x = 9 both satisfy the conditions.
We must confirm that the maximum value of yy is achievable with an integer number of unit tests.

Key Concept

Systems of Linear Inequalities in Two Variables
Rate this question