instruction stringlengths 35 29.1k |
|---|
I am asked to find
Prove that the following languages are regular languages:
(a) $\{a^nb^ma^k \mid n\geq3,m\geq1,k\geq1\}$
(b) $\{a^n \mid n\neq3 \text{ and } n\not\equiv2 \mod7\}$
(c) $\{a^nb \mid n\geq2\}\cup\{ab^m \mid m≥3\}$
I have a vague understanding of pumping lemma, and how to prove a language is not regular... |
I am trying to find the sum of 1 bits in the range between A and B inclusive,
where -2^31 <= A <= B <= 2^31 - 1
Input Format:
The first line contains the number of test cases T (<=1000). Each of the next T lines contains two integers A and B.
I have used Hamming Weight algorithm to solve this problem. Though I have us... |
I am asked to find
Prove that the following languages are regular languages:
(a) $\{a^nb^ma^k \mid n\geq3,m\geq1,k\geq1\}$
(b) $\{a^n \mid n\neq3 \text{ and } n\not\equiv2 \mod7\}$
(c) $\{a^nb \mid n\geq2\}\cup\{ab^m \mid m≥3\}$
I have a vague understanding of pumping lemma, and how to prove a language is not regular... |
I'm looking for subgraph isomorphism of at least K vertex between Graph A and B.
I only can come up with the dumbest algorithm, which is:
Compute all combination of vertices with length K of Graph A.
Run subgraph isomorphism test for every combination vertices against Graph B, probably using VF2 algorithm.
Upon resea... |
I know that most of the efficient sort algorithms can run with a complexity of $O(n\cdot log(n))$, but this is given an unsorted array.
However, given that the initial array is already sorted, is there an algorithm that can sort the array after multiplying several elements by 2 (or increasing them by some value) with ... |
I did study applied math and dealed almost exclusively with the creation of ode/pde solver code. Now, I want to increase my knowledge in some aspects and I want to learn some basic algorithms like A*, MinMax, ... (not limited to searching; I am also interested in the basics of optimization and machine learning) and the... |
I'm doing a presentation for a distributed systems and networks course.
I'm using the book "Design and Analysis of Distributed Algorithms", written by Nicola Santoro. This book contains the proof of equivalence between SPT and leader election but there are some points that I don't understand at all.
Santoro uses this m... |
I encountered the following question:
Given a relation R(A, B, C, D) with the following functional dependencies:
A -> B, C -> D, B -> C.
The BCNF Decomposition of R is:
A) {(A,B), (C,D), (B,C)}
B) {(A,B), (C,D), (A,C)}
C) {(B,C), (A,D), (A,B)}
D) All of the above
According to my understanding the solution should be D... |
I'm trying to do decryption using el gamal. The formula to get the message M is
$$ M=\frac{b}{a^x} mod \:P $$ In one case, we may have $$ M=\frac{18}{62^{62}} mod \: 71 $$ This value cannot be computed on a calculator as $62^{62}$ gives an infinite value. How do we get the value of M?
|
I need to prove that the following language is not regular
$\{c^mb^na^n \mid n>0,m\geq0\}$
But I am not sure how to do that for this particular one. I vaguely understand pumping lemma, but every example I see is in the form
$\{a^nb^n \mid n>0\}$
Or something similiar. This does not help me with my problem, becaus... |
We have $k$ sorted arrays, $A_1[1...n_1],...,A_k[1..n_k]$, where $n_1+n_2+...+n_k=n$.
How can we get the $m$ greatest elements in running time $O(k + m\lg k)$?
I have tried to use MIN-HEAP size of $k$ since we have $k$ arrays. I have to navigate through the ends of the $k$ array somehow. By extracting the min of heap a... |
My friend got me this really interesting puzzle
Each node can be slided or docked around the Truncated Octahedron, creating knots and tangles in the middle of the puzzle. The idea is to move the nodes around until there's a bunch of knots and then unravel the knots.
To solve this puzzle, you need to following conditio... |
I'm working through an example that looks like a fairly simple Karnaugh map and simplification, but I feel stupid that I can't seem to understand the correct answer.
This is the map:
My groupings:
This is the equation:
But I don't know how it simplifies to the correct answer here:
I understand why the NOT A goes ou... |
Consider we have $n$ vertices, $v_1,\ldots,v_n$. We have two positive values $(a_i,b_i)$ associated with each $v_i$. The edge weight $w(v_iv_j)=a_ia_j+b_ib_j$.
Is it NP-hard to solve the traveling salesman problem on this graph?
In the special case where all the $b_i$ are $0$, this is solvable in $O(n\log n)$ time. Bec... |
I'm having some trouble writing a DFA for the language $$\{w =b_1\dots b_k \in\{0, 1\}^* \mid b \ge 2 \text{ and } b_2=b_k\}\,.$$
What I thought for this is writing a DFA where there are 4 states, that accepts at the states (00) and (11), where the 1st element in the state is the 2nd element in the string, and the 2nd... |
I am trying to figure out what the time complexity is for a "Look and Say" sequence generator which receives an integer n and outputs the nth term in the look and say sequence.
I'm looking at the below code. It is a tail recursion, but I can't get the summation properly. Can someone please provide an explanation along ... |
I am new to this topic, Linear Time Temporal Logic and I am trying to prove this equivalence --
$\Box\Diamond f \Leftrightarrow \Diamond\Box f$
This is my take --
Basic definitions:
$(\sigma, j) \models \Box f: \forall k \, [(k \ge j) \Rightarrow ((\sigma, k) \models f)]$
$(\sigma, j) \models \Diamond f: \exists k \, [... |
I am trying to understand how camera matching (or match moving) works. I need to build a program that can move the camera in a way to match a 3D object to its projection on an image. For eg. if I had an image of a cube at some angle, the virtual camera must be moved in such a way that the points/vertices of the 3D cube... |
We've been given a weighted graph with marked nodes. We want to make a minimum-weight subtree from this graph that contains all marked nodes.
I want to show that this problem is NP-hard. Is there any idea to which problem is the best for reduction to this problem?
|
For proving language $\{a^nb^mc^nd^m \mid n,m > 0\}$ is not context free.
Do I have to use $z = a^pb^pc^pd^p$ as pumping lemma string where $p$ is pumping length?
Or do I have to use a string that would reflect than $n$ and $m$ does not have to be the same length?
|
Given two $n$-bits numbers $a$ and $b$, I am not sure on how to find the runtime of the euclidean algorithm for finding the $\gcd$ of $a,b$. The problem (for me) in here is that apart from the size of $a$ and $b$, I don't feel like I have any other information that will help me to know what is the runtime of the algor... |
Given the sum of weights of shortest paths between all vertices in a graph, how can I construct a connected graph that satisfies the given sum? That is, how can a graph with a given wiener index be created?
|
I'm exploring an algorithm that solves k-SAT. It uses a ton of preprocessing, so I'm thinking that this will be a circuit bounds.
Without knowing the runtime, I speculate on how quickly it will solve k-SAT instances. It will either solve all instances of k-SAT with probability $p$, or it won't be able to solve any in... |
Let a binary counter with the operations INCREMENT and DECREMENT.
I need to show that you can't implement this kind of counter with constant amortized time per operation.
Hence, I need to show that there's a series of $N$ operations with amortized time of $\omega(N)$.
My Try:
Let's assume we made $2^k-1$ INCREMENT op... |
Sorry ahead of time if some of my terminology is inaccurate, my formal training isn't quite to the level it should be.
Almost all programming languages with types separate built-in functions a + b and user defined functions f(x) into different steps of the compiler. a + b is dictated by some grammar that says something... |
Let
$\qquad \mathrm{DISJOINT} = \{ \langle M_1,M_2 \rangle : M_1, M_2 \text{ are TMs and } L(M_1) \cap L(M_2) = \emptyset\}$.
How do I know if this language is decidable or not? And How do I prove my answer?
|
I'm making a compiler/interpreter for a language similar to C. I already have a parse tree. I was able to evaluate expression statements by converting my code to another language and then using an evaluation engine. How do I properly evaluate functions using a parse tree? Let's say my function x looks like the followin... |
What is the time complexity of the following problem?
Definitions
A FIFO is a queue functional unit supporting four commands: PUSH (data to back of queue), POP (the head of the queue), PNP (POP the head of queue and PUSH it to the back), NOP (do nothing). Each command takes one unit of time to execute.
FIFO code (or a ... |
Let's say I have a struct_declaration_list of the following type. How do I reverse it?
struct_declaration_list
: struct_declaration
| struct_declaration_list struct_declaration
;
P.S. Sorry I don't know the exact name of this kind of list so I can't search. I just have this grammar.
|
Suppose that we have a tape restricted to $n$ cells on binaryalphabet $\Sigma = \{0,1\}$ and initially filled with zeroes.
We want to build a Turing machine $M_n$ (or better a Linear Bounded Automata) that "prints" all the $2^n$ numbers on the tape, i.e. for all $x \in [0..2^{n-1}]$ there is a time $t_x$ during the co... |
$L = \{x \in \{a,b\}^* \mid \text{$x$ starts with $ab$ but does not end with $ab$}\}$
I'm having trouble making a table for this NFA. I tried a few sketches out of the diagram and I can post them onto an image site if necessary. However if you choose to help, you can always put them in a table.
I get the main part, bu... |
A multitape Turing machine is defined to have input only appear on one tape, with the rest of the tapes blank.
Are there any formulations of a Turing machine that allow other tapes to be not blank? Why does the condition that the input only appears on one tape exist?
|
I need to understand a distinction to check if I understood a document classification problem right.
Given a training set of documents with ratings, that a user has given, let's say rating $r_{k} \in \{"like", "not \ like"\}$ of documents $ d_{k}$ with the features $f_{i} \in d_{k}$ (words, with their frequencies).
Do ... |
I'm trying to prove that a language is not regular. That language is:
{w ∈ {a, b}* | amount of a's in w is equivalent to the amount of b's in w, mod 2}.
I have an inkling that this language is not regular, so when I go to apply the pumping lemma, I would apply it on some subset of the language, and the pump on that, r... |
Problem formulation: Given a list $L$ of $n$ points in the Euclidian plane and a reference point $R$ also in that plane, find a closest point $P\in L$ such that, for all $X\in L$, $|PR|\le|XR|$.
Aditional constrains: Trivial algorithm will just iterate all candidate points in $L$, compute their distance to $R$ and sele... |
Language $A$ can also be represented as, $$A = \{ uvw \mid u,w \in \Sigma^*\text{ and, }v \in \Sigma^* 1 \Sigma^*\text{ and, }|u| = |w| \ge |v| \}$$
Language $B$ can also be represented as, $$B = \{ uvw \mid u,w \in \Sigma^*\text{ and, }v \in \Sigma^* 1 \Sigma^* 1 \Sigma^*\text{ and, }|u| = |w| \ge |v| \}$$
I have to p... |
We are given finite sets $A$ and $B$ and a set $S\subseteq \mathcal{P}(A)$. The members of $\mathcal{S}$ may have arbitrary intersections with one another and their union is not necessarily $A$. We wish to determine whether there is a function $A\to B$ so that no member of $B$ is the image of more than $k$ members of... |
The max-flow min-cut theorem states that the value of the maximum flow is equal to the minimum cut capacity.
It is possible that the max-flow and min-cut is equal to $\infty$.
However, reading Introduction to Linear Optimization by Bertsimas and Tsitsiklis, I get the impression that the max-flow and min-cut problems ar... |
In the lecture notes I have got in class I have the following proof for the halting problem not being recursive
Assume $H$ is recursive and TM $M_1$ decides it.
Construct $M_2$ that
gets input $x$ in $\{0,1\}^*$ and transform it into $x*code(x)$
applies $M_1$ to $x * code(x)$
if x is in SA (Self Accepting), $M_1$... |
Having trouble with this homework problem. In order to show that A is Turing recognizable and decidable.
$\text{EVEN} = \text{binary strings with even length}$
$Let\;A = \{(M) | \,M\; \text{is a DFA such that L(M) is not the same as EVEN}$
$\text{Show that A is Turing-recognizable}$
$\text{Show that A is decidable}$
... |
Which domain does this problem belong to?
Given a set of products some are classified as cheap and some not. The task is to determine the price range (probabilistic) for cheap products.
Supervised classifiers arrive at a function and can classify a new instance but does not provide the range of feature values. This see... |
I am reviewing things I learned, and I can't suddenly come up with an example of reduction that is not many-one, but Turing reduction. Can anyone present such an example?
|
Let G = (V,E) be a unit-capacity graph with n vertices and m edges.
Let T denote all the spanning trees in G.
If we run Karger's algorithm, we will get a random spanning tree in T formed by the contracted edges, we denote this distribution of spanning trees by D1.
On the other hand, if we assign a random weight in (0,1... |
Why learn finite automata when Turing machines do exactly the same thing? Turing machines accepts the same languages and more so what's the point?
|
I understand how you can use a contradiction in regard to a DPDA to show a language has finitely many Myhill-Nerode equivalence classes, but what is the method used to show each string of a language accepting palindromes is in its own Myhill-Nerode class?
Thanks
|
Suppose $L$ is an infinite CFL, and $G$ is a grammar with finitely many ambiguous strings which generates $L$. Is it possible to convert $G$ into an unambiguous grammar which also generates $L$? If so, how would I go about doing this? One starting approach I see is to have rules of the form $S \longrightarrow w $ in... |
The Böhm-Jacopini theorem states that any 'unstructured' program can be rewritten in structured way. There is a companion theorem that states that in this structuring process the tests that are performed may not be the same as the original.
Does anyone have a reference for this other theorem?
|
I was looking in here, and I noticed the best runtime for multiplication of two $n$-bits numbers is $O(n\cdot \log n \cdot 2^{O(\log^* n)}$, but I can easily notice an algorithm that runs in $O(n\cdot \log n)$.
After all, we know how to multiply two polynomials from degree $n$ in $O(n \log n)$ runtime. But multiplying... |
In Pierce's book, on page 26-27 it is given a definition of terms for a simple language using inference rules.
In the picture below it is marked by red highlighting the problematic part.
What is Pierce referring to exactly by the red-highlighted word term in this context?
Is he referring to the terms given by the gra... |
I am trying to implement a natural language query preprocessing module which would, given a query formulated in natural language, extract the keywords from that query and submit it to an IR (information retrieval system) system.
At first, I thought about using some training set to compute TF-IDF values of terms and use... |
i have to demonstrate that under the assumptions{Bidirectional Links, Total Reliability (no error during the execution), Connectivity, Distincts ids values, Multiple inititators (entities that starts the algorithm} the problems of constructing a spanning tree takes at least $\Omega(m)$ messages, where $m=|E|$
|
Let a dictionary with the operations insert(), delete() and search(). Each one of them has time complexity of $O(logn)$. Implement (efficiently) opposite() operation which return true if there are two opposite numbers in the dictionary (i.e. $5$ and $(-5)$)
I advised to use another data structure.
I thought about a ... |
Imagine I have a turing machine that can decide on a specific problem using a language. My question is that that problem (that can be decided by a TM M, with language L) can be encoded in a new language that is recursive enumerable.
If yes, this would mean that every solvable problem can encoded in recursive language; ... |
How do you write the CFG for the following language:
{ax by c ax+y}
Is there some formula or rules I need to follow? An explanation will be so appreciated.
What I tried is:
First I broke ax+y into axay which gives:
{ax by c axay}
Then
S ---> aSa | B
B ---> bB | c
The problem I am facing now is how to include ay.
|
There's been a fair amount of research on mutual exclusion algorithms - e.g. a lot of it is presented in classic textbooks such as The Art of Multiprocessor Programming, where an entire chapter is devoted to them.
I'm wondering what are the practical situations where one might need these algorithms during engineering o... |
So I wasn't sure weather or not this counted as "research level" or not but I figured it wasn't so I decided to post it here.
There is a paper by S. Bellantoni et al. called "Higher Type Recursion, Ramification and Polynomial Time (1999)" which can be found here. It mentions a notation of a complete type denoted $!\sig... |
In MIT's open courseware (http://courses.csail.mit.edu/6.006/spring11/lectures/lec15.pdf), I do not see how computing a set of numbers on the edge and the vertex will produce the shortest path.
Can someone please explain what information I can get by looking at the above example? How can I tell what is the shortest p... |
The notion of low information content is used to describe sparse sets and tally sets in complexity theory. Such sets can not be $NP$-complete unless $P=NP$. I am not aware of a formal information-theoretic definition which I hope would lead to insights into the phenomena of complexity hierarchy inside $NP$.
What are t... |
I am trying to solve this problem using a binary indexed tree. The problem can be summarized as follows:
You are given a series of commands that operate on an array initially
all zeroes.
1) Invert all bits from [a, b] (1 becomes a 0 and vice-versa)
2) Find the number of set
bits from [a, b] (bits that have value ... |
$$ x_1 + x_2 + \cdots +x_n = c_1 $$
$$ \frac{x_1^2}{2} + \frac{x_2^2}{2} + \cdots +\frac{x_n^2}{2} = c_2 $$
$$ \cdots $$
$$ \frac{x_1^n}{n!} + \frac{x_2^n}{n!} + \cdots +\frac{x_n^n}{n!} = c_n $$
$c_1,\cdots,c_n$ are known constants. $x_1 \cdots x_n$ are the unknown variables to solve.
|
I'm having trouble understanding the definition of Turing Decidable. The definition goes something like this:
TM M decides language L iff the strings in L put M into the Accept state
and the strings NOT IN L put M into the Reject state
My problem is.. the strings "NOT IN L"? How can the definition be based on what'... |
I'm struggling to understand a question I've been given. The question asks:
Let $\psi$ be a boolean formula in $n$ variables. There are $2^n$ different combinations of assigning
values to the variables. Consider the problem of deciding whether (strictly) more than $2^{n−1}$
of these assignments satisfy the formula $\ps... |
I want to scheduling $n$ teams using divide and conquer method for $n \in \mathbb{N}$.My approach is that if $n$ is even divide it to to group $\frac{n}{2}$ and $\frac{n}{2}$ but if $n$ is odd, add auxiliary team and scheduling $n+1$ team at the end we remove the last team and in table every match between $n+1$ team a... |
I am familiar with free and bound variables theory , but while learning I somewhere saw
this lambda expression
((lambda var ((fn1 var) & (fn2 var))) argument)
From what I have learned it seems to me as var is bounded in both fn1 and fn2. But the reference from where the expression is taken says that both var are fr... |
I need help with the following mock exam questions. True or false?
1.) If a non-trivial $(\neq \emptyset, \Sigma^*)$ finite set is NP-complete, then $P = NP$.
True. Every finite set is in $P$ and because of the $NP$-completeness every set in $NP$ can be reduced to this set. Is it right?
2.) $NP \subseteq coNP$ $\Leftri... |
I'm learning Dynamic Programming (By myself) and in the textbook there is this question:
Given two undirected graphs $G_1=(V,E_1)$ and $G_2=(V,E_2)$ over the same set of Vertices $V$ and a weight function $w: E_1 \cup E_2 \rightarrow \mathbb{R}$, let $P = \left\{e_1, e_2, ..., e_n \right\}$ be a path in $(V, E_1 \cup ... |
My semidefinite program amounts to two constraints, $L_1 = 0$ and $L_2 = 0$ where $L_i$ are linear functions of my variables $x_{ij}$ with the additional constraint that the $x_{ij}$ matrix is positive semidefinite. I see no way that this program would be infeasible, because just setting every variable to 0 would satis... |
Are there any languages that are infinite (that is, they contain infinitely many strings) but which do not have any infinite subsets that are RE or co-RE languages? This seems related to simple sets, but I can't seem to find any examples of languages with these properties.
Thanks!
|
I need to work on a optimizer for a language whose operator are second order functions.
They are the well known ones filter, map, reduce, fold, foreach etc. etc.
I need to formalize as much as possible the language. I mean I would like to have at the end a description such this:
"Filter is function from this domain t... |
In an example of the application of MapReduce provided by University of Utah, it says that Map() function emits <"hello", 1> every time it sees hello where the reduce function counts the number of instances "hello" occurs
My question is if this is the case, why isn't reduce doing <"hello", {1,1,1,1,1,1,1,1,1,1,1,1...}... |
I am reading Michael Sipser's book Introduction to the Theory of Computation, which mentions the set $$S = \{ n \mid \text{$n$ is an integer and $n = n + 1$}\}.$$ This doesn't make any sense to me.
I would understand if $n$ were equal to infinity or something, so it probably wouldn't matter if we added $1$ to it.
Am I... |
I would like to write a function to generate a diagonally dominant matrix of random values. What I'm ultimately leading to is writing a code to implement the Jacobi method on this matrix in CUDA for a final project in one of my classes.
The problem is I don't really know how to do this. One idea I had was to create a ... |
Let $W = \{w_1,w_2,...w_n\}$ be a set of integer weights. Let $B = \{b_1,b_2,...b_m\}$ be a set of buckets, with $m \leq n$. Let $T(b_j)$ represent the total weight present in bucket $b_j$, which is the sum of all the weights present in $b_j$.
What is the optimal way to distribute all the weights $w_i$ into the bucket... |
I know a key part of the Cook-Levin theorem proof (as presented in the book by Sipser) is that given two rows of configurations, if the upper row is a valid configuration of a nondeterministic Turing machine $N$, and every 2×3 window is consistent with $N$, then the second row is either identical with the upper row or ... |
I'm trying to prove that if P = NP, then {⟨a, b, c⟩ : a + b = c} (as addition over N) is NP-complete.
I think I managed to prove that it is in NP, but I'm not sure what would be a good NP complete problem to reduce to would be, or what algorithm to use. Any ideas?
|
All programming languages have globally defined symbols. While best practices invariably abjure their use as mutable entities the philosophy of what is mutable and what is not mutable is highly context dependent. Technologies like JIT compilation and type inference generate code on the fly based on the context in whi... |
I have a set of points corresponding to pictures on map. Because location precision is not very important, I want to separate the points inside the set to maximize the summed up distance between the points. There would be a maximum distance that points could be moved.
Any idea what kind of algorithm should I use?
|
I have this exercise for homework:
Say we have a language L. we know that the language pref(L) (all the prefixes of L, including all the words in L itself) is a regular language. Does this imply that the language L is regular as well?
I took the NFA of pref(L) and divided it (via 2 epsilon transitions from q0) to 2 s... |
I'm a person using english as the second language and reading CLRS book at a slow pace due to my poor english. I have a problem with understanding the meaning of the word 'alternative'. In page 303 on CLRS, says:
we should convince ourselves that exhaustively checking all possible parenthesizations does not yield an e... |
Assume, I want to define the operational semantics for some subset of ML.
e ::= \\x. e | e e | c | match e with p+ | A e*
v ::= ... | \\x. e | ... | A v*
p ::= A p* -> e | x
Where e is the expression language, v are the values or normal forms, p are the patterns and A are the constructors for my algebraic datatypes.
... |
I am having hard time understanding the working of SCAN and CSCAN algorithm of disk scheduling.I understood FCFS,Closest Cylinder Next but heard that SCAN resembles elevator mechanism and got confused. My book says that for the incoming order :[10 22 20 2 40 6 38] (while the disk currently at 20) the SCAN moving at the... |
Could anybody explain me what exactly oblivious RAM is?
I found the following explanation which makes it kind of clear to me, but I would like to get a sense of the technical aspects:
Encryption is not always enough to ensure privacy. If an adversary can observe your access patterns to encrypted storage, they can sti... |
I have some background in natural language processing and I know that all parsers (top down or bottom up, or mix), at least when I studied just about a few years ago, cannot handle any error. A small error like a grammatical one or a spelling one will result in unexpected parsed tree.
This is unacceptable in natural la... |
The PARTITION problem:
$\{\{x_1,...,x_n\}: \exists I\subseteq[n], \sum_{i\in I}x_i=\sum_{i\notin I}x_i\}$
is well known to be NP-complete.
My question: does the partition problem remain NP-complete (as a promise-problem) if we are given that $\sum_{i=1}^n x_i=0$?.
A problem that arises in this assumption is that one... |
I think that I have found an algorithm which resolve exactly the subset sum problem in $O(N^3)$ in the worst case, only for positive numbers.
After my research, I'm lost between all the algorithms for this problem.
$O(2^N*N)$ for the naive algorithm (I understand)
$O(2^{N/2})$ for advanced algorithm (I understand)
$O(... |
I am looking for familiar problems on strings of finite length over an finite alphabet, where a polynomial time algorithm is known.
To be more precise, let $\Sigma$ be a finite alphabet. I am looking for problems, where the input (or an important part of the input) is a set (or an ordered list) of strings $w_1,\dots ,w... |
In "Partial Evaluation of Computation Process—An Approach to a Compiler-Compiler" Yoshihiko Futamura wrote:
"[Some] portions of a computation process [...] are not evaluated at
partial evaluation time, but the values are only substituted for the
remaining variables."
on page 388 in the paper
(I considerably short... |
While studying COMPILER-DESIGN through an online book from Google Books, referenced as Compiler Design by A.A.Puntambekar, I got stuck across a line. Actually, I am more curious to know the inner-detail.
The assembler converts the assembly-program to low-level machine
language using two passes. A pass means one comp... |
In the article Fast approximate string matching with finite automata by M. Hulden (2009) (mostly pages 58/59), the author describes how to search for a closest matching string word from an automaton after inputting something that is not accepted by said automaton.
It uses A* search to efficiently search for the closes... |
Is every $\sf NP$-problem solvable or are there problems that have no working algorithm to solve but have algorithms to verify?
|
I have a problem of this form coming from an application domain, similar to the classical knapsack problem but not quite the same:
Maximize the value of
($\sum_{i=1}^n v_i \cdot x_i) + B \cdot \frac{W}{r}$
subject to
$ \sum_{i=1}^n w_i \cdot x_i \leq W$.
Here, $W$ and $B$ are constants, and $r$ is an integer variable w... |
Reading the book Introduction to Linear Optimization by Bertsimas and Tsiklisis, I've come across the following subject: Driving the artificial variables out of the basis.
The description is as follows: suppose an artificial variable $x_{B(j)}$ is in the basis, then examining the $j$-row of the simplex tableau there ar... |
What is different when you say "Arithmetic Calculation" and "Calculation" in the context of the computer science?
The "arithmetic" in the former seems needless to me since all calculations are arithmetic.
Is there some meaning that is enhanced by adding "arithmetic" in this case?
Thank you in advance.
|
I am trying to solve a stable marriage problem where I have e.g. 20 women and 20 men, but they always only prioritise 4 pre-selected people of the opposite sex.
My algorithm distributes all men and women, so that everybody has 4 potential partners. This happens through the whole group of 20 (not in groups of 4 x 4, wh... |
In a directed graph $G(V, E)$; how can I define in symbols the set of subgraphs $G'=(V',E')$ of $G$ such that $G'$ has a root vertex, i.e., a vertex that sends a directed path in $G'$ to every $v\in V'$.
So far, I have the following. I need to say that
$$\forall v \in V'\, \exists \text{ a directed path $P$ from $r$ t... |
Currently I have a program which at some point creates an octree and AFTER the creation loops through all the nodes, for every node (O(n2/2)) and thus finds the neighbours, by a brute-force box-box intersection check.
Since that is causing a bottleneck in my program I am looking to optimise this stage by somehow assign... |
It was proven that the problem of determining whether a given Diophantine equation has a solution is undecidable (and therefore has no polynomial time algorithm). But we can check proof certificates (that is, solutions to the equation) in linear time by plugging in our solution and evaluating. So the problem is in NP. ... |
Does anyone have the computational power to check whether or not
$F(m)^d \equiv m \pmod n$, where the values of the variables are found below.
According to Wolfram Alpha, I found the result of the computation $F(m) \equiv m^e \pmod n$, however I don't know how reliable Wolfram is with computations of this size and I am... |
If I have an input string that is only composed of $a$'s and $b$'s, how can I construct a Turing machine that only accepts strings where the number of $b$'s divides the number of $a$'s?
For example:
$aaaabb$ is accepted
$baaab$ is rejected
|
There exist several different types of logic -- 1st order, 2nd and higher order with many different sets of inference rules possible.
What I'm having trouble understanding is what's the "underlying logic" we use to talk about the various different types of logic. For instance, if we were limited to thinking in terms of... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.