Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS502 assignment no 2 spring 2011
#1
please help me about this assignment


Attached Files
.pdf   Spring 2011_CS502_2.pdf (Size: 38.26 KB / Downloads: 330)
Reply
#2
please start working on this assignment
Reply
#3
working working and working
Reply
#4
please please please
Reply
#5
GGGG moon what do u do?
Reply
#6
Question 1
Rule 0
The condition that stops a loop executes ONE MORE time than the loop itself
(the last time is when it is evaluated false)
Rule 1
for (i=0;i<n;i=i+k) Anything inside the loop will run approximately n/k times
Rule 2
for (i=n;i>0;i=i-k) Anything inside the loop will run approximately n/k times
Rule 3
for (i=1;i<n;i=i*k) Anything inside the loop will run approximately logkn times
Rule 4
for(i=1;i<=n;++i)
for (j=1;j<=i;++j)
The above nested loop approximately runs ½ n(n+1) times.
The variable j depends upon the value of i
Rule 5
for(i=1;i<=n;i=i*2)
for (j=1;j<=i;++j)
The statements in the above nested loop approximately run
2n-1 times.
The variable j depends upon the value of i
Rule 6
If the loop variables are independent then the total times a statement inside a
nested loop is executed is equal to the product of the times the individual loops
run
e.g. for (i=0;i<n;++i)
for (j=0;j<m;++j)
A statement inside the above nested loop will run n*m times

Question 2 (10)
Arrange the following in the Most to Least complexity order. Here “n “is the input size
for the some complexity function and k< j and j & k are numbers greater than 2.Every
function is separated by “comma” and note these are 20 functions to arrange.
2
2 4 8
5 6
n, n / 2, n j/2, nlgn, nn, 1,100, 2n, lgn, n!,(n! ) / ,
/ ,n! log / , / log ,10000,n / , (log ) ,
n / , (log ) ,1000
k n n n
n n n n n n n nn n n
n n n n


plz check and if corection is required then tell me. thanks
(Remember in prayers)
Reply
#7
sorry but it is not related with current assignment
Reply
#8
moon shaib kabhi thanks nahi kaha app nay solution lay akr.
Reply
#9
CS502 Question No. 2 Hazir Hai.
See the attachment.


Attached Files
.doc   CS502_2_Q2.doc (Size: 318 KB / Downloads: 250)
Reply
#10
shafiq856 Wrote:CS502 Question No. 2 Hazir Hai.
See the attachment.

Thank you very much
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS301 Assignment # 4 Due Date: 02-Feb-2016 Vuhelper 0 2,319 02-03-2016, 05:38 PM
Last Post: Vuhelper
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,904 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 1,924 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,159 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,237 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 1,962 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,658 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,793 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,695 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,794 01-20-2016, 06:19 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)