The notion of ''don't care'', that encapsulates the unimportance of which of several scenarios will occur, is a fundamental notion in computer science. It is the core of non-determinism; it is essential in various computational models; it is central in distributed and concurrent algorithms; and it also is relevant in sequential, deterministic algorithms. It is a valuable tool in algorithmic problem solving. Yet, in the teaching of (deterministic) algorithms it is not made explicit, and left unexplored. Its implicit exposition yields limited student invocations and limited student comprehension upon its utilization. These phenomena are also due to its rather unintuitive ''black-box'' characteristic. In this paper, we illuminate and elaborate on this notion with six algorithmic illustrations, and describe our experience with novice difficulties with respect to this notion.
In many occasions, the text describing an algorithmic task may entail a rather intuitive, operational solution scheme. Yet, such a scheme may not necessarily be efficient or correct. Nevertheless, novices demonstrate tendencies to hastily design their solutions that way, and avoid seeking insightful patterns, which may yield better solutions. In this paper, we name and shed light on this theme, and illustrate the essential importance of elaborating insightful patterns, which one may assimilate as general problem solving notions.
Every repetitive process encapsulates a regularity pattern, which may be expressed as an invariant assertion. Invariants embody implicit, insightful properties that characterize the execution of programming statements. Due to their implicit nature, invariants may be less apparent to algorithmic problem solvers. Yet, invariants are essential for designing correct and efficient algorithms. This paper illustrates the essential role of invariants, and examines whether novices tend to look for invariant properties during their algorithmic problem solving. The paper presents a study in which two novel algorithmic challenges were displayed to a group of motivated, novice students. Student solutions to these challenges demonstrate an operational reasoning approach, which does not capture the essence of the problems at hand, and yields non-satisfying results. Some solutions were incorrect, others were inefficient, and some had no convincing justification. These results, and the correct and efficient solutions to both challenges illuminate the importance of assertional reasoning and the fundamental role of invariants.