Info! Please Don't Make 100% copy of your assignment Solution. Make some changes so that your solution look differrent than other students. If you make Exact copy of then you can get marks zero. |
Solution Idea of CS502 Assignment No 1 2019 Fundamental Algorithm Due Date 15-05-2019
Question 1:
The following algorithm (procedure) is computing the multiplication of two squared matrices. A[][] and B[][] are two squared matrices, Mul[][] is a square matrix which store the multiplication of A[][] and B[][]. As the matrices are squared so, “n” would be the number of columns or rows. You are required to calculate the worst case time complexity {T(n)} of this algorithm.
1 Matrix_Multiplication (A[][], B[][],Mul[][], int n)
2 Sum = 0
3 for (int i to n)
4 for (int j to n)
5 for (int k to n)
6 Sum = Sum + A[i][k] * B[k][j];
7 Mul[i][j] = Sum;
Note: Make sure that the alignment of each step/line is important in the algorithm, because it may indicate you that the loops are nested or in sequence.
Reference: p50 Chapter 4
Question 2:
Consider the following function f(n) which represent the time complexity of an algorithm.
f(n) = 2n2 + 4n + 7
As per the definition of Big O, we have, 0 ≤ f(n) ≤ cg(n) , where c >0 and n ≥ n0
If g(n) = n2 , find the value of c for which the upper bound cg(n) holds.
Solution of Assignment is Given Below;
Watch the Video below to know that how to solve this assignment with step by step guide and references
How to Submit: | You need to submit this file in Microsoft Word (doc, docx) file formate on or before due date. |
If you have any Problem regarding your assignment Solution then you can contact Us or leave a Comment below. You can also subscribe our Official YouTube Channel to get guided videos of all assignments, quizes or GDB. You can also join our Official WhatsApp Groups by Click on the links Below.
Description | Links |
---|---|
YouTube Channel: | Infopalacess Official Tuts |
WhatsApp Group 1: | VU Assignments Portal by Infopalacess 2 |
WhatsApp Group 2 | VU Assignments Portal by Infopalacess 2 |
WhatsApp Group 3 | 3- VU Solutions by Infopalacess |
7 Comments
file dwnld to honi rhi hmara bhi khayal kia kro easy ho jay
ReplyDeletekamal karty ho pandy g
ReplyDeletefile dwnld to honi rhi hmara bhi khayal kia kro easy ho jay
ReplyDeletekindly share assignment of cs502 solution
ReplyDeleteKidhr Hy solution?? Scroll down krty krty page khatm hugya
ReplyDeleteO bhai kdr hai link???
ReplyDeletechawal bnda h kud k pasy bnany k chakar me hamar b time waste krta h
ReplyDelete