David carried 29 pounds of kitty litter in bags into the basement. There were 4 pound bags and 7 pound bags. How many of each size bag did he carry?

He could have 3 7 lb bags and 2 4 lb bags.

Let's solve this problem step by step.

Let's assume David carried x bags weighing 4 pounds each and y bags weighing 7 pounds each.

According to the information given, the total weight of the 4-pound bags is 4x pounds, and the total weight of the 7-pound bags is 7y pounds.

Since David carried 29 pounds of kitty litter in bags, we can set up the following equation:

4x + 7y = 29

To solve this equation, we need to find integer values for x and y that satisfy the equation.

Now, let's try to find possible values for x and y that satisfy the equation.

If we let x = 0, then the equation becomes 7y = 29. Since 29 is not divisible by 7, this is not a valid solution.

If we let x = 1, then the equation becomes 4 + 7y = 29. Solving for y, we get y = 25/7. Since y should be an integer, this is not a valid solution either.

If we let x = 2, then the equation becomes 8 + 7y = 29. Solving for y, we get y = 21/7 = 3. This is a valid solution.

Therefore, David carried 2 bags weighing 4 pounds each and 3 bags weighing 7 pounds each.

To determine how many of each size bag David carried, let's use algebraic expressions.

Let's assume David carried x bags of 4 pounds and y bags of 7 pounds.

The total weight carried in 4-pound bags is given by 4x, and the total weight carried in 7-pound bags is given by 7y.

According to the problem, the total weight carried is 29 pounds.

So we have the equation:
4x + 7y = 29

Now, we need to find whole number solutions for x and y.

To solve this equation, we can use a method called "trial and error."

We start by assuming a value for x and calculate the corresponding value for y. We then check if the values of x and y satisfy the equation.

Let's start with x = 1:
If x = 1, then the equation becomes 4(1) + 7y = 29, which simplifies to 4 + 7y = 29.
By further simplifying the equation, we get 7y = 25.
And if we divide both sides of the equation by 7, we find that y = 25/7, which is not a whole number.

Let's try again with x = 2:
If x = 2, then the equation becomes 4(2) + 7y = 29, which simplifies to 8 + 7y = 29.
By further simplifying the equation, we get 7y = 21.
And if we divide both sides of the equation by 7, we find that y = 21/7, which simplifies to y = 3.
So, x = 2 and y = 3.

Therefore, David carried 2 bags of 4 pounds and 3 bags of 7 pounds.