## How to denote an array in writing paper

How can I represent an array when I am writing to show an algorithm in writing paper. Like Pi is represented by Greek letter. We use that Greek symbol to denote the value of Pi, Kind of like a pointer. So, is there any general symbol for representing array? Answer People often use capital letters … Read more

## A case study for search techniques in AI

We are teaching an artificial intelligence class and we need a different case study other than geographical maps (the popular example is the map of Romania) to explain the difference between Breadth-first search and Depth-first search solutions. We plan on giving it to the students to use as a semester project. Answer AttributionSource : Link … Read more

## How to represent OOP concepts in algorithms in a standard way?

I have usually been using the Cormen algorithm format to teach some introductory courses in Programming. I mean something like this: TreeSearch(k,n) 1. if x==NIL or k==x.key 2. return x 3. if k<x.key 4. return TreeSearch(k.left,n) 5. else return TreeSearch(k.right,n) Actually I have not agree with a couple of lecturers in my institution that they … Read more

## what would be the drawbacks of lecturing two programming languages simultaneously?

One colleage came with the idea/comment that it would be useful to lecture two programming languages, eg. Java and Scheme, at the same time while lecturing an Introduction to Programming course aimed for first term undergraduates. I have my doubts that approach could stuck some students in learning the syntax of the programming language instead … Read more

## What’s the big deal with the knapsack problem?

In my CS course, we are covering things from one topic to another in sort of a sensible manner. For example, binary search tree -> 234-tree -> red-black tree -> heap -> greedy algorithms -> dynamic programming. And all the sudden, bam, there is this whole chapter on the knapsack problem. How is this problem … Read more

## 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 3.2. Suppose we have a program whose running time is T(0)=1, T(1)=4, T(2)=9, … Read more

## Explaining why FFT is faster than DFT for the general public?

How would you explain why the Fast Fourier Transform is faster than the Discrete Fourier Transform, if you had to give a presentation about it for the general (non-mathematical) public? Answer FFT is an algorithm for computing the DFT. It is faster than the more obvious way of computing the DFT according to the formula. … Read more

## 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 teaching them this lesson, becoming able to think in abstractions like functions on … Read more

## 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 was a pretty good description of recursive enumerability (recognizability): he … Read more

## 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 don’t know if it … Read more