The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [counting]

The term Counting in Computer Science is usually used to refer counting objects in certain arrangements or with certain properties.

132 questions
Filter by
Sorted by
Tagged with
18 views

319 views

How many 3-SAT expressions with up to N variables are satisfiable?

TL;DR There are exactly 255 possible 3-sat expressions with exactly 3 variables (more meticulously defined below). Of those, exactly 254 are satisfiable. There are exactly 4,294,967,295 possible 3-...
112 views

Count numbers less than $K$ in array

Let's say we have given array $A$ consisting of $n$ integers, and integer $K$. Now we want to count number of indexes $i$ such that $A_i<K$. What is the easiest way to pre-process the array and ...
62 views

Proving or disproving a set of total functions is countable

Let S be the set of total functions from $N \rightarrow M$, such that for each $f \in S$, there is $i > 1$ such that for all $j < i$, $f(i)$ and $f(j)$ are not equivalent Turing machines. ...
$k = \Theta(n)$ The arrays consist only natural numbers $1$ to $n$ The sum of the length of all arrays = $\Theta(n)$ It should return the $k$ original arrays, each sorted on its own. The running ...