Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CISP 430 Assignment 1 Spring 2019 Math Review and Algorithm Analysis Use empirical analysis methods and code analysis methods to determine running time complexity in

image text in transcribedimage text in transcribedimage text in transcribed

CISP 430 Assignment 1 Spring 2019 Math Review and Algorithm Analysis Use empirical analysis methods and code analysis methods to determine running time complexity in Big O notation Review of Common Math Functions 1) Use Excel or some other graphing tool to graph the following equations y=x y-log,ir 2) Rank the graphs of the above equations by rate of growth, fastest (non-initial) growth first. 3) Match the shape of each graph with the closest common Big(O) curve and label them so Empirical Analysis (counting the "work"). 4) Complete the table for each of the following functions. For each foo, write a small program with a loop where n is a counter from 0 to at least 64. Call the foo within the loop, passing it each value of n, and getting the return value from foo. Fill out a table with each n and its corresponding return value. You can skip some values of n when n starts to get biggish Capture your output and generate the tables. See the posted "Bsort BigO.cpp" optimization code as an example of this kind of analysis int foo1(int n) return value int counter e; for(int = e; i 0; i-i/2) counter++ return counter; / note: you might not make it much pastn- 32 int foo4(int n) static int counter; counter++; if(n > 0) foo4(n-1); foo4(n-1); return counter; 5) Use Excel to GRAPH the data tables from the previous functions. Use the return value as a function of n. That means, put n on the horizontal axis (x) and put the return value on the vertical axis (y) Use Excel or some other graphics tewI 6) Rank the graphs above by rate of growth, fastest first. Code Analysis Implement and test each of the following series for several different values of n and A Present your output in a nice table of values. Use iterative solutions, do not use the equivalent (condensed) algebraic formula 7) I. Arithmetic Series Test for values of n from 1 to 10 i-1+2+3++N Iterative code solution int sum = 0; for(int i-1; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

l write nursing criteria for process, outcome, and structure audits

Answered: 1 week ago