Posts

CS 142: Intro to Computer Programming

Professor Sean Warnick

Course Description

This course introduces students to the discipline of computer programming, using C++ as the programming language. No prior experience with computers or programming is assumed.

Sample Schedule

DateTopicAssignment
30 AugIntroduction
1 SepIntroduction to Programming in C++
6 SepExpressions and Functions
8 SepExpressions and FunctionsAssignment 1 Due
13 SepFunctions Composition and ConditionalsOptional Assignment 1 Due
15 SepConditionals and StringsAssignment 2 Due
20 SepObjectsAssignment 3 Due
22 SepObjectsOptional Assignment 2 Due
27 SepObjects and Nested ObjectsAssignment 4 Due
Optional Assignment 3 Due
29 SepMethodsAssignment 5 Due
4 OctMethodsAssignment 6 Due
6 OctMixed DataAssignment 7 Due
11 OctIntroduction to ListsAssignment 8 Due
Optional Assignment 4 Due
13 OctMore on ListsOptional Assignment 5 Due
18 OctProducing Lists, SortingAssignment 9 Due
Optional Assignment 6 Due
20 OctProducing Lists, SortingOptional Assignment 7 Due
25 OctLists of ObjectsAssignment 10 Due
Optional Assignment 8 Due
27 OctMore Lists of ObjectsAssignment 11 Due
1 NovTreesAssignment 12 Due
Optional Assignment 9 Due
3 NovTreesAssignment 13 Due
Optional Assignment 10 Due
8 NovTrees and HierarchyOptional Assignment 11 Due
10 NovMore on HierarchyAssignment 14 Due
15 NovIntroduction to MutationAssignment 15 Due
Optional Assignment 12 Due
17 NovProgram Design with MutationAssignment 16 Due
Optional Assignment 13 Due
29 NovChanging Structure ContentsAssignment 17 Due
Optional Assignment 14 Due
Optional Assignment 15 Due
1 DecChanging Structure ContentsAssignment 18 Due
Optional Assignment 16 Due
6 DecMore on Mutation with StructuresAssignment 19 Due
Optional Assignment 17 Due
8 DecDeep Dark Secrets of C++Assignment 20 Due
Optional Assignment 18 Due
13 Dec
(Final Exam Day)
Assignment 21 Due
Optional Assignment 19 Due
Optional Assignment 20 Due
Optional Assignment 21 Due

Assignments

All assignments are due by 1:00 PM on the date listed. You should email your source code to WarnickCS142@gmail.com. NO LATE ASSIGNMENTS WILL BE ACCEPTED, NO EXCEPTIONS. Each assignment will consist of a number of exercises. Each exercise will be awarded a point if it correct or a zero (plus brief feedback) if it is not correct. The assignment score is the average of the scores of all excercises for that assignment. Extra credit worth up to 50% of each assignment is available by solving the optional excercises associated with each assignment. Most of the optional excercises are due one week after the regular assignment is due (see schedule). Note that although you can make up lost points by solving the optional excercises, you can not accumulate more than 100% for any given assignment.

The beginning of each source file should contain a comment which includes your name, assignment number, exercise number, a list of sources you used, and a copy of the exercise text. For example, the heading for assignment 1 exercise 1 might look like

/*
Devon Harbaugh: Assignment 1: Exercise 1
Sources: My friend, Erik Schull, pointed out a missing semicolon.
Problem: You and your friends decide to order a pizza and share
the cost according to how many slices you eat. The pizza
is cut into 8 slices. You eat 3 of them. If the pizza
costs $12, how much should you contribute? Write a program to perform the computation.
*/

Tests

The assignments play the role of exams in this class. They are comprehensive up through the date they are assigned, and the final assignment plays the role of a final exam.

Text

This semester, there is no required textbook. However, the class will be patterned after Professor McCarthy's approach. His course website has a lot of useful information and links to other sites. Please note that Professor McCarthy's class meets MWF, and ours meets TTh — Thus, do not depend on his site for information about topic schedule and due dates for our section. Another useful website is CPlusPlus.com, a popular site with reference information on the C++ language.

Harrassment

The following is BYU's statement on preventing sexual harassment:

Title IX of the Education Amendments of 1972 prohibits sex discrimination against any participant in an educational program or activity receiving federal funds. The act is intended to eliminate sex discrimination in education. Title IX covers discrimination in programs, admissions, activities, and student-to-student sexual harassment. BYU's policy against sexual harassment extends not only to employees of the university but to students as well. If you encounter unlawful sexual harassment or gender based discrimination, please talk to your professor; contact the Equal Employment Office at 378-5895 or 367-5689 (24 hours); or contact the Honor Code Office at 378-2847.\

Preparation Time

"The expectation for undergraduate courses is three hours of work per week per credit hour for the average student who is appropriately prepared; much more time may be required to achieve excellence. These three hours may include one hour of lecture plus two hours of work outside class, three hours in a laboratory with little outside work, or any other combination appropriate to a particular course." (page 56, University Catalog)

Grades

There are 21 regular assignments, and 21 opportunites for extra credit. Your final grade is the total of your 21 assignment scores, including any extra credit, divided by 20. This treats your lowest assignment score as extra credit.

100-93 A 93-90 A- 90-87 B+
87-83 B 83-80 B- 80-77 C+
77-73 C 73-70 C- 70-67 D+
67-63 D 63-60 D- 60-0 E

CS 312: Algorithm Analysis

Professor Sean Warnick

Course Description

CS 312 is an introductory algorithms analysis course; it is about problems and heir solutions, about information and how it is organized to meet specific objectives. Students learn what a well formulated problem is, as well as the difference between analytic and algorithmic solutions to such problems. We analyze the quality of algorithmic solutions using various notions of correctness and efficiency, and we explore the application of these ideas in a variety of settings. These settings include scientific computing, signal processing (audio and image), cryptography, computer graphics, data compression and coding, search engine ranking, DNA sequence alignment, inventory management, scheduling of manufacturing systems, radiation therapy, bandwidth allocation, computational finance, clustering, and games. In the design of algorithmic solutions to well formulated problems, connections are drawn between data structures and computational performance; the role of mathematical models in making these connections is emphasized. CS 312 provides a strong foundation for the second semester, advanced algorithms elective, CS 412: Linear Programming and Convex Optimization.

Text

Algorithms by Dasgupta, Papadimitriou, and Vazirani.

Supplemental texts include:

  • Introduction to Dynamic Systems: Theory, Models, & Applications by Luenberger
  • Algorithm Design by Kleinberg and Tardos
  • Introduction to Algorithms by Cormen, Clifford, Leiserson, Rivest, and Stein
  • Fundamentals of Algorithmics by Brassard and Bratley
  • Dynamic Programming and Optimal Control by Bertsekas

Typical Schedule

Week 1 Reading Assigned Due
T Problems and Solutions The Turing Omnibus, Chapter 30; Dynamic Systems, Chapter 1, 2.1-2.3
Th Algorithm Analysis Algorithms, Chapter 0; Dynamic Systems, Chapter 1, 2.4-2.7 HW1, Lab1
F Recitation: C# and Visual Studio

Week 2
T Difference Equations
Th Solving Difference Equations Algorithms, Chapter 2.1-2.5 HW2 HW1
F Recitation: Difference Equation Practice

Week 3
T Master Theorem
Th Average Case Analysis Algorithms, Chapter 2.6 HW3, Lab2 HW 2
F Recitation: More Difference Equation Practice

Week 4
T Signal Processing
Th FFT Algorithms, Chapter 1.1-1.4 HW4 HW 3, Lab1
F Recitation: Elementary Probability Theory Practice

Week 5
T Cryptography
Th Randomized Algorithms Algorithms, Chapter 1.5 HW5, Lab3 HW 4
F Recitation: Data Structures and Complexity

Week 6
T Randomized Algorithms
Th Page Rank Algorithms, Chapter 3-4 HW6 HW5, Lab2
F Recitation: Midterm Review

Week 7
T Shortest Paths
Th Minimum Spanning Trees Algorithms, Chapter 5 HW7 HW6
F Midterm 1 Covers material through Randomized Algorithms

Week 8
T Knapsack
Th Huffman Codes Algorithms, Chapter 6 HW8, Lab4 HW7, Lab3
F Recitation: Homework/Project Q&A

Week 9
T Dynamic Programming
Th Computational Biology Dynamic Programming, Chapter 1 HW9 HW8
F Recitation: Data Structures and Dynamic Programming

Week 10
T Sequential Decision Making
Th Inventory Management Dynamic Programming, Chapter 2 HW10 HW9
F Honors Lunch

Week 11
T TSP
Th Linear Programming Algorithms, Chapter 7 HW11, Lab5 HW10, Lab4
F Recitation: Midterm Review

Week 12
T Simplex
Th Linear Regression Algorithms, Chapter 8 HW12 HW11
F Midterm 2 Covers material through TSP

Week 13
T NP-Complete Problems
Th Backtracking Algorithms, Chapter 9 HW13 HW12
F Honors Lunch

Week 14
T Branch and Bound
Th Examples HW13, Lab5
F Recitation: Final Exam Review

Assignments

Reading: There are daily reading assignments.

Homework: There are weekly homework assignments, generally drawn from the course texts.

Projects: There are five programming assignments in C# using Microsoft Visual Studio:

  1. Scientific Computing
  2. FFT and Audio Processing
  3. Intelligent Scissors for Image Processing
  4. DNA Sequence Alignment on Corona Viruses, including SARS
  5. Portfolio Optimization in Computational Science

External Observations: By the end of the semester, each student is required to submit a set of reports describing how the student has observed the ideas from CS 312 applied in other settings (5 pages, single spaced). Generally this will be five distinct single-page reports, each one summarizing a distinct activity, such as a talk from the CS Colloquium, or a connection to a project in another class, etc.

Honors Section

Any student in either of the regular sections may register for the Honors Section by enrolling in HONRS 345 and dropping CS 312. Students in the Honors Section meet with the regular section for lectures and exams, and they participate in all the same assignments except the External Observations. Instead, each student in the Honors Section selects a "Great Idea" from Computer Science, such as any of those listed in The New Turing Omnibus by Dewdney, and explores the idea in some depth. Students discuss their progress with the instructor and each other periodically during Honors Lunch, and they present their final results to the Honors Section at the end of the semester. A response to the Great Idea (e.g. paper, about five pages; or a coded application; etc.) is submitted for grading. The Honors Section is not designed to be more work than the regular section; rather, it is an opportunity for students who want more interaction with the instructor (e.g. for potential letters of recommendation for graduate school) to have that opportunity. Also, it provides a vehicle for students participating in the Honors Program to earn their honors credits and one of their Great Works responses while meetings their core CS requirements.

Recitation

Every Friday, a recitation is provided by the TAs to review key concepts, practice solving problems, discuss implementation details for the programming projects, emphasize particular points, and review for the exams. As with lectures or office hours, attendance is optional.

Tests

There are two midterm exams and a comprehensive final. Each test is usually proctored in the testing center. Each exam is about three hours long (although generally up to five hours is allowed, if necessary).

Preparation Time

"The expectation for undergraduate courses is three hours of work per week per credit hour for the average student who is appropriately prepared; much more time may be required to achieve excellence. These three hours may include one hour of lecture plus two hours of work outside class, three hours in a laboratory with little outside work, or any other combination appropriate to a particular course." (page 56, University Catalog)

Grades

Grades will be weighted by the following distribution and scale:

  • Final Exam 25%
  • Midterm #1 15%
  • Midterm #2 15%
  • 5 Programming Projects 25%
  • Homework 25%
  • External Observations (or Great Idea response for the Honors Sections) 5%

100-93 A 93-90 A- 90-87 B+
87-83 B 83-80 B- 90-77 C+
77-73 C 73-70 C- 70-67 D+
67-63 D 63-60 D- 60-0 E

We reserve the right to curve grades in your favor. The University policies on UW and I grades will be strictly followed.

CS 412: Linear Programming and Convex Optimzation

Professor Sean Warnick or Professor David Grimsman

Course Description

This course introduces optimization as a paradigm for developing efficient solutions to practical problems, including those arising from various business, engineering, medical, military, and other applications. Topics include Linear Programming, Unconstrained Optimization, and Convex Programming. Algorithms include Simplex and Interior Point methods. Applications include Game Theory, Network Flow, Regression, Forecasting, and Finance.

Text

Linear Programming: Foundations and Extensions by Robert J. Vanderbei.

Sample Schedule

A sample schedule can be found here.

Full Syllabus

The full syllabus from BYU Learning Suite can be seen here.

Assignments

There will be a continuous stream of homework assignments throughout the course, allowing for substantial practice with the central concepts of the class. Students will be expected to learn Matlab as a computational learning environment and use the package in their assignments.

Tests

There will be two midterms and a final exam.

Preparation Time

"The expectation for undergraduate courses is three hours of work per week per credit hour for the average student who is appropriately prepared; much more time may be required to achieve excellence. These three hours may include one hour of lecture plus two hours of work outside class, three hours in a laboratory with little outside work, or any other combination appropriate to a particular course." (page 56, University Catalog)

Grades

Grades will be weighted by the following distribution:

  • Assignments 20%
  • 2 Midterms 30%
  • Finance Project 20%
  • Paper Review 10%
  • Quizes 5%
  • Final 15%

100-93 A 93-90 A- 90-87 B+
87-83 B 83-80 B- 80-77 C+
77-73 C 73-70 C- 70-67 D+
67-63 D 63-60 D- 60-0 E

CS 412: Linear Programming and Convex Optimzation

Professor Sean Warnick

Course Description

Design of algorithms to make decisions in complex, uncertain environment.

Text

MIT OCW 6.241, 6.245
"A Course in Robust Control Theory," by Dullerud and Paganini
"Feedback Control Theory," by Doyle, Francis, and Tannenbaum
Supplemental text:
"Feedback Systems: An Introduction for Scientists and Engineers," by Astrom and Murray

Typical Schedule

Week 1 Reading Assigned Due
Th Course overview, introduction to dynamical systems and control

Week 2 Reading Assigned Due
T Linear Algebra Review 6.241 Chapter 1 HW 1
Th Linear Algebra Review 6.241 Chapter 1

Week 3 Reading Assigned Due
T Least squares (overdetermined systems) 6.241 Chapter 2 HW 2 HW 1
Th Least squares (underdetermined systems) 6.241 Chapter 3

Week 4 Reading Assigned Due
T Matrix norms, SVD 6.241 Chapter 4 HW 3 HW 2
Th Matrix perturbations 6.241 Chapter 5

Week 5 Reading Assigned Due
T State space models 6.241 Chapters 6, 7, 8; Astrom & Murray Chapters 4, 5 HW 4 HW 3
Th Solutions of state space models 6.241 Chapters 10-11; Astrom & Murray Chapters 4, 5

Week 6 Reading Assigned Due
T Similarity transformations, modes of LTI systems, Laplace transform, transfer functions 6.241 Chapter 12; Astrom & Murray Chapter 8 HW 5 HW 4
Th Stability, Lyapounov methods 6.241 Chapters 13, 14

Week 7 Reading Assigned Due
T External I/O stability, storage functions 6.241 Chapter 15 HW 6 HW 5
Th Interconnected systems, I/O stability 6.241 Chapter 17

Week 8 Reading Assigned Due
T No Class HW 7
Th System norms 6.241 Chapter 16 HW 6

Week 9 Reading Assigned Due
T Performance measure in feedback control 6.241 Chapter 18 HW 8 HW 7
Th Small gain theorem, stability robustness 6.241 Chapter 19

Week 10 Reading Assigned Due
T MIMO stability robustness 6.241 Chapters 20, 21 HW 9 HW 8
Th Reachability 6.241 Chapter 22

Week 11 Reading Assigned Due
T Reachability: standard and canonical forms, modal tests 6.241 Chapter 23 HW 10 HW 9
Th Observability 6.241 Chapter 24

Week 12 Reading Assigned Due
T Minimality, realization, Kalman decomposition, model reduction 6.241 Chapter 25 HW 11 HW 10
Th State feedback, observers, ouput feedback, MIMO poles and zeros 6.241 Chapters 26, 27, 28, 29

Week 13 Reading Assigned Due
T Minimality of interconnections, pole/zero cancellations 6.241 Chapter 30 TBD HW 11
Th Parameterization of all stabilizing controllers Dullerud and Paganini

Week 14 Reading Assigned Due
T Optimal control synthesis: problem setup Dullerud and Paganini TBD TBD
Th H2 Optimization Dullerud and Paganini

Week 14 Reading Assigned Due
T H Optimization Dullerud and Paganini TBD
Th Reading Day - No Class

Grades

Grades are by the following distribution and scale:

  • Homework 50%
  • Project 25%
  • Final Exam 25%

100-93 A 93-90 A- 90-87 B+
87-83 B 83-80 B- 90-77 C+
77-73 C 73-70 C- 70-67 D+
67-63 D 63-60 D- 60-0 E

We reserve the right to curve grades in your favor. The University policies on UW and I grades will be strictly followed.

Harrassment

The following is BYU's statement on preventing sexual harassment:

Title IX of the Education Amendments of 1972 prohibits sex discrimination against any participant in an educational program or activity receiving federal funds. The act is intended to eliminate sex discrimination in education. Title IX covers discrimination in programs, admissions, activities, and student-to-student sexual harassment. BYU's policy against sexual harassment extends not only to employees of the university but to students as well. If you encounter unlawful sexual harassment or gender based discrimination, please talk to your professor; contact the Equal Employment Office at 378-5895 or 367-5689 (24 hours); or contact the Honor Code Office at 378-2847.