We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>
+ Link For Assignments, GDBs & Online Quizzes Solution
+ 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.
Fundamentals of Algorithms (CS502)
Assignment # 01
Total marks = 20
Deadline = 10/05/18
Lectures Covered: This assignment covers Lecture # 1 to 7.
Objectives of this assignment are:
To understand line by line analysis of an algorithm
To understand how to calculate running time of an algorithm
To perform comparison of different algorithms
Please read the following instructions carefully before solving & submitting the assignment:
The assignment will not be accepted after due date.
Zero marks will be awarded if the assignment does not open or the file is corrupt.
The assignment file must be an MS Word (.doc/.docx) file format; Assignment will not be accepted in any other format.
Zero marks will be awarded if assignment is copied (from other student or copied from handouts or internet).
Zero marks will be awarded if Student ID is not mentioned in the assignment file.
For any query about the assignment, contact only at CS502@vu.edu.pk
Please do not post queries related to assignment on MDB.
Question # 1: 10 Marks
For the following code segment, provide line-by-line analysis and construct function T(n) that give the runtime of this code as a function of "n". Also determine the big-O for this code segment. [Marks: 5+3+2]
Code segment Cost
i = 1
j = 1
k = 1
while (i <= n)
i = i + 1
while (j < n)
a = 2 + g
j = j + 1
if (k <= n)
a = 2
a = 3
Question # 2: 5 Marks
Which of the following two functions is faster?
f1 = 10n2
f2 = n3
Question # 3: 5 Marks
In the context of 2D Maxima problem, Brute Force algorithm runs in Θ(n2) time and Plane-Sweep algorithm runs in Θ(nlog2n) time. For n = 500,000, if Plane-Sweep takes 1 second, how much time (in hours) Brute Force algorithm will take? Calculate and show all the steps.
Note: Base of log is 2 (e.g. log210 = 3.321928095)
.+ 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)
Please Discuss here about this assignment.Thanks
Our main purpose here discussion not just Solution
We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>
Discussed & be touched with this discussion. After discussion a perfect solution will come in a result at the end.
For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.
For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.
Or visit this link
Please Click on the below link to see…
P.S: Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”
any clue ?
this video may be helpful
CS502 Complete Assignment 1 Solution 2018. Click Here
sir koi to solutin send ker dy
cs502 assignment solution complete dont copy past
es ma all question complete ha answer
Is it correct???
yes it is correct.....
Thanks for solution