Ruth buys 20 pencils for $20. some cost $4,some $0.25 and some $.50 each. at least one of each. How many of each price?

If there are x,y,z of each cost, we have

x+y+z = 20
4.00x + 0.25y + 0.50z = 20.00

Since we have only two equations, there are multiple solutions. Let's work with knowing x. Then we have

y = 14x-40
z = 60-15x

Since y and z must be positive, we need

x >= 3 and x < 4. So, x=3, and we have

3 at $4.00
2 at $0.25
15 at $0.50

To find out how many pencils of each price Ruth bought, we can set up a system of equations.

Let's assume Ruth bought x pencils at $4 each, y pencils at $0.25 each, and z pencils at $0.50 each.

According to the given information, we know that:

1) Ruth bought a total of 20 pencils.
2) The total cost of the pencils is $20.

Based on these two pieces of information, we can create the following equations:

Equation 1: x + y + z = 20 (total number of pencils)
Equation 2: 4x + 0.25y + 0.50z = 20 (total cost of the pencils)

Now, we need to solve these equations simultaneously to find the values of x, y, and z.

There are multiple methods to solve these equations, such as substitution or elimination. Let's use the elimination method here:

Multiplying Equation 1 by 4, we get:
4x + 4y + 4z = 80 (equation 3)

By subtracting Equation 3 from Equation 2, we can eliminate the x terms:
4x + 0.25y + 0.50z - (4x + 4y + 4z) = 20 - 80
-3.75y - 3.5z = -60

Dividing through by -3.5, we get:
y + z = 60/3.5
y + z = 17.14 (approximately)

Since y and z need to be whole numbers, let's try some values that add up to approximately 17.14 and satisfy Equation 1 (x + y + z = 20). We can start by assuming y = 17 and z = 0:

y = 17, z = 0
x + 17 + 0 = 20
x = 3

However, this does not satisfy Equation 2 (4x + 0.25y + 0.50z = 20), since 4x is greater than 20. Therefore, y cannot be 17. Let's try y = 16 and z = 1:

y = 16, z = 1
x + 16 + 1 = 20
x = 3

Now, let's check Equation 2:
4x + 0.25y + 0.50z = 20
4(3) + 0.25(16) + 0.50(1) = 20
12 + 4 + 0.50 = 20
16 + 0.50 = 20
16.50 = 20

The values of x = 3, y = 16, and z = 1 satisfy both Equation 1 and Equation 2.

Therefore, Ruth bought 3 pencils at $4 each, 16 pencils at $0.25 each, and 1 pencil at $0.50.