Computer Science Weekly Newsletter

Computer Science newsletter

Top new questions this week:

Is computation expression the same as monad?

I'm still learning functional programming (with f#) and I recently started reading about computation expressions. I still don't fully understand the concept and one thing that keeps me unsure when …

functional-programming monads  
asked by Grzegorz SÅ‚awecki 11 votes
answered by Tomas Petricek 12 votes

How to simulate a die given a fair coin

Suppose that you're given a fair coin and you would like to simulate the probability distribution of repeatedly flipping a fair (six-sided) die. My initial idea is that we need to choose appropriate …

probability-theory randomness sampling  
asked by probability_guy 10 votes
answered by FrankW 21 votes

Exponential-size numbers in NP completeness reduction

In the proof of Theorem 4 in [GS'12], the authors reduce an instance of PARTITION to their problem. Therefore, they create for each element $a_i$ in the instance of PARTITION a number $2^{c \cdot …

complexity-theory reductions np-hard  
asked by user1742364 5 votes
answered by Kaveh 2 votes

Difference between weak and strong AI

I'm trying to understand the difference between weak and strong AI. For an example, let's say we would pass the turing test - would it show strong AI or weak AI then? I don't believe that this is …

terminology artificial-intelligence  
asked by Regnard 4 votes
answered by David Richerby 4 votes

Probabilistic hardness of approximation or solution of NP-hard optimization problems under a probabilistic generative model for input data

So in biology (DNA sequences), sequence alignment is a generalization of longest common subsequence where an alignment of two sequences is scored typically with a linear function of how many spaces …

complexity-theory reference-request np-hard approximation average-case  
asked by user2566092 4 votes
answered by Yuval Filmus 3 votes

Complexity of Linear Diophantine equations

My question is simply, can linear Diophantine equations be solved in polynomial time? Specifically, I am looking at equations of the form $a_1 x_1+a_2 x_2 + ... + a_n x_n = k$, where $a_i,x_i,k$ are …

complexity-theory time-complexity polynomial-time integers  
asked by John Jenkins 4 votes
answered by D.W. 4 votes

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 …

reference-request programming-languages education didactics  
asked by Layla 4 votes
answered by Wandering Logic 5 votes

Greatest hits from previous weeks:

In basic terms, what is the definition of P, NP, NP-Complete, and NP-Hard?

I'm in a course about computing and complexity, and am unable to understand what these terms mean. All I know is that np is a subset of np complete which is a subset of np hard... but I have no idea …

complexity-theory terminology p-vs-np reference-question  
asked by agent154 64 votes
answered by Kaveh 105 votes

How not to solve P=NP?

There are lots of attempts at proving either $\mathsf{P} = \mathsf{NP} $ or $\mathsf{P} \neq \mathsf{NP}$, and naturally many people think about the question, having ideas for proving either …

complexity-theory reference-request history p-vs-np reference-question  
asked by Raphael 45 votes
answered by Opt 39 votes

Can you answer these?

Scalable quantum computation vs Uncertainty Principle

What does it means for a Quantum Computer to be scalable? I see a zero sum game between Quantum physics measurement being unpredictable and Quantum computing being scalable (and classically …

quantum-computing oracle-machines scalable measurement  
asked by Hernan_eche 2 votes

Applications of min spanning trees

What are the significant applications of minimum spanning trees? After doing some research online and in several textbooks, I have found three real-world applications: Building a connected network. …

graphs spanning-trees weighted-graphs applied-theory  
asked by D.W. 2 votes

Sorting with gaps

Suppose we have a directory containing $N$ files whose names are numerals, but not necessarily contiguous numerals. Let's say for concreteness that each file contains an email message, each of which …

algorithms sorting  
asked by Mark Dominus 3 votes
Subscribe to more Stack Exchange newsletters

Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3