chapter

    Algorithm Basics and Analysis Practice Questions for Cmi M.sc. and Ph.d. Computer Science

    Solve 0+ Algorithm Basics and Analysis practice questions for CMI M.Sc. and Ph.D. Computer Science with answers and detailed solutions. Free sample questions

    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.

    Algorithm Basics and Analysis Practice Questions for CMI M.Sc. and Ph.D. Computer Science

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

    The five properties of an algorithm

    Intuition

    The five properties of an algorithm

    An algorithm is a finite sequence of definite, effective instructions that transforms zero or more inputs into at least one output and terminates.

    The problem it solves

    You write instructions to compute . The instructions must end after finitely many steps, each step must be unambiguous, the instructions must accept as input, they must produce the sum as output, and each step must be something you can actually carry out. The analogy to a recipe stops at vagueness: a recipe can say "add salt to taste", but an algorithm cannot tolerate ambiguity.

    The idea made exact

    The five properties are finiteness, definiteness, input, output, and effectiveness. Finiteness means the procedure halts after a bounded number of steps. Definiteness means each step has a single, clear meaning. Input means the procedure accepts zero or more values. Output means the procedure produces at least one value. Effectiveness means each step can be carried out exactly and in finite time by a person using pencil and paper.

    finiteness definiteness input output effectiveness

    Why each property is necessary

    Derivation

    Why each property is necessary

    Each property prevents a specific failure mode in a computational procedure.

    computational procedure five properties
    1. Step 1: without finiteness, the procedure never produces output, so it fails its purpose.prevents infinite execution
    2. Step 2: without definiteness, the same input can lead to different executions, so the result is not reproducible.prevents ambiguity
    3. Step 3: the input property allows zero or more inputs; an algorithm with zero inputs is valid.allows constant algorithms
    4. Step 4: without the output property, the procedure produces nothing, so it is useless.prevents silent execution
    5. Step 5: without effectiveness, a step like "compute the exact value of " cannot be carried out in finite time.prevents uncomputable steps
    Result

    An algorithm must satisfy all five properties to be considered a valid computational procedure.

    CHECK

    The sum algorithm terminates after additions (finiteness), each addition is definite (definiteness), takes as input, outputs the sum, and uses only integer addition (effective).

    More practice questions in this unit