instruction stringlengths 35 29.1k |
|---|
Let G be a grammar with non-terminal A, terminal a and these productions:
A -> A a
It is obvious that this grammar cannot be parsed. There is no way to "exit" the parsing process. However, I am not sure at what point I would determine the LL(1) property.
Let's first look at the FIRST set for A. By looking at our rule,... |
I read in Algorithms in C by Sedgewick that we can easily prove by induction that breadth-first search algorithm computes the shortest path from one vertex to another (unweighted graphs or weighted graphs with edges = 1). I have written the proof below. Is it correct?
Statement S: Given two vertices $u$ and $y$, BFS c... |
Given 2 recursive - decidable languages $L_1$ and $L_2$ is the problem $L_1 \subset L_2$ solvable - decidable?
Since both $L_1$ and $L_2$ are recursive - decidable there exist Turing Machines say $M_1$ and $M_2$ that decide them.
Say that the problem stated is decidable then there exists a Turing Machine $M_3$ that giv... |
I have found utility in state machines that do not have the complexity of recursion: no self or ancestral transitions.
Is there a name for this sub-category of FSMs? Are they commonly used or considered broadly useful?
|
First question on this forum.
When I'm using a proxy in a browser (not on the whole system) what happens to DNS requests? What I mean is, are DNS requests going through the proxy as well, or are they being handled separately, thus exposing your my IP? Does it depend on how a proxy server is configured, or does all prox... |
I have a graph whose edges can be very efficiently represented as a set of complete biparti graphs (that may share nodes). Is there a name for such a representation?
And secondly. I want to enumerate the maximal cliques in this graph. Intuitively the more compact representation of the graph should improve performance. ... |
When i tried to find the time complexity of this recurrence relation with the master theorem, I got log^2n, but I'm told that it's logn.
I used the masters theorem, for this case.. a=b^k (1=4^0) ... This means that this is a case 2 in the masters theorem. Then p in this case is 1 since log^1n. So the answer for case 2 ... |
I have difficulties in proving that for the given language:
$E V E N_{T M}=\{\langle M\rangle: M$ is a TM s.t. $|w|$ is even for all $w \in L(M)\}$.
prove that:
$E V E N_{T M} \in coRE$
I've tried to look at $(E V E N_{T M})^\complement$ and prove that :
$(E V E N_{T M})^\complement \in RE$
by building TM M', that wi... |
I've been spending time strengthening my ability to conduct inductive proofs and made one for the mergesort algorithm - specifically the merge part, as the entirety of the algorithm is comparatively trivial with an assumption that merge functions properly. I would like another pair of eyes on my proof to know if my arg... |
I have recently finished reading the section on Distributed Systems in OSTEP. For NFS, they briefly mention the cache consistency problem and say how it is solved for reads by maintaining an attribute cache (though there will be inconsistency if any reads occur between attribute updates) and that for writes it is "solv... |
I'd like to start by clarifying I'm by no means an expert in any of this, so take everything I say with a grain of salt.
Convex and Non-convex Optimization are subfields of mathematical optimization that focus on minimising convex and non-convex functions respectively. That is, finding the global minimum of functions w... |
I was thinking about this question and thought about it for quite a while but couldn't come up with an answer.
Firstly, we fix two sets $R$ and $S$. We consider "cycles", which are tuples in the form of $(a_1, a_2, \cdots, a_k)$, where $k$ is not necessarily $N$, such that
All elements belong to $R$. That is, $a_i \in... |
given the following languages:
$INFINITE_{T M}=\{\langle M\rangle: M$ is a TM with $|L(M)|=\infty\}$.
$R E G_{T M}=\{\langle M\rangle: M$ is a TM with $L(M) \in \mathrm{REG}\}$.
prove the following reduction:
$I N F I N I T E_{T M} \leq_m R E G_{T M}$
I'm having difficulties, building the $M_f$ machine
would love for... |
Given a language $L$ that is recursive prove that $Prefix(L) = \{ x \ | \ xv \in L\}$ is recursively enumerable.
My first attempt at this was to try and formulate an algorithm in pseudocode.
Prefix-Recogniser(x)
for v in Σ*:
w = xv
if L-Decider(w) -> YES:
return YES
Since $L$ is recursive a decider... |
Quicksort is O(n log n) average case, and O(n^2) worst case. The worst case occurs if one side of the pivot contains all of the elements and the other side contains none. However, I think the worst case would also occur if there is only one element on one side of the pivot each time and the rest on the other side. Is t... |
Suppose that we are given a graph $G = (V,E)$ and a number $n$. The problem is to find an independent set $I$ with $|I| = n$, such that number of vertices covered by $I$ is maximized (that is, the number of vertices adjacent to at least on vertex from $I$). My question: suppose that this problem's name is $\tt{BIVC}$; ... |
The Question
A regular expression, such as AL+[EYI]+, represents a set of strings.
alleys = {
“ALY”,
“ALLEY”,
“ALLY”,
“ALLEE”,
et cetra...
}
Let $\mathbb{AS}$ be the set of all strings $\sigma$ such that there exist natural numbers $x_{1}, x_{2}, x_{3}$ such that $x_{1} < x_{2}$ and...
$$
\for... |
Though purely functional programming languages, such as Haskell, is commonly thought to have no side-effects, there is a caveat: Recursive calls may hang.
I considered this to be undesirable, and thought about what if I force every recursive call to halt.
Formally, for every recursive call, the fixpoint combinator fix ... |
Red-black trees are defined to have the following invariants:
The nodes are in sorted order (it is a binary search tree).
The root is black, and leaves are black.
Every red node has black children.
Every path to the root passes through the same number of black nodes.
There is also an obvious "empty" operation (just a... |
I'm working my way through Leino's "Program Proofs" and I was following as far as the semantics of variable assignment, but I'm not quite sure why this is a valid Hoare triple:
{forall x::Q} var x; {exists x :: P}
where P is the weakest precondition and Q is the strongest postcondition. I'm not following why allocatin... |
The following excerpt is from page 39 of the 4th edition of 'Introduction to Algorithms' (emphasis added):
2.3.2 Analyzing divide-and-conquer algorithms
[...]
A recurrence for the running time of a divide-and-conquer algorithm falls out from the three steps of the basic method. As we did for insertion sort, let $T(n)$... |
I was reading the book "Types and Programming Languages" by Benjamin C. Pierce, paying attention to proofs so I could learn proof techniques.
In the parts discussing the simply typed $\lambda$-calculus, I came across a theorem called "Uniqueness of Types", and its proof details are not given, so I tried to write down d... |
I am motivated by the idea of generating “words” or “pairs” in a programming language or set of commands.
For example, consider any arbitrary REST API.
Beyond requesting the original URL endpoint, assume the structure of the API commands are keys and values (a dictionary of parameters).
Some of the parameters may be re... |
I know P is closed under all Boolean operations, but what about NP?
is NP closed under set difference and symmetric difference?
is this table accurate?
Edit:
updated table:
|
Typcial links are unidirectional, which has the drawback that the link
will point to invalid if its target is moved or deleted.
Bidirectional links would provide the possibility to update.
Moreover: If the target of a link is a location (folder etc.)
a bidirectional link would allow to show the "back-link" at the targe... |
The CS50 course by Edx that I am pursuing has this statement in their Week 4 practice set:
A 24-bit BMP file, then, is essentially just a sequence of bits, (almost) every 24 of which happen to represent some pixel’s color.
If I understand correctly,
101010101110101010101011 will represent a color.
How the length and br... |
I wrote the following table for all the closures in those classes.
is anything there incorrect?
also, would appreciate help with coNP and coRE closures. couldn't find much information about it online.
|
Minimum equivalent depth-d expression ($MEE_d$) is defined as:
Given a depth-d Boolean formula $F$ and an integer $k$, is there an equivalent depth-d formula of size at most $k$? For every $d\geq3$, the problem $MEE_d$ is $Σ^P_2$-complete under polynomial-time Turing reductions.
Now, the depth of the formula is by defi... |
This is a bit of a different question than those usually posted here; I hope it is on-topic enough, as it is specifically concerning computer science. It's been bothering me for a while, and my efforts to find discourse on this elsewhere have failed:
What are some good introductory experiments or research projects that... |
Given a set of k array :
K = [k1 ,k2 ,k3 ,... ,kn]
we want to build a tree such that its root node is k_m ,where m is the highest value in the list and its connected to every other node and again every node is connected to every other node : Ex-
This is a example of such tree made out of array of 4 arrays:
Another exa... |
The game being played here has the following rules, played be a singular player: there is a 5x5 board, where some tiles are highlighted and some are not. From here, the player can highlight the blank tiles, but they can't reverted a highlighted tile to blank. when a tile is highlighted, the player gets a score for that... |
Let $Q$ be a query in the fragment of SQL built up from basic $SELECT$ clauses using
subqueries with $EXISTS$ and $NOT EXISTS$. Then for each such fixed query $Q$ I'm trying to show that there is a polynomial-time algorithm that takes as input a finite database $D$ and determines the set of outputs of $Q$ on $D$.
I'm n... |
I am working on a solution that can say if an initial composition is going to live forever or eventually die without calculating each generation until it reaches a stable or an ever-repeating cycle in a finite-grid. (I know Game of Life is supposed to work in an infinite grid but we all gotta start somewhere)
I am seei... |
I have briefly looked through the links at the bottom of this page:
Interaction Nets
Interaction Combinators
Implementation of a low-level language for interaction nets, Shinya Sato
Inpla, Interaction Nets as Programming Language
Towards a Programming Language for Interaction Nets, Ian Mackie
An Implementation Model f... |
In the context of surveillance, I am working on a project where the goal is to find an algorithm that determines a path along a polygonal area, connecting a root node to a target node, while maximizing the surveillance area covered within the polygon. The given inputs for my algorithm include a root node, a target node... |
I have been recently thinking about activation functions and the explainability.
For sigmoid and tanh activation functions, I am thinking of them to be similar to logistic regression as the output of the activation function is very close to binary. So, to me the neural network is making simultaneous decisions and that ... |
I want to transmit values over an error prone channel. When transmitting analog values, the precision degrades smoothly when the transmission becomes worse. But when transmitting binary integers, an error in the first bit has catastrophic consequences.
Now say I want to transmit an 8 bit integer, I could transmit 256 b... |
I want to know how can I reduce Subset Sum or Partition problem to N3DM problem in which each set has exactly 3 elements and same sum.
N3DM Problem: https://en.wikipedia.org/wiki/Numerical_3-dimensional_matching
|
Is it possible to show, by reduction(Reduction in the length of the path and the running time), that for a Turing machine M and an input X, there exists a run in which M accepts X if and only if there is a path from the initial configuration in M's run on X to some accepting configuration
|
Consider the following schedule -
T1 T2
R(A)
W(A)
R(A)
W(A)
Commit
Commit
I understand that this schedule is non-recoverable, because if a failure occurs between the two commits, then we can't rollback the operations performed by T2, as they would already have been committed.
But, if we chang... |
Consider the bin packing problem where we are given item sizes $a_1,\dots, a_n \in (0, 1)$, and all bins have capacity 2. The task is to pack the items in as few bins as possible, such that the total size of items in each bin is at most 2.
Is it possible to show that the First-Fit-Decreasing algorithm computes an asymp... |
Lets assume P = NP, so all problems in NP are decidable in polynomial time,
Therefore I can solve all problems in NP in polynomial claiming P = NP = NPC.
But then, how come Σ* belongs to P = NPC because I can't reduce the even length string language (as an example of a language that is not trivial) to Σ*?
one of the st... |
I wrote this c++ code for a operator precedence parser.
it works perfectly for expressions without parentheis.
Eg: i*i+i is accepted
#include <iostream>
#include <string>
#include <unordered_map>
#include <stack>
#include <vector>
#include <fstream>
std::unordered_map<std::string, std::vector<std::string>> grammar = {... |
What would Helman-JaJa listrank pseudocode be like? I tried looking around but all I found were "prosecode" descriptions (eg pp. 18-19 here) which I find kinda hard to follow.
|
When proving the non-computability of the Busy Beaver function by contradiction, people create machines that are able to calculate the Busy Beaver function, BB(n), and also write more than 1s than BB(k), where k is the number of states of such machines.
Proof link
I would like to know why this is proof that BB(n) is no... |
Let $G$ be any CFG Grammar. There exists number $K$ dependent to $G$ so that for each $w\in L(G)$ with length bigger or equal than $K$, we can be write $w=uvxyz$ such that $uv^nxy^nz \in L(G)\; \forall\,n\geq 0$ and $|vy|\geq 1$.
My question is that this statement does not include the case of $|vxy|\leq K$. Should it b... |
I have briefly read through much of the Interaction Combinators paper, and am looking at this blog post for some help, but they both just say basically "each node in the graph must have one active port, and zero or more secondary ports", without explaining what ports are or what ports do, from a software and programmin... |
I remember seeing a list of False Proofs when I was taking Discrete Maths and I found it to be very interesting and also helpful.
So, if anyone knows some common proof mistakes students make or some cool sneaky way to trick people in a proof send them my way! Bonus points if they're cs/algorithms related.
Thank you so ... |
I have an exercise on paging and page tables that I can't get my head around.
So the data is: my virtual addresses are 32 bits long, 1 page is 1 KiB, 1 PTE is 32 bits big and 1 page table is 1 page.
And then the prof asks how many page table levels are needed for this addressing.
so my solution would be:
I can calcula... |
I have been doing web/app development for a few years, primarily involving high-level programming and stuff. However, I am interested in jumping into some low-level stuff and genuinely understanding how computers work.
There are a lot of resources online that I found myself being overwhelmed by all the choices. General... |
Consider the $k$-center problem where we are given an undirected, complete graph $G=(V, E)$, with a distance $d(u, v) \geq 0$ for each pair $u, v \in V$. Furthermore, we assume that the triangle inequality holds: for each triple $u, v, w \in V$ it is the case that $d(u, w) \leq d(u, v)+d(v+w)$. The goal is to find $k$ ... |
Given a collection of sets $C=\{S_1, S_2, \ldots, S_n\}$ with each $S\in C$ holding some integers, I would like to find a pair $\{x,y\}, x\ne y$ such that $\{x,y\}\subset S$ for the highest number of $S\in C$ among all such pairs.
Is there an efficient algorithm to find such a pair?
|
We have a binary raster image in which we consider the white blobs (connected components). We define a distance between two blobs to be the length of the shortest path between any two respective pixels (topological distance), or alternatively the shortest Euclidean distance between two pixels. In general the two defini... |
Reading the manual for GNU grep, the special characters (with -E option) are .?*+{|()[\^$.
This is a somewhat pedantic question, but why are ] and } omitted? In particular it says in section 3.1 "An unmatched ) just matches itself", which is true for ] and } as well.
I think it is just a slightly sleeker description of... |
How to provide a reduction from 3SAT to domatic number problem.
Domatic number problem: Given a graph $G = (V, E)$ and an integer $k$, can we partition $V $ into at least k disjoint sets of vertices, such that each set is a dominating set of $G$?
I have made many attempts, but still have no clue.
|
From my understanding, something like Linux is very geared towards C programs, with things like libc. What I'm wondering is, even in Java, you have arguments to your "main" program. The same thing occurs in C. From my understanding, this is just some data the kernel puts on an anonymous page for the stack of the proces... |
The fourth edition of 'Introduction to Algorithms' defines algorithmic recurrences on page 77 as follows:
**Algorithmic recurrences
[...] A recurrence is algorithmic, if for every sufficiently large threshold constant $n_0 > 0$, the following two properties hold:
For all $n < n_0$, we have $T(n) = \Theta(1)$
For all ... |
I am trying to solve problem in leetcode:
https://leetcode.com/problems/redundant-connection/description/
*finding redundant connection in undirected graph
And now I am writing a solution, inpired by Kruskal's algorithm:
https://en.wikipedia.org/wiki/Disjoint-set_data_structure#/media/File:UnionFindKruskalDemo.gif
In s... |
Disclaimer: I'm studying for an exam, but I don't have to hand in anything.
I have the state transition diagram of the FSM and its states encoding:
I want to find the sum-of-products (SOP) Boolean expression of $S_0^1$, $S_1^1$ and output $y$. I've drawn tables for each next state, based on all current states ($S_0... |
or wich phenomena have behavior that can be measured and described as a function between natural numbers but seem to be hard to simulate with digital hardware when the starting conditions are given.
|
I have read the definition of treewidth/tree-decomposition both in Wikipedia and in here:
https://medium.com/@karlrombauts/treewidth-how-all-graphs-are-trees-in-disguise-ec699b69e2fb
I'm finding something hard to understand why the treewidth of a tree is $1$. By the definition of tree-decomposition, I may select to hav... |
I came across the following question:
Given two context-free languages $L_1$ and $L_2$ is it decidable whether $L_1 - L_2 = \emptyset$ ?
The problem $ALL_{\text{CFG}}$ that states:
Given a CFG $G$ then $L(G) = Σ^*$ is known to be undecidable.
So I thought to fix $L_2$ to be $Σ^*$ and allow $L_1$ to be any context-fre... |
Let the vertices of the graph G be the numbers 1, 2, ..., 100, and two (different) vertices be adjacent if and only if at least one of 2, 3, or 5 is a common divisor of the respective numbers. Determine χ(G), the chromatic number of the graph G.
I tried to solve and got that all even numbers i.e 2,4,6,...,100 form a cl... |
In Algorithm Design and Applications by Michael T. Goodrich and Roberto Tamassia Chapter 12.3 there is a presentation of a problem called the Telescope Scheduling problem.
Given n requests each with benefit, start time and end time, find the best combination of non conflicting requests that maximises the total benefit.... |
As far as I know for Non-Deterministic Turing Machine (NTM) there are 4 kind of branches:
An input is accepted if there is at least one node in the tree that is an accept.
An input is rejected if all branches are rejected, which means that it is a finite tree.
An input is not-accepted if there are loop nodes with reje... |
Pages 90-91 of 'Introduction to Algorithms' (4th ed.) show how the substitution method can be used for determining the upper bound on the recurrence:
$$T(n) = 2T(\lfloor n/2 \rfloor) + \Theta(n) \tag{4.11}$$
We guess that $T(n) = O(n \lg n)$ and try to prove $T(n) \leq cn \lg n$ by induction.
I can follow the proof for... |
$L^\complement$ = the complement of L
is it true that if
$L\in NPComplete $
and
$L\leq_p L^\complement \rightarrow P=NP$
basically asking if the following statements are correct
$if (L\in NPComplete ) and (L^\complement \in NP)\rightarrow L\in P\rightarrow P=NP $
|
I'm working on an exercise (not relevant for evaluation) that involves constructing an equivalent nondeterministic stack machine from a given machine with epsilon-transitions. However, I'm having trouble understanding Definition 2, specifically the line
Could someone please explain this line and guide me via hints thr... |
I have $n$ items $a_1, a_2, a_3 \cdots a_n$ and I want to find the least number of groups, but there is a list of constraints that $a_i$ can't be in the same group as $a_j$. Is this problem NP-Hard or is there a solution which does not Require Brute-Forcing the problem.
For Example I have $n=5$ items: $a_1, a_2, a_3, a... |
#Positive-2SAT is the problem of counting the number of satisfying assignments to a given Positive 2-CNF formula i.e 2-CNF formulas in which each literal is a positive occurrence of a variable.
The following variant of #Positive 2-SAT is defined as follows :
For example ,We are given a set of variables :
(a,b,c,d,e)
Th... |
I know that there is no way to prove that P = NP, but how would one go about proving constant time /= P (i.e. O(1) /= POLY(n))?
(Or perhaps that any two other complexity classes do not equal each other).
If anyone has any papers on this, that would be really helpful :).
|
Input: code $u$ of a Turing Machine working on a binary alphabet.
Question: Does $M_u$ accept all words $w \in \{0,1\}^*$.
This is of course an undecidable problem. I wonder if the problem is semi-decidable or the complement of the problem is semi-decidable.
Initiatively it can't be semi-decidable that would require te... |
I'm a little confused by the concept of a "negative" edge weight. All of the examples I have seen represent negative edge weights as negative numbers. Is it possible for an edge weight to carry a negative weight, and be represented as a positive number?
As an example, suppose we had a graph of a network where the edg... |
In a graph with 99 vertices, two vertices have a degree of 3, and the degree of the other vertices is 4. Show that the graph contains an odd cycle.
I figured I have to show that the graph cannot be divided into two classes meaning
there is an odd cycle , but I cannot show how?(
|
I have the following question (prefacing this with the fact that this is a question from an exam, I am currently studying but am stumped so reaching out for help).
The answer to the following question must NOT use Strassen's algorithm and every arithmetic operation is considers as $O(1)$.
Given two square matrices $A$... |
When my professor explained how the OS handles memory, he described demand paging, and how when a process starts up, the code page with the first instruction is loaded into memory, and everything else is loaded on-demand.
I haven't been able to find more information on this, but I'm curious if the stack would be alloca... |
From my understanding, physical memory (main memory -- DRAM) is addressed differently than disk. This is all a bit of an abstraction to me, and I am hoping to make my understanding more concrete.
Page tables store physical addresses in RAM. They may be marked invalid in the hardware to generate a trap to the OS (page ... |
I am wondering how disk addresses are accessed from a program. From my understanding, the two main facilities are programmed I/O (instructions) and memory-mapped I/O (simply loads and stores). The second is usually just loads and stores into a specific part of memory that maps into the device.
Is it common for memory-... |
Is there a translation between unit/bind and fmap/join in monads?
https://stackoverflow.com/questions/34398239/with-monads-can-join-be-defined-in-terms-of-bind
gives a partial one:
bind f m = join (fmap f m)
and
join x = bind x id
but can we express fmap in terms of unit and bind
and unit in terms of fmap and join?... |
Let's say I have a compute workload that is so large that it has to be spread between 10 identical server nodes, each with processors, memory, storage and network interfaces, and the workload requires a lot of traffic between these nodes. Now, suppose one of these nodes is down. In that case, the intermediate data and ... |
I was studying about the minimum pumping length of the language $L$ containing all palindromes over $\{a,b\}$ from this material about the pumping Lemma for CFLs.
The productions are as follows:
$$S\to aSa \mid bSb \mid a \mid b \mid \lambda$$
We have two cases to deal with,
when the string $w\in L$ is of sufficient ... |
Abstract Problem
I'm looking for a data structure that will (1) allow me to make queries of the form A.x - B.x <= 0.1 AND A.y + B.y >= C.y + D.y and (2) allow reasonable (let's say O(n) is sufficient) updates to x and y. The query is meant to be read, "in the query space there are two objects, A and B, that are very cl... |
So, the way I understand merge sort: We split an array into two halves, then we split those halves into halves, etc. until we get arrays that can be split no further. We kind of build up a tree in the process. Then we do what I call "compare, sort, merge." Starting with the unit-length arrays, we compare the first elem... |
(Consider $T=true$, $F=false$)
I apologize for the simple question but I'm confused as to what is a tautology and what isn't and I haven't found a clear definition. I think that a tautology is a propositional well-defined formula which is true in all states. Does this allow $T$ v $F$ to be a tautology because it is tru... |
When you address physical memory, in the kernel, is it just another value like 0xf78f9 just like virtual addresses (and the only thing that is different is that the processor is in real-mode)? Is it all contiguous (from my understanding it is a concatenation of the Physical Page Number and the Page Offset)?
How can you... |
If a machine can decide a context-sensitive language (like the language of palindromes with a non-linear center) is that fact a proof that the machine is Turing-complete?
Can this be used to prove Turing completeness of a programming language when a program that can decide a string of a context-sensitive language can b... |
I have an algorithmic problem that I managed to reduce to the following form:
Given a graph with $N$ elements, select exactly $K$ elements to maximize the following:
$$
\max \Sigma_{k \in K} V(S_k) + \Sigma_{k \in K} \Sigma_{j \in K} E(S_k, S_j)
$$
The unary values $V$ and binary values $E$ can be considered given. The... |
I have this hypothesis class:
H = {ha : R → {0, 1} | a > 0, a ∈ R, where ha(x) = 1−a,a =
{ 1, x ∈ [−a, a]
0, x ̸ ∈ [−a, a] }
I need to compute the growth function for m>= 0. So I think that this function has the VCdim=2 because you can't realize label (1, 0, 1), but I don't know how to calculate the growth function.
|
I have an undirected graph which grew according to a recursive algorithm, i.e., it started with a single vertex and then, one after another, new vertices arrived and connected to existing ones.
Now, I'm given the graph with, say, $n$ vertices. I would like to estimate (efficiently) which vertex was the first one. How c... |
I am trying to costruct an $f$-timer for the function $f:\mathbb{N}\rightarrow\mathbb{N}: x\mapsto \lfloor cx^2\log x\rfloor$ for a proper constant $c>0$; so I need a TM that for every input of lenght $x$, the computation finished in time $cx^2\log x$. How can I approach this problem? Thanks in advance.
PS: my definiti... |
What is the complexity class of the problem if there exist two different interpretations that do not satisfy a given Boolean formula? I believe the problem of existence of an interpretation that does not satisfy a given Boolean formula is in P
|
Suppose I have two function that always return 1 + 1:
def one_plus_one():
return 1 + 1
and Python's eval(x) that accepts any string as input and produce any possible output as the current computer can execute.
So, can I say that the one_plus_one function is a Finite Automata (or Finite State Machine) and Python's ... |
I am trying to solve the single source shortest path problem, but with the added constraint that there is an additional weight on each edge (so we have two weights in total for each edge, call them p and q) and for this additional weight, we want the shortest path to be strictly monotonically increasing along the whole... |
In my Computer Science graduation, I came across this concept of Belief Revision, which focus on knowledge representation and the possible operations that can be done with the facts that a "rational agent" knows.
I'd like to know what are the applications of that field in real life and some examples of software being u... |
Most lattice problems, such as the shortest vector problem, the closest vector problem, shortest basis problem, etc, are NP-hard and thus conjectured to be worst-case exponential time in the rank of the lattice.
However, suppose the rank is determined in advance, and is particularly low, like 2D and 3D. Then, the only ... |
There is the classical version of the minimum coins to make change problem where the change and the set of coins available are all integers. Given an infinite amount of each type of coin, we're asked the smallest number of coins required to make change for a given amount. This can be solved with dynamic programming, Py... |
I'm currently studying formal methods in software engineering related to state machines, specifically Mealy machines. This made me wonder how relevant Mealy machines really are for practical applications. I realize that a lot of applications are based on state machines which can at some level be modelled as Mealy machi... |
Let us say you have a polyotpe define as the intersection of halfplanes. That is you are given N half-spaces. The polytope is the volume defined by all points which lie on the positive side of all N half-spaces.
I want to make a mesh of the surface of the polytope. I.e. find the positions of the vertices plus their con... |
I have come across what seems to be a collapsed loop.
parallel-for i, j = 1...n
What would be the work and span/depth/critical path length be of loops like this? Would it be the same as that of the following:
parallel-for i = 1...n
parallel-for j = 1...n
EDIT:
Work = the asymptotic running time of the algorithm on ... |
This post introduces a new variant of 3-SAT called EQUAL-3-SAT where the number of clause is same as number of variables, and it is shown to be NP-complete.
I want to ask if the monotone version of this EQUAL-3-SAT is also NP-complete ,by monotone ,I mean where each clause can either contain all positive or all negativ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.