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
alexandr1967 [171]
3 years ago
11

A list of n items is arranged in random order; to find a requested item, they are searched sequentially until the desired item is

found. what is the expected number of items that must be searched through, assuming that each item is equally likely to be the one requested? (questions of this nature arise in the design of computer algorithms.)
Business
1 answer:
kompoz [17]3 years ago
6 0
<span>n/2 = average number of items to search. Or more precisely (n+1)/2 I could just assert that the answer is n/2, but instead I'll prove it. Since each item has the same probability of being searched for, I'll simulate performing n searches on a list of n items and then calculate the average length of the searches. So I'll have 1 search with a length of 1, another search looks at 2, next search is 3, and so forth and so on until I have the nth search looking at n items. The total number of items looked at for those n searches will be: 1 + 2 + 3 + 4 + ... + n Now if you want to find the sum of numbers from 1 to n, the formula turns out to be n(n+1)/2 And of course, the average will be that sum divided by n. So we have (n(n+1)/2)/n = (n+1)/2 = n/2 + 1/2 Most people will ignore that constant figure of 1/2 and simply say that if you're doing a linear search of an unsorted list, on average, you'll have to look at half of the list.</span>
You might be interested in
Do you think that their economy will be strong when they have to write off debt from countries that have borrowed heavily from t
Kobotan [32]

Answer:

Yes

Explanation:

7 0
3 years ago
The idea that the relationship between a worker and employer is voluntary and can be terminated at any time, by either party, is
kiruha [24]

Answer:

The correct answer is letter "A": employment-at-will doctrine.

Explanation:

The employment-at-will doctrine is an organizational practice in which employers could terminate labor relationships at any moment with no need for explanations and workers as well could cease the relationship without major reason. This practice aimed to avoid lawsuits between employers and workers.

4 0
3 years ago
The electric utility rate for a facility during the months of May through October is 4.5 cents per kilowatt-hour for energy, $11
Minchanka [31]

Answer: $11564

Explanation:

Total units consumed for August = 96000

There's a peak demand of 624kw

Also, the May through October is 4.5 cents per kilowatt-hour for energy.

The August electric bill will then be:

= 96000 × 4.5/100 + 624 × 11.50 + 68

= (96000 × 0.045) + (624 × 11.50) + 68

= 4320 + 7176 + 68

= 11564

4 0
3 years ago
Những nhân tố ảnh hưởng đến hành vi mua hàng của người tiêu dùng là gì
sergey [27]

Nhận thức, động cơ, học tập, niềm tin và thái độ là tất cả các yếu tố tâm lý ảnh hưởng đến việc mua hàng của người tiêu dùng. Quá trình mọi người lựa chọn và giải thích thông tin để đưa ra quyết định mua hàng được gọi là nhận thức.

8 0
3 years ago
Suppose that in your first year of college you spend $31,300.00 more than you eam. In your second year, your expenses increase a
ryzh [129]

Answer: See explanation

Explanation:

Based on the information provided in the question, the deficit in the 3rd year of college will be: = $32,150

The total debt that one owes in the 3rf year will then be the addition of the debts from the 1st to the 3rd year and this will be:

= $31,300 + $31,900 + $32,150

= $63,232

5 0
3 years ago
Read 2 more answers
Other questions:
  • As a manager of a small clothing store, Archer favors detailed job descriptions, formal rules and regulations, thorough records,
    13·1 answer
  • E11-22A (similar to) Question Help The Garver Restaurant Group manufactures the bags of frozen French fries used at its franchis
    6·1 answer
  • Star Inc., an engineering firm, has come up with a new technical test to assess the knowledge of interviewees. To assess the val
    6·1 answer
  • The method for providing solutions to union-management conflicts over interpretation or violation of a collective bargaining agr
    5·2 answers
  • Select all of the true statments about financial literacy
    13·1 answer
  • A consumer product for which buyers will not accept a substitute, for which purchasers do not compare alternatives, and that is
    13·1 answer
  • Knox operates an electronics store as sole proprietor. On April 5, Knox was involuntarily petitioned into bankruptcy under the l
    5·1 answer
  • If a consumer buys flour because he loves baking, the flour is counted as part of GDP. If a bakery buys flour as an input to bak
    9·1 answer
  • Cheyenne Corp. incurred the following costs while manufacturing its product.
    15·1 answer
  • Help please!!
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!