chapter

    Searching Algorithms Practice Questions for Cmi M.sc. and Ph.d. Computer Science

    Solve 0+ Searching Algorithms practice questions for CMI M.Sc. and Ph.D. Computer Science with answers and detailed solutions. Free sample questions below.

    Free preview ends here

    Login to view the complete practice questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Searching Algorithms Practice Questions for CMI M.Sc. and Ph.D. Computer Science

    Solve 0+ Searching Algorithms practice questions for CMI M.Sc. and Ph.D. Computer Science with answers and detailed solutions. Free sample questions below.

    Formulating the search problem and search space

    Intuition

    Formulating the search problem and search space

    A search problem asks us to find an element in a candidate set that satisfies a verification rule , using a query model that reveals information about .

    The problem it solves

    You look for a specific book in a library by checking shelves one by one. The exact version separates the candidate set from the verification rule. The search space contains all possible candidates. The predicate returns true if is the target. A query model defines what information we can extract about .

    The idea made exact

    We thread a running example with items. Let . Let the target be . The predicate is . A query asks if is true for a chosen .

    analogy breaks when books teleport

    Information theoretic lower bound for comparison queries

    Derivation

    Information theoretic lower bound for comparison queries

    Guessing a number from one to eight takes at most three yes or no questions. Any comparison-based search algorithm requires at least queries in the worst case.

    This bound relies purely on the number of possible outcomes, ignoring the algorithm design.

    assumes two-outcome queries assumes distinct targets worst-case over all instances
    1. Assume the search space has size . fix the candidate set.
    2. Each query has at most two outcomes, true or false. binary branching.
    3. A decision tree of depth has at most leaves. each level doubles the leaves.
    4. The algorithm must distinguish all possible targets. one leaf per target.
    5. Therefore, the tree needs at least leaves. pigeonhole on targets.
    6. This requires . capacity bound.
    7. Solving for gives . take logarithm.
    8. For , we need . plug in the example.
    Result
    Check

    If , the bound gives queries.

    More practice questions in this unit