Problem Detail: I’m having a lot of trouble constructing a PDA for the language: begin{equation*} {a^m b^n : m < 2n < 3m } end{equation*} I know if I push a symbol for each $a$ I see, then pop 2 symbols Read More …
Category: Uncategorized
What is the difference between a scripting language and a normal programming language?
Problem Detail: What is the difference between programming language and a scripting language? For example, consider C versus Perl. Is the only difference that scripting languages require only the interpreter and don’t require compile and linking? Asked By : SS Hegde Answered Read More …
Generate scale-free networks with power-law degree distributions using Barabasi-Albert
Problem Detail: I’m trying to reproduce the synthetic networks (graphs) described in some papers. It is stated that the Barabasi-Albert model was used to create “scale-free networks with power-law degree distributions, $P_A(k) ∝ k^{-λ}$”. $P_A$ is a probability distribution that returns Read More …
Checking Feasibility of Linear Program in Polynomial Time
Problem Detail: Given a linear system of the form: $$begin{array}{c} x_r = a quad x_j = b c_1x_1 + c_2x_2 + ldots + c_nx_n = N x_1+x_2 + x_3 + ldots + x_n = k 0 le a,b,x_1,x_2,x_3…x_n le 1 k Read More …
How to determine likely connections in a social network?
Problem Detail: I am curious in determining an approach to tackling a “suggested friends” algorithm. Facebook has a feature in which it will recommended individuals to you which it thinks you may be acquainted with. These users normally (excluding the edge Read More …
Why does heapsort run in $Theta(n log n)$ instead of $Theta(n^2 log n)$ time?
Problem Detail: I am reading section 6.4 on Heapsort algorithm in CLRS, page 160. HEAPSORT(A) 1 BUILD-MAX-HEAP(A) 2 for i to A.length downto 2 3 exchange A[i] with A[i] 4 A.heap-size = A.heap-size-1 5 MAX-HEAPIFY(A,1) Why is the running time, according Read More …
Cost in time of constructing and running an NFA vs DFA for a given regex
Problem Detail: Repost from Stack Overflow: I’m going through past exams and keep coming across questions that I can’t find an answer for in textbooks or on google, so any help would be much appreciated. The question I’m having problems with Read More …
Fixed point, what does it mean in the world of computer science
Problem Detail: I keep coming across references to fixed point in questions and answers at stackexchange and I look up the meaning on the web obviously finding reference at sites such as Wikipedia. However none of the references really answer my Read More …
What is the difference between an algorithm, a language and a problem?
Problem Detail: It seems that on this site, people will often correct others for confusing “algorithms” and “problems.” What are the difference between these? How do I know when I should be considering algorithms and considering problems? And how do these Read More …
Logic gates from everyday materials
Problem Detail: 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 size beyond their basic binary Read More …