1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lawyer [7]
3 years ago
10

Using Sequential Search on an array of size n, the search key is definitely present in the array. The probability of matching th

e key to the nth item in the array is 1/3, and the probability of matching the key to the (n-1)st item is 1/2. The probabilities of matching each of the remaining items are all equal. What is the average case complexity function for Sequential Search under these conditions?
Computers and Technology
1 answer:
MissTica3 years ago
7 0

Answer:

(11n-5) / 12 is correct answer.

Explanation:

The Probability that key will match to nth term = 1/2

The Probability that key will match to n-1th term = 1/3

As all other probabilities are equal

The Total Probability that key matches to any of 1 to n-2 index = 1 - 1/2 - 1/3 = 1/6

The Probability that key matches to any of 1 to n-2 index = (1/6) / n-2 = (1/6)* (n-2))

Let P(i) = Probability that key matches to ith index.

The Average time complexity = 22 i=1 P(i) * i

The Average time complexity = 1/(6(n-2) * ( sum of 1 to n-2 ) + (n-1) / 3 + n/2

The Average time complexity = 1/(6(n-2) * ( n-2)*(n-1) / 2 + ( n-1) / 3 + n/2

The Average time complexity = 1/6 * (n-1)/2 + (n-1)/3 + n/2

The Average time complexity = (n-1)/12 + (n-1)/3 + n/2

The Average time complexity = (n-1 + 4 * n - 4 * 1 +6 * n)/12

The Average time complexity = 11n-5 / 12

so (11n-5) / 12 is correct answer.

You might be interested in
What language do the Vikings speak in the game " For Honor"?
aivan3 [116]
In the game the Vikings speak icelandic
3 0
3 years ago
Read 2 more answers
In computer science, what does the word security mean?
zepelin [54]

Answer:

B

Explanation:

Computer security, cybersecurity or information technology security (IT security) is the protection of computer systems and networks from information disclosure, theft of or damage to their hardware, software, or electronic data, as well as from the disruption or misdirection of the services they provide.[1]

4 0
3 years ago
Which of the following is an example of a negative externality
ddd [48]
A negative externality is when a good costs much greater than what the consumer pays for it. Since you did not provide the possible answers, use this explanation to find the correct answer among the ones you might have.
7 0
3 years ago
O A self-confident person knows that:
arlik [135]
C you should believe in yourself and your abilities
3 0
3 years ago
If your computers normal zoom is 100, but it looks like its at 500, how do you stop that? my invisioned thing isn't on, neither
Alex Ar [27]

Answer:

You just need to click over the desktop, move to the View, and then change to medium, if its the icon size.

However, if you feel your resolution requires screwing up, then you are required to do the right-click, and again over the Desktop and then move to the settings (screen resolution),

And if you by chance clicked on the magnifier utility, you can CTRL + ALT +DEL and you will also be required to shut the interface.

Explanation:

You just need to click over the desktop, move to the View, and then change to medium, if its the icon size.

However, if you feel your resolution requires screwing up, then you are required to do the right-click, and again over the Desktop and then move to the settings (screen resolution),

And if you by chance clicked on the magnifier utility, you can CTRL + ALT +DEL and you will also be required to shut the interface.

7 0
3 years ago
Other questions:
  • Which of the following information security technology is used for avoiding browser-based hacking?
    11·2 answers
  • Word processing software allows users to do which of the following: format text design pages share documents mail merge document
    14·2 answers
  • A style manual can be described as
    11·2 answers
  • An information security ________ is a specification of a model to be followed during the design, selection, and initial and ongo
    11·2 answers
  • List the seven basic internal components found in a computer tower
    12·2 answers
  • Do you think it's better for a young designer to use free, open-source art programs or to pay for commercial programs? Explain y
    15·1 answer
  • Suppose that a 2M x 16 main memory is built using 256kB x 8 RAM chips and memory is word addressable, how many RAM chips are nec
    6·1 answer
  • What is the purpose of file extensions? A. They execute the mail merge function, B. They tell the operating system what kind of
    15·2 answers
  • Write the code to produce a for loop that counts down from 20 to 0 by 2’s and prints the number each time it goes through the lo
    15·1 answer
  • What is an automatic update and when should you use it
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!