Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 646887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:39:44+00:00 2026-05-13T21:39:44+00:00

Consider a disk file containing 100 records a. How many comparisons would be required

  • 0

Consider a disk file containing 100 records
a. How many comparisons would be required on the average to find a record using sequential search, if the record is known to be in the file?

I figured out that this is 100/2 = 50.

b. If the record has a 68% probability of being in the file, how many comparisons are required on average?

This is the part I’m having trouble with. At first I thought it was 68% * 50, but then realized that was wrong after thinking about it. Then I thought it was (100% – 68%) * 50, but I still feel that that is wrong. Any hints?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:39:44+00:00Added an answer on May 13, 2026 at 9:39 pm

    I’d break it down like this, into a weighted average.

    A 68% chance of it being in the file; under these circumstances an average of 50 comparisons will be needed from your result in part I.

    A 32% chance of the record NOT being in the file; under these circumstances you will need to look through every record, i.e 100 comparisons.

    0.68*50 + 0.32*100 = 66 comparisons on average.

    But it has been a while since I took a course on probability…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider a file on disk containing 100 records. For both searches, what is the
Consider the follow code that downloads a file from internet using Indy components: procedure
Consider having the following header file (c++): myclass.hpp #ifndef MYCLASSHPP_ #define MYCLASSHPP_ namespace A
Consider the following record: TMyRecord = record b: Boolean; // 3 bytes of padding
Consider a sparse file with 1s written to a portion of the file. I
Please consider : Manipulate[ Row[{ Graphics[Disk[]], Graphics[{ Polygon[{{0, 0}, {3, 0}, {3, 1}, {0,
Consider a .csproj containing the following directive: < Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> There's a standalone
wget http://www.example.com/file.doc downloads that file to the local disk. What is the equivalent of
Consider a disk with the following characteristics: Number of surface 16 Number of sectors
I'm doing some Wave file handling and have them read from disk into an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.