instruction stringlengths 35 29.1k |
|---|
I am aware that as the number increases in Digits the process of locating the two prime numbers that when multiplied produce the given number is increased as well.
I also know that is it somewhat exponential or even more and with current machines it is rendered impossible to do in less than a year to find it for numbe... |
Given a set A consisting of all possible solvable mazes on an n by n square grid, what is the average running time to solve the mazes in A using a standard backtrack algorithm with no optimizations?
The algorithm checks each ajacent space clockwise for a channel, then visits each channel and either marks it off if it e... |
There are lots of technologies supporting semantic information markup even as wiki software.
I am wondering if there is any kind of broad information collection project like Wikipedia which features semantic markup of those information.
Google didn't bring up a project like this (only for very specific topics like soft... |
You have a set of line segments and you want to find all intersections.
First sweep line approach:
Use a priority queue Q for the events as they come, where each event is just an end point of a line segment.
Use an unordered list L for the status of the sweep line, that is, all the segments that are currently intersec... |
I am brand new to DFA's and my first exercise requires me to create a DFA instance such that the number of a's in the string is a multiple of 3. We only have two types of symbols: a, b. To my understanding something like "aaabbaaa" would work but "aabbb" would not. Any help or hints would be greatly appreciated
|
Say you were given a black box that solves a clique problem in constant time.
You give the black box an undirected graph G with a bound k and it outputs either "Yes" or "No" that the graph G has a clique with at least k vertices.
How would you use this black box to find the vertices of a maximum clique in polynomial ti... |
For two proposition logical formulas $\phi$ and $\chi$ so that $\phi\implies\chi$ is generally valid. How can I prove that there is a formular $\psi$ with $var(\psi )\subseteq var(\phi )\cap var(\chi )$ so that $\phi\implies\psi$ and $\psi\implies\chi$ are generally valid?
|
Does anyone know a way of showing an encoding of integer arithmetic counting using Lambda Calculus?
Any references related to this would be much appreciated.
|
In Chapter 3 of "Approximation Algorithms for NP Hard Problems" edited by Prof. Dorit S. Hochbaum, there is such a sentence that "Maximum Coverage Problem is clearly NP-hard, as Set Cover is reducible to it" in p.135.
Given a set system G and a parameter k, Maximum Coverage Problem is to find k sets such that the elem... |
I have homework from recursion tree and despite my search for hours I could not find the answer to this problem.
I appreciate if you can help.
Draw a recursion tree and give a tight asymptotic bound on the solution of the recurrence $T(n) = 2^{n/2}T(n/2) + 2^n$. You need not prove your answer.
|
I have to create a CFG which generates
$$\{a^n (ab)^n c^m d^\ell e^k \mid n>0, k, \ell, m\ge0, k<m, m=\ell+k\}$$
The first part is easy enough, I came up with
$$\begin{align*}
S &\to aS_2abS_3 \\
S_2 &\to aS_2ab \mid \epsilon
\end{align*}$$
However, the second part is very confusing. So far I have
$$S_3 \to S_4... |
Is it ever the case that two decidable languages $L_1$ and $L_2$ that cannot be reduced to one another (in either or both directions)? Intuitively, I would not expect there to be, but rigorously, are there extreme examples that prove otherwise?
|
I have the following DFA transition table for the regular expression ab.
I don't understand these hyphens.As we know DFA is a deterministic automata and each state is defined for both a and b. However, if we look at state 1, we know that if 'b' comes we will move to state 2 but while standing on state 1 if 'a' then t... |
In any complicated system, there is always some scope for error. When I program on my computer, the system computes perfectly each time. 1+1 always turns out to be 2. We take reliability of the computer almost for granted. What gives modern computers it's reliability? Are there no errors in computation, or errors, if a... |
I want to prove the following case of Weighted Maximum Coverage problem with special weights is NP-hard. But I have no idea. So I am here seeking for help.
The Weighted Maximum Coverage problem is formulated as follows (known to be NP-hard):
Given a set I of m elements with each element ej has a weight w(ej), a collec... |
Shannon's source coding theorem states the following:
$n$ i.i.d. random variables $X_1,\dots,X_n$ each with entropy H(x) can be compressed into more than n⋅H(x) bits with negligible risk of information loss, as n→∞; conversely if they are compressed into fewer than n⋅H(x) bits it is virtually certain that information ... |
How would one be able to tell whether or not a function has an Inverse? I've got a question in my discrete mathematics/ combinatorics class that asks whether or not the following function has an Inverse and if so give the Inverse.
{(p, q) | q =¬p}
where p and q are elements of the set {T, F} where T is tautology an... |
Since you are free to chose any formula for the SAT problem, doesn't the choice of a formula that requires a test for each subset of the group of variables force it to perform $2^N$, essentially making SAT unsolvable in polynomial time in respect to the number of variables on the input?
|
I hope you can help me right now, I am working on lexical analyzer for C language, I am bit confuse bout the regular expression of C style comments. a regex which can handle both single and multiline comments.
|
I have a Stack1 which has the entries a,b,c ( with a on the Top) and Stack2 which is empty.The condition is.
An entry pooped out of the stack1 can be printed immediatly or pushed to stack2. An Entry popped out of the stack2 can only be printed.
In this Arrangement, which of the permutation of a,b,c is not possible... |
Bits are usually stored linearly in space. We can say, thus, that the length of a memory chip, for example, is linearly proportional to the number of bits it can hold. Since signals must travel at finite speed in our universe, the time it takes to read the last element an array will always be proportional to the length... |
How do i generate grammar for Prefix of Langauge L, SupposeG=(V,,P,S)is a context-free grammar generating a CFL L then pref(L) is defined as pref(L)={x∈∗ : ∃ y such that xy∈L}.
I understand for Suffix(L) we would do something like this .. Can someone here help me how do we do for the Prefix(L) if L is CFL.
For each v... |
Is it possible to implement an exponential-time algorithm using iteration, as opposed to recursion? I didn't have any particular algorithm in mind, I was just thinking theoretically.
The way I was thinking was to iterate not by adding 1, but by adding a small number j at the end of each loop. So the 3rd parameter in th... |
Is the following problem polynomial ? Or NP-Complete ?
Problem: Bin packing with 2 types of objects.
Input: $C$, the capacity of each bin, $N_a, N_b$ the numbers of objects $a$ and $b$, $w_a,w_b$ the weight of the objects, $k$, the maximum number of bins.
Output: Yes if all objects fit in the $k$ bins without exceeding... |
The definition of Turing machine says that the number of states is finite. However, I do not get how this can be true. Is the number of states in a Turing machine actually not fixed, that is not bounded? If not, can anyone explain how this is possible?
|
I'm a beginner in the coq proof assistant, so sorry if my question is silly. I would like to prove properties of a mathematical object. For clarity I will describe an over-simplified version of my object. Intuitively, the object has
three sets A, B, C. The list A is of the form
$$A= \{(0,x_1) (0,x_2), ... ,(0,x_n)\}$$... |
Suppose I have an algorithm that reads lines in a file(linear) and for each line in the file, it sorts each word(nlogn). This algorithm is mnlogn, where m is the number of lines and n is the number of characters in a word.
Asymptotically, as the file gets longer the number of lines becomes small in comparison to the n... |
Consider four points
$i,j,k,l$
and their pairwise Euclidiean distances
$d(ij)$
$d(ik)$
$d(il)$
$d(jk)$
$d(jl)$
$d(kl)$
Say that, we know the coordinates of the points $j$, $k$ and $l$.
However, we do not know where $i$ is and the measured distances to $i$ are erroneous depending on an error rate $e\%$.
That means, gi... |
Let's say a procedure called 'decision(x,q)' is available as a 'black box'
X is the input set and Q is a real number Q.
I need to design an algorithm that reports "yes" if there exists a subset of X whose total sum is = Q
otherwise, it reports "no".
Running time is not an issue, it just needs to have all actual numbe... |
Question: You are given an input , which is a sequence of positive integers $w_1, w_2, . . . , w_n$ with parameters $W, ∆. $We wish to find
$S ⊆ \{1, 2, . . . , n\}$ such that $\sum_{j \in S} w_j$ is as large as possible, subject to the constraints that (a)$\sum_{j \in S} w_j≤ W$,
and (b) for all $i, j ∈ S$, if $i \ne... |
When illustrating what states are in Turing machine, often the examples of programs, like a checker that checks an input number is even number, are given. But different programs seem to have different number of states - if so, how can Turing machine be described with the set of finite number of states, along with other... |
I'm implementing the Betweenness Centrality algorithm proposed by Brandes (first algorithm on this paper - also below), and I'm running into a very weird issue: it seems to be ignoring some paths (i.e. for vertexes v-w, it may count the path v-e-w, but not the inverted path w-e-v). I'm not sure how to prove or debug th... |
How would I solve the unbounded knapsack problem, only this time aiming to maximize the weight instead of the value?
|
The set equality problem in 2 party communication complexity is known to require $n$ bits of communication between Alice and Bob, for $n$-bit inputs $X$ and $Y$.
Suppose that we promise that the symmetric difference of $X$ and $Y$ is $\le 1$. Is the required communication for a deterministic protocol still $\Omega(n)$?... |
I see that Σ* is claimed to be decidable in many documents, but I have never seen an example or easy demostration that it is decidable.
What is the proof that Σ* is decidable?
|
Consider a Turing machine that cannot write blanks. How does one show that such a machine can simulate a standard Turing machine?
|
Assuming $\Sigma = \{ 0, 1\}$..
Given a language $L$, such that for each $n\in \mathbb{N}$ we have $n$ words of length $n$ in $L$ and assuming $L\in NP$, can we prove also that $L\in Co-NP$?
So it is the same as showing that $\overline{L}\in NP$, but I'm not really sure on how to prove this.
Does anyone have an idea?... |
trying to figure out how to approach this problem.
Suppose a sender in a network wanted to communicate the length n of the block it will be using in a subsequent transmission. If there were not limits on the value of n, there would be a problem to simply send the number in binary, since the receiver would find it diff... |
I have a circuit that is represented as a netlist (specifically, an and-inverter graph). The desired outputs of this circuit are known. We can assume that some combination of the primary inputs will result in the desired outputs. If it makes it easier, you can assume that there's only one combination of inputs that ... |
I have read the answer found here which considers the size of integers when doing comparisons and how that affects on the basic cost of comparison.
I am trying to understand why each basic operation takes $O(1)$ time.
For example branches in general are considered to run in $O(1)$ time when they usually don't.
In compu... |
JLS defined a concept called "constraint formula". There is a formal definition:
Constraint formulas are assertions of compatibility or subtyping that
may involve inference variables. The formulas may take one of the
following forms:
‹Expression → T›: An expression is compatible in a loose invocation context with... |
Does the concurrent language CSP (or CCS, $pi$-calculus) model interacting machines?
Is CSP (or CCS, $pi$-calculus) Turing-equivalent to other programming languages like C?
|
Can someone enlighten me why a recursive descent parser with backtracking that tries the productions $S \rightarrow aSa$ and $S \rightarrow aa$ (in that order) does not recognize the language formed by the grammar $S \rightarrow aSa\ |\ aa$.
It appears to only parse words from the language $\{a^{2^n}\ |\ n \ge 1 \}$.
I... |
Let $f(n)$ be a function s.t $f(n)\geq 1 $ for every $n$.
I want to disprove that if $f(n) = \omega (f(f(n)))$
then it means that $f(n) = O(1)$.
I thougt of 2 approaches to show that this statement is incorrect:
Give an Example of a function that $f(n) = \omega (f(f(n)))$ for it,
for example: $f(n) = \sqrt n$
and ... |
I need help with a question.
Prove or disprove the following claim:
Let $f\colon \Sigma^* \to \Sigma^*$ be the identity function, i.e., $f(w) = w$ for all $w \in \Sigma^*$. Let $L_1$ and $L_2$ be two languages such that $L_1 \subseteq L_2$. Then $f$ is a many-to-one reduction from $L_1$ to $L_2$. In particular, if $L_... |
If I have the expression:
1011 0000 1110
-1000 1110 0001
----------------
Then, I find the twos complement of the second number:
0111 0001 1110
+0000 0000 0001
---------------
0111 0000 1111
I then add this to the first number:
1011 0000 1110
+0111 0000 1111
---------------
0010 0001 1101
But the answer given ... |
I'm having trouble getting started on this proof, and I was hoping you guys could give me a couple hints/point me in the direction of where to start? Here's the problem:
Consider a multijump Turing machine, which is like an ordinary Turing machine except the transition function is
δ : Q × Γ → Q × Γ × {LL, L, R, RR}
In ... |
I'm studying Real Time Systems, and in the textbook most of the focus is on scheduling algorithms. (Textbook: Real-Time Systems by Jane W. S. Liu)
In the algorithms that involve priorities, it is said that smaller integer represents higher priority (e.g. a process with priority 1 has more priority than one with 3). The... |
The diameter of a graph is the largest of all shortest-path distances in it. How can we find a tree of maximum diameter within an undirected unweighted graph?
Note that the tree does not have to be a spanning tree.
|
To my best knowledge, these are the sound and complete algorithms for boolean satisfiability
Variations of DPLL algorithm (e.g. CDCL, Look-ahead solvers)
Stalmarks method
Binary Decision Diagram (BDD)
I am looking for other sound and complete algorithms for boolean satisfiability?
|
The time complexity of computing $MK\bmod P$ is $O((\log n)^2)$. What is the time complexity of computing $MK^2\bmod P$? Is it $O(2(\log n)^2)$ or $O((\log n)^2)$?
|
I have been posed a question by my lecturer and I'm trying to figure the right way to go about it. They want me to ensure mutual exclusion for n processes. The code provided is as follows:
Process Pi
while(true){
while(#taken == 5){}
#taken := #taken+1;
// enjoy a non-alcoholic ... |
I was studying the product with floating point and I saw this example. I made the translation, sorry if something is not grammatically correct.
![enter image description here][1]
|
In my CS course, we are covering things from one topic to another in sort of a sensible manner. For example, binary search tree -> 234-tree -> red-black tree -> heap -> greedy algorithms -> dynamic programming.
And all the sudden, bam, there is this whole chapter on the knapsack problem. How is this problem different f... |
The algorithms using the "divide and conquer" (wiki) design strategy often have the time complexity of the form $T(n) = aT(n/b) + f(n)$, where $n$ is the problem size. Classic examples are binary search ($T(n) = T(n/2) + O(1)$) and merge sort ($T(n) = 2T(n/2) + O(n)$).
Do you know any algorithms (probably using "divid... |
I want to prove L is not regular:$$L={\{www|w \in \Sigma^*\}}$$ $$\Sigma=\{a,b\}$$
I am sure I can do so using pumping lemma. I used $$ab^pab^pab^p$$as my chosen string but I am stuck. I do not know how to handle different cases of y in pumping lemma.
|
I'm having a hard time understanding what is mean't by the aggregrate rate $\lambda$ and what it means for throughput in unslotted and slotted Aloha protocols. The more I seem to read about poission process the more confused I get.
I understand that the probability a packet is transmitted in a time interval $\delta t$ ... |
In Is concurrent language CCS or CSP turing-equivalent in language power?, the answer says that CCS or CSP is Turing-complete. But that does not seem to answer whether CCS or CCP is Turing-equivalent.
According to my understanding, Turing-equivalence and Turing-completeness is a different thing, but I may have been co... |
Consider a directed graph in which some edges are marked as "optional". A graph with $N$ optional edges induces a family of $2^N$ graphs depending on which edges are removed. In some cases, some of these graphs may be acyclic while others contain cycles.
For example, consider the graph with vertices $\{1, 2, 3, 4\}$ an... |
I'm studying the bakery algorithm.
do {
choosing[i] = true;
number[i] = max(number[0], number[1], …, number [n – 1])+1;
choosing[i] = false;
for (j = 0; j < n; j++) {
while (choosing[j]); //
while ((number[j]!= 0) && (number[j],j)<(number[i],i)));
}
critical secti... |
I was playing around with Shannon-Fano (SF) entropy encoding when I ran into this issue.
I am aware that the compression that can be achieved with SF is sometimes inferior to that of Huffman encoding, but I just though it meant that code lengths were sometimes sub-optimal in the sense that an encoding exists, which yi... |
Given the set $X=\{1,2,\ldots,n\}$; $\,\,$ $n=mp=kq$ where $m,k,p,q$ are positive integers.
Please help me to programme an algorithm that realizes random generation of the following two partitions of $X$:
$$
\mathcal{D}_{1} = \big\{A_{i}\big\}_{i=1}^{p}; \quad \bigcup_{i=1}^{p} A_{i} = X; \quad A_{i_{1}} \cap A_{i_{2}}... |
I was binary indexed trees and I came across this article. One part of the justification was the following:
Given that the (binary search tree) tree is perfectly balanced, a node N will have exactly
$2^{i}-1$ children on each side, where $i$ is the position of the first
1-bit in N, starting from 0, and counting fr... |
I'm working on a problem which to me, seems very similar to a knapsack problem:
A furniture store is having sale: Purchase two items at the price of the more expensive one. David went to the store and bought $2k$ items: $f_1, f_2, ...f_{2k-1}, f_{2k}$. The items are priced: $p_1, p_2,...p_{2k-1}, p_{2k}$ respectively.... |
Ubiquitous computing refers to "information technology and computer power, which in principle pervade all everyday objects" (see Friedewald and Raabe, 2010). A similar form is wearable computing, where the computing device is placed on a persons cloth/body. This topic currently gets much attention: smart watches (e.g.,... |
I want to implement the "vertex similarity" algorithm described in the paper Graph Isomorphism Detection Using Vertex Similarity Measure. The algorithm is as follows:
S(0) <- appropriately sized matrix filled with 1's
for k=1 to 10 do:
S(k) = Y*S(k-1)*X^T + Y^T*S(k-1)*X
k++
Apply Hungarian assignment algorithm ... |
I don't understand why the Halting Problem is so often used to dismiss the possibility of determining whether a program halts. The Wikipedia article correctly explains that a deterministic machine with finite memory will either halt or repeat a previous state. You can use the algorithm which detects whether a linked li... |
I was comparing and analyzing the sort algorithms thereby came across a machine which took 200 secs to sort 200 names but to generalize, in 800 secs wouldn't it sort 800 names?
|
Suppose you have a network which uses time division multiplexing (i.e. Slotted Aloha). There are $N$ nodes each transmitting in a given slot with probability $p$.
I understand that the probability a node is successful in a slot is $p(1 - p)^{N-1}$. This is just a geometric distribution. But our book then says that the ... |
After reading several articles about petri nets, I am confused on how firing works. Can Petri net system fire only one transition out of all active (fire-able transitions) at a single moment? Or are multiple transitions allowed to fire at a single moment?
|
Consider the following Graph
We want to generate the MST using Prim's algorithm.
Starting from node A, suppose we pick B as our next node, we see a self-loop that has less weight than the two other alternatives.
Do we ever take the self loop? Why not?
Suppose we just moved from C to D
D only has one edge connecting... |
I'm trying to perform an asymptotic analysis on a function:
$T(n) = \sum_{i = 0}^{\log n} i 2^i$
The above expression came about when I began with:
$T(n) = \sum_{i = 0}^{\log n} 2^i \log (2^i)$
Is there a tight, closed-form expression for $O(T(n))$?
|
Can we infer from the fact that the number of independent sets in product of $5$-cycle two times is $5$ and in product of $5$-cycle four times is $25$, that the capacity of pentagon is $\sqrt{5}$? That is does $\alpha(C_5 \boxtimes C_5)=5$ and $\alpha(C_5 \boxtimes C_5\boxtimes C_5 \boxtimes C_5)=25$ imply $\theta(C_5)... |
Amortized accounting method has to be one of the most abstract analysis technique I have ever seen in my life (maybe aside from the potential method which I haven't read).
In the example of the Stack with Multiple Pops (From CLRS, for reference: http://chuck.ferzle.com/Notes/Notes/AlgorithmAnalysis/Amortized.pdf), we a... |
I was wondering, if physics has the origins of the universe or the nature of space, time, and matter, biology has the existence of the cell and the origin of life, are there mysteries that computer science could seek to unravel?
This question does not concern the theories and technologies developed by computer science... |
Consider the set cover problem: given a collection of sets ${\cal U}$ whose elements come from $\{1, \ldots, m\}$ find the smallest number of sets in ${\cal U}$ whose union is all of $\{1, \ldots, m\}$. My question is: what would be a certificate for this problem? That is, if I wanted to convince someone that it is not... |
A directed rooted graph is defined as graph for which there exists a vertex r such that to every vertex x there is a unique path (Equivalently dfs tree with source r has only back edges and has all vertices). I need an algorithm to find the longest path in such a graph.
I know that in general longest path problem is NP... |
Given that I have the grammar
$\qquad\displaystyle G_1 = (\{a, b, c, d\}, \{S, X, Y \}, S, \{S → XY, X → aXb, X → ab, Y → cYd, Y → cd\})$,
how am I supposed to prove that
$\qquad\displaystyle S(G1) ⊆ \{a^{n+1} b^{n+1} c^{m+1} d^{m+1} \mid n, m ≥ 0\}$
by using Induction?
|
I've read about a problem:
There are $n$ houses that are placed randomly. Place a parking lot so that the (straight-line) distance to all houses is minimal.
I've written a Monte-Carlo algorithm, but that can't be the optimal approach.
Is there a solution other than approximating the position with Monte-Carlo method? ... |
A furniture store is having a sale: purchase two items at the price of the more expensive one. John, having just moved to a new house, rushed into the store and chose $2k$ items of furniture, $f_1, f_2, \dots, f_{2k}$. The items are priced $p_1, p_2, \dots, p_{2k}$, respectively. Help John arrange the items in pairs so... |
I want to know whats the complexity of the following variant of the partition problem:
Partition problem:
http://en.wikipedia.org/wiki/Partition_problem
Suppose we have one set formed by integers and we want to partition the set in two subsets of the same size, the same cardinality(the same number of integers in each s... |
As an example exercise, we were asked to find the loop invariant for this bit of code.
def mystery(a,b):
# Precondition: a >= 0 and b >= 0
while a >= 0 and b >= 0:
if a < b:
a, b = b, a
else:
a = a - 1
return a
From what I can see, it first ensures that a >= b.
Aft... |
Is there an evidence or a proof that the independence of strong products of graphs can increase after stabilizing?
I am interested in odd cycles only.
Let $C_n$ be an odd cycle and $\alpha(G)$ represent independence number of a graph $G$.
Let $C_n^m$ be $m$-times strong product of $C_n$.
Now say $$\alpha(C_n^{m_1m_2})... |
Show that the language L = {ww^Rw: w in {a,b}*} is not a context-free language.
|
It is the time of the year again in colleges for final exams and I am preparing mine as of now and I am finding myself in hot water when it comes to understanding the running times of appending items to arrays in C.
Basically, I know there are different ways of appending items to an array, but please consider this meth... |
I would like to know how was counted 1 second in computers. I mean how machine can understand period of 1 second. Who and when resolved this problem, and more important how ?
|
I'm a high school student. I'm really into programming and mathematics and planning to study CS and mathematics when finished with high school.
I have a couple of questions concerning this issue:
Firstly, from maths point of view, what are the prerequisites and what subjects do I get in the first 2 years? I understood ... |
So I understand that finding a solution to the 3-coloring problem takes exponential time. However, say you had a friend who you could give a graph G to and he can say in constant time whether it is 3-colorable or not. Is it possible to find a 3-coloring of G in polynomial time with his help? I think it might be possi... |
I'm in a data structures class, and am working on an assignment right now that asks me to find the theta complexity of certain loops. I missed class the day we were introduced to the topic, and everything I can find online expects more prior knowledge than I feel I have. Can someone just explain this in beginners terms... |
Does the graph isomorphism problem for directed graphs($GI_{di}$) reduce to the graph isomorphism problem for directed graphs($GI_{un}$)?
It is clear $$GI_{un}\leq GI_{di}$$ since the set of undirected graphs is subset of set of directed graphs. Does the converse hold true? That is, can an algorithm for undirected grap... |
I already read this related question on the intuition behind binary indexed trees, and while the answer explains how the tree structure works, it does not really explain how this correlates back to the array representation where the next node is accessed based on the current nodes index according to $i \mathrel{\&} -i$... |
I am given $n$ positive integers $x_1,x_2,\cdots,x_n$ as input. These are the weights of the leaves in a full binary tree, $x_1$ being the leftmost leaf and $x_n$ the rightmost leaf. The weight of an internal node $v$ is defined as the sum of weights of the leaves in the subtree rooted at $v$. The balance of an interna... |
In a system, suppose there is a process and a resource with only one instance.
Let us assume that the process holds the instance and requests the same instance of that resource. Will there be a deadlock? Under what circumstances?
|
The standard way of simulating an NFA on a computer (for implementing regex engines etc) is to construct a DFA that accepts the same language. Otherwise you get problems like exponential blowup.
However, for my purpose I need to know which paths the NFA went through for accepted words. This is obviously not trivial if ... |
I don't understand how to work backwards to work out a truth table that has been filled out already (I don't know the logical operators). E.g
P | Q | Output
1 | 1 | 1
1 | 0 | 0
0 | 0 | 0
0 | 1 | 0
I need to find the logical operators and connectives (and, or, not, implies etc.) that is equivalent to the output.
Pleas... |
I'm reading a recent paper "Finding Correlations in Subquadratic Time, with Applications to Learning Parities and the Closest Pair Problem" by Gregory Valiant on finding approximate closest pairs in $R^d$. Valiant says the current upper bound for this problem is $O(n^2)$.
On Wikipedia however it is said that the 2d div... |
I was reading about binary search trees on it's Wikipedia article. I was a little confused by this image. Why is it that the right branch to the head node does not have a sub-tree? I understand why it can be valid like this but surely the "8" could branch to "13" instead, then "10" and "14" could become the descendants... |
Suppose I have the following Functional Dependencies for a Relational Model:
$A \to C$
$B \to C$
According to the composition rule for functional dependencies we have:
If X → Y and Z → W, then XZ → YW
For the case above would it be correct to say:
$AB \to CC$
Leads to:
$AB \to C$
Would the composite $CC$ be the ... |
I have two arbitrary acyclic nondeterministic finite automata $\mathcal{A_1}$ and $\mathcal{A_2}$ and want to show that the problem $L(\mathcal{A_1}) \not \subseteq L(\mathcal{A_2})$ is in NP by specifying a polynomial proof system.
We defined a polynomial proof system in the following way:
For $L \subseteq \Sigma^*$ t... |
Suppose we have an algorithm like:
n = 0
REPEAT
c = randomInt(0,1)
n = n + 1
UNTIL (c == 0)
RETURN n
(Assumuing the random number generator produces "good" random numbers in the mathematical sense.)
I understand that there is no number $n \in \mathbb{N}$ such that the algorithm is guaranteed to terminate after few... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.