What I want this class to be is a class where at least sometimes, like on this homework assignment, I set up a model for you, set up the story for you, and then you have to actually figure out how do I set this up properly and how do I solve it out?
我希望这个课程是至少在某些时候,就像这次家庭作业,我为你们设定一个模型,设定故事情节,然后由你们自己实际操作,如何恰当地设计并解决它
So we're to assume we can get to any piece of data, any instruction in constant time, and the second assumption we're going to make is that the basic primitive steps take constant time, same amount of time to compute. Again, not completely true, but it's a good model, so arithmetic operations, comparisons, things of that sort, we're all going to assume are basically in that in that particular model.
因此如果我们假设在恒定的时间内,我们可以取得任何一块数据,任何一种数据结构的话,我们要做的第二个假设就是,基本的原始操作计算花费的时间是恒定的,这个假设也不是完全正确的,但这个模型其实挺不错的,因此算法操作,比较,这一类的事情,我们在这个特定的模型中都假设是基本的,操作,花费的时间是恒定相同的。
应用推荐