Joanie wants to mail a package that requires $1.61 in postage. If she has only 5 cent and 8 cent stamps. what is the smallest number of stamps she could use that would total exactly $1.61?

number of 5 cent stamps --- x

number of 8 cents stamps ---- y

5x + 8y = 161
y = (161 - 5x)/8 , clearly 0 < x < 33
after a few tries I got
x = 5, y = 17
since the slope is -5/8, other values are:
x = 13, y = 12
x = 21 y = 7
x = 29 , y = 2

the smallest sum is 5+17 = 22

To find the smallest number of stamps that Joanie could use to total exactly $1.61, we can try out different combinations of 5 cent and 8 cent stamps until we reach the desired total.

Let's start with the assumption that Joanie uses all 5 cent stamps. We can calculate the total value of the stamps by multiplying the number of stamps by their individual value:

5 cent stamps: $0.05 each

Let's represent the number of 5 cent stamps as "x". Therefore, the total value of 5 cent stamps would be 0.05 * x.

Next, we'll calculate the total value of the 8 cent stamps:

8 cent stamps: $0.08 each

Let's represent the number of 8 cent stamps as "y". Therefore, the total value of 8 cent stamps would be 0.08 * y.

Now, to find the combination that sums up to $1.61, we need to solve the equation formed by adding the total values of the stamps:

0.05 * x + 0.08 * y = $1.61

Since we're looking for the smallest number of stamps, we can use a trial and error method to find the appropriate values for "x" and "y" that satisfy the equation.

Let's start by assuming that Joanie uses all 5 cent stamps. In this case, the equation becomes:

0.05 * x + 0.08 * y = $1.61

0.05 * x + 0.08 * y = $1.61

By substitution, we can rewrite the equation as:

0.05 * x + 0.08 * (54 - x) = $1.61

Simplifying the equation:

0.05 * x + 4.32 - 0.08 * x = $1.61

-0.03 * x = $1.61 - $4.32

-0.03 * x = -$2.71

x = -$2.71 / -0.03

x ≈ 90.33

Since we can't have a fraction of a stamp, we need to adjust the number of 5 cent stamps. By decreasing the number of 5 cent stamps by one, we increase the number of 8 cent stamps by one to maintain the total value of the stamps:

x = 90
y = 54 - x
y = 54 - 90
y ≈ -36

Again, we can't have a negative number of stamps. Therefore, the assumption that Joanie uses all 5 cent stamps is invalid.

Now let's assume that Joanie uses all 8 cent stamps. In this case, the equation becomes:

0.05 * x + 0.08 * y = $1.61

By substitution, we can rewrite the equation as:

0.05 * (201 - y) + 0.08 * y = $1.61

Simplifying the equation:

0.05 * 201 - 0.05 * y + 0.08 * y = $1.61

10.05 - 0.05 * y + 0.08 * y = $1.61

0.03 * y = $1.61 - $10.05

0.03 * y = -$8.44

y = -$8.44 / 0.03

y ≈ -281.33

Again, we can't have a fraction of a stamp. Therefore, the assumption that Joanie uses all 8 cent stamps is also invalid.

Since neither assumption is valid, it seems like there is no possible combination of 5 cent and 8 cent stamps that can reach the desired total of $1.61 exactly.

To find the smallest number of stamps Joanie can use to total exactly $1.61, we need to consider the denominations of the stamps she has (5 cents and 8 cents).

One way to approach this problem is by using a brute-force method, trying out different combinations of stamps until we find one that adds up to $1.61.

Let's start by assuming Joanie uses x 5 cent stamps and y 8 cent stamps. We need to find values of x and y that satisfy the equation:

x * 0.05 + y * 0.08 = 1.61

Since Joanie cannot have a fractional number of stamps, x and y must be integers. We can iterate through the possible values of x and y and check if any combination satisfies the equation.

Here's the step-by-step process to find the answer:

1. Initialize x and y as 0.
2. Start a loop for x from 0 to the maximum possible value, which would be 1.61 / 0.05 = 32.
3. Inside the x loop, start a nested loop for y from 0 to the maximum possible value, which would be 1.61 / 0.08 = 20.
4. Calculate the total value of the stamps by multiplying the number of 5 cent stamps (x) by 0.05 and adding it to the number of 8 cent stamps (y) multiplied by 0.08.
5. If the total value equals 1.61, we have found a combination of stamps that works. Print the values of x and y.
6. Repeat steps 4 and 5 until we find the smallest combination of stamps that adds up to 1.61.

After going through this process, we find that the smallest number of stamps Joanie could use that would total exactly $1.61 is:

x = 13 (13 * 0.05 = $0.65)
y = 13 (13 * 0.08 = $1.04)
Total = $1.69

However, this combination exceeds $1.61. It means there is no combination of 5 cent and 8 cent stamps that adds up exactly to $1.61.