From stevenj.mit at gmail.com Sun Sep 13 21:40:31 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Sun, 13 Sep 2009 21:40:31 -0400 Subject: [18335fall09] typo in ideal-cache handout Message-ID: <5500E9B9-A5B4-4BF8-9B05-6A1A76CA99F7@fftw.org> Hi gang, There was a typo in the definitions of the O(...) etcetera asymptotic notations at the bottom of the ideal-cache handout on Friday - the formal definitions were missing absolute values |....| around the functions f(x) and g(x), and the restriction C > 0. The corrected handout is posted on the course web page (under Lecture 2). --SGJ From stevenj.mit at gmail.com Wed Sep 16 17:48:53 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Wed, 16 Sep 2009 17:48:53 -0400 Subject: [18335fall09] pset 1 problem 1c correction Message-ID: <287234C9-7476-4387-88FE-4A235F2D8AAE@fftw.org> One of you pointed out to me today that problem 1(c) in pset1 was rather carelessly worded, to the point where it was not true. I've posted a corrected version on the web page. --SGJ From stevenj.mit at gmail.com Fri Sep 18 15:27:45 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Fri, 18 Sep 2009 15:27:45 -0400 Subject: [18335fall09] pset 1 tip: disabling multiprocessing in Matlab for problem 3 Message-ID: <50A27DE0-AC38-47FA-BB49-C3E302BE2605@gmail.com> Hi gang, I forgot a little trick from last year that you need in order to get sensible benchmark results from Matlab for problem 3. Matlab may parallelize its matrix-multiply routine if you have a multi-core machine (which most people do nowadays). This may lead to distorted or confusing results in problem 3 of the pset. You can turn off multiprocessing in Matlab by using the maxNumCompThreads function. In particular, doing maxNumCompThreads(1) should tell Matlab to use at most one processor. (Note that you have to do this each time you run Matlab, as when you launch it automatically uses all available processors by default.) --SGJ From stevenj.mit at gmail.com Fri Sep 18 17:49:06 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Fri, 18 Sep 2009 17:49:06 -0400 Subject: [18335fall09] pset 1 tip: disabling multiprocessing in Matlab for problem 3 In-Reply-To: <4AB3F3E2.7000905@mit.edu> References: <50A27DE0-AC38-47FA-BB49-C3E302BE2605@gmail.com> <4AB3F3E2.7000905@mit.edu> Message-ID: One of you just pointed out to me that the latest version of Matlab may no longer support this feature. The web page for Matlab 7.8 (R2009a) states: The capability to adjust the number of computational threads in a single MATLAB session is no longer available as of this release. This change removes from the MATLAB preferences panel the ability to set the maximum number of computational threads. The primary reason for this change is that products that MATLAB is dependent upon have the ability to spawn threads from the currently-executing thread. This makes it infeasible to monitor and/or limit the number of computational threads at any given time in a MATLAB process. MATLAB versions 7.8 and later require that you decide between threading and no threading at the time you launch your MATLAB session. Multithreading is enabled by default. To disable this feature, start MATLAB using the new singleCompThread option. On Unix systems with Matlab 7.8, you might have to run matlab with 'matlab -singleCompThread' if I understand this documentation correctly. On Windows you have to right-click the Matlab icon, get the Properties window, and add "-singleCompThread" in the Target field. See: http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f8-4994.html SGJ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.mit.edu/pipermail/18335fall09/attachments/20090918/43a8c372/attachment.htm From stevenj.mit at gmail.com Sun Sep 20 22:50:55 2009 From: stevenj.mit at gmail.com (Steven G.Johnson) Date: Sun, 20 Sep 2009 22:50:55 -0400 Subject: [18335fall09] late homework policy Message-ID: <914DC6A7-D987-4531-A61D-417322BB8B75@gmail.com> Hi gang, Just to be clear about the homework policy, I should mention that I will not accept late homework in general. If you have a valid excuse (e.g. illness), you should okay it with me at least 24 hours in advance of the class when it is due. Otherwise, plan on turning in whatever you managed to complete. --SGJ From stevenj.mit at gmail.com Wed Sep 30 13:17:44 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Wed, 30 Sep 2009 13:17:44 -0400 Subject: [18335fall09] pset 2 clarifications Message-ID: <3FAC18C6-2C1F-41EA-9374-E042A9EDE272@fftw.org> Hi gang, Regarding problem 3(d), in the file div2sum.m, one of you asked whether the line: s = single(div2sum(x(1:floor(n/2))) + div2sum(x(floor(n/ 2)+1:n))); should really be: s = single(single(div2sum(x(1:floor(n/2)))) + single(div2sum(x(floor(n/2)+1:n)))); i.e. shouldn't we round and then add and then round to do the addition in single precision, rather than adding and then rounding? The answer is yes, in principle, but in practice I don't think it makes any significant difference. You use either of the versions above if you want. Regarding problem 4(a), Trefethen exercise 15.1 parts (e) and (f), where you are computing e by the Taylor series for exp(x), some of you asked how you can compute 1/k! without using division. I don't think that is the intention of the problem -- the point is what is the impact of doing the sum from left to right or from right to left. Instead, just assume that you can compute 1/k! to O(machine epsilon) relative error (which is true in practice by a variety of techniques), and focus on how the rounding errors accumulate when you do the sum. --SGJ From stevenj.mit at gmail.com Thu Oct 1 15:16:41 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Thu, 1 Oct 2009 15:16:41 -0400 Subject: [18335fall09] pset2 clarification Message-ID: <1E579F18-24DC-4B92-8839-1B18091DF4CF@fftw.org> Another clarification: in problem 2(c), you can ignore terms of O(epsilon^2). From stevenj.mit at gmail.com Fri Oct 16 18:03:41 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Fri, 16 Oct 2009 18:03:41 -0400 Subject: [18335fall09] pset 3 solutions and pset 4 online Message-ID: <97A92D26-B205-4DC6-A1B9-417DF7FF0E8E@gmail.com> Hi gang, I've updated the course web page (http://math.mit.edu/~stevenj/ 18.335/) with the solutions for pset 3, and also pset 4 (due Oct. 26) is posted (scroll down to Lecture 17). Under "further reading" for Lecture 17, I've linked to two very useful online books on iterative methods, Templates for the Solution of Linear Systems and Templates for the Solution of Algebraic Eigenvalue Problems, which survey many (alas not all) of the most useful algorithms. We will go through some of these in 18.335, but by no means all! (Mainly I will try to give you the most fundamental ideas, and an idea of what is out there.) --SGJ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.mit.edu/pipermail/18335fall09/attachments/20091016/9f2caa11/attachment.htm From stevenj.mit at gmail.com Mon Oct 26 16:41:51 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Mon, 26 Oct 2009 16:41:51 -0400 Subject: [18335fall09] 18.335 mid-term Message-ID: <6457EA01-0069-4F7F-B118-AA8CC6D9F333@gmail.com> Hi gang, As I explained in class today, the mid-term exam next Wednesday (Nov. 4) will be 2 hours. You can come either from 1-3pm or from 2-4pm, whichever your schedule allows. (Please let me know if you cannot make either of those times.) The location will be announced (I'm currently finding a room to reserve). The exam will cover everything up to and including the conjugate gradient algorithm. You can bring in one 8x11 piece of paper with notes on anything you wish, although I don't expect a lot of memorization will be required so this is mostly for your peace of mind and as a studying aid (if there is a complicated formula or algorithm from class required on some part of a problem, I will probably just give it to you on the exam). There is a mid-term from last year posted on the web page, although that mid-term in retrospect was way too long and this year's will probably be shorter. (It was 6 questions; probably I should have asked only 3-4 of those questions.) --SGJ From stevenj.mit at gmail.com Wed Oct 28 13:14:44 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Wed, 28 Oct 2009 13:14:44 -0400 Subject: [18335fall09] midterm: 3-343 Message-ID: Hi gang, The midterm will be in room 3-343. You will have 2 hours, and can come either from 1-3pm or from 2-4pm. Please let me know ASAP if you have a conflict with either one of those time slots. --SGJ From stevenj.mit at gmail.com Thu Oct 29 18:13:48 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Thu, 29 Oct 2009 18:13:48 -0400 Subject: [18335fall09] final projects - please submit via email Message-ID: Hi gang, It occurred to me that it is much more convenient for me, and probably for you as well, to submit your final-project proposals via email. That way I can also directly respond to your email with comments on your proposal. So, please email me your proposals by tomorrow. (Your project is not set in stone by your proposal, nor will I grade your proposals; I just want to make sure you are planning something reasonable and have a chance to give you some suggestions before you go to a lot of effort.) Steven From stevenj.mit at gmail.com Thu Oct 29 18:29:59 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Thu, 29 Oct 2009 18:29:59 -0400 Subject: [18335fall09] pset 5 problem 3 comment Message-ID: <680DE214-B0C4-4D43-9ACB-BE3FDF2A1552@gmail.com> On problem 3, where you use the CG algorithm to find a nullspace vector of a semidefinite matrix, you will probably find that something odd happens: it converges to something with a small residual ||Ax|| / ||x||, but then if you keep doing iterations after that the residual goes crazy and starts increasing again, due to roundoff errors I think. This is okay. In practice, you would usually just stop the iteration when the residual becomes sufficiently small. Alternatively, I think that there are probably ways to slightly rearrange the algorithm to eliminate the sensitivity to roundoff errors once the residual gets small. (For example, just restarting CG once the residual is small seems to work somewhat.) But you don't need to do this for your solutions. --SGJ From stevenj.mit at gmail.com Tue Nov 3 12:11:38 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Tue, 3 Nov 2009 12:11:38 -0500 Subject: [18335fall09] extra office hours today 4:30-5:30 Message-ID: Hi gang, A couple of you asked me if I would have extra office hours today, so if you want to you can stop by my office from 4:30-5:30. --SGJ From stevenj.mit at gmail.com Mon Nov 23 20:00:01 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Mon, 23 Nov 2009 20:00:01 -0500 Subject: [18335fall09] reminder: pset 6 due next Monday Message-ID: Hi gang, This is just a reminder, in case anyone missed it last week, that pset 6 is available from the web page. I've also updated the web page with links to more information about BFGS etc. Wikipedia's quasi-Newton page has a nice summary of the various updating formulas (although you would be well advised to read the papers by Nocedal and others before actually attempting to implement this stuff...there are a lot of little tricks). On Wednesday, I'll talk a little about optimization with function values only, and then after Thanksgiving we'll talk a bit about global optimization. After that, I'll cover some other topic, perhaps numerical quadrature and Chebyshev approximation, so as to end up the course with FFTs. --SGJ From stevenj.mit at gmail.com Tue Dec 8 22:30:53 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Tue, 8 Dec 2009 22:30:53 -0500 Subject: [18335fall09] final projects Message-ID: <6EB76785-0224-4434-B69D-6372BFCF6038@fftw.org> Hi gang, just a reminder that it is fine to email me your final project. It would also be nice to attach any code that you used for your project electronically. --SGJ From stevenj.mit at gmail.com Wed Dec 9 18:22:41 2009 From: stevenj.mit at gmail.com (Steven G. Johnson) Date: Wed, 9 Dec 2009 18:22:41 -0500 Subject: [18335fall09] please fill out online course evaluation for 18.335 Message-ID: Hi gang, The department asked me to remind you to fill out the online course- evaluation survey at the following web page: http://web.mit.edu/subjectevaluation/evaluate.html Thanks! --SGJ