Questions tagged [computer-science]

Computer science (CS) is the science behind programming. Use for questions related to the more theoretical questions involving programming. Questions of a purely theoretical nature may be off-topic. All CS questions can be asked on https://cs.stackexchange.com/

Computer science (also called computing science, and often abbreviated CS) is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems. Computer scientists invent algorithmic processes that create, describe, and transform information and formulate suitable abstractions to model complex systems.

As a discipline, computer science spans a range of topics from theoretical studies of algorithms and the limits of computation to the practical issues of implementing computing systems in hardware and software.

While some computer science questions are on-topic for Stack Overflow, many of the more theoretical questions or questions that do not apply to programming are off-topic. You can ask these types of questions on the Computer Science Stack Exchange.

4449 questions
97
votes
33 answers

What Computer Science concepts should I know?

What concepts in Computer Science do you think have made you a better programmer? My degree was in Mechanical Engineering so having ended up as a programmer, I'm a bit lacking in the basics. There are a few standard CS concepts which I've learnt…
Jon Artus
  • 6,268
  • 11
  • 42
  • 41
95
votes
7 answers

What is a Lambda?

Could someone provide a good description of what a Lambda is? We have a tag for them and they're on the secrets of C# question, but I have yet to find a good definition and explanation of what they are in the first place.
Fred
  • 2,713
  • 3
  • 27
  • 30
90
votes
5 answers

Calculate minimal operations to make two tree structures identical

This is more of a CS question, but an interesting one : Let's say we have 2 tree structures with more or less the same nodes reorganized. How would you find any in some sense minimal sequence of operations MOVE(A, B) - moves node A under node B…
Tomas Vana
  • 18,317
  • 9
  • 53
  • 64
89
votes
15 answers

Why binary and not ternary computing?

Isn't a three state object immedately capable of holding more information and handling larger values? I know that processors currently use massive nets of XOR gates and that would need to be reworked. Since we are at 64 bit (we can represent 2^63…
ojblass
  • 21,146
  • 22
  • 83
  • 132
89
votes
12 answers

Function pointers, Closures, and Lambda

I am just now learning about function pointers and, as I was reading the K&R chapter on the subject, the first thing that hit me was, "Hey, this is kinda like a closure." I knew this assumption is fundamentally wrong somehow and after a search…
None
  • 2,927
  • 3
  • 29
  • 42
78
votes
11 answers

How helpful is knowing lambda calculus?

To all the people who know lambda calculus: What benefit has it bought you, regarding programming? Would you recommend that people learn it?
TraumaPony
  • 10,742
  • 12
  • 54
  • 74
69
votes
16 answers

What is the computer science definition of entropy?

I've recently started a course on data compression at my university. However, I find the use of the term "entropy" as it applies to computer science rather ambiguous. As far as I can tell, it roughly translates to the "randomness" of a system or…
fluffels
  • 4,051
  • 7
  • 35
  • 53
69
votes
3 answers

Math for computer science

I have read several answers on this topic , but I still have questions.. There are plenty of math courses, and I don't know which one to take first. Which math classes should every computer scientist take? And what class should be first one and why?…
LoLzMan
  • 703
  • 1
  • 8
  • 8
68
votes
6 answers

Turing machine vs Von Neuman machine

Background The Von-Neumann architecture describes the stored-program computer where instructions and data are stored in memory and the machine works by changing its internal state, i.e an instruction operates on some data and modifies the data. So…
Santhosh
  • 6,547
  • 15
  • 56
  • 63
67
votes
7 answers

Explain the proof by Vinay Deolalikar that P != NP

Recently there has been a paper floating around by Vinay Deolalikar at HP Labs which claims to have proved that P != NP. Could someone explain how this proof works for us less mathematically inclined people?
Nixuz
  • 3,439
  • 4
  • 39
  • 44
62
votes
4 answers

HTML5 Canvas background image

I'm trying to place a background image on the back of this canvas script I found. I know it's something to do with the context.fillstyle but not sure how to go about it. I'd like that line to read something like this: context.fillStyle =…
Sam Skirrow
  • 3,647
  • 15
  • 54
  • 101
61
votes
11 answers

What are vectors and how are they used in programming?

I'm familiar with the mathematical/physics concept of a vector as a magnitude and a direction, but I also keep coming across references to vectors in the context of programming (for example C++ seems to have a stl::vector library which comes up…
Redwood
  • 66,744
  • 41
  • 126
  • 187
60
votes
3 answers

What is the 'expression problem'?

I have a rough idea about what this is but if someone has an explanation of the 'expression problem' that they think is succinct and intuitive I would love to hear it.
James
  • 2,306
  • 1
  • 22
  • 23
59
votes
4 answers

What is a finite state transducer?

Can someone please tell me what a finite state transducer is? I have read the Wikipedia article and don't understand a thing.
user581734
  • 1,219
  • 3
  • 15
  • 24
58
votes
24 answers

What exactly is the halting problem?

Whenever people ask about the halting problem as it pertains to programming, people respond with "If you just add one loop, you've got the halting program and therefore you can't automate task" Makes sense. If your program has an infinite loop, then…
poundifdef
  • 18,726
  • 23
  • 95
  • 134