instruction
stringlengths
0
29.8k
⌀
null
I'am trying to prove the following nonlinear integer programming problem NP hard. $$ \min \frac{\sum\limits_{i=1}^m(u_i-\bar u)^2}{m}\text{ , where }u=Q x,Q\in\mathbb{R}^{m\times n}\\ s.t. \begin{cases} Ax\leq b, \ A\in\mathbb{R}^{m\times n},b\in\mathbb{R}^m \\Cx=d, \ C\in \mathbb{R}^{m\times n},d\in\mathbb{...
Is the following nonlinear integer programming NP-Hard?
null
This problem is NP-hard. Well, to be precise, currently, it is not specified what happens when there is no $x$ that satisfies all constraints. Determining whether a valid solution for $x$ exists is NP-hard, as the integer linear program feasiblity is a special case of this problem. But I think you're more interested in...
One option is to use a normal EqualsK, as $$(t \lor \text{Equals}(A,x_1 \cdots x_n)) \land (\neg t \lor \text{Equals}(B,x_1 \cdots x_n))$$ where $t$ is a fresh variable. It is easy to convert this to CNF by distributing the $t \lor \cdots$ into the clauses of the EqualsK constraints. (Why does this work? If ...
I saw the book suggested [here][1]. Does Sipser's _Introduction to the Theory of Computation_ cover the Chomsky hierarchy? I ask since, looking through a pdf copy of the book, I found no matches with "Chomsky Hierarchy", but perhaps it is covered with a different name. [1]: https://cs.stackexchange.com/q...
Does Sipser's _Introduction to the Theory of Computation_ cover the Chomsky hierarchy?
|automata|reference-request|chomsky-hierarchy|reference-question|
I'am trying to prove the following binary quadratic integer programming problem NP hard. $$ \min \frac{\sum\limits_{i=1}^m(u_i-\bar u)^2}{m}\text{ , where }u=Q x,Q\in\mathbb{R}^{m\times n}\\ s.t. \begin{cases} Ax\leq b, \ A\in\mathbb{R}^{m\times n},b\in\mathbb{R}^m \\Cx=d, \ C\in \mathbb{R}^{m\times n},d\in\m...
Is the following binary quadratic integer programming NP-Hard?
|computability|np-complete|np-hard|quadratic-programming|
I want to give another concrete example. The set of encodings of always halting Turing machines $R$ is countable (since there are only countably many Turing machines, halting or non-halting). But $R$ itself is not computably enumerable. Assume $R$ were computably enumerable. Then given index $i$ we can find the enc...
I want to give another concrete example. The set of encodings of always halting Turing machines $R$ is countable (since there are only countably many Turing machines, halting or non-halting). But $R$ itself is not computably enumerable. Assume $R$ were computably enumerable. Then given index $i$ we can find the enc...
This problem is NP-hard. Well, to be precise, currently, it is not specified what happens when there is no $x$ that satisfies all constraints. Determining whether a valid solution for $x$ exists is NP-hard, as the integer linear program feasiblity is a special case of this problem. But I think you're more interested in...
This problem is NP-hard. Well, to be precise, currently, it is not specified what happens when there is no $x$ that satisfies all constraints. Determining whether a valid solution for $x$ exists is NP-hard, as the integer linear program feasiblity is a special case of this problem. But I think you're more interested in...
Often in testing, if we have a function, for example: ``` def add_one(x): return x + 1 ``` we'd want to prevent regressions by saving a set of input/output pairs and asserting the output remains the same for the given input (e.g. `[(1, 2), (100,101), (1000,1001)]`). Is there a term to describe testing f...
Is there a term to describe saving the input and output of a function for regression testing?
|testing|
No, Sipser's textbook does not cover Chomsky hierarchy, a containment hierarchy of different classes of formal grammars. In fact, the book does not mention any formal grammar other than context-free grammar. That textbook does cover many [related concepts](https://en.wikipedia.org/wiki/Chomsky_hierarchy#The_hierarch...
No, Sipser's textbook does not cover Chomsky hierarchy, a containment hierarchy of different classes of formal grammars. Nor does it cover that hierarchy with a different name. <!-- Let us exclude the bibliography attached to the book. --> In fact, the book does not mention any formal grammar other than context-free gr...
null
What is a good book for learning computability theory that covers the Chomsky hierarchy?
Book recommendation: computability theory and Chomsky hierarchy
|reference-request|chomsky-hierarchy|
> Is there a term to describe saving the input and output of a function for regression testing? Good question! This is usually considered *part* of regression testing, and not given a separate name. That is, regression testing is performed by (1) picking an input, (2) running the program to capture the output behavi...
I am trying to study one research paper about VQ-VAE Here is the linkof the research paper: https://papers.nips.cc/paper_files/paper/2017/file/7a98af17e63a0ac09ce2e96d03992fbc-Paper.pdf I have difficulty to understand the value of embedding vectors e<sub>j</sub> in this part(page 3 from the research paper) [!...
embedding space value
|machine-learning|encoding-scheme|research|
Let $A = \{a_1, \ldots, a_n\}$ be a set of numbers and $w$ be some number. Define $p_w^{A}: \mathbb{R} \rightarrow \mathbb{N}$ as $$p_w^{A}(r) = |\{i \in \{1, \ldots, n\} | r \leq a_i \leq r + w\}|.$$ Note that $p_w^{A}(\mathbb{R})$, the image of the whole $\mathbb{R}$ under $p_w^A$, is finite. Define $MRT_w(A) = \max ...
I'm working with *CARDIAC* (Cardboard Illustrative Aid to Computation) that is a model created at Bell Labs in 1968 to explain students how the computers worked with the Von Neumann architecture to *create a new model for pedagogical purpose*. But, I couldn't find an extension to parallel and concurrent computation, be...
Does exist another models like CARDIAC, LMC and IPC?
|computer-architecture|programming-languages|pedagogy|
I have rectilinear polygons present, and they are surrounded by grids(grey rectangle with dots denoting center) as shown in the diagram below. [![enter image description here][1]][1] The grids are perfectly stacked horizontally and vertically. I have with me the coordinates of the edges (x,y) and the centre poin...
Finding pixel closest (grid points) to rectilinear polygons
|algorithms|computational-geometry|nearest-neighbour|polygons|
We understand the exponential function to constantly grow, which we consider bad for a problem. By constantly growing I mean the ratio $\frac{f(n+1)}{f(n)}$ never tends to 1, where $f(n)$ is the exponential function. However, when this ratio tends to 1, we can roughly say that as problem size increases by a small ...
null
Consider a data structure (call it $D$), which can store pairs of $(key, value)$ (where $key$ and $value$ are some numbers) and has the following interface: 1. Put $(key, value)$ pair to a data structure (if such key is already in a data structure then ignore this operation). We will refer to this operation as $D.p...
Consider a data structure (call it $D$), which can store pairs of $(key, value)$ (where $key$ and $value$ are some numbers) and has the following interface: 1. Put $(key, value)$ pair to a data structure (if such key is already in a data structure then ignore this operation). We will refer to this operation as $D.p...
For every input there exists a unit square with maximal number of points within such that there is a point on the bottom and on the left sides of the square (it can be the same point which coincides with bottom left corner of the square). So let's consider only squares with this property. We can sort all x-coordinat...
null
First, it's important to understand that Chomsky is a linguist (a syntactician) and that the goals of linguistics are very different from artificial intelligence. In particular, the two domains differ greatly as to what constitutes a satisfactory theory of human language. For the modern study of syntax, it is to have a...
Let $A$ be an array of real numbers with a unique maximum element, such that $size(A)=O(2^N)$. Assume that we have an oracle that can evaluate a sum over any subset of indices of $A$ in $O(1)$ time. Using this oracle, is it possible to find the index of the maximum of $A$ in $O(poly(N))$ time?
Finding maximum via sum oracle
|algorithms|complexity-theory|
null
{"Voters":[{"Id":32283,"DisplayName":"DartLenin"}],"DeleteType":1}
{"Voters":[{"Id":32283,"DisplayName":"DartLenin"}]}
axiomatic mathematical theories are just entirely different from pattern matching 'expert system' ones. The more patterns, potentially (but not necessarily) the less chance to consolidate and aggregate them into axioms.
I am trying to study one research paper about VQ-VAE Here is the details of the research paper: > Title : Neural Discrete Representation Learning > Authors: Aaron van den Oord, Oriol Vinyals, Koray Kavukcuoglu > Cite as: arXiv:1711.00937 Here is the link: https://papers.nips.cc/paper_files/paper/2017...
I am trying to study a research paper about VQ-VAE: [Neural Discrete Representation Learning](https://papers.nips.cc/paper_files/paper/2017/file/7a98af17e63a0ac09ce2e96d03992fbc-Paper.pdf), Aaron van den Oord, Oriol Vinyals, Koray Kavukcuoglu, NeurIPS 2017. I have difficulty to understand the value of embedding vect...
> Is there a term to describe saving the input and output of a function for regression testing? This is usually considered *part* of regression testing, and not given a separate name. That is, regression testing is performed by (1) picking an input, (2) running the program to capture the output behavior on that inpu...
Yes, the number of states in $A$ at level $n$ is $p$, even without the 3rd constraint. The following is a proof. ------ Assume $A$ is constructed as in [this answer](https://cs.stackexchange.com/posts/159843/edit). As observed in question, it is straightforward to verify that each $L_i$ is an equivalence clas...
Yes, the number of states in $A$ at level $n$ is $p$, even without the 3rd constraint. The following is a proof. ------ Assume $A$ is constructed as in [this answer](https://cs.stackexchange.com/a/159843/91753). As observed in question, it is straightforward to verify that each $L_i$ is an equivalence class o...
I am pretty new to ML and have a basic but fundamental question. Let’s imagine we want to create a simple Sentiment Analysis model using Machine Learning not Deep Learning algorithms, so we need to have a set of handcrafted features for this classification problem. Let's say we have 2 features (F1, F2) for each s...
How a Machine LEarning model predict this classification problem?
|machine-learning|artificial-intelligence|natural-language-processing|classification|features|
How can a Machine Learning model predict this classification problem?
If Large Language Models like ChatGPT grow, do also their problems grow?
Understanding reductions and notation
An optimization problem can be described by two functions $f$ and $g$, such that: * $f$ a predicate representing the constraints: $f(x,y)$ is True if the output $y$ is feasible for the input $x$; * $g$ is an integer-valued function representing the objective value: $g(x,y)$ is the value of the output $y$ for the in...
Is there a class for optimization problems with polynomial-time-computable bounds?
|complexity-theory|time-complexity|optimization|complexity-classes|
You rightly infer that the term *reduction* was chosen because it makes the problem easier; but not the problem you're thinking of. We're trying to determine the complexity of deciding the language A. There are two problems here: 1. the problem of deciding the language A 2. the problem of deciding the complexi...
You rightly infer that the term *reduction* was chosen because it makes the problem easier; but not the problem you're thinking of. We're trying to determine the complexity of deciding the language A. There are two problems here: 1. the problem of deciding the language A 2. the problem of deciding the complexi...
I have rectilinear polygons present, and they are surrounded by grids(grey rectangle with dots denoting center) as shown in the diagram below. There are some areas where grids are not present - like the big grey and red polygons. [![enter image description here][1]][1] The grids are perfectly stacked horizontally...
I have rectilinear polygons present, and they are surrounded by grids(grey rectangle with dots denoting center) as shown in the diagram below. There are some areas where grids are not present - like the big grey and red polygons. [![enter image description here][1]][1] The grids are perfectly stacked horizontally...
I have rectilinear polygons present, and they are surrounded by grids(grey rectangle with dots denoting center) as shown in the diagram below. There are some areas where grids are not present - like the big grey and red polygons. [![enter image description here][1]][1] The grids are perfectly stacked horizontally...
I have rectilinear polygons present, and they are surrounded by grids(grey rectangle with dots denoting center) as shown in the diagram below. There are some areas where grids are not present - like the big grey and red polygons. [![enter image description here][1]][1] The grids are perfectly stacked horizontally...
**Hints:** Scan every red polygon and determine the cells it overlaps. Some are wholly overlapped, some partially. For the partial overlaps, you need to record the intersections between the polygon and the cell. This can be done using the Sutherland-Hodgman clipping algorithm. For every cell, keep a list of the over...
Assume, that there is an algorithm with such an oracle, which can find a maximum in $O(poly(N))$ time. Consider a set of variables $X = \{x_1, \ldots, x_{2^N}\}$. Let $L_X$ be a linear space over $\mathbb{R}$ with basis $X$. We call an arbitrary element $p \in L_{X}^{*}$ of dual space an assignment of this variables. E...
Assume, that there is an algorithm with such an oracle, which can find a maximum in $O(poly(N))$ time. Consider a set of variables $X = \{x_1, \ldots, x_{2^N}\}$. Let $L_X$ be a linear space over $\mathbb{R}$ with basis $X$. We call an arbitrary element $p \in L_{X}^{*}$ of dual space an assignment of variables $X$. Ea...
{"Voters":[{"Id":119535,"DisplayName":"Vladislav Bezhentsev"}],"DeleteType":1}
{"Voters":[{"Id":119535,"DisplayName":"Vladislav Bezhentsev"}]}
I'm trying to convert a right regular grammar to an NFA. I understand that I need to create a state for every variable and add transitions according to the production rules. But what if there is a production rule where there is only a single variable on the right side and nothing else? Example: $A \rightarrow B$...
Right-regular grammar conversion to NFA: production rule with only one variable on right side
|formal-languages|finite-automata|formal-grammars|
null
Assume, that there is an algorithm with such an oracle, which can find a maximum in $O(poly(N))$ time. Consider a set of variables $X = \{x_1, \ldots, x_{2^N}\}$. Let $L_X$ be a linear space over $\mathbb{R}$ with basis $X$. We call an arbitrary element $p \in L_{X}^{*}$ of dual space an assignment of variables $X$. Ea...
Initialization of embedding space value for VQ-VAE
null
The short answer is that the "untyped lambda calculus" from 1932 is not the modern untyped lambda calculus. The modern one comes from a later (I think) realization that just the lambda/application part can be used as a computational system. The calculus from 1932 was developed to be a logical system. There are addit...
https://cs.stackexchange.com/questions/45469/consequence-of-mathsfnp-subseteq-bpp-to-mathsfnp-subseteq-zpp clarifies $NP\subseteq BPP\implies NP\subseteq RP$. What about for $PP$? Does $PP\subseteq BPP$ imply $PP\subseteq RP$ and $PP\subseteq ZPP$?
Does $PP\subseteq BPP$ imply $PP\subseteq RP$?
|complexity-theory|complexity-classes|
null
The short answer is that the "untyped lambda calculus" from 1932 is not the modern untyped lambda calculus. The modern one comes from a later (I think) realization that just the lambda/application part can be used as a computational system. The calculus from 1932 was developed to be a logical system. There are addit...
Let $G=(V,E)$ be an undirected complete graph, where $|V|=n,|E|=m$. Let $w:E\rightarrow \mathbb{R}^+$ be an injective weight function. Prove that for any MST, the $n-2$ most heaviest edges are not in the MST. I thought about proving by contradiction; assuming such MST can exist, and then replacing its heaviest edg...
Given a complete graph with injective weight function, the $n-2$ most heaviest edges are not in any MST
|graphs|minimum-spanning-tree|
The rate at which a neural network learns something depends on the loss and the backpropagation functions,neural network with different loss and backpropagation functions learn differently at a different rate.However this makes me wonder can we calculate in paper the amount of time or the rate of time at which a neural...
Calculation in paper of learning rate of neural network
|neural-networks|
Alas, no. Deep learning is a thoroughly empirical field. The main way to know how well something will work is to try it; or to learn from the experience of others who have tried something similar. In general, there aren't very good rules of thumb or theoretical laws to make predictions about nearly any aspect of neu...
Address sequencing is a process used to retrieve and analyze data from a computer's memory. It is an essential component of computer architecture and refers to the way in which computers locate and access data stored in memory.
Given two graphs $G$ and $F$ on same vertex set $V$. Compute a sub set $\tilde{V}\subset V$ which' sub graph of $G$ is of maximum density and does not have any pair that is connected in $F$. So, we could compute maximum independent sets of $F$ and compute for each its densest sub graph. This may not yield a desired...
Densest Sub Graph and forbidden Pairs
|combinatorics|subgraphs|independent-sets|
Given two graphs $G$ and $F$ on the same vertex set $V$. Compute a sub set $\tilde{V}\subset V$ which' sub graph of $G$ is of maximum density and does not have any pair that is connected in $F$. Formally, find $$ \tilde{V}\subset V:\vert \tilde{V}\vert = \max_{\tilde{V}\subset V}\Bigg\{\frac{\big\vert {E(G)}_{\v...