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.
1. Write an algorithm to calculate the Matrix multiplication
(or write with pseudo code)
2. Write an algorithm to calculate the recursive Matrix
multiplication (or write with pseudo code)
3. Find the time complexity of your pseudo code and analyze
the differences
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