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 : 35
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
» MGMT611 Assignment # 1 Solution Spring 2013
» CS304 Assignment #3 Solution Spring 2013
» CS403 Assignment # 3 Best Solution - Spring 2013
» CS401 Assignment # 3 Best Solution - Spring 2013
» MCM101 Assignment No.1 Best Solution - Spring 2013
» CS304 Assignment #3 Solution Spring 2013
» CS403 Assignment # 3 Best Solution - Spring 2013
» CS401 Assignment # 3 Best Solution - Spring 2013
» MCM101 Assignment No.1 Best Solution - Spring 2013
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Yesterday at 12:21 pm by ali001
» Hemangiom'App
Tue Nov 05, 2024 11:25 am by ali001
» MindfulMe - Mental Health App
Mon Nov 04, 2024 10:50 am by ali001
» Learn Candlestick Patterns
Tue Oct 15, 2024 5:51 am by ali001
» Woh Pagal Si Episode 52 to 62 - Top Pakistani Drama
Sat Sep 21, 2024 6:26 pm by Mir Emmad Ali Khan Domki
» Nearu - share your socials
Sat Sep 21, 2024 1:12 pm by ali001
» Nightclub Tycoon: Idle Empire
Thu Sep 19, 2024 9:16 pm by ali001
» Carnivore - Meat Diet Recipes
Wed Sep 18, 2024 2:37 pm by ali001
» Eid Milad un Nabi Mubarak 2024 (Rabiʻ I 14, 1446 AH)
Tue Sep 17, 2024 3:44 pm by Mir Emmad Ali Khan Domki