# Tagged Questions

All mathematical questions about computer science, including theoretical computer science, formal methods, verification, and artificial intelligence. For questions about Turing computability, please use the (computability) tag instead. For numerical analysis, use the (numerical-methods) tag. For ...

34 views

### (Un)countable set of regular language.

Suppose alphabet Σ={d,e,l,t} and A is the set of all languages "produced" by Σ, which all of them have the property not to include the string "delete". The question is: Is set A countable? I have ...
27 views

### Pattern matching algorithm

Given a text $t[1 . . . n, 1 . . . n]$ and $p[1 . . . m, 1 . . . m], n = 2m,$ from alphabet $[0, Σ−1]$, we say $p$ matches $t$ at $[i, j]$ if $t[i + k − 1, j + l − 1] = p[k, l]$ for all $k, l$. Design ...
36 views

### How to prove $\forall f,g\in\mathcal{F}: \log{f(n)} \in O(g(n))\implies f(n)\in O(3^{g(n)})$ if $\mathcal{F}=\{f|f:\mathbb{N}\to\mathbb{R}^+\}$?

Let $\mathcal{F}=\{f|f:\mathbb{N}\to\mathbb{R}^+\}$ How to prove or disprove $\forall f,g\in\mathcal{F}: \log{f(n)} \in O(g(n))\implies f(n)\in O(3^{g(n)}).$ I think it can be proved. Equivalently, ...
26 views

### If $1/2 ≤ p/q ≤ 2$ , then $p-q$ is representable exactly on the computer

I've found the following affirmation in an article. I've been thinking about it but I don't know the way to prove it: It is not hard to prove that if $p$ and $q$ are two of a computer’s floating–...
41 views

23 views

### Closed form expression for the number of ordered partitions of a list

Suppose I have a list $L = [e_1, e_2, \dots, e_n]$ and integer $k \geq 2$. I want to compute the number of ways to partition $L$ into $k$ sublists while maintaining the order of the elements. For ...
40 views

64 views

### How can I get better at algorithmic thinking?

I have been practising for a an upcoming algorithmic thinking competition but have always found that when doing the past papers, I have never had enough time left to finish. I can do basically all of ...
22 views

### Smallest number of groups to sniff

The question given: The sniffer dog at the airport stops beside a trolley piled high with 60 suitcases. One of the suitcases contains contraband peanuts. The dog can tell whether peanuts are hidden in ...
68 views

### Arrange the following:$(1.5)^n, n^{100}, (\log n)^3, \sqrt n\log n, 10^n, (n!)^2, n^{99}+n^{98}, 101^{16}$

Here is the question repeated: Arrange the following in order into increasing order of growth rates. $$(1.5)^n, n^{100}, (\log n)^3, \sqrt n\log n, 10^n, (n!)^2, n^{99}+n^{98}, 101^{16}$$ I graphed ...
23 views

46 views

### Can I prove that 2n+1 = O(2n)?

Is 2n+1 = O(2n)? In other words, 2n+1 <= c * 2n for any c and all n > n0? I have plugged in numbers but none that worked. Obviously It is also (n) but I am trying to prove the above. Much ...
47 views

### Why do at least half of all random orderings generate a binary space partition of size $n+4n\ln n$ in the random binary space partition algorithm?

Let $S$ be a finite ordered set of non-intersecting finite line segments in the plane. Let's randomly shuffle the elements of $S$ such that each possible permutation of those elements has equal ...
42 views

### What are the minimum hard constraints that cause the nurse scheduling problem to be NP-complete?

A client wishes to simplify the nurse scheduling problem to 'bypass' the NP-complete nature of this problem. He is hoping to do so by removing the requirement that there are any constraints for any ...
18 views

### Cannot create algorithm for decidable language

L2 = {<M> : M is a TM and there exists an input string w such that M halts within 10 steps on input w} Hi. I am creating an algorithm to show above L2 is ...
43 views

### Expected number of fragments generated by a random binary space partition (should be plain combinatorics)

Let $S$ be a finite ordered set of non-intersecting finite line segments in the plane. Let's randomly shuffle the elements of $S$ such that each possible permutation of those elements has equal ...
14 views

### Higher Order Polynomial Interpolation

I am trying to approximate some log and exp functions in my code. I have implemented linear and cubic splines, but I want more accuracy. I am thinking about biquadratic splines (4th order, quartic), ...
Consider a binary tree $T$ with nodes in $\mathbb{Z}^+$, where level $k$ of $T$ contains nodes $2^k$ through $2^{k + 1} - 1$. I have some problems that involve visiting the nodes of $T$ in their ...