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

"View & Add Discussion In Main Forum By Categories Wise Select Any One Category"

# Assignment No. 02, Semester: Spring 2013, CS502-Fundamentals of Algorithms last date 15/05/2013

Assignment No. 02, Semester: Spring 2013, CS502-Fundamentals of Algorithms     last date  15/05/2013

Lectures Covered:  7   to 15

Objective

To solve Recurrence relations using   Iteration method.

Please view the Assignment Submission Process document provided to you by the Virtual University for uploading assignments.

•
• Your assignment must be in .doc format. (Any other formats like        scan images, PDF, Zip, rar, bmp etc. will not be accepted).
•
•
• No assignment will be accepted through email.

Rules for Marking:

It should be clear that your assignment   will not get any credit if:

•   The assignment is   submitted after due date.
•   The submitted   assignment does not open or file is corrupted.
•   Your assignment is   copied from internet, handouts or from any other student

(Strict disciplinary action will be   taken in this case).

 Solve the following   recurrence relation using Iteration method.                 T(n)=   1             if n=1 , 4T (n/4)+ n^2 NOTE:   Submit “.doc” file only. Every student should provide his/her own work, exact   copying of the assignment (or some portion of the assignment) from the   internet or other students will lead to copy case and zero marks will be   awarded. Different softwares will be used to check plagiarism in assignments.   Do not put any query on MDB about this assignment, if you have any query   then  email at CS502@vu.edu.pk

Spring%202013_CS502_2.doc

Views: 10960

### Replies to This Discussion

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.

= 4T(n/4) + n + n
= 4(2T(n/8) + n/4) + n + n
= 8T(n/8) + n + n + n
= 8(2T(n/16) + n/8) + n + n + n
= 16T(n/16) + n + n + n + n
If n is a power of 2 then let n = 2k or k = log n.
T(n) = 2kT(n/(2k)) + (n + n + n + · · · + n) | {z }
k times
= 2kT(n/(2k)) + kn
= 2(logn)T(n/(2(logn))) + (log n)n
= 2(logn)T(n/n) + (log n)n
= nT(1) + n log n = n + n log n

App  ny question py thora gooor kia ,..k last py  n+n nai ha...last py n^2 ha. So insecond step what will be correct  T(n) = 4(2T(n/8) + n^2/4) + n^2  OR   T(n) = 4(2T(n/8) + (n/4)^2) + n^2.

mobeen hasan thanks

see the first four pages of the file to solve the assignment question

Attachments:

BFSS gud keep it up & thanks for sharing

Note for All Members: You don’t need to go any other site for this assignment/GDB/Online Quiz solution, Because All discussed data of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

BFSS sis. if you have done then just share ur answer vid me plz??

thanks

ya answer share kro koi mujhy b match krna h

mine ans is

how you do it

1

2

3

4

## Member of The Month

### 1. ♥♥♥ Faisal Dar ♥♥♥

Gujranwala, Pakistan

• View All

• View All

## Site Info

Created By: Tariq Malik

Designed By: Amel

Management: Moderators

Points Ranking System