Didactic tools and methods particularly suitable for Computer Science education
Questions tagged [didactics]
23 questions
132
votes
15 answers
How to fool the "try some test cases" heuristic: Algorithms that appear correct, but are actually incorrect
To try to test whether an algorithm for some problem is correct, the usual starting point is to try running the algorithm by hand on a number of simple test cases -- try it on a few example problem instances, including a few simple "corner cases". …
D.W.
- 167,959
- 22
- 232
- 500
102
votes
5 answers
What are the reasons to learn different algorithms / data structures serving the same purpose?
I have been wondering about this question since I was an undergraduate student.
It is a general question but I will elaborate with examples below.
I have seen a lot of algorithms - for example, for maximum flow problems, I know around 3 algorithms…
shole
- 1,210
- 1
- 10
- 10
35
votes
2 answers
on "On the cruelty of really teaching computing science"
Dijkstra, in his essay On the cruelty of really teaching computing science, makes the following proposal for an introductory programming course:
On the one hand, we teach what looks like the predicate calculus, but we do it very differently from…
Matthew Towers
- 780
- 7
- 14
32
votes
3 answers
Teaching NP-completeness - Turing reductions vs Karp reductions
I'm interested in the question of how best to teach NP-completeness to computer science majors. In particular, should we teach it using Karp reductions or using Turing reductions?
I feel that the concepts of NP-completeness and reductions are…
D.W.
- 167,959
- 22
- 232
- 500
25
votes
4 answers
How to fool the plot inspection heuristic?
Over here, Dave Clarke proposed that in order to compare asymptotic growth you should plot the functions at hand. As a theoretically inclined computer scientist, I call(ed) this vodoo as a plot is never proof. On second thought, I have to agree that…
Raphael
- 73,212
- 30
- 182
- 400
20
votes
4 answers
What is an intuitive way to explain and understand De Morgan's Law?
De Morgan's Law is often introduced in an introductory mathematics for computer science course, and I often see it as a way to turn statements from AND to OR by negating terms.
Is there a more intuitive explanation for why this works rather than…
Ken Li
- 3,106
- 3
- 24
- 38
15
votes
3 answers
Logic gates from everyday materials
Logic gates are an abstract device which can be implemented with electromagnetic relays, vacuum tubes, or transistors. These implemenations have been successful in computing in part because of various properties of chainability, durability, and…
Jason Kleban
- 557
- 3
- 12
15
votes
6 answers
What parts of linear algebra are used in computer science?
I've been reading Linear Algebra and its Applications to help understand computer science material (mainly machine learning), but I'm concerned that a lot of the information isn't useful to CS. For example, knowing how to efficiently solve systems…
Kelmikra
- 726
- 9
- 16
15
votes
4 answers
Quicksort explained to kids
Last year, I was reading a fantastic paper on “Quantum Mechanics for Kindergarden”. It was not easy paper.
Now, I wonder how to explain quicksort in the simplest words possible. How can I prove (or at least handwave) that the average complexity is…
Jonathan Prieto-Cubides
- 2,229
- 3
- 18
- 26
11
votes
1 answer
Tips for teaching using Live Coding
I am involved in a first year programming and algorithms course. In a recent lecture, I decided to present the material using live coding, which essentially meant that I sit behind the keyboard and write code and evaluate it, using emacs to…
Dave Clarke
- 20,345
- 4
- 70
- 114
9
votes
4 answers
Teaching Recursion
I'm a teacher assistant in my university and my next topic is recursion. what way is the best to teach recursion so that the student can grasp the concept easily and can think recursively?
I was thinking about explaining the stack structure to teach…
Amen
- 173
- 1
- 2
- 8
8
votes
3 answers
How to memorize Master Theorem?
I know the maths behind, I know if I do the algebra I can get the result of the 3 cases. I also have an intuition of the 3 cases: Quora
However, I just cannot memorize this "simple" 3 cases whenever I need to apply them in real life problems.
I…
shole
- 1,210
- 1
- 10
- 10
6
votes
4 answers
A metaphor for recursive enumerability
In his commentary on a case involving pornography in 1964, U.S. Supreme Court Justice Potter Stewart sidestepped the question of defining what it meant for a work to be pornographic, but then said "I know it when I see it." It struck me that this…
Rick Decker
- 15,016
- 5
- 43
- 54
5
votes
2 answers
How to teach abstraction needed for programming?
I experience that my students are fixed to compute with concrete values and are not keen to think in terms of general solution like creating a mathematical function $f(n)$ , needed to write programming functions f(n).
What is a good method of…
Gergely
- 389
- 1
- 9
5
votes
2 answers
Need help understanding a derivation of "witnesses" for a Landau bound
So here's an excerpt from Foundations of Computer Science by Alfred Aho and Jeffrey Ullman[1]. I've also found basically the same material in a few other places, and also in my discrete math textbook, but this is clearest one I've seen:
Example…
greim
- 159
- 3