CSC 161 – Imperative Problem Solving and Data Structures

CSC 151, CSC 161, and CSC 207 — the three courses in Grinnell's multi-paradigm, introductory computer science sequence — have been recognized as "exemplar courses" by the ACM/IEEE-CS Task Force on Computing Curricula 2013.

Overview

CSC 161 utilizes robotics as an application domain in studying imperative problem solving, data representation, and memory management. Additional topics include assertions and invariants, data abstraction, linked data structures, an introduction to the GNU/Linux operating system, and programming the low-­level, imperative language C.   The review of CS 2013 identified some refinements of coverage for CSC 161, but substantial changes are not anticipated. The course follows a lab-based format that emphasizes both collaborative learning and individual problem solving.

Catalog Description

A continuation of CSC 151, bringing in some concepts more closely tied to the architecture of computers, compilers, and operating systems, such as macro processing, compilation and linking, pointers and memory management, data representation, and software development tools. Additional topics include assertions and invariants, data abstraction, linked data structures, an introduction to the use of the GNU/Linux operating system, and programming in a low-level, imperative language. Variable topic course. Includes formal laboratory work.

Syllabus Description

This course explores elements of computing that have reasonably close ties to the architecture of computers, compilers, and operating systems. The course takes an imperative view of problem-solving, supported by programming in the C programming language. Some topics include:

  • imperative problem solving: top-down design, common algorithms, assertions, invariants
  • C programming: syntax and semantics, control structures, functions, parameters, macro processing, compiling, linking, program organization
  • concepts with data: data abstraction, integer and floating-point representation, string representation, arrays, unions, structures, linked list data structures, stacks, and queues
  • machine-level issues: data representation, pointers, memory management
  • GNU/Linux operating system: commands, bash scripts, software development tools

Class Format and Pedagogy

Topics in this course are organized into eight modules and a few supplementary labs. A typical modules includes:

  • An opening session to introduce fundamental material,
  • 3-5 laboratory sessions to allow students to engage the material, and
  • a concluding integrative project.

In-class laboratory sessions encourage collaborative work — usually working in pairs. In addition, supplementary homework assignments and tests will involve individual work.

Current and Past Course Offerings

The department maintains a page of current and past course offerings.

Student Learning Outcomes

Computer Science Curricula 2013 (CS2013), national curricular recommendations from the ACM/IEEE-CS professional societies, identify an extensive list of learning outcomes for undergraduate computer science programs. Upon completing CSC 161, students should achieve the following learning outcomes with the specified level of mastery:

Knowledge UnitLearning Outcome with [Level of Mastery]
Basic Analysis
  • In the context of specific algorithms, identify the characteristics of data and/or other conditions or assumptions that lead to different behaviors. [Familiarity]
Algorithmic Strategies
  • Have facility mapping pseudocode to implementation, implementing examples of algorithmic strategies from scratch, and applying them to specific problems. [Familiarity]
  • Use a divide-and-conquer algorithm to solve an appropriate problem. [Usage]
Fundamental Data Structures and Algorithms
  • Implement basic numerical algorithms. [Usage]
  • Implement simple search algorithms and explain the differences in their time complexities. [Usage, Assessment]
  • Discuss factors other than computational efficiency that influence the choice of algorithms, such as programming time, maintainability, and the use of application-specific patterns in the input data. [Familiarity]
Machine-level representation of data
  • Explain the reasons for using alternative formats to represent numerical data. [Familiarity]
  • Describe how negative integers are stored in sign-magnitude and twos-complement representations. [Familiarity]
  • Explain how fixed-length number representations affect accuracy and precision. [Familiarity]
  • Describe the internal representation of non-numeric data, such as characters, strings, records, and arrays. [Familiarity]
  • Convert numerical data from one format to another. [Usage]
Fundamentals
  • Explain the concept of modeling and the use of abstraction that allows the use of a machine to solve a problem. [Familiarity]
  • Describe the relationship between modeling and simulation, i.e., thinking of simulation as dynamic modeling. [Familiarity]
Processing
  • Analyze simple problem statements to identify relevant information and select appropriate processing to solve the problem. [Assessment]
  • Explain how data is represented in a machine. Compare representations of integers to floating point numbers. Describe underflow, overflow, round off, and truncation errors in data representations. [Familiarity]
  • Identify the issues impacting correctness and efficiency of a computation. [Familiarity]
Basics of Counting
  • Perform computations involving modular arithmetic. [Usage]
Defensive Programming
  • Demonstrate the identification and graceful handling of error conditions. [Usage]
Robotics
  • Integrate sensors, actuators, and software into a robot designed to undertake some task. [Usage]
  • Program a robot to accomplish simple tasks using deliberative, reactive, and/or hybrid control architectures. [Usage]
  • Characterize the uncertainties associated with common robot sensors and actuators; articulate strategies for mitigating these uncertainties. [Familiarity]
Basic Type Systems
  • Explain how programming language implementations typically organize memory into global data, text, heap, and stack sections and how features such as recursion and memory management map to this memory model. [Familiarity]
Language Translation and Execution
  • Explain how programming language implementations typically organize memory into global data, text, heap, and stack sections and how features such as recursion and memory management map to this memory model. [Familiarity]
  • Reason about memory leaks, dangling-pointer dereferences, and the benefits and limitations of garbage collection. [Usage]
Advanced Programming Constructs
  • Use various advanced programming constructs and idioms correctly. [Usage]
Algorithms and Design
  • Determine whether a recursive or iterative solution is most appropriate for a problem. [Assessment]
  • Implement a divide-and-conquer algorithm for solving a problem. [Usage]
  • Apply the techniques of decomposition to break a program into smaller pieces. [Usage]
  • Implement a coherent abstract data type, with loose coupling between components and behaviors. [Usage]
Fundamental Programming Concepts
  • Analyze and explain the behavior of simple programs involving the fundamental programming constructs covered by this unit. [Assessment]
  • Identify and describe uses of primitive data types. [Familiarity]
  • Write programs that use primitive data types. [Usage]
  • Modify and expand short programs that use standard conditional and iterative control structures and functions. [Usage]
  • Design, implement, test, and debug a program that uses each of the following fundamental programming constructs: basic computation, simple I/O, standard conditional and iterative structures, the definition of functions, and parameter passing. [Usage]
  • Write a program that uses file I/O to provide persistence across multiple executions. [Usage]
  • Choose appropriate conditional and iteration constructs for a given programming task. [Assessment]
  • Identify the base case and the general case of a recursively-defined problem. [Assessment]
Fundamental Data Structures
  • Discuss the appropriate use of built-in data structures. [Familiarity]
  • Describe common applications for each data structure in the topic list. [Familiarity]
  • Write programs that use each of the following data structures: arrays, strings, linked lists, stacks, queues, sets, and maps. [Usage]
  • Compare alternative implementations of data structures with respect to performance. [Assessment]
  • Compare and contrast the costs and benefits of dynamic and static data structure implementations. [Assessment]
  • Choose the appropriate data structure for modeling a given problem. [Assessment]
Development Methods
  • Trace the execution of a variety of code segments and write summaries of their computations. [Assessment]
  • Explain why the creation of correct program components is important in the production of high-quality software. [Familiarity]
  • Identify common coding errors that lead to insecure programs (e.g., buffer overflows, memory leaks, malicious code) and apply strategies for avoiding such errors. [Usage]
  • Apply a variety of strategies to the testing and debugging of simple programs. [Usage]
  • Construct and debug programs using the standard libraries available with a chosen programming language. [Usage]
  • Apply consistent documentation and program style standards that contribute to the readability and maintainability of software. [Usage]
Software Design
  • Construct models of the design of a simple software system that are appropriate for the paradigm used to design it. [Usage]
Professional Ethics
  • Identify ethical issues that arise in software development and determine how to address them technically and ethically. [Familiarity]
  • Recognize the ethical responsibility of ensuring software correctness, reliability and safety. [Familiarity]
  • Describe the strengths and weaknesses of relevant professional codes as expressions of professionalism and guides to decision-making. [Familiarity]
  • Evaluate the professional codes of ethics from the ACM, the IEEE Computer Society, and other organizations. [Assessment]
Professional Communication
  • Write clear, concise, and accurate technical documents following well-defined standards for format and for including appropriate tables, figures, and references. [Usage]
  • Evaluate written technical documentation to detect problems of various kinds. [Assessment]