2011F003
From CDS 130
THANK YOU ALL FOR A WONDERFUL SEMESTER!!
1. CDS-130/03 ANNOUNCEMENTS
1.1. 16 DECEMBER 2011: CDS-130/03 OFFICIAL FINAL COURSE GRADE DISTRIBUTION
- Here's the OFFICIAL, final course grade distribution for CDS-130/03 Fall 2011:
- A+, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, B+, B+, B, B, B, B, B, B, B, C+, C, C, C, D, D, F, F, F
- (see graphic on right)
1.2. 15 DECEMBER 2011: CDS-130 FINAL EXAM
- I've just posted today's final exam grades to Blackboard. With these grades in hand, you can compute your expected final course numerical and letter grades, according to the course syllabus.
- Now, for those of you who may be interested, there was a TIE for the A+ grade. That tie was resolved by performance on the final exam.
1.3. 10 DECEMBER 2011
- Detailed, comprehensive final exam study advice was issued to everyone today. You can find it on Blackboard, under the folder labeled "FINAL EXAM STUDY ADVICE". PLEASE NOTE: This advice will not be posted to the Wiki, nor will it be emailed. You must have a CDS-130 Blackboard account to access it. If this policy is problematic for anyone, please contact me.
- Please follow this study advice. It is specific, and pointed at the topics you need to know, in the style in which you need to know them. Problems on the final exam will be variants of those appearing in the study advice. Furthermore, and as stated in the advice, if during your study you discover gaps in your "foundational knowledge", please return to the relevant class presentations in a concentrated effort to eliminate those gaps.
- Our final exam occurs on Thursday, 15 December, in Innovation Hall room 222: It begins at 7:30am and concludes at 10:15am. One distinct upside of an early morning final exam like this one: It should be really easy to find parking!
- PLEASE PLEASE PLEASE: Everyone plan to be on-time. The exam will begin PROMPTLY at 7:30am -- there will be no waiting for late arrivals. Those of you who arrive late must finish the final exam in the time remaining. The exam will conclude PROMPTLY at 10:15am. My recommendation is to plan to arrive a bit EARLY, perhaps at 7:15am. Doing so will enable you to calm down, collect your thoughts, and perhaps ask any last-minute questions that are on your mind. My plan is to open the room at 7:00am and be available at that time.
- Use of Matlab software or calculators on the final exam is NOT PERMITTED. Really, you don't need them anyway.
- Best of luck on the final. But, it's not really a matter of luck, is it? "Luck is what happens when preparation meets opportunity" (Seneca). I've prepared you with relevant study advice, and you'll further prepare by focusing on that advice. Your opportunity to shine will come Thursday morning. I'm highly confident in each and every one of you! :)
1.4. 8 DECEMBER 2011 (CLASS 29)
- We spent the entire class today working on homework #10 program code, which was due at the end of class (both hard and soft copies).
- Today was also the LAST CDS-130 class of the Fall 2011 semester. I want to thank everyone for all their hard work during the semester -- you've accomplished some truly exceptional things, and should take distinct pride in that. The final workproduct of the term will be the final exam, and I will issue very specific final exam study advice to you in the coming days.
- BEST WISHES TO EVERYONE!
1.5. 6 DECEMBER 2011 (CLASS 28)
- About half of today's class was devoted to working on the last homework assignment, homework #10. We did take a brief detour into debugging again, since another very instructive bug manifested itself in student code.
- Debugging is a very important programming skill to have. Knowing (or at least suspecting) what's gone wrong in a program enables you to quickly track down the source of the trouble, fix the error, and maintain forward progress.
- There are two general types of bugs: syntactic bugs, and logic bugs. The former are by far the easiest to detect. Actually, detection is usually done for you because the compiler or interpreter you're using will usually detect syntax errors (as we know, Matlab generates a scary-looking red error message that is actually very benign and VERY helpful!). Thus, you're not allowed to proceed unless these errors are fixed.
- Logic errors, on the other hand, are much more insidious -- precisely because they're usually not easy to detect. Sometimes they manifest themselves in strange ways. And sometimes, they lie dormant for a long time until . . . when you least expect it . . . POW! See, for example, the 22 November discussion, below.
- The logic bug we discussed today was like that. It was quiet, laying in wait, and only ambushed program execution at the very end, just prior to program exit. This bug, if not caught prior to the student's submission of homework #10, would have absolutely destroyed the program's homework #11 performance testing, and resulted in very poor results. Luckily, we caught it in time!!
- But the real focus of today's class was Exam Extra Credit Quiz #2, which occurred during the final 20 minutes of class. It covered numerical integration and offered five exam extra credit points. These points will be added DIRECTLY to your final exam score. As such, these points are very valuable things to have.
1.6. 1 DECEMBER 2011 (CLASS 27)
- A very important Matlab programming skill to have, is to know how to write functions. Functions are small programs that exist in their own source code file and that are "called" by other source code (your main program or perhaps by other functions). As such, functions are not executable like a main program. Rather, they must invoked from elsewhere in order to run. Please refer to Chapter 12 in the "Introduction to Matlab" presentation found on Blackboard. Chapter 12 is all about functions.
- Turns out we've already encountered Matlab functions -- we just didn't know it at the time. For example, "statsreport.m" which we used in the wheatfield parametric study assignment, was a function that computed a variety of statistics. We gave "statsreport.m" a vector full of data to work on, and it printed out a statistical report about that data vector. We also made liberal use of Matlab's intrinsic functions many times throughout the semester.
- Writing your own functions is not a difficult thing to do at all: Simply write a Matlab script "program" as you normally would and then, after you're done, affix the appropriate header to your file. That's it! Of course, the "appropriate header" must be designed correctly, so that the function performs its intended role: either producing "side effects" -- i.e., actions that affect the computational environment without returning a specific value -- or, yielding one or more return values, or both. The possibilities are endless and thus left open to your imagination.
- One of the fundamental reasons that functions are used (and kept in separate source code files) is to promote modularization: The decomposition of a program's operation into separate functional units. This strategy is distinct from the older styles of programming wherein all program code was kept in the same source file. This "monolithic" style made it much harder to read and to understand large program source files, and thus, to figure out what was happening when something went wrong. That said, and since we've been writing very small programs (smaller, in fact, then most functions!), we have so far adhered to the older, monolithic style of programming. This is exactly as it should be, in the beginning, and while learning, precisely because you can get a handle on what your program is doing (because your programs have been small). But if you continue your exploration of scientific programming, you'll discover that very large programs are always modularized. Modularization is definitely the way to go. It's a modern programming practice that enhances program understanding, makes it easier (generally!) to find program bugs, and promotes code reuse.
- This last benefit -- code reuse -- is one of the "holy grails" of modern software development. Code reuse simply means, "not reinventing the wheel". Think of it this way: Why would you want to write code to accomplish some task when that code has already been written, and, may exist in some code library? You'd instead want to use that pre-existing library code to get the job done. Doing so is more efficient because you don't waste time creating something that already exists, but, it's also safer because chances are, that pre-existing code has been very well tested and thoroughly debugged. The new code you'd write to do the same job might contain lots of bugs. So using pre-existing code means much less chance of creating bugs. Note that I said "much less chance". Use of pre-existing code never eliminates bugs entirely! But doing so certainly reduces their frequency.
- A very good example of this modularization paradigm in the scientific computing community is use of the LAPACK linear algegra libraries. LAPACK was developed a LONG time ago. It's undergone several revisions, has been thoroughly debugged, and contains some of the most computationally efficient linear algebra routines available today. It's therefore a good idea, when doing large scale scientific computing, to use the LAPACK library when you can, rather than develop your own linear algebra code.
- Finally, we also spent some time today reviewing numerical integration, in preparation for Tuesday's exam extra credit quiz, and we further discussed the last homework assignment (homework #10).
1.7. 29 NOVEMBER 2011 (CLASS 26)
- Numerical integration was in the spotlight today. We took a look at why numerical integration is important, what it means to "numerically integrate" a function -- in the context of "finding the area under a curve" -- and then, derived and implemented the trapezoid rule to accomplish the numerical integration task.
- The trapezoid rule is a good, general numerical integration method that's part of the Newton-Cotes family. It's a second order method that's easy to understand and to implement. We discovered that it took all of eight lines of Matlab code (excluding spaces and comments) to stand-up a working trapezoid rule integrator (less, if we consolidate some lines!). When we performed a live, in-class test, we also discovered how good the trapezoid rule really is: It was accurate to 2 parts in 100,000 when integrating y = f(x) = x^2 between 0 and 1.0, using 100 panels (trapezoids), as compared against Matlab's intrinsic, high precision integrator, the "quad" function. When we pushed our trapezoid rule implementation to 1000 panels (trapezoids), we found that the accuracy increased to 2 parts in 10,000,000. Pretty impressive!
- Most interesting was the comparison against the Monte Carlo "hit or miss" integration technique introduced a few lectures ago. Remember how many "darts" that algorithm had to "throw" in order for it to estimate pi to four digits of accuracy? Millions! Monte Carlo can be used to estimate the area bounded by curves, too, such as y = f(x) = x^2; x = 0; x = 1 and y = 0 -- just like we did with the trapezoid rule, above -- but we'd discover similar inefficiency. That said, Monte Carlo is a very good "fall back" position for exceedingly difficult computations, or higher dimensional computations, when in fact it may be the only method available that works reasonably well. But, if we're workin' in the 2-D plane, and the function f(x) is "reasonably nice", then the trapezoid method is an excellent choice for numerical integration. It generates good approximations and does so rather quickly!
- At the end of today's class we chatted about the final homework assignment (really, two homework assignments, #10 and #11, condensed into one). In particular, we discussed what the phrase "isolated black pixel" really means. This was a very important discussion to have, precisely because thinking MUST precede code writing! Let me assure you: writing code without having a clear picture of what you're trying to accomplish with that code, is a very good way of wandering astray -- straight into the welcoming embrace of confusion! My strong recommendation is therefore to read the problem set 10.5 problem statment. Problem set 10.5 may be found on Blackboard (it was also distributed recently in email). Think about it. Sketch out some pictures and consider what you see when you do. Here are some hints: (1) Are all isolated black pixels the same? Today we concluded that they are not. In fact, the definition of isolated depends upon where in the matrix (i.e., the image) the pixel is located! (2) How can you determine if you're in the first row of a matrix? In the first column? (Natural and necessary extensions of these questions: How can you determine if you're in the last row of a matrix? In the last column?) (3) How do you prevent your algorithm from "falling off the edge" of the matrix as it goes about its job of detecting isolated black pixels?
- I also announced a modification to homeworks #10 and #11: Your program WILL NOT be provided with arbitrary dimension matrices. INSTEAD, ALL MATRICES GIVEN TO YOUR PROGRAM WILL MEASURE 10x10. This is important. There's a very practical implication associated with this modification: you can safely ignore the "first red box" appearing in the shell code display in Problem Set 10.5 . Meaning: You DO NOT NEED to write any statement using Matlab's "size" command. I made this decision in order to reduce/eliminate ambiguity. You therefore should not spend any time at all worrying about what size matrices your program needs to process. Each and every one of them will be 10x10. I want you focused instead on creating good DETECTION LOGIC. That's the most important piece of these homeworks by far because if your program fails to detect isolated black pixels, it will be incapable of gathering homework points for you.
- How these homeworks will be graded: Homework #10 will focus on the quality of your Matlab code. It may contain small errors as written, but the DETECTION LOGIC you represent in your code must be as close to airtight as possible. Furthermore, your code should contain good explanatory comments so an outside reader can grasp what your program is doing. Now, even though small errors in your code won't count against you in homework #10 . . .
- In homework assignment #11 I intend to feed your program many images (perhaps hundreds or even thousands of them), one after the other. I will know the sum total of all isolated black pixels contained in all these images. Thus, the more successful your program is at detecting isolated black pixels in these images, the greater will be the fraction of all isolated black pixels it will detect. Hence, the higher will be your grade. That computation is simple:
- ( (number of isolated black pixels your program detects in all peformance test images) / (actual, total number of isolated black pixels in all performance test images) ) * 20.0
- So for example, if I present your program with 10,000 performance test images, representing a sum total of, say, 55,000 isolated black pixels and your program detects 47,619 of them, then your grade on homework #11 will be (rounded to the nearest tenth):
- (47,619 / 55,000) * 20.0 = 17.3
- Now, why wouldn't your program detect all 55,000 isolated black pixels in this example? Well, one reason could be faulty detector logic. But another reason might be small errors that cause your program to crash for one reason or another (like, for example, falling off the edge of a matrix!). Now, while these small errors won't work against you in homework #10, they will definitely work against you in homework #11 because if your program crashes, then it can't (by definition) detect isolated black pixels for you. Thus, small errors result in lost opportunities to harvest points. I'll ensure that your program gets a fresh start on each image in the performance test suite. That is, if your program crashes on some particular image, it will be started anew on the next image in line. That way, poor performance on any one particular image won't be nearly as costly to you as poor, overall performance.
- We'll talk more about homeworks #10 and #11 this Thursday. I intend to devote some classtime for you to work on these assignments. During that time, I'll circulate around and thus be available for your questions, as will the assistants.
1.8. 24 NOVEMBER 2011
HAPPY THANKSGIVING TO EVERYONE!!!
1.9. 23 NOVEMBER 2011
- Today I released homeworks #10 and #11 for preview, ahead of formal assignment on 29 November 2011. My intention is to give you some time to think about the homework problem (there is only one problem to solve) in advance of actually moving ahead and solving it. Homeworks #10 and #11 will both be due on 8 December 2011, our last CDS-130 class meeting of the Fall 2011 semester.
- These homeworks involve image processing. Specifically, they're about detecting isolated black pixels in an image (i.e., in an input matrix A consisting solely of 1s and 0s). The specifics were distributed to you via email attachment today, and can also be found on Blackboard under the "Problem Sets and Homework Assignments" folder. It's labeled "Problem Set 10.5", and consists of one problem only.
- Homework #10 asks you to write Matlab code to solve that problem, i.e., the detection of isolated black pixels in an image. It is worth 20 points. Homework #11 is also worth 20 points, but focuses instead on the performance of your Matlab program: The more successful your program is at detecting isolated black pixels in test images I give to it, the more points your program will earn for you (up to 20). It's therefore to your advantage to ensure that your program correctly detects the exact number of isolated black pixels in the test images provided in Appendix #2 of Problem Set 10.5 . I may use one or more of these images for testing your program, or I may use other test images. Either way, I intend to give your program at least 20 test images to see how it fares.
- Please review the pertinent class presentation, "Image Processing and Pattern Recognition", which can be found in the Class 12 folder on Blackboard, dated 6 October 2011. In that presentation you'll see how Matlab IF statement syntax can be used to detect certain patterns that occur inside images. Your Matlab code for homework #10 will consist largely of customized detectors (IF statements) applied to the input matrix A. Please note that "isolated black pixels" are defined differently depending upon where they occur in an image: An isolated black pixel in the upper left hand corner of an image, for instance, is defined differently (from an algorithmic perspective) than an isolated black pixel that occurs in the image's interior! You'll need to recognize these differences, capture them in Matlab code, and then use them as the bases for the IF statement detectors that you write. A suggestion: PLEASE do not let these assignments slide until the last minute (like, quarter to midnight on 7 December)! Homeworks #10 and #11 will require some thought, and thus, will take a bit more time than has normally been the case thus far.
- We'll spend some time, during our 29 November class, discussing specifics related to homeworks #10 and #11. I'll give you a few hints about how to proceed, and some recommendations about how to write effective detector logic to maximize your program's chances of success.
1.10. 22 NOVEMBER 2011 (CLASS 25)
- We spent the entire class period working on homework #9 and then, near the end of class, we took a look at a live programming bug that manifested in one student's homework #9 submission. It was exceptionally instructive because this bug was a LOGIC bug: The Matlab syntax was perfect, to the letter. The program ran, and, it produced results that were actually somewhat reasonable. In other words, the bug was DECEPTIVE! That's what made it valuable for study purposes.
- Programming bugs are a fact of life for modern software developers. It's impossible to avoid them (although that's the fervent wish of programmers everywhere!) Good programming practices are designed to avoid the circumstances that seem to cause the proliferation of logic bugs and other types of programming mistakes. We will continue following good programming practices. But when really instructive bugs occur (like the one discussed at the end of today's class), we'll also take a moment to put them under our microscope and examine them at close range. It's a great learning experience!
- We also held a class vote on whether or not I should release homeworks #10 and #11 for preview, ahead of their assignment on Tuesday (We will NOT have any homework assigned over Thanksgiving! That would be cruel and unusual punishment inflicted upon students . . . ) The class voted overwhelmingly for release, and so I'll post homeworks #10 and #11 to Blackboard tomorrow. They'll both address just one problem -- an image processing problem. My intention is to have both homeworks due on 8 December, the last day of our CDS-130 class this semester. That'll give you plenty of time to work on them.
1.11. 17 NOVEMBER 2011 (CLASS 24)
- Today we spent the front portion of the class preparing for Homework Extra Credit Quiz #3, which was delivered in the last 20 minutes of class (specific study advice was distributed prior to the quiz, via email on 14 November, but not posted to the Wiki). The grades for this quiz are available on Blackboard. Overall, the quiz results demonstrated a good grasp of algorithmic thinking on everyone's part. Although there were some rough edges in the submitted responses, these "features" didn't count against you unless you were way off base -- i.e, several zip codes distant from a workable algorithm, or no algorithm at all (missing code). I distributed an answer key for this quiz, although it must be remembered that everyone's algorithm is likely to differ somewhat and so, your algorithm was evaluated on its own merits and NOT on whether it conformed with my algorithm! There are multiple ways to solve the same problem. And since we're not stressing computational efficiency at this point (we're focused instead on acquiring problem decomposition and computational translation skills), the usual distinction between "good" and "bad" algorithms was left intentionally blurry. We'll sharpen our focus in upcoming lectures and take a closer look at that distinction.
1.12. 15 NOVEMBER 2011 (CLASS 23)
- Modeling systems of interacting population equations was the discussion topic. There are really two types of "interaction": In the first type, one population's "death" becomes a second population's "birth". Systems that characterize this type of interaction are radioactive decay and unimolecular chemical reactions. We talked about both. The second type -- which was mentioned briefly but not addressed explicitly today -- is characteristic of bimolecular chemical reactions, predator/prey relationships, and other systems where you might think (at least in molecular terms) of populations "colliding" with each other. In that circumstance, there's "direct" interaction. The model equations arising from these types of direct interaction are non-linear, coupled equations. We'll talk about these in a future lecture. Please know that development of these types of "direct interaction" models is a very active area of research. Much theory, experiment and computation, for example, is directed at understanding the details of bimolecular chemical reactions. Furthermore, models that seek to understand and to predict the time evolution of chemical kinetic networks can be quite valuable, and can confer substantial economic advantage on those companies fortunate enough to develop them. That's because these models deliver insights that cannot be otherwise obtained.
- Homework #9 was assigned and is due in class 22 November 2011. It consists of the following: From Problem Set #9: Modeling Exercise #4 (5 pts), Modeling Exercise #6 (5 pts); From Problem Set #9.6: Modeling Exercise #1 (10 pts). All of these exercises involve Matlab.
1.13. 10 NOVEMBER 2011 (CLASS 22)
- How can we put randomness to work for us? That was today's topic in "Introduction to Modeling, III: Stochastic Models and Monte Carlo Methods".
- We explored some new concepts today. In the front half of the lecture we computed an estimate to pi using random "throws" at a "dart board". The underlying algorithm was simple enough, and amounted to keeping track of which "darts", out of all "darts" thrown, landed inside a circle of radius equal to 1. From that information, and, millions of darts thrown, we were able to compute an estimate of pi -- quite an accurate estimate, actually.
- The methodology we used is at the heart of what are known as Monte Carlo methods. In broad terms, what these methods seek to do is keep a count of "positive outcomes" (those we want) out of all outcomes, and from that information, compute an approximate answer to a difficult (sometimes extremely difficult) problem. The specific method we looked at is called "hit or miss" and isn't a particularly efficient way to do Monte Carlo computations. That said, "hit or miss" is conceptually straightforward and thus, the appropriate vehicle for introducing you to Monte Carlo.
- As you saw in the presentation, the algorithm was exceedingly short -- covering just a few lines of Matlab code. The trade-off is that the algorithm must be run millions of times in order to come up with good approximate solutions. Furthermore, any one estimate is likely to differ (perhaps significantly) from the true solution to the problem. That's why we run the Monte Carlo simulations many times, and, collect statistics on the simulation results. The mean of that collection is almost always a very good approximation to the true answer we seek.
- We also infused the good 'ole population model with some randomness. Doing so enabled us to begin thinking about problems that depend, in some way, on the occurrence of random events. The specific example we studied was predicting the harvest yield from a field of red winter wheat. The problem seemed very difficult at first because the population equation -- as presented to you in class -- is deterministic, whereas the growth of the wheat depended upon the weather and also upon the destructive action of a fungus called "stem rust". The growth of wheat was therefore non-deterministic. How to reconcile a deterministic model with non-deterministic reality?
- The answer was to determine the weather randomly, and then use that result to control parameterization of the population equation for that particular month's growth computation. By doing so, we could move the computation forward, month-to-month, and arrive at a final answer for the wheat field's expected harvest yield. But like before, we discovered that this yield changed every time we ran the simulation. Where's the insight in that?
- The insight was recovered by again running the model many, many times and then, averaging all the computed final harvest yields. In doing so, we generated a distribution of outcomes. That distribution was characterized by a well-defined mean and standard deviation -- hence, insight!
- These sorts of computations, featuring random numbers, are very important, in a variety of contexts, some of which we discussed in class. There's a broad classification that covers them -- stochastic models. You may find yourself dealing with very sophisticated stochastic models later in your career and so, it's exceptionally useful to be exposed to them now, to get a handle on how they work and what kind of information they provide.
1.14. 8 NOVEMBER 2011 (CLASS 21)
- Population equation models were today's discussion topic in the front end of the class, and we followed that with our final excursion into Matlab syntax: WHILE loops. I also assigned Homework #8: From Problem Set #9: Modeling Exercise #1 (5 pts), Modeling Exercise #2 (5 pts), Modeling Exercise #3 (10 pts). Homework #8 is due at the end of class on 15 November 2011.
- WHILE loops are interesting animals -- a combination of a FOR loop with an IF statement. So what WHILE loops do is continue iterating as long as the controlling test returns true. The moment the controlling test returns false, the WHILE loop terminates.
- Which raises an intersting question: What happens if the test never returns false? Well, in that circumstance the WHILE loop iterates forever -- a situation known as an infinite loop. This phenomenon was discussed before (see 28 October 2011, below) and we saw some specific examples in the Matlab presentation. Furthermore, we learned that the test condition can be impacted by what happens inside the loop. In other words -- and unlike a FOR loop -- we can directly impact the success of the test. In a FOR loop, we could not change the loop index and thus not affect the outcome of the test. In a WHILE loop, variables appearing in the test can undergo change in the WHILE loop's body and thus, directly impact the outcome of the test. Hence, it's possible to create an infinite loop from a seeming benign WHILE loop!
- So, it pays to be very careful with WHILE loops! Check your logic. Work through some sample inputs -- particularly if any of the variables in the test portion of the WHILE loop are changed in its body. You will find that this is almost always the case, i.e., that variables appearing in the WHILE loop test are changed in the loop's body. This is the mechanism from which the WHILE loop derives its power and usefulness.
1.15. 3 NOVEMBER 2011 (CLASS 20)
- "Introduction to Modeling" and "Population Equation Models" were the topics of today's discussion. In the first presentation, we learned that the modeling process (at least from our perspective) consists of three phases: (1) formulation of the "Science Model" (usually in words); followed by (2) creation of the "Mathematical Model", which is the (possibly simplified) Science Model cast into symbols; leading finally to (3) implementation of the "Computational Model", which is the "Mathematical Model" reduced to practice in executable computer code.
- The "Computational Model" is what we're after in this class, and, what we'll spend the rest of the semester studying. Computational models embody good algorithmic design and efficient methodologies. Good computational models lead directly to insight (remember Richard Hamming's quote: "The purpose of computing is insight, not numbers"). So we'll spend time trying to create computable models that yield scientific insights; often times, computational modeling is the ONLY means available to us to study certain phenomena. Computational scientists excel at modeling, and, at the design of high performance algorithms that provide a unique lens through which to view natural phenomena.
- The first computational models we'll study are "Population Equation" models (aka, exponential growth and decay models). These are useful approximations to some real-world phenomena, such as the growth of bacteria in a petri dish, the decay of radioactive elements, and the growth of money in a bank account. All are examples of situations where population equation models can be used effectively to gain insights. In upcoming lectures we'll also study stochastic population models (i.e., models that feature some element of chance), and models of interacting populations, such as predator/prey ecosystems and chemical reaction networks. As we move ahead, you'll begin to see a common, unifying mathematical structure emerge that once learned, will equip you with the understanding required to create powerful computational models of your own.
1.16. 1 NOVEMBER 2011 (CLASS 19)
- It appears that somehow I'm off by a count of two with the class numbering! I think the Columbus Day holiday was responsible for one of those days. I was probably responsible for the other! So, today is Class #19 and not Class #17.
- Today we worked out way through the "Algorithms and Algorithmic Development" presentation. Algorithms are the means by which we solve problem computationally: They are well-defined procedures, leading from inputs to correct outputs in a finite amount of time. By designing efficient algorithms, we may be able to solve difficult problems effectively and in a relatively short amount of time. But not all algorithms are created equal! It is possible to create wonderful as well as absolutely awful algorithms -- to solve the exact same problem! Clearly, we much prefer the former.
- Our brief foray into algorithm design is your first encounter with formal, algorithmic thinking (although you've been practicing informal algorithmic thinking and problem solving already in daily life . . . without evening knowing or thinking about it!) We solved a few common, household problems with written algorithms. By doing so, we discovered that the act of setting down formal steps in a logical sequence, is sometimes not an easy task.
- Nevertheless, it is the task before us as we begin our journey into modeling. Successful modeling is predicated on good algorithmic design and problem solving. So it's appropriate that we begin that journey by talking about algorithms and trying our hand at designing a few simple ones. To that end, I assigned Homework #7, consisting of exercises 1, 2, and 3 from Problem Set 8. Exercise 1 is worth 5 pts, exercise 2 is worth 5 pts, and exercise 3 is worth 10 pts, for 20 pts total. Homework #7 is due at the end of class on 8 November.
1.17. 28 OCTOBER 2011
- Earlier today, a sharp-eyed CDS-130 student brought to my attention that the content folder for Class 16 was missing on Blackboard; I had not yet posted it! My apologies if this oversight of mine caused anyone confusion -- confusion is something we try very hard to avoid in CDS-130.
- To that end, the following is the narrative found on the folder for Class 16, which I've now posted in Blackboard:
- "This folder is empty: The material covered in this class is contained entirely in the "Introduction to Matlab" presentation, which is found in the Matlab folder. We covered Chapters 9 and 10 in that presentation. I also presented "IT Ethics and the Dark Side of Binary", which has not been released to students (it was based substantially on a presentation for another class)."
- So, what we covered yesterday consisted of Chapters 9 and 10 in your Matlab presentation. The red star marker has moved further along in the Matlab presentation and now resides comfortably on Chapter 11 -- Iteration III: WHILE loops. My expectation is to cover WHILE loops next week.
- WHILE loops are incredibly useful and powerful! Think of them as a cross between a FOR loop and an IF statement: A WHILE loop iterates just like a FOR loop, but, that iteration is instead controlled by a test condition, and not by a constantly changing loop index. As such -- and this is very important -- WHILE loops carry an implicit risk, namely, that the loop's test condition will never evaluate to the condition (either true or false) that terminates the loop! The potential therefore exists that a WHILE loop might enter a fastasyland known as an "infinite loop". If that happens, it's like your program goes straight into cryogenic deep freeze. That's actually the best possible outcome. In the worst case, the WHILE loop iterates forever and outputs an endless, massive amount of information!
- Not all infinite loops are bad, however. For example, event-driven programming is a technique that actually depends upon the maintenance -- break-out from, and return to -- certain types of infinite loops, usually to produce slick user interfaces. Microsoft Windows is the canonical example of an event-driven interface.
- My message: WHILE loops demand special care It is DEFINITELY the case with WHILE loops that, "the devil is in the details."
- As always, please feel free to text or email us with your questions as you complete homework #6. We're ready to assist.
1.18. 27 OCTOBER 2011 (CLASS 16)
- Please see above commentary under 28 October 2011.
1.19. 25 OCTOBER 2011 (CLASS 15)
- Following is homework #6, assigned today and due next Tuesday, 1 November 2011, at the end of class:
- From Problem Set #6 (second revision): 6 (1 pt), 7 (1 pt), 8 (1 pt), 1 (3 pts), 3(3 pts), 5 (4 pts)
- From Problem Set #7 (second revision): 1 (1pt), 3 (1pt), 5 (1pt), 7 (1pt), 14 (1pt), 18 (1pt), 19 (1pt)
- (Exercises carry the indicated point values; those in red font are Matlab exercises). Total homework value = 20 pts.
- Reading assignment: Please READ and UNDERSTAND the Matlab program “tumor_area.m”, which can be found in the MATLAB PROGRAMS folder on Blackboard. This program was written as a teaching exemplar and as a vehicle to introduce new, useful Matlab syntax in a working context. You will be expected to understand how the program works, and later, to modify it to accomplish one or more image processing tasks. Please do not be intimidated by the length of the program! The vast majority of it is comments; the actual computational pieces are quite small, and compact.
- Please note that the same information can be found on Blackboard, in the "Problem Sets and Homework Assignments" folder, on the "Homework Assignments" sheet that can be found there. You will note that homework #6 focuses on images, image processing and various aspects of random numbers and probability theory. To that end, I posted today's presentation to Blackboard as well, "Random Numbers and Basic Probability". These are essential concepts to have in-hand as we move forward; you'll need them for homework #6
- As I said at the end of class, on Thursday I'm going to present one of the Data Ethics and Security lectures (there are two planned) which is a CDS-130 requirement. This presentation is being moved forward from later in the term. It will contain essential information related to information security, but it will also contain an added dimension -- "The Dark Side of Binary". That portion of Thursday's presentation will illuminate an interesting way that simple binary operations might be used against us, thus equipping us with the knowledge we need to avoid falling victim to these types of scams.
1.20. 22 OCTOBER 2011
- This Tuesday, 25 October 2011, I will assign homework #6. It will feature several exercises related to images, colormaps, colorbars and perhaps pattern recognition. That last topic -- pattern recognition -- if assigned, may require some Matlab programming.
- I'm mentioning this to you ahead of time because it's been some time, now, since the Images lectures (we were knocked a bit off schedule by Columbus Day). Since we're not going to revisit those lectures -- we've completed them -- and since Tuesday's homework will include exercises based on them, I recommend that each of you take some time to review these lectures. In particular, please review how the checkerboard images were formed. What Matlab programming constructs were used? How is a colormap created and used? What is a colorbar and how is it useful? How are images IMPORTED into Matlab from, say, the web, and then displayed? How can we detect "bent" patterns in black-and-white images -- what's the IF statement logic underpinning that task?
- You'll find answers to these questions and more in the two Image presentations. Please take a few minutes to review them, and Tuesday's homework will subsequently seem much less foreign. I'll draw several homework #6 exercises from Problem Set 6, and, from concepts in the Pattern Recognition presentation. I also intend to assign a few more IF statement logic exercises.
- As we continue our transition toward modeling, we'll begin using the Matlab syntax toolkit we've been assembling for the last few weeks, rather than studying it. Our kit now includes FOR loops, DNFLs, IF-ELSE-END and IF-ELSEIF-ELSE-END constructions, as well as assignment statements, vectors, matrices, and a glass menagerie of functions of various types: the familiar, arithmetic ones, and the less familiar ones like mod. I'll also add a few more functions to this collection that we'll soon find useful.
- Since our focus will now become the USE of Matlab syntax, I'll consider that syntax to be part of your background knowledge from this point forward. We've exercised that knowledge quite a bit lately. Now we're going to focus on putting it to practical use, to solve specific, computational problems.
- If you perhaps feel less than confident about one or more aspects of Matlab syntax, by all means please let us know. You may arrange for office hours with me or any of the assistants, text us when necessary at the numbers provided to you, or email us instead if that's your preference. We're always ready to help.
1.21. 15 OCTOBER 2011 (MIDTERM EXAM STUDY ADVICE)
- The CDS-130/03 Fall 2011 midterm exam will be delivered in-class on Thursday 20 October 2011. It will begin promptly at 9:00am, conclude promptly at 10:15am, and is worth 100 points. Each exam problem (1--16) is associated with a particular exercise or set of exercises from the problem sets you find posted on Blackboard. Note that this advice DOES NOT MEAN that the exam problems are exactly the same as those from the problem sets! Rather, what it does mean is that there are strong similarities in scope, content and method between the exam problem on the left, and the problem set exercise(s) identified on the right:
- EXAM PROBLEM 1: Problem Set 1 (INTRODUCTION TO BINARY), exercise 6
- EXAM PROBLEM 2: Problem Set 2 (BINARY ADDITION), exercises 7, 9, 10
- EXAM PROBLEM 3: Problem Set 2 (BINARY ADDITION), exercises 14, 17, 20
- EXAM PROBLEM 4: Problem Set 3 (BINARY MULT, DIV AND POWERS OF 2 -- revised), exercises 7, 8, 9
- EXAM PROBLEM 5: Problem Set 3 (BINARY MULT, DIV AND POWERS OF 2 -- revised), exercises 4, 5
- EXAM PROBLEM 6: Problem Set 3 (BINARY MULT, DIV AND POWERS OF 2 -- revised), exercises 16, 18, 19
- EXAM PROBLEM 7: Problem Set 4 (DATA, ENCODING AND COMPUTING LIMITS -- second revision), exercises 6, 7
- EXAM PROBLEM 8: Problem Set 4 (DATA, ENCODING AND COMPUTING LIMITS -- second revision), exercises 7, 10, 15, 20
- EXAM PROBLEM 9: Problem Set 4 (DATA, ENCODING AND COMPUTING LIMITS -- second revision), exercises 12, 19, 21
- EXAM PROBLEM 10: Problem Set 4 (DATA, ENCODING AND COMPUTING LIMITS -- second revision), exercise 24
- EXAM PROBLEM 11: Problem Set 5 (LOGIC GATES -- third revision), exercises 1, 2, 3
- EXAM PROBLEM 12: Problem Set 5 (LOGIC GATES -- third revision), exercises 17, 18, 19
- EXAM PROBLEM 13: No direct analogs, but please study Problem Set 5 (LOGIC GATES -- third revision), exercises 17, 18, 19 and consider the combination of those FOR loops with an embedded IF statement construction, such as found in Problem Set 6 (IMAGES, COLOR MAPS and IF STATEMENTS -- second revision), exercises 15, 16, 17
- EXAM PROBLEM 14: Problem Set 6 (IMAGES, COLOR MAPS and IF STATEMENTS -- second revision), exercises 18, 19, 20
- EXAM PROBLEM 15: Problem Set 5 (LOGIC GATES -- third revision), exercises 20, 21, 22, 25
- EXAM PROBLEM 16: Problem Set 5 (LOGIC GATES -- third revision), exercises 26, 27, 28
- GENERAL OBSERVATIONS: Matlab arrays may NOT be indexed with zero! Thus, if we have an array A that is, say, 3x3, and we try to retrieve a value by asking for A(0,2), then Matlab will signal an error because index values into an array must start with 1. 0 is not allowed (at any position!). Same goes for other array types, like vectors. So if we had a vector A, which was equal to (for example) [0 1 2 3], and if I then issued commands like the following to Matlab A(0) = 1 or counter = A(0) , either command would produce an error because A(0) does not exist. ALL array index values start at 1. Now, we can store the value of 0 in any array or vector position, of course. We just can't index an array or vector with 0.
- You will be provided with a limited-size table of the powers of two, but that table will NOT include 2^10, 2^11, 2^12 or 2^13. You will also not be provided with the logic tables for AND, OR, NAND or NOR gates. I strongly recommend that you memorize the base ten value of 2^10 and the base ten values of powers of two nearby to 2^10, such as 2^11, 2^12 and 2^13. I also strongly recommend that you memorize the logic tables for AND, OR, NAND and NOR.
- Matlab programming will not be required on this exam. However, you will be asked to predict the output from Matlab programs. You will also be asked to decide whether or not particular Matlab programs will execute (i.e., you will be asked to perform failure analysis on Matlab programs). If these programs will not execute, then you will be expected to state why -- that is, identify the problem causing the error that's preventing program execution.
- Calculators will not be allowed on this exam, nor will they be required: All the computations you will need to do will involve binary addition, multiplication, and integer division. These are familiar operations. The Matlab program output prediction and failure analysis problems will not involve any arithmetic beyond integer addition, subtraction and multiplication. You will also be expected to know how the mod function works. In particular, think about mod(number, 2) and mod(number, 3), where "number" is some integer, say, less than 10. For example, what value is returned by mod(3,2)? mod(2,3)? mod (7,3)? mod(6,2)?
- The exam will not cover images, colors, colormaps, colorbars, image processing or pattern recognition.
- The exam problems will be variants of the above identified exercises. In some cases, all of the identified exercises are similar. That's good news, since it means the associated exam problem will be similar to them as well. In other cases, the exam problem is a fusion of concepts found in the identified exercises, meaning that if you understand the concepts underlying each of the identified exercises, then you should have no problem at all solving the associated exam problem.
- To repeat from earlier announcements: Samantha Fleming is organizing a midterm exam review session this Wednesday afternoon, 19 October. She will use the above exam study advice as a blueprint to guide her session. If any of these exercises are confusing for you, or otherwise unclear, then please seek assistance. In particular, please consider attending Samantha's Wednesday review session.
- Additional, detailed comments that expand upon the above information, were emailed separately to CDS-130/03 Fall 2011 class members on 15 October 2011.
1.22. 14 OCTOBER 2011
- I posted the "Exam Extra Credit Quiz #1 Answer Key" to Blackboard. You will find it in the "Homework and Quiz Answer Keys" folder.
- INTERESTING TIDBIT: Remember back to our first class, when we talked about the interdisciplinary aspect of computational science? Every knowledge domain, it seems, is touched by computational science: neuroscience, biology, medicine, chemistry, mathematics -- each of these features a robust, highly active and critically important computational dimension. Well, for those of you interested in environmental science (or, who have declared environmental science as your major), you may be interested to know that environmental scientists also use advanced computational methods to simulate the various aspects of water resource management! Visit this conference website to learn more. According to the website:
- "The conference will be a forum for the dissemination of the latest ideas in the development and application of advanced computational techniques to problems in water resources and related fields, including surface and subsurface hydrology, environmental hydrodynamics, ecohydrology, contaminant remediation, carbon sequestration, climate change, and nuclear waste storage. The inexorable increase in raw computational power, software developments, availability of on-line hydrologic data, and recent advances in cyber-infrastructure make this a particularly exciting time for computational applications to water resources and geoscience challenges."
- Exciting indeed! It's a great time to be studying computational science!
1.23. 13 OCTOBER (CLASS 13)
- Today we finished the "Image Processing and Pattern Recognition" presentation. An updated version of that presentation (version three) can be found in the Class 12 folder on Blackboard.
- Homework #5 is due Tuesday, 18 October 2011, as per class announcement, previous email announcement, and the 7 October Wiki posting (see below).
- Earlier today I posted all the grades for Exam Extra Credit Quiz #1. They now appear on Blackboard.
- The CDS-130 Midterm Exam will be delivered in class on Thursday, 20 October 2011. I will distribute the exam just prior to 9:00am and then, it will begin PROMPTLY AT 9:00am. The exam will last 75 minutes, and then conclude PROMPTLY AT 10:15am. Please plan your travel and other schedules accordingly: Late arrival can only work against you, since you may only use the remaining time to complete your exam. I therefore strongly recommend arriving early by about 5-10 minutes, so that you may have time to get settled and collect your thoughts prior to beginning the exam.
- Next week Wednesday, 19 October, Samantha Fleming will organize a CDS-130 Midterm Review session. This session will be held in an empty classroom in the Research 1 building -- either room 301 or 302 -- both of which feature whiteboards and projector screens.
- Details will follow in another, forthcoming email, such as the exact session time and meeting location (although we anticipate sometime during the afternoon, in one of the above mentioned rooms). Samantha may be assisted by me or by others as well. We'll follow a question-and-answer format. To maximize its effectiveness, the review session will be keyed to the midterm exam study advice that I'll send out tomorrow or Saturday. As has been the case thus far, my exam study advice will call-out specific problems and problem types, so that your midterm preparation is both efficient and effective. That advice will serve as the review session's "blueprint".
- Please send an email or text to Samantha, to notify her if you'll attend next Wednesday's review. Doing so will enable her to get a handle on anticipated attendance and schedule her time appropriately -- thereby delivering the best results to you.
- As you all know, we've been experiencing Matlab connectivity problems through GMU's VCL. GMU's ITU has been notified, and they are working to resolve the issue.
1.24. 8 OCTOBER
EXAM EXTRA CREDIT QUIZ STUDY ADVICE
- The below study advice is provided to you to assist your preparation for the exam extra credit quiz, to be delivered in class this coming Thursday, 13 October 2011, during the last 20 minutes of class. I've called out two specific problems that embody content that will appear on the quiz: Homework Extra Credit Quiz, Problem #1 and Homework Extra Credit Quiz, Problem #3. I've also provided a sample Matlab code that may be similar to what could appear on the quiz. The quiz will consist of 3 problems, and will offer you 6 exam extra credit points. What follows is a detailed discussion of each of these three problem types.
- Homework Extra Credit Quiz, Problem #1:
- This problem tested multiplication of binary numbers by a power of two, as well as binary addition. Please ensure that you understand this problem -- in particular, how to add and multiply binary numbers! Also remember: If a binary number is repeated, and the number of repetitions is equal to a power of two, then this is simply a multiplication problem, isn't it? For example, if I want to add the binary numbers 1111 1111, 1111 1111, 1111 1111, and 1111 1111, that's really 4 times 1111 1111. 4 is equal to 2^2, and so the result of the addition would be 1111 1111 with two zeros added onto the end, like this: 1111 1111 00, which I can rewrite as 11 1111 1100. Similarly, what if I had the binary number 1111 1001 0111, and I had 16 of them that I wanted to add together? Well, 16 is 2^4 isn't it? So, adding 1111 1001 0111 to itself 16 times, is just 1111 1001 0111 multiplied by 2^4. And I know how to do that: 1111 1001 0111 multiplied by 2^4 = 1111 1001 0111 0000 . Finally, if I had 1111 1111 1111 1111 and wanted to multiply it by 256, I would add eight zeros onto the end of 1111 1111 1111 1111, because 256 is 2^8, and I would write the result like this: 1111 1111 1111 1111 0000 0000.
- VARIATIONS: Now, the powers of two will be given for you on the exam extra credit quiz, up through 2^15, just in case you feel you need them. I'd nevertheless encourage you to "know" that 2^10 = 1024 (i.e., memorize this number). Why? Because knowing this may save you time, and regrettably, time is the one thing that's always working against you on any quiz or exam. So, for example, if I want to multiply the binary number 1111 1111 by 1024, then the answer is 1111 1111 with 10 zeros added to the end, because 1024 = 2^10: 1111 1111 0000 0000 00, which can be rewritten like this: 11 1111 1100 0000 0000. Knowing that 2^10 = 1024, enabled me to quickly write down the answer to the above multiplication, thereby saving valuable time that I can now spend on a different problem. A question for you: If asked you to add the binary representation of ZERO to any number, you can simply ignore that, right? Zero added to any number is just that number. So for example, if I ask you to add together a list of binary numbers containing 1111 1111 1111 1111 (appearing only once) and 0000 0000 0000 0000 (appearing, say, one hundred million times), then the answer would be . . . ?
- Calculators will not be allowed on this quiz!
- Homework Extra Credit Quiz, Problem #3:
- Please study this problem carefully. And please note: The BINARY REPRESENTATION of the largest possible positive integer that I can represent with N bits, is simply a line of N 1s. So the binary representation of the largest possible positive integer that I can represent with 4 bits is 1111 . Similarly, the BINARY REPRESENTATION of the largest possible positive integer that I can represent with 8 bits is 1111 1111; the BINARY REPRESENTATION of the largest possible positive integer that I can represent with 12 bits is 1111 1111 1111. Etc. I repeat: The BINARY REPRESENTATION of the largest possible positive integer that I can represent with N bits, is simply a line of N 1s. So, consider the following positive integer binary number: 1111 1111 1111 1101 1111 . Is that the largest possible positive binary number that can be represented with 20 bits? Why or why not?
- Now, this next question is different than the preceding: What is the BASE TEN REPRESENTATION of the largest possible positive integer that I can represent with N bits? The answer in this case, as we know, is 2^N - 1. So: The base ten representation of the largest possible positive integer that I can represent with 4 bits, is 2^4 - 1 = 16 - 1 = 15. The base ten representation of the largest possible positive integer that I can represent with 8 bits is 2^8 - 1 = 256 - 1 = 255. The base ten representation of the largest possible positive integer that I can represent with 11 bits is 2^11 - 1 = 2048 - 1 = 2047. And, in this last problem, having memorized the value 2^10 = 1024 helped me quite a bit, since I could calculate 2^11 = 2048 without too much effort -- thus saving valuable quiz time.
- VARIATIONS: If I choose four ARBITRARY eight bit, positive binary integers, and add them together, what is the minimum number of bits required to hold the sum, such that overflow does not occur? Whenever I'm given a choice like this -- here, the word "arbitrary" means, "you choose whichever binary numbers you want" -- I choose numbers that lead me closer to the required answer. Since the problem statement is worried about overflow, that means the problem statement is worried about adding together the largest possible positive integers that can be represented with 8 bits. So . . . what is the BINARY REPRESENTATION of the largest possible positive integer that I can represent with 8 bits? That would be 1111 1111, right? OK, now I'll choose four of them (These are arbitrary choices, right? So, I'll choose the four largest). Thus, I want to add 1111 1111 to itself, four times. I know how to do that (see Homework Extra Credit Quiz, Problem #1 discussion, above): 1111 1111 times 4 is 1111 1111 00, which can be rewritten 11 1111 1100 . And now how many bits is that? Ten. And that's the answer to the question.
- Yeah, but why not choose 12 bits? 12 bits can certainly hold a 10 bit result, right? Yes, I could choose 12 bits. But I could also choose 14 bits, or 18 bits or 32 bits or 1024 bits. ALL THOSE EXTRA BITS ARE FILLED WITH ZEROS IN THE FINAL RESULT! So they're not necessary. They're wasted bits and thus, not the MINIMUM number of bits, which is what the problem is asking for. On the other hand if I tried to use 9 bits to represent the sum, then I would lose one bit because the answer is 10 bits long, and that extra bit would "fall off the end". THUS, the minimum number of bits required to hold the sum is 10: Not 9 (too small), not 11 (too large). Just 10 -- just right, just what I need.
- Now how about this: If I choose EIGHT ARBITRARY four bit, positive binary integers, and add them to FOUR ARBITRARY eight bit, positive binary integers, what is the minimum number of bits required to hold the sum? Seems like I'd choose 1111 and multiply it by 8, and then add that result to 1111 1111 multiplied by 4. The number of bits in the result would then indicate the minimum number of bits required to hold the sum. Note that this variation requires me to first do integer binary multiplications followed by an integer binary addition . . .
- Matlab Coding -- DOUBLE NESTED FOR LOOPS (DNFLs):
- Consider the following Matlab code, which executes without error:
clear; clc; A(3,3) = 1; B(3,3) = 2; C(3,3) = 3; A = A + 1; B = B - 1; for m = [1:3] for n = [1:3] A(m,n) = A(m,n) + m; B(m,n) = B(m,n) - n; C(m,n) = C(m,n) + A(m,n) * B(m,n); end end A B C
- You should be able to predict (without using Matlab!) that this code will produce the following output:
A = 2 2 2 3 3 3 4 4 5 B = -2 -3 -4 -2 -3 -4 -2 -3 -2 C = -4 -6 -8 -6 -9 -12 -8 -12 -7
- When doing DNFL problems, you should write out the matrix representations of A, B, and C on a piece of scratch paper (we will provide you with scratch paper), and modify the contents of each matrix as appropriate, and as each statement in the program is executed from top to bottom -- including EACH AND EVERY statement executed inside the DNFL! By keeping a written tally like this, you'll be able to keep close track of what happens at every step along the way in the program's execution -- and thus, will arrive at the correct answer.
- You will not be permitted to use Matlab on the quiz.
- Please consider the above advice carefully. It is direct, to the point, and designed to be helpful. It is not necessary to study additional topics outside this advice. That would be an inefficient use of your study time. In particular, I'm not addressing images on this quiz. Those will appear later.
- As always, please recall: This quiz cannot work against you. That's because it's an extra credit quiz. It can only help you.
1.25. 7 OCTOBER
- According to the VCL system announcement which appeared recently on BlackBoard, the VCL will go down this Sunday 9 October and return to service on Tuesday 11 October. Thus, CDS-130 students working offsite will not have Matlab available to them Sunday at midnight through Tuesday at 7am. Note that homework #5's original due date was Thursday 13 October.
- In an effort to return this lost VCL connectivity time to you, I've decided that homework #5 will NOT be due on Thursday, 13 October. The NEW due date for CDS-130 homework #5, is Tuesday 18 October.
- Recall that I said I would not assign homework during your exam study period, and I will not: You will not receive any additional homework assignments next week that are due the following week. However, granting this extension on homework #5 -- in order to make up for lost VCL connectivity -- means that homework #5 may now creep into your exam study period . . . IF you permit it to do so. My recommendation is therefore to do your best to try and hand in homework #5 on Thursday 13 October rather than wait until Tuesday 18 October: Judicious planning may help you avoid the coming VCL outage and still finish up homework #5 by Thursday.
- All that said, I will accept homework #5 up through the end of class on Tuesday 18 October.
1.26. 6 OCTOBER 2011 (CLASS 12)
- I've just posted to Blackboard an updated version of the "Image Processing and Pattern Recognition" presentation that we reviewed in today's class. We made it as far as slide #15 (marked with a red star) and so we will pick up there next Thursday, 13 October 2011, and finish the presentation before starting the exam extra credit quiz that will be given on 13 October. The updated presentation is located in the course Blackboard folder labeled "Class 12".
- As mentioned in today's class, please be careful when copying and pasting code from a PowerPoint presentation into Matlab: sometimes, certain characters do not copy over as they should. This is particularly annoying with single quote symbols: ' These symbols always seem to have problems. Other problematic symbols seem to be minus signs - which Powerpoint interprets as hyphens and thus, may also not copy over to Matlab successfully. Please be mindful of these issues: It may not be the case that you've done anything wrong when copying and pasting Matlab code. Rather, it may be an issue with the copy and paste operation itself.
- If you try running Matlab code featuring problematic symbols, the code will of course signal an error. The line number where the error occurs is actually identified in Matlab's error message, the message that appears in the command line console window. You will also see that in the editor window, problematic symbols are underlined with little red squiggly lines. Sometimes these are real errors, and sometimes only warnings. You can tell the difference between the two because errors result in small red tick mark lines appearing on the right side of the editor screen, marked at the exact line position where the error occurred in your code. Warnings, on the other hand, result in orange tick mark lines and not red lines. For now, just ignore the orange tick mark lines (I'll explain later why they occur, particularly in the case of FOR loops), but please do pay attention to the red tick mark lines when they appear.
- See the .png graphic, distributed to you via email, for a visual explanation of the preceding paragraph.
- We will not have class on Tuesday, 11 October, due to the Columbus Day rescheduling. Our next class meeting will therefore occur on Thursday 13 October. I will not assign homework next week because your CDS-130 midterm exam will be given the following week, on 20 October 2011, and I'd rather have you spend your CDS-130 study time preparing for the midterm than doing additional homework.
- I will send out study advice in advance of both the midterm exam, and exam extra credit quiz. As explained previously, the intention of this broadcast advice is to help you focus your study on the topics and issues that are most relevant for the quiz or the exam you're about to take.
1.27. 4 OCTOBER 2011 (CLASS 11)
- I just posted a number of files to Blackboard, including homework assignment #5. Please note that this homework will be due in class on 13 October 2011. You will hand in this assignment BEFORE taking the exam extra credit quiz on that day.
- Homework #5 consists of the following exercises, carrying the indicated point values: From Problem Set #5 (third revision): 15 (1 pt), 17 (1 pt), 18 (2 pts); Problem Set #6: 10 (1 pt), 11 (1 pt), 15 (1 pt), 16 (1 pt), 17 (2 pts.), 20 (1 pt); Problem Set 6.5: 1 (3 pts), 2 (2 pts), 4 (4 pts).
- Please note that I've posted an updated problem Set #5 to Blackboard -- the third revision. I made some editorial changes and so you should use the third revision of Problem Set #5 for homework #5, and not previous versions. I also posted Problem Set 6.5 to Blackboard, which consists of Matlab programming exercises.
- As per above, homework #5 is due on 13 October (Thursday) and NOT on 11 October (Tuesday)! We do not have class on 11 October.
- Please also note that you have an exam extra credit quiz coming up. As always, I will send out study advice in advance of the quiz so your quiz study is productively focused. Like the recent homework extra credit quiz, the exam extra credit quiz will consume about 20 minutes of class time, and may consist of two or three problems. Since this is an exam extra credit quiz (that is, for exam extra credit -- the most valuable kind), it will likely feature problems that are somewhat more difficult than those you've encountered in homework thus far. Nevertheless, I do expect some strong similarities between the problems that will appear on the quiz, and those suggested in my forthcoming study advice. I should send that advice out in a broadcast email to you by the end of this week.
- On Thursday we will continue our exploration of image processing inside a Matlab context. The presentation will feature significant amounts of Matlab code, and that code will contain double nested FOR loops (DNFLs) that contain IF statements in their various forms. My recommendation would be to review DNFL operation and how IF statements work. I'll also distribute the presentation prior to class, so that you may have it available to follow along as the lecture proceeds.
- Finally, and as always, we are ready to assist you as needed. Please don't hesitate to ask questions, either in class, during an appointment, via text or email if that is your preference.
1.28. 2 OCTOBER 2011
- UPDATE: Problem Set #6 ("Images, Colormaps and IF Statements") was posted to Blackboard.
- There are some clarifications I'd like to make for three exercises assigned in homework #4:
- Clarification #1:
- When working Problem Set #5, Exercise 9 (one of the assigned exercises on homework #4), please report the results of the division in real form (that is, as decimals), and not integer form (that is, without decimals).
- For example, 1/4 = 0.2500 and not 0 (1/4 does in fact = 0 if we are considering integer division!). Similarly, 1/5 = 0.2000 and not 0; 1/1 = 1.0000 and not 1, etc.
- My apologies if this caused any confusion. When doing division, Matlab defaults to computing real results and must be specifically instructed to generate integer results. So you should report your results from this exercise in real form and not in integer form. I suspect that most of you will indeed report the results of the division in real form, but I wanted to ensure that this is also the case for those of you who may have thought otherwise.
- In exercises 8, 10 and 11, on the other hand, you can (and should) report your results in integer format. It's only exercise 9 that is different because only exercise 9 features division.
- Clarification #2:
- In exercises 8 and 9, you will see that the vector A is created like this:
- A(1,5) = 0
- Thus, A is a row vector consisting of one row and five columns, and each of its positions is assigned a value of 0. Later, inside the FOR loops, you will see A referenced like this:
- A(n)
- where n is taking on values from 1 to 5. Thus, we will generate statements like this (in exercise 8):
- A(1) = A(1) - 1^2
- Now, this is a valid way to reference the first position inside vector A. You can also reference that same position using two indices (separated by a comma), where the first index is always held constant at the value 1 -- because we're always in the first row -- like this:
- A(1,1) = A(1,1) - 1^2
- So either A(1) or A(1,1) is a valid way to reference the first position of a row vector. Similarly, A(1,2) or A(2) are equally valid ways to reference the second position of a row vector. In that case, the assignment statement inside the FOR loop would appear like this:
- A(1,2) = A(1,2) - 2^2
- I have used both single and double index notations for row vectors, in the lectures and in the Matlab presentation. I just wanted to remind you that these two notations are equivalent -- for row vectors, not for two dimensional arrays! -- so that we can avoid any confusion that might possibly develop.
- Also . . . please don't forget about images, colormaps and colorbars! There is information in the 27 September 2011 presentation, entitled "Introduction to Images and Colormaps", that you'll need to remember. Specifically, you should know the RGB vector representations of eight basic colors (formed using three bits), as follows:
- red is [1 0 0]
- green is [0 1 0]
- blue is [0 0 1]
- yellow is [1 1 0]
- light blue is [0 1 1]
- magenta is [1 0 1]
- white is [1 1 1]
- black is [0 0 0]
- You should know what these colors look like displayed onscreen, on a Matlab colorbar, and how to create a colorbar using Matlab's "colorbar" command. You should also know how to create a colormap featuring two or more of these eight colors. Please refer to examples in the 27 September presentation.
- I will post Problem Set #6 to BlackBoard later today, for you reference. It contains several image exercises, and all of them feature colorbars and colormaps. Now, some of the Matlab code in Problem Set #6 exercises contains IF statements, and we haven't covered those yet. Not to worry: We'll cover IF statements in Tuesday's Matlab presentation. You may also wish to refer to "Short Tutorial II", distributed yesterday via email and posted to BlackBoard. It discusses two basic variants of Matlab's IF statement. These two variants are referred to as IF-ELSE-END, and IF-END.
- The IF-ELSE-END variant enables programs to decide between two courses of action. The IF-END variant enables programs to decide whether to act, or otherwise do nothing. There is a third, slightly more involved IF statement variant that features a different keyword: ELSEIF. Using this keyword, we can write IF statements that enable programs to decide between multiple courses of action, not just one or two. I'll discuss this during Tuesday's class and show you how it works. Multi-way decision-making is an important program capability for you to know about and to use; several Problem Set #6 exercises contain IF statements that use the ELSEIF keyword.
1.29. 1 OCTOBER 2011
- Please recall that homework #4 is due this Tuesday, 4 October 2011, at the end of class. As per email announcement sent out to the class on 27 September 2011, homework #4 consists of the following exercises from the indicated problem sets: From Problem Set #4: 31 (2 pts); From Problem Set #5: 6 (2 pts); From Problem Set #5: 8 (1 pt), 9 (1 pt), 10 (2 pts), 11 (2 pts); From Problem Set #4: 33 (2 pts), 36 (4 pts), 37 (4 pts). Please note that the last two exercises, 36 and 37 from Problem Set #4, are Matlab coding exercises.
- Today I posted to our Blackboard account two "Short Matlab Tutorials", one covering double nested FOR loops and the other covering IF statements. Please read them if you have the time. The first one covers material we've already discussed in class; the second one anticipates material we have yet to discuss in class (as of the end of class on Thursday, 29 September 2011, we've made it up to slide 162 in the "Introduction to Matlab" presentation, labeled, "Conditionals: IF statements"). Both tutorials are designed to enhance your understanding of concepts appearing in the Matlab presentation. We will cover IF statements during the 4 October 2011 class.
1.30. 29 SEPTEMBER 2011 (CLASS 10)
- Class 10 was devoted to Matlab. We reviewed FOR loops and discussed double nested FOR loops (DNFLs). DNFLs, used in conjunction with IF statements, comprise interesting computational structures that will enable us to do image processing. We'll discuss Matlab's IF statements on 4 October 2011.
- Upcoming modeling lectures will rely extensively on FOR loops, to investigate various physical phenomena that all manifest a common, underlying mathematical structure. We'll modify that structure to account for variations on the basic theme, thereby allowing us to model more complicated phenomena, and, to derive interesting insights from them. What you'll discover is that we will acquire an impressive modeling capability along the way, and, that the time and effort we're investing in our careful exploration of Matlab will begin paying dividends.
1.31. 27 SEPTEMBER 2011 (CLASS 9)
- Today we discussed the basics of images, and learned that images can be represented as arrays filled with numerical values. Those values may be integers or reals. But the point is that by representing images as arrays of numerical values, we have images in a form that enables us to operate on them. In particular, we can access the fine details of images using double nested FOR loop structures (DNFLs), create negatives of images, and selectively alter individual colors within them.
- An upcoming lecture will demonstrate how to use DNFLs in combination with IF statements to detect patterns in images, count color variations inside images (and thereby detect and compute the total area covered by a cancerous tumor in a real image from the National Cancer Institute), and perform other useful operations. Image processing is a very important, vibrant field of research that's at the heart of many modern technologies, particuarly medical technologies.
1.32. 25 SEPTEMBER 2011
- If you can find the time in your busy schedules, please try to review the "Introduction to Matlab" presentation in advance of this Tuesday's class meeting (27 September 2011). In particular: Please re-familiarize yourself with the mechanics and syntax of Matlab FOR loops and (if possible), please start reading the section on double nested FOR loops. As of Tuesday, we begin our transition away from the mechanics of computation and move toward modeling.
- Up until last Thursday, we've concentrated on binary -- bit patterns, and interpreting them as numbers as well as looking at them more generally. We talked about how a computer's memory is actually just a large collection of empty "slots" (storage) into which a computer places bit patterns and from which a computer retrieves bit patterns. Manipulation and interpretation of bit patterns governs a computer's entire operation; bit patterns can be interpreted as (among other things) binary numbers, colors, or just about anything.
- We also learned the basics of HOW a computation is actually implemented inside computer circuitry, using logic gates. These gates are comprised (on the electronic component level) of transistors, resistors and diodes. But at the end of the day, what logic gates do is operate on (manipulate) bit patterns -- they transform input bit patterns into new, output bit patterns and by doing so, realize computation. Logic circuits endow a computer with the actual ability to compute!
- In parallel with the above, we've also been working on the first building block of computer programs -- that of SEQUENCE. Sequence is realized as assignment statements, written in correct syntax an in a particular order. Sequence enables us to enter data into a computer, store the data in it's memory (using variable assignment), operate on it (using arithmetic operations), and get back meaningful results (printing to the command line console). Matlab is the means through which we've interacted with a computer and in particular, how we've been realizing sequence. We've solved some interesting problems inside Matlab, using variable assignment. For example, consider the quadratic equation homework problem. For those of you who saved your code to that problem, a moment's reflection will reveal that you now have a working code to solve ANY QUADRATIC EQUATION! That's right: all you need to do is fill in the appropriate values for the constants a, b and c, and let your program solve the equation for its two roots. Those roots may be complex. But Matlab will compute them. So, YOU'VE ACTUALLY BUILT YOUR FIRST USEFUL TOOL!
- In coming lectures, we'll continue exploring Matlab, and, continue building useful tools. Furthermore, we will come to rely increasingly upon Matlab code as a medium for expressing our computational thinking. That is, as a way of expressing ALGORITHMS to solve problems.
- Algorithmic thinking is really what CDS-130 is all about: Teaching you to think about problems, how to represent those problems in executable computer code, and, how to structure your code such that problems are solved correctly in a finite amount of time. That is the very essence of an algorithm, and we'll soon discuss the concept in greater detail, in upcoming lectures.
- Those lectures will begin featuring Matlab code as integral parts of the presentation. I therefore strongly urge all of you to review the "Introduction to Matlab" presentation and work through the examples it contains, to continuously refresh your knowledge. Only by doing so will you gain the familiarity and comfort required to write Matlab code to solve problems (recall the Kernighan and Richie quote at the beginning of that presentation!). We will be doing a lot of coding to solve problems; you'll gain a lot of practice. The goal, of course, is to develop your capability to interpret and to solve real-world problems computationally, inside an appropriate framework.
1.33. 24 SEPTEMBER 2011
- Grades for Homework Extra Credit Quiz #2 are now posted (this quiz was delivered at the end of class on 22 September 2011). In general, VERY GOOD JOB! Again, please remember that this quiz was for extra credit. Therefore, the grade you receive on it can only help you, not work against you.
- As always, we are available for your questions, as needed. Please don't hesitate to email or text us if you require assistance.
- Have a good weekend!
1.34. 22 SEPTEMBER 2011 (CLASS 8)
- Today's lecture consisted entirely of Matlab, and, covered FOR loops, up through Example 11 in the presentation "Introduction to Matlab". FOR loops are vitally important computational structures; they represent the second fundamental building block of programs: REPETITION. Using FOR loops, we can build programs that repeatedly execute specified blocks of program statements. In fact, a significant portion of the total execution time of computational science simulations is spent inside FOR loops. So, solid knowledge of these constructions is foundational. We'll utilize FOR loops again and again, particularly as we move into the modeling portion of CDS-130.
- Extra credit quiz #2 was also delivered during the final 25 minutes of class.
1.35. 20 SEPTEMBER 2011 (CLASS 7)
- Homework #3 consists of the following exercises, which carry the indicated point values: From Problem Set 3: #15 (1 pt), #17 (1 pt). From Problem Set 4: #4 (1 pt), #8 (2 pts), #9 (2 pts), #13 (1 pt), #15 (1 pt), #22 (1 pt), #27 (2 pts). From Problem Set 5: #1 (4 pts), #3 (4 pts). Homework #3 will be due at the end of class on Tuesday, 27 September 2011.
- Some of you have been having problems with Matlab's VCL connectivity. If your problem persists, then please complete the assigned Matlab problems using the on-campus computers in the JC or in Innovation Hall. Luckily, there are no assigned Matlab exercises this week and so connectivity won't be a problem (by definition!)
- The grading on the last two assigned problems in homework #3 might seem interesting. The logic is this: There are eight total input/output combinations and thus, each two correct input/output combinations earns one point.
- For those of you who arrived late to class today, please know that Thursday's homework extra credit quiz will occur in the final 25 minutes of class (timing was decided by class vote today): from 9:50am to 10:10am. It will be 20 minutes in length. So please plan to arrive to class no later than 9:50am, to ensure that you have the full 20 minutes available to work on it. I will send out study advice separately. Remember: This is an extra credit quiz and so, it can only help you.
- Finally: Today's lecture presentation can be found on Blackboard in the folder labeled "Class 7", and you will find Problem Sets 4 and 5 in the folder labeled "Problem Sets and Homework Assignments". I've also updated the homework assignment sheet to include homework #3, as it appears above.
- HOMEWORK EXTRA CREDIT QUIZ #2 STUDY ADVICE: My intention is to include four problems on Thursday's extra credit quiz that are similar in scope and content to the exercises found in your Problem Sets. In order to focus your study in the most productive directions, I recommend that you consider the following exercises. They (and their derivatives) are representative of the quiz problems you will encounter on Thursday:
- From Problem Set 3: #20, #21
- From Problem Set 4: #20, #21, #22 (NOTE: There's a typo in #21: "in base two" should instead read, "as a power of two")
- From Problem Set 4: #23
- From Problem Set 5: #5
- Please note that you will be provided with a table of powers of two, but, you will not be provided with logic tables for AND, OR, NAND, NOR, NOT. I therefore encourage you to study these logic tables (maybe even memorizing them with the help of the "logic table mnemonics"), and, to develop facility with their use. Of course, we may award partial credit for a quiz problem, but only if supporting work is shown.
- Please remember that Thursday's quiz begins promptly at 9:50am, and concludes promptly at 10:10am!
1.36. 15 SEPTEMBER 2011 (CLASS 6)
- I posted today's presentation, "Binary Data, Encoding and Computing Limits" on BlackBoard, into the content folder labeled "Class 6 (15 September 2011)". It contains some data tables that may be hard to read for those sitting near the back of class; you'll also need to refer to these tables during class. So I posted this presentation in advance of class so that you may have it available and follow along as today's lecture proceeds.
1.37. 13 SEPTEMBER 2011 (CLASS 5)
- I just posted this morning's presentation to Blackboard, into a folder labeled "Class 5", and I also posted homework assignment #2 and problem set #3, both of which appear in the "Problem Sets and Homework Assignments" folder. Homework #2 is comprised of the following exercises: From Problem Set #2: 23, 31 and from Problem Set #3: 3, 5, 7, 8, 20, 21, 22, 23, 26, 27. The exercises on the homework sheet that appear in red are Matlab exercises.
- Homework #2 is due at the end of class on 20 September 2011. It consists of a mixture of eight routine binary multiplication and division exercises (1 point each) and four Matlab exercises (3 points each), for a combined, total point value for homework #2 of 20 points. Please turn in homework #2 in hardcopy on 20 September.
- A class Google calendar was created for your reference (a big Thank You to Natalia!). Here is the link: https://www.google.com/calendar/render?hl=en&tab=cc
- When you log in (using the username and password provided to you in email), you'll see our assistants' times matrixed against days of the week. We've covered all days, in the afternoons: As per results from our day one survey, it was apparent that the heaviest demand for future help sessions would occur in the afternoons. The period chosen (roughly 1pm - 6pm) meets the majority of CDS-130 students' availabilities.
- Our TAs will check the calendar daily, to see if someone has scheduled a help session with them for that particular day. Each assistant is "color coded", and there are multiple assistants available on any given day. So you have a variety of choices available to you. To schedule time with an assistant, simply click on the assistant's name block, and then enter your meeting time.
- My recommendation is to both schedule yourself into the Google calendar and also send an email to that assistant as well. I will also be available for help sessions, on an as-needed basis, by appointment: You may email me at any time (although the turnaround time might not be instant) or, text me at the number provided to you (this is usually the quicker method). We'll either resolve your question over email or text, or we can arrange to meet in person. Recall, too, that I am generally available before and after class.
- There have been some interesting -- meaning, mysterious -- problems with VCL connectivity for a few students. It's not clear to me why some of you can't access VCL from off-campus locations, particularly when you're able to do so from an on-campus location! To resolve this problem, I recommend visiting the IT support office, found on the second floor of Innovation Hall: When you enter on the second floor, into the foyer area where the up and down staircases meet, you will see a glass door on one wall. The IT support staff is inside and a walk-up help window is just beyond the glass door. Again, please visit the IT staff if you're having this VCL access problem. They know the fine details of VCL's limitations and thus should be able to offer you the best assistance
1.38. 8 SEPTEMBER 2011 (CLASS 4)
- I posted to our Blackboard account a corrected version of the presentation from Class 3 entitled, "Binary Number Operations I (Addition)". There was a mistake in this presentation on the last slide, in the answer to the binary addition problem in the lower right hand corner: 111 + 1111 + 101 = 11011 AND NOT 10111 as was shown in the previous version. I apologize if this error caused you any confusion or extra work, and I thank the student who identified it for me.
- I also posted an updated Matlab presentation -- the red marker has moved further along, and now resides on slide 44. I encourage all of you to continue working with this presentation, and to read it through, to slide 66. We will address slides 44 to 66 quickly during our next Matlab discussion, and then pick up again at slide 67 to talk about variable indexing of vectors. After that, we move into matrices.
- As always, you may email me with your questions, or text me if that is your preference. My office hours are before and after class, and also by appointment. Our assistants are also available for you in the afternoons. I had intended today to distribute their availabilities, but I will try to get that to you on Tuesday. We are creating a Google calendar that displays each assistant's weekly availability. We'll distribute a link to this calendar when we complete it, thus enabling you to select specific help times. I intend to distribute this link to everyone on Tuesday.
- A note on hardcopy hand-in for the Matlab exercises: You may simply copy-and-paste your Matlab session, as captured in Matlab's command line window, and, hand in that session as your response to the Matlab exercises. This will be very easy to do since Matlab supports copy-and-paste, and, Matlab's command line window features a slider bar enabling you to scroll through your entire Matlab session, including command line window output.
- A final clarifying remark about Homework #1: Homework #1 is comprised of exercises selected from Problem Sets #1 and #2. Homework #1 does NOT consist of every problem from both Problem Sets!! Please consult the announcement email sent Tuesday, 6 September at 3:36pm. If you did not receive this email, please let me know immediately. Alternately, you can consult this class Wiki which contains the same information about the composition of Homework #1 as was contained in the 6 September broadcast email (please see below).
1.39. 6 SEPTEMBER 2011 (CLASS 3)
- I just posted the following updates to Blackboard: Problem Set #2, and Homework #1.
- Homework #1 is found on the sheet entitled "Homework Assignments (Fall 2011)" and consists of the following exercises: From Problem Set #1: 1, 3, 5, 7, 11, 14, 17, 19, and from Problem Set #2: 1, 4, 6, 9, 13, 18, 21, 26. Exercises 21 and 26 from Problem set #2 are Matlab exercises that follow the Matlab lecture on assignments that we're working through. Total point value for homework #1 is 20 points: one each for each exercise except the Matlab exercises, which are worth three points each. Homework #1 might seem to be a lot of exercises but let me assure you: many of them are routine computations designed to reinforce the binary template (and extended template) methods, as well as the mechanism of binary addition.
- Again, and to remind you: It is to your benefit to show your work when doing these exercises. That way, we can see a demonstration of your solution logic, and thus, perhaps award partial credit. As always, if you have questions or difficulties, please do not hesitate to ask.
- Homework #1 is due on 13 September 2011, at 10:15am -- that is, I will collect them at the end of class. Please hand in this assignment in hard copy.
- As announced today in class, I also posted an updated "Class Policies" presentation, which primarily contains a few minor schedule modifications due to the Columbus Day holiday -- Class 13 on our schedule will be a "study day" instead of a formal class meeting.
- The Matlab presentation was also updated -- the red star marking our progress was moved further downline, and now resides on the last slide that we discussed today. Please review the presentation from the beginning to the red star marker, to ensure that you understand how variable assignment works in Matlab. Also, I recommend that you try to access Matlab from home, too, to test the viability of your remote connection. Please refer to the appropriate presentations: "Remote Access to Matlab at Mason", and, "VCL on Mac". The first will get you up-and-running with a remote connection to Matlab using either a Windows or a Linux machine, whereas the second presentation shows you how to establish a remote Matlab connection using a Mac. Both presentations contain user-friendly, step-by-step instructions that feature numerous screen shots to show you exactly what to do.
1.40. 3 SEPTEMBER 2011
- I've just created a folder inside our Blackboard account entitled, "Problem Sets and Homework Assignments" and in it I've placed "Problem Set 1".
- Please note that I have NOT YET placed a homework assignment into this folder. When I do (you can expect me to do this after Tuesday's class, on 6 September 2011), that homework assignment sheet will reference specific exercises in one or more Problem Sets. These exercises, taken together, will comprise your homework assignment. Please also note that each Problem Set may contain lots of exercises. Not all of these exercises will be assigned as homework. The ones that are not assigned as homework are for your reference -- and I'll notify you if any exercises are to be excluded from consideration. The exercises that remain, i.e. those that were not assigned and not excluded, will be good study guides for you. Specifically, you may see one or more of these exercises reappear in the future. Those that do, will probably not appear in exactly the same form as displayed in the Problem Sets, but I think you get the idea. Our intention is to focus your study preparation in productive directions.
- Homework extra credit quizzes will usually address concepts and exercises that we've covered in homeworks, but probably with more depth and perhaps involving an extension of concepts covered in class. Exam extra credit quizzes -- precisely because these are the more valuable types of quizzes -- will also feature exercises that resemble those appearing in the Problem Sets, but, will likely be more challenging. Exam problems will generally address exercises covered in the homeworks and concepts from lectures that may not have been explicitly covered in the homeworks. In all circumstances, my intention is to distribute study advice in advance. To get an idea of how this works, I suggest you peruse the Summer 2011 CDS-130 course daily log, found here: http://cds130.org/2011C02 The log entry for 31 July 2011 is a very good example of what I'm talking about.
- As per above, my intention is to assign homework #1 on Tuesday. Thus, homework #1 will probably cover material addressed in class on Tuesday as well. If that is the case, then I'll release another Problem Set, as required.
- A note on homework grading: My intention is to try to value each homework at about 20 points (give or take). The homework grading policy is as stated in our syllabus. Remember: It is to your distinct benefit to show supporting work for the homework exercises that you solve. If you do not, and if the answer you provide is incorrect, then we have no way to evaluate your solution logic -- and thus no way to award partial credit.
- Prior to Tuesday's class, I will also place the "Introduction to Matlab" presentation into our BlackBoard account. We will go through this presentation, chapter by chapter, during our upcoming Matlab lectures.
- Finally: I compiled the results of the "times when you are availabile for help" question asked on our recent in-class survey, and, matrixed the timeslots of greatest student availability (i.e., timeslots with highest availability counts) against our TAs' free times. On Tuesday I should have the resulting schedule available for your reference. It will be valid for the remainder of the term, and will display the days and times when each TA is available to provide assistance. With this schedule in hand, every student will be able to plan his or her own, individual TA visits, thus making the most effective use of available time.
1.41. 1 SEPTEMBER 2011 (CLASS 2)
- Today we covered the binary template and the template method and used it to convert back and forth between base two and base ten numbers; the supporting presentation, "Introduction to Binary", is now available on Blackboard. My recommendation is to practice binary template conversions on your own, so that you gain fluency with the template method -- in both directions. It is an important concept and technique that will reappear in the future.
- When doing binary conversions, please do them by hand rather than use a calculator. You won't be permitted to use a calculator on the midterm or on the final, so it's best to get the needed practice now, in preparation for later.
- Please also consider how you would construct and use templates for bases OTHER THAN two. For example, how would you construct and use a ternary template (a base three template)? What are the allowable symbols in base three? What questions do these symbols imply that must be asked in order to convert back and forth between base three and base ten? For example, in binary, we asked two questions: "Is there one unit of a particular amount (a particular power of two) present, or, zero units of that amount present?" That's because in binary we have only two allowable symbols: 1 and 0. In ternary we'd need to ask three questions, not just two.
- My intention is to release the first Problem Set on or before Tuesday. On this coming Tuesday I will also assign Homework #1. Most homeworks (including Homework #1) will be drawn from the various Problem Sets that I will distribute to you. That is, I will identify specific exercises from specific Problem Sets, and together these exercises will constitute a Homework assignment. Please note that we may not have class on this coming Tuesday. I will verify before Tuesday's class and send out a broadcast email accordingly.
- UPDATE REGARDING CLASS ON TUESDAY 6 SEPTEMBER 2011: We will have class on Tuesday.
1.42. 30 AUGUST 2011 (CLASS 1)
- I posted the results of today's homework extra credit quiz on Blackboard. You should be able to see your quiz grade as well as summary statistics for the entire class. REMEMBER: This was an extra credit quiz. Meaning: It DOES NOT work against you! It can only help you. Future extra credit quizzes are all announced in the extended syllabus.
- The extended syllabus is found at the end of today's first presentation (entitled "Class Policies . . . "), i.e., the "day to day" plan. Now, this plan is bound to undergo revision. No problem. I will revise and repost accordingly. When I do so, I will repost a presentation to its original folder: That is, you won't (for example) find Class 1 presentations reposted into the Class 15 folder. Rather, you will always find them where you expect them to be. I also posted the second presentation that we covered today, "Introduction to Computational Science". All these presentations will appear in folders entitled with the appropriate class number and date. And, all these folders will appear in the "Content" section of Blackboard. Presentations will always be organized together, in this one place, for your convenience.
- Finally, I posted a presentation in the Matlab folder that was written by Samantha Fleming, one of our TAs. It describes how to use Mason's Virtual Computing Laboratory (VCL) to access Matlab on a Macintosh computer. This is a highly detailed, very user friendly presentation that clearly demonstrates, screenshot by screenshot, how to access Matlab remotely with your Mac. You will also find a similar but separate presentation on how to access Matlab remotely using Windows or Linux. Of course, you won't need to do this while in the classroom precisely because Matlab will be available at your workstation.
- Actually, we went a bit faster than I anticipated today and so I'll introduce binary numbers during Thursday's lecture, and follow that with a short intro to Wikipedia. Before doing so, however, I am going to preface Thursday's lectures with a short demonstration of the types of computational projects that have been conducted by faculty in GMU's Computational & Data Sciences department, just to give you an idea of the problem types that computational scientists currently work on.
- In the next class or two I'll begin posting "Problem Sets". These are documents filled with exercises. I intend to draw your homeworks from the Problem Sets -- certainly NOT all the exercises, though! Rather, I'll select a subset of exercises for homeworks, and the rest are for your reference: These are exercises that might appear later, in native or somewhat modified form. In other words, it will be beneficial for you to become familiar with the exercises contained in the Problem Sets. Exam problems, for example, may bear striking resemblences to exercises appearing in the Problem Sets.
- Problem Set exercises are designed to be a mix of routine computations (those you do to ensure you've "got" a concept), not-so routine computations (perhaps requiring a bit more thought) and extensions of what we learn in class. You'll be able to tell the difference immediately.
- As per today's class discussion, we are here to help you, on homework and with other class material. So, don't hesitate to ask questions! You have our phone numbers, which you may use for texts. Or send us email. Or stop by our offices. We are looking forward to serving as your academic resources. Remember: I will arrive about 30 minutes prior to class, to answer your questions (I've arranged for IN 222 to be opened at 8:30am for us). I also intend to stay after class, as needed, for the same purpose.
1.43. 28 AUGUST 2011
- Well, we've just endured a major weather event here on the East Coast: Hurricane Irene. One of the topics that computational scientists study is numerical weather prediction. This is a highly important topic, and one that embodies much modeling complexity. Furthermore, numerical simulation of major weather events constitutes one of the principal means by which we study them: It's simply not possible to "capture a hurricane" in the laboratory to observe it and perform experiments on it. In contrast, it is possible to "capture a hurricane" in silicon, and study it computationally. This is one of the missions of the National Centers for Environmental Prediction, as described in the Wikipedia article on numerical weather prediction. These computational studies lead to more accurate understanding of weather phenomena.
- That enhanced understanding is critically important precisely because it can save human lives, by leading to more accurate predictions of the impact of weather on society. Those predictions enable individuals and governments to take actions and implement policies that might substantially reduce losses during weather events (see the following report for additional examples). A popular account outlining how increased computing power is being used effectively by Brazilian meteorological scientists, for example, can be found here.
1.44. 26 AUGUST 2011
- I just posted our course syllabus to the Blackboard account (as a .pdf file). It appears under the "Syllabus" tab as well as in a folder under the "Course Content" tab. I will also create hard copies that we can review together in class, and during Tuesday's class our first presentation will focus on the syllabus and other issues specific to it.
- Everyone please stay safe and dry this weekend!
1.45. 24 AUGUST 2011
- Prior to (or, shortly after) our first class meeting, please create a Wiki page for yourself on this server. You can create an account here. When creating your account, please use an alias. You must also give me your alias name and account password following creation of your account so that I can access homeworks posted there for grading purposes. You can do that at the end of our first class on 30 August, or shortly thereafter if your account isn't created by then.
- To keep up-to-date with class announcements, please consider creating your Wikipage Watchlist (here) and adding this page to it. If you do so, you can then set-up your Wiki email options (here) to send you an email notification when this page is updated with new announcements.
1.46. 17 AUGUST 2011
- 222 Innovation Hall features computer workstations at each seat. We'll use these workstations to access Matlab, as needed. I'll also distribute a presentation to all CDS-130/03 students that demonstrates how to access GMU's Matlab installation from remote locations.
- I will set up a Blackboard account for CDS-130/03. Grades for all your work products will be posted to Blackboard as we progress (homeworks, quizzes and exams), enabling you to keep close track of your performance. Lecture notes will also be posted to Blackboard, following the class period during which the notes are covered. These will (usually) be Powerpoint presentations and various .pdf files. A syllabus will appear on Blackboard in the near future (closer to 30 August, when class enrollment stabilizes and the Blackboard roster thus reflects actual class participants).
1.47. Miscellaneous
- My office is Research 1, room 345. During our first class meeting I'll distribute my email contact information as well as a telephone number at which CDS-130 students may text me for assistance. My office hours are usually by appointment, but please feel free to drop by anytime for a chat or assistance, as needed: I maintain an open-door policy.
- We have two teaching assistants for this course: Ms. Soo Choi and Ms. Samantha Fleming. Their contact information will also be distributed during our first class meeting.
- CDS-130 support page, which also includes some instructor background info.