instruction
stringlengths
35
29.1k
If we choose a unit square in which the four points where the function $f$ is known are as shown in the diagram the interpolation formula for $f$ is: \begin{equation} \begin{split} f(x+u, y+v)\approx (1-u)(1-v)f(x,y)+u(1-v)f(x+\Delta x,y)\\ &\hspace{-7cm}+(1-u)vf(x,y+\Delta y)+uvf(x+\Delta x,y+\Delta y). \end{split} \e...
The extensional version of Intuitionistic Type Theory is usually formulated in a way that makes extensional concepts like functional extensionality derivable. In particular, equality reflection, together with $\xi$- and $\eta$-rules for $\Pi$ types are enough to get the standard formulation of $\textsf{funext}$ $\Pi_{x...
Ranked Biased Overlap (RBO) is a metric for comparing two rankings and is used when the sizes of the given rankings are different and/or the elements that they carry are not the same. Ranked Biased Distance (RBD = 1 - RBO) is the distance metric emanating from RBO. A simple demonstration of the metric can be found here...
I'm reading this paper: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.150.14 or http://www.jmlr.org/papers/volume10/kontorovich09a/kontorovich09a.pdf On page 1101 are introduced 2 functions without a precise definition. It is said that they are functions of the type $\textrm{f}:\mathbb{A} \rightarrow \math...
Let A = {2, 8, 11, 3, 12, 7, 10, 4, 15} Want to find $E_4$. Little unsure how to do this question. Would this be similar to finding the probability of the number of comparison 2/(j -i +1)?
(From CLRS -- 3-4,d) Let $f(n)$ and $g(n)$ be asymptotically positive functions. I tried to prove that $$f(n) = O(g(n)) \implies 2^{f(n)} = O\left(2^{g(n)}\right) .$$ I know that the above statement is false, so where have I gone wrong in my proof?: Suppose $f(n) = O(g(n)).$ Then there exist positive real numbers $c, ...
I've got a variant of bipartite graph matching and I can't find any literature about it. We have bipartite graph with real capacity edges from source to left vertices (the sum of which is 1), real capacity edges from right vertices to sink (also summing to 1), and unlimited capacity edges between left and right. What ...
I'm trying to write an algorithm to check if a given binary tree is a perfect binary tree, and of course with the lowest complexity. I was thinking to calculate the height of the tree $h$ and the number of the nodes $n$, then if $2^{h+1} -1 = n$, it's a perfect tree. But then again, it's not very efficient. The I thoug...
Let $A = \{ g(n) \mid \exists c,n_0 \, \forall n \ge n_0\colon g(n) \le cf(n) \}$, and $B = \{ g(n) \mid \exists c,n_0 \, \forall n \geq n_0 \colon g(n) < cf(n) \}$. Prove $A = B$. My solution: Let $f(n)$ and $g(n)$ be functions from $\mathbb{N}$ to $\mathbb{N}$. $g(n)\le cf(n)$ for all $n > n_0$. $g(n) = O(f(n))$ m...
I would like to solve a scheduling problem where, I am able to maximize the number of consecutive shifts a employee may have, therefore minimizing the likelihood of them not showing up for a single, short shift on an odd day. However, I want to preferentially give shifts to better performers - where 'performance' is an...
I have a simple program (assume a shop) that is actually just returning the $m$ most active customers from a total list of $n$ users (so $m \leq n$). I only use this program on one machine with one process, so assume no distribution of data to be necessary. I require a data structure storing $\mathrm{userId}$ and $\mat...
I have R={A,B,C,D,E} with functional dependencies ABCD → E and AC → ABCD,with Axiom of transitivity rule is AC → E a transitive dependency? Thanks before and sorry for this simple question
What is the input of a given hash? The problem can be verified in polynomial time (using a hash that executed in polynomial time), and I suspect that it may be possible to prove that there is no algorithm that can solve it in polynomial time. Take a binary string $X$ of length $n$. The number of possi...
Does there exist a more optimum algorithm to solve every problem than brute force (or an equivalent)? A brute force algorithm for the purpose of this question is defined as an algorithm of time complexity $N^*$, there $N^*$ is the cardinality of the set of all possible solutions.
According to the reference Time/Space Trade-Offs for Reversible Computation by Charles H. Bennett given by Peter Shor in https://cstheory.stackexchange.com/questions/18938/is-there-any-task-where-classical-computers-outperform-quantum-computers, Using a pebbling argument, this paper shows that, for any $\epsilon > ...
I would like to have a canonical representation of a map from rational intervals (f, t] with f, t ∈ ℚ to some irrelevant value type. These intervals are non-overlapping and there exist only finitely many such keys in the map. I would like to be able to implement the following functions on this representation: Lookup b...
Is the following true? Given a problem with a known algorithm of time complexity $g(n), \exists$ another algorithm to solve said problem with time complexity $f(n). \,\,\, f(n): g(n) = o(f(n)) $ If true, it implies that: For all problems, there are algorithms of arbitrarily high complexit...
What does quick/fast mean in the context of computer science? I couldn't find a definition online (poor google fu), and I want to provide a referenced/cited definition for fast for an article I'm writing.
DISCLAIMER : I'm pretty new to machine learning field, so forgive me if my questions are somehow naive ... I already searched on Internet about this topic and find nothing interesting so I am asking here .... I wonder if a ML algorithm can be consider as a way to store data ? There is programs that "contains" tho...
I have a weighted graph where each edge is a 1d vector eg if weight going from A to B is 1 then from B to A it is -1. In the graph each cycle should add to zero though sometimes the weights have errors and in that case a cycle will not add to zero. So for example if the weight from A to B is 1 and B to C is 1 then fo...
I have never seen my account not being able to login!
As a reduction from another problem, I am trying to deal with finding all edges which are part of some cycle in an undirected graph $G=(V,E)$ in time $O(|V|+|E|)$. My first idea is to use DFS and search for back edges closing cycles, but then the issue is how to add all edges found to the cycle, if we just naively add ...
I have an issue about proving the next problem: Let's define a BVL tree, which is a binary tree, who satisfied the feature that the difference between the heights of the children of a node, is at most 2. Meaning|height(node.left) - height(node.right)| <= 2 Prove that BVL tree is a balanced tree. Now I do know it's some...
We know the Halting Problem is in the 1st level of arithmetical hierarchy. We know that the Totality Problem is in the 2nd level of arithmetical hierarchy. What are some examples of problems in the 3rd (or higher) level of arithmetical hierarchy. +1 for problems which instances are solved in the practical world (progra...
A formal description of the problem: Given a set $P$ of $n^k$ points in $d$ dimensional space, what algorithm can I use to find a mapping between them and points on a $n \times n \times n...$ grid in $k$ dimensional space so that points that are close together in $P$ map to points that are likely to be close together o...
What are the rules of converting a weighted digraph to a weighted, undirected graph? I understand that the edges should go in both directions from vertex to vertex. However, do the weights of each edge to/from other edges need to be the same? If not, how does one decide which weight to attach to the undirected vertice...
I have the following problem and I wonder if there exist a solution (or some algorithm to approximate it, even if it's far from optimal, as long as it is tractable) to it. Say I have a set $V\subseteq I_1\times I_2 \times\dots\times I_n$, all discrete finite subset of, say, integers. Can I compress the representation o...
There are two ways to define a probabilistic Turing Machine: A Turing Machine that can toss coins during its computation. A deterministic Turing Machine that takes two inputs: $(x,r)$, where $x$ is the original input and $r$ is taken from a distribution of coin tosses. For example, Arora and Barak give an "alternativ...
I know the definitions and differences of big-theta, big-oh, and big-omega in finding time complexity of algorithms. what I can't understand is that why the big-oh of a linear function cannot be O(n). $0 \le an + b \le cn \Rightarrow c = a + \frac b {n_0}$ so we could find a value for constant $c$. as a result, the bi...
I was looking at the following algorithm which prints all the paths from node s to node t and I have some questions I don't understand The basic idea is : DFS-Visit(s) Change current status to "currently visiting" If neighbor is t -> print the path (from the stack trace or any way) If not: DFS-Visit on neighbors When ...
I don't understand the line in the paper "Mappings and Grammars on Trees" by William C. Rounds, the passage: Transformational theory, as developed by Chomsky [7] and many others, deals with the notion of phrase-structure grammar, and with certain mappings defined on derivation trees associated with the grammar. Deri...
The paper is "Mappings and Grammars on Trees" by William C. Rounds. There was a definition of ranked alphabet in page 3 and I can't understand the second part of the definition. Definition. A ranked alphabet is a pair $(\Sigma, r)$ where $\Sigma$ is finite, and $r: \Sigma \rightarrow \mathbb{N}$. We set $\Sigma_n = r^...
We've learned in class that CVAL is P-complete. CVAL is the language of all $\langle C,x\rangle$ where $C$ is a formula (a circuit which outputs $0$ or $1$) and $x$ is some input for $C$ such that $C(x) = 1$. We've done this in the same fashion Michael Sipser does in this paper (accessed Jul 11, 2017). The reduction i...
I was just going through some of the primality test algorithms. It seems that the regular one – loop up to square root of $n$ – has running time $O(n^{1/2})$. Is $O(n^{1/2})$ exponential? And is exponential time better than polynomial always?
I'm starting to learn about CNNs, and I have this question that I haven't been able to answer. Sorry if it is too basic. I know that in a CNN, the network learns to extract relevant features of images in order to classify them. My question is: if I just update the weights of the fully-connected layer and leave the kern...
I’ve always wondered how to make a best guess in the absence of any knowledge. Let’s say you have a computation running, and you don’t know when it will complete (just that it will). Can you make any estimate when it will be finished just based on the elapsed time without any further knowledge? For example after 10 min...
Suppose there is a language $L$ on alphabet $Σ$. Now consider the language $$ S(L) = \{x : wxy ∈ L, w, y ∈ Σ^*\} ∪ \{x : w ∈ L,\text{ and $x$ is a subsequence of $w$}\}. $$ How to prove that if $L$ is regular then $S(L)$ is also regular? For first part I think if there is a DFA that accepts $wxy$ then there is a DFA t...
Let Σ2 = {0, 1}, and define Σ = Σ23. Informally, Σ* is the set of triples of the form (a, b, c) where a, b, c are single binary digits. Consider a string s ∈ Σ* : it is a sequence of such triples. Have to “verify” binary addition of numbers in the first two coordinates by checking that it is equal to the third. Let A b...
I'm trying to build an agent-based model to study facebook usage. One important part is determining, at each step, whether a given user is online/active or not. I am looking for a distribution of time spent online by percentage of users. I read in [this study][1] that this distribution is exponential, which is expected...
This paper states that the general number field sieve is of order: $$L\approx\exp\left((64/9)^{1/3}\,n^{1/3}\,(\ln(n))^{2/3}\right)$$ However several sources (e.g. Wolfram) give it as: $$O\left( \exp\left((64/9)^{1/3}\,(\log n)^{1/3}\,(\log\log n)^{2/3}\right) \right)$$ To my knowledge L-notation and big O notation are...
So the question is; For the following three jobs: P1: 10 (3,2,5); P2: 4 (2,2); P3: 16 (2,3,5,6) Execute the three jobs using Exp Ave Alpha =0.6, default=2 I know the formula to get the exponential average for a process is Pn+1 = (alpha) * Tn + (1-alpha * Pn) I am basically confused at where to start. Obviously, the va...
Related to this, but I felt it was more appropriate to ask as a separate question: The complexity of Shor's algorithm is of order $$O\left(n^2\,\log(n)\,\log(\log(n))\right)$$ with $n$ the bit length of the number to be factored. This paper asserts that on a terahertz range quantum computer (i.e. $10^6$ instructions pe...
Background I am currently coding an AI in C++ to solve a game called Hunt the Wumpus. You can try the game out here. My implementation of the game is based on a Graph template which I use to model the caves and the AI's "memory". Rules The start position for the player, the Wumpus and the hazards (pits or bats) is...
How can I prove that the output sequence of Mealy Moore Machine is a Regular Language ? And what if transition outputs more than one character ? How can we prove for this case that the language in (1) and (2) are same ? Can I do something like this - The right side one is Mealy Machine. So can I prove like making a ...
In a population of $n$ people, each person knows $k$ other people and each person is known by the same $k$ people. However, no two people, p1 and p2, know the same two people p3 and p4. What is the minimum $n$ such that this is possible for a given $k$? Or, in other words, what's the minimum number of nodes that mus...
Given $G=(V,E)$ undirected, connected graph and weights given by $w:E \to \mathbb R$. We also know that $|E|=|V|+87$. Find Minimum spanning tree of $G$. Obviously we can use Prim in $O(|V| \cdot \log |V|)$. But can we do better by using the fact that the graph is connected, and use the sets sizes? Like removing the li...
I have $P$ different processes given along with their respective Burst time and arrival time. The time quantum is $1$ sec i.e. each process can only run for $1$ sec. There's a total time $F$ given for which computer will be available to perform these processes. Also for each process $P_i$ there exists a respective cost...
This was the initial CFG (starting symbol is I): I → aAB A → BAb | ε | B B → a | b | CD C → ba D → DD And this its CNF: X → a X'→ b I → XY Y → AB | a | b | X'X Y'→ BA | a | b | X'X A → Y'X' | a | b | X'X B → a | b | X'X Is it correct?
How 2D Cellular Automata rules sequences works? For example, in elementary cellular automata, when we look at the binary sequence of the rule number, we understand that first bit says if all neighbors are white, and the cell itself is white, the cell in next step is black or white ( depend on the value of the bit ). Bu...
I was told that the fastest possible algorithm for integer multiplication is $O\left(n{\log}(n)\right)$. Why would this so?   Can you please show why the fastest multiplication algorithm would have such a time complexity?
Forgive me if I'm asking something that should be obvious, my experience is with software development, not computer science. I've glanced at some articles on hyperthreading and parallel processing, but it seems like those implementations are primarily for consumer devices to persist multiple apps at the same time (lis...
I was studying Set Cover via the Primal–Dual Schema on my own that I faced a problem in the following paragraph: Consider an LP-relaxation for an NP-hard problem. In general, the relaxation will not have an optimal solution that is integral(why?? when we relax an LP we can choose the variables from the interval of [0,1...
In CLRS, one question defines $\Omega^\infty(g(n))$ such that: $$f(n) = \Omega^\infty (g(n)) \iff \exists c \in \mathbb{R}^+ : \text{for infinitely many integers } n, 0 \leq cg(n) \leq f(n) \ .$$ My question: What does it mean by "infinitely many integers"? Does it mean $\{n : n \in \mathbb{Z}\}$ or does it just mean s...
Given a sorted array of integers $x$ and a target value $t$, determine if there exists a pair $x_i, x_j \in x \wedge i \neq j$ such that $x_i + x_j = t$. What is the lower bound for this problem? I know for the generalized $k$-sum (unsorted) there is a lower bound of $\Omega(n^{\lceil \frac{k}{2}\rceil} )$. This wou...
Given two minimal deterministic finite automatons called A and B where A accepts the finite language L(A) and B accepts the finite language L(B) and the alphabet of both languages and automatons are Σ={0,1}. This implies that |Σ|=2. Because that both A and B are minimal, there is no possibility to remove any state and ...
Say I push the values 1,2,3,4 onto a stack. Then popping them, they will come back in the order 4,3,2,1. If I push the values 1,2,3,4 onto a queue then removing from a queue results in 1,2,3,4. However if I push them onto the queue in reverse order, 4,3,2,1, and then pop them from the queue they come out in the same or...
I have an objective function profit = income - expense . I want to solve it using genetic/evolutionary algorithm (strength pareto SPEA2). Since the algorithm is multi-objective so can I consider the income maximization as one objective and expense minimization as second objective?. I am using SPEA2 matlab code from YAR...
I have to read Logic in Computer Science: Modelling and Reasoning about Systems by M. Huth and M. Ryan for a class next semester. However Amazon reviews say it's hard to read unless you're an advanced student and I'm very new to computer science. Is there any other book I may read before I approach this one that would ...
I am aware of the complexity classes $P$, $NP$ and $L$. But I am not clear what $NL$ or Non-deterministic Log Space intuitively means. The part what I am unclear about is what is the meaning of Non-deterministic Space? A Turing machine in a $L$ case would read an input, read/write on the work tape that is logarithmic i...
i want to prove that the following Language isn't CF $L=\{a^kba^kba^k|k\in \mathbb{N}\}$ Let $z=a^nba^nba^n$ be a String from $L$ $n$ is the pumping length and $|z|=3n+2 > n$ and $z=uvwxy$ with $|vx|\geqslant 1$, $|vwx|\leqslant n$ but i'm not sure how to determine the correct substrings, how should i consider them ? ...
Given an array of length n filled with objects which contain 2 ints (size and reward). Now 2 players are taking turns, each player has an int value we call strength. Let's call them player A and player B, player A goes first. Player A can pick whichever object from the array he wants and decrease the size of the obje...
I have been reading about caching and buffering it seems about the same to me can't get hold of the differences clearly and paging, for now the only difference I understand between paging and caching is that, pages store locations of data that are frequently accessed and so CPU can use the address to locate the data, w...
Theory Basically, I have a use-case where I would like to use primitives to store weak references to non-primitive values. If the value is no longer referenced anywhere else, then the entry should be GC'd from the WeakMap and checking the primitive key for an existing value would return false. Is this possible to imple...
Let $S \subseteq \mathbb{R}^2$ be a finite set of points. Do there exists three collinear points $p, q, r \in S$? I wan't to know the complexity of this decision problem and present my approach as following. SOLUTIONS. Let $n = |S|$. A naive brute-force takes time $\mathcal{O}(n^3)$. We can simply go through all triple...
We have a $N_1 \times N_2$ grid. We have a collection of rectangles on this grid, each rectangle can be represented as a $N_1$-by-$N_2$ binary matrix $R$. We want to cover the grid with those rectangles. Is the decision version of this set cover problem NP-complete ? Input : Collection $\mathcal{C}=\{R_1,R_2,\dots,R_L...
I am currently writing a paper about lock-holder preemption with multiprocessors in virtualized enviornment. But I have two questions: one about overcommitment of CPU resources and about scheduling the vCPUs: I know that an overcommitment of CPU happens, if the total amount of all virtual machines vCPUs $n$ is greater...
I want to implement algorithm for computing vertex-edge visibility graph among polygonal obstacles, but I can't find any description or scientific paper describing such algorithm. Currently I understand how to extend Lee's algorithm for vertex-vertex visibility graph to compute vertex-edge graph, but I want to achieve ...
I have around 1,000,000 of strings of variable length (from 200 to 50000) that can contain 5 characters (A, B, C, D, E). What I actually want is to cluster them together if they are similar enough. By similar enough I mean they have an edit distance < $t$. This $t$ should be dependent on the length of the strings being...
I an trying to learn about $DisNP$ Complexity class. I couldn't find this class in any book. But, regarding it, I found this definition in a paper: Definition: A disjoint NP-pair (NP-pair for short) is a pair of nonempty sets $A$ and $B$ such that $A, B \in NP$ and $A \cap B = Empty$. $DisNP$ denote the class of all di...
Suppose we have a propositional boolean formula F and let M be the set of all models of that formula. I am wondering if there is an efficient way to find all atomic propositions that are implied by the formula. Informally, this means that they can only have one specific value in all models M. Does this problem have a s...
I am looking for a datastructure to represent the complex relationships between a bunch of abstract sets. The "abstract" means that these sets are not defined by their elements, but by their relationship to each other. This means that for me a set is nothing more than a named thing with a relations to other named thing...
So, I was reading this pdf on complexity theory. On page 18 pf pdf (Page 12 of book) The Immerman-Szelepcsenyi Theorem is mentioned with proof. The following lines are from the book : The idea is to cycle through all possible configurations $\sigma$ of $M$, for each one checking whether it is a final configuration tha...
I would like to know if there exists an NP-hard language which is also a member of co-RE\R? I think it depends if P=NP or not, but i'm not sure. Can I simply assume NP-hard is in R? Can you direct me how to think about it?
Given the recurrence $T(n) = T(\sqrt{n}) + \theta(lglgn)$, provide an asymptotically tight bound on it's run time. My solution was to let $m = 2\sqrt{n}$, which leads to the recurrence $S(m) = S(m/2) + \theta(lg(2lg(m) + lg4)) = S(m/2) + \theta(lglgm)$. By case 3 of the master rule, this means that $S(m) \in \theta(lg...
I am trying to solve an optimization problem with strength pareto algorithm (SPEA2). My decision variable have lower and upper bounds as well as an equality constraint (sum(dp) = 1). I am unable to handle equality constraints. Please advise.
Given regular grammars (each is either left or right linear), does exist word/string so it can be derived from all regular grammars, i.e. a word/string that can be derived from each regular grammar. Suppose that S1, ... , Sn are regular grammars. Then is the following statement is true: ∃w: S1→w ∧ ... ∧ Sn→w ? In other...
I was trying to understand the dsw algorithm for balancing a binary search tree in-place using this virgina tech page. The wikipedia page and vt page are more or less similar. I am having a hard time trying to understand the underlying logic and also the functioning of the vine-to-tree method. Correct me if am wrong.I ...
Can I build a polynomial time verifier for problem, given a non-deterministic polynomial time decider for that problem? I assume I should modify the decider such that it will verify the certificate. Can I use the given decider as is (without any modification)?
my teacher asked the class to do a digial circuit that encrypted a message using cesar's cipher, and a circuit to decrypt, but my only idea is to solve it using a circuit that does P + K mod N, where P is The position of the letter in the alphabet, K the value of the key, and N is the number of letters in the alphabet....
I've started to read about process calculi (such as CSP and π-calculus). It seems to me that they are extremely general and can represent pretty much any concurrent system, many of which will be unable to "make progress". I wondered if there were much more restrictive formalisms for describing concurrent processes? Per...
Is the Kolmogorov complexity of any piece of information with respect to a certain predefined encoding for all pieces of information, or can the encoding vary for each piece of information? There are different encoding mechanisms for representing data, and different ways of compressing the encoded data. If Kol...
Let $S_1,\dots,S_n$ be variables representing unknown sets. A set expression has the form $S_i$, $\overline{E}$ (the complement of $E$), or $E \cap E'$, where $E,E'$ are set expressions. A constraint has the form $E = \emptyset$ or $E \ne \emptyset$, where $E$ is a set expression. Given a conjunction of constraints,...
CLRS book has the following algorithm for parallel for matrix vector multiplication My problem is, can't we use a simple approach like this, MAT-VEC-MULTIPLY-MAIN(A,x,y,n) for i = 2 to n spawn MULTIPLY-ROW(A,x,y,n,i) MULTIPLY-ROW(A,x,y,n,1) sync MULTIPLY-ROW(A,x,y,,n,row) for j = 1 t...
I know this question is posted many times, but i am still posting this because i have my own doubt which pulls me out to move forward to kruskal and prim's algorithm.So Please do help me out $-:$ Question Let $G=\left(V,E\right)$ be a be a connected, undirected graph with a real valued weight function $w$ defined on $...
$f: \Sigma^* \to \Sigma^*$ is a polynomial time computable function if some poly-time Turing Machine M, on every input w, halts with just $f(w)$ on its tape. Language $A$ is polynomial time reducible to language $B$, written $A \le_p B $, if there is some polytime computable function $f: \Sigma^* \to \Sigma^*$ such tha...
Let there be an infinite series of pieces of data we want to predict. Take the set of all algorithms ("hypotheses") ML has discovered; different hyper-parameters count as another algorithm. Give each algorithm a score ("relative prior probability") of 2^(-number of bits to specify algorithm, still including hyper-param...
Given algebraic expression of two variables x and y, I want to simplify this algebraic expression until it cannot be simplified anymore. What algorithm can I use for this? For instance: x+x+y+y = 2•x+2•y = 2•(x+y) x•x+y•y=x2+y2 (x+y)•(x+y)=(x+y)2 x•x+x•y+x•y+y•y=x2+2•x•y+y2=(x+y)2 The most simplified algebraic express...
I want to construct a 2-tape Turing Machine, which decides in linear time if the input string over $\Sigma^* := \{(, [, ], )\}$ is a valid bracket. I have not constructed too many TM's yet, this is why I need your help.
I've been reading up recently on radial basis functions, and I've recently moved from Gaussian basis functions of the form $\phi(x)=\exp(-\alpha||x-x_i||)$ to multiquadratic basis functions. My source is this paper, which is referenced in an algorithm that I'm looking at. The basis function for the multiquadratic RBF i...
Let $\Sigma := \{0,1,$#$\}$ be the input-alphabet and $L := \{bin(n)$#$w \in \Sigma^* | n \in \mathbb N \land w \in \{0,1\}^* \land |w| \le n\}$ the alphabet. $|w|$ means the length of the word $w$ and $bin(n)$ the binary representation of $n$. I need to construct a 2-tape TM which has $O(n)$ complexity and accepts the...
The conjecture itself: k-SAT formula is satisfiable if no pair of unit assignment $l$ and $\overline l$ imply the formula to contain unsatisfiable (k-1)-SAT. Example (XOR-SAT has no edges and cycles in implication graph, so it's simple example): $$(\overline x\oplus y\oplus z)\land(x\oplus y\oplus v)\land(x\oplus y\opl...
I'm looking for a data structure that will push its oldest/last element out if a new element is inserted. For example, let D represent the structure. D contains 3 elements of the type Number D's default values will be initialized to 1, 2 and 3. $$D = [1, 2, 3]$$ If a Number that contains the value 5 is inserted into D,...
This is a follow up to a previous Question (Clarification of definition of class $DisNP$) The class $DisNP$ has a fundamental problem called the (P-separable) Separator Problem. Essentially the question is as follows: Given any DisNP-pair $(A, B)$. The separator is a Set $S$ such that $A \subseteq S$ and $B \subseteq C...
I am currently trying to design a graph-based approach for content tagging. In principle I am trying to two two things: Use an algorithm such as Latent Dirichlet Allocation (LDA) or some variant of it to discover terms in documents that relate to a certain topic, thereby allowing me to tag a document as relating to th...
For each admissible numbering, pick at least one pair of programs (but not necessarily all, which is impossible anyway) where the first translates from a given admissible numbering to that one, and the second work in the opposite way. Now define a language consisting of all the pairs of programs chosen by one such way,...
I want to develop an algorithm to serve the queue of children queueing to a basket full of balls of different colour, where each ball can be painted within a known time any colour (of several colours offered) requested by the child, and any child would eventually return a ball back to the basket after he/she finished p...
Is it possible to prove using induction? If possible what would be the steps to proof A=B? Main thing i want to proof is outcome of two segments of code are same. Below is the code: Segment A: int A (int x, int y) { if (y==0) return x; return A(y, x % y); } Segment B: int B (int x, int y) { while (y!=0) { ...
Let a graph $G=(V,E)$ have an independent set $I\subseteq V$ with $\{u,v\}\notin E$ for all $u,v \in I$ and $k \in \mathbb{Z}_{>0}$ where $|I|=k$. How can I define the language $L_{P_{Independent Set}}$ to this decision problem? I know that $I$ could be written as $I = \{u,v\} \in V | \{(u,v)\}\notin E \}$ but don't re...
I am trying to find a way to refute the pigeonhole formula using resolution. Lets assume that $x_{ij}$ is true if $i^{th}$ pigeon is in $j^{th}$ hole. Thus, with $n$ holes and $n+1$ pigeons, the first condition "every pigeon must be in a hole" can be represented as $$ \alpha_n = \bigwedge_{1\leq i \leq n+1} (x_{i1} \...
Can quantum computer compute the minimal intersection DFA of numerous minimal DFAs in polynomial time using polynomial number of qubits, where the language of each given minimal DFA is finite and it's alphabet is Σ={0,1} and all words/strings in all languages are in the same length equal to the given number of minimal ...