1.5「Stanford Algorithms」About the Course

In this video I'll talk about various aspects of the course, the topics that we'll cover, the kinds of skills you can expect to acquire, the kind of background that I expect, the supporting materials and the available tools for self assessment.

Let's start with the specific topics that this course is going to cover.

The course material corresponds to the first half of the ten week Stanford course.

It's taken by all computer science undergraduates, as well as many of our graduate students.

There will be five high level topics, and at times these will overlap.

The five topics are first of all, the vocabulary for reasoning about algorithm performance, the design and conquer algorithm design paradigm, randomization and algorithm design, primitives for reasoning about graphs, and the use and implementation of basic data structures.

The goal is to provide an introduction to and basic literacy in each of these topics.

Much, much more could be said about each of them, than we'll have time for here.

The first topic is the shortest, and probably also the driest.

But it's a prerequisite for thinking seriously about the design and analysis of algorithms.

The key concept here is big-O notation, which, conceptually, is a modeling choice about the granularity with which we measure a performance metric like the running time of an algorithm.

It turns out that the sweet spot for clear high level thinking about algorithm design, is to ignore constant factors and lower-order terms.

And to concentrate on how well algorithm performance scales with large input sizes.

Big O notation is the way to mathematize this sweet spot.

Now, there's no one silver bullet in algorithm design.

No single problem solving method that's guaranteed to unlock all of the computational problems that you're likely to face.

That said, there are a few general algorithm design techniques.

High level approaches to algorithm design that find successful application across a range of different domains.

These relatively widely applicable techniques are the backbone of a general algorithms course like this one.

In this course, we'll only have time to deeply explore one such algorithm design paradigm, namely that of the divide and conquer algorithms.

In the sequel course as we'll discuss, there's two other major algorithms on paradigms to get covered.

But for now, divide and conquer algorithm, the idea is to first break the problem into smaller problems which then gets solved recursively, and then to somehow quickly combine the solutions to the sub problems into one for the original problem that you actually care about.

So for example, in the last video.

We saw two algorithms of this sort, two divide and conquer algorithms from multiplying two large integers.

In later videos we will see a number of different applications.

We'll see how to design fast divide and conquer algorithms for problems ranging from sorting to matrix multiplication to nearest neighbor-type problems and computation of geometry.

In addition, we'll cover some powerful methods for reasoning about the running time of recursive algorithms like these.

As for the third topic.

A randomized algorithm is one that, in some sense, flips coins while it executes.

That is, a randomized algorithm will actually have different executions if you run it over and over again on a fixed input.

It turns out, and this is definitely not intuitive, that allowing randomization internal to an algorithm, often leads to simple, elegant, and practical solution to various computational problems.

The canonical example is randomized quick sort, and that algorithm and analysis we will cover in detail in a few lectures.

Randomized primality testing is another killer application that we'll touch on.

And we'll also discuss a randomized approach to graph partitioning.

And finally we'll discuss how randomization is used to reason about hash functions and hash maps.

One of the themes of this course, and one of the concrete skills that I hope you take away from the course, is, literacy with a number of computational primitives for operating on data, that are so fast, that they're, in some sense, essentially free.

That is, the amount of time it take to invoke one of these computational primitives is barely more than the amount of time you're already spending just examining or reading the input.

When you have a primitive which is so fast, that the running time is barely more than what it takes to read the input, you should be ready to apply it.

For example, in a preprocessing step, whenever it seems like it might be helpful.

It should just be there on the shelf waiting to be applied at will.

Sorting is one canonical example of a very fast, almost for-free primitive of this form.

But there are ones that operate on more complex data as well.

So recall that a graph is a data structure that has, on the one hand, vertices, and on the other hand, edges.

Which connects pair of vertices.

Graphs model, among any other things, different types of networks.

So even though graphs are much more complicated than mere arrays, there's still a number of blazingly fast primitives for reasoning about their structure.

In this class we'll focus on primitives for competing connectivity information and also shortest paths.

We'll also touch on how some primitives have been used to investigate the structure of information in social networks.

Finally, data structures are often a crucial ingredient in the design of fast algorithms.

A data structure's responsible for organizing data in a way that supports fast queries.

Different data structures support different types of queries.

I'll assume that you're familiar with the structures that you typically encounter in a basic programming class including arrays and vectors.

Lists, stacks, and queues.

Hopefully, you've seen at some point both trees and heaps, or you're willing to read a bit about them outside of the course, but we'll also include a brief review of each of those data structures as we go along.

There's two extremely useful data structures that we'll discuss in detail.

The first is balanced binary search trees.

These data structures dynamically maintain an ordering on a set of elements, while supporting a large number of queries that run in time logarithmic in the size of the set.

The second data structure we'll talk a fair bit about is hash tables or hash maps, which keep track of a dynamic set, while supporting extremely fast insert and lookup queries.

We'll talk about some canonical uses of such data structures, as well as what's going on under the hood in a typical implementation of such a data structure.

>> There's a number of important concepts in the design and analysis of algorithms that we won't have time to cover in this five week course.

Some of these will be covered in the sequel course, Design and Analysis of Algorithms II, which corresponds to the second half of Stanford's ten week course on this topic.

The first part of this sequel course focuses on two more algorithm design paradigms.

First of all, the design analysis of greedy algorithms with applications to minimum spanning trees, scheduling, and information theoretic coding.

And secondly, the design analysis of dynamic programming algorithms with example applications being in genome sequence alignment and the shortest path protocols in communication networks.

The second part of the sequel course concerns NP complete problems, and what to do about them.

Now, NP complete problems are problems that, assuming a famous mathematical conjecture you might have heard of, which is called the "P not equal to NP" conjecture, are problems that cannot be solved under this conjecture by any computationally efficient algorithm.

We'll discuss the theory of NP completeness, and, with a focus on what it means for you as an algorithm designer.

We'll also talk about several ways to approach NP complete problems, including: fast algorithms that correctly solve special cases; fast heuristics with provable performance guarantees; and exponential time algorithms that are qualitatively faster than brute force search.

Of course there are plenty of important topics that can't be fit into either of these two five-week courses.

Depending on the demand, there might well be further courses on more advanced topics.

Following this course is going to involve a fair amount of time and effort on your part.

So it's only reasonable to ask: What can you hope to get out of it? What skills will you learn? Well.

Primarily, you know, even though this isn't a programming class per se, it should make you a better programmer.

You'll get lots of practice describing and reasoning about algorithms, you'll learn algorithm design paradigms, so really high level problem-solving strategies that are relevant for many different problems across different domains, and tools for predicting the performance of such algorithms.

You'll learn several extremely fast subroutines for processing data and several useful data structures for organizing data that can be deployed directly in your own programs.

Second, while this is not a math class per se, we'll wind up doing a fair amount of mathematical analysis.

And this in turn will sharpen your mathematical analytical skills.

You might ask, why is mathematics relevant for a class in the design and analysis of algorithms, seemingly more of a programming class.

Well let me be clear.

I am totally uninterested in merely telling you facts or regurgitating code that you can already find on the web or in any number of good programming books.

My goal here in this class, and the way I think I can best supplement the resources that you probably already have access to is to explain why things are the way they are.

Why we analyze the algorithms in the way that we do, why various super fast algorithms are in fact super fast, and so on.

And it turns out that good algorithmic ideas usually require nontrivial mathematical analysis to understand properly.

You'll acquire fundamental insights into the specific algorithms and data structures that we discuss in the course.

And hopefully, many of these insights will prove useful, more generally, in your other work.

Third, and perhaps the most relevant for those of you who work in some other discipline: this course should help you learn how to think algorithmically.

Indeed after studying algorithms it's hard enough not to see them pretty much everywhere, whether you are riding an elevator, watching a flock of birds, buying and selling stocks out of your portfolio, even watching an infant learn.

As I said in the previous video algorithm thinking is becoming increasingly useful and prevalent if you are outside of computer science and technology like in biology, statistics and economics.

Fourth, if you're interested in feeling like a card carrying computer scientist, in some sense, then you'll definitely want basic literacy in all of the topics that we'll be covering.

Indeed, one of the things that makes studying algorithms so fun, is, it really feels like you're studying a lot of the greatest hits from the last 50 years of computer science.

So, after this class, no longer will you feel excluded at that computer science cocktail party when someone cracks a joke about Dijkstra's Algorithm.

Now you'll know exactly what they mean.

Finally, there's no question that studying this material is helpful for technical interview questions.

To be clear, my sole goal here is to teach you algorithms, not to prepare you for interviews, per se.

But over the years, countless students of mine have regaled me with stories about how mastering the concepts in this class enabled them to ace every technical question they were ever asked.

I told you, this is fundamental stuff.

So, what do I expect from you? Well, honestly, the answer is nothing.

After all isn't the whole point of a free online class like this one that anyone can take it and devote as much effort to it as they like.

So that said, as a teacher it's still useful to have one or more canonical students in mind.

And I thought I'd go ahead and be transparent with you about how I'm thinking about these lectures.

Who I have in mind that I'm teaching to.

So again, please don't feel discouraged if you don't conform to this canonical student template.

I'm happy to have the opportunity to teach you about algorithms no matter who you are.

So first, I have in mind someone who knows at least some programming.

For example, consider the previous lecture.

We talked about a recursive approach to multiplying two numbers and I mentioned how in certain mathematical expression, back then we labeled it star and circled it in green.

How that expression naturally translated into a recursive algorithm.

In particular, I was certainly assuming that you had some familiarity with recursive programs.

If you feel comfortable with my statement in that lecture, if you feel like you could code up a recursive integer multiplication algorithm based on the high level outline that I gave you, then you should be in good shape for this course.

You should be good to go.

If you weren't comfortable with that statement, well, you might not be comfortable with the relatively high conceptual level at which we discuss program in this course.

But I encourage to watch the next several videos anyway, to see if you get enough out of them to make it worth your while.

[sound].

Now, while I'm aiming these lectures at people who know some programming, I'm not making any assumptions whatsoever about exactly which programming languages you know.

Any standard imperative language you know, something like C, Java or Python, is totally fine for this course.

Now, to make these lectures accessible to as many programmers as possible, and to be honest, you know, also to promote thinking about programming at a relatively abstract conceptual level, I won't be describing algorithms in any particular programming language.

Rather, when I discuss the algorithms, I'll use only high-level pseudo-code, or often simply English.

My inductive hypothesis is that you are capable of translating such a high level description into a working program in your favorite programming language.

In fact, I strongly encourage everyone watching these lectures to do such a translation of all of the algorithms that we discussed.

This will ensure your comprehension, and appreciation of them.

Indeed, many professional computer scientists and programmers don't feel that they really understand an algorithm until they've coded it up.

Many of the course's assignments will have a problem in which we ask you to do precisely this.

Put another way, if you're looking for a sort of coding cookbook, code that you can copy and paste directly into your own programs.

Without necessarily understanding how it works, then this is definitely not the course for you.

There are several books out there that cater to programmers looking for such coding cook books.

Second, for these lectures I have in mind someone who has at least a modest amount of mathematical experience though perhaps with a fair bit of accumulated rust.

Concretely I expect you to be able to recognize a logical argument that is a proof.

In addition, two methods of proof that I hope you've seen before are proofs by induction and proofs by contradiction.

I also need you to be familiar with basic mathematical notation, like the standard quantifier and summation symbols.

A few of the lectures on randomized algorithms and hashing will go down much easier for you if you've seen discrete probability at some point in your life.

But beyond these basics, the lectures will be self contained.

You don't even need to know any calculus, save for a single simple integral that magically pops up in the analys of the randomized quick sort algorithm.

I imagine that many of you have studied math in the past, but you could use a refresher, you're a bit rusty.

And there's plenty of free resources out there on the web, and I encourage you to explore and find some that you like.

But one that I want to particularly recommend is a great set of free lecture notes.

It's called Mathematics for Computer Science.

It's authored by Eric Lehman and Tom Layden, and it's quite easy to find on the web if you just do a web search.

And those notes cover all of the prerequisites that we'll need, in addition to tons of other stuff.

In the spirit of keeping this course as widely accessible as possible, we're keeping the required supporting materials to an absolute minimum.

Lectures are meant to be self-contained and we'll always provide you with the lecture notes in PowerPoint and PDF format.

Once in a while, we'll also provide some additional lecture notes.

No textbook is required for this class.

But that said, most of the material that we'll study is well covered in a number of excellent algorithms books that are out there.

So I'll single out four such books here.

The first three I mention because they all had a significant influence on the way that I both think about and teach algorithms.

So it's natural to acknowledge that debt here.

One very cool thing about the second book, the one by Dasgupta, Papadimitriou and Vazirani, is that the authors have made a version of it available online for free.

And again, if you search on the authors' names and the textbook title, you should have no trouble coming up with it with a web search.

Similarly, that's the reason I've listed the fourth book because those authors have likewise made essentially a complete version of that book available online and it's a good match for the material that we're going to cover here.

If you're looking for more details about something covered in this class, or simply a different explanation than the one that I give you, all of these books are gonna be good resources for you.

There are also a number of excellent algorithm textbooks that I haven't put on this list.

I encourage to explore and find you own favorite.

>> In our assignments, we'll sometimes ask you to code up an algorithm and use it to solve a concrete problem that is too large to solve by hand.

Now, we don't care what program and language and development environment you use to do this as we're only going to be asking you for the final answer.

Thus, we're not requiring anything specific, just that you are able to write and execute programs.

If you need help or advice about how to get set up with a suitable coding environment, we suggest that you ask other students for help via the course discussion forum.

Finally, let's talk a bit more about assessment.

Now this course doesn't have official grades per se, but we will be assigning weekly homeworks.

Now we're going to assign homeworks for three different reasons.

The first is just for self-assessment.

It's to give you the opportunity to test your understanding of the material so that you can figure out which topics you've mastered and which ones that you haven't.

The second reason we do it is to impose some structure on the course, including deadlines, to provide you with some additional motivation to work through all the topics.

Deadlines also have a very important side effect that synchronizes a lot of the students in the class.

And this of course makes the course discussion forum a far more effective tool for students to seek and provide help in understanding the course material.

The final reason that we give homeworks is to satisfy those of you who, on top of learning the course material, are looking to challenge yourself intellectually.

[sound].

Now, this class has tens of thousands of students.

So it's obviously essential that the assignments can be graded automatically.

Now, we're currently only in the 1.

0 generation of free online courses such as this one.

So the available tools for auto graded assessment are currently rather primitive.

So, we'll do the best we can, but I have to be honest with you.

It's difficult, or maybe even impossible to test deep understanding of the design and analysis of algorithms, using the current set of tools.

Thus, while the lecture content in this online course is in no way watered down from the original Stanford version.

The required assignments and exams we'll give you, are not as demanding as those that are given in the on campus version of the course.

To make up for this fact, we'll occasionally propose optional algorithm design problems, either in a video or via supplementary assignment.

We don't have the ability to grade these, but we hope that you'll find them interesting and challenging, and that you'll discuss possible solutions with other students via the course discussion forum.

So I hope this discussion answered most of the questions you have about the course.

Lets move on to the real reason that we're all here, to learn more about algorithms.

在本视频中,我将讨论课程的各个方面,我们将涉及的主题,可以期望获得的技能,期望的背景,支持材料以及可用的自我评估工具。

让我们从本课程要涵盖的特定主题开始。

该课程资料对应于十周的斯坦福课程的前半部分。

所有计算机科学专业的本科生以及我们的许多研究生都采用了该方法。

将有五个高级主题,有时这些主题会重叠。

这五个主题首先是:关于算法性能的推理词汇,设计和征服算法设计范例,随机化和算法设计,关于图推理的原语以及基本数据结构的使用和实现。

目的是对这些主题中的每个主题进行介绍并提供基本知识。

关于它们中的每一个,可以说的更多,而我们在这里没有时间。

第一个主题是最短的,也可能是最干燥的。

但这是认真考虑算法设计和分析的前提。

这里的关键概念是big-O表示法,从概念上讲,它是关于粒度的建模选择,通过粒度我们可以测量性能指标(例如算法的运行时间)。

事实证明,对于算法设计有一个清晰的高级思考的甜蜜点是忽略常数因子和低阶项。

并专注于算法性能在大输入大小下的扩展能力。

大O表示法是对这一最佳位置进行数学处理的方法。

现在,在算法设计中没有一个灵丹妙药。

没有任何一种解决问题的方法可以保证解开您可能会遇到的所有计算问题。

也就是说,有一些通用的算法设计技术。

算法设计的高级方法可以在一系列不同领域中找到成功的应用。

这些相对广泛适用的技术是此类通用算法课程的基础。

在本课程中,我们将只有时间去深入探索一种这样的算法设计范式,即分而治之算法。

在我们将要讨论的续集课程中,还有两个关于范式的主要算法需要介绍。

但是就目前而言,分而治之算法的思想是首先将问题分解为较小的问题,然后递归求解,然后以某种方式快速将子问题的解决方案组合为您真正关心的原始问题。

例如,在最后一个视频中。

我们看到了两种这种算法,两个大整数相乘得到的两个除法算法。

在以后的视频中,我们将看到许多不同的应用程序。

我们将看到如何设计快速分而治之的算法,以解决从排序到矩阵乘法到最邻近类型的问题以及几何计算等问题。

此外,我们还将介绍一些强大的方法来推理此类递归算法的运行时间。

至于第三个话题。

从某种意义上说,随机算法是一种在执行过程中翻转硬币的算法。

也就是说,如果您在固定输入上一遍又一遍地运行,则随机算法实际上将具有不同的执行方式。

事实证明,这绝对不是直观的,允许算法内部进行随机化通常会导致对各种计算问题的简单,优雅和实用的解决方案。

典型的例子是随机快速排序,我们将在几节讲座中详细介绍该算法和分析。

随机素数测试是我们要探讨的另一个杀手级应用。

而且,我们还将讨论图形划分的随机方法。

最后,我们将讨论如何使用随机化来推断哈希函数和哈希映射。

本课程的主题之一,也是我希望您从本课程中学到的具体技能之一,是读写能力,其中包括用于处理数据的许多计算原语,它们是如此之快,以至于在某些情况下感觉,基本上是免费的。

也就是说,调用这些计算原语之一所花费的时间仅比您已经在检查或读取输入上花费的时间仅多。

当您拥有一个非常快的原语,以至于运行时间仅比读取输入所花费的时间多时,您应该准备好应用它。

例如,在预处理步骤中,每当看起来有帮助时,都可以。

它应该只在架子上,等待您随时申请。

排序是这种形式的非常快的,几乎免费的原语的一个典型示例。

但是也有一些可以处理更复杂的数据。

因此,回想一下,图是一种数据结构,它一方面具有顶点,另一方面具有边。

连接一对顶点。

除其他事项外,图还为不同类型的网络建模。

因此,尽管图比单纯的数组复杂得多,但是仍然有许多非常快的基元来推理它们的结构。

在本课程中,我们将重点介绍用于竞争性连接信息以及最短路径的原语。

我们还将探讨如何使用某些原语来调查社交网络中的信息结构。

最后,数据结构通常是快速算法设计中的关键要素。

数据结构负责以支持快速查询的方式组织数据。

不同的数据结构支持不同类型的查询。

我假设您熟悉基本编程类(包括数组和向量)中通常遇到的结构。

列表,堆栈和队列。

希望您已经在某些时候看到了树和堆,或者您愿意在课程之外阅读一些有关它们的信息,但是随着我们的学习,我们还将对每个数据结构进行简要回顾。

我们将详细讨论两个非常有用的数据结构。

首先是平衡的二进制搜索树。

这些数据结构动态地维护一组元素的顺序,同时支持大量查询,这些查询以时间的大小对数运行。

我们将讨论的第二种数据结构是哈希表或哈希映射,它们跟踪动态集,同时支持极快的插入和查找查询。

我们将讨论此类数据结构的一些规范用法,以及此类数据结构的典型实现中的内幕。

>>在算法的设计和分析中,有许多重要的概念,我们将在这五周的课程中没有时间讨论。

其中一些将在后续课程《算法的设计和分析II》中涵盖,该课程与斯坦福针对该主题的10周课程的后半部分相对应。

该续集课程的第一部分重点介绍了另外两个算法设计范例。

首先,对贪婪算法的设计分析及其在最小生成树,调度和信息理论编码中的应用。

其次,对动态编程算法的设计分析,其示例应用包括基因组序列比对和通信网络中的最短路径协议。

续集课程的第二部分涉及NP完全问题及其解决方法。

现在,NP完全问题就是这样的问题,假设您可能已经听说过一个著名的数学猜想,即所谓的“ P不等于NP”猜想,那么这些问题就无法通过任何计算有效的算法来解决。

我们将讨论NP完整性的理论,并重点介绍对算法设计者来说这意味着什么。

我们还将讨论解决NP完全问题的几种方法,包括:正确解决特殊情况的快速算法;具有可证明的性能保证的快速启发式;定性上比暴力搜索快的指数时间算法。

当然,这两个为期五周的课程都没有适合许多重要的主题。

根据需求,可能会有关于更高级主题的进一步课程。

完成本课程将需要您花费大量的时间和精力。

因此,仅提出以下问题是合理的:您希望从中得到什么?你会学什么技能?好。

首先,您知道,即使这本身不是编程类,它也应该使您成为更好的程序员。

您将获得大量有关算法的实践描述和推理,将学习算法设计范例,从而学习与跨领域的许多不同问题相关的真正的高级问题解决策略,以及预测此类算法性能的工具。

您将学到一些用于处理数据的极其快速的子例程,以及一些用于组织可直接部署在您自己的程序中的数据的有用的数据结构。

其次,虽然这本身不是一门数学课程,但我们将完成大量的数学分析。

反过来,这也会提高您的数学分析能力。

您可能会问,为什么数学与算法的设计和分析中的一门课相关,而这似乎更像是一门编程课。

好吧,让我说清楚。

我完全不感兴趣,只是告诉您可以在网上或任何数量的优秀编程书籍中找到的事实或反汇编的代码。

我在本课程的目标是,我认为我可以最好地补充您可能已经可以使用的资源的方式是解释为什么事情是这样。

为什么我们以自己的方式分析算法,为什么各种超快速算法实际上都是超快速的,依此类推。

事实证明,好的算法思想通常需要简单的数学分析才能正确理解。

您将获得对本课程中讨论的特定算法和数据结构的基本了解。

希望这些洞察力中的许多能在更广泛的意义上证明对您的其他工作很有用。

第三,也许是与从事其他学科工作的人们最相关的:本课程应帮助您学习如何算法思考。

确实,在研究了算法之后,很难不到处都看到它们,无论您是坐电梯,看着一群鸟,从投资组合中买卖股票,甚至看着婴儿学习。

就像我在之前的视频中所说的,如果您不在生物学,统计学和经济学等计算机科学和技术领域之外,思考将变得越来越有用和普遍。

第四,从某种意义上说,如果您有兴趣像一位持卡的计算机科学家,那么您肯定会希望我们涵盖的所有主题都具备基本的素养。

确实,让学习算法如此有趣的一件事就是,感觉就像您正在学习计算机科学最近50年的许多最成功著作。

因此,在本堂课结束后,当有人嘲笑有关Dijkstra算法的笑话时,您将不会再被计算机科学鸡尾酒会所排斥。

现在,您将确切了解它们的含义。

最后,毫无疑问,学习本材料对于技术面试问题会有所帮助。

明确地说,我的唯一目标是教您一些算法,而不是为您准备面试本身。

但是多年来,我无数的学生向我赞叹不已,他们讲述了如何精通本课程中的概念,使他们能够应对所遇到的每个技术问题。

我告诉过你,这是基本的东西。

那么,我对您有什么期望?好吧,说实话,答案是没有。

毕竟,像这样的免费在线课程的重点并不是任何人都可以接受,并根据自己的意愿尽最大的努力。

如此说来,作为一名老师,记住一个或多个规范的学生仍然很有用。

我想我会继续与您​​保持联系,以了解我对这些讲座的看法。

我正在向谁教学。

同样,如果您不遵守此规范的学生模板,请不要气disc。

无论您是谁,我都很高兴有机会教您有关算法的知识。

所以首先,我想到一个至少知道一些编程的人。

例如,考虑上一堂课。

我们讨论了将两个数字相乘的递归方法,我提到了如何在某些数学表达式中将其标记为星号并用绿色圈出。

该表达式如何自然地转换为递归算法。

特别是,我当然以为您对递归程序有所了解。

如果您对我在那堂课中的陈述感到满意,如果您可以基于我给您的高级大纲编写一个递归整数乘法算法,那么您在本课程中应该处于良好状态。

你应该很好。

如果您对这种说法不满意,那么您可能对我们在本课程中讨论程序的相对较高的概念水平不满意。

但是无论如何,我还是鼓励观看接下来的几段视频,看看您是否从中获得足够的收获,值得您光顾。

[声音]。

现在,尽管我将这些演讲的对象是了解一些编程的人,但是我并没有对您确切了解哪种编程语言做任何假设。

您知道的任何标准命令式语言(例如C,Java或Python)都适合本课程。

现在,为了使尽可能多的程序员可以使用这些讲座,并且说实话,也要促进在相对抽象的概念水平上进行编程的思考,我将不再用任何特定的编程语言来描述算法。

相反,在讨论算法时,我将仅使用高级伪代码,或者通常仅使用英语。

我的归纳假设是,您能够使用自己喜欢的编程语言将如此高级的描述转换为一个工作程序。

实际上,我强烈鼓励每个观看这些讲座的人对我们讨论的所有算法进行这样的翻译。

这将确保您理解并赞赏它们。

的确,许多专业计算机科学家和程序员在编写完代码之前,并不会真正理解算法。

本课程的许多作业都会遇到一个问题,我们要求您精确地做到这一点。

换句话说,如果您正在寻找某种编码手册,则可以将这些代码直接复制并粘贴到自己的程序中。

没有必要了解它是如何工作的,那么这绝对不是您的课程。

那里有几本书籍可以满足寻找此类编码烹饪书籍的程序员的需求。

其次,对于这些讲座,我想到的是一位至少具有中等数学经验的人,尽管可能积累了相当多的铁锈。

具体而言,我希望您能够认识到证明逻辑的论点。

另外,我希望您以前见过的两种证明方法是归纳证明和矛盾证明。

我还需要您熟悉基本的数学符号,例如标准的量词和求和符号。

如果您在生活中的某个时刻看到了离散的概率,那么一些关于随机算法和哈希的讲座对您来说将变得容易得多。

但是,除了这些基础知识之外,这些讲座都是自学的。

您甚至不需要知道任何演算,只需将一个简单的积分神奇地弹出到随机快速排序算法的分析中即可。

我想你们中的许多人过去都学习过数学,但是您可以使用复习课程,这有点生锈。

网络上有大量免费资源,我鼓励您探索并找到自己喜欢的资源。

但我要特别推荐的是大量免费的讲义。

它被称为计算机科学数学。

它是由埃里克·雷曼(Eric Lehman)和汤姆·莱登(Tom Layden)创作的,如果您只是进行网络搜索,就可以很容易地在网上找到它。

这些注释涵盖了我们所需的所有先决条件,以及大量其他内容。

本着尽可能使本课程易于使用的精神,我们将所需的辅助材料保持在最低限度。

讲义是自成一体的,我们将始终为您提供PowerPoint和PDF格式的讲义。

有时,我们还将提供一些其他的讲义。

本课程不需要课本。

但这就是说,我们将学习的大多数材料都被许多出色的算法书籍所涵盖。

因此,我将在这里选出四本这样的书。

我之所以提到前三个,是因为它们都对我思考和教授算法的方式产生了重大影响。

因此,很自然地在这里承认债务。

关于第二本书,Dasgupta,Papadimitriou和Vazirani的第二本书非常有趣的一点是,作者已经免费在线获取了该书的一个版本。

同样,如果您搜索作者的姓名和教科书的标题,那么通过网络搜索就可以毫不费力地找到它。

同样,这就是我之所以列出第四本书的原因,因为这些作者实际上已经从网上提供了该书的完整版本,这与我们将在此处介绍的材料非常匹配。

如果您正在寻找有关本课程所涵盖内容的更多详细信息,或者只是想寻找与我给您的解释不同的解释,那么所有这些书都将对您有用。

我还没有列出很多优秀的算法教科书。

我鼓励您探索并找到自己的最爱。

>>在我们的作业中,有时我们会要求您编写算法并使用它来解决一个具体问题,而这个问题太大了,无法用手解决。

现在,我们不在乎您使用哪种程序,语言和开发环境来执行此操作,因为我们只会询问您最终的答案。

因此,我们不需要任何特定的内容,只是您能够编写和执行程序。

如果您需要有关如何建立合适的编码环境的帮助或建议,建议您通过课程讨论论坛向其他学生寻求帮助。

最后,让我们再谈谈评估。

现在这门课程本身还没有官方成绩,但是我们将每周分配一次作业。

现在,由于三个不同的原因,我们将分配作业。

第一个只是自我评估。

这是为了让您有机会测试您对材料的理解,以便您可以掌握哪些主题以及哪些主题尚未掌握。

我们这样做的第二个原因是在课程中强加一些结构,包括截止日期,以使您有更多的动力去完成所有主题。

截止日期也有一个非常重要的副作用,它使班上的许多学生保持同步。

这当然使课程讨论论坛成为学生寻求和提供帮助以了解课程材料的更为有效的工具。

我们提供家庭作业的最终目的是要满足那些在学习课程资料的基础上希望在智力上挑战自己的人们。

[声音]。

现在,这个班有成千上万的学生。

因此,对作业进行自动评分非常重要。

现在,我们目前仅处于1。

0代免费在线课程(如本课程)。

因此,用于自动评分评估的可用工具目前还很原始。

因此,我们将尽力而为,但我必须对您诚实。

使用当前的工具集来测试对算法的设计和分析的深刻理解是困难的,甚至是不可能的。

因此,尽管此在线课程中的演讲内容绝不会从原始的斯坦福版本中淡化。

我们将为您提供的必需的作业和考试不像在校园版课程中要求的那样。

为了弥补这一事实,我们偶尔会在视频中或通过补充分配提出可选的算法设计问题。

我们没有给这些课程打分的能力,但是我们希望您会发现它们有趣且具有挑战性,并希望通过课程讨论论坛与其他学生讨论可能的解决方案。

因此,我希望这种讨论能够回答您对课程的大部分疑问。

让我们继续讨论真正原因,以了解有关算法的更多信息。

你可能感兴趣的:(1.5「Stanford Algorithms」About the Course)