instruction
stringlengths
35
11.4k
Given a symmetric real $n \times n$ matrix $A=(a_{ij})$, is there an algorithm which computes the sum $$\sum_{i,j,k}\max(a_{ij},a_{ik},a_{jk})$$ over all $1\leq i<j<k\leq n$ with time-complexity better than $O(n^3)$?
How do I write context-free grammars for the following languages? $B_2 = \{0^n1^n \mid n > 0\} \cup \{0^n1^{2n} \mid n > 0\}$ $B_3 = \{a^nb^mc^k \mid k = n+m\}$ Can someone help me? I'm not sure how to deal with the exponents.
Show that the Post Correspondence Problem (PCP) is decidable over the unary alphabet ? = {0}.
TL;DR: Is an implementation of the Heap's Algorithm adhering to the principals of functional programming possible, and are any implementations of it known? And by "adhering to the principals of functional programming", I mean mainly not relying on the mutation of an object to carry out the algorithm. I decided to wri...
In the code below, three processes are competing for six resources labeled A to F.How can I modify the get request in each procedure in this graph to avoid dead lock You cannot move requests across procedures, only change the order inside each procedure.
$\mathsf{EXP}\not\subseteq \mathsf{DTIME}(2^{n})$ and $\mathrm{CIRCUITSAT}\in \mathsf{DTIME}({2^{n}})$ holds and so why does $\mathsf{NP}\neq \mathsf{EXP}$ not hold while we know $\mathsf{NP}\subseteq \mathsf{DTIME}({2^{n}})\implies \mathsf{NP}\neq \mathsf{EXP}$? Does $\mathrm{CIRCUITSAT}$ in any of $\mathsf{DTIME}(\fr...
I have difficulties understanding how a TM could count number of characters. I have this problem where the input is made out of characters $\{a, b\}$ and I need to accept if there are $n$ characters of type a in the string. The formal definition for the input language is: $$ L=\{ \{w,n\}\in\{a,b\}^*\times \mathbb{N} \...
The Strassen algorithm is developed for multiplying the matrices faster. It enables us to reduce O(n^3) time complexity to O(n^2.81). However, this algorithm is applied for the matrices which are square and the dimension of the matrices must be a power of 2. Assume that the matrices are called A and B. Problem 1: A = 3...
I'll describe the problem below, I'm not sure if it's an exist algorithm problem. The problem is from a small game. Here is a matrix, probably with some cells blocked(couldn't pass through) There are several pairs of numbered points connect each pairs of points with right angle lines, the lines shouldn't intersect lin...
The question is about an operator that transforms any CTL* formula ${\psi}$ into a (not necessarily equivalent) LTL formula ${A\psi^d}$, where $d$ means syntactically removing all $A,E$ quantifiers from ${\psi}$. Is it true that this operator preserves logical equality, i.e. ${\psi_1}\equiv_{CTL*}{\psi_2}\implies {A\ps...
Recently I stumbled across this language $L=\{a^{n}a^{{(n + 1)}^2-n^2} \in \Sigma^* \mid n\geq 0\}$ that I can rewrite as $a^{3n + 1}$. So I applied the pumping lemma to see if it is non regular, and I get: given a pumping length p I should have a string $z\in L$ such that $\mid z \mid \ge p$ I choose $z=a^pa^pa^pa$ s...
If $$ A_n = \{ x | n \in W_x\} \ where \ W_x \ is \ domain \ of \ M_x $$ how can I show that $$ \forall i,j \ \ \ A_i \le_M A_j $$
While going through Church's text on Lambda calculus , I cam across the first set of conversion rules . Before writing out my query I would like to put the notation that church has used for substitution which is as follow : $\ S$ $^x_yM $ means the act of substituting $y$ in place of $x$ all through out $M$ . (I ...
I'm reading "Decibel: Isolation and Sharing in Disaggregated Rack-Scale Storage" (PDF). On page 6, the author illustrates the concept of "Extended Logical Block"), which is similar to "Data Integrity Field" provided by SCSI devices. I directly quote the text here: Several enterprise SCMs support storing per-block met...
The algorithm for topological sort, in CLRS goes as follows : call DFS(G) to compute finishing times v.f for each vertex v as each vertex is finished, insert it onto the front of a linked list return the linked list of vertices Let's we have a directed graph, as in the figure here: If we start DFS from arbitrary ver...
Nodes in the open list in A* will be sorted by their f-cost, but if the f-cost of two nodes are equal, will their h-costs instead be compared? I'm asking because I've seen implementations where the h-costs are compared and where they aren't, so which version is the right one? What is the benefit of doing either? g-cost...
The following problems live in integer domain. I want to find a subset of $\{x_0, x_1, \ldots, x_{n-1}\}$ such that the subset's elements sum to any number in a prescribed interval $[X,X+k]$, $k\geq 1$. We call the above problem A. An obvious approach is to solve $k+1$ standard subset sum problems with targets $X, X+1...
The definition my professor gave us is: f(n) is O(g(n) for constant c > 0 and n0 ≥ 0 where all n ≥ n0 and f(n) ≤ cg(n). I was wondering what n0 and n are? Example: for the function f(n) = an2+ bn + cn = (a+b+c)n2. Assuming a,b,c were constants we can say: f(n) = O(n2) where f(n) ≤ cn2. What am I actually looking and ...
Given undirected, connected graph, find all pairs of nodes (connected by an edge) whose deletion disconnects the graph. There can't be an edge connecting a node to itself. The problem seems similar to finding articulation points of a connected, undirected graph - yet with a twist, that we have to remove a pair of ver...
does anybody have a basic reference (if it is possible) that explain how to mathematically model the state of a network. I assume that it goes like modeling a graph that is composed by nodes and edges. I need to handle the process of each node are doing. What I have already in mind it is: - each node can execute a set ...
I often find flights through a search engine like Google Flights. On input some refined subset of the space of all flights (e.g., non-stop only, departing in the morning, from one of two airports, and on a certain date) the search engine returns the cheapest flight in this subset. My goal using the search engine, howev...
I've just recently found out about KRR (Knowledge representation and Reasoning) and ASP, not hearing a thing about them before (except a bit about prolog). I've read a bit about them and one of their primary usage seems to be AIs. My question would be how widely used ASP or other declarative languages are, is there som...
So the expression $\Gamma \ \vdash \ e:\sigma$ states that under assumptions $\Gamma$, the expression $e$ has type $\sigma$. Then we have the following rules: \begin{array}{cl}\displaystyle {\frac {x:\sigma \in \Gamma }{\Gamma \vdash _{D}x:\sigma }}&[{\mathtt {Var}}]\\\\\displaystyle {\frac {\Gamma \vdash _{D}e_{0}:\ta...
This answer explains roughly how to convert a nested boolean function into a Binary Decision Diagram (BDD). This question is about how to structure the states for the BDD. Now in this question I am trying to understand how to process the program states using a set of Binary Expressions I have (a specification), in Comp...
The book says that a total time required for a pipeline with k stages to execute n instructions is as follows. $T _{k,n} =[pqnk+(1-pq)(k+n-1)] \tau$ p is the probability of encountering a branch instruction. q is the probability that execution of a branch instruction I causes a jump to a nonconsecutive address. (Each ...
Suppose we are given an $n\times m$ matrix $M$ of positive integers. The adjacent cells of a particular cell is the up, down, left and right cells. Like for cell $M[i][j]$ the adjacent cells are $M[i-1][j]$, $M[i+1][j]$, $M[i][j-1]$ and $M[i][j+1]$ respectively. An area is a set of cells such that for each pair of cel...
Say I have these defined functions: function a(x, y, z){ var q = b(y) q = c(q, z, x) q = d(q) return q } function b(x) { var q = e(x) q = f(q) return q } function c(x, y, z) { return x + y * z } function d(x) { return x * 10 } function e(x) { return x + 5 } function f(x) { return x - 3 } I w...
In learning about Timed Automata, Coloured Petri Nets, and Process Calculi, I am wondering what the benefit is of having the Petri Net transition be a separate type of node in Petri Nets. It seems that you can model the same stuff (eventually) using Timed Automata or Process Calculi, which both only have states and tra...
I have searched a lot for this, but apparently there is no result on calculating any bound on the error $||Q-Q^*||$ when I stop Q-learning after say $N$ iterations ($Q$ is the vector of Q-values at current iteration and $Q^*$ is the optimal Q-value). Let's assume that you have visited each state-action pair at least on...
I have an exercise in my algorithm's Course for which I have the correction but do not understand it. 1.Exercise . Let Th be a full binary three of height h(meaning all the levels all completely full). (1.a) : Let f(h) be the number of leaves of Th(nodes of the last level). Establish a relation for f(h) and solve it...
In our programming language concepts course, our instructor claimed that it's okay for a final state to lead to another state in a finite state diagram. But this seems to be a fundamentally contradictory concept. Because a final state by definition is one that terminates transitions, i.e., that once you reach it, there...
The Theorem and its proof is given below: But I am wondering why we write "Ignore the input " when describing an Enumerator? could anyone explain this for me please?
I am familiar with the decision tree based argument for the minimal number of comparisons required to sort $n$ distinct elements - Since there are $n!$ permutations on the $n$ elements, the decision tree for any comparison based sorting algorithms must have at least $n!$ leaves, and therefore at least one path of lengt...
I have $n$ items arranged on a straight line (like a number line, items can only move 2 directions). The each item has a size, some distance around their center position, that can't overlap with other items. They also cannot cross each other. The problem: We have a set $S$ of positions (of size $\leq n$). We need to...
What's the intuition behind a ''Graph fourier transform'' ? I'm not so much interested in mathematical details or technical applications. I'm trying to grasp what a graph fourier transform actually represents,and what aspects of a graph it makes accessible. To clarify the issue: Graph-structured data appears in many mo...
I'm looking for an algorithm, a set of algorithms, or any pointers/remarks how to solve the following problem: Given a polygon, a central point, and a set of points scaterred around the central point inside the polygon, I want to find the nearest "edges" being created by those points with respect to the central point. ...
How could I prove that the following language is decidable? $\{\langle G\rangle \mid G\ \text{is a CFG over}\ \{0,1\}\ \text{and}\ 1^* \subseteq L(G)\}$ P.S. It's the problem 4.15 of the third edition of the "Introduction to the Theory of Computation" by Michael Sipser.
given a Kripke Structure I want to check if a CTL formula is satisfied or not. the CTL is: $$ AG(c \vee AX\neg E((a\vee b)Uc)) $$ I have read that it is better to write to CTL in terms of $\wedge $ and E so for instance for an inner part $AX \neg E((a\vee b)Uc) $ I have re-written as: $$ \neg EX\neg(\neg E(\neg(\neg ...
I'm just wondering where the phrase "throwing" an exception came from. I understand "raising" an exception but I'm wondering if "throwing" has a reason or meaning behind it?
From reading (1) below, it seems they have implemented an abstraction layer on top of the code that does what the code already does to some degree. They built an Expression class for symbolic integer manipulation, and they replace any native integer calls with these in their symbolic execution. Wondering what it takes ...
Assume that for each building in a city there is a known subset of the city's buildings that can be seen from that building (being in a building counts as "seeing a building" as well so for every building you can see at least one building, the building you are in). Develop an efficient algorithm for visiting the minimu...
I understand that knapsack problem is solved with dynamic programming in O(nW) time which is not polynomial but there is a greedy solution for knapsack problem which solves it with O(nLgn) time so how is it that there exists an algorithm with polynomial time for knap sack but it is still considered a npComplete?
Find the asymptotic bound in terms of $\Theta$ (Theta) using the master theorem for the following recursive equation. Assume that $t(n)= \Theta (1)$ for suffucuently small $n$. $$t(n)=t(\frac{n}{5})+t(\frac{n}{17})+n$$ I am a bit confused on how to approach such question, I did solve questions such as $t(n)=3t(n...
I have got confused in undressing the informal definition of LTL below: $$G(\phi \Longrightarrow\psi)\Longrightarrow(G\phi \Longrightarrow G\psi)$$ in many literatures I have seen implies is said as replies like for LHS we can say Always/Globally $\psi$ replies to $\phi$. is it correct? Does the LHS implies the RHS if...
The naturals lack subtraction, but SZ polynomial identity testing needs subtraction... I think it's applicable, but how to prove it? Perhaps: SZ shows natural polynomials are equal iff it shows those polynomials are equal over integers. Integer polynomials are equal iff some sequence of algebraic manipulations transfor...
in many lecture notes, I have seen the LTL idempotent law for until and its equivalence is described as $\phi U(\phi U \psi) \equiv \phi U\psi$ and also $(\phi U \psi)U\psi \equiv \phi U \psi$ . Also by definition of $G$, some formula holds in every state. So if globally $\phi$ holds until we see $\psi$ does it make ev...
When I read the word "state" I think of a global object with a bunch of properties like the "application state". But it seems that in automata that the state is pretty much just an empty value. Wondering what specifically the data structure is for automata states in general. For example, the following comes from here: ...
I was trying to find a cf-grammar for $L = \{a^{2^n}| n \geq 1\}$ but I cannot seem to find one. Is there a cf-grammar or does it not exist because of the quadratic-exponent?
I've read that the maximum boundary edges amount of union of $n$ rectangles, named $p$, is bounded by $p \leq n^2 + 4n$ I tried to prove this by induction, but it's seems too difficult to me, can anyone help me with the proof? thanks. an induction try: $n = 1$, $p = 4 \leq 1^2 + 4$ is clear. assume when $n = m$, $p ...
I have an undirected weighted graph like this one My task is to find the fastest path (with least weight) that goes from specified vertex goes through all vertices and returns to the starting vertex without repeating a vertex. Graph 1 3 time 5 3 2 time 5 2 4 time 5 4 1 time 5 4 3 time 4 1 2 time 5 Starting vertex 3 P...
Wondering what the differences are between Tree Automata and Tree Transducers. Wikipedia says: Tree transducers extend tree automata in the same way that word transducers extend word automata. And about word transducers it says: A finite-state transducer (FST) is a finite-state machine with two memory tapes, followi...
Given a number $N$, I need to make a new array $B$ of size $n$ (index-1 based) such that the product of $B[i]-(i-1)$ for $1 \le i \le n$ is equal to $N$ and $B[n]$ is minimum and $B[i] \ge B[i-1]$ and $B[i] \ge 1$. I found the prime factors of $N$ and sorted them in decreasing order and if they are greater than $n$ th...
What method(s) can I use in general to proof HALT doesn't reduce to given language?
I have a few basic questions about how the states work in Tree Automata. Example 1.1.2. Let $F = \{f(,),g(),a\}$. Consider the automaton $A = (Q, F, Q_f, \Delta)$ defined by: $Q = \{q,q_g,q_f\}$, $Q_f = \{q_f\}$, and $\Delta =$ \begin{align} a &\to q(a)\\ g(q(x)) &\to q(g(x))\\ g(q(x)) &\to q_g(g(x))\\ g(q_g(x)) &\t...
I've been asked to prove the correctness of the following recursive formula. The formula is trying to define, how many ways you can spend your money C on the i amount of beers. I did the following recursive formula where you either bought a beer and losing $P-i$ money, or passed the beer and went for the next in the ar...
The Wikipedia page on the time hierarchy theorem states: A similar theorem is not known for time-bounded probabilistic complexity classes, unless the class also has advice. However, wouldn't the usual time-hierarchy theorem suffice in this case? For instance, we know that $BPP \subset EXP$, and since the ordinary tim...
I run across this problem: Given a sorted array, two integers k and x, find the k closest elements to x in the array. The result should also be sorted in ascending order. If there is a tie, the smaller elements are always preferred. For example, given [1,2,3,4,5], k=4, x=3, we should have [1,2,3,4]. There is one soluti...
Imagine a chord-like network $N$. each machine $m \in N$ is directly connected to $N_m \subset N$. Without relying on official timeservers, I want all machines to synchronize to some time with millisecond precision. my algorithm is executed some time after a machine joined the network, and works as follows: the machi...
Simply typed lambda calculus has a combinatory logic equivalent with the same expressive power without the need of defining names via lambda abstraction. Is there a formalism as powerful as System F but based on combinatory logic?
for $e\leftarrow1$ to 8 do for $e\in[1,8]$ do for $e\in\{x\in\mathbb{N}|1\le x\le8\}$ do What is more preferred?
Given some binary operator $\otimes : X\times X\to X,$ and list $x_1,\dots,x_n$ where $x_i\in X,$ can all possible expressions in $\otimes$ be computed within a number of operator applications polynomial in $n$? We say an expression in an operator $\otimes$ and list $x_i$ is formed by placing $\otimes$ between all $x_i...
I don't really understand why is statement 1 ≥ statement 2 in the attached picture. From what I understand the negative term in statement 2 must be greater than or equal the negative term in statement 1 if statement 1 ≥ statement 2 but I don't really know how. Any help on this matter will be really appreciated. Thanks!...
Is time complexity and running time of the program/algorithm one and the same thing? Also, running time sounds like 'computer complexity'. As, it utilizes all the resources and give tangible time that program took to run. So, can we say that running time is same as computer complexity?
My question is: Given a planar graph defined by its adjacency matrix. Can I always find a set of points, so that the dual graph of the voronoi diagram of that set of points is the same as the planar graph?
I was studying disjoint set data structure. I studied path compression and union by rank. Initially all the elements are single in their own set and by performing unions we can combine different sets. Now since we are performing union by rank the height of the resultant tree is always minimum. At this point i think th...
I'm trying to reduce this example from Circuit-sat to 3-Sat, but I got stuck. Can some one give a brief explanation step by step? Tree: schema My attempt:
Is it true that if a connected graph has a bridge then it has a cut vertex? In my point of view, I don't think it is true to consider that a graph having a cut edge will definitely have cut vertex. Consider a graph with a single edge $uv$; if we remove this edge, the graph will get disconnected but if we remove $u$, th...
Wikipedia says Every class which is low for itself is closed under complement, provided that it is powerful enough to negate the boolean result. This implies that NP isn't low for itself unless NP = co-NP, which is considered unlikely... . This line of reasoning is a bit abstract for me. Is there a concrete example o...
Suppose we have a neural network (such as google uses for instance) which detects an object in images, which could be a cat or car. Suppose that it is instead an alien artifact that we dont have pictures of. What methods are there given this neural network to produce an image of the object it detects in images?
This famous paper proves the existence of both oracles $A$ and $B$ such that $\textbf{P}^A = \textbf{NP}^A$ and $\textbf{P}^B \neq \textbf{NP}^B$, therefore proving that any resolution to the P versus NP problem must be nontrivial in the sense that it cannot relativize. I understand the significance of the oracle separ...
Why does the Turing Machine allow for multiple final states when it would be simpler yet equivalent to work with just one? Why allow additional unnecessary states? Is there some historical reason for this? Is the concept of multiple final states useful in any way? (Perhaps something akin to the ease of use of multi-tra...
Consider the stable marriage problem, where both sides want to match with multiple individuals from the other side (perhaps a fixed number, or perhaps within some range). Something like, if doctors could choose to go to more than one medical school at the same time. Is there a variation on the deferred acceptance algor...
The original paper describing splay trees Self-Adjusting Binary Search Trees by Sleator and Tarjan claims that: Splaying not only moves x to the root, but roughly halves the depth of every node along the access path. What is the intuition for this claim? The paper includes some figures (splaying in a tree of all zig...
I was wondering how I can find all the vertices in a graph that are part of a cycle. To determine this for one vertex, I could just start a DFS from that vertex, but this seems unefficient to me when I want to know for all vertices. Thanks for your help!
It's a complex situation, where I want to balance groups of numbers based on the average of these numbers, while keeping the group size unchanged and not breaking elements constraints. Let me explain in detail what I mean: I need to switch elements between the groups in order to balance the group average. However the ...
Here is a popular proof of the halting problem theorem: Suppose there exist a procedure h(x, y) so that for any procedure p(x) and any data d, the execution of h(p, d) will halt, where halt means return by a "return" statement so a system crash means doesn't halt, and if h(p, d) returns 1 then the execution of p(d) wil...
I'm studying Digital Logic and Design. And in the first chapter, there's all this information about various binary codes. I did some searching on youtube and found this awesome video - https://www.youtube.com/watch?v=lKTsv6iVxV4&t=5s. Now, my question is, If 2's complement is the best way to represent numbers in comput...
How is an ISA written? Is it just a bunch of binary combination encoding presets that is stored onto RAM? In other words, is it basically a “dictionary” of binary being defined as an instruction ‘word’ such as add? Once the instruction ‘word’ is recognized, does that mean an action is defined/assigned in that ‘word’? F...
I have a language that contains all encodings of the Turing machines that accept at least one word. Is this language recursive, recursively enumerable, or neither?
I thought of a problem but have no idea how to solve it. The problem is as follows: Given 2 numbers, n and r, find the side length (S) of the smallest square that encloses n circles each of radius r without any overlap among any of the circles. I though about a greedy approach that would find the optimal position for ...
Is there any algorithm for finding the minimum weight maximal independent set? Instead of finding all maximal independent sets and keeping the one with less weight, is there any easier method to do it?
After reading Lamport Algorithm for Mutual Exclusion, I can not understand the purposes of reply messages. I think they are not necessary because the assumption of the algorithms is that all messages are delivered in order and no message is lost. In addition to that, the algorithm uses Lamport logical clock, so the req...
Assuming $L \in NP$, meaning that L could be verified by some $V(x,y)$, such that there exists a polynomial $P(X)$ such that $|y| \leq P(|x|)$ for every $x \in L$. I was wondering - can I assume something about the possible witness space? My intuition says that this number is bounded by $O(2^{P(|X|)})$ (all possible su...
What does $\mathsf{AC^0}$ many-one reduction mean? I know about polynomial time reductions, but I'm not familiar with $\mathsf{AC^0}$ reductions.
Under the assumption that a PSPACE-hard problem A can be solved in polynomial time, is the following argumentation valid? Since every problem in PSPACE can be reduced to A in polynomial time, every problem in NP which is a subset of PSPACE is included. That means that each Problem in NP is solvable in polynomial time ...
I decide to learn more about dynamic programming, so I started reading the Dynamic Programming chapter from the CLSR book. The first example problem presented there is Rod Cutting (15.1). Given a rod of length n and a list of prices for rods of any sizes figure out how to cut the rod so that the price of the pieces wil...
The question is pretty short, but I've been thinking about it quite some time: Are terminal symbols that are not in the defined alphabet still valid?
The paper "Model Checking TLA+ Specifications" published in 1999 explained how TLC (Temporal Logic Checker) checks safety properties written in TLA+ developed by Lamport. At that time, TLC did not yet check liveness properties. Today, TLC is able to check liveness properties. I want to know: What liveness properties ...
Counting sort is originally like below code. for (int i = 0; i <= 5; i++) c[i] = 0; for (int i = 1; i <= 8; i++) c[a[i]]++; for (int i = 1; i <= 5; i++) c[i] = c[i] + c[i - 1]; for (int i = 8; i >= 1; i--) { b[c[a[i]]] = a[i]; c[a[i]]--; } In the above, last for loop iterates from last index because of stabili...
I am trying to infer the type and prove that this is well-typed: let $f =\lambda x.x$ in $f f$ Obviously the $f$ is the identity function, so it's the same as let $id =\lambda x.x$ in $id$ $id$ I am trying to use these rules to infer the type, going bottom-up: First I am using (T-LET') and on the left-hand side it's e...
I'm a bit confused about the definition of the Minimum Cost Flow problem, in terms of the edge cost (or weight) values. I don't remember a integral requirement on the cost/weight values for the edges when first learning the problem. But when I start to look for implementations, most algorithmic code I found require th...
I have a book from my university that claims: There is an linear algorithm that can convert BDD to CNF in linear time, and generate CNF in linear length of the BDD size (number of nodes). Then they wrote an exercise to find one... Actually I tried to do so, I thought to find the paths that brings me to 0, and then ...
$$L=\{uv\in\{0,1,2\}^*\mid u\in\{0,1\}^*,v\in\{1,2\}^*, \text{ and }u\text{ has the same number of 1s as }v\}.$$ Here is my attempt solution, but it is not completely correct, any hint is appreciated (not sure how I can ensure that $u$ and $v$ to have the same number of 1). \begin{align} S &\rightarrow S_l \mid S \mid...
Edit: I've pinpointed that the difference between solutions occurs when I apply the $H$, up to there, the solutions match. So, perhaps it is better to phrase my question as: how to apply an $H$ gate to one qubit in a 2-qubit system? End Edit I have the following quantum circuit, and I need to calculate the values of th...
I've been learning about the Halting Problem and the proof that it is undecidable in its general case. The proof that it cannot be solved generally goes something like this: Assume that some machine $H$ exists that can solve the halting problem on a given machine $A$ with input $x$ ($H$ determines whether the machine ...
To answer the question below, 4-SAT: Given a formula in Conjunctive Normal Form, where each clause contains exactly 4 literals, does it have a satisfying truth assignment? I was going to prove that 4-SAT is in NP-complete. But I saw that the way to prove CNF-SAT is in NP-complete is a bit different to the way of provi...
I've read some posts about counting the number of assignment inside code of finding the maximum value in array like this: FindMax(L): n = len(L) max = L[1] for i = 2..n: if (max < L[i]) max = L[i] (**) return max According to this post and post, it's about the array that elements are stric...
Solving $T(n) = \frac{1}{n}(T(0)+T(1)+...+T(n-1)) + cn$ for all $ n \geq 1$ Subbing few numbers in we get $T(1) = T(0)/1 + c(1)$ $T(2) = \frac{T(0)+T(1)}{2} + c(2) $ Which is kind of going backwards as I am going back to finding T(n) So I am kind of confused about it, any idea? Are we even able to unroll this reccurenc...
Show that the following language is NP-complete $$ L = \{ \langle G,k \rangle \mid \text{$G$ is a graph with a set $S$ of $k$ vertices hitting every edge of $G$}\}. $$ I know I should reduce the problem to SAT. But how I can do it?
In the 2004 paper "A Read-Only Transaction Anomaly Under Snapshot Isolation" by Alan Fekete et al. (which can be found here and here) the authors state: We also note that any execution of T1 and T2 (with arbitrary parameter values) without T3 present will always act serializably. I have tested this claim inside Postg...