instruction stringlengths 35 29.1k |
|---|
Given
$$
a_1 X_1 + \dots + a_n X_n = b
$$
where $a_i, b \in \Bbb{Z}$. How do you come up with a clearer picture of the solution set in polynomial time.
Also, what I really want is to do the above, but under the minimization of:
$$
X_1 + \dots + X_n, \ X_i \in \Bbb{N}
$$
All my $X_i$ are bounded with small sets such a... |
I had a question regarding a specific proof I found online that I had some concerns with, I have quoted it below.
Show that the language L = {a^i b^j c^k: i < j < k} is not a context-free
language.
Solution: If L were context free, then the pumping lemma should hold.
Let z = a^n b^{n+1} c^{n+2}. Given this strin... |
I'm struggling to understand what exactly T(n), and f(n) is in the above text:
When we compute the time complexity T(n) of an algorithm we rarely get
an exact result, just an estimate. That’s fine, in computer science we
are typically only interested in how fast T(n) is growing as a
function of the input size n.... |
Is there any description logic where important decision problems (e.g. abox consistency or concept satisfiability) lie within NP with respect to their time complexity?
The well-researched family of $\mathcal{ALC}$-based logics might not work since even for $\mathcal{ALC}$, problems are PSpace-complete. Neither would th... |
Given the following grammar:
S -> A a
A -> B D
B -> b
B -> ε
D -> d
D -> ε
first would be:
B: {b,ε}
D: {d,ε}
A: {b,ε,d}
S: {b,ε,d,a}
and follow would be:
S: {$}
A: {a}
B: {d,a}
D: {a}
The LL(1) parse table should be easy to build. According to LL(1) parsing table construction I can simply follow this algorithm:
for... |
I'm trying to derive an algorithm that would generate a set of divergence-free vectors, which shall be used as basis vectors later on. Using a simple example, a 2D second-order divergence-free basis would look like this:
$$
\begin{bmatrix}
1 \\
0
\end{bmatrix},
\begin{bmatrix}
0 \\
1
\end{bmatrix},
\begin{bmatrix}
x \... |
I have this code for a recursive bubble sort:
def bubble_sort_recursive(list_):
global counter
for i in range(len(list_)):
counter += 1
try:
if list_[i + 1] < list_[i]:
list_[i], list_[i + 1] = list_[i + 1], list_[i]
bubble_sort_recursive(list_)
... |
It is well known that to compute equivalence of two Datalog programs (or equivalently of two first order formulas with the least fixed point operator) wrt all possible inputs and universes, is undecidable. If we fix the universe size to be N, it is clearly decidable in time exponential wrt N. My question is whether one... |
in the past few days I've been working on a diff algorithm for a UI library I'm working on.
My use case only target lists with unique elements.
The main goal is to find the minimum amount of operations needed to transform list A into list B.
Here you can find the current version of the algo:
https://github.com/cruijs/c... |
In Lambda Calculus, natural numbers, boolean values, list processing functions, recursion, if function are defined in terms of lambda terms. For example, natural numbers are defined as Church numerals, and recursion is defined in terms of a fixed point of a function.
Functional languages are said to be based on Lambda ... |
I'm struggling on this one. I have a Binary Decision Diagram, which is pretty much tree-like. Each node has a hi and lo node. I need to recurse into the tree, and if some conditions are the case replace the node with a new node. Nodes are immutable. So when I encounter something I have to change, I have to return the n... |
I am an electrical engineer without experience in graph theory. However, I have a problem which I believe can be solved by graph theory. We have a directed tree, such as the one below. We want to find all the vertices and edges starting from a vertex in a given direction. For instance, in the figure below, we want to i... |
I am studying the quantum computing algorithm presented in the paper Quantum algorithm for linear systems of equations}.
Without going through all the details, the HHL algorithm is able to apply an inverted matrix to a normalized vector prepared in a quantum state in time complexity $\tilde{O}(\log(N)s^2\kappa^2/\epsil... |
One of the paper titled "Rules of Thumb in Data Engineering" (Jim Gray et. el.) mentions some calculations based on Amdahl's balanced system law.
Link to paper: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/ms_tr_99_100_rules_of_thumb_in_data_engineering.pdf
Initially, the paper provides some rul... |
Given a recurrence of the form $\forall n,m.\ \ T(n,m)=\begin{cases}1,&,m=1\\\sum_i{T(n_i,m_i)}&,\text{else}\end{cases}$
Note: both $n_i$ and $m_i$ are dependent on $n,m$ so they should have been written above as $n_{i,n,m}$ and $m_{i,n,m}$, but they are written above as $n_i$ and $m_i$ in a way of abbreviation for mor... |
State true or false
$x=\Theta(n^4)$, $y=\Theta(n^2)$ therefore $x/y=\Theta(n^2)$
I think the ans is true,but in the book it says false. What is the explanation?
My reason for thinking it to be true is that say for x we have a polynomial $n^4$+...... and for y we have a polynomial like $n^2$+... so if we divide x/y the ... |
Each layout consists of 1000 turbines or more and is ranked based on power produced.
The way my algorithm works is:-
>>Initial parents created(2 layouts)
>>Crossover and Mutation of Initial Parents and population is created
>>Calculation of power produced by each layout
>>Sorting of layouts using power values
>>Top 2 l... |
I should prepare some paper for a colloquium (kinda student-task) and it should cover the following points:
(1) at least one notable discovery in theoretical informatics (or computer science)
(2) at least one open problems in theoretical informatics
(3) an example of short notable proof of some result in theoretical in... |
I was reading about an uninstall tool that was especially useful for removing "aimed applications." When I tried to find out what that meant (beyond the obvious, "targeted at a specific group") I found it used quite a bit, but I have been unable to find an actual definition of the term. Since I'm asking here, I'm obv... |
I'm reading "The Elements of Computing Systems" (subtitled "Building a Modern Computer from First Principles - Nand to Tetris Companion) by Noam Nisan and Shimon Schocken.
Chapter 4 is about machine language, and more specifically the machine language used on their computer platform called Hack. Section 4.2.1 says this... |
You're hosting a 1 v 1 basketball league with a game schedule. At the end of the league you have each player report their supposed win-loss record (there are no ties), but you want to check whether the proposed standings were actually possible given the schedule.
For example: you have four players (Alice+Bob+Carol+Dave... |
Let $M$ be an arbitrary Turing machine and $w \in \{0, 1\}^{*}$ be a binary string.
The language $\text{HALT} = \{\langle M, w \rangle : M ~\text{halts on input} ~w \}$ is undecidable by the famous diagonalization proof.
But what happens when we either fix the Turing machine $M$ or the input $w$?
Formally, for a fixed ... |
I have this confusion regarding binary representation of decimal value 129 (or even 128). If 8 bits are used to represent numbers when doing the two's complement, then we know that '00000000' to '01111111' are used for 0 to 127 and leading 1 is used for negative numbers i.e. 1xxxxxxx where x is any combination of 0's a... |
I have a markov chain with $Q(u,v)$ as transition probability matrix and $\pi(u)$ as stationary distribution defined on state space $\Omega$. The dimension of matrix $Q$ is $nxn$ and vector $\pi$ is $1xn$.
I need to construct a vorticity matrix $\Gamma (u,v)$ of dimension $nxn$ which has below properties
$\Gamma$ is... |
For example;
Is {0,1,{a,b,c},d,e} a valid alphabet to form a language over and is it usable in any context?
|
Is address translation for all operands in single instruction done only once and then are all operands fetched continuously?
For example, consider any dummy instruction INSTR with two operatnds OP1 and OP2:
INSTR OP1, OP2
How does an operating system map logical addresses of these operands to their physical addresses?... |
I want to formally write the equivalence classes of the following language:
$$L_k = \{w \in \{0,1\}^*\mid\text{ the } k\text{-th bit of }w\text{ from the right is } 1\}$$
I understand the definition of equivalence classes, yet struggle to come up with a clear intuitive answer.
The language is regular, therefore i'd exp... |
Suppose you are given an ancestry matrix $M$ which means that $M[ij] = 1$ iff node $i$ is an ancestor of node $j$. If $M$ represents no cycles (treated as an adjacency matrix) the corresponding graph is a tree (or a forest). My question is what is the number of trees where their ancestry matrix is $M$.
Is this questio... |
I need a calculator that accepts inputs using product notation, can compute the following, and can return the result in scientific notation:
$$\dfrac{\prod_{i=1}^{3.1536\times10^{16}}(52!-i)}{52!^{3.1536\times10^{16}}}$$
I have tried wolframalpha.com, desmos.com, and Excel. None of them can do the calculation. Is there... |
How can i prove that any tree contains a matching of size |InternalNodes|/2?
Thanks in advance
|
We have a matrix of 0 and 1. We want to cover all the 1's. We can cover a row or a column with a plate. We want to use the minimum number of plates.
Example:
\begin{bmatrix}
0 & 0 & 1 & 0 \\
0 & 1 & 0 & 1 \\
0 & 0 & 1 & 0 \\
0 & 0 & 1 & 0
\end{bmatrix}
Cover 3rd column and 2nd row. So two plates.
|
We have often heard both terms image processing and computer vision in AI sessions
But i am confused, how they both are related to artificial intelligence?
|
Why is the complexity class IP important?
What additional insights does this class give us that we could not get from NP or RP?
|
I would like to learn more about concatenative programming through the creation of a small simple language, based on the stack and following the concatenative paradigm.
Unfortunately, I haven't found many resources concerning concatenative languages and their implementation, so excuse me in advance for my possible naiv... |
How can i show/explain/prove that Max-Cut is in NP?
"For a graph, a maximum cut is a cut whose size is at least the size of any other cut. The problem of finding a maximum cut in a graph is known as the Max-Cut Problem."
Thanks!
|
I am looking for a heuristic for a graph matching problem as follows.
Given two graphs: $A$ (consisting of nodes $a_i$) and $B$ (consisting of nodes $b_i$). Typically the size of $B$ is larger than that of $A$.
Each node and edge in two graphs has weight. The task is to match graph $A$ to graph $B$, i.e., find a set of... |
I stumbled upon this problem whilst studying the complexity of a simple algorithm. I used set-theoretic notation, but all the $S_i$'s are lists (I couldn't think of a better way to write the problem precisely). The "hint" is more of a conjecture which I can't prove than a hint.
Let $S_0 = \{s^0_1, ..., s^0_n\}$ be a li... |
In "Computational Complexity: A modern approach", Arora and Barak proof the following Claim:
Define a single-tape Turing machine to be a TM that has only one read-write tape, that is used a input, work, and output tape. For every $f: \{0,1\}^* \rightarrow \{0,1\}$ and time-constructible $T: \mathbb{N} \rightarrow \ma... |
I have a $12 \times 12$ (so not really large) system of linear equations in $\mathbb{F}_2$ which I got to RREF through the usual row reduction. Suppose the system has multiple solutions, and call the unknowns $x_i$. What is the least expensive way to find a solution that minimizes the amount of $x_i$'s such that $x_i =... |
I am trying to test Chinese character production by having users draw the characters on their device. There are plenty of data models that include the character information already, so I will have that. My question is, how do I check if the user drew the stroke that is expected (with some sort of threshold value). Some... |
Given a language $L$, I am finding a method to evaluate the advantage of an automaton to decide $L$.
My goal is to decide a language $L$ (and maybe it is not decidable for automata). If one constructs an automaton $A_{1}$ whose laguage is $L_{1}$, I want to know the advantage of $A_{1}$ for decisidng $L$. If there is a... |
Is there an efficient algorithm to divide a 2D space, which contains several different sized rectangles, such that each partition has only a single object. Please see the attached image.
I have come up with a recursive algorithm that cycles through the 2 axis and divide the boxes until there is only one object in a bo... |
By definition, any language (decision problem) $L$ is defined as a subset of $\{0,1\}^*$, where $\{0,1\}$ is the alphabet.
$L^c$ is said to be the complement of the language, and it seems to be defined as follows - $\forall w, w\in L \implies w \notin L^c$ and $w \notin L \implies w \in L^c$.
Equivalently, according to... |
I have a set of objects, and each object has (let's say) a color. Given a distribution such as:
red : 50%
green : 30%
blue : 20%
I need to produce an N-length array of objects with a color distribution as close to this as possible. It is possible that the length of the original
list is smaller than N, so duplicates ma... |
The classic set-cover problem is described as follows:
Let $S = \{s_1, ..., s_n\}$ be a target set, and let $\Lambda = \{A_1,
..., A_m: A_i \subset S\}$ be a collection of subsets of $S$. The
objective is to find some cover $C \subset \Lambda $ such that
$\cup_{A\in C}A = S$ and $|C|$ is minimized. That is, find... |
I have to find a Context-Free grammar that generates the language:
$L_1 = \{x\#y\ |\ y$ is a subsequence of $x^R$, and $x\in\{a,b\}^*\}$, $\Sigma=\{a,b,\#\}$
The concatenation of two mutually reversed strings are pretty simple, but I just can't figure out how to express "plugging in random terminals in $x$" so that $x... |
I have found what I believe is a proof of related to an open problem in computer science. I've written it up in LaTeX, and I am looking for a way to get it evaluated. I know that cs.se/cstheory.se are not the appropriate forums to post this proof; what is the appropriate place to share my proof?
|
I had a question in a test, which asked me the following question:
Selection sort runs faster than Insertion sort for an array in reverse order.
Now, according to my knowledge, both of them have a time complexity of $O(n^2)$ in case of this particular input arrangement, so comparing the running time of them is not po... |
In Cook's famous paper on $\mathsf{NC}$, he cites the following result:
PROPOSITION 4.7 (Cook and Ruzzo, 1983). $\mathsf{AC}^k$ consists of those
problems solvable by uniform unbounded fan-in circuit families in $O(\log^k n)$ depth and $n^{O(1)}$ size.
where $\mathsf{AC}^k$ here is defined for $k \ge 1$ as the clas... |
Suppose i have been given a number 54432 .How to count all numbers less than 54432 and having last two digits as 1 ? i.e all the numbers of form xxx11 and xxx11 < 54432 .Here x can be any digits but xxx11 < 54432 should hold.
What is count of all the numbers of form x11xx and x11xx < 54432 ?
How to solve this in gener... |
$N$ points are located in 2D plane. Some of the pair of the points are connected by line segments. What is the complexity of the problem of existence of Hamiltonian non intersecting path? What if we consider it in special cases of graphs.
|
According to this link:
Polynomial Time Approximation Scheme (PTAS) is a type of approximate
algorithms that provide user to control over accuracy which is a
desirable feature. These algorithms take an additional parameter ε > 0
and provide a solution that is (1 + ε) approximate for minimization
and (1 – ε) fo... |
Martin Hofmann states in Extensional Concepts in Intensional Type Theory (§1.1 p.3) that:
It is important that definition equality is pervasive so if M and N are definitionally equal then P(M) is definitionally equal to P(N) whatever P is. In particular the proposition stating that M is propositionally equal to N is d... |
Given a Collection of Turing Machines $T_1, T_2, T_3,...T_n$ where $T_1$ denotes that the Turing machine can only take in an input of size 1. Is there any difference in computational power to a family of Circuits $C_1, C_2, C_3,...C_n$ ?
What if we assumed that each Turing machine, encoded special information for that ... |
What publication first introduced the concept of a non-deterministic Turing machine?
Turing did not define the concept in his 1936 paper.
|
This question is related to this question.
In SLAM-type applications the feature detectors like SIFT are used for finding keypoints in the images to be matched. The candidate keypoints are matched by aligning warped patches around these points (as far as I can understand).
What is the role of the descriptor vector in ... |
I am wondering if I can rearrange an array faster when I would like to delete more than one object.
You are given a List:
1
2
2
3
4
5
7
And now you want to delete every "2" in the list. So what I would do, is:
int size = 7;
int array[size] = {1,2,2,3,4,5,7};
for(int i = size-1; i >= 0; i--){
if(array[i] == 2){
... |
Could someone explain time complexity of solution of in this tutorial?
I'm having hard time figuring out, how asymptotic bounds for first solution is $O(3^k k)$.
What I figured so far is, for computing $f(Y)$, we would require $O(\lvert Y\rvert)$ steps and for fixed set $X$ (such that $\lvert X\rvert=k$), we would have... |
I am fairly new at program synthesis and the use of SMT solvers for this purpose. Given a function g, I want to generate all the functions f and h such that the following holds:
f . g = h . f
Are there program synthesis tools and techniques that would allow me to search the program space for these functions?
I am as... |
The definitions of ALLTM and INF are as follows:
$$\mathrm{ALLTM} = \{ \langle M \rangle \mid \text{ TM $M$ such that $L(M) = \Sigma^*$} \}. $$
$$\mathrm{INF} = \{ \langle M \rangle \mid \text{TM $M$ such that $L(M)$ is infinite} \}. $$
In one of the proofs of undecidability of INF, they reduce $A_{TM}$ to INF a... |
The Dirac's theorem states that:
"For a Graph G with N vertices, if the degree of each vertex is atleast N/2 then, the Graph has a Hamilton Circuit."
Can the same be said if a graph has a Hamilton Circuit then the degree of each vertex is atleast N/2 ?
|
There are $N$ points inside a polygon. If two points are connected by an edge (a line segment) if the edge is completely inside the polygon. We could conclude finding a Hamiltonian path is NPC, but what about non-intersecting Hamiltonian path?
|
I have a problem that I think can be casted in the following way.
Suppose I have a simple closed polygon $\mathcal{P}$ and $n$ squares (bounding boxes) $\mathcal{B}_1, \ldots, \mathcal{B}_n$, you can think of these bounding boxes as robot who can move in the interior of the polygon. Each box $\mathcal{B}_i$ lies inside... |
I wanted know if there is a formal definition of iteration. In the sense that, this definition will say that after the 4th iteration is termination or the 5th iteration and not the 2nd iteration. Basically a rigorous definition of iteration.
|
I was reading about Dijkstra's algorithm from this Stanford University lecture presentation. On page 18 it says Dijkstra's algorithm is $O(|V|\log|V|+|E|\log|V|)$ and I understand why. But then it says that $O(|V|\log|V|+|E|\log|V|) = O(|E|\log|V|)$, because $|V|=O(|E|)$. What does $|V|=O(|E|)$ mean and why is it so?
|
Blum's Speedup Theorem famously shows that there are problems which admit no fastest algorithm. This raises an obvious question: are there any problems that do admit a fastest algorithm? In other words, does there exist a language $L$ which is decided by some algorithm within $f(n)$ steps so that any other algorithm wh... |
The following theorem from Michael Sipser's book "Introduction to the Theory of Computation" states:
$A_{\textrm{LBA}}= \{ \langle M, w \rangle \mid \text{$M$ is an LBA that accepts string $w$} \}$.
THEOREM: $A_{\mathrm{LBA}}$ is decidable.
On the proof part, it states:
The idea for detecting when $M$ is looping is ... |
It's often stated (e.g., in Wikipedia) that the running time of breadth-first search (BFS) on a graph $G=(V,E)$ is $O(|V|+|E|)$. However, any connected graph has $|V|\leq |E|+1$ and, even in a non-connected graph, BFS will never look at a vertex outside the component that contains the start vertex. That component con... |
So as the title poorly implies, I'm looking for an algorithm that can accomplish the following task (as an example):
Given the inputs A(1:100), B(1:100), C(1:100), that can take on any value between 1 to 100.
Given the outputs X, Y, Z, which are determined by a combination of the inputs eg:
A=2, B=3,C=4, returns X=76,... |
Similar to this question, but I wanted to be more specific to my real-world situation.
I am a college software engineer currently working on a project that involves a large number of read cycles. Essentially, I have a bunch of text files of various sizes (i.e. ranging from 10 KB to 1 GB) that get read each time the cod... |
Martin Hofmann states in Extensional Concepts in Intensional Type Theory (§1.1 p.[4-5]) that:
A similar situation occurs in extensional Martin-Lof type theory where propositional and definitional equality are forcefully identified by the equality reflection rule $\frac{\Gamma \vdash P:Id_\sigma(M,N)}{\Gamma \vdash M=N... |
In my high school class, we are currently looking at evaluating heuristic methods for intractable problems - especially TSP.
My question is what is the advantages or disadvantages of using a constructive heuristic (like Nearest-Neighbour) compared to local search (something like 2-opt from some research?)
Thank you
|
You have a list of jobs.
Each job has a deadline and an associated profit if completed before the deadline.
Also, each job takes 1 unit of time to complete, and only one job can be completed at any given time (ie single thread)
You are required to choose which jobs to complete such that profits are maximised.
This is... |
According to Arden's rule, the language equation $X= AX\cup B$, with unknown $X$, has the solution $X=A^*B$, provided $A$ does not contain the empty string.
My question: what is the problem with the empty string here? Can you illustrate this with a concrete example (which lacks in Wikipedia on this topic).
|
I understand the basic operation of the algorithms however i'm unclear as to when to use one over the other and what advantages/disadvantages they offer over each other.
Also as an aside, if anyone knows any good resources that go over the topic of optimization in detail (especially gradient free optimization) that I ... |
There's an array which changes with every iteration, i.e., an element is added or deleted in every iteration. I have to save the "state" of the array for every iteration, which would later be retrieved upon querying.
For ex -
Initially, the array is [7, 8, 9]. This is version 1.
Next, 90 was added. Version 2 is [7, 8,... |
Consider such an oracle:
Given a turing machine[1], return the halting state it falls on, or arbitary result(but don't stuck in) if the TM doesn't halt.
How strong is a TM with the oracle?
Can the oracle exist(or does the question always have an answer) if change [1] into a TM with the oracle?
Some results I get:
... |
Let L={F| F is a finite language over Σ}
which of the following operation is not closed for L?
a. intersection
b. union
c. complement
d. none of the above
I thought the ans as d as all finite languages are regular and since regular languages are closed under all hence d seemed apt to me. But ans given is C
which is c... |
Speed up of execution of a program is to be calculated within a multi-threading rather than a single thread system. The program's 30% instruction can be executed serially & rest can be executed concurrently.The processor has 4 cores.
|
The Bellman-Ford algorithm "can detect and report the negative cycle", but does it guarantee to find them or it may find some?
The algorithm really focuses on the shortest paths, so I'm unclear if it will find any negative cycle or if it might miss it.
Thanks!
EDIT:
I'm only interested in knowing if there is a negative... |
I have a directed acyclic graph $G=(V,E)$ where each vertex $v$ is associated with a weight $w_v$ such that $$w_v=1+\sum\limits_{(v,v')\in E} w_{v'}$$ and $w_v=1$ in case $v$ is a leaf.
I am trying to construct $G$ and the weights or at least the weights. The information that is available to the system can be anythin... |
In the paper I'm reading, there is a hardness of approximation result for an algorithm proved using a reduction to set cover. Roughly, the claim states that if there existed an algorithm that solved this problem considered in the paper with an approximation ratio less than or equal to $(1 - \alpha)( 1 + \log x)$ for an... |
I've learned this a few years ago that this is impossible unless one simply 'executes' (in a modern computing sense) the input with the language rules, but I have some problems in just using this statement.
The fundamental doubt is that the statement itself is well-stated. If I'm using the term 'execution' to describe... |
Let $G=(V,E)$ be a simple graph with weights $w_{ij}$ (can be assumed to be positive). Is it possible to find the minimum (or maximum) weight, rooted spanning tree that is binary? That means every node has a degree at most 3, which would correspond to a parent and two children?
|
In the chapter 4 of Pierce's TAPL which discusses the implementation of untyped arithmetic expressions, the author said
The most important [for the implementation requirements] are automatic storage management... and... pattern matching over structured data types.
Indeed, which the recursive type is natural in ML, i... |
I'm trying to get my head around the difference between message passing (with which we are all familiar as by far the most common form of object orientation today) vs generic functions as implemented in CLOS (Common Lisp Object System).
In what sense is it possible to say java has a kind of multiple-dispatch system due... |
How is it possible to calculate $2^{5000}$ mod 10 without using a calculator in a fast way?
The result with calculator was 6.
|
This question appeared in an undergrad data structures final. The details are sound.
I need help to design a data structure for a directed graph with the following properties:
Initialization should be done in O(1) time.
AddVertex(id1,id2,...idK) - Add a new vertex to the graph. The new vertex is added with id=N+1 wher... |
I have been trying to implementing heap data structures for use in my research work. As part of that, I am trying to implement increase-key operations for min-heaps. I know that min-heaps generally support decrease-key. I was able to write the increase-key operation for a binary min-heap, wherein, I exchange increased ... |
Evolutionary algorithms like genetic algorithms (GAs) are typically run multiple times and the outputted results are averaged across successive runs.
However, in the case of long-runtime algorithms (e.g., due to large population sizes or algorithm complexity), is there any justification for running GAs (and the like) ... |
The below program will read a positive integer from keyboard and print the binary equivalent. This program is using only one variable.
If global variables are not stored in frame stack, how this is working.
#include<stdio.h>
int n;
void binary(n)
{
if(n>0)
{
binary(n/2);
printf("%d",n%2);
}
... |
This is true because every language in $NP$ is decidable and therefore HALTS but how do I formally show this?
|
I am confused about Turing Machines that are able to decide languages that contain infinite words.
Are languages with an infinite amount of only finite strings always decidable?
How can a Turing Machine halt on an infinite input string?
Can Turing Machines loop on finite strings?
What is the difference between an i... |
I'm confused on the definition of undecidable languages.
Definition: For an undecidable language, there is no Turing Machine which accepts the language and makes a decision for every input string w.
Can you say a language that isn't recognizable as undecidable?
If given a language like
$L = \{\langle M \rangle \mid M... |
Thomas Streicher states in Investigations into Intensional Type Theory(§Introduction p.5) that:
Although in Intensional constructive set theory (Intensional Type Theory) one can do most of the things one wants to do... certain theorems simply do not hold due to the lack of extensionality. A typical example is that fro... |
The existence of relativized relations between complexity classes seems to often be treated as "circumstantial" evidence about the "true" or "real-world" (i.e. nonrelativized) relation between the classes. (For example, this lecture describes one particular oracle separation as "formal evidence" that the complexity cla... |
I need some help understanding how to calculate the lower bound on the time complexity of merging $m$ sorted arrays of length $n$.
The bound should be $nm \lg(m)$. I need to prove this using a decision tree.
I tried counting the number of possible permutations (which would be the number of leaves in the tree) but
I go... |
The Scheme Programming Language says
It turns out that any program that uses call/cc can be rewritten in CPS without call/cc, but a total rewrite of the program (sometimes including even system-defined primitives) might be necessary.
What are the general techniques to
convert a program using call/cc to a program usi... |
Take a Vanilla RNN represented by the function $h_t = f(h_{t-1}, x_t)$, how do you determine $h_0$?
Edit: This answer over on the stats page has helped.
|
This is a (hopefully) sharper version of a question that I asked previously.
Which of these algorithms is believed to have a longer asymptotic runtime?
The optimal algorithm guaranteed to solve some NP-complete problem using a standard Turing machine.
The optimal algorithm guaranteed to solve the problem described by ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.