Introduction to Algorithms
- 65Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
65 questions
- 1An algorithm is_____that takes inputs and produces an output.
Hint
Think of the general kind of process an algorithm is.
Answer
a computational procedure
Explanation
An algorithm is a computational procedure that takes inputs, carries out steps, and produces an output.
- 2As a way of describing its purpose, an algorithm is a_____for solving a problem.
Hint
Think of a set of instructions for carrying out a computation.
Answer
a computational recipe
Explanation
An algorithm can be understood as a computational recipe for solving a problem of interest.
- 3The values supplied to an algorithm before it computes are its_____.
Hint
These are the values supplied to the procedure before it runs.
Answer
inputs
Explanation
An algorithm receives inputs, performs a computation, and provides outputs.
- 4After processing its inputs, an algorithm provides_____.
Hint
These are the results provided after the procedure runs.
Answer
outputs
Explanation
An algorithm produces outputs from its inputs after carrying out its computation.
- 5When actual values are plugged in for a problem's inputs, the resulting case is called an_____.
Hint
This is the term for a particular case created by choosing input values.
Answer
instance
Explanation
An instance of a problem is formed when actual values are plugged in for the problem's inputs.
- 6An algorithm tells a computer how to perform a computation through a_____.
Hint
Think of how a recipe directs someone through a process.
Answer
step-by-step procedure
Explanation
An algorithm specifies a sequence of steps for performing a computation.
- 7After an algorithm receives an instance, its execution is_____rather than creative.
Hint
The procedure follows its instructions automatically and consistently.
Answer
mechanical
Explanation
Once an instance is supplied, the algorithm runs mechanically rather than relying on creativity during execution.
- 8Modern algorithms are abstract computational recipes meant to be implemented on a_____.
Hint
Think of the machine on which modern algorithms are intended to run.
Answer
computer
Explanation
Algorithms are abstract recipes for computation that are meant to be implemented on a computer.
- 9For the problem of multiplying integers m and n, the required output is_____.
Hint
Identify the result of multiplying the two input values.
Answer
the product of m and n
Explanation
For the multiplication problem, the inputs are the integers m and n, and the required output is their product.
- 10The multiplication example becomes a particular instance when n and m are set to_____.
Hint
Recall the specific pair of values used to illustrate an instance.
Answer
121 and 234
Explanation
Choosing n = 121 and m = 234 gives a particular instance of the two-number multiplication problem.
- 11When multiplying 121 by 234 using the grade-school method, the first partial product, from the digit 4, is_____.
Hint
Multiply the multiplicand 121 by the ones digit of 234.
Answer
484
Explanation
In the grade-school multiplication example, multiplying 121 by the ones digit 4 gives the first partial product, 484.
- 12In grade-school multiplication, the partial product from the tens digit is shifted_____to the left.
Hint
Consider the place value of the digit 3 in 234.
Answer
one place
Explanation
The partial product from the tens digit is shifted one place to the left to reflect that the digit represents tens.
- 13The partial product obtained by multiplying 121 by the digit 3 is_____.
Hint
Multiply 121 by the tens digit before applying its place-value shift.
Answer
363
Explanation
Multiplying 121 by the digit 3 gives 363; in the full calculation, its place-value shift represents 3630.
- 14The partial product obtained by multiplying 121 by the digit 2 is_____.
Hint
Multiply 121 by the hundreds digit of 234.
Answer
242
Explanation
Multiplying 121 by the hundreds digit 2 gives the partial product 242, which represents 24200 after accounting for place value.
- 15When adding the multiplication partial products, a value that exceeds one digit is handled by_____.
Hint
Think of the operation that moves a value into the next column during addition.
Answer
carrying
Explanation
The grade-school addition of the partial products uses carrying when a column's total exceeds a single digit.
- 16Algorithms are not a modern invention; they have existed since the_____world.
Hint
Think of how far back computational procedures extend in human history.
Answer
ancient
Explanation
Algorithms are not a modern invention; procedures for computation have existed since ancient times.
- 17Some of the earliest algorithms were_____used to carry out calculations.
Hint
These early procedures operated on numbers and calculations.
Answer
numerical algorithms
Explanation
Some of the earliest known algorithms were numerical procedures, including methods for multiplying numbers.
- 18One practical reason people needed to multiply measured side lengths was to calculate_____.
Hint
Consider a quantity found by measuring both sides of a rectangle and multiplying them.
Answer
the area of a rectangular piece of land
Explanation
Measuring the sides of a rectangular plot and multiplying them was one practical reason people needed numerical algorithms.
- 19Algorithms and calculations were used to predict when_____would occur.
Hint
This is one of the astronomical events mentioned as something people sought to predict.
Answer
the next eclipse
Explanation
People used calculations to predict celestial and natural events, including the next eclipse.
- 20Ancient Chinese mathematicians used algorithms to calculate on_____.
Hint
Think of the counting device used for calculations in the example.
Answer
the abacus
Explanation
The content describes ancient Chinese mathematicians using algorithms to calculate on the abacus.
- 21Ancient Indian mathematicians invented what is now called the_____.
Hint
This number system represents a digit's value according to its position.
Answer
place value number system
Explanation
Ancient Indian mathematicians invented the place value number system, which enabled important arithmetic methods.
- 22Along with the place value number system, Indian mathematicians developed_____.
Hint
These procedures apply arithmetic operations within the number system.
Answer
arithmetic algorithms
Explanation
The development of the place value number system was accompanied by arithmetic algorithms for using it.
- 23The Greek method for calculating gcds described in the content is the_____.
Hint
This ancient method is named after a Greek mathematician and computes gcds.
Answer
Euclidean algorithm
Explanation
Greek mathematicians developed the Euclidean algorithm for calculating greatest common divisors, or gcds.
- 24The ancient algorithm mentioned for finding whether numbers are prime is_____.
Hint
Think of the ancient prime-finding method that repeatedly filters out multiples.
Answer
Eratosthenes' sieve
Explanation
The sieve of Eratosthenes is an ancient algorithm for identifying prime numbers.
- 25Calculations used to organize and predict calendar cycles are called_____.
Hint
These calculations help organize dates and cycles in a calendar.
Answer
calendrical calculations
Explanation
People used algorithms for calendrical calculations, alongside calculations for predicting eclipses, full moons, and tides.
- 26The name from which the word algorithm ultimately derives is that of the mathematician_____.
Hint
Recall the mathematician whose name is connected to the origin of the word algorithm.
Answer
al-Khwarizmi
Explanation
The word algorithm is traced to the name of the mathematician al-Khwarizmi, whose name was associated with the place Khwarazm.
- 27Although they became known in the West as Arabic numerals, they were invented by_____.
Hint
The numerals' Western name does not identify the people credited with inventing them in the content.
Answer
Indian mathematicians
Explanation
The numerals called Arabic numerals in the West were invented by Indian mathematicians and were transmitted through Arab traders.
- 28The demand for efficient algorithms grew dramatically with the advent of_____.
Hint
This invention made large-scale automated calculation practical and changed the status of algorithms.
Answer
computers
Explanation
Before computers, algorithms were often treated as an afterthought; the advent of computers created demand for efficient procedures.
- 29To multiply thousands-digit numbers or test enormous numbers for primality, computing required_____.
Hint
These are procedures designed to perform computations effectively, especially at large scales.
Answer
efficient algorithms
Explanation
Computers made it valuable to study procedures that could carry out large calculations efficiently, such as multiplying very long numbers.
- 30After computers created demand for efficient procedures, the study of algorithms became_____.
Hint
Think of the elevated academic status algorithms gained after computers appeared.
Answer
a first-class field of study
Explanation
With computers, algorithm study became a discipline in its own right rather than merely an afterthought to mathematical results.
- 31The person who introduced the model of computation discussed in the content was_____.
Hint
Recall the British mathematician associated with the machine model of computation.
Answer
Alan Turing
Explanation
Alan Turing developed a model of computation in the 1930s that helped clarify what a computational procedure means.
- 32Turing's model of computation is called a_____.
Hint
This is the name of the idealized model developed by Turing.
Answer
Turing machine
Explanation
Turing called his model of computation a Turing machine; it provides a formal framework for describing computation.
- 33Turing's model helped clarify what counts as a valid_____.
Hint
This is the idea whose meaning became clearer through a formal model of computation.
Answer
computational procedure
Explanation
The model of computation helped make the notion of a computational procedure well-defined rather than informal.
- 34The claim connecting the power of physically realizable computers to Turing machines is called the_____.
Hint
This named thesis connects physically realizable computers with Turing's model.
Answer
Church-Turing thesis
Explanation
The Church-Turing thesis states that any computer physically realizable in the world is no more powerful than a Turing machine, as described in the content.
- 35The two scholars named in the Church-Turing thesis are_____.
Hint
The names are the two people whose surnames appear in the thesis's title.
Answer
Alonzo Church and Alan Turing
Explanation
The Church-Turing thesis is associated with Alonzo Church and Alan Turing.
- 36The computer scientist described as highly influential in the study of modern algorithms is_____.
Hint
Recall the computer scientist associated with a major effort to collect and study algorithms.
Answer
Don Knuth
Explanation
The content identifies Don Knuth as instrumental in making the study of modern algorithms a serious area of computer science.
- 37To show restaurants near the searcher, a search engine can use the searcher's approximate_____.
Hint
This information indicates approximately where the person making the search is located.
Answer
GPS location
Explanation
A search engine can use the searcher's approximate GPS location to return nearby restaurants rather than restaurants in a distant region.
- 38A search engine can use a prebuilt_____to quickly look up locations and search terms.
Hint
Think of the prebuilt data structure that helps retrieve relevant results quickly.
Answer
index
Explanation
The search example uses an index built beforehand to connect geographical locations and search terms with relevant locations and information.
- 39The search index in the example is described as being more like a_____.
Hint
This is the data structure used as an analogy for the search index.
Answer
hash table
Explanation
The described search index is compared to a hash table, a data structure that supports fast lookups.
- 40In the restaurant-search example, each restaurant can be associated with customer_____.
Hint
This user-generated information may include ratings and comments about a restaurant.
Answer
reviews
Explanation
The search system can map each restaurant to information such as its reviews, helping assemble the result page.
- 41The search and page-generation process should take only_____to avoid feeling too slow.
Hint
This is the short response-time range described for the search process.
Answer
milliseconds to seconds
Explanation
The search must return results within milliseconds to seconds so that users do not perceive the page as too slow.
- 42Finding a route from address A to address B on a map is an example of the_____.
Hint
This problem seeks a route that minimizes distance or another path cost.
Answer
shortest path problem
Explanation
Finding a route between two addresses involves solving a shortest path problem on a map.
- 43A navigation service may compute_____as well as a shortest path.
Hint
These are other possible routes offered alongside the main route.
Answer
alternative paths
Explanation
Navigation services may provide alternative paths in addition to a shortest path so users can compare routes.
- 44To estimate travel time along a route, a navigation system considers_____.
Hint
This changing road condition data helps determine travel time.
Answer
current traffic information
Explanation
Navigation systems use current traffic information to estimate how long a route will take.
- 45Matching landed airplanes to airport gates is an example of an_____.
Hint
This problem concerns matching available resources to tasks or entities.
Answer
assignment problem
Explanation
Assigning each landed airplane to an available gate is an example of an assignment problem.
- 46Deciding the order in which planes use a runway is an example of a_____.
Hint
This type of problem determines when or in what order activities use limited resources.
Answer
scheduling problem
Explanation
Planning the order in which planes use runways or taxiways is a scheduling problem.
- 47A few runways serving many planes create a_____.
Hint
This condition arises when demand exceeds the available facilities or capacity.
Answer
resource constraint
Explanation
Airports have limited resources, such as a small number of runways and taxiways, while many planes need to use them.
- 48The scheduling of planes waiting to land is often done_____.
Hint
This describes how the air traffic manager often performs the scheduling rather than relying on automation.
Answer
manually
Explanation
The content notes that scheduling planes waiting to land is often handled manually, even though algorithms are relevant to such problems.
- 49Planning how available airplanes are assigned to routes is an example of_____problems.
Hint
This problem concerns choosing routes for vehicles to serve required journeys.
Answer
vehicle routing problems
Explanation
Planning how available airplanes serve the airline's routes is described as a vehicle routing problem.
- 50Bringing in a different plane when the scheduled aircraft is delayed or faulty illustrates_____problems.
Hint
This problem concerns assigning available vehicles to transportation needs.
Answer
vehicle assignment problems
Explanation
Replacing a delayed or faulty airplane with another aircraft to serve a route is an example of a vehicle assignment problem.
- 51When estimating the duration of a road journey, navigation algorithms use_____.
Hint
For road-route estimates, this is the up-to-date information used to assess delays.
Answer
current traffic information
Explanation
The route example considers traffic conditions, and transportation operations more broadly must respond to changing conditions that affect travel.
- 52The person responsible for scheduling planes waiting to land is the_____.
Hint
This person manages the flow of aircraft approaching and using an airport.
Answer
air traffic manager
Explanation
An air traffic manager coordinates planes waiting to land, especially when runway resources are limited.
- 53After an airplane lands, it must be assigned to one of the airport's_____.
Hint
These airport facilities are where passengers board or leave an aircraft.
Answer
gates
Explanation
After landing, each airplane must be assigned to a gate, making gate assignment a logistical challenge.
- 54Rather than reserving a specific airplane for every route, an airline usually schedules_____.
Hint
Think of the shared fleet that the airline allocates among its routes.
Answer
the airline's available airplanes
Explanation
Airlines generally schedule the airplanes they have available to the routes they need to fly rather than reserving one aircraft exclusively for each route.
- 55In the delivery-route example, the truck must return to its starting location, or_____.
Hint
This is the truck's home base and starting point for its delivery tour.
Answer
the depot
Explanation
In the package-delivery example, the truck must return to the same starting location, called the depot, after visiting delivery addresses.
- 56A delivery truck visiting many addresses and returning to its depot illustrates the_____.
Hint
This classic problem asks for a tour through locations that returns to its origin.
Answer
travelling salesperson problem
Explanation
Finding a truck tour that visits a set of addresses and returns to its starting point is described as the travelling salesperson problem.
- 57The travelling salesperson problem is described as_____to solve.
Hint
This describes the challenge of finding efficient solutions to the route-optimization problem.
Answer
very difficult
Explanation
The content emphasizes that the travelling salesperson problem is very difficult to solve efficiently.
- 58Efficiency gains in solving delivery-routing problems can result in_____.
Hint
Consider the practical benefit of reducing inefficiencies in delivery tours.
Answer
saving companies like FedEx a ton of money
Explanation
Even modest efficiency improvements in solving delivery-routing problems can produce substantial savings for companies such as FedEx.
- 59The residency matching program discussed in the content is based on the_____.
Hint
This matching procedure has a name associated with stable pairings.
Answer
Stable Marriage Algorithm
Explanation
The residency matching program described in the content is based on the Stable Marriage Algorithm.
- 60The system that assigns medical students to residency opportunities is the national_____.
Hint
This program coordinates medical trainees with hospitals and training positions.
Answer
residency match program
Explanation
The national residency match program assigns medical students to residency opportunities they seek.
- 61The economists associated with developing the Stable Marriage Algorithm are_____.
Hint
These are the two surnames associated with the stable matching algorithm in the lecture.
Answer
Gale and Shapley
Explanation
The content credits economists Gale and Shapley with the algorithm used for stable matching and notes that they received a Nobel Prize.
- 62Another application of stable matching is pairing_____.
Hint
This is another real-world matching application mentioned besides residency placement.
Answer
kidney donors to kidney patients
Explanation
Stable matching methods are also used to match kidney donors with kidney patients.
- 63Matching residents to hospital positions is an example of_____.
Hint
Think of the broad economic goal achieved by matching people with available opportunities.
Answer
efficient allocation of resources
Explanation
The matching algorithm helps allocate limited residency positions to trainees and hospitals in a way that serves the participants' needs.
- 64Along with improving efficiency and scheduling, algorithms help society_____.
Hint
This is one societal benefit of coordinating resources effectively.
Answer
avoid wastage
Explanation
Algorithms help society use resources efficiently, avoid waste, schedule activities, and assign jobs.
- 65The procedures that help run many everyday services, often without users noticing, are_____.
Hint
These computational procedures often operate behind the scenes in ordinary services.
Answer
algorithms
Explanation
Algorithms are used throughout everyday life, including searches, transportation, airport operations, delivery, and matching systems.

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