instruction stringlengths 35 29.1k |
|---|
This is the question-
Let $A[1,....,n]$ ba an array storing a bit $(1\,\,or\,\,0)$ at each location, and $f(m)$ is a function whose time complexity is $\theta(m)$. Consider the following program -
counter = 0;
for( i = 1; i <= n; i++)
{
if(A[i] == 1)
counter++;
else
{
f(counter);
... |
I read on the internet that it's possible to reduce clique to vertex cover. Almost everyone use this theorem:
if a graph $G$ has a clique of size $k$ then the complement of $G$ has a vertex cover of size $n-k$, where $n$ is the number of vertices.
Consider the graph on five vertices and the following edges: a clique... |
I want to compute $g^{mn}$ mod $n^2$ where $n=pq$ and I know that $g$ has order $kn$ mod $n^2$ where $m<k$. Is there any clever way of doing it utilizing the order? I have tried other methods of computing $g^{mn}$ directly.
My question stems from an implementation of the Paillier cryptosystem that I'm working on. Right... |
On my homework the question asks:
A program executes serially in 200 seconds. If it is parallelized, 7
seconds of overhead are required for synchronization, locking, and
communication. Compute the execution time, ideal speedup (if there
were no overhead required), actual speedup, and the percentage of the
idea... |
I have the power consumption values of a household for 2 year. To preserve privacy I am down sampling this data before sending it to the utility company. My goal is to get back the original data from the down sampled data. I am thinking I would need some kind of learning based predicting algorithm. My professor suggest... |
I know a regular language is the one which can be expressed as a regular expression or we can create a DFA corresponding to it. Unless a language has a pattern in which one part has to match with other like in $$a^nb^n|n\geq 0 (CFG)$$ It'll be regular. Like AP Series of symbols can be easily expressed as Regular expres... |
Given $ \Sigma= \{a,b\} $, show that $ L:= \{a^nwb^n: m,n \in \mathbb N, m\geqslant n, w\in\Sigma^m\} $ is not regular.
I'm trying to proof this with the Pumping Lemma, but I'm kind of confused because of the middle part $w$.
I would pick the symbols $\ a^na^mb^mb^n $ as a starting point and show that this does breach ... |
In Section 2.3.3 "Polytopes and LP" of the book "Combinatorial Optimization: Algorithms and Complexity" by Christos H. Papadimitriou, Theorem 2.4 establishes the relation between bfs's (basic feasible solutions) of LP and vertices in polytope (for developing the simplex algorithm). However, I have difficulty in underst... |
I'm wondering, what is the best known algorithm, in terms of Big-$O$ notation, to solve Integer Linear Programming?
I know that the problem is $NP$-complete, so I'm not expecting anything polynomial. And I know there are lots of heuristics and such that are used in practical applications like CPLEX, but I'm more intere... |
If the best case for Insertion sort & bubble sort is $O(n)$ then how is lower bound for any comparison sort is $\Omega(n\log n)$? I mean, $O(n)$ is obviously smaller than $\Omega(nlogn)$. What am I missing here?
|
I am doing homework to practice for my midterm exam and cannot answer this question. I need to decide whether or not this statement is true of false and either give a proof or counter example.
For this particular question, I am leaning more towards saying it is false as the question does not really follow the definiti... |
Although I work as a programmer in my daily life and use all the trendy languages (Python, Java, C, etc) I still have no clear view of what functional programming is. From what I've read, one property of functionally languages is that data structures are immutable. For me this alone raises a lot of questions. But first... |
I am trying to prove that merge sort is indeed $O(n \log n)$.
I was able to extract a pattern using constants, however now I am stuck. This is as far as I can get:
$T(n) = 2T(n/2) + cn$
$T(n/2) = 2T(n/4) + c(n/2)$
Now plug in 1. into 2.
$T(n) = 2(2T(n/4) + c(n/2)) + cn$
$T(n) = 4T(n/4) + 2cn$
Now the pattern I was ... |
It is common to define $P$-completeness with respect to logspace many-one reductions. I am looking for a complexity class $C$ such that if $C=P$ then all problems in $P$ are $P$-complete under many-one $C$-reductions.
What is the weakest many-one reduction (computable in class $C$) for which the class of P-complete p... |
I'm trying to understand a proof from the paper: Balcázar, José L.; Gavaldà, Ricard; Hermo, Montserrat: Compressiblity of infinite binary sequences, Published in: Complexity, Logic, and Recursion Theory, A. Sorbi, ed., Marcel Dekker 1997, ISBN 0-8247-0026-0, 75-91.
Theorem 19 For every recursive time bound f , there i... |
The $n$th Fibonacci number can be computed in linear time using the following recurrence:
def fib(n):
i, j = 1, 1
for k in {1...n-1}:
i, j = j, i+j
return i
The $n$th Fibonacci number can also be computed as $\left[\varphi^n / \sqrt{5}\right]$. However, this has problems with rounding issues for e... |
Let's say I'm writing a GA to find an optimal path to travel from point $A$ to point $B$. Genotypes are a list of directions (north, south, east, west) to follow.
So a genotype "NENWEE" will move north once, east once, then north again, west once, and finally east twice.
The directions are encoded as follows:
N : 00
E... |
Is there a difference between the end state of a Turing machine and the halt state? Especially, for example the Busy Beaver 3. It is said that it is with 3 states but there is also a halt. Is the end state $q_2$ or the $halt$?
|
Let $\mathrm{LOG}_{\mathrm{CF}}$ be the class of all languages recognized by a Pushdown-automaton that uses $\leq \log n$ cells of its stack for each input of length $n$.
Obviously, this class is a proper subset of the class of context-free languages. Which languages are in this class, and what (closure) properties doe... |
Assume you have a fixed ($d=O(1)$ for that matter) degree matrix polynomial
$$P(X)=A_0+A_1\cdot X+A_2\cdot X^2+\ldots+A_dX^d$$
Where $A_0,A_1,\ldots A_d\in\mathbb N^{n\times n}$ are given as input. Also given is some constant $\epsilon$.
Can we find a matrix $X_0\in \mathbb R^{n\times n}$ such that $||P(X)||<\epsilon$... |
I have a question regarding the ECGA algorithm. This is what I'm currently studying. If ECGA builds a model of the parent pool using the 'minimum description length' (MDL) measure, why cannot we simply choose the model which has the most likely fit of the parents?
Thanks.
|
I am currently studying about formal languages and automata.
I am trying to solve a problem but there is a notation whose meaning I'm not sure of.
I have a question to find out the relationship between two languages $L_1$ and $L_2$:
$L_1:$
$S \to aSa|bS|e$
$L_2 \to L((ab+ba)^*)$
My question is, does it mean that $L(ab+... |
A weighted digraph (with loops) is bistochastic, iff
the weights are non-negative,
for all non-sink nodes, the sum of the edge weights of the out-edges is $1$, and
for all non-source nodes, the sum of the edge weights of the in-edges is $1$.
The Birkhoff-von Neumann theorem for a bistochastic matrix states that a bis... |
I have the following pseudo-code:
mystery(n):
if n <= 50 :
for i = 1 ... n :
for j = 1 ... n :
print i*j
else :
mystery(n-1)
For the following nested for loop:
for i = 1 ... n :
for j = 1 ... n :
For every i in n, j iterates through n as many as i times. So, why is it that the comp... |
Are there any known subquadratic algorithms for calculating the floor of the square root of an n bit integer?
The naive algorithm would be something like
def sqrt(x):
r = 0
i = x.bit_length() // 2
while i >= 0:
inc = (r << (i+1)) + (1 << (i*2))
if inc <= x:
x -= inc
r... |
I have seen a lot of solvers that are capable of, for example, getting an equation such as x ^ 2 + x = 12 and finding x = [3, -4]. I know some of them are implemented by hardcoding special cases. For example, when finding an equation on the quadratic form, they use a hardcoded bhaskara formula.
What I'm looking for is ... |
Is it possible to proof for a Language L and its L-complemented to be both not recursively enumerable?
Can be useful to consider the (Ld) diagonalization Language?
thank you.
|
Is it possible to re-weight a generally-weighted graph to a distinctly-weighted graph to apply Borůvka's algorithm (wiki) for minimum spanning tree to it?
I can't seem to think of a way to make a distinction between the same weights, it feels unnatural.
|
In the Computability, Complexity and Languages book written by Davis in page 5 he defines a predicate as:
By a predicate or a Boolean-valued function on a set $S$ we mean a total function $P$ on $S$ such that for each $a \in S$, either $P(a) = True$ or $P(a)=False$.
So every predicate is a total function. in Page 30 ... |
I have the following pseudo-code for printing all nodes of a BST :
traverse(x):
if x == nil:
return
else:
print x
traverse(x.left)
traverse(x.right)
I want to find its complexity. I have an idea, but I'm not sure if I am implementing it correctly.
$T(n) = 2T(n-1) + cn$
Where $T(... |
Why is $f(n) = \Theta(g(n))$ where $f(n) = n(n+1)/2$ and $g(n) = \sum_{i=1}^n (n/i)^2$?
Also, why is $f(n) = \Theta(g(n))$ where $f(n) = n^{\log_49}$ and $g(n) = 3^{\log_2 n}$?
I know what notations mean - I just want to prove them.
|
This may be an elementary question, but I'm new to circuit complexity. Does 2-SAT in CNF form belong to the complexity class AC$^0$?
It seems simple enough to construct an AC$^0$ circuit of depth 2 of polynomial size for 2-SAT. $~$Given $n$ variables (which means $2n$ literals), there can be at most $\frac{(2n)(2n-1)}... |
I've recently learned about distributed computing and the synchronous model where, assuming a complete network and no crashes, in each round the following happens:
every node can send a message to all other nodes,
all of these messages are received by all nodes by the end of the current round, and
at the start of th... |
I'm trying to figure out who coined the term "machine learning". An ancillary question is from where is Arthur Samuel cited as defining the field of "machine learning" in 1959 as:
the field of study that gives computers the ability to learn without
being explicitly programmed
?
You can find many, many references to... |
I don't understand the notion of relativization. I expose with an example. Consider a class $A$ that contains $P$, e.g. $NP$. Why $P^A$ is not necessarily equal to $A$? I can naively think that if one can decide any problem in $A$, one can also decide any problem that uses polynomially many steps in a Turing machine pl... |
In load balancing problem we have $m$ machines and $n$ jobs, each taking processing time $t_j$. Total processing time on the machine $i$ is $T_i =\sum_{j\in A(i)}{t_j}$, where $A(i)$ is the set of jobs assigned to machine $i$. Goal is to provide an assignment of jobs, such that $\max T_i$ is minimized.
It is known that... |
I'm a bit confused on some of the notation being used for turing machines in one of our exercises in class.
The question gives us a string $\alpha \in \{0,1\}$* and the function $\mathsf{int}(\alpha)$ that changes a binary number to its base 10 form. (example, $\mathsf{int}(00010) = \mathsf{int}(10) = 2$)
Now comes th... |
Question:
L is the language of $\langle M,x,y\rangle$ s.t TM $M$ accepts both inputs $x$ and $y$ or doesn't accept either. Prove that given some $M$, finding 2 inputs $x$ and $y$ s.t. $\langle M,x,y\rangle\in L $ can be done in polynomial time.
Thoughts:
This seems strange to me that this can be done in P time as we ha... |
I know its silly, but i managed to confuse myself and i need help settling this
Suppose $P=NP$, then clearly for every oracle $A$ we have $P^A=NP^A$ which contradicts the
fact that there exists some oracle $A$ for which $P^A\neq NP^A$, hence $P\neq NP$
Whats wrong?
Thanks!
|
It is pretty obvious that $DTime(n^3) \subseteq PSpace$, since $DTime(n^3) \subseteq DSpace(n^3) \subseteq PSpace$, but I fail to see how to find such a language $L$ so that $L\in PSpace\,\,\,$ yet $\,\,L\notin DTime(n^3) $. Can someone assist with an idea of how to find such $L$?
|
So for these 5 conditions, I am trying to find the solution/formula for them.
What would $a_n$ equal basically? If it helps, the recurrence relation these 5 conditions were generated from was $a_n = a_{n - 1} + 2n$. Any help would be greatly appreciated.
$$
\begin{align*}
a_0 &= 4 \\
a_1 &= 6 \\
a_2 &= 10 \\
a_3 &... |
I'm interested whether there is the standard solution to the following problem.
Some number of train routes is given:
Route1: First City -> Next City -> ... -> Last City
Route2: ...
...
We need to list all possible ways to get from one given city to the other with possible transfers but without visiting any city more t... |
I know from Schaefer's Dichotomy Theorem that only a few types of satisfiability problems are in P and any other problem is NP-complete. However, all of the algorithms I know for them use specific techniques unique to that type of problem- e.g. unit propagation for Hornsat, linear algebraic techniques mod 2 for XORSA... |
When talking about turing machines, it can be easily shown that starting from two machines accepting $L$ and its complement $L^c$, one can build a machine which can fully decide if a word is inside $L$ or not.
But what about PDAs? starting from two different PDAs, one accepting $L$ and one accepting $L^c$ can we build... |
I'm dealing with a time series that consists of one year's data of the result of some measurement. The time index is in second and the result of the measurement is a non-negative integer.
Interestly, after some tweaks & transformation & plot of the original data, I found that in some days the data shows a periodic patt... |
I have read some notes about the two but yet still confused about why there is a need for the strict 2phase locking. Based on some slides,
Two Phase Locking and Strict Two Phase Locking
They have a single difference which is :
If transaction T releases any lock, it can acquire no new locks. <-
2PL
Hold all locks un... |
A circuit outputs a digit in the form of 4 bits. 0 is represented by 0000, 1 by 0001, …, 9 by 1001. A Combinational circuit is to be designed which takes these 4
bits as input and outputs 1 if the digit $\geq$ 5, and 0 otherwise. If only AND, OR and
NOT gates may be used, what is the minimum number o... |
It is well-known that the chromatic number of a graph can be as high as $n$.
But what is the maximum chromatic number of a graph with $m = O(n)$?
|
Consider the floating-point representation
31-24 : Exponent
23-0 : Mantissa
The exponent is in 2's complement representation and mantissa is in the sign magnitude representation. the range of the magnitude of the normalized numbers in this represntaion is
$(a)\ 0\ to \ 1$
$(b)\ 0.5\ to\ 1$
$(c)\ 2^{-23}\ to \ 0.5$
$... |
Let CVal be the language of all $<C,s>$ where $s$ is an $n-$tuple of binary values ($\{0,1\}$), such that $C$ is a variable-free boolean circuit (gates $\wedge$, $\vee$, $\neg$, $0$, $1$), and it outputs $1$ for the entries of $s=(x_1,...,x_n)$.
Given two languages $A,B$, define $A \leq ^{rand} B$ iff there exists a ra... |
I understand that segment trees can be used to find the sum of sub array of $A$. And that this can done in $\mathcal{O}(\log n)$ time according to the tutorial here.
However I'm not able to prove that the querying time is indeed $\mathcal{O}(\log n)$. This link (and many others) say that we can prove that at each level... |
I am trying to write IDA* for Sokoban puzzle problem (http://en.wikipedia.org/wiki/Sokoban) but It seems that my heuristic is not so good for making the algorithm fast.
My heuristic is to consider $h(s)$ as minimum distance between the Player and Boxes plus minimum distance between a Box and a Target in state $s$.
Can... |
I have an assignment that asks for this. So I am not looking for the answer itself but a hint on how to find a value that will always break the BST condition by myself.
If I have access to any node N of a BST that has at least 2 nodes in its root, and where every node will always be different.
If I were to replace N.ke... |
An exercise problem once again has me stumped on a Turing Machine decidability proof.
We are given an alphabet with the strings 0 through 9.
Along with this, we have x as the infinite string of all digits in PI. (3141592...)
With L ⊆ Σ*, the language L = {A ∈ Σ*| A is a sub-sequence of x}.
(from what I understand, the ... |
When a given weighted directed acyclic graph represents some object flow, what is the most efficient algorithm to find the equivalent graph sum of which edges is minimum? Here, 'equivalent' means the end state of the objects is the same.
The picture below is the trivial example of this problem.
Above, 'simplest' means... |
Could someone provide an explanation of how to convert this DFA into a regular expression? I have found three methods online, ie: How to convert finite automata to regular expressions?
but they are all very confusing to me.
The automaton is:
$$M = ((1,2,3), 1, \{a,b\}, \delta, \{1,3\})$$
where
$$\delta(1,a) = 2\\
\de... |
I am new to graphical model, especially Markov Random Fields. I have a question about MAP assignment. Let say we have the graph structure and all the potential functions. MAP assignment in MRFs is defined as the most probable assignment for all variables (no given evidence in this case). My question is why it is called... |
It has just appeared to me that I've overlooked a possibly important fact. When we want to calculate probability $p_x$ of measuring the state $X$ and we know the amplitude of $X$ is $\alpha$, we know that $p_x = |\alpha|^2$. Until today I thought that absolute value was not necessary anyway. However, it brings signific... |
A* needs a consistent heuristic to work on a graph.
So I'm not sure if the heuristic of a straight line (bird flight) can be used.
For example: the costs to travel to a neighbors node is always positive.
GOAL
--------------------
| |
| START |
| | where... |
Currently, I'm reading a photocopied version of Turing's famous article On Computable Numbers, With an Application to the Entscheidungsproblem.
This is the best photocopy of his paper that I can find; most other copies are of pretty low quality to the point that I can't distinguish between different characters. The e i... |
Assuming I have functions $f, g : \mathbb{N} \to \mathbb{N}$ and I know that $g \circ f$ is a primitive recursive function. What can I tell about $f$ and $g$? Are they primitive recursive as well? Or at least one of them?
|
I am currently working on a scheduling system which schedules individuals based on timeslots that have the following attributes: (1) Day of Week (2) Month (3) Session(AM/PM).
The individuals currently indicate their preference for whether they prefer the AM/PM session for each day of the week in each month eg. (Monday|... |
Let:
$2EQ$ - The language of all binary ($\mathbb{Z}_2$) equation sets that have a solution in $\mathbb{Z}_2$, where each multiplication is of at most two $x_i,\, x_j$. Meaning a set of equations of the form: $\Sigma a_i \cdot x_i + \Sigma \, \Sigma \, a_{i,j} \cdot x_i \cdot x_j = b $.
$3EQ$ - Same just up to at most... |
I'm learning about HMMs and their applications and trying to understand their usages. My knowledge is a bit spotty, so please correct any incorrect assumptions I'm making. The specific example I'm wondering about is for using HMMs for speech detection, which is a common example in literature.
The basic method seems to ... |
While working on integer factorization algorithm I came to the next problem:
$$\frac{a}{ex} = \lfloor{\frac{a}{ex}\rfloor} + c$$
$a$ the number I want to factor
$x$ factor of $a$
$e$ positive integer that I choose
For $e = 1$ I found a linear representation for short sequences of $\lfloor{\frac{a}{x}\rfloor}$, this a... |
How do you union of two finite automata as well as establish the transition table for it. I'm unsure of how to properly union the two finite automata. I believe the transition table would look something like this:
state | a | b | a,b
x1| x2 | x3 |
x2| | | x3
x3| | | x3
y1| y2 | y3 |
y2|... |
first of all this is a homework question and I don't want the solution. I just want a reference to how to solve similar questions like this. I believe it's explained my course textbook, "Computer Organization & Architecture: Themes and Variations" but I currently cannot afford the textbook.
Here's the question:
For eac... |
I am a little confused to reduce these lambda calculus expressions. I am instructed to give applicative and normal order reductions for these expressions.
$(a):$ $$(\lambda x. (\,(\lambda y.(* 2 y)\,) (+ x y)\,)\,)\,y $$
$(b):$ $$(\lambda x. \lambda y. (x y)\,) \,(λz. (z y)\,)\,$$
Here are the steps I took in my f... |
I'm not necessarily asking for the first well-formed definition of some markup language, nor the first implementation of parser for one such language.
What I'd like to know is when did people first think they could/should embed formatting (or other) information into pure text. Wikipedia gives one early example of such... |
Wikipedia's trie article says:
[Compressing the trie representation by merging the common branches] is also typically used in the implementation of the various fast lookup tables needed to retrieve Unicode character properties (for example to represent case mapping tables, or lookup tables containing the combination o... |
I'm doing a practice question (not graded HW) to understand mathematical proofs and their application to Big O proofs. So far, however, the very first problem in my text is stumping me wholly.
Suppose $f(n) = O(g(N))$ and $g(n) = O(h(n))$ (all functions are positive).
Prove that $f(n) = O(h(n))$.
I am having lots of t... |
I'm trying to verify if the following model satisfy $A [a \cup b]$:
The algorithm I'm using is taken from "Concepts, Algorithms, and Tools for Model Checking", Joost-Pieter Katoen. In particular I applied the SatAU part (previous calculation of the states in which a and b are valid):
Intuitively the formula is verifi... |
There is an example problem from p506 of Computer Organization and Design, Fifth Edition: The Hardware/Software interface by David A. Patterson, John L. Hennessy
I wonder how "potential speedup" is defined? The book doesn't give its definition.
In the example, since speedup with $10$ processors is $55\%$ of the potent... |
I am trying to devise an algorithm for determining if an undirected graph $G$ contains $K_4$ as a minor. I was able to show in a previous problem how to test for $K_{2,3}$ by looking at all pairs of vertices and applying Menger's problem as a black-box on that pair of vertices (i.e checking for at least 3 vertex-disjoi... |
The problem is as follows:
We have a two dimensional array/grid of numbers, each representing some "benefit" or "profit." We also have two fixed integers $w$ and $h$ (for "width" and "height".) And a fixed integer $n$.
We now wish to overlay $n$ rectangles of dimensions $w \times h$ on the grid such that the total sum ... |
There is an information theoretic lower bound of $\log_2 {U \choose x}$ for the number of bits to represent a subset of $x$ elements chosen from a universe of size $U$. We can in principle use this representation (perhaps inefficiently) as a data structure to test if any query is part of this subset.
How can you s... |
In our lecture notes on lamdba calculus, I encountered the sentence:
Let $M$ be a set and $f\colon ℕ → M$ be computable.
Does this even make sense? Don’t we need aditional structure on $ℕ$ and $M$ to talk about computability and decidability? How can I make sense of this statement?
|
Let $x,N$ be positive integers.
I'd like to store a counter which could reach value of $\left\lfloor \frac{N}{x}\right\rfloor$ (i.e. could take any value in $0,1,\ldots,\frac{N}{x}$) using $$\lceil\log_2(N+1)\rceil - \lfloor\log_2 x\rfloor$$
bits.
Equivalently, does the following hold:
$$\log\left\lfloor \frac{N}{x} +... |
Sorry for layman's term question, my background in computer science is weak.
What I have is a list of shelves with books of varying height. Each shelf stores a value that describes how many shelves (of that height) can fit on a bookcase. The bookcases have adjustable shelves so that we can maximize the usage of each ... |
This is Universality theorem In the Computability, Complexity and Languages book written by Davis in page 70:
If $\phi^{(n)}(x_1,...,x_n,y) = \psi_P(x_1,...,x_n)$ $where$ #$(P) = y$
Theorem 3.1 (Universality Theorem): for each $n>0$ the function $\phi^{(n)}(x_1,...,x_n,y)$ is partially computable.
From what I... |
If we take this definition as R.E. set definition (Computability, Complexity and Languages book written by Davis in page 79)
$Definition.$The set $B\subseteq N$ is called r.e. if there is partially computable function $g(x)$ such that
$B = \{x \in N | g(x) \downarrow\}$
Halting problem is set of $(x,y)$ which program... |
This is actually exercise 3.7 from "Computational Complexity: A Modern Approach".
I need to prove that the NP-Completeness of 3-sat does not relativize, i.e. I need to show that that exists some oracle $A$ such that there exists $L\in \mathrm{NP}^A$ s.t. $L\not\leq_p\mathrm{3SAT}$, where the reduction can query the ora... |
What are the time complexities of finding $8th$ element from beginning and $8th$ element from end in a singly linked list? Let $n$ be the number of nodes in linked list, you may assume that $n > 8$.
The answer is given as $O(1)$ and $O(n)$.
What I learnt till now is that searching operation in linked lists takes line... |
Hopcroft's algorithm is an algorithm for DFA minimization that produces a table identifying which pairs of states are distinguishable.
What is the tightest possible upper bound (with proof) on the minimum length of a string that distinguishes two distinguishable states?
This question is taken directly from Hopcroft, Mo... |
From http://en.wikipedia.org/wiki/Superscalar
In Flynn's taxonomy, a single-core superscalar processor is classified as an SIMD processor (Single Instructions, Multiple
Data),
Flynn's taxonomy is based on number of instruction streams and
number of data streams.
A superscalar processor can run more than one instr... |
From Wikipedia
SPMD (single program, multiple data) is a technique employed to achieve parallelism; it is a subcategory of MIMD. Tasks are split up and run simultaneously on multiple processors with different input in order to obtain results faster.
Does a program running on SPMD runs as either multiple processes or... |
The question is fairly straight forward. I just found a question on the internet that asks whether all regular grammars are
LL(1)
LR(1)
I guess they can't be LL(1) because of left recursion, but how do we prove that they are LR(1) if so.
|
I am convinced of the fact that allowing productions of the form $S \rightarrow \epsilon$ in a context sensitive grammar would allow RE languages to be expressed if $S$ were on the right hand side of some production.
However, in most definitions of regular and context-free grammars (such as those on Wikipedia), this re... |
Let $f$ be a Boolean function.
Let $g$ be the minimum degree real polynomial that represents $f$ with degree $d$.
Let $g_{p}$ be the minimum degree $\Bbb F_p$ polynomial that represents $f$ with degree $d_p$.
Does $\exists p:d_p\leq d\leq d_p^c$ hold with some constant $c>0$?
$d_2\leq d\leq d_2^c$ does not hold with ... |
I'm looking for a computational method for projecting data from one grid onto another dissimilar grid while preserving the area of the original grid. I'm not quite sure what these methods would be called, but think draping a blanket over an uneven surface, a bit like what's being done here, except my original data set'... |
Currently, I'm learning about flip flops and how it is used in RAM to store memory so I'm trying to recreate the circuitry in Logisim. I know the components I need which are address register, 4-bit data register, 1 bit read/write register and the actual 4 nibble RAM with its own address space and data space. How do I... |
Is there a methodical procedure for determining the optimal timeout / retry strategy for dealing with a remote server that handles processes responses for requests, given some probability distribution of response time?
For example, suppose I have a client program which requests a web page from some server, and I know r... |
I've got a set $Q$ of pairs $[S, v]$ where $S$ is a nonempty set and $v$ is a value ($v \in \mathbb{N}_{+}$). I need to find a subset $R$ of $Q$ with following properties:
Sum of all $v$'s is maximum
$S$ from all pairs construct a disjoint set
Example. For given set $Q$:
$Q = \{[\{1, 2\}, 5], [\{2, 3\}, 8], [\{3, 4\}... |
Problem: To prove the $\textsf{NP-Completeness}$ of the problem of "Packing Squares (with different side length) into A Rectangle", $\textsf{3-Partition}$ is reduced to it, as shown in the following figure.
In the $\textsf{3-Partition}$ instance, there are $n$ elements $(a_1, \cdots, a_i, \cdots, a_n)$. The target su... |
Consider two heuristics $h_1$ and $h_2$ defined for the 15 puzzle problem as:
$h_1(n)$ = number of misplaced tiles
$h_2(n)$ = total Manhatten distance
Could anyone tell why $h_2$ is a better heuristic than $h_1$? I would like to know why the number of nodes generated for $h_1$ is greater than that for $h2$. Also why... |
Whenever said - The intersection between a Context Free Language and a Regular Language is always Context Free, what is the best logical way to confirm the statement?
I have this Chomsky hierarchy in mind that I refer whenever closure properties between Type-m and Type-n languages are asked but sometimes I come up with... |
Let $G$ be an undirected weighted connected graph with non-negative weights on the edges,
and let $v_1, v_2, v_3, v_4$ be 4 vertecies in $V[G]$.
The goal: find a connected subgraph of $G$ with minimal weight (the sum of weights of the edges in the graph) that includes $v_1, v_2, v_3, v_4$.
Any polynomial algorithm will... |
Given a set of whole numbers $M=\{z_0, ..., z_n\}$ Are there $z_i$ and $z_j$ with $i \neq j$ but $z_i = z_j$?
Is this Problem (surely or only probably) in $P$ or in $NP$? Is it $NP-hard$?
|
How can I compute the probability of having a $\log(n)$ length monotone consecutive subsequence in a random permutation of $\{1,...,n\}$.
I wish to upperbound it with $1/n$.
|
Trying to answer this question:
A factory produces chocolate and candy. In order to produce 100 kilograms of chocolate, the factory has to use machine A for 1 hour, machine B for 4 hours, and machine C for 2 hours. In order to produce 100 kilograms of candy, the factory has to use machine A
for 2 hours, machine B for 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.