Designing an algorithm for task-array of person numbers

Assignment Help Data Structure & Algorithms
Reference no: EM1372900

You have been assigned the task of designing an algorithm for the following task. Someone has built an array of the person numbers of all the n students enrolled in 331 this fall. In particular, you have no information about the order in which the person numbers are stored. The only operation that you are allowed is to be able to query the person number at the ith location of the array (for any 1  i  n). Present a (n) time algorithm that given any input person number p, will report whether or not p is enrolled in the class. Prove both the O(n) and (n) bounds on the running time of your algorithm. (You can assume that every access to the database takes 1 step.)

Reference no: EM1372900

Questions Cloud

Assess your layout using a distance-times-flow measure : Assess your layout using a distance-times-flow measure. Presume that distance is measured rectilinearly
Draw the payoff matrix : While grading in a final exam, an economics professor found that two students have virtually identical answers. She is convinced two cheated but cannot prove it.
Explain what information is available in relational database : Explain what information is available from relational database containing one relation with attributes Name, Employee identification number, and Address which is not available.
Foregin country of diversity : Suppose you are going on a 6 month expedition to a foreign country to experience the diversity of this country. A clear differentiation between race and ethnicity
Designing an algorithm for task-array of person numbers : You have been allotted task of designing an algorithm for following task. Someone has built the array of person numbers of all n students enrolled in 331 this fall.
Prepare corporate strategy - strategic management : Check a few of the input factors, indicate why they are important, and relate them to your own organization's situation.
Find the nash equilibrium for the one shot game : In a one shot game, if you promote and your rival promotes, you will earn $7 million and your rival will earn $2 million in profits.
Based on these data select the appropriate inventory model : Based on these data select the appropriate inventory model as well as calculate the economic order quantity and reorder point. Define in a sentence how the plan would work.
American culture-diffusion and cultural relativism : In general, sociology is the systematic study of human groups and social behavior. As an individual, part of the overall human group and society, you will assert your focus on learning a sociological perspective of the dynamics of societies.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Evaluate the average complexity of an enqueue operation

Evaluate the average complexity of an enqueue operation. Determine the average complexity of the dequeue (remove) operation.

  Build b tree for the part table

Build B+ tree for the PART table with n = 6 pointers; illustrate how B+ tree expand (show several intermediate trees) and what final tree will look like.

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

  Prepare the initial linked list of students and grades

Write a C program which initially presents menu of choices for the user. Menu must consist of the following choices: Prepare the initial linked list of students and grades.

  Describe a fair coin algorithm to returns either 0 or 1

Describe a FAIRCOIN algorithm that returns either 0 or 1 with equal probability, using ONEINTHREE as your only source of randomness.

  Data structures and algorithms

Provides learners with an understanding of how data structures are used in algorithms and enables them to design and implement data structures

  Simplify rsa cryptosystem using prime number

Assume we tried to simplify RSA cryptosystem using just prime p instead of composite modulus N = pq. As in RSA, we would have encryption exponent.

  Explain how to modify knuth-morris-pratt algorithm

Explain how to modify Knuth-Morris-Pratt algorithm to support patterns with these wild cards, and analyze modified algorithm. Your algorithm must find first substring in text which matches the pattern.

  Find maximum possible amount of money by optimal strategy

Removes it from row permanently, and receives value of coin. Find out the maximum possible amount of money we can definitely win if we move first.

  Encryption feistel cipher and decryption algorithm

If this is psudocode for encryption feistel cipher determine decryption algorithm?Output: ciphertext = (left[16], right[16]) Explain pseudo-code of corresponding decryption algorithm for this cipher.

  Write algorithm to find median value using queries

As queries are expensive, you would like to calculate median using as few queries as possible. Provide the algorithm which finds median value using at most O(log n) queries.

  Show result of inserting keys using linear probing

Show the result of inserting these keys using linear probing, using quadratic probing with c1 = 1 and c2 = 3, and using double hashing with h2(k) = 1 + (k mod (m ¡ 1)).

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd