Show, step by step, how the stack-based algorithm will transform
the expression (1 + 2) * (7 − 2) into a postfix expression, and
then how a second stack-based algorithm will compute the value of
this postfix expression.
Strassen’s algorithm for matrix multiplication relies on using 7
multiplications (instead of 8 as in the straightforward algorithm)
to multiply a pair of 2 by 2 matrices. Explain why it is not
possible to further reduce this number, 7, to anything less than 4,
in multiplying a pair of 2 by 2 matrices.
Strassen’s algorithm for matrix multiplication relies on using 7
multiplications (instead of 8 as in the straightforward algorithm)
to multiply a pair of 2 by 2 matrices. Explain why
it is not possible to further reduce this number, 7, to anything
less than 4, in multiplying a pair of 2 by 2 matrices.
a. Using the Euclidean Algorithm and Extended Euclidean
Algorithm, show that gcd(99; 5) = 1 and find integers s1 and t1
such that 5s1 + 99t1 = 1.
[Hint: You should find that 5(20) + 99(?1) = 1]
b. Solve the congruence 5x 17 (mod 99)
c. Using the Chinese Remainder Theorem, solve the congruence
x 3 (mod 5)
x 42 (mod 99)
d. Using the Chinese Remainder Theorem, solve the congruence
x 3 (mod 5)
x 6 (mod 9)...
Write a C++ program that will output the multiplication table as
show below:
1*1=1 2*1=2 3*1=3 …… 9*1=1
1+2=2 2*2=4 3*2=6 …… 9*2=18
……. ……. ……. …… …….
1*9=9 2*8=18 3*9=27 …… 9*9=81
1. Consider the group Zp for a prime p with multiplication
multiplication mod p). Show that (p − 1)2 = 1 (mod p)
2. Is the above true for any number (not necessarily prime)?
3. Show that the equation a 2 − 1 = 0, has only two solutions
mod p.
4. Consider (p − 1)!. Show that (p − 1)! = −1 (mod p) Remark:
Think about what are the values of inverses of 1, 2, . . ....