instruction stringlengths 35 29.1k |
|---|
I have an array of $N^2$ numbers like $ a = \{ a_1,a_2, ..., a_{N^2} \}$ where all $a_i < F$ where $F$ is a fixed number.
I am looking for all permutations where if I put values in $A$ in order (i.e. fill the matrix row by row) in a $N \times N$ matrix $A_{N \times N}$ where sum of all columns and all rows are equal t... |
Consider a Gödelian numbering of partial recursive functions. Consider the set of indexes corresponding to some function $\phi$. It may be seen that this set is not recursively enumerable. Does this set contain a recursively enumerable non-recursive subset?
|
How can I find all feasible solutions to a 0-1 integer program that I have based on a knapsack-style problem?
I have $n$ items and $m$ knapsacks. Each knapsack has a space limitation and each item occupies some space. I need to find all feasible combinations of items which can fit in the knapsacks.
The brute force appr... |
In the Wikipedia page for Turing's Halting problem, they mention that you can prove Gödel's First Incompleteness theorem from it. This is the relevant quote:
Assume that we have a sound (and hence consistent) and complete
axiomatization of all true first-order logic statements about natural
numbers. Then we can bu... |
I'm curious about the way text recognition works in machine learning(or more generally, the question of object vs not object) in computer vision.
How are systems trained when the not-object data set is so much greater in quantity and apparently lacks structure?
One approach is having the algorithm first searches for a... |
In object oriented programming heaps are used for to store the actual objects. Stacks are used for storing reference-variables to the objects.
What's the concrete reasons for choosing those two specific data-structures?
What benefit has a heap in the described scenario? What benefit provides a stack?
|
In TAPL book, page 453, Pierce discusses the following lemma:
$\Gamma , x:S , \Delta \vdash t:T \land \Gamma \vdash s:S \implies \Gamma, \Delta \vdash [x \mapsto s]t:T$
He claims that when $t$ is a variable, we need to use the permutation lemma:
$\Gamma \vdash t:T \implies \Delta \vdash t:T$ where $\Delta$ is a perm... |
I have an interval graph $G=(V,E)$ and a set of colors $C=\{c_1,c_2,...,c_m\}$, when a color $c_i$ is assigned to a vertex $v_j$, we have a score $u_{ij}\geq 0$. The objective is to find a coloring of $G$ with at most $m$ colors that maximizes the total score (sum of the scores of the vertices).
Do you know about any r... |
You have a large list (say N > 10000) of test scores which you would like to sort. The test scores are between 1 and 100. What is quickest way to sort the list?
First thought. We have a O(N log N) bound, but we also have additional information about the quantities in the array, so I think we could do better.
Second tho... |
In describing where a system vulnerability exists, I often find a need for a model that partitions a operating system and its components into abstraction layers. Similar to how the Open Systems Interconnection Network Stack Model (OSI Stack) does for computer networks and communications.
Does something like this alrea... |
Let $A$ be a an $n\times m$ real valued matrix. The problem is to find the minimal subset $I$ of rows (if there is any) such that the sum of each column $j$ over the corresponding rows exceeds some threshold $t_j$, i.e. $\sum_{i\in I}A[i,j]>t_j$ for all $j\in\{1,\dots m\}$.
Or, stated as optimization problem:
Let $A\in... |
I'm trying to solve the following question :
Given a flow network $N = (G=(V,E),c,s,t)$. Let $\mathcal F$ be the set of all minimum cuts. Prove that $\mathcal F$ is closed under intersections and unions, i.e. for every $ S_1,S_2\in\mathcal F , S_1 \cup S_2 \in \mathcal F$ and $ S_1 \cap S_2 \in \mathcal F $.
that p... |
We have An array of $3n$ elements. we want to Find $x$ and $y$ for array of $3n$ numbers such that 1/3 are less than $x$. 1/3 between $x$ and $y$ and 1/3 greater than $y$. We can solve this problem of $M(n)$ space and $T(n)$ time complexity. We want to find $M(n)$ and $T(n)$ as functions of $n$.
Note that $x$ and $y$ a... |
Recently, I came across a question about finding sum of all values in range $[low, high]$ in BST $T$.
Then I formulated following algorithm to carry out that task:
We do inorder traversal of BST ($sum = 0$ in start)
But whenever we encounter any node having value strictly less than $low$ than we don't visit it's left... |
Consider $L = \{ \langle M,n \rangle : M $ accpets $\epsilon $ in less than $T(n)$ steps$\}$
This language is decidable because a decider can simulate $M$ on $\epsilon$ and accept if it accepts and reject if it rejects or passed more than $T(n)$ steps.
The decider above will run in $O(T(n)log(T(n)))$ time correspondin... |
I have this algorithm ("cyclic sort") to sort an array which contains unique numbers from 1 to $n$:
Input: A[1], ..., A[n]
i ← 1
while i ⩽ n:
j ← A[i]
if A[i] ≠ A[j]:
swap A[i] and A[j]
else:
i ← i + 1
end if
end while
How can I prove that in worst case, the running time of this algorithm is still asym... |
In page 455, of Pierce´s TAPL and page 560, the single-step diamond property of reduction:
$S \Rrightarrow S' \land T \Rrightarrow T' \implies \exists V. T \Rrightarrow V \land U \Rrightarrow V$
is proved. The argument goes by induction on the total sizes of the given derivations, with a case analysis on the final ru... |
If $CIRCUITSAT$ in $n$ variables and $m$ gates has an $O((nm)^c)$ algorithm for a fixed $c>0$ then $NTIME(n)\subseteq DTIME(O(f(n)))$ for large enough $f(n)$. What is the smallest $f(n)$ in $NTIME(n)\subseteq DTIME(O(f(n)))$?
|
In lemma 30.3.9, Pierce states a confluence property for $F_{\omega}$:
$S \to_* T \land S \to_* U \implies \exists V. T \to_* V \land U \to_* V$
He then states the following proposition:
$S \leftrightarrow_* T \implies \exists U. S \to_* U \land T \to_* U$
However, he doesn´t use the above property to prove it. I r... |
Pierce's TAPL book gives in exercise 30.3.17 the setting where $T_1 \to T_2 \equiv T_2 \to T_1$ (the function type are assumed to be equivalent). In the solutions, he claims that this assumption breaks the progress property.
It is easy to see that preservation fails. How can progress:
$\vdash t:T \implies t \text{ is ... |
I got an exercise in my college in which ive been asked to write a Non deterministic Turing Machine that accepts words of this form:
Ive manage to find some sort of solution but in a Deterministic way
Can anyone help me please?
|
I need an algorithm that computes the number of paths between two nodes in a DAG (Directed acyclic graph) I need a dynamic porgramming solution if possible.
|
I am trying to get help on it here, originally posted first at:
https://stackoverflow.com/questions/59446920/find-sub-matrix-containing-the-maximum-number-of-elements-consisting-only-of-1s
Basically trying to get the max sub matrix that contains only 1's of a matrix that is filled with 0's and 1's.
I could figure out t... |
Given an undirected weighted graph, where each vertex has one of two colors - red or blue. I have to answer queries to find the shortest path between a given red vertex and any blue vertex in the graph. I have tried using Dijkstra algorithm with source the given red vertex, then finding the shortest path among all shor... |
Say we Have n distinct numbers
x1,x2,....xn
And we xor the result
xoredResult = x1^x2...^xn
And if we AND(&) with one of the number say x2
We get Zero
xoredResult & x2 = 0
Can we always claim that if the ANDed result is zero that the number is repeated ?
Can this be used to find the first repeated element in a strea... |
The following question is taken from Leetcode entitled 'Combination Sum'
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.
The same repeated number may be chosen from candidates unlimit... |
I am trying to figure out the $time$ $complexity$ to find out the number of ways we can parenthesize $N$ $matrices$. I have approached this problem as, say if we have $N+1$ matrices then we can parenthesize them in $\dfrac{2N \choose N}{N+1}$ ways
For example, see the below image, here we have 3 matrices which we can ... |
Problem: Given a DFA $D$, find all possible lengths of strings accepted by the $D$.
It makes sense that these lengths can be represented as $a_i+kb_i$. What might be the algorithm to find all such pairs $(a_i, b_i)$?
|
Suppose I give you $n$ axis-aligned rectangles with a specified width, height, and x-position (of the left edge) $\{(w_i, h_i, x_i) \mid i \in \{0, \ldots, n - 1\}\}$, as well as a bound $(y_\mathrm{min}, y_\mathrm{max})$ on the valid y-positions. These rectangles must have integer-valued coordinates for their vertices... |
Show if L is in NP, then also L1 is in NP
$$L_1 = \{w\#0^n|w \text{ is a suffix of some $x$ in $L$ with } |x|=n\}$$
I know that if L is in NP, then there exists a NTM $M_L$ than accepts $x$, with $|x|=n$. I can use $M_L$ to describe an NTM $N$ for $L_1$. I have a problem by understanding which is the best non-det... |
In the book
Introduction to Algorithms (3th edition) chapter 7
the recurrence of the running time of quicksorts partitioning is given by $$T(n) = T(n-1) + \Theta(n)$$
as the worst-case happens when the partitioning has one subproblem with $n-1$ elements and one with $0$ elements.
Now, they they guess $T(n)=\Theta(n^2... |
I know that a language is in NP if a Turing machine can decide the language of its checking relation $\{\text{boolean formula }\#\text{ truth assignment | truth assignment is correct}\}$ in polynomial time.
Here is my confusion. All Turing machine have a finite input alphabet $\Sigma$. Thus, none of them can solve any ... |
I was reading about Constant Folding and it sounds very similar to Memoization so I suspect that it indeed is a type of memoization but I've done some searching and can't find a solid answer (in academic papers, etc.) on that.
Is Constant Folding a type of memoization?
|
Distributed Systems 5ed by Coulouris says on p68
2.4.2 Failure Models
Omission Failures ...
Arbitrary Failures
The term arbitrary or Byzantine failure is used to describe the worst
possible failure semantics, in which any type of error may occur. For example, a process
may set wrong values in its data items, o... |
Distributed Systems 5ed by Coulouris says on p21-22
1.5.5 Failure handling
Detecting failures: Some failures can be detected. For example, checksums can be used to detect corrupted data in a message or a
file. Chapter 2 explains that it is difficult or even impossible to
detect some other failures, such as a rem... |
I have $n$ clients and for each client I have different options to choose from, for example, $C= \{C_1,C_2 \}$. For each combination of $n$ options, there is a cost. I want to choose the best combination that minimizes the cost without calculating the cost for each option one by one and then choose the best one and I d... |
Say I wanted to prove that two programs were equivalent (either rigorously if possible, or informally if not). More specifically, say I have something relatively complex such as an HTTP server implemented in C, and one implemented in Node.js/JavaScript. What can I do in terms of saying "these two are effectively the sa... |
Is there an efficient algorithm for enumerating binary $n\times n$ matrices which are such that each row has 1's and each column also has 1's?
Related - https://math.stackexchange.com/questions/3484685/counting-matrices
|
So if $k = 3$ and $n = 2$ and we select the element $a_1[3]$ of the first array then we have to select $a_2[1]$ from the second array. If we select the element $a_1[2]$ then also $a_2[2]$ must be selected etc.
I can think of a DP algorithm to solve that which takes $O(nk)$ time (I don't think that I need to describe it... |
Let say A and B are two decesion problems where A $\le$ B polinomial reduction is true.
Is this : A̅ $\le$ B̅ also true?
If so, can you show an exemple, if not why?
|
I'm trying to use Grammatical Evolution for creating trading strategies. Each sentence in the grammar when evaluated gives a weight matrix of size n x p . (n is the length of backtesting period and p is the total number of stocks in portfolio)
BNF form of Grammar
<expr> ::= (<foptr>(<expr>,<expr>,<day>))|
(<f... |
I am considering what the possibilities are with declarative programming. I have a firm understanding of how to use declarative programming in practice, but, short of having examples, I don't know if it's possible to 100% use declarative programming all the way down to the machine code (theoretically).
Standard QA site... |
How can I list all feasible solutions to an integer program? Is there an algorithm whose running time is reasonably related to the total number of such solutions?
|
In my continuing effort to finally wrap my brain around advanced FP/categorical concepts, I've been reading dozens of articles and tutorials; what I have concluded is that:
1) Category Theory and Software Engineering use the same words in different ways; or, I think, Software Engineering uses category theory terms far ... |
I've played with 2-tag systems a bit and read all about tag/lag systems. They're great for experimenting with computation, and obviously useful as intermediaries in various proofs.
My question is: does anyone understand how to actually program in them? I mean, Turing Machines, if I sit down and work through it, I can e... |
please tell the time complexitiy of the following code
|
I have a programming assignment which I was told that is solvable with some DP algorithm. The question is a variant of LIS problem where at most $k$ exceptions (restarts) are allowed.
But I know that there is a better solution. My professor mentioned Lagrange Multipliers and giving a penalty for each restart. But after... |
I've read about some methods of prime factorization like here and here. However, I'm wondering: what can we do in prime factorization with just some bit manipulation and without other variables/constants?
In base 10, we can get some hints about the factors of an integer just be checking the digits:
digit's place is e... |
I am writing a picross solver, and I am going with the "human logic" solving, which attempts to reproduce the reasoning a human might have when confronted to such a puzzle, in an iterative manner.
Having solved a lot of those by hand, I found the human logic to be very algorithmic-ish given how the same kind of reasoni... |
Can someone explain the mathematical intuition behind the forget layer of an LSTM?
So as far as I understand it, the cell state is essentially long term memory embedding (correct me if I'm wrong), but I'm also assuming it's a matrix. Then the forget vector is calculated by concatenating the previous hidden state and th... |
Last year I looked heavily into Formal Verification, such as automated theorem proving, model checking, type systems, symbolic evaluation, and many others. I probably spent a few weeks or maybe months looking into it. At the time, I felt like I had a decent grasp of how it could be applied, yet still couldn't put my fi... |
Consider a game where two players remove sticks from a heap. The players move alternately, and the player who removes the last stick wins the game.
A set P = {p1,p2,…,pk} determines the allowed moves. For example, if P = {1,3,4}, a player may remove 1, 3 or 4 sticks.
Your task is find out for each number of sticks 1 , ... |
I am reading operating system, and after reading some topics (Processes, Main Memory management) I got somewhat confused. I have knowledge about certain things but I am not able to combine and visualize them. Let's take an example - I have a simple programme as follow:
#include<bits/stdc++.h>
using namespace std;
int... |
I recently learned some graph theory in Discrete Structures for Computer Science, we learned about the Four Color theorem, I realize there is a mathematical proof for this topic, but how was it initially proved using computation 50 years ago?
|
I came across following problem:
True or false?
If $L$ is a regular and $M$ is not a regular language then $L.M$ is necessarily not regular.
The answer given was:
Consider $L$ to be $\emptyset$ and $M$ be $\{a^nb^n | n\leq 0\}$
$L.M=\emptyset$, which is regular. Hence the statement is false.
I guess the solution ... |
I found a solution in Python for this problem, but do not understand it. The problem is how many ways an integer n can be written as the sum of at least two positive integers. For example, take n = 5. The number 5 can be written as
4 + 1
3 + 2
3 + 1 + 1
2 + 2 + 1
2 + 1 + 1 + 1
1 + 1 + 1 + 1 + 1
Here's a solution for ... |
Basically i have a program which increases a variable by 1 in each iteration and resets it to 0 as soon as y becomes 8 (i.e. mod 8).
It is a quite simple example but it still bugs me out because i cannot clarify if my LTL-formula is correct for the property "there is a value of y whose next value is 8". For this i came... |
I came across following:
Every regular language has right linear grammar and this is LL(1). Thus, LL(1) grammar generates all regular languages.
I tried to get that.
Definition: Right linear grammar (RLG)
In right linear grammar, all productions are of one of the following forms: $A\rightarrow t^*V$ or $A\rightarro... |
This is from betting domain which has something that is called a long list: a list of a "home team win/draw/away team win" markets for 13 games.
A punter can select any combination of the possible outcomes which are encoded in a following way:
1 - home team wins
2 - draw
4 - away team wins
3 - home team wins or draw
5... |
Note
The wording of the title may be a bit vague, but I'm not asking if CFLs are closed under reversal. Please see below.
Problem Description
Given a word $w$, define $w^{r}$ to be its reversal.
Let $L=\{ G \vert G \text{ is a } CFG \text{ and for every } w \in L(G), w^{r} \in L(G) \}$
Prove that $L$ is undecidable.
My... |
There are t1, t2, t3,.....,tn topics which are to be scheduled in a building with c1,c2,c3,....ck halls. Members have already registered there interests on the topics, and they have liberty to choose any number of topics. There will be only one session on a given day per hall.
The problem is to finish the seminar in mi... |
I was reading and learning about SIMD and AVX2 vector instruction, as I was trying to implement them for better performance.
While reading about vector instruction, I encountered the term deep pipeline. Now I understand what pipelining is from computer organization and design patterson & hennessy and Computer Architect... |
With restriction to $\frac{k}{2^n}$ as line segment ends, does arithmetic coding degrade to Huffman coding? As far as I can tell, each symbol will be encoded with an integer amount of bits, which is the same as Huffman coding. However, I'm not sure how to prove that arithmetic coding with this restriction is optimal fo... |
The short question is: is a promise just a way to separate the code into different sections, so that when task 1 is done, do this task 2, 3, and 4. And when task 2 is done, do task 5, and so on? These tasks typically can take a long time, such as a fraction to a second to a few seconds, to even minutes or it may even f... |
I came up with this O(V+E) algorithm for calculating the chromatic number X(g) of a graph g represented by an adjacency list:
Initialize an array of integers "colors" with V elements being 1
Using two for loops go through each vertex and their adjacent nodes and for each of the adjacent node g[i][j] where j is adjacen... |
How would this work and be implemented?
If you have directed edges pointing away from the source to a bunch of other verticies, and directed edges pointing from those vertices to a sink, but have those vertices in the middle linked by undirected edges, how would flow work and be maximized?
|
Could you, please, suggest a maximum flow algorithm for a graph with floating-point weights and the number of edges approximately equal to the number of vertices? I.e. O(V^3) algorithms take too much time, but O(E^2) algorithms are much more preferable. More specifically, you can assume V~=1M and E~=10M where M stand... |
Assume that a language A is reducible to language B. The claim is true?
if A is decidable then B is decidable too.
The correct answer is:
This claim is wrong. If A is e.g. the empty language (which is clearly decidable) and B is $A_{TM}$, then surely ∅ is reducible to $A_{TM}$, but $A_{TM}$ is undecidable. The claim i... |
I'm refering to this paper here "Fully Device-Independent Quantum Key Distribution" (Umesh Vazirani and Thomas Vidick) and unfortunately there are many things I don't understand.
1) Page 3: by the word round, what do the authors actually mean? Is it right to say it's basically how many times Alice and Bob use their own... |
I need to show false the following claim
Every language L which is a subset of $A_{TM}$ ($L \subseteq A_{TM}$) is undecidable.
For this, I wish to use the empty language L = ∅ (I know is decidable).
Is it correct that the empty language L = ∅ is a subset of every languages (and also of $A_{TM}$)?
|
Consider an undirected network consisting of a single cycle with 6 nodes according to the below image with a given starting node.
Is there a way to get an expression for the number of paths one may take to pass each edge exactly n times?
|
Assume a complete graph G={V,E} that has n vertices and $C_{n}^{2}$ edges, and the weights of E are all positive. I am trying to find a complete subgraph containing k vertices, and it has the maximum sum of edge weights among all the complete subgraph with k vertices. My question is, other than the brutal force method ... |
Can any one help me find a reference about how to describe the connectivity between the nodes (H relays) and users in combination network ? I mean how exactly I can draw the connection for any number of H nodes and any number of users and connectivity degree r?
Note: for combination network with connectivity degree r ... |
Given the recursively defined function $c$:
$$c(m,n)=\begin{cases}0&\text{for }m=0\\
n^2+n+1&\text{for }m = 1\text{ and }n\ge 0\\
c(m-1, 1)&\text{for }m>1\text{ and }n=0\\
c(m-1,c(m,n-1))&\text{for }m>1\text{ and }n>0\\
\end{cases}$$
and the function $d$:
$$d(n) = \underbrace{2^{2^{.^{.^{.^{.^{2}}}}}}}_{\text{$n+2$ }}... |
Though unintuitive, can a 2-way set associative mapping have only one set. For e.g., Cache size 8 bytes, block size 4 bytes and main memory size as 16 bytes. Here the number of cache lines are 2 and given 2 way set associative the set count is only 1. Can I map the 4 blocks (0,1,2 and 3) in the main memory to a 2-way s... |
I'm interested in gathering some references that discuss the topic of the relationship between computation and physics.
Specifically, I'm interested in investigating two points of view:
our current model of computation -- assuming it describes reality accurately -- impose a limit on what is physically possible. To me ... |
Is $a^mb^n$ where $m=n^2$ a CFL?
I have a doubt regrading this problem. Say if we pop $n$ number of $a's$ from the stack for each $b$ then it is a CFL (to be exact DCFL) right?
On the other hand I have this doubt, do we know the number of $b's$ we are provided with, if not how can we pop $n$ number of $a's$ for each $... |
I have a problem with creating an algorithm to predict a winner of thirty-one game.
Players from a deck of cards, take the Ace, 2, 3, 4, 5, and 6 of each suit. These 24 cards are laid out face up on a table. The players alternate turning over cards and the sum of the turned over cards is computed as play progresses. Ea... |
I understand that after deletion you have to retrace to update ancestors and after insertion you do the similar however at most one rotation will be performed.
The question is why is there the difference in number of potential rotations for these two operations.
To me it seems like these operations should be the revers... |
TRUE or FALSE Statement:
Assume that $P \neq NP$. Then, for all languages $L_1$ and $L_2$, if $L_1$ is in P and $L_2$ is in NP but not in P then $L_1 \cup L_2$ is in NP but not in P.
I have a doubt about the point: $L_1 \cup L_2$ is in NP but not in P.
I know P is a subset of NP, then $L_1 \cup L_2$ is in NP (beca... |
I'm writing my Bsc thesis about type systems of various languages and I want to have a short section about assembly languages. Initially I thought I'll bring up assembly as a counter example to languages with advanced type systems. My goal was to explore the reasons why assembly omits most (all?) type system features b... |
There is a long row of cells. Each cell contains 0 or 1. A machine is positioned immediately to the right of a series of uninterrupted 1’s followed by an uninterrupted series of 0’s. In the following graphic the machine is denoted by a yellow line. It is immediately to the right of a series of three 1’s followed by man... |
Given permutations $g_1,\,\ldots, g_m \in S_n$ of size $n$ and target permutation $g \in S_n$, decide if there exists a subset of $\{g_1,\, \ldots, g_m\}$, which composition in some order (or, alternatively, as a variant of this problem, in the same order) is equal to $g$, i.e. $g_{i_1} \circ g_{i_2} \circ \cdots \circ... |
How can I prove that the number of leaves in a balanced BST is $\Omega (N)$ where $N$ is the number of nodes in the tree?
I tried somehow to prove that an AVL/Fibonacci tree should have $\Omega (N)$ leaves by the Fibonacci sequence and didn't know how to continue!
Could somebody help?
|
I have read the book "Computer Graphics with Open GL" (Hearn, Fourth Edition) recently. However, when I read the midpoint ellipse algorithm, the following example in the book is confusing me:
For region 2, the initial point is $(x_0,y_0) = (7,3)$ and the initial decision parameter is $$p2_0 = f_{\text{ellipse}}\Big(7 ... |
In their book, Ullman et al says:
Every nonempty CFL without $\epsilon$ has a grammar $G$ in which all productions are in one of two simple forms, either:
$A\rightarrow BC$, where $A,B$ and $C$, are each variables, or
$A\rightarrow a$, where $A$ is a variable and $a$ is a terminal
Further $G$ has no useless symbols.... |
On page 195 of Pierce's TAPL book, he states that one can replace a down-cast operator by some sort of dynamic type test. Then he gives the following rules:
T-Typetest:
$\dfrac{\Gamma \vdash t_1:S \;\; \Gamma,x:T \vdash t_2:U \;\; \Gamma \vdash t_3:U}{\Gamma \vdash \text{if } t_1 \text{ in } T \text{ then } x \to t_2 \... |
Let $G=(V,E)$ be a directed graph, $ω:E→\mathbb{R}$ a weight function, and $s,t\in V$ a pair of different nodes. It's given that $G$ doesn't have a negative cycle. Each edge has the color R or G or B. Find the shortest path under the condition:
we can use green edge after using at least one red edge
we can use blue ... |
In S/Kademlia two crypto puzzles is used, one static and dynamic. The static is used to generate a key pair that makes an eclipse attack difficult to achieve, the dynamic to make Sybil attacks harder.
In the dynamic, I am very confused about the x which is found, since I can’t find any evidence for this ever being us... |
Suppose we are given a directed graph $G = (V, E)$ with edge weights $w : E \rightarrow \mathbb{R}$ (we can assume there are no negative cycles) and edge labels $\ell : E \rightarrow \Sigma$ from some alphabet $\Sigma$. We are also given a description of an NFA $M$ (or DFA, or regular expression) accepting some regular... |
I have an exercise that tells me that, given a problem P (of which now I omit the description) there is no integrality gap between LP and ILP formulation of this problem, and for every fractional LP-solution, there exists an integral
feasible solution with the same cost. Then I have to design a poly-time algorithm that... |
I have an almost linear programme. However one of the constraints has a form $z = min(x,y)$ (all the other things are linear in the model). Is there a way to substitute this with something (or introduce additional variables) to turn this into a linear programme?
In other words, I have the problem that looks like the fo... |
Does there exist a (micro-)kernel of an operating system that is fully implemented in hardware? That is, a kernel that is not stored in RAM, and loaded into CPU registers after an interrupt or system call, but is instead a fully hardcoded part of the CPU itself, so that a system call/interrupt never leads to a context ... |
From theory I know the polynomial reduction is:
reflexive $A ≤ A$ (A Language)
transitive $A ≤ B$ and $ B ≤ C$, then $A ≤ C$ (A, B, and C Languages).
What about symmetric? There is an example with two language $L_1$ and $L_2$ to proof the polynomial reduction is not symmetric? i.e. $L_1 ≤ L_2$ but not $L_2 ≤ L_1$.
|
The list coloring problem is, given a set $L(v)$ colors for each vertex $v \in G$, is there a proper vertex coloring, $c$, of $G$, such that $c(v) \in L(v), \forall v$.
I was wondering, for complete graphs $K_n$, is list coloring NP-complete? Does this change if $\bigcup_{v \in K_n} L(v) = \{1,2\dots n\}$?
|
There are some arbitrary-chosen points in 1D space. What needs to be found is the approximate number of them without counting all of them. It is possible to choose some coordinates (numbers) and for each one there are two numbers returned - the distances to the closest points to the left and to the right.
I'm looking f... |
What is difference between following two problems, their decidability and recognizability status:
Given Turing Machine TM "accepts" given string w.
Given Turing Machine TM "halts on" given string w.
I feel first problem means,
whether given TM "halts by accepting" given string
and second problem means,
whether giv... |
I have a 2D polygon defined by a list of $n$ points: $A$, $B$, $C$... These points are sorted in clockwise order. Example:
I would like to find the most performant algorithm to detect all points which are close together (distance < $x$).In the above example, it is $(H, I)$ and $(B, F)$. I could compare each points wit... |
On the wikipedia page on compilers, it says:
Semantic analysis adds semantic information to the parse tree and builds the symbol table. This phase performs semantic checks such as type checking (checking for type errors), or object binding (associating variable and function references with their definitions), or defi... |
I am taking my question here from there. Consider the following scenario:
You are given a fixed programming language with no nonlocal control flow constructs. In particular, the language does not have
Exceptions, first-class continuations, etc.
Assertions, in the sense of “runtime tests that crash the program if they... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.