instruction
stringlengths
0
29.8k
⌀
According to [this paper][1], >it is shown that if $p$ is the range $0<p\leq 1/2$, and if $K$ is the unique index such that $1/F_{K+3}< p \leq 1/F_{K+2}$, where $F_K$ denotes the $K$-th Fibonacci number, then the longest Huffman codeword for a source whose least probability is $p$ is at most $K$, and no better bound...
The Trench algorithm (1996) has complexity N*N to invert an N by N positive-definite Hermitian Toeplitz matrix. More recently (2005), Martinsson et al "A Fast Algorithm for the Inversion of General Toeplitz Matrices" describe an algorithm with complexity NlogN for general Toeplitz matrices but the intrinsic complexity ...
Fastest Algorithm for Inverse of Positive-Definite Hermitian Toeplitz Matrix?
|algebra|
{"Voters":[{"Id":156238,"DisplayName":"138 Aspen"}]}
According to [this paper][1], >it is shown that if $p$ is the range $0<p\leq 1/2$, and if $K$ is the unique index such that $1/F_{K+3}< p \leq 1/F_{K+2}$, where $F_K$ denotes the $K$-th Fibonacci number, then the longest Huffman codeword for a source whose least probability is $p$ is at most $K$, and no better bound...
{"Voters":[{"Id":156238,"DisplayName":"138 Aspen"}],"DeleteType":1}
A system that does not stop does not deliver results so it can be neither universal nor complete: it is rather a non-system.
null
According to [this paper][1], >it is shown that if $p$ is the range $0<p\leq 1/2$, and if $K$ is the unique index such that $1/F_{K+3}< p \leq 1/F_{K+2}$, where $F_K$ denotes the $K$-th Fibonacci number, then the longest Huffman codeword for a source whose least probability is $p$ is at most $K$, and no better bound...
According to [this paper][1], >it is shown that if $p$ is the range $0<p\leq 1/2$, and if $K$ is the unique index such that $1/F_{K+3}< p \leq 1/F_{K+2}$, where $F_K$ denotes the $K$-th Fibonacci number, then the longest Huffman codeword for a source whose least probability is $p$ is at most $K$, and no better bound...
Automata (e.g. of the Büchi variety) for accepting infinite words necessarily run forever. Looking into those might be a good starting point.
According to [this paper][1], >it is shown that if $p$ is the range $0<p\leq 1/2$, and if $K$ is the unique index such that $1/F_{K+3}< p \leq 1/F_{K+2}$, where $F_K$ denotes the $K$-th Fibonacci number, then the longest Huffman codeword for a source whose least probability is $p$ is at most $K$, and no better bound...
Recursive functions and induction are closely related, however Recursive functions do not have to terminate, and a proof using induction does have to terminate, so the induction should include a demonstration of this.
I am new to C++, and upon running this code I am getting the following error, can someone please explain what's wrong with the code? [![code of class declaration and object instantiation][1]][1]Thank you. main.cpp:8:17: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] 8 | C...
warning: ISO C++ forbids converting a string constant to ‘char*’
|object-oriented|
null
{"Voters":[{"Id":-1,"DisplayName":"Community"}]}
null
As you probably know, raw strings (not to be confused with the `std::string` class) are stored by placing the characters in consecutive memory locations, followed by a null-byte terminator. Then to reference a string you simply use a pointer to the first character, hence its type is `char *`. String literals are sto...
null
A computer science lecturer said that one should use test as programs can't be proved to be bugless. Is this true? What does it mean to prove that program is bugless? Is there a proof that it is impossible to find such a proof? And is there a method to transform a program to a mathematical statement whose proof can or ...
What does it mean to prove that software is bugless?
|untagged|
Only trivial _programs_ can be proven to be without bugs and even then, only in theory, not in practice. The problem is that there are too many places for a program to go wrong, many of which aren't actually part of the program itself, but, instead, part of the system(s) on which the program runs. Since a program can r...
null
One can indeed prove algorithms and programs using techniques such as Hoare's logic. The basic idea is to establish properties linked to the current values of the variables, and check how they evolve throughout program execution. There are formal rules associated to all basic constructs of programming languages (assign...
One can indeed prove algorithms and programs using techniques such as Hoare's logic. The basic idea is to establish properties linked to the current values of the variables, and check how they evolve throughout program execution. There are formal rules associated to all basic constructs of programming languages (assign...
I know that Integer Linear Programming problems are [NP-hard][1], but it seems like only linear optimization problems are NP-hard. But it seems like this answer is only applicable to ***optimization*** problems. It seems like integer linear feasibility problems should be able to be solved in polynomial time. I ...
Are integer linear *feasibility* problems NP-hard?
|complexity-theory|time-complexity|discrete-mathematics|linear-programming|
I know that Integer Linear Programming problems are [NP-hard][1]. But it seems like this answer is only applicable to ***optimization*** problems. It seems like integer linear feasibility problems should be able to be solved in polynomial time. I was thinking that this would look something like this: 1. Solve ...
I know that Integer Linear Programming problems are [NP-hard][1]. But it seems like this answer is only applicable to Integer Linear ***optimization*** problems. It seems like integer linear ***feasibility*** problems should be able to be solved in polynomial time. I was thinking that this would look something ...
One can indeed prove algorithms and programs using techniques such as Hoare's logic. The basic idea is to establish properties linked to the current values of the variables, and check how they evolve throughout program execution. There are formal rules associated to all basic constructs of programming languages (assign...
null
{"Voters":[{"Id":755,"DisplayName":"D.W."}],"SiteSpecificCloseReasonIds":[4]}
There seems to be some confusion here. Proof by induction is a valid way to prove facts about recursive structures. I don't know what you mean by recursion, and the writing in your question doesn't make sense to me. A recursive function is not a proof. Defining a property $P(x)$ or a function is not a proof. I s...
null
Yes, you can define a programming language that is Turing-complete even though there is no way for any program to halt. Consider a variant of a standard programming language, with the restriction that every valid program has to be wrapped in an outermost "while True {...}" loop. Assuming this language has the abili...
Here are some predicates/proofs in [Agda](https://wiki.portal.chalmers.se/agda/pmwiki.php), a programming language/proof assistant where induction and recursion are essentially the same thing. I can define a type of binary trees like so: ```agda data Tree : Set where leaf : Tree node : Tree -> Tree -> Tree `...
Feasibility of integer linear programming (ILP) is also NP-hard. (Why? See https://cs.stackexchange.com/a/29916/755, https://cs.stackexchange.com/q/19378/755, which reduces the SAT problem to feasibility of ILP. Or, alternatively, note that if you could test feasibility of ILP in polynomial time, then you could so...
According to [this paper][1], >it is shown that if $p$ is the range $0<p\leq 1/2$, and if $K$ is the unique index such that $1/F_{K+3}< p \leq 1/F_{K+2}$, where $F_K$ denotes the $K$-th Fibonacci number, then the longest Huffman codeword for a source whose least probability is $p$ is at most $K$, and no better bound...
According to [this paper][1], >it is shown that if $p$ is the range $0<p\leq 1/2$, and if $K$ is the unique index such that $1/F_{K+3}< p \leq 1/F_{K+2}$, where $F_K$ denotes the $K$-th Fibonacci number, then the longest Huffman codeword for a source whose least probability is $p$ is at most $K$, and no better bound...
{"Voters":[{"Id":156238,"DisplayName":"138 Aspen"}]}
null
Quantum mechanical principles have already been used to attack computer science problems in the form of quantum computing. In a similar vein, is there any usage of general relativity principles to generate algorithms in favor of computer-scientific problems? One (fairly trivial) example would be solving the shortest pa...
Is there any formalism based on general relativity for computation?
|algorithms|reference-request|
null
Quantum mechanical principles have already been used to attack computer science problems in the form of quantum computing. In a similar vein, is there any usage of general relativity principles to generate algorithms in favor of computer-scientific problems? One (fairly trivial) example would be solving the shortest pa...
null
https://cs.stackexchange.com/questions/42008/weighted-interval-scheduling-with-m-machines/42028#42028?newreg=a435c3fa0d834f06b3920f2fec96186a ('Weighted interval scheduling with m-machines') I encountered the problem of weighted interval scheduling on m identical machines (as discussed in the link above). My greed...
Weighted interval scheduling with m-machines ---greedy solution with approximation factor
|approximation|scheduling|
Let $∑$ be an alphabet. Is the set of all DFAs over $∑$ countable? I know the set of all regular languages is countable, however, it is impossible to build an injection from the DFAs to the regular languages since a regular language isn't necessarily accepted by only a single DFA.
Let $∑$ be an alphabet. Is the set of all DFAs over $∑$ countable?
|regular-languages|automata|finite-automata|
Unfortunately, the approximation guarantee of the algorithm is unbounded. For example, Consider a single machine and only two intervals: interval $I_1$ with profit $1$ and length $1$; and interval $I_2$ with profit $w \gg 1$, and length $w+1$. Suppose the two intervals overlap. Then, the greedy algorithm gives a sol...
{"Voters":[{"Id":107966,"DisplayName":"Inuyasha Yagami"}],"DeleteType":1}
{"Voters":[{"Id":107966,"DisplayName":"Inuyasha Yagami"}]}
null
Is there any computation formalism based on general relativity?
The time complexity of the matrix product is $O(n^3)$ if calculated normally for each element. If computed on GPU, is it O(1)?
Time complexity of GPU computing
|complexity-theory|time-complexity|complexity-classes|
null
I am searching for a CS equivalent to American Math Monthly. It should contain articles on topics and some problems at the end for submission. I need some recommendations . Thanks in advance.
Articles and journals for undergrad students
|combinatorics|
null
Consider the following "game". > There is an ant on a strip of length N. The ant can perform the following actions: move left, move right, and paint the cell he is on with white or black. The ant is also given a target coloring and must paint the strip according to such coloring in the most efficient way possible. The...
Game of permutations as a minimization problem
|complexity-theory|permutations|game-theory|
null
null
Weisstein, Eric W. "[One-Way Function][1]." From MathWorld--A Wolfram Web Resource.: >The existence of one-way functions is not proven. Why not? [1]: https://mathworld.wolfram.com/One-WayFunction.html
Why is the existence of one-way functions not proven?
|one-way-functions|
null
>_it looks like it proves that every CSP problem is either in P or in NP-complete, <s>**but not in between**</s>_ "But not in between" only if $P ≠ NP$.<br>If $P = NP$, there is no "in between". See: - Marek, V. Wiktor. [*Introduction to Mathematics of Satisfiability*][1]. Boca Raton; London; New-York: CRC Pr...
I'm interested in getting a precise estimate of the computational complexity of an algorithm I wrote involving permutations. Permutations are represented in my code as arrays of the integers $1$ through $n$ for some $n$, which can vary, and at least in the output (but perhaps not in the intermediate stages) the $n$th e...
Computational complexity of an algorithm involving permutations
|complexity-theory|runtime-analysis|permutations|
The reason quantum computing is useful is not (just) that the problems in QM are applicable to problems that'd we'd like to solve in computing generally, but because we can *physically realize* setups that model these problems in a way such that the (quantum) dynamics of the physical system solves our problem for us. I...
null
null
null
|reference-request|
null
I am developing a computer vision system, using the [pinhole camera model](https://en.m.wikipedia.org/wiki/Pinhole_camera_model). Is this an appropriate model to use for a real camera? I know that lenses and such will distort the image, my main questions are: for a cheap webcam (which I plan to use), what are the disto...
Is the pinhole camera model appropriate for modelling a real camera?
|computer-vision|modelling|
Suppose we are given $n$ bits $a_0,\dots, a_{n-1}$. Then let $s=\sum\limits_{i=0}^{n-1}$ Then $BCOUNT(a_0,\dots,a_{n-1})=s$ and $UCOUNT(a_0,\dots,a_{n-1})=1^s0^{n-s}$ Now i have to show that $UCOUNT\leq_{cd} BCOUNT$ i.e. $UCOUNT$ is constant depth circuit reducible to $BCOUNT$. I have to create a constant depth circuit...
$UCOUNT\leq_{cd} BCOUNT$
|complexity-theory|reductions|circuits|
I'm interested in getting a precise estimate of the computational complexity of an algorithm I wrote involving permutations. Permutations are represented in my code as arrays of the integers $1$ through $n$ for some $n$, which can vary, and at least in the output (but perhaps not in the intermediate stages) the $n$th e...
null
null
null