Most Popular
1500 questions
40
votes
5 answers
How to come up with the runtime of algorithms?
I've not gone much deep into CS. So, please forgive me if the question is not good or out of scope for this site.
I've seen in many sites and books, the big-O notations like $O(n)$ which tell the time taken by an algorithm. I've read a few articles…

Code0987
- 523
- 1
- 5
- 8
40
votes
5 answers
Difference between a turing machine and a finite state machine?
I am doing a presentation about Turing machines and I wanted to give some background on FSM's before introducing Turing Machines. Problem is, I really don't know what is VERY different from one another.
Here's what I know it's different:
FSM has…

Julio Garcia
- 693
- 1
- 8
- 15
40
votes
13 answers
What should I do with a bunch of 16-17 year olds to get them interested in computer science?
I'm going to be involved with a sort of 'open day' at my university in a few weeks. As part of this time, I (along with a coworker) am being given a whole bunch of high-school level students for two hours, as well as a computer lab big enough to…

Koz Ross
- 813
- 7
- 12
40
votes
2 answers
Are there inherently ambiguous and deterministic context-free languages?
Let us call a context-free language deterministic if and only if it can be accepted by a deterministic push-down automaton, and nondeterministic otherwise.
Let us call a context-free language inherently ambiguous if and only if all context-free…

Patrick87
- 12,824
- 1
- 44
- 76
39
votes
3 answers
What exactly is a logic?
An apology might be in due for asking another question about prerequisites, but I was confused about the starting points.
I have come across various terms such as "Modal Logic", "Temporal logic", "First -order Logic", "Second order Logic" and…

Sheldon Kripke
- 567
- 4
- 5
39
votes
10 answers
Visual Programming languages
Most of us learned programming using "textual" programming languages like Basic, C/C++, and Java. I believe it is more natural and efficient for humans to think visually. Visual programming allows developers to write programs by manipulating…

Mohammad Al-Turkistany
- 4,417
- 1
- 26
- 35
39
votes
4 answers
Algorithm that finds the number of simple paths from $s$ to $t$ in $G$
Can anyone suggest me a linear time algorithm that takes as input a directed acyclic graph $G=(V,E)$ and two vertices $s$ and $t$ and returns the number of simple paths from $s$ to $t$ in $G$.
I have an algorithm in which I will run a DFS(Depth…

Saurabh
- 909
- 2
- 10
- 15
39
votes
0 answers
Finding an $st$-path in a planar graph which is adjacent to the fewest number of faces
I am curious whether the following problems has been studied before, but wasn't able to find any papers about it:
Given a planar graph $G$, and two vertices $s$ and $t$, find an
$s$-$t$ path $P$ which minimizes the number of distinct faces of…

Joe
- 391
- 2
- 2
39
votes
14 answers
What are some real world applications of graphs?
Can you give some real world examples of what graphs algorithms people are actually using in applications?
Given a complicated graphs, say social networks, what properties/quantity people want to know about them?
—-
It would be great if you can give…

NonalcoholicBeer
- 568
- 1
- 4
- 11
39
votes
5 answers
Do theorem provers demonstrate their own correctness?
I am not very well-versed in the world of theorem proving, much less automated theorem proving, so please correct me if anything I say or assume in my question is wrong.
Basically, my question is: are automated theorem provers themselves ever…

J. Auon
- 503
- 4
- 7
38
votes
6 answers
What use are groups, monoids, and rings in database computations?
Why would a company like Twitter be interested in algebraic concepts like groups, monoids and rings? See their repository at github:twitter/algebird.
All I could find is:
Implementations of Monoids for interesting approximation algorithms,
such…

john mangual
- 1,941
- 1
- 21
- 26
38
votes
8 answers
Are there any non-finite automata?
In automata theory, we all read automata as finite automata, from the very beginning. What I want to know is, why are automata finite? To be clear, what is it in an automaton that is finite - the alphabet, language, strings made with regular…

parvin
- 619
- 1
- 8
- 12
38
votes
3 answers
How is algorithm complexity modeled for functional languages?
Algorithm complexity is designed to be independent of lower level details but it is based on an imperative model, e.g. array access and modifying a node in a tree take O(1) time. This is not the case in pure functional languages. The Haskell list…

wsaleem
- 581
- 6
- 10
38
votes
2 answers
Are generational garbage collectors inherently cache-friendly?
A typical generational garbage collector keeps recently allocated data in a separate memory region. In typical programs, a lot of data is short-lived, so collecting young garbage (a minor GC cycle) frequently and collecting old garbage infrequently…

Gilles 'SO- stop being evil'
- 43,613
- 8
- 118
- 182
38
votes
5 answers
Can regular languages be Turing complete?
I was reading about Iota and Jot and found this section confusing:
Unlike Iota, where the syntactic tree for a string can branch either on the left or on the right, Jot syntax is uniformly left-branching. As a result, Iota is strictly context-free,…

sdleihssirhc
- 587
- 4
- 7