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
Who's the finale in undertale omega flowy or sans
Nikitich [7]

Answer:

Should be Flowy

Explanation:

3 0
3 years ago
Read 2 more answers
Why star topology is more reliable than bus or ring topologies
Valentin [98]

Answer:

<h3><em><u>simple </u></em><em><u>ans</u></em></h3>

Explanation:

<h2><em><u>it </u></em><em><u>is </u></em><em><u>because </u></em><em><u>as </u></em><em><u>it </u></em><em><u>has </u></em><em><u>server </u></em><em><u>computer </u></em><em><u>and </u></em><em><u>no </u></em><em><u>one </u></em><em><u>are </u></em><em><u>free </u></em><em><u>as </u></em><em><u>other </u></em><em><u>topology </u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em></h2>

<h2><em><u>client </u></em><em><u>computer </u></em><em><u>should </u></em><em><u>ask </u></em><em><u>server </u></em><em><u>to </u></em><em><u>share </u></em><em><u>any </u></em><em><u>information </u></em><em><u>ideas </u></em><em><u>etc.</u></em></h2>

<em><u>this </u></em><em><u>much.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em>

<h2><em><u>follow</u></em></h2>
8 0
1 year ago
Read 2 more answers
Which of the following processes should Angel use to merge cells A1:D4 to create a title?
podryga [215]

Answer:

Highlight cells A1:D4, right-click and select Format Cells, click Alignment, and choose the Merge cells option.

Explanation:

We merge cells with the help of following methods.

<u>Method 1  </u>

  1. Highlight cells A1:D4
  2. click on the Home tab
  3. click on the <u>Merge and Center</u> icon in the Alignment group

1st method is not given in options of question.

<u>Method 2</u>

  1. Highlight cells A1:D4
  2. right-click and select Format Cells
  3. click Alignment
  4. choose the Merge cells option

<em>2nd method is matching with </em><em><u>option D. </u></em><em>So, Option D is the answer.</em>

<u />

6 0
3 years ago
Read each description below, and then choose the correct term that matches the description from the drop-down menus.
lilavasa [31]

hyperlink

browser

website

webpage

5 0
3 years ago
Read 2 more answers
Ok. So i am so confused. I have a message in my inbox but when I try to go to my inbox there is nothing there. Is that normal fo
GrogVix [38]

Answer:

yeah

Explanation:

that happens to me as well from time to time

7 0
2 years ago
Other questions:
  • Sam has installed a new CPU in a client’s computer, but nothing happens when he pushes the power button on the case. The LED on
    14·1 answer
  • The most common type of local correction system is
    11·1 answer
  • Who was eqvtime tayaishvili?​
    13·2 answers
  • Which of the following should you NOT do when using CSS3 properties to create text columns for an article element? a. make the c
    12·2 answers
  • In total, how many 8-bit registers are there in the Intel 80x86 CPU design presented in class? Name one of these 8-bit registers
    9·1 answer
  • mapa mental con la explicación de que medios de comunicación y redes sociales intervienen en la construcción de tu identidad​
    10·1 answer
  • Commercials are short media advertising that persuades a consumer to buy/use their product/service?
    13·2 answers
  • If you were a hackathon team manager, how could you best address the conflict created by having more volunteers than open roles
    6·1 answer
  • The code to perform a binary search is below. Match the variable name with what it holds.
    12·1 answer
  • You want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. to do so, you shoul
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!