We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS502 Fundamentals of Algorithms Assignment No 01 Spring 2019 Solution & Discussion Due Date: 15-05-2019

CS502 Fundamentals of Algorithms Assignment No 01 Spring 2019 Solution & Discussion Due Date: 15-05-2019

Question No  01:   (Marks:  10)

 

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.

 

Question No. 02   (Marks   10)

 

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.

 

 

=====================================Ended=======================================

 

For any query about the assignment, contact at CS502@vu.edu.pk

 

GOOD LUCK

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 5695

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

CS502 Assignment#01 Spring 2019 Solution

Kindly share once you complete it

CS502 Assignment Solution

No photo description available.

No photo description available.

CS502 Assignment#01 Spring 2019 Solution

 

 

is it correct? 

CS502 Assignment#01 Spring 2019 Solution 

Attachments:

CS502 Assignment#01 Some more ideas solution

Attachments:

CS502 Assignment 1 Solution

Attachments:

wrong solution

correct solution

Attachments:

kindly confirm kren kon sa solution correct hy?

RSS

Latest Activity

Muhammad Bilal replied to Muhammad Sarfraz's discussion FIN630 - Investment Analysis & Portfolio Management Fall 2019 Assignment Solution Idea in the group FIN630 Investment Analysis & Portfolio Management
2 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion FIN623 Assignment No 01 Fall 2019 Solution & Discussion in the group FIN623 Taxation Management
3 minutes ago
Muhammad Bilal replied to Muhammad Sarfraz's discussion FIN630 - Investment Analysis & Portfolio Management Fall 2019 Assignment Solution Idea in the group FIN630 Investment Analysis & Portfolio Management
3 minutes ago
Muhammad Hamza Mehmood joined + M.Tariq Malik's group
3 minutes ago
+ M.Tariq Malik liked Mohib Jann's discussion MGT 610 Assignment no.1 solution need last 23rd jan.
3 minutes ago
Profile IconShanza chauhan, abdullah hassan, Ifrah Ansar and 17 more joined Virtual University of Pakistan
4 minutes ago
Muhammad Bilal replied to Muhammad Sarfraz's discussion FIN630 - Investment Analysis & Portfolio Management Fall 2019 Assignment Solution Idea in the group FIN630 Investment Analysis & Portfolio Management
5 minutes ago
Waqas replied to Muhammad Sarfraz's discussion FIN630 - Investment Analysis & Portfolio Management Fall 2019 Assignment Solution Idea in the group FIN630 Investment Analysis & Portfolio Management
5 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion SOC101 Assignment No 02 Fall 2019 Solution & Discussion in the group SOC101 Introduction to Sociology
6 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion ENG301 Assignment No 02 Fall 2019 Solution & Discussion in the group ENG301 Business Communication
9 minutes ago
Waqas replied to Muhammad Sarfraz's discussion FIN630 - Investment Analysis & Portfolio Management Fall 2019 Assignment Solution Idea in the group FIN630 Investment Analysis & Portfolio Management
9 minutes ago
+ M.Tariq Malik replied to Habiba's discussion MGT501 GDB No.1 in the group MGT501 Human Resource Management
10 minutes ago

© 2020   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.