Division Algorithm: Find q & r for a=-5286 and b=19

In summary, the conversation discusses finding the quotient and remainder using the division algorithm. The process involves using the values a = -5286 and b = 19 and applying the formula (-q)b - r (where 0 <= r < b) to find the values of q and r. The conversation concludes with a reminder to actually divide to find the correct values.
  • #1
Caldus
106
0
If I have to find the quotient q and the remainder r and:

a = -5286
b = 19

How do I go about writing down the steps for this algorithm? I know what the answer will be, but I need to be able to use the division algorithm to prove my answer. Like I know if:

b > 0 and a < 0 (which in this case is true),

then since -a > 0, a = (-q)b - r (where 0 <= r < b).

But how would I know that q is equal to -279 and that the remainder is 15? (Pretending that I didn't the know answer already.)

Thanks.
 
Mathematics news on Phys.org
  • #2
I have absolutely no idea how you would "know that q is equal to
-279 and that the remainder is 15" since -(-279)(19)-15 is NOT
-5286 (nor is (-279)(19)-15). You have your signs mixed up.

Did you try actually dividing? That is, after all what the division algorithm is!
 
  • #3


To find the quotient q and remainder r using the division algorithm, follow these steps:

Step 1: Start by writing down the given values for a and b.

a = -5286
b = 19

Step 2: Determine if b is greater than 0 and if a is less than 0. In this case, b > 0 and a < 0, so we can proceed with the algorithm.

Step 3: Since -a > 0, we can rewrite the equation as -a = (-q)b - r.

Step 4: Divide both sides of the equation by b to isolate q. This gives us: q = (-a)/b + (r/b).

Step 5: Since we know that the remainder r must be less than b, we can set an initial value for r as 0 and increase it until we find a value that satisfies the remainder condition (0 <= r < b).

Step 6: Use the given values for a and b to substitute into the equation for q. This gives us: q = (-(-5286))/19 + (r/19).

Step 7: Simplify the equation to get q = 278 + (r/19).

Step 8: Now, we can start increasing the value of r until we find a value that satisfies the remainder condition. In this case, we can see that r = 15 satisfies the condition as it is greater than or equal to 0 and less than 19.

Step 9: Substitute the value of r = 15 into the equation for q to get: q = 278 + (15/19).

Step 10: Simplify to get the final answer: q = 278 and r = 15.

Therefore, the quotient q is -279 and the remainder r is 15. This can be proven by substituting these values back into the original equation: -a = (-q)b - r. We get: -(-5286) = (-(-279))(19) - 15, which simplifies to 5286 = 5286, proving that our values for q and r are correct.
 

1. What is the division algorithm?

The division algorithm is a method used to find the quotient and remainder when dividing two integers.

2. How is the division algorithm used to find q & r for a=-5286 and b=19?

The division algorithm is used by dividing a by b, and the quotient is the value of q and the remainder is the value of r. In this case, -5286 divided by 19 would result in a quotient of -278 and a remainder of 17, so q = -278 and r = 17.

3. Can the division algorithm be used for any two integers?

Yes, the division algorithm can be used for any two integers, including negative numbers.

4. Is the division algorithm the same as long division?

No, the division algorithm is a more general method for finding the quotient and remainder, while long division is a specific method used for dividing larger numbers by hand.

5. Are there any limitations to the division algorithm?

One limitation of the division algorithm is that it can only be used for integer division, meaning that the quotient and remainder will always be whole numbers. It also cannot be used for division by 0.

Similar threads

  • General Math
Replies
3
Views
1K
Replies
4
Views
1K
  • General Math
Replies
12
Views
1K
Replies
1
Views
830
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • General Math
Replies
6
Views
2K
  • General Math
Replies
1
Views
2K
  • General Math
Replies
2
Views
2K
  • General Math
Replies
13
Views
1K
Replies
1
Views
708
Back
Top