1
COURSE OUTLINE
CS 2130
Computational Structures
Fall Semester 2014
Weber State University
Rev.: 8/23/14 ADMINISTRATION
Instructor: Dr. Brian Rague
Email: [email protected]
Web Page: http://faculty.weber.edu/brague
Phone: 626-7377
Office Location: TE110-F
Office Hours: MW from 9:30am-11:30am, T from 10:30am-11:30am
Time and Room: 7:30 – 9:20 MW in TE103C (with Lab)
Text: Discrete Mathematical Structures (6th
ed.) by Kolman, Busby, & Ross (KBR)
Pre-requisites: CS1400
Recommended: CS1410
COURSE DESCRIPTION An overview of the fundamentals of algorithmic, discrete mathematics applied to computation using a contemporary programming language. Topics include sets, functions, logic, matrices, relations, graphs, trees, regular expressions, grammars, finite state machines, and data encoding.
CLASS PROCEDURE This class focuses heavily on understanding the mathematical concepts that govern discrete structures, team-based learning and collaboration. Since applying these ideas in a computer science context is also a major emphasis, the course will have a significant lab component. To foster mastery of the course material, the class will have both individual and group projects during supervised class and outside class times. We will cover the key areas of modeling problems through mathematics, recognizing patterns, and program design. There will be ample opportunity to explore all the facets of discrete structures in lab work and weekly assignments. Classes will meet each week at the assigned hour. Class discussions will typically take place during the first half of each class, at which time topics will be presented and questions about the reading, assignment, and labs are welcomed at this time. Exercises will be reviewed. Class will consist of lecture and discussion on topics assigned through this outline and class assignments. We will cover the elements of discrete modeling in both its theoretical and practical contexts.
2
Both individual and group programming assignments can be worked on during specified lab periods typically provided during the last half of the class. The due dates for the lab will be confirmed when the lab is assigned. On any given class meeting of roughly 1 hour and 50 minutes, the first half will be dedicated to traditional presentation and discussion focused on primary subject matter concepts. Topics addressed during these class presentations will be driven by student inquiry and the results of the in-class assessments. The second half of every class meeting will be devoted to the individual/group assessments, individual homework, or the group project depending on the current needs of the class.
COURSE GOALS
Understand and apply mathematical reasoning in order to read, comprehend, and construct mathematical arguments.
Understand combinatorial analysis to solve counting problems.
Understand how to work with discrete structures, including sets, permutations, relations, graphs, trees, and finite state machines.
Understand how to specify and verify computing algorithms, and construct computer programs implementing that algorithm.
Understand how to develop and construct mathematical models for application to other fields of study.
GENERAL EXPECTATIONS
Attendance
CS 2130 covers a broad range of information that requires some form of interaction and participation in the classroom setting. A portion of the final grade includes in-class assessments and group program design and development, which is greatly influenced by a combination of attendance and input during lab discussions. It is vital that you attend all scheduled classes and labs. Your punctuality and attentiveness (not reading newspapers, not surfing the web) is appreciated and will be noted. Activated cell phones, because of their capacity to generate noises and to be spoken into, are not allowed. Students are responsible for material covered during absences regardless of the reason for the absence.
Academic Honesty
Academic honesty is highly valued at Weber State University and within this class. A student must always submit work that represents his or her original words or ideas. If any words or ideas are used that do not represent the student's original words or ideas, the student must cite all relevant sources. The student should also make clear the extent to which such sources were used. Words or ideas that require citations include, but are not limited to, all hardcopy or electronic publications, whether copyrighted or not, and all verbal or visual communication when the content of such communication clearly originates from an identifiable source.
Individuals involved in any acts of cheating or plagiarism will be given a failing grade for the course. In addition, names of these individuals will be submitted for disciplinary action by the department and the university.
3
Academic dishonesty involves any and all of the following:
Having a tutor or friend complete a portion of your assignments Having a reviewer make extensive revisions to an assignment Copying work directly from another student Using information from online information services without proper citation
Team programming is not discouraged but any collaboration should be at the conceptual level. If detail source code is duplicated from one program into another, it will be deemed as cheating and severe action will be taken against persons who knowingly have participated. Source code that doesn't match the output results may also be deemed as cheating which may result in severe penalties. Students are expected to be familiar with the WSU Student Code and abide by it. The Code may be reviewed on line at http://www.weber.edu/ppm/6-22.htm (pay specific attention to Section 4D). All necessary steps will be taken to enforce the Student Code to guarantee fairness to all students. CS Department policy dictates that any verifiable evidence of student academic cheating, as defined and determined by the instructor, will result in: 1) an automatic failing grade for the class and 2) a report to the Dean of Students that will include the student's name and a description of the student's dishonest conduct.
Readings, Assignments, & Labs
As you may already know, reading a Math textbook is not like reading a novel. Because of the focus and concentration required to understand the material, even one page of math reading could require upwards to an hour of your time. Manage your time accordingly for all weekly reading assignments, which should be completed prior to classroom instruction. Because in-
class assessments are based primarily on material in the course text, it is highly
recommended that you complete the assigned weekly readings prior to taking the
assessment. There are 6 individual programming assignments. The individual programs will
be graded on proper documentation, successful compilation, execution, and satisfaction
of requirement specifications as given in the assignment description. Due dates for individual assignments will be determined during class. Each student will upload assignments to a designated class server, typically using the current WSU Online portal. The uploading procedure will be explained during the first week of the term. Assignments may not be submitted by email. Three team programming projects will also be assigned. The group projects and collaboration constitute a major portion of the course grade, primarily because of the increased knowledge transfer that takes place when peers work toward a common goal. Group projects may be assessed by members of a different group working on the same project, called the evaluation team. Presentations and demonstrations of the group project will normally occur on the day the assignment is due. Code should be submitted to the evaluation group and to the instructor in electronic format. The final overall grade for the project will be a weighted combination of input from the evaluation team and from the instructor. To determine an individual student’s grade for the group project, the student’s contributions to learning teams will be assessed by fellow team members using a standard design group evaluation form.
4
The computing labs and math tutors are available to help you complete your assignment. I will be present during most labs scheduled during class time to assist you. Use this lab time to explore computing tools, collaborate with fellow team members, and get some hands-on experience with the concepts discussed in class.
Programming Software
As part of this course, you will be designing and constructing programs. All imperative
programs should be written in either Java or C/C++. All logical programs should be
written in Prolog. You will be directed toward compiler resources and programming environments as the need arises. These can include any of the following: Visual Studio, Gnu C Compiler, Java Development Kit (JDK), Eclipse, Borland C++ Builder, Turbo Prolog, etc. Try to introduce yourself to a Java and/or C programming package as early as possible.
The WSU CS department has an Academic Alliance program with Microsoft that allows students to obtain Microsoft Visual Studio for free. The student chapter of ACM handles the ordering and distribution of this software.
The website for the MSDNAA is http://msdnaa.cs.weber.edu/. If DNS issues prevent the site from being visible outside of the main campus labs, alternatively you can try http://137.190.19.14 .
You can also find ANSI standard C++ compilers on the web for free. Any ANSI compliant compiler should work. 'Bloodshed' is an aptly named example. If you find one that works well, please post so that others may benefit.
Important Information about Your Programs and Assignments.
Programming assignments should be uploaded using the WebCT Vista site assigned to this class. Details will be given during class. Typically only the source code (.cpp, .java, .pro file) should be submitted. Executables are rarely required. I will compile the submitted source in
order to confirm that no syntax errors exist within the code. All submitted programs should
compile as a minimum requirement. Avoid submitting programs by email, because there’s always a distinct possibility I may not receive the assignment due to some obscure networking, server, or mail application problem. I will not confirm receipt of assignments emailed to me. Collaboration on individual assignments should be at the conceptual level only. If detail source code is duplicated from one program into another, it will be deemed as cheating and severe action will be taken against persons who knowingly have participated. Students should ensure that the latest version of source code is submitted. Source code that doesn't match the output results may also be deemed as cheating which may result in severe penalties.
Documenting Your Programs
Program documentation is very important. For CS2130, we will emphasize explicit documentation for both individual code and the group project code, as indicated in the separate sections below.
5
I. Individual code
Program documentation for individual assignments will consist of both prologue and explanatory comments. Please note the following three requirements regarding the documentation for your programs.
1. The comment headers for each of your submitted programs must adhere to the
following format: // John Doe
// CS 2130 – 7:30 am
// Assignment #99
// Dr. Rague
// Due: mm/dd/yy
// Version: 1.0
// -----------------------------------------------------------------
// This program calculates the revenue generated by an employee
// installing coaxial cable
// -----------------------------------------------------------------
// Compiler directives
#include <iostream>
using namespace std;
etc…
2. Each main modular unit (classes and functions) should be preceded by a short
description as shown here: // -----------------------------------------------------------------
// This class represents a circle that can be displayed on
// a console window.
//
// Version 1.1
// ----------------------------------------------------------
class Circle
{
protected:
int x,y;
3. You should also include appropriate in-line comments throughout your code to clarify
any sections or statements in which the programming strategy isn’t immediately
obvious.
// Variable declarations
int Num_Cases; // The number of cases of data values to process
int Installations; // The number of installations
double Yards_Of_Cable, // The yards of cable installed
Feet_Of_Cable, // The number of yards of cable converted to feet
Revenue; // The revenue generated for this case of data
6
II. Team programs There are three key components to team code documentation, each of which will count toward a portion of the overall grade for the project:
1. A single page narrative document explaining the basic functionality of the program
and outlining the design strategies used to achieve the objectives set down by the
assignment description.
2. The comment header for each of the team’s submitted programs must adhere to the
following format:
// -----------------------------------------------------------------
// Learning Team A
// Members:
// Timothy Turner
// Amy Workhard
// Jennifer Ostler
// John Johnson
// Samuel Clemens
// CS 2130 – 7:30 am
// Section 1 Learning Team Assignment
// Dr. Rague
// Due: 05/28/06
// Version: 1.2
// -----------------------------------------------------------------
// This program calculates the area of a given length and width
// and calculates the price per sq. ft. for a total project cost.
// -----------------------------------------------------------------
3. A change log, version log, or some form of communication log that lists each team
member and describes his/her contribution to the project.
// -----------------------------------------------------------------
// Change Control Section
// -----------------------------------------------------------------
// Team Member: Tim Turner
// Version: 1.0
// Date: 05/22/06
// Created basic program with hard coded values and display total cost.
// Version: 1.2
// Date: 05/26/06
// Supplied testing and QC. Minor upgrades to code syntax.
// Team Member: Amy Workhard
// Version: 1.0
// Date: 05/23/06
// Provided code to accept user input for length and width, calculate
// and display total cost.
// Team Member: Jennifer Ostler
// Version: 1.1
// Date: 05/25/06
// Updated program to accept user input for price per square
7
// foot. Added validation code to ensure proper user input for
// all values.
// Team Members: John Johnson & Samuel Clemens
// Version: 1.1
// Date: 05/25/06
// Incorporated the following revisions for aesthetic and
// functional purposes:Revised user input line of ppsqft to read
// "price per square foot", included all change control sections,
// added some 'endl' statements to separate output.
// -----------------------------------------------------------------
Late Assignment Policy
Please note that a late assignment will be accepted only within the first five days following its original due date. The maximum grade possible for a late assignment will be automatically reduced by an amount equal to 10% of the original total point value for each day it is late, and,
as stipulated, will not be accepted at all after five days. No assignments will be accepted after the last day of class, prior to finals week. No exceptions. “I really, really need to get a C” Policy:
The most effective method for obtaining a C or above in this class is to submit assignments
when they are due and to stay current with course topics. The curriculum is carefully designed to fit the number of course weeks. In order to uphold academic rigor and integrity, student
grades must be based on the degree to which the course requirements listed in the syllabus are fulfilled. Except when specifically made available per the course schedule, extra credit assignments are not allowed. If you approach me anytime during the term claiming that special allowance should be made because you need a C to move forward in the program, graduate, receive financial aid, etc., I will decline your request and refer you to this clearly worded policy.
Exams & Quizzes
There will be six individual/group in-class assessments, two exams, and one final. The in-class assessments will be composed of multiple choice, short answer, and true/false questions. These are primarily used to test your knowledge of key terminology, operations, and computational concepts that have been introduced in class presentations. Each student will take the test individually, and then each team will take the same test as a group. These assessments are primarily used to test your knowledge of key terminology and programming concepts that have been provided in the reading and highlighted in the class presentations. To receive credit, each student must take the in-class assessment both individually and as a team member. As long as you read and attend class sessions, you should have no problem receiving a good score on the tests. Assessment 1 – Week 2 Assessment 2 – Week 4 Assessment 3 – Week 7 Assessment 4 – Week 9 Assessment 5 – Week 12 Assessment 6 – Week 15 Exam 1 – Week 5
8
Exam 2 – Week 10 Final – Week of 12/8 The exams and final will be given in class or at a Chi-Testing site on an affiliated campus. Information about how the exams will be administered will be given during the week before the exam. There will be no weekly assignments during the week of an exam. The exams will consist of multiple choice, True/False, and short answer questions.
The exams are not to be shared or discussed with other students. If I find out or discover
that there has been any cheating, it will result in an automatic failure for the course!
Each student will receive the grade, which in the best judgment of the instructor, he or she has earned. Requests for a grade higher than the one earned, for any reason (including loss of student visa, entrance requirements into a professional school, etc.) will not be honored. There will be no retests. Make-up exams will be given only for valid reasons and if the instructor is notified in advance of the scheduled exam hour.
Grading Policy
Small Team In-Class Exercises 5% Individual Assignments 20% Group Assignments 15% Individual/Group Assessments 10% Exam 1 15% Exam 2 15% Final Exam 20%
LETTER GRADE PERCENT RANGE A total >= 93.3% A- 90.0% <= total < 93.3% B + 86.7% <= total < 90.0% B 83.3% <= total < 86.7% B- 80.0% <= total < 83.3% C+ 76.7% <= total < 80.0% C 73.3% <= total < 76.7% C- 70.0% <= total < 73.3% D+ 66.7% <= total < 70.0% D 63.3% <= total < 66.7% D- 60.0% <= total < 63.3% F total < 60.0%
Students with Disabilities
Any student requiring accommodations or services due to a disability must contact Services for Students with Disabilities (SSD) in room 181 of the Student Services Center. SSD can also arrange to provide course materials(including the syllabus) in alternative formats if necessary.
9
For more information about the SSD contact them at 801-626-6413, [email protected], or departments.weber.edu/ssd.
WSU Student Code
Students are expected to be familiar with the WSU Student Code and abide by it. The Code may be reviewed online at http://www.weber.edu/ppm/6-22.htm (pay specific attention to Section 4D). All necessary steps will be taken to enforce the Student Code to guarantee fairness to all students.
Bad Weather Policy
Use good judgement in the event of bad weather. Do not take unnecessary risks. The attendance and participation policies will be relaxed in the event of inclement weather. Exams will be rescheduled as necessary. Keep informed about class cancellations by listening to the radio. Disclaimer
The following syllabus is subject to change at any time. The listing represents a tentative class schedule for the term and the topics covered. Alterations made in class supersede this document.
CS 2130 Syllabus:
WEEK STARTING TOPICS/SUGGESTED
HOMEWORK EXER.
READING WORK
1 Monday, Aug 25
Introduction to Sets and Functions
Sec 1.1 - Sets: 3, 5, 10,
11, 15, 16
Sec 1.2 - Operations on
Sets: 1, 7ef, 8cdef
KBR –
Chap. 1
(pp. 1-10)
Schedule:
Mon: Groups Formed, Practice Assessment
Wed: Warm Up Programming
Exercise (Due Thurs, Week
1)
2 Monday, Sep 1
Functions
Sec 5.1 - Functions: 1,
7, 11, 13, 19a, 20b, 22,
24, 25
Sec 5.2 - Functions for
CS: 3, 5ab, 6ab, 9, 11,
KBR –
Chap. 5
(pp. 180 –
197)
Schedule:
Wed: Assessment #1 on Week 1 & 2 Readings Assignments: Indiv. Assignment #1–
Due Monday,
Week 3
10
13, 15, 21, 23, 25, 49a,
50
3 Monday, Sep 8
Propositions and Logical Operations
Sec 2.1 - Propositions:
9, 28, 30, 32, 36
Sec 2.2 - Conditional
Statements: 12, 21, 27
(distributive), 28
(DeMorgan), 34 (modus
ponens), 35 (syllogism)
KBR –
Chap. 2
(pp. 50 –
60)
Assignments: Team Assignment #1–
Due Wednesday,
Week 4
4 Monday, Sep 15
Predicates and Logic Programming
KBR –
Chap. 2
(pp. 50 –
60)
Schedule:
Mon: Assessment #2 on Week 1-4 Readings
Wed: Group Presentation of Team Assignment #1 Assignments: Indiv. Assignment #2 –
Due Wednesday,
Week 5
5 Monday, Sep 22
Boolean Functions and Circuit Design
Sec 6.5 - Boolean
Polynomials: 1, 3, 5, 6,
15a, 16a, 18 (Boolean
polynomial and truth
table), 21 (logic
diagram, Boolean
polynomial, and truth
table)
Sec 6.6 - Circuit Design:
1, 3, 5, 8, 13, 15, 17, 19,
21, 24
KBR –
Chap. 6
(pp. 250 –
262)
Exam 1
6 Monday, Sep 29
Karnaugh Maps, Algorithms, and the Growth of Functions
Sec 5.3 – Growth of
Functions: 1, 2, 4, 7, 8,
12, 14, 16
KBR –
Chap. 6
(pp. 257 –
262), Chap
5 (pp. 200-
203)
Schedule:
Mon: In-class Exercise #1
Wed: In-class Exercise #2 Assignments: Indiv. Assignment #3 –
Due Mon,
Week 7
7 Monday, Oct 6
Integers and Counting
Sec 1.4 - Properties of
Integers: 5, 7, 9, 11, 13,
KBR –
Chap. 1
(pp. 20 –
32), Chap 3
Schedule:
Wed: Assessment #3 on Week 5-7 Readings
11
41, 42a
Sec 3.1 - Permutations:
1, 4, 8, 15, 17, 20, 23
Sec 3.2 - Combinations:
1, 3, 7, 10, 11, 13, 26
(pp. 91-
103)
8 Monday, Oct 13
Discrete Probability
Sec 3.4 - Probability: 9,
11, 21, 31, 33, 34
KBR –Chap
3 (pp. 104-
110)
Schedule:
Mon: In-class Exercise #3 Assignments: Team Assignment #2 -
Due Monday,
Week 9
9 Monday, Oct 20
Boolean Matrices
Sec 1.5 - Matrices: 9, 31
(also compute AB)
KBR –Chap
1 (pp. 32-
40)
Schedule:
Mon: Group Presentation of Team Assignment #2
Wed: Assessment #4 on Week 8 & 9 Readings Assignments: Indiv. Assignment #4 –
Due Wednesday,
Week 10
10 Monday, Oct 27
Relations and Digraphs
Sec 4.2 - Relations and
Digraphs: 3, 9, 13, 17,
23, 25, 27, 29
Sec 4.3 - Paths: 2b, 3a,
4, 6, 7, 8, 11a, 13, 14,
15, 16, 27, 28
Sec 4.4 - Properties of
Relations: 1, 7, 9, 11,
15, 19, 25, 29
Sec 4.5 - Equivalence
Relations: 1, 2, 3, 4, 5, 6
Sec 4.7 - Operations on
Relations: 1, 6, 7, 13,
16, 17
Sec 4.8 - Transitive
Closure: 1, 2, 9, 12
KBR –Chap
4
Exam 2
11 Monday, Nov 3
Relations and Digraphs, Partial Ordering
Sec 6.1 – Partially
Ordered Sets: 1, 2, 9, 11
Sec 6.2 – Extremal
Elements of Posets: 1, 2,
3, 4, 6, 8, 9, 12
KBR –Chap
6 (pp. 217-
231)
Schedule:
Mon: In-class Exercise #4
Wed: In-class Exercise #5 Assignments: Indiv. Assignment #5 –
Due Monday,
Week 12
12
12 Monday, Nov 10
Trees
Sec 7.1 - Trees: 1, 3, 5,
7, 9, 11, 13, 15, 17, 27,
29, 30
KBR –Chap
7
Schedule:
Wed: Assessment #5 on Weeks 10-12 Readings
13
Mon, Nov 17
Sequences, Strings, and Regular Expressions
Sec 1.3 - Sequences: 1,
4, 5, 8, 12, 16, 17, 18,
21, 22
Sec 1.3 - Regular
Expressions: 25, 31, 32,
34, 35
KBR –Chap
1 (pp. 13-
19)
Schedule:
Mon: In-class Exercise #6 Assignments: Team Assignment #3 -
Due Wednesday,
Week 14
14 Mon, Nov 24
Grammars
Sec 10.1 - Languages
and Grammars: 1, 3, 7,
9, 11, 15, 23, 25, 27
KBR –Chap
10 (pp. 386-
403)
Schedule:
Wed: Group Presentation of Team Assignment #3 Assignments: Indiv. Assignment #6 –
Due Wednesday,
Week 15
15 Mon, Dec 1
Finite State Machines, Turing Machines
Sec 10.3 - Finite State
Machines: 1, 5, 7, 11
Sec 10.4 - Machines and
Languages: 13, 15, 17,
19
Sec 10.5 - Machines and
Regular Languages: 15,
19, 22, 23
KBR –Chap
10 (pp. 403
- 426)
Schedule:
Mon: Assessment #6 on Week 14 & 15 Readings
FINAL Week of
Dec 8
Final Exam