MIT教授对作业、学习小组及考试的看法
刚看了一小部分MIT公开课“算法导论”第一讲,看来MIT的学生也真“不好过”,教授关于作业、学习小组的看法让我很有感触,比较完满地解答了一直存在自己心头的问题。我觉得这是很值得看的一段视频,也决定把这段讲话抄下来分享,供备忘回味。
---------------------------
Collaboration policy.This is extremely important so everybody pay attention. If you are asleep now wake up. Like that's going to wake anybody up, right?
The goal of homework, Professor Demaine and my philosophy is that the goal of hemework is to help you learn the material. And one way of helping to learn is not to just be stuck and unable to solve something, because then you're in no better shape when the exam roles around, which is where we're actually evaluating you. So, you're encouraged to collaborate.
But there are some commonsense things about collaboration. If you go and you collaborate to the extent that all you're doing is getting the information from somebody else, you're not learning the material and you're not going to do well on the exams. In our experience, students who collaborate generally do better than students who works alone. But you owe it to yourself, if you're going to work in a study group, to be prepared for your study group meeting. And specifically you should spend a half an hour to 45 minutes on each problem before you go to group so you're up to speed and you've tried out your ideas. And you may have solutions to some, you may be stuck on some other ones, but at least you applied yourself to it. After 30 to 45 minutes, if you cannot get the problem, just sitting there and banging your head against it makes no sense. It's not a productive use of your time. And I know most fo you have issues with having time on your hands, right? So, don;t go banging your head against problems that are too hard or where you don't understand what's going on or whatever. That's when the study group can help out. And, as I mentioned, we'll have homework labs which will give you an opportunity to go and do that and coordinate with other students rather than necessarily having to form your own group. And the TAs will be there. If your group is unable to solve the problem, then talk to other groups or ask your recitation instructor. And, that's how you go about solving them.
Writing up the problem sets, however, is your individual responsibility and should be done alone. You don't write up your problem solutions with other students, you write up on your own. And you should on your problem sets, because this is an academic place, we understand that the source of academic information is very important, if you collaborated on solutions you should write a list of the collaborators. Say I worked with so an so on this solution. It does not afect your grade. It's just a question of being scholarly. it is a violation of this policy to submit a problem solution that you cannot orally explain to a member of the course staff. You say oh, well, my wrte-up is similar to that other person's, I didn't copy them. We may ask you to orally explain your solution. If you are unable, according to this policy, the presumptions is that you cheated. So do not write up stuff that you don't understand. You should be able to write up the stuff that you understand. Understand why you're putting down what you're putting down. If it's not obvious, no collaboration whatsoever is permitted in exams...
合作原则:这是非常重要的所以每个人都要注意,如果你在打瞌睡,
课后作业的目的,Demaine教授和我的观点是,
但是有一些关于合作的常识问题,
不过,写作业则是你必须独立完成的过程,这是你的责任。
流密码及RC4算法
大半学期过去,还没交过作业,上上周密码学老师要我们设计一个流密码当作业这周交。俺刚刚学了比较流行的RC4,把自己所学分享出来吧
一、什么是密码系统及流密码?
密码系统(cryptosystem)
私钥密码系统又分为分组密码(block cipher)和流密码(stream cipher)。两者的区别,形象来说,
一次一密的算法非常简单,假设你需要加密的信息(明文)
流密码就是使用较短的一串数字(叫它密钥吧),
在介绍RC4前,说说那个“相加”运算怎么实现。
二、RC4
RC4用两步来生成密码流
首先你指定一个短的密码,储存在key[MAX]数组里,
for i from 0 to 255 S[i] := i endfor j := 0 for i from 0 to 255 j := (j + S[i] + key[i mod keylength]) mod 256 swap values of S[i] and S[j] endfor第二步利用上面重新排列的数组 S 来产生任意长度的密钥流,算法为
i := 0 j := 0 while GeneratingOutput: i := (i + 1) mod 256 j := (j + S[i]) mod 256 swap values of S[i] and S[j] K := S[(S[i] + S[j]) mod 256] output K endwhileoutput K 一次产生一字符长度(8bit)的密钥流数据,
产生密钥流之后,对信息进行加密和解密就只是做个“相加”
附件是我的c代码,编译得到encrypt可执行文件,
我还没研究RC4的安全性,不知道破译密码难度大不大
附件:https://github.com/abellong/simpleRC4Encryption
参考资料:
http://en.wikipedia.org/wiki/
MJB Robshaw - 1995 Stream Ciphers
hello, world
Hi,我是一名本科大三学生(2011),就读于中山大学数学与应用数学专业,大学前基本上没碰过电脑,大一时学了c和c++,仍然对电脑有陌生和恐惧感,当我大二时装上了ubuntu linux之后,慢慢对电脑感兴趣了,而后花很多时间在互联网上,觉得互联网真是太伟大了,由衷的钦佩和感激为丰富互联网内容保持互联网运作而默默贡献的程序员们。分享的理念深入了我的内心,希望自己能做一些有意义的事情,就想建个博客。
我是在ctex论坛上知道这个博客系统,进来之后被它的简洁和理念所吸引,果断开了这个博客(这算是第一个了),想起了一则笑话:一个程序员退休之后决 定 学习书法,买来上好的湖笔、宣纸、墨汁,饱蘸浓墨,在纸上一气呵成:hello, world. 我现在还不是程序员,但希望做个优秀的快乐的程序员哈哈。希望能向大家多多学习:)