instruction
stringlengths
35
29.1k
Is Turing machine most powerful model of computation? Is it possible theoretically to build the model of computation which is more powerful than TM i.e is it theoretically possible to build the machine which could solve the problems that T.M cannot?Are quantum computers also the T.M or are they more powerful than T.M?
I would like to train a neural network whose parameters (alternatively, weights) are subject to linear constraints such as $w_{i,j} = w_{i',j'}$, where $w_{i,j}$ denotes the weight from input node $i$ to hidden node $j$ in the case of a network with a single layer. (In the case of several hidden layers, it is okay to ...
I have read that the translation lookaside buffer (TLB) is implemented in hardware and stores the page numbers and the corresponding frame numbers for faster lookups. Now suppose there are two processes, A and B. Page 2 is mapped to a particular frame number. Now if we are searching for page 2 in the TLB, it can belong...
I have some "fuzzy" congruences like these: \begin{align} \\ x&\equiv a_1 \mod 3 \text{ with } a_1 \in \{0,1\},\\ x&\equiv a_2\mod 5 \text{ with } a_2 \in \{0,3\},\\x&\equiv a_3 \mod 7 \text{ with } a_3 \in \{1,2,6\}\\ \end{align} These example moduli would provide a unique solution for $x \bmod lcm(3,5,7)$, if the $a_...
I am reading the following paper: https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf On page 4 of the paper they describe the hierarchical softmax which is intended to reduce the computational complexity (I believe only during training time) of training a n...
I am trying to implement Graph slam. I have some doubts regrading implementation. I attached a picture to clarify my doubt. [ I have a doubt in line number 2. It show omega have a scalar value 0. But at line 3 it show omega is a Matrix. Next doubt at line 7. In this line omega which is a 3*3 matrix is add with a 6*6 ...
I'm trying to find a way to explain the idea of the Halting Problem proof in as accessible a manner as possible (to undergrad CS students). The simplest argument I have found is this one; this is precisely the style of treatment I am aiming for. However, the self-reference (in particular, checking if a program halts on...
Here is the problem: Given a dictionary $D$ and two strings $s$ and $t$, write a program to determine if $s$ produces $t$. If it does produce $t$, output the length of of the shortest production sequence, otherwise, output $-1$. Example: $D$ = [bat, cot, dog, dag, dot, cat], $s$ = cat, $t$ = dog, the shortest productio...
What are the practical and theoretical implications of the unit type and the unit value being the same or different entities? For example, in Haskell the unit type and unit value are both spelled (). In ML, the unit type is spelled unit and it's value is (). Are there any problems that arise from either option? Are the...
Need help solving this recurrence: $T^2(n) = T(n/2) * T(2n) - T(n) * T(n/2)$
Input: You are given a graph $G(V, E)$ undirected, loop-less, no parallel edges, etc. and a label function $L: V \to \mathbb{N}$. Also, a sequence of $|V|$ natural numbers is given. Output: Is it possible to order the incident edges set of each vertex and choose a starting vertex $s \in V$ so that a pre-order DFS trave...
I'm new to computer vision and I want to solve the task of recognizing the game units of the game Clash Royale in the screenshot. Briefly, there are about 70 different types of gaming units belonging to two teams (they differ a little in colors and some are visible in front, others with backs). I want to find game unit...
Let's say we have array $A$ of $N$ integers, each of them in the range $[-1, 1]$. We define an array $B$ of $N+1$ integers, such that $$B_{N+1} = 0, \\B_i = A_i + A_{i+1} + A_{i+2} + \dots + A_{N}= A_i + B_{i+1}$$ So now we want to build data structure over the array $B$ such that it will be possible to perform two typ...
Given a bipartite graph $G = (V, U, E)$ such that $|V| = |U| =2^n$, one wants to sample an edge from $G$, uniformly at random, with the following operations: 1. One can sample $u \in U$ w.p $\frac{1}{|U|}$ ,or $v \in V$ w.p $\frac{1}{|V|}$. 2. There exists a polynomial time oracle, which can, given $u \in U$ (or $v \in...
I was reading some publications on cellular networks. They constantly mention two similar concepts — backhaul network and core network. I am not sure if these two are the same stuff, or in any way they are different. Does anyone know the differences? thanks!
Problem: Find the maximum sum of the elements in an array, with the following constraints: all the elements of the array are non-negative integers each element can either be left out completely from the sum (skipped), can be added, or can be subtracted from the sum when reading the array left to right (i.e. from index...
Is there a search tree where union is associative, so $a \cup (b \cup c) = (a \cup b) \cup c$ gives a tree with the same structure? A complete binary tree would be such a tree, but for example a red-black tree has several possible constructions for a given set of elements. Is there such a tree that does better than $O(...
I am having trouble finding the time complexity of the below code. # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def isBalanced(self, root): """ :type...
I am reading through the following paper: https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf Under section 2.3 on page 4 the authors discuss subsampling of frequent words. Now based on my understanding of subsampling of frequent words, the goal is to reduce...
I was solving this question: Which of the following statement(s) is/are false? $L^0=\{\epsilon\}$ $|L^0|=0$ The answer given was None. That is, none of these statements are false and both are true. However, I feel both are wrong. I feel $L^1=L$ and $L^0=\phi$ Also $|L^0|=|\phi|=0$ Am I wrong with this?
In C#, one can define a class/method/function with multiple type parameters. For example, // function void foo<T1, T2>(T1 x, T2 y) { /*body*/} // class class Bar<T1, T2> { /*body*/ } I understand how to use it, but I don't understand why I need it. So I'm hoping someone can answer the following questions: 1) What is...
For those of you who are not familiar with FPL, here's a short version. You have players playing as either Goalkeeper, Defender, Midfielder or Forward. Each player has some price (either rounded to .5 or .0), and based on their real life performance you earn points. You have a budget of 100£ and you need to build a tea...
Take a decision problem $Q$, which maps encoded instances of a problem, i.e., $\lbrace 0, 1 \rbrace \ast$ to the solution set $\lbrace 0, 1 \rbrace$. Since $Q$ is in $NP$, there exists a verification algorithm $A$, which takes an input and a certificate, in that order, as arguments and maps those to $\lbrace 0, 1 \rbra...
I want to implement algorithms from this paper: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.56.5609&rep=rep1&type=pdf In particular, I am currently dealing with the one in section 2.2.1. In page 4 (first paragraph), one algorithm step is as follows: Find an edge $(v_k, v_{k+1})$ of $P_i$ ($P_i$ is a convex...
Let's say we have an alphabet $\Sigma = \{a,b, \dots , z\}$ Set $A$ consists of words $x_i$ containing symbols from $\Sigma$ alphabet, which have this structure $x_i := \alpha_i \beta_i$, where $\alpha_i$ is just 1 symbol from $\Sigma$ and $\beta_i \in \Sigma^{*}$ (can also be empty) So the set A should look like this ...
Given an undirected tree with 7 nodes how many roots would this tree have. My intuition tells me that because the tree is undirected it would either be 7 or 0. How would I solve this?
From what i've learned, the HW is responsible for setting the accessed and dirty bits in the PTE of a process, and the OS is responsible for turning them off. My question is why? The first part, i think is because only the HW is preforming the page table walk and it's a good opportunity for it to set them (because by d...
I am trying to find an algorithm for finding an optimal solution to a puzzle of a given format. The 7 by 6 puzzle board is made out of the following pieces: The tears are as follows: Tears and grommets can be rotated and moved around the board, but spools, tie-offs and blockers cannot. A simple example of the puzzle ...
I have heading measurements of two Sensors (BNO055 and HMC6343) and also accurate measurements from better sensors for comparison from a rotating platform. Most of the measurements are with some kind of potentional error source like passing train, large ferromagnetic materials. The measurements of the BNO055 can't be u...
Let's say we have given two numbers $x, z$, and we need to find another number $y$ such that $x \text{ xor } y = z$. The xor ( exclusive or ) is bitwise operation: xor table . I know that this can be solved if we analyze both $x \text{ and } y$ bit by bit, starting from the first, but I was wondering if it can be solve...
I have the recurrence of the form T(n) = T(n/2) + O(n) This can be solved using master's theorem and if i use the results of the theorem, the recurrence evaluates to a time complexity of O(n). But if i think of it in terms of its tree, the input is reducing by half each time so we have a tree of logn height. Cost of...
I have an array 'a' which is 1xn, and has positive and negative values. In a rolling window of size m smaller than n. I want to move backwards (to the left) the positive values of the array in order to offset the negative ones. The positive values moved, need to adopt the inverse of the shape of the negative values. Hi...
On Hacker News there is an interesting exchange about the async\await RFC for Rust. The author of the proposal withoutboats is responding to a comment about the usage of async-await construct vs a monadic implementation in Rust. He notes three problems, the first one I am having some trouble parsing: Higher kinded pol...
Most of you know this diagram. If this diagram is true, all software is free to not know the levels lower than ISA. But it's not true. Softwares like performance-critical programs or system softwares like OS and compilers, are often forced to understand not only ISA but also microarchitecture. If so, what about the l...
For a binary search tree (BST) the inorder traversal is always in ascending order. Is the converse also true?
I have these grammar rules defined as follows, FDL -> FDEF FDL | ε FDEF -> #feature #: FEXP FEXP -> #op #( FLIST #) FLIST -> FEXP #, FEXP | #feature I know how to derive the derivative tree for a given string from this, but how do I draw a NFA for this string {#feature #: #op #( #feature #)}*. I have seen many example...
I am working on the longest common subsequence (LCS) problem while learning dynamic programming. Below is the Java code I created to solve the problem, which is not dynamic programming as far as I understand. public class LCS { public static String lcs(String a, String b ) { String lcs = lcs(a, b, "", 0, 0...
When reading about approximation algorithms, I often find the terms "matching lower bounds". As I understand, these means to provide examples where the approximation algorithm matches the proved bound___proving that the algorithm achieves the best possible approximation ratio. Often, the approximation algorithm solves ...
In order for a lambda expression to run forever, there must be at least one lambda in the expression in which an argument is passed to itself. For example the following runs forever. $$ (\lambda x.xx)(\lambda x.xx) $$ However, I am curious if an expression could run forever if arguments were only passed to themselves ...
Say you have a vector $v$ with $n$ length $v=\begin{bmatrix}v_1&\dots&v_{n}\end{bmatrix}$ can we write as $v=v_+-v_-$ where $v_+$ agrees with $v$ on non-negative components and is $0$ otherwise and $v_-$ agrees with $v$ on non-positive component and is $0$ otherwise. Eg: $v=[-1,-3,4,5,0,0,1,2,-3,-4]$ then $v_+=[0,0,4,...
This question concerns determine which sets in a collection of sets contain a given subset S: An undirected graph (V,G) is given with V= {1,..,m}, and given via its neighborhood sets, N(v_1),.., N(v_m). A subset S of V is given {v_{i_1}, .., v_{i_k}}. The output will be the vertices whose neighborhoods contain S...
This was a question that I got while taking a test at our university. The question paper was taken away after the exams. I remember the question only, not the multiple choices. If a regular expression is of the form (x+y)*y(a+ab)* , then what is the maximum number of strings with length 4 will bee accepted by its lang...
I learned that in numpy, given a vector, slicing and indexing could give different results. I ran the following codes: a = np.array([1, 2]) b = np.array([3, 4, 5]) print(b[a]) c = b[1:] print(b) c[0] = 1 print(b) print(c) print(b[1:] is c) and get the result: [4 5] [3 4 5] [3 1 5] [1 5] False Since when I modify c, b...
I am using detectEigenFeatures in the Matlab command to obtain the corner points. This function only can provide the corner points within a rectangular boundary region. But I want to extract the corner points within a polygon. I have thought about using small rectangles in order to obtain a polygon. But it seems time-c...
For two ordered sets of keys Paul Heckel's diffing algorithm generates the necessary actions to transform, or patch, one set to the other. I am asking how you'd do the patching without keeping a copy of the "old set" around, nor incurring a large performance penalty. The problem statement is agnostic to the choice of d...
A simple optimization problem is of form $\max_{x\in\mathcal R}f(x)$. We can quantify as $\exists x\in\mathcal R\forall y\in\mathcal R f(y)\leq f(x)$. The quantification here is $\exists\forall$. Is there a meaning to $\forall\exists$ from optimization? What is a good natural meaning to $\forall\exists$ quantificatio...
I was referring book by Peter Linz, which defines linear grammar as follows: A linear grammar is a grammar in which at most one variable can occur on the right side of any production, without restriction on the position of this variable. The wikipedia page also defines it similar way at the top of Linear grammar page...
In the fourth row of the TLB the valid bit is 0. The corresponding row in the pagle table (fifht row) has the valid bit 1. How is this possible? What events leads to this incoherence?
How to represent in first order logic the expression: "there are infinitely many" To be honest I'm confused and not even sure whether you can represent them in first order logic.
Not talking about the actual moon lander, but an old game that was inspired by it (see screenshot). Suppose I wanted to write a program that "plays" this game: Can only operate the vertical thruster (on/off) Does not know how much thrust is produced Does not know about the vehicle's inertia, weight, etc. Does know its...
We have a array of $N$+1 integers. The integers range from 1 to $N$. The array contains at least one duplicate. Our goal is to find one of the duplicate entries. We have the constraint that we cannot modify the input array. Is there any solution to this problem which has $O(N)$ time complexity and $O(1)$ space complexi...
The typical presentation of the syntax of the $\lambda$-calculus is as an ambiguous CFG (or BNF) like the following: $$T \rightarrow \lambda X . T \mid T ~ T \mid X \mid (T)$$ Where we permit $X$ to range over an infinite number of variable names. To disambiguate $\lambda$ terms two conventions are usually established:...
I want to evaluate the usefulness of Philox pseudo random number generator for drawing multidimensional random vectors. What is known about the equidistribution properties of Philox? I read the Philox paper but it does not contain any information about its equidistribution properties.
What is the name of the tree data structure where node weight equals the sum of all descendant nodes' weights? Example: 15 / \ 10 5 / \ / \ 2 8 1 4
While looking through some problems on CodeForces, I noticed that there were several problems that required knowledge of techniques that just aren't covered in standard algorithm texts. Topics that I want to understand include segment trees, least common ancestor, range-minimum query Fenwick trees heavy-light decompo...
There does not seem to be a canonical definition of "pure function", but the widespread language-agnostic understanding seems to be a function that has no side effects produces a value that is completely and uniquely determined by its explicit arguments This appears to beg a question when the arguments are themselves...
I have two values $A$ and $B$, I want to know if I can implement the equals $=$ operation as the product of the two values. I can apply any function to $A$ and any function to $B$, but I need to use multiplication at the end. Basically I want to find $f$ and $g$, such that: $$ f(A) \cdot g(B) = \begin{cases} 1, & A = B...
We have a database with well-formated and structured data. From time to time we get Excel - files from our clients. This Excel Files have to be imported to the database. It it very important that we dont create duplicate data so we first need to check if the data record already exists in the database. The problem is: T...
I suspect this may be more of a concept / theory question, but, I haven't been able to wrap my brain around what exactly a binary file is. I've read links such as the below: https://en.wikipedia.org/wiki/Binary_file https://betterexplained.com/articles/a-little-diddy-about-binary-file-formats/ But, the piece of the puz...
I've heard that computers cannot forget anything, but yesterday my teacher told me that a computer can lose its memory from getting very hot. Is that true that computers can lose information? How and why does this happen? Can the lost information be retrieved back?
I receive a vector of varying length such as [0, 1, 2, 3, 2]. The value corresponds to the yield and its position to a time slot. Hence, at the first time slot the yield is zero, at the second period it is 1, etc. I need a procedure that can combine this vector with itself at varying periods in order to ensure that the...
I am considering the following problem: Input: 2 Graphs G=(V,E), H=(V',E'). G and H are directed multigraphs Question: Find a subgraph in G which is isomorphic to H Is there any algorithm available for checking subgraph isomorphism in Multigraphs (specifically for multiple edge types) ? If yes, what is the complexit...
We know that $L=\{0^{m^2}\mid m\geq 3 \}$ is not a regular language. However $L^*$ is regular because we can generate $0^{120}$ to $0^{128}$ by some concatenations and then any other power of $0$ can be generated just by concatenating $0^9$. Hence we can represent $L^*$ using a FSM. My Question : Here I got these num...
1) In Booth's bit-pair recording technique how to multiply a multiplicand with 2? 2) In booth's algorithm for multiplication/Booth's bit-pair recording of multipliers, the sign bit extension of the multiplicand i.e. we must extend the sign-bit value of the multiplicand to the left as far as the product will extend. No...
The following is a quote from Sipser's "Introduction to the theory of computation" A Turing machine $M$ accepts input $w$ if a sequence of configurations $C_{1}, C_{1}, \ldots , C_{k}$ exists, where $C_{1}$ is the start configuration of $M$ on input $w$, Each $C_{i}$ yields $C_{i+1}$ , and $C_{k}$ is an accepting ...
I feel like the answer is no but I'm not sure. I think it's commonly accepted that DFS runs in $O(|V| + |E|)$ time. I've read a few explanations and they all make sense if the neighbour traversal for any given vertex can be done in arbitrary order. But I've noticed a commonly suggested DFS behavior is to traverse the n...
From my homework: Consider a 2-way set-associative cache with eight 32-byte blocks. Instructions and operands are 32-bits. There are an 8- bit data bus and a 16-bit address bus. A sample code is run a program that is saved from 1000H to 10FFH address and repeated 20 times. Suppose the cache memory is empty before runn...
Locality sensitive hashing works well when matching is between vectors of scalars, but I now need to extend LSH to compare matrices. Each matrix is formed of n readings from m sensors forming a n by m matrix. Comparison between differing columns is inappropriate. I could turn the matrices into vectors of length n * m ...
Can someone help me giving a pseudo code to this problem : There are two groups of processes , A and B. Maximum 3 Processes from group A or group B(only from one group) can use the given resource . How can this be implemented using semaphores ? I'm thinking of something like this : Semaphore work = 1 semaphore nProcess...
Introduction: I'm using divergence here as to mean that the gradient is getting further and further from zero in stochastic gradient descent. I've written my own feed-forward neural network and tried to use it to solve several incredibly basic problems of binary classification such as: Being given two random real numb...
In this paper Walker presents an extension of STLC with linear and unrestricted types. The proof of type soundness is left as an exercise to the reader. I encountered difficulty when attempting to prove progress (in a theorem prover): $$ \vdash (S_1,e_1) ~\Rightarrow~ \textsf{value}{(e_1)} ~\lor~ \exists S_2 \exists e_...
Was wondering since all the types are spelled out constructively, and the constructions can all be reflected symbolically on a computer, if you can automatically parse expressions in a type?
So I am extremely confused with using bitwise shifts used to extract the bytes from an integer. I find that if I do something like this... int i = 512; i & 0xFF; // this gives me the first byte That must mean i & 0xFF gives me the first byte that is stored in memory. In other words, i & 0xFF is the first of the four ...
Maximum weight clique problem has some attention but i could not find any efficient approaches to this problem yet. I acknowledge that it is np-hard, but are there any known approximations? Given a fixed n and an undirected graph, the problem can be defined as finding n disjoint cliques which maximize the sum of the ve...
I was analyzing the time complexity for recursive algorithms like merge sort, but when I came across that recurrence, [I think that equation is called a recurrence right?] I couldn't differentiate between a which mean the number of subproblems and b which in my slides it says is the factor by which n is divided by.
I am not looking for the complexity of following algorithm but rather how to think about the problem and calculate complexity of a given solution? One way is to perhaps use The Master Method for recursive functions, but that hides the "how?" part. I am trying to get much better at calculating complexities of algorithms...
I've been looking into behavior trees, but I cannot find a lot about them. The Wikipedia page pretty much only mentions sequence and selector nodes. I have found implementations that also provide memory selector, memory sequence, and parallel sequence, as well as some decorators like inversion and repetition. I found s...
I have heard a colleague of mine giving the following statements to a student, but I am not quite sure if he is right. The statements were about Multi Layer Perceptron and the Backpropagation algorithm, he said that: It would be reasonable to check it up if the data to be input to a MLP should be checked first its degr...
I have a directed acyclic graph with a score on each edge. The score of a path is defined to be the sum of the scores on the edges along this path. The probability of a path is the score of such a path divided by the sum of the scores of all paths. I would like to compute the marginal probability of each edge; i.e., ...
How to prove that if the set and its complement are recursively enumerable, then this set and its complement are recursive? My idea is that we can make the characteristic function of recursively enumerable set to be a total function using characteristic function of the complement (we can compute both $\chi_A$ and $\chi...
I have a question on the node2vec algorithm described in this paper. Node2vec is a deep learning algorithm that word2vec to graphs to learn embeddings. The authors claim that it can help find nodes with similar "roles", or nodes whose connections have similar structure within the graph (structural equivalence), such as...
I'm talking about the ability to safely run a virtual machine on a physical device that is not trusted. It is necessary that the owner can not access the data that the virtual machine operates on. I am interested in what theoretical or practical implementations exist without special hardware. I know about homomorphic c...
Here are four tenets I cannot reconcile: Double exponential time algorithms run in $O(2^{2^{n^k}})$ time with $k \in \mathbb{N}$ constant Exponential time algorithms run in $O(2^{n^k})$ with $k \in \mathbb{N}$ constant The former bound grows stricly faster than the latter; i.e., there exist algorithms that run in doub...
How is it possible to prove that this assert is not true?
Computational complexity results are often explained in intuitive terms as statements about the possible efficiencies of algorithms to solve certain classes of problems. However, on a more formal level, all (many?) results actually build on the underlying notion of Turing machines, which provides a precise way to defin...
Say we have some complicated function that determines if a string matches an XSS attack string, and throws an error or does something else in that case. function somethingWithXSSVulnerability(x) { var regex = /<script(.*)>(.*)<\/script>/ if (x.match(regex)) { throw new Error('XSS') } else { return x } }...
I've been trying to theorize how to solve a certain type of problem for months now. Suppose you have a collection of $m$ pre-defined $(d+2)$-dimensional vectors like so: $$(v, s, m_1, \dots, m_{d})$$ In this case $v$ represents the primary objective value, $s$ is the size of each object, each $m_i$ represents addition...
Context, I have a geometric algorithm that is sensitive to collinear points and receives as input a list of points in 2D generated randomly. Suppose that I have a Boolean function nonCollinear(x,y,z) that given three points returns true if they are non collinear and false otherwise. Is there an efficient algorithm to g...
During an article I am writing, I encountered the following problem: Let $N=(G=(V,E),W,C)$ be a network with a graph $G$, a weight function $W:E\to R$ and an integer capacity function $C:E \to N$. Find a circulation $f$ with minimal cost $W(f)$ such that the number of edges used by the circulation (i.e., edges $e$ s.t...
We know if every language in $EXP$ has polysize circuits, then $P\neq NP$ and $EXP=PSPACE=\Sigma_2^P\cap\Pi_2^P$. If every language in $PSPACE$ has polysize circuits, then does it give anything (note if it gave does $P\neq PSPACE$ then this would give $P\neq PSPACE$ unconditionally since $P\subseteq P/poly$ and $P=PSP...
Why is primary needed in pBFT algo? Since many issues of viewchange etc. come up because primary may be faulty - is it possible to have a version of pBFT which doesn't have nodes assigned as primary? Or does having a primary node fulfill a function which is crucial?
Whenever we load a process (which consists of object code, static and global variables, stack and heap space) into main memory it would be of fixed size. But, the program doesn't know in advance how much heap memory is it gonna need? Is there some fixed stack and heap space given to each process of some size in advance...
I have the following language : $L=\{\langle C_1,C_2\rangle \text{ | } C_1 \text{ and } C_2 \text{ are two circuits that calculate different function}\}$. We can call this language SAT-2C. Prove that $L$ is NP-complete. 1) Proving that $L \in$ NP is pretty simple : given the values of $C_1$, $C_2$, it is possible to ve...
I came across problem asking whether given statement is true and false. The statement given was as follows: Every Type-2 grammar can generate regular language. I felt that Type-2 grammar means, its context free grammar and is generated by PDA. PDA is more powerful than FA which generate regular languages. Hence any T...
I'm trying to find a problem that is computable but not in NP. I checked and I havent found any duplicates(I hope so too). We were asked if there is a problem that exists that is computable yet doesnt lie in NP and we should name the problem and explain why is it so?
First, an example of a set of constraints which turned out not to be solvable (I don't think): b < 3 && c + a > 5 && a - b > 2 && c > 1 && b - c > 3 My procedure for solving this is roughly: Okay b is less than 3, and c > 1. 1 + a > 5, so a > 4 in that case. Try 4 - 2 > 2, no that doesn't work, so maybe a is 5, 5 - 2 ...
I am given an list of numbers and A number-s. I need to find out the collection(s) of numbers from the list of numbers whose sum corresponds to the given number s. for example - the given set is [2,8,3] and given integer 9 Then I can tell {3,3,3} or {3,2,2,2} can be the required sets. Unfortunately I cannot figure out...
When talking about the complexity of a given operation, say multiplication of numbers, one usually counts the number of "elementary operations" that are required. For example, a common argument says that multiplying two $n$-digit numbers with the schoolbook standard method takes $O(n^2)$ operations, while more sophisti...
Given $(n, k)$: What is the minimum number $x$ of (binary) strings such that all $n$-bit (binary) strings are within $k$ Hamming distance of some string? Is there an asymptotic expansion or lower bound, at least? A somewhat-trivial lower bound is as follows: There's $\sum_{i=0}^{k} {n \choose i}$ strings within di...
I have come across many definitions of the DPLL algorithm but haven't been able to follow them. The ones that are closest to making sense to me are the ones based on state-transition systems with transition rules such as defined here: $F$ is a CNF formula, $C$ is a clause, and $M$ is a model. A description of it is as...