# 2012C02

### From CDS 130

**WELCOME TO THE HOMEPAGE FOR CDS-130/C02 (SUMMER 2012)! THIS CLASS MEETS MONDAYS, WEDNESDAYS AND FRIDAYS FROM 7:00PM -- 10:05PM, 2 JULY 2012 THROUGH 3 AUGUST 2012, IN ROOM 326 OF INNOVATION HALL. CHECK BACK FREQUENTLY FOR UPDATES!**

## Contents |

# 1. CDS-130/C02 (SUMMER 2012): ANNOUNCEMENTS

## 1.1. 13 JULY 2012 (CLASS 5)

- We took a side-trip today, into IT Security and Ethics issues. The formal title of our presentation was "IT Security and Ethics, and the Dark Side of Binary". Suggestive? Yep!

- We looked at the various ways that the user can help enhance IT security on their personal accounts. In particular, we investigated the mathematics of good password security, and also looked at how a hacker might try to attack your password selection. Random is good! Whole words (dictionary words) are bad! And we learned why we need to expand our character selection BEYOND just upper and lower case letters. Numbers and selected punctuation symbols are also good choices. The goal is simple: To sufficiently inhibit an attack so that GMU's IT security has a fighting chance to identify the attacker and take appropriate actions.

- But password security is of little help if we fall victim to one of the various phishing attacks. These are attacks disguised as apparently legitimate emails -- perhaps even appearing to originate from GMU! But these are not legitimate emails. Typically they contain a link or links, or sometimes even file attachments. Clicking on these links, or downloading and installing the file attachment, can lead to disaster. SO DON'T DO IT!

- Finally, we looked at the anatomy of an email pyramid scheme, and discussed how to avoid becoming a victim. It's easy to forget the saying, "If it looks to good to be true, it probably is!", particularly when the emails contain verifiable information that (in our case) led directly to success in the stock market. Sometimes, fraud can be tough to spot. The best defense is awareness and a healthy dose of skepticism. Never be afraid to ask questions! PARTICULARLY when whatever it is looks too good to be true.

- In our Matlab discussion we covered Matrices and began looking at FOR loops. FOR loops represent the second major building block of programs: REPETITION (or, iteration). Remember: SEQUENCE (assignment statements), SELECTION (IF statements) and REPETITION (FOR loops). Combining these basic building blocks in various ways results in the countless variations of computer programs that are available to us today. They're all composed of these three building blocks. So, by studying REPETITION, and having already studied SEQUENCE, we're well on our way to having a good programming toolkit. The missing ingredient, really, is the algorithm. In later lectures we'll begin thinking algorithmically about problems. And when we do, we will use the basic building blocks to express our algorithms.

## 1.2. 11 JULY 2012 (CLASS 4)

- How do computers actually "do" computations? What does it mean to "compute"? We answered these questions (at least partially) this evening when discussion the presentation entitled,
**Memory, Logic and Logic Gates**.

- Transistors are fundamental constituient pieces of logic gates, and it's the logic gates that implement computations on a computer's chip (remember the "half adder circuit?) So we spent some time looking at the Alogic tables associated with the AND, OR, NOT, NAND and NOR logic gates. These gates are strung together in different ways on a CPU; different configurations of logic gates may result in different outputs for a given set of inputs. For example, we examined a couple of simple logic circuits and discovered that changing just one gate (from an AND to an OR) altered significantly the output of the logic circuit. Logic gates therefore transform input bit patterns to output bit patterns. So, the operation of logic gates is one way to answer the above, lead-off questions about computuation (there are many other ways to answer these questions, too -- some more philosophical than others!)

- Following our look at logic gates, I delivered homework extra credit quiz #2. It was worth 7 points; these points will be added directly onto your total homework point total (remember: they appear only in the numerator!).

- To finish up the evening, we worked on vectors a bit more and I also distributed the first Matlab program to everyone. Students can use this program as an exemplar when completing homework #4, which was assigned.
**Homework #4 is due at the end of class on Monday, 16 July 2012**.

## 1.3. 9 JULY 2012 (CLASS 3)

- Binary numbers were again the focus of our attention. Tonite we covered two presentations:
**Binary Number Operations II (Multiplication and Division)**, and**Binary Data, Encoding and Computing Limits (version 2)**.

- Multiplication and division by powers of two are easy, and for floating point binary numbers as well. When we multiply by an integer that's not a power of two, the procedure is just slightly more involved, but not more so that what we're used to with base ten.

- In the second presentation we began to look at strings of binary digits (i.e., bits) as patterns that can represent objects other than just numbers. This is a productive viewpoint because it led us directly toward the realization that computers do have limits. The limits of binary representation is just one of many limits on what a computer can do. We discussed "bit rules" #1 and #2 and how to use them to calculate the total number of different bit patterns that can be generated with N bits, as well as the largest positive base ten integer that can be represented with those same N bits.

- Our Matlab lecture took a detailed look at the mod function. This function will become very important to us later, particularly during the modeling component of the course when we need to detect periodic conditions. We skipped over Chapter 3.5 in the Matlab presentation ("Comments"); it because assigned reading instead. We ended the evening with a look at vectors in Matlab. A good metaphor we can use to understand vectors is a "row of boxes glued together". It's actually descriptive of a vector and how a vector works.
**Homework #3 was assigned; it is due Friday, 13 July 2012**.

## 1.4. 6 JULY 2012 (CLASS 2)

- Today we formally launched our excursion into binary with two presentations:
**Introduction to Binary**, and,**Binary Number Operations I (Addition)**.

- Binary is a simple number representation system: There are only two symbols to remember, 0 and 1! Furthermore, the Binary Template method discussed in class renders automatic the conversion between base two (binary) integers and base ten integers. Used correctly, the binary template is as close to infallible as you can get. It will never let you down. The homework assigned this evening also explores what I call the Extended Binary Template. Using the extended template, we can convert back and forth betwen binary floating point and decimal floating point numbers. Of course, there's always the danger of a repeating decimal. That comes with the territory, and has to do with a representation limit for floating point numbers written in binary. We also looked briefly at other bases, and I demonstrated how the template method could be extended to those bases as well. It gets kind of cumbersome as the base increases (Imagine using the template method to convert to some odd base, like base 7 for example! It's definitely more work!).

- We also learned how to add binary integers (and in the homework, how to add binary floating point numbers). There are only four simple rules to follow. Using these rules, we can power through any binary addition problem confronting us. Cool! The rules deliver a systematic method that when applied correctly, won't fail.

- In our Matlab discussion, we covered one of the three fundamental building blocks of programming: SEQUENCE. This encompasses the vitally important operation known as ASSIGNMENT. When we do assignment, we associate values with variables (the metaphor we discussed is placing objects inside a labeled box). Matlab remembers these variables and their values, so we can access those values later as needed in our programs. We also talked about reassignment and, basic mathematical operations and Matlab's intrinsic functions such as sine, cosine, square root and others. We worked almost exclusively in the Matlab editor window, which I strongly advocate. While it's possible to write all your programs line by line, at the command line, this is a pitifully, painfully slow thing to do. Definitely not recommended! So work inside the editor. You'll be glad you made that choice.

- So far, so good -- everyone seems to be able to access Matlab just fine. A few of you also accessed Matlab successfully through Mason's VCL arrangment. Wonderful! As always, if you have any questions, don't hesitate to ask: email us or text us at the numbers we distributed during our first class. We're here to help!

- Homework #2 was assigned this evening;
**Homework #2 is due at the end of class on 11 July 2012**.

## 1.5. 4 JULY 2012

**HAPPY FOURTH OF JULY, EVERYONE!!**

## 1.6. 2 JULY 2012 (CLASS 1)

- Our first class! Tonite we covered some administrative stuff, like
**Class Policies and Procedures**,**Introduction to Computational Science**and then took a nice, pretty, graphical detour into one area of computational science actively pursued at GMU: computational fluid dynamics. We learned that the enterprise of computational science is ubiquitous. It touches everything! As such, we can consider computation to be foundational. In fact, NSF labeled computation the "third pillar of science." Indeed! To close out the evening, we fired up Matlab for the first time, and, I walked through the remote access procedures for Windows PC and Mac users. These access procedures are described in the appropriate presentations, found in the MATLAB folder on Blackboard.

- We also took our first extra credit quiz -- homework extra credit quiz #1. It was worth 5 points. As explained in class, extra credit quizzes are configured to help you, never hurt you. The points earned on them are added directly to your point totals in either homework or exams, and so serve to give you that extra little "edge" -- to help move you into the next grade category. All remaining extra credit quizzes will be announced in advance. Those who took tonite's quiz and did well: congratulations! You start with "money in the bank", so to speak.

- Homework #1 was assigned this evening;
**Homework #1 is due at the end of class on 9 July 2012**. It explores a topic that we'll formally cover in Class 2 on 6 July, the binary template method. Using this method we can convert back and forth between binary and base ten numbers. Using the binary template method is almost fail-safe: If you follow the method correctly, it will NEVER let you down. You'll get the right conversion every time.

- But, you ask, why study binary anyway? Who cares about binary? The answer of course is that CPUs "speak" binary. It's their native language! So by studying binary we're quite literally learning the CPU's mother tongue. Furthermore, data is represented in a computer's memory in binary. So by learning about binary we also learn about data representation and storage, and, about the associated limitations: It's definitely NOT the case that computers can do everything! Studying binary opens a window onto those limitations and illuminates some of their consequences.

## 1.7. 1 JULY 2012

- Who ever said binary was boring? Binary is the first thing we study in CDS-130 and so, why not have a little fun while you learn? Try this game, courtesy of Cisco Systems: Binary Game. The game is simple, but strangely addictive. Kind of like Tetris.

## 1.8. 25 JUNE 2012

- Yesterday I made the CDS-130/C02 course available on Blackboard for all registered class members.
- You'll find the course syllabus under the
*Syllabus*tab. This is a basic statement of CDS-130/C02 policies and procedures. - All other course materials will be found under the
*Content*tab. Each class meeting will have its own folder under*Content*, and lecture material and handouts covered in that specific class will appear in its folder. I've created a**Class 1**folder, and placed into it a file entitled**CDS-130: The BIG Picture**. This is a high level statement of course objectives that we'll review on 2 July. You might want to read it before then, to familiarize yourself with CDS-130's overall topical focus.

## 1.9. 13 JUNE 2012 (Hmmm...CDS is cool, but I'm really thinking about medical school...)

- Is medical school in your future?
- If it is, then you might want to look
**here**

- In addition to positioning students very well for entry into medical school (precisely because CDS combines physical and mathematical sciences), CDS is also home to vibrant, well-funded research in
**computational medicine**, led by**Professor Juan Cebral**. - Prof. Cebral is a leader in this field. He and his group perform highly detailed, computational analyses that are tailored to the specifics of individual patients.
- The results: improved therapies leading directly to enhanced patient outcomes. At lower costs. Now THAT'S what I call "bending the healthcare cost curve"! Research that has a direct, positive impact on society's welfare...that's the kind of research we like to do in CDS!

## 1.10. 3 JUNE 2012

- Matlab, Matlab, Matlab!
- The word is gettin' around: CDS-130 does Matlab! That's right. CDS-130 introduces students to Matlab syntax and semantics, and teaches them how to use it to build computational models and perform simulations of scientific interest.
- My Matlab "text" for CDS-130 is a comprehensive PowerPoint presentation. Nevertheless, some students feel more comfortable with an actual, physical book. No problem! I can suggest one:
*Getting Started with MATLAB: A Quick Introduction for Scientists and Engineers*, by Rudra Pratap. It's a nice text that's appropriate for beginners and thus, for the level of Matlab introduced in CDS-130. I don't formally lecture from this book, nor do I assign problems from it. But it's an easy-to-follow reference that reinforces and extends many of the concepts that I teach. It's also inexpensive: I found it today (3 June 2012) selling on Amazon ("Used - Like New") for $19; the everyday list price is $34.95.

## 1.11. 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/C02 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. The best times to catch me for the summer class are usually before and after class.
- We have two teaching assistants for this course: Ms. Soo Choi and Mr. Harendra Puviharan. Their contact information will also be distributed during our first class meeting. Please feel free to contact them at any time with questions you may have, or, to schedule individual help sessions, as required.
- We are also fortunate enough to have an in-class technical assistant: Mr. Trevor Crawford. Trevor will not be available every class but when he is, please feel free to ask him questions as we move forward -- particularly about Matlab.
- Information about my previous CDS-130 classes: CDS-130/04 (Spring 2012), CDS-130/03 (Fall 2011), and CDS-130/C02 (Summer 2011).
- Also visit the CDS-130 support page, which includes CDS-130 support files, links to some research resources in Matlab, and some instructor background info.