1. Home
  2. Explore
  3. Computer Science
  4. Introduction to Algorithms

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Introduction to Algorithms

  • 92Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Algorithm Foundations
In its modern meaning, an algorithm is a procedure or set of rules for
.

92 questions

  1. 1
    In its modern meaning, an algorithm is a procedure or set of rules for
    _____
    .
    Hint

    Think of the general purpose of a sequence of procedural instructions.

    Answer

    doing something

  2. 2
    An effective method uses a finite number of exact
    _____
    .
    Hint

    These are the individual directions that make up the method.

    Answer

    instructions

  3. 3
    For a problem in its class, an effective method always stops after a finite number of
    _____
    .
    Hint

    The method must terminate rather than continue indefinitely.

    Answer

    steps

  4. 4
    An effective method must produce the
    _____
    answer.
    Hint

    The method must solve the problem accurately, not merely terminate.

    Answer

    correct

  5. 5
    In principle, an effective method can be carried out by any human using no aids except
    _____
    .
    Hint

    The definition allows a person to record calculations but not rely on special machinery.

    Answer

    writing materials

  6. 6
    An effective method works when its instructions are followed
    _____
    .
    Hint

    The user must adhere closely to every instruction.

    Answer

    rigorously

  7. 7
    An algorithm’s instructions must be
    _____
    so that their meaning is clear.
    Hint

    The instructions should not permit conflicting interpretations.

    Answer

    unambiguous

  8. 8
    An algorithm is deterministic if repeated runs always produce the
    _____
    answer.
    Hint

    Determinism concerns whether repeated executions agree in their outcome.

    Answer

    same

  9. 9
    A non-deterministic route-finding algorithm may choose different routes because conditions and other
    _____
    vary.
    Hint

    The route can change when the information supplied to the algorithm changes.

    Answer

    inputs

  10. 10
    Early algorithms were designed to be carried out by
    _____
    rather than only by machines.
    Hint

    Before electronic computers, people could perform systematic calculations.

    Answer

    humans

  11. 11
    Al-Khwarizmi took Indian numbering and presented it under the name
    _____
    numbering.
    Hint

    The historical label reflects the culture through which the system was introduced to others.

    Answer

    Arabic

  12. 12
    The word “algorithm” developed after Al-Khwarizmi’s name was Latinized as
    _____
    .
    Hint

    This Latinized form is identified as the direct source of the modern word.

    Answer

    Algoritmi

  13. 13
    Bubble sort examines neighboring items pairwise and swaps them when they are in the
    _____
    order.
    Hint

    For an ascending sort, the larger item should not remain before the smaller one.

    Answer

    wrong

  14. 14
    When sorting into ascending order, a completed list places the small numbers on the
    _____
    and the large numbers on the right.
    Hint

    The sorted sequence runs from smaller values toward larger values.

    Answer

    left

  15. 15
    If a bubble-sort list is already in order and the algorithm stops after checking it once, its best-case step complexity is
    _____
    .
    Hint

    The algorithm needs only one pass through the items.

    Answer

    N

  16. 16
    For bubble sort, reverse-ordered data create the worst case because items must move through repeated
    _____
    .
    Hint

    The algorithm repeatedly traverses the list to move out-of-place values.

    Answer

    sweeps

  17. 17
    In bubble sort’s worst case, N sweeps each taking N steps give a complexity of
    _____
    .
    Hint

    Multiply the number of passes by the work in each pass.

    Answer

    N squared

  18. 18
    The number of computational steps as a function of input size is called
    _____
    complexity.
    Hint

    This complexity describes how the amount of work scales with the problem size.

    Answer

    time

  19. 19
    The amount of storage an algorithm requires is its
    _____
    complexity.
    Hint

    This measure concerns memory or storage rather than execution steps.

    Answer

    space

  20. 20
    When computer scientists discuss complexity without further qualification, they usually mean
    _____
    complexity.
    Hint

    The default measure is generally about computational work, not memory.

    Answer

    time

  21. 21
    The notation commonly used to describe how an algorithm scales is
    _____
    notation.
    Hint

    It expresses growth rates while abstracting away from the specific computer.

    Answer

    Big-O

  22. 22
    Merge sort works by splitting data into smaller parts, sorting them, and then
    _____
    the sublists.
    Hint

    The final stage combines the sorted pieces into a larger sorted list.

    Answer

    merging

  23. 23
    The sorting algorithm associated with Tim Peters and used in languages and systems such as Python is
    _____
    .
    Hint

    Its name combines the creator’s first name with the word “sort.”

    Answer

    Timsort

  24. 24
    A simulation that runs an algorithm many times on varied data to observe its behavior is called a
    _____
    simulation.
    Hint

    This method uses repeated trials to investigate outcomes.

    Answer

    Monte Carlo

  25. 25
    A method that can be performed by a deterministic Turing machine in polynomial time belongs to the class
    _____
    .
    Hint

    This class is treated as the collection of efficiently solvable decision problems.

    Answer

    P

  26. 26
    The Cobham–Edmonds thesis treats problems solvable in
    _____
    time as the “nice” problems.
    Hint

    The relevant growth category includes, for example, linear and quadratic scaling.

    Answer

    polynomial

  27. 27
    The Cobham–Edmonds view focuses on how a problem’s cost scales as its input gets
    _____
    .
    Hint

    It considers growth with problem size rather than the computer’s identity.

    Answer

    bigger

  28. 28
    Big-O-style scaling comparisons ignore the computer being used and the constant
    _____
    in the complexity.
    Hint

    A fixed multiplier is not the main concern in asymptotic growth comparisons.

    Answer

    factors

  29. 29
    An algorithm with polynomial complexity is often described as having
    _____
    complexity.
    Hint

    The growth rate is expressed using a power of the input size.

    Answer

    polynomial

  30. 30
    The lecture warns that many practical algorithms do not belong to the supposedly easy subset called
    _____
    .
    Hint

    This is the class associated with polynomial-time decision problems.

    Answer

    P

  31. 31
    A problem outside P is not automatically impossible to solve; it may instead be extremely
    _____
    as the input grows.
    Hint

    The concern is the amount of resources required, not necessarily whether any solution exists.

    Answer

    impractical

  32. 32
    An algorithm requiring exponential growth can eventually become less practical than a polynomial-time algorithm, even when constants initially favor it, because of its
    _____
    .
    Hint

    Consider how rapidly the resource requirement grows with input size.

    Answer

    scaling

  33. 33
    Going through a data set just once gives the especially desirable complexity
    _____
    .
    Hint

    The work increases proportionally to the number of items.

    Answer

    order N

  34. 34
    The lecture lists log N and N log N among the commonly desirable complexity rates before more costly
    _____
    growth.
    Hint

    These rates are discussed as part of a hierarchy of algorithmic growth.

    Answer

    polynomial

  35. 35
    The traveling salesperson problem asks for a shortest tour that visits every site once and returns to the
    _____
    .
    Hint

    The version discussed is a closed circuit rather than a one-way trip.

    Answer

    starting point

  36. 36
    A valid TSP tour must visit all the points without visiting any point
    _____
    .
    Hint

    Each site is visited once during the tour.

    Answer

    multiple times

  37. 37
    The traveling salesperson problem can be represented using a
    _____
    of locations and connecting distances.
    Hint

    Computer scientists commonly model sites as nodes and routes as connections.

    Answer

    graph

  38. 38
    A brute-force TSP search checks possible tours by considering each possible ordering of the
    _____
    .
    Hint

    In the lecture’s example, these are the locations Sir Christopher Wren might visit.

    Answer

    Churches

  39. 39
    With one location fixed as the starting point, the 13-location example has 12 factorial possible visit orders, or about
    _____
    million.
    Hint

    The lecture rounds the result of multiplying 12 by 11 and continuing downward.

    Answer

    500

  40. 40
    The number of orders for a brute-force tour grows factorially, so increasing the number of sites can make the search
    _____
    .
    Hint

    The growth quickly overwhelms realistic computing resources.

    Answer

    hideously impractical

  41. 41
    The nearest-neighbor algorithm repeatedly moves to the closest location that has not yet been
    _____
    .
    Hint

    At each step it selects a nearby unchosen site.

    Answer

    visited

  42. 42
    Because nearest neighbor can start at different locations, its tour length can vary with the
    _____
    location.
    Hint

    Changing the first site can change every later nearest choice.

    Answer

    starting

  43. 43
    A feasible TSP route gives an
    _____
    bound on the optimum because the optimum cannot be longer than that route.
    Hint

    This bound limits the best possible route from above.

    Answer

    upper

  44. 44
    A lower bound indicates a distance the optimal TSP tour cannot be
    _____
    .
    Hint

    It describes the best-case limit on how short a solution could be.

    Answer

    better than

  45. 45
    The Held–Karp algorithm provides an
    _____
    solution to TSP, though its complexity remains unsuitable for many large instances.
    Hint

    Unlike an approximation, it returns the optimum for the instances it can solve.

    Answer

    exact

  46. 46
    The Christofides algorithm guarantees a route no longer than one and a half times the
    _____
    .
    Hint

    Its guarantee compares the approximate route with the best possible tour.

    Answer

    optimum

  47. 47
    An approximate algorithm is particularly useful for a difficult problem when it runs efficiently and has a known bound on how far its answer is from the
    _____
    .
    Hint

    The guarantee measures the quality of the approximation against the best solution.

    Answer

    optimum

  48. 48
    The newer improvement to Christofides described in the lecture changes the approximation factor by an amount on the order of 10 to the power of minus
    _____
    .
    Hint

    The improvement is described as extraordinarily small.

    Answer

    36

  49. 49
    Repeating a computer operation again and again is called
    _____
    .
    Hint

    This control structure performs a step multiple times.

    Answer

    iteration

  50. 50
    In recursion, an algorithm essentially calls
    _____
    with different parameters.
    Hint

    The defining structure involves a procedure invoking another instance of that procedure.

    Answer

    itself

  51. 51
    A recursive definition of factorial expresses the factorial of N using N multiplied by the factorial of
    _____
    .
    Hint

    The definition reduces the input to a smaller case.

    Answer

    N minus one

  52. 52
    In modern computer science, recursion refers specifically to a structure in which a procedure calls
    _____
    .
    Hint

    Do not confuse this technical meaning with older, broader uses of the word.

    Answer

    itself

  53. 53
    A flowchart represents an algorithm using a standardized set of
    _____
    .
    Hint

    Different shapes indicate different kinds of steps or decisions.

    Answer

    symbols

  54. 54
    Frank and Lillian Gilbreth are associated with developing flowcharts to model human activity in time-and-motion
    _____
    .
    Hint

    Their work analyzed how tasks and processes were carried out.

    Answer

    studies

  55. 55
    Pseudocode describes an algorithm as a list of instructions, but unlike flowcharts it has no widely used international
    _____
    .
    Hint

    Different writers may express the same steps in different ways.

    Answer

    standard

  56. 56
    The Entscheidungsproblem asks whether a formula can be shown to follow from a specified set of
    _____
    .
    Hint

    These are the foundational statements from which a formal system derives results.

    Answer

    axioms

  57. 57
    The lecture states that the general Entscheidungsproblem has a negative answer: the derivability question cannot always be decided by a general
    _____
    .
    Hint

    The question concerns whether a systematic procedure can solve every instance.

    Answer

    method

  58. 58
    Alonzo Church’s lambda calculus is an algebraic way of representing
    _____
    and functions.
    Hint

    It provides a formal language for expressing function-related operations.

    Answer

    algebra

  59. 59
    A Turing machine is a formal model of computation that uses a tape and a set of
    _____
    .
    Hint

    The machine’s behavior is specified by a program that tells it what to do.

    Answer

    instructions

  60. 60
    In the simple Turing machine shown in the lecture, the tape stores the binary digits
    _____
    .
    Hint

    The machine’s tape uses two possible symbols.

    Answer

    one or zero

  61. 61
    The Church–Turing thesis states that every algorithm has an equivalent
    _____
    and vice versa.
    Hint

    The thesis links an informal procedure to a formal model of computation.

    Answer

    Turing machine

  62. 62
    In a Universal Turing machine, the program is also represented on the
    _____
    .
    Hint

    The machine’s input and instructions can be encoded in the same medium.

    Answer

    tape

  63. 63
    The halting problem asks whether a given program running on a Turing machine will eventually
    _____
    .
    Hint

    The question is whether execution terminates or continues forever.

    Answer

    stop

  64. 64
    A problem for which no algorithm can always provide an answer is fundamentally
    _____
    by algorithms.
    Hint

    The issue is not merely that solving it takes a long time.

    Answer

    unsolvable

  65. 65
    A decision problem is a problem whose answer is
    _____
    .
    Hint

    Its output belongs to one of two possible categories.

    Answer

    yes or no

  66. 66
    A numerical question can be converted into a decision problem by asking whether a stated equality is
    _____
    .
    Hint

    For example, ask whether a proposed equation holds.

    Answer

    true

  67. 67
    The P class contains decision problems solvable in polynomial time by a
    _____
    Turing machine.
    Hint

    The machine follows a fixed computation rather than making nondeterministic choices.

    Answer

    deterministic

  68. 68
    The class NP is defined in terms of solutions that can be
    _____
    in polynomial time.
    Hint

    Checking a proposed answer can be easier than finding one.

    Answer

    verified

  69. 69
    The Sudoku example illustrates that checking a completed grid can be easier than
    _____
    a valid completion.
    Hint

    Verification and construction need not have the same difficulty.

    Answer

    finding

  70. 70
    In a valid Sudoku grid, every row, column, and three-by-three subgrid contains the digits one through nine with no
    _____
    .
    Hint

    Each group must contain each digit exactly once.

    Answer

    repeats

  71. 71
    A minimal Sudoku grid is one in which removing any clue makes the solution no longer
    _____
    .
    Hint

    Each remaining clue is necessary to preserve a uniquely determined solution.

    Answer

    unambiguous

  72. 72
    Every problem in P is also in
    _____
    because a solution that can be found in polynomial time can also be checked in polynomial time.
    Hint

    This class includes problems whose proposed solutions can be verified efficiently.

    Answer

    NP

  73. 73
    A problem is NP-complete when it is in NP and other problems in NP can be transformed to it through suitable
    _____
    .
    Hint

    These transformations show that solving one problem can encode another.

    Answer

    reductions

  74. 74
    A problem that is at least as hard as NP-complete problems is described as
    _____
    .
    Hint

    This label includes problems that may be harder than the problems in NP.

    Answer

    NP-hard

  75. 75
    The central unresolved question asks whether
    _____
    .
    Hint

    It asks whether efficiently verifiable problems can also be efficiently solved.

    Answer

    P equals NP

  76. 76
    The Clay Mathematics Institute offers a million dollars for a proof resolving whether P equals
    _____
    .
    Hint

    The prize concerns the famous P-versus-? question.

    Answer

    NP

  77. 77
    The class co-NP concerns problems where it is easy to exclude
    _____
    answers.
    Hint

    This class is described in terms of efficiently checking that a proposed answer does not work.

    Answer

    wrong

  78. 78
    PSPACE contains problems solvable using a polynomial amount of memory, even if the computation takes
    _____
    time.
    Hint

    The definition restricts space rather than the duration of computation.

    Answer

    unlimited

  79. 79
    BPP is the class associated with problems solvable probabilistically in
    _____
    time.
    Hint

    The class combines randomized computation with an efficient growth bound.

    Answer

    polynomial

  80. 80
    BQP is presented as the quantum computing analogue of
    _____
    .
    Hint

    Both classes concern efficient computation, but one uses a quantum model.

    Answer

    BPP

  81. 81
    Problems requiring exponential time even to check are placed in the class
    _____
    .
    Hint

    The lecture’s clip uses this label for a class beyond NP, with chess move selection as an example.

    Answer

    X

  82. 82
    The lecture says that the general problem of finding primes was shown to belong to
    _____
    .
    Hint

    The result established that prime finding can be performed in polynomial time.

    Answer

    P

  83. 83
    Public-key cryptography can exploit an asymmetry in which a legitimate user verifies or decodes efficiently while an eavesdropper faces a harder
    _____
    .
    Hint

    The security idea relies on unequal computational difficulty for different tasks.

    Answer

    problem

  84. 84
    If P were equal to NP, some public-key cryptography systems could potentially
    _____
    .
    Hint

    The concern is that tasks designed to be hard might become efficiently solvable.

    Answer

    fail

  85. 85
    An algorithm can produce biased decisions when its input data encode unfair
    _____
    .
    Hint

    The system may reproduce correlations present in its training or scoring data.

    Answer

    patterns

  86. 86
    A fraud-detection system became biased when it used credit scoring correlated with where people lived, while residence was correlated with
    _____
    .
    Hint

    The unintended proxy linked geography to a protected characteristic.

    Answer

    ethnicity

  87. 87
    In the lecture’s account, bias in an algorithm may result from its design rather than the algorithm being inherently
    _____
    .
    Hint

    The system’s choices and data can produce discriminatory outcomes without the procedure having human intentions.

    Answer

    racist

  88. 88
    One modern goal in computer science is to develop algorithms and training data that are less
    _____
    .
    Hint

    The aim is to reduce unfair or discriminatory decisions.

    Answer

    biased

  89. 89
    When a device receives software updates or learns from experience, its behavior may drift away from its original
    _____
    .
    Hint

    The design requirements described when the system was purchased may no longer match what it does.

    Answer

    specification

  90. 90
    To trust a changing algorithmic system, it is important to consider whether its behavior can be verified and
    _____
    .
    Hint

    These practices assess whether the system produces the outputs it should.

    Answer

    tested

  91. 91
    In the A-level grading example, the algorithm’s predictions disadvantaged some students, but the lecture identified the deeper failure as a failure by
    _____
    .
    Hint

    The criticism focuses on decision-makers who did not anticipate the human consequences.

    Answer

    politicians

  92. 92
    The A-level grading controversy showed that an algorithm can fail socially when decision-makers do not anticipate its effects on fairness and
    _____
    .
    Hint

    Students were especially concerned with whether the process treated them fairly.

    Answer

    justice

1 of 92
Question 1 of 92

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent