CS502 Assignment # 02 Solution Spring 2013
Page 1 of 1 • Share
CS502 Assignment # 02 Solution Spring 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.
Uploading instructions:
Please view the Assignment Submission Process document provided to you by the Virtual University for uploadingassignments.
Rules for Marking:
It should be clear that your assignment will not get any credit if:
(Strict disciplinary action will be taken in this case).
Lectures Covered: 7 to 15
Objective
To solve Recurrence relations using Iteration method.
Uploading instructions:
Please view the Assignment Submission Process document provided to you by the Virtual University for uploadingassignments.
- Your assignment must be in .doc format. (Any other formats like scan images, PDF, Zip, rar, bmp etc. will not be accepted).
- Save your assignment with your ID (e.g. bc020200786.doc).
- 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 [You must be registered and logged in to see this link.] |
ChIntoo- Monstars
- Posts : 92
Join date : 2011-02-13
Re: CS502 Assignment # 02 Solution Spring 2013
please read carefully page no:31 from handout to solve the question
see the first four pages of the file to solve the assignment question
see the first four pages of the file to solve the assignment question
Victoria333- Monstars
-
Posts : 267
Join date : 2013-05-12
Age : 34
Location : Victoria
Re: CS502 Assignment # 02 Solution Spring 2013
= 4T(n/4) + n + n
= 4(2T(n/ + n/4) + n + n
= 8T(n/ + n + n + n
= 8(2T(n/16) + n/ + 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
= 4(2T(n/ + n/4) + n + n
= 8T(n/ + n + n + n
= 8(2T(n/16) + n/ + 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
ChIntoo- Monstars
- Posts : 92
Join date : 2011-02-13
Similar topics
» CS401 Assignment # 3 Best Solution - Spring 2013
» MCM101 Assignment No.1 Best Solution - Spring 2013
» CS001 Assignment No. 02 Solution Spring 2013
» ACC311 Assignment No. 1 Solution Spring 2013
» CS506 Assignment No.3 Solution Spring 2013
» MCM101 Assignment No.1 Best Solution - Spring 2013
» CS001 Assignment No. 02 Solution Spring 2013
» ACC311 Assignment No. 1 Solution Spring 2013
» CS506 Assignment No.3 Solution Spring 2013
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Mon Apr 22, 2024 11:23 am by Joshuaadam
» Aloha Planner - Note-Taker
Thu Apr 11, 2024 4:52 pm by ali001
» Streaming Guide Film TV Series
Tue Apr 09, 2024 9:39 pm by ali001
» Apricot Tree Problems & Solutions ????|خوبانی کے پھل کو کیڑا لگنےسے بچانے کا طریقہ ????
Sun Apr 07, 2024 6:28 am by Zamaan Khan
» خوبانی کے پودے کی کاشت گرم علاقوں میں کرنی چاہیے یا نہی
Sun Apr 07, 2024 6:24 am by Zamaan Khan
» New Here
Sun Apr 07, 2024 6:15 am by Zamaan Khan
» Bajta Hua Sochoon Main Koi Saaz Na Aaye Naat
Sun Apr 07, 2024 6:14 am by Zamaan Khan
» Woh Pagal Si Episode 52 to 62 - Top Pakistani Drama
Sun Apr 07, 2024 6:06 am by Zamaan Khan
» Woh Pagal Si Episode 42 to 51 - Top Pakistani Drama
Sat Apr 06, 2024 4:50 pm by Ch. Ehtisham Gujjar