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

Speaker 1Speaker 2

Introduction to Algorithms

8:00
0:00-8:00
  1. Hope

    Welcome to our introduction to algorithms. Let’s begin with the basic question: what is an algorithm? In this course, we’ll treat it as a computational procedure—a recipe that takes inputs, performs steps, and produces an output.

  2. Corey

    So the input-output picture is a useful starting point, even if it doesn’t yet tell us what the steps are. Take multiplication: the inputs might be two integers, n and m, and the required output is their product, n times m.

  3. Hope

    Right. And if we plug in particular values—say, 121 and 234—we have an instance of the problem. The algorithm is the step-by-step procedure that tells us how to get the product for that instance.

  4. Corey

    A familiar example is the multiplication method many of us learned in school. Multiply by each digit, shift according to that digit’s place value, and add the partial products. For 121 times 234, those partial products are 484, 3,630, and 24,200; adding them gives 28,314.

  5. Hope

    The important point isn’t the particular arithmetic. It’s that the method gives you a mechanical sequence of steps. Once you have an instance, you follow the procedure rather than inventing a new solution on the spot.

  6. Corey

    And algorithms are much older than computers. People needed reliable ways to calculate, whether they were multiplying numbers to find the area of a piece of land or making calculations to anticipate events such as eclipses, full moons, and tides.

  7. Hope

    Different mathematical cultures developed different computational methods. The course introduction mentions calculations on the abacus in China, and ancient Indian mathematicians’ development of the place-value number system along with arithmetic procedures that used it.

  8. Corey

    It also points to Greek mathematical algorithms, including the Euclidean algorithm for finding a greatest common divisor, or GCD, and the sieve of Eratosthenes for identifying prime numbers. Algorithms were part of practical and mathematical life long before modern computing.

  9. Hope

    So what changed when computers arrived? The scale and speed of the calculations people wanted to do. Finding whether an enormous number is prime, or multiplying numbers with thousands or even a hundred thousand digits, is not practical to do by hand reliably.

  10. Corey

    Computers created a strong demand for efficient procedures, and that helped turn the study of algorithms into a field in its own right. Algorithms draw on mathematics, but they’re also central to computer science because they’re abstract procedures intended to be carried out by computers.

  11. Hope

    There’s also a foundational question: what exactly counts as a computational procedure? In the 1930s, Alan Turing proposed a mathematical model of computation, now called a Turing machine. It gave computer scientists a precise way to discuss what it means to compute.

  12. Corey

    The course mentions the Church–Turing thesis, associated with Alonzo Church and Alan Turing. In the account presented here, it says that any computer physically realizable in our world can do no more than a Turing machine. We won’t study Turing machines in detail in this class, but it’s useful to know that a formal model underlies the idea of computation.

  13. Hope

    Another key figure in the modern study of algorithms is Donald Knuth. His multi-volume work, The Art of Computer Programming, gathers and examines algorithms for many problems. The instructor describes it as an important reference work—not the textbook for this course.

  14. Corey

    For the course textbook, the introduction points to CLRS, named for Cormen, Leiserson, Rivest, and Stein. It describes CLRS as a comprehensive textbook covering many algorithms students are likely to encounter. Grokking Algorithms is also mentioned as a recommended optional book.

  15. Hope

    That’s the first big picture: an algorithm is a computational recipe with inputs and outputs, and a particular set of input values is an instance. Algorithms have a long history, but computers made their efficiency especially important and helped establish algorithm study as a major part of computer science.

  16. Corey

    Now let’s look at why algorithms matter in everyday life. A search engine is a good example. If you search for the best Greek restaurants, you expect relevant restaurants near you—not just a list of places in Greece.

  17. Hope

    Behind the scenes, the service can use your approximate location and an index built in advance. That index connects geographical locations with search terms, such as “Greek restaurants,” and those terms can lead to restaurant locations and reviews.

  18. Corey

    The system uses your query and location to find relevant results, gathers information such as reviews, and builds the page it sends back. All of this has to happen quickly—within milliseconds to seconds—so the search feels responsive.

  19. Hope

    Mapping applications offer another example. To route you from address A to address B, the application needs to locate both addresses on a map and solve a shortest-path problem. It may also calculate alternative routes.

  20. Corey

    Then it can take current traffic into account to estimate how long each route will take. That means the result depends on several algorithms working together, not just one isolated calculation.

  21. Hope

    Airports also rely on algorithmic problem-solving. They have limited resources—such as runways, taxiways, and gates—and many planes that need to use them. Assigning planes to gates is an assignment problem, while deciding the order for planes to use a runway is a scheduling problem.

  22. Corey

    The introduction notes that some air-traffic scheduling is handled manually, but the underlying problems still illustrate the kinds of tasks algorithms can help organize. And airport logistics extend beyond landing and takeoff: aircraft and checked bags also have to be coordinated.

  23. Hope

    Airlines must also match the aircraft they have available to the routes they need to fly. If a plane is delayed or has a technical problem, another aircraft may be brought into service. Those situations connect to vehicle-assignment and vehicle-routing problems.

  24. Corey

    Package delivery has similar challenges. A carrier such as FedEx has to get a package from one place to another using suitable transportation. At the local level, a truck may need to visit many delivery addresses and then return to its depot.

  25. Hope

    That route-planning challenge is related to the travelling salesperson problem, or TSP. The source emphasizes that it’s a very difficult problem, and that even improvements in solving it efficiently can save delivery companies a great deal of money.

  26. Corey

    Algorithms also help with matching people to opportunities. The National Resident Matching Program assigns medical students to residency positions at hospitals. The course introduction connects this kind of matching to the stable marriage algorithm, associated with economists David Gale and Lloyd Shapley.

  27. Hope

    The underlying challenge is to make matches that work well for both sides: applicants seeking positions and hospitals seeking trainees. The source also describes the approach as useful for matching kidney donors with patients who need transplants.

  28. Corey

    The larger lesson is that algorithms help society use limited resources: they can organize schedules, make assignments, plan routes, and match people or resources. They show up in digital services, transportation, delivery, and other parts of daily life.

  29. Hope

    So the next time a search engine quickly finds nearby restaurants, a map suggests a route, or a package arrives, consider the procedures working behind the scenes. Algorithms are not just classroom exercises; they help make complex systems run.

  30. Corey

    And that sets us up for the next part of the course: looking at how algorithms are described with pseudocode and beginning with a sorting algorithm. We’ve established what algorithms are and why they matter; next, we can start writing them down and studying them directly.

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent