Question: Recursive Bisection Search It is the recursive bisection search using the same problem as this bisection search. Please test your code with balance = 5000,

Recursive Bisection Search Recursive Bisection Search It is the recursive bisection search using the same
It is the recursive bisection search using the same problem as this bisection search. problem as this bisection search. Please test your code with balance =

Please test your code with balance = 5000, annual interest rate = 0.18. (Note, this exercise is basically an AGILE practice). tach monede cartement with However, the credit and company more by carne y Say you've made a scopurch ditandao yere you only pay You can toutes in the town Acthe beginning on when the credit card start indicate this the balance more Aryanet you make sure that the other test you make me thus your wald balance for month At the beginning of the credit card.com the beginning on your way da Seitsmesteren paying are the begin frece pe balance her pare och payment the commonly reduce your of youve passed the You can eat of your events porn 12 you will see that her ayaw you we Problem 4. Recursive Bisection Search In Problem 3, we designed a bisection search to find the monthly minimal monthly payment to pay off the debt in 12 months. Here, please revise your bisection search solution using a recursive function. Problem 3 - Using Bisection Search to Make the Program Faster 0.0/20.0 points (graded) You'll notice that in Problem 2, your monthly payment had to be a multiple of $10. Why did we make it that way? You can try running your code locally so that the payment can be any dollar and cent amount (in other words, the monthly payment is a multiple of 0.01). Does your code still work? It should, but you may notice that your code runs more slowly, especially in cases with very large balances and interest rates. (Note: when your code is running on our servers, there are limits on the amount of computing time each submission is allowed, so your observations from running this experiment on the grading system might be limited to an error message complaining about too much time taken.) Well then, how can we calculate a more accurate fixed monthly payment than we did in Problem 2 without running into the problem of slow code? We can make this program run faster using a technique introduced in lecture - bisection search! The following variables contain values as described below: 1. balance - the outstanding balance on the credit card 2. annual interestRate - annual interest rate as a decimal To recap the problem: we are searching for the smallest monthly payment such that we can pay off the entire balance within a year. What is a reasonable lower bound for this payment value? $0 is the obvious anwer, but you can do better than that. If there was no interest, the debt can be paid off by monthly payments of one-twelfth of the original balance, so we must pay at least this much every month. One-twelfth of the original balance is a good lower bound What is a good upper bound? Imagine that instead of paying monthly, we paid off the entire balance at the end of the year. What we ultimately pay must be greater than what we would've paid in monthly installments, because the interest was compounded on the balance we didn't pay off each month. So a good upper bound for the monthly payment would be one-twelfth of the balance, after having its interest compounded monthly for an entire year Please test your code with balance = 5000, annual interest rate = 0.18. (Note, this exercise is basically an AGILE practice). tach monede cartement with However, the credit and company more by carne y Say you've made a scopurch ditandao yere you only pay You can toutes in the town Acthe beginning on when the credit card start indicate this the balance more Aryanet you make sure that the other test you make me thus your wald balance for month At the beginning of the credit card.com the beginning on your way da Seitsmesteren paying are the begin frece pe balance her pare och payment the commonly reduce your of youve passed the You can eat of your events porn 12 you will see that her ayaw you we Problem 4. Recursive Bisection Search In Problem 3, we designed a bisection search to find the monthly minimal monthly payment to pay off the debt in 12 months. Here, please revise your bisection search solution using a recursive function. Problem 3 - Using Bisection Search to Make the Program Faster 0.0/20.0 points (graded) You'll notice that in Problem 2, your monthly payment had to be a multiple of $10. Why did we make it that way? You can try running your code locally so that the payment can be any dollar and cent amount (in other words, the monthly payment is a multiple of 0.01). Does your code still work? It should, but you may notice that your code runs more slowly, especially in cases with very large balances and interest rates. (Note: when your code is running on our servers, there are limits on the amount of computing time each submission is allowed, so your observations from running this experiment on the grading system might be limited to an error message complaining about too much time taken.) Well then, how can we calculate a more accurate fixed monthly payment than we did in Problem 2 without running into the problem of slow code? We can make this program run faster using a technique introduced in lecture - bisection search! The following variables contain values as described below: 1. balance - the outstanding balance on the credit card 2. annual interestRate - annual interest rate as a decimal To recap the problem: we are searching for the smallest monthly payment such that we can pay off the entire balance within a year. What is a reasonable lower bound for this payment value? $0 is the obvious anwer, but you can do better than that. If there was no interest, the debt can be paid off by monthly payments of one-twelfth of the original balance, so we must pay at least this much every month. One-twelfth of the original balance is a good lower bound What is a good upper bound? Imagine that instead of paying monthly, we paid off the entire balance at the end of the year. What we ultimately pay must be greater than what we would've paid in monthly installments, because the interest was compounded on the balance we didn't pay off each month. So a good upper bound for the monthly payment would be one-twelfth of the balance, after having its interest compounded monthly for an entire year

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!