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 Mid Term Papers Fall 2017 December 9, 2017 to December 20, 2017 & Past Papers

+ 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: 4170

.

+ 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)

Replies to This Discussion

CS502 
1) differences between program and algorithm
2) how bubble sort works?
3) Matrix chain wala tha..
. code completed karna tha..1st 5 line missing thi es ma se
MATRIX-CHAIN(p,N)
1 for i = 1,N
2 do m[i, i] 0
3 for L = 2,N
4 do
5 for i = 1, n − L + 1
6 do j i + L − 1
7 m[i, j] 1
8 for k = 1, j − 1
9 do t m[i, k] +m[k + 1, j] + pi−1 · pk · pj
10 if (t < m[i, j])
11 then m[i, j] t; s[i, j] k

4) code maxima wla tha or use converted karna tha.. ya
MAXIMA(int n, Point P[1 . . . n])
1 for i 1 to n n times
2 do maximal true
3 for j 1 to n n times
4 do
5 if (i 6= j)&(P[i].x P[j].x)&(P[i].y P[j].y) 4 accesses
6 then maximal false break
7 if maximal
8 then output P[i].x, P[i].y 2 accesses

Amal Hanif thanks for sharing 

first iteration of quicksort was to be found.

find the faster function (asymptotic notation.)

find edit distance of two words.

how selection problem works.

complete plane-sweep algorithm.

most mcqs were from asymptotic notation chapter.

19 mcqs 5 qs( 2 x 3 marks, 3 x 5 marks )

1.       Identify the maximal points (the points that are NOT dominated by other points) in the given set according to 2-D maxima problem.

{ (2,5) , (4, 4) , (4,11) , (5,1) , (7,7) , (7,13) , (9,10) , (11,5) , (12,12), (13,3) , (14,10) , (15,7)}

2.       Show that any sorting algorithm that uses only comparison among elements requires comparisons. Remember comparisons among elements require at least (log n!) comparisons in the worst case

 

3.       Illustrate how Counting Sort works on array

            A= 7, 1, 4, 1, 2, 4, 5, 7, 2, 0, 8

CS502 - Fundamentals of Algorithms

My Todays Paper at 12:30pm in Lahore Campus.

• 11 MCQS from past papers.

• 7 MCQS was conceptual but easy.

• What is necessary assumption for average-case analysis of Quick sort? 3 marks

• Write the experimental elements of algorithm? 3 marks

• Write Down the steps of Dynamic programming? 5 marks

• Complete the following algorithm: 5 marks
HEAPIFY( array A, int i, int m) 
1 l LEFT(i) 
2 r RIGHT(i) 
3 max i 
4 if (l _ m)and(A[l] > A[max])
5………
6………
7………
8………
9………
10……

• Last question was conceptual so thats why didn't remember. 5 marks

Q1   Complete these blanks  it  (5)

HEAPIFY( array A, int i, int m)

 1 l←LEFT(i)

 2 r←RIGHT(i)

3 max←i

4 if (l ≤ m)and(A[l] > A[max])

5 then max←l

 6 ---------------------if (r ≤ m)and(A[r] > A[max])

 7--------------------- then max←r

8------------------------------------ if (max 6= i)

9 ----------------------------then SWAP(A[i],A[max])

10------------------------ HEAPIFY(A,max,m)

Q2   Write the properties of algorithm (5)

 

Q3  Which one is best  multiplication for these matrices  where  A1 is 5×7,  A2 is 7×8  and A3 is 8×5           (5marks)

  1. ((A1A2)A3)
  2. (A1(A2A3))

Q4) Write first three steps in Sieve selection   3marks

Q5)  Write heap sort algorithm   3marks

Aur 8 MCQS  DR Hanif  or moaaz s aiy thy

RSS

Latest Activity

+!!! illegal weapon !!! liked Ateeqa's discussion Aah ko chaiye ek umr asar hone tak....
3 minutes ago
Shahzaib hussain replied to + M.Tariq Malik's discussion MGT502 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 22-01-2020 in the group MGT502 Organizational Behavior
3 minutes ago
Shahzaib hussain joined + M.Tariq Malik's group
3 minutes ago
+!!! illegal weapon !!! replied to Ateeqa's discussion Aah ko chaiye ek umr asar hone tak....
3 minutes ago
Bint-e-Adam liked ♦_"Tooba"_♦'s discussion "Khamosh Ho Jana"
6 minutes ago
+!!! illegal weapon !!! liked + Drama Queen ! ! ! ! ! ! ! ! !'s discussion ❤️❤️❤️❤️❤️HapPiii BIrthday INNO BHAI ❤️❤️❤️❤️❤️❤️ Our Beloved MOD!!!!!!❤️❤️❤️❤️❤️❤️❤️❤️❤️
6 minutes ago
+!!! illegal weapon !!! liked иαвєєℓ αнмє∂'s discussion !!!! DiL kA rIsHtA !!!!!
6 minutes ago
+!!! illegal weapon !!! liked иαвєєℓ αнмє∂'s discussion !!!!!Guftagu!!!!!!
6 minutes ago
Biya and + ! ! AɳƓєℓ ❥ are now friends
9 minutes ago
Alone Struggler posted discussions
19 minutes ago
Muhammad Sarfraz replied to + M.Tariq Malik's discussion ENG301 Assignment No 02 Fall 2019 Solution & Discussion in the group ENG301 Business Communication
50 minutes ago
bcvu786 replied to Hamza Saghir's discussion SOC 101 Quiz 3 14 jan 2020 closing date in the group SOC101 Introduction to Sociology
56 minutes ago

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

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

.