How to solve for b in a = b mod q

  • Thread starter Thread starter John Harris
  • Start date Start date
  • Tags Tags
    Modulus
Click For Summary

Homework Help Overview

The discussion revolves around solving for b in the equation a = b mod q, exploring the properties of modular arithmetic and the implications of the mod operation in equations.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants suggest experimenting with specific values for a and q to understand the relationship and identify potential values for b. There is discussion about generalizing findings from specific examples and questioning the properties of modular equations.

Discussion Status

Participants are actively engaging with the problem, with some providing examples and others expressing confusion about the transition from specific cases to general solutions. There is a recognition of the complexity of the mod operation and its implications in the context of the equations discussed.

Contextual Notes

Some participants note the distinction between equality and congruence in modular arithmetic, raising questions about the assumptions underlying the equations and the properties of the variables involved.

John Harris
Messages
19
Reaction score
1

Homework Statement


How do I solve for b in a= b mod q

Homework Equations


I'm not sure what mod operations for equations are allowed. I would like to know.

The Attempt at a Solution


Unsure how to move the mod q to the other side.
 
Physics news on Phys.org
Back up a bit:
Pick some numbers for a and q, and see what values of b will make the relation true.
i.e. 1 = b mod 2

Try for some other numbers?
What do you notice?
 
Simon Bridge said:
Back up a bit:
Pick some numbers for a and q, and see what values of b will make the relation true.
i.e. 1 = b mod 2

Try for some other numbers?
What do you notice?
Got to make sure I work for it... Any odd number. b divides q-a
 
Good - you just solved the problem for a specific example.
Next step is to see if you can generalize.
 
Simon Bridge said:
Good - you just solved the problem for a specific example.
Next step is to see if you can generalize.
b=qk+a

But I don't understand how they did it here. They solved for x without removing the mod or adding a k.
s = k-1 (H(m) + x*r) mod q
x
= ((s * k) – H(m)) * r-1 mod q
 
Go through it one step at a time - make sure you know what each bit means.
 
s = k-1 (H(m) + x*r) mod q

I see how they got it to ((s * k) – H(m)) * r-1= x mod q
But I don't see how they get it farther. If I knew I wouldn't be asking for help. I'm just asking for the simple equation property that they used. This isn't a HW assignment. I don't have time to derive it myself. What you asked me to do hasn't helped.
 
John Harris said:
s = k-1 (H(m) + x*r) mod q

I see how they got it to ((s * k) – H(m)) * r-1 = x mod q
But I don't see how they get it farther. If I knew I wouldn't be asking for help. I'm just asking for the simple equation property that they used. This isn't a HW assignment. I don't have time to derive it myself. What you asked me to do hasn't helped.
Are you saying that you can get from
s = k -1 (H(m) + x*r ) mod q
to
((s*k ) – H(m)) * r -1 = x mod q ,​

but you can't solve that for x ?

Well, if a ≡ b mod q, then b ≡ a mod q . Right?
 
SammyS said:
Are you saying that you can get from
s = k -1 (H(m) + x*r ) mod q
to
((s*k ) – H(m)) * r -1 = x mod q ,​

but you can't solve that for x ?

Well, if a ≡ b mod q, then b ≡ a mod q . Right?

But this is an equality not a congruence.
3=19 mod 8
19≠3mod 8
 
  • #10
John Harris said:
But this is an equality not a congruence.
3=19 mod 8
19≠3mod 8
Yes, I overlooked the ' = ' sign.
 
Last edited:
  • #11
John Harris said:
But this is an equality not a congruence.
3=19 mod 8
19≠3mod 8
True, but the solution to the equation, ##\ 3=x\mod 8 \,,\ ## is ##\ x=3+8n \ ##.

The mod function is periodic, so there are many solutions for x . One of the solutions is 3 itself. For that solution it is true that ##\ x=3\mod 8 \ ##.
But I don't understand how they did it here. They solved for x without removing the mod or adding a k.
s = k-1 (H(m) + x*r) mod q
x
= ((s * k) – H(m)) * r-1 mod q
What they are doing here is certainly strange. What information, if any, do we know regarding, H(m), r, and k ?
 

Similar threads

Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 28 ·
Replies
28
Views
6K
Replies
25
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
1
Views
2K