- 1 Given The Following Pseudocode And Assuming That The Print Is The Basic Operation 1 Set Up The Initial Recurrence 1 (89.57 KiB) Viewed 58 times
1. Given the following pseudocode and assuming that the print is the basic operation, (1) set up the initial recurrence
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
1. Given the following pseudocode and assuming that the print is the basic operation, (1) set up the initial recurrence
1. Given the following pseudocode and assuming that the print is the basic operation, (1) set up the initial recurrence as a function of n, (2) solve the recurrent equation using the back substitution method, and (3) check your results with the Master Theorem.. Note that this problem must be solved by using only Back Substitution and Master Theorem approaches. Other approaches than the ones mentioned above won't be considered for credit Algorithm 1 Extracredit Algo Challenge function EXTRACREDIT(n) INITIALIZE: i=0, j=0, k=0 if n ≤ 1 then Return while i <n do while j<n do while k < n do Print("CSC510") INCREMENT: k + 1 INCREMENT: j + 1 INCREMENT: i + 1 clmclmm RECURSIVE CALL: EXTRACREDIT( RECURSIVE CALL: EXTRACREDIT( RECURSIVE CALL: EXTRACREDIT (2) ▸ Indexes for loops ► Base condition