Recent Feedback
Algorithm Analysis •Consider searching algorithms on the following array of data: [22 21 9 4 16 2 10 14 20 31 26 19 17 28 8 13] Suppose you want to implement a searching algorithm to see if the data set contains the number 19. Demonstrate how the search would go if you used: ?A sequential search ?A binary search State the runtime for each of the searches, in this example, and for general data sets of size n. Address the issue of the order of the data in binary searching. Create a table that depicts the runtime for arrays of length 1 to 10. Would you expect the general runtime to be O(n), O(n2), O(n3), or some other function of n? Explain •Suppose an algorithm that processes a data set of size 8 has a runtime of 72, and the same algorithm on a data set of size 20 has a runtime of 420. Using big-O notation, state the runtime for this algorithm for the general case of a data set of size n. •Suppose you develop an algorithm that processes the first element of an array (length of n), then processes the first 2 elements, then the first 3 elements, and so on, until the last iteration of a loop, when it processes all elements. Thus, if n = 4, the runtime would be 1 + 2 + 3 + 4 = 10.
Optional Information: Level/Year: University Subject: Discrete Matha
Hi,Welcome to Justanswer!The last question seems incomplete. Please let me know the whole of it.
There are several parts to the assignment but I'm not sure that parts 1-4 will help with part 5. If you are willing to answer part 2 as well as part 5 let me know and I will pay double. I hope this helps.
Task Background: A large part-but not all-of this assignment concerns a situation in which you are involved in the design of electronic card games. To do this effectively, a working knowledge of sets, relations, combinatorics, and probability is necessary.
Part I: Set Theory
Look up a roulette wheel diagram. The following sets are defined:
From these, determine each of the following:
Part II: Relations and Functions
The implementation of the program that runs the game involves testing. One of the necessary tests is to see if the simulated spins are random. Create an n-ary relation, in table form, that depicts possible results of 10 trials of the game. Include the following results of the game:
Also include a primary key. What is the value of n in this n-ary relation?
Part III: Graphs and Trees
Create a tree that models the following scenario. A player decides to play a maximum of 5 times, betting on red each time. The player will quit after losing twice. In the tree, any possible last plays will be an ending point of the tree. Branches of the tree should indicate the possibilities of winning or losing, and how that affects whether a new play is made.
Part IV: Combinatorics and Probability
In the roulette game, what is the probability of an outcome of:
You are asked by a state government official to investigate whether under a proposed license plate system, there will be enough license plate codes for the state. There are 2 schemes proposed:
Part V
Algorithm Analysis
[22 21 9 4 16 2 10 14 20 31 26 19 17 28 8 13]
Suppose you want to implement a searching algorithm to see if the data set contains the number 19. Demonstrate how the search would go if you used:
State the runtime for each of the searches, in this example, and for general data sets of size n. Address the issue of the order of the data in binary searching.
Create a table that depicts the runtime for arrays of length 1 to 10. Would you expect the general runtime to be O(n), O(n2), O(n3), or some other function of n? Explain
THIS ANSWER IS LOCKED!You can view this answer by clicking here to Register or Login and paying 3 €. If you've already paid for this answer, simply Login.
Experience: B.Tech