Bats, balls, and lures: Cognitive style in CS education

Barry Wittman, Elizabethtown College
Jean Pretz, Elizabethtown College


If a bat and a ball cost $1.10 in total and the bat costs $1.00 more than the ball, how much does the ball cost? Many people trained in logical reasoning answer this question incorrectly. Is the kind of logical trap posed by this question similar to the logical traps in computer science? This paper examines the similarity between computer science programming problems with intuitive yet incorrect "lure" answers and logical problems from psychology and economics that share this characteristic. We find that there are fundamental similarities between these kinds of problems and that these problems can even be used as predictors of grades in introductory programming courses. Furthermore, we demonstrate that certain cognitive styles identified in recent psychological literature perform better on such problems.