chapter

    Algorithm Basics and Analysis Short Notes for Cmi M.sc. and Ph.d. Computer Science

    Algorithm Basics and Analysis short notes for CMI M.Sc. and Ph.D. Computer Science: 18 study cards covering concepts, formulas, shortcuts and exam traps, plus

    Algorithm Basics and Analysis short notes

    If You See This Do This

    If You See This Do This
    If you seeDo this
    "five properties" askedlist finiteness, definiteness, input, output, effectiveness
    "algorithm vs program" askedcheck if the program always terminates
    "must have input" seenfalse, zero inputs is valid
    "must be efficient" seenfalse, efficiency is separate from being an algorithm
    "identify algorithms" askedcheck all five properties, especially termination and effectiveness
    "not an algorithm" askedlook for infinite loops, ambiguous steps, or uncomputable operations

    Formulas and Their Limits

    Formulas and Their Limits
    PropertyValid whenBreaks when
    Finitenessloop variables change toward terminationloop variable is never modified
    Definitenessoperations are well-definedsteps allow multiple interpretations
    Inputalways (zero or more)never
    Outputalways (at least one)procedure produces nothing
    Effectivenessoperations are basicoperations require infinite precision

    Three Second Sanity Checks

    Three Second Sanity Checks
    CheckEliminates
    Limiting case options requiring at least one iteration
    Dimension check: steps are a pure countoptions depending on the values being summed
    Sign check: steps are non-negativeoptions with negative counts
    Symmetry check: sum is order-independentorder-dependent options

    15 more cards in this chapter

    Free preview ends here

    Login to view the complete short notes

    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 Short Notes for CMI M.Sc. and Ph.D. Computer Science

    Algorithm Basics and Analysis short notes for CMI M.Sc. and Ph.D. Computer Science: 18 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.

    If You See This Do This

    If You See This Do This
    If you seeDo this
    "five properties" askedlist finiteness, definiteness, input, output, effectiveness
    "algorithm vs program" askedcheck if the program always terminates
    "must have input" seenfalse, zero inputs is valid
    "must be efficient" seenfalse, efficiency is separate from being an algorithm
    "identify algorithms" askedcheck all five properties, especially termination and effectiveness
    "not an algorithm" askedlook for infinite loops, ambiguous steps, or uncomputable operations

    Formulas and Their Limits

    Formulas and Their Limits
    PropertyValid whenBreaks when
    Finitenessloop variables change toward terminationloop variable is never modified
    Definitenessoperations are well-definedsteps allow multiple interpretations
    Inputalways (zero or more)never
    Outputalways (at least one)procedure produces nothing
    Effectivenessoperations are basicoperations require infinite precision

    Three Second Sanity Checks

    Three Second Sanity Checks
    CheckEliminates
    Limiting case options requiring at least one iteration
    Dimension check: steps are a pure countoptions depending on the values being summed
    Sign check: steps are non-negativeoptions with negative counts
    Symmetry check: sum is order-independentorder-dependent options

    If You See This Do This

    Triggers

    If You See This Do This

    If you seeDo this
    Need to prove loop correctnessFind a loop invariant
    Need to prove terminationFind a variant function
    Loop invariant must hold before loopCheck initialization
    Loop invariant must hold after bodyCheck maintenance
    Loop endsCheck
    Variant must decreaseCheck strictly decreases each iteration

    More short notes in this unit