2022-04-13

Apr 13 In-Class Exercise Thread.

Please post your solutions to the Apr 13 In-Class Exercise to this thread.
Best,
Chris
Please post your solutions to the Apr 13 In-Class Exercise to this thread. Best, Chris

-- Apr 13 In-Class Exercise Thread
i = 1
m_1 = 42/2 = 21
call EE(21, 2)
call EE(2, 1)
call EE(1, 0) -> return (1, 1, 0)
EE(2, 1) -> return (1, 0, 1 - floor(2/1) * 0) = (1, 0, 1)
EE(21, 2) -> return (1, 1, 0 - floor(21/2) * 1) = (1, 1, -10)
21 * 1 - 10 * 2 = 1 -> 21* 1 = 1 mod 2
t_1 = 21^-1 = 1 mod 2
c_1 = 21 * 1 = 21

i = 2
m_2 = 42/3 = 14
call EE(14, 3)
call EE(3, 2)
call EE(2, 1)
call EE(1, 0) -> return (1, 1, 0)
EE(2, 1) -> return (1, 0, 1 - floor(2/1) * 0) = (1, 0, 1)
EE(3, 2) -> return (1, 1, 0 - floor(3/2) * 1) = (1, 1, -1)
EE(14, 3) -> return (1, -1, 1 - floor(14/3) * -1) = (1, -1, 5)
14 * -1 + 5 * 3 = 1
t_2 = (-14)^-1 = 1 mod 3
c_2 = -14 * 1 = -14

i = 3
m_3 = 42/7 = 6
call EE(6, 7)
call EE(7, 6)
call EE(6, 1)
call EE(1, 0) -> return (1, 1, 0)
EE(6, 1) -> return (1, 0, 1 - floor(6/1) * 0) = (1, 0, 1)
EE(7, 6) -> return (1, 1, 0 - floor(7/6) * 1) = (1, 1, -1)
EE(6, 7) -> return (1, -1, 1 - floor(6/7) * -1) = (1, -1, 2)
6 * -1 + 2 * 7 = 8 = 1 mod 7
t_3 = (-6)^-1 = 1 mod 7
c_3 = -6 * 1 = -6

a = 1 * 21 - 2 * 14 - 5 * 6 = 21 - 28 - 30 = -37 mod 42 = 5 mod 42
check 5 = 1 mod 2, 5 = 2 mod 3, 5 = 5 mod 7
i = 1 m_1 = 42/2 = 21 call EE(21, 2) call EE(2, 1) call EE(1, 0) -> return (1, 1, 0) EE(2, 1) -> return (1, 0, 1 - floor(2/1) * 0) = (1, 0, 1) EE(21, 2) -> return (1, 1, 0 - floor(21/2) * 1) = (1, 1, -10) 21 * 1 - 10 * 2 = 1 -> 21* 1 = 1 mod 2 t_1 = 21^-1 = 1 mod 2 c_1 = 21 * 1 = 21 ---- i = 2 m_2 = 42/3 = 14 call EE(14, 3) call EE(3, 2) call EE(2, 1) call EE(1, 0) -> return (1, 1, 0) EE(2, 1) -> return (1, 0, 1 - floor(2/1) * 0) = (1, 0, 1) EE(3, 2) -> return (1, 1, 0 - floor(3/2) * 1) = (1, 1, -1) EE(14, 3) -> return (1, -1, 1 - floor(14/3) * -1) = (1, -1, 5) 14 * -1 + 5 * 3 = 1 t_2 = (-14)^-1 = 1 mod 3 c_2 = -14 * 1 = -14 ---- i = 3 m_3 = 42/7 = 6 call EE(6, 7) call EE(7, 6) call EE(6, 1) call EE(1, 0) -> return (1, 1, 0) EE(6, 1) -> return (1, 0, 1 - floor(6/1) * 0) = (1, 0, 1) EE(7, 6) -> return (1, 1, 0 - floor(7/6) * 1) = (1, 1, -1) EE(6, 7) -> return (1, -1, 1 - floor(6/7) * -1) = (1, -1, 2) 6 * -1 + 2 * 7 = 8 = 1 mod 7 t_3 = (-6)^-1 = 1 mod 7 c_3 = -6 * 1 = -6 ---- a = 1 * 21 - 2 * 14 - 5 * 6 = 21 - 28 - 30 = -37 mod 42 = 5 mod 42 check 5 = 1 mod 2, 5 = 2 mod 3, 5 = 5 mod 7

-- Apr 13 In-Class Exercise Thread
m1= 21, m2=14, m3= 6 Let's find ti finding t1: 21.t1= 1 mod 2 t1=1 t2: 14.t2= 1 mod 3 t2=2 t3: 6.t3= 1 mod 7 t3=6 calculating ci: c1= 21 c2=28 c3=36 finding a: a= 1.21+2.28+ 5. 36 a= 257 257 mod 42= 5
check: 5mod2=1, 5 mod3=2, 5mod 7= 5
(Edited: 2022-04-13)
m1= 21, m2=14, m3= 6 Let's find ti finding t1: 21.t1= 1 mod 2 t1=1 t2: 14.t2= 1 mod 3 t2=2 t3: 6.t3= 1 mod 7 t3=6 calculating ci: c1= 21 c2=28 c3=36 finding a: a= 1.21+2.28+ 5. 36 a= 257 257 mod 42= 5 check: 5mod2=1, 5 mod3=2, 5mod 7= 5

-- Apr 13 In-Class Exercise Thread
a = 1 mod 2
a = 2 mod 3
a = 5 mod 7 
 
m1 = 42/2 = 21
m2 = 42/3 = 14
m3 = 42/7 = 6 
 
EE(21,2) = EE(2, 1) = EE(1, 0) -> (1, 1, 0) -> (1, 0, 1) -> (1, 1, -10)
EE(14,3) = EE(3, 2) = EE(2, 1) = EE(1, 0) -> (1, 1, 0) -> (1, 0, 1) -> (1, 1, -1) -> (1, -1, 5)
EE(7,6) = EE(6, 1) = EE(1, 0) -> (1, 1, 0) -> (1, 0, 1) -> (1, 1, -1) 
 
c1 = 21*1 = 21
c2 = 14*-1 = -14
c3 = 6*-1 = -6 
 
a = 1*21 + 2*-14 + 5*-6 = -37
a = -37 mod 42 = 5 mod 42 
 
we can see that 5 = 1 mod 2, 5 = 2 mod 3, 5 = 5 mod 7
<pre> a = 1 mod 2 a = 2 mod 3 a = 5 mod 7 m1 = 42/2 = 21 m2 = 42/3 = 14 m3 = 42/7 = 6 EE(21,2) = EE(2, 1) = EE(1, 0) -> (1, 1, 0) -> (1, 0, 1) -> (1, 1, -10) EE(14,3) = EE(3, 2) = EE(2, 1) = EE(1, 0) -> (1, 1, 0) -> (1, 0, 1) -> (1, 1, -1) -> (1, -1, 5) EE(7,6) = EE(6, 1) = EE(1, 0) -> (1, 1, 0) -> (1, 0, 1) -> (1, 1, -1) c1 = 21*1 = 21 c2 = 14*-1 = -14 c3 = 6*-1 = -6 a = 1*21 + 2*-14 + 5*-6 = -37 a = -37 mod 42 = 5 mod 42 we can see that 5 = 1 mod 2, 5 = 2 mod 3, 5 = 5 mod 7 </pre>

-- Apr 13 In-Class Exercise Thread
Resource Description for Screenshot 2022-04-13 182303.jpg
((resource:Screenshot 2022-04-13 182303.jpg|Resource Description for Screenshot 2022-04-13 182303.jpg))

-- Apr 13 In-Class Exercise Thread
Resource Description for 20220413_211144.jpg
((resource:20220413_211144.jpg|Resource Description for 20220413_211144.jpg))

-- Apr 13 In-Class Exercise Thread
((resource:in class 9.jpg|Resource Description for in class 9.jpg))
2022-04-14

-- Apr 13 In-Class Exercise Thread
Resource Description for april14.jpeg
((resource:april14.jpeg|Resource Description for april14.jpeg))

-- Apr 13 In-Class Exercise Thread
Resource Description for WhatsApp Image 2022-04-14 at 11.42.40 AM.jpeg
((resource:WhatsApp Image 2022-04-14 at 11.42.40 AM.jpeg|Resource Description for WhatsApp Image 2022-04-14 at 11.42.40 AM.jpeg))

-- Apr 13 In-Class Exercise Thread
Resource Description for 6.JPG
((resource:6.JPG|Resource Description for 6.JPG))
[ Next ]
X