Problem Detail: Assembly language is converted in to machine language by assembler. Why would a compiler convert high-level language to assembly? Can’t it directly convert from the high-level language to machine code? Asked By : CODERSAM Answered By : Martin Berger Other reason Read More …
Category: Uncategorized
Iterative and/or tail-recursive implementations of merge sort?
Problem Detail: I recently learned how to implement merge-sort, using a standard recursive algorithm. Can the algorithm be implemented in a way that allows for a tail-recursive implementation? Can it be implemented in an iterative style? In general how can a Read More …
Uniform sampling from a simplex
Problem Detail: I am looking for an algorithm to generate an array of N random numbers, such that the sum of the N numbers is 1, and all numbers lie within 0 and 1. For example, N=3, the random point (x, Read More …
Difference between regular expression and grammar in automata
Problem Detail: I am new to automata, and I have been given a brief introduction to regular expressions only yesterday. I have read the various rules which to define a regular expression. But I am unable to differentiate between regular expressions Read More …
Can regular languages be Turing complete?
Problem Detail: 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, Read More …
Algorithmic intuition for logarithmic complexity
Problem Detail: I believe I have a reasonable grasp of complexities like $mathcal{O}(1)$, $Theta(n)$ and $Theta(n^2)$. In terms of a list, $mathcal{O}(1)$ is a constant lookup, so it’s just getting the head of the list. $Theta(n)$ is where I’d walk the Read More …
How do garbage collectors avoid stack overflow?
Problem Detail: So I was thinking about how garbage collectors work and I thought of an interesting issue. Presumably garbage collectors have to traverse all structures in the same way. They can’t know weather they are traversing a linked list or Read More …
NP completeness proof of a spanning tree problem
Problem Detail: I am looking for some hints in a question asked by my instructor. So I just figured out this decision problem is $sf{NPtext{-}complete}$: In a graph $G$, is there a spanning tree in $G$ that contain an exact set Read More …
Differences between the Actor Model and Communicating Sequential Processes (CSP)
Problem Detail: When we look at the Actor Model and Communicating Sequential Processes we see that they are both trying to do concurrency based on message passing, yet they are distinct. (We see implementations of the CSP Model in go-lang‘s goroutines Read More …
difference between multilayer perceptron and linear regression
Problem Detail: What is the difference between multilayer perceptron and linear regression classifier. I am trying to learn a model with numerical attributes, and predict a numerical value. Thanks Asked By : user20287 Answered By : Peter If you have a neural network Read More …