instruction stringlengths 35 29.1k |
|---|
I am studying for an exam and found an exercise about finding the equivalence classes for $L=a^*ba^*(ba^*ba^*)^*$, the language over $\{a,b\}^*$ with an odd number of b's.
We found three equivalence classes: $[a^*], [a^*ba^*(ba^*ba^*)^*], [a^*ba^*ba^*(ba^*ba^*)^*]$. This means the minimal DFA would have three states, ... |
I have this language and have to prove that its not context free:
$$L = \{a^{2^kp } \mid k \in \mathbb{N}, p \text{ is prime number}\}.$$
Because it's unary, a context free language is also regular, so it should be enough to prove that this language isn't regular.
Proving $a^p$ and $a^{2^k}$ aren't regular is simple. B... |
In SLR we use follow set of a non terminal for determining reduce moves and in CLR we use lookaheads for the same.
How does using lookaheads actually help in improving the performance of the parser ?
Why is computing lookahead better than computing follow set for parsing ?
|
Prove that determining if a non-directed graph of $n$ vertices has or doesn't have a length $2$ path requires time $\Omega(n^2)$, assuming that the graph is represented as an adjacency matrix.
|
Let $L$={ $\alpha$ in {$a,b$}* | $\alpha$ has exactly two symbols b } .Prove that $L'$ = { $\alpha^n$ | $\alpha$ in $L$ ,$n \ge$0} is not context-free.I was thinking to prove it that way: Since $a^nba^nba^n$ is in $L$ then $a^{n^2}b^na^{n^2}b^na^{n^2}$ is in $L'$.Now I will use the pumping lemma for the language $L'$ ... |
Let's say we have a card game, like poker. Inputs are board cards and an array of cards strength(that is calculated based on the board cards and game rules).
For example for 3 ranks(A, K, Q) /2 suits(h,s) simplified poker(Leduc) with Qs on board as input we will have a strength array [2, 2, 1, 1, -1, 3] indexes are [A... |
Given the image of an adhesive tape as below, what would be possible method to find the tape radius?
The image sepia toned with artificial background added. The tape itself is partially hidden.
|
Generally computer programmers who are mathematicians or have mathematics background are very good in terms of algorithms and computer programming in general.
What I am not saying:
Mathematics is needed to be a good computer programmer.
Mathematics is necessary for programming.
Good mathematicians are good programmers ... |
I have a question about the Pumping lemma. Condition $2$ of the pumping lemma for a string division $xyz$ states that the middle portion of the string $y^i$ can be 'pumped' for any $i$ greater than or equal to $0$. This means that y can be the empty string and yet still belong to the language. At the same time, the car... |
Q: Suppose a language A is NP-complete. Is this following statement correct?:
A: If there is a polynomial algorithm to solve A, then it can be used to all the problems in NP.
My (and some others) first thoughts were that this answer is correct. But if you look at the following picture you can see that there exist probl... |
Does the characterisation of an algorithm for $n$ items as in-place imply space ∊ $ο(n)$
formally
informally ("among coders")?
|
I would like to seek help on the complexity of the following problem. Given positive integers $m$, $n$, $D_1$ and $D_2$, find all sequences $a_1\lt a_2 \lt \dots \lt a_n$ are there such that:
each $a_i\in\{1, \dots, m\}$
$\sum_{i=1}^n a_i = D_1$
$\sum_{i=1}^n a_i^2 = D_2$.
I want to know the complexity with respect... |
In this diagram, I have a doubt in the 2nd picture. How can different languages have same independent code optimizer ?
I think that different languages will have their own code optimizer(different) and then the optimized code will be converted to target machine code based on different machines.
So the arrow should be... |
I was wondering if this language is regular L={$a^{2m+k}b^{3n+l}c^{m+n}$ & $
k>2 $ & $ l \le 3$ & $m,n \in \mathbb{N}$} .I think the regular expression is :
$(aa)^*aaa(a)^*(bbb)^* \cdot ({e} \cup {b} \cup {bb} \cup {bbb} ) \cdot (c)^* $ .Am I correct?
|
I'm doing an online course in which I'm struggling with the following multiple-choice question:
Suppose $ T $ is a minimum spanning tree of the connected graph $ G $.
Let $ H $ be a connected induced subgraph of $ G $. (I.e., $ H $ is
obtained from $ G $ by taking some subset $ S \subseteq V $ of
vertices, and taking ... |
The complexity classes P, NP, and PSPACE are closed under polynomial-time reduction.
The complexity classes L, NL, P, NP and PSPACE are closed under log-space reduction.
I wonder if NPSPACE is also closed under polynomial-time reduction and/or under log-space reduction.
|
I've recently been studying MIPS as part of a CS course, but something bugs me.
We've seen so far that MIPS increments the PC by 4 each cycle because each word is in fact comprised of 4 bytes (32 bits), each with their own address.
I've also seen that a theoretical RISC machine has instructions that should only take a... |
I have a grocery dotted list of pairs which are missing items that I need and I don't have any of them, so I am going to the supermarket.
Each pair in the dotted list is the name of the missing item that I need and a natural number which is the quantity/amount i.e. how many of this item I need.
I am in the supermarket ... |
Let $0\le q<p\le \frac{1}{2}$, and let $P,Q$ be two Bernoulli Random Variables such that:
$$Pr[P=1]=p ; Pr[P=0]=1-p$$ and $$Pr[Q=1]=q ; Pr[Q=0]=1-q$$
My question: Does it follow that, for any $\epsilon>0$ and $n$ as large as desired $|A_\epsilon^{(n)}(Q)|<|A_\epsilon^{(n)}(P)|$? I.e., that the Typical Set of $P$ is lar... |
Let we have a 3CNF under following restriction: each variable occurs 3 times.
Then I apply generalized resolution (GR) (I don't know which name would fit more) technique (number of clauses can be arbitrary large, just an example):
$(x\lor A)\land(x\lor B)\land(\overline x\lor C)=(A\lor C)\land(B\lor C)$. Here $A,B,C$ a... |
I need to verify some assertions about the minimalist Turing-complete language Jot.
Many of the assertions I want to investigate are semi-deciable (co-recursively enumerable). So far it's been fairly straightforward to literally enumerate every Jot program via its Goedel number and testing the assertion's complement by... |
Say you have a (context-free) grammar, and you wish to mathematically model the magnitude of the ambiguity possible under this grammar, across the space of all possible** input strings.
Practically, one can feed in a large number of inputs strings to a parser of the grammar, and get a distribution over that set of inp... |
IEEE Std 754-2008 is the modern definition of Floating-Point Arithmetic. It requires that division (among other operations) performs
as if it first produced an intermediate result correct to infinite precision (..), and then rounded that intermediate result, if necessary, to fit in the destination’s format.
I ask for... |
From my understanding, Turing complete means that the program or machine can complete any computation that a Turing machine can complete, which to me means any computation. So how can something like HTML or PowerPoint be Turing complete?
|
Using the graph representation with (node, [list of neighbours]), to show that two graphs are isomorphic it is sufficient to:
show that the vertices have the same degree and
for every pair of vertices with the same degree, the degrees of the nodes in their adjacency list must be the same.
The last point was a bit amb... |
So I’m currently working on something and I have converted all decimal digits 0-9 into binary.
But now I want to take say 6 in binary and increase its order of magnitude by base 10 (turning 6 into 60) without converting back to base 10.
Is this possible and if so is there a way to do it with any number, X --> X0 ?
EDIT... |
There are four types of top-down parsers according to this answer:
recursive descent backtracking
recursive descent predictive
table-driven with backtracking
table-driven predictive.
Also the author says that:
All top down parsers are LL
However, in this answer the author seem to associate the LL parser with table... |
Let $\Sigma$ be an alphabet, and let $x^+,x^-_1,\dots,x^-_n \in \Sigma^*$ be strings over that alphabet. Call a string $s \in \Sigma^*$ good if $s$ is a subsequence of $x^+$ but not a subsequence of any of $x^-_1,\dots,x^-_n$.
Given $x^+,x^-_1,\dots,x^-_n$, I am looking to find the shortest good string $s$. Is there ... |
I have seen 2 answers in stackoverflow:
A "trivial" property is one that holds either for all languages or for none.
The property is trivial if it contains every TM, or if it is empty.
My problem is: Saying that a property is trivial if it contains every TM is not the same as saying that a property is trivial if it c... |
All references I find about the ANOTHER HAMILTONIAN CIRCUIT problem:
Given a graph and a hamiltonian circuit on it, is there another
hamiltonian circuit on it?
I was trying to reduce it to the hamiltonian circuit problem but I always need to add too many or too few circuits to the original one.
Am I going through ... |
Let $\Sigma = \{a, b\}$. For each of the following languages, find a grammar that generates it.
(a) $L_1 = \{a^n b^m : n\geq 0, m>n\}$
(b) $L_1^3$
(C) $L_1^*$
I know the grammar for the language $L_1$, that is
$S \rightarrow aSb \mid bA$
$A \rightarrow bA \mid \epsilon$
please help me to find the grammars for another t... |
Let us assume that we have a 2CNF $\varphi(X,y)$. Then we want to see if there is equal formula where $y$ (or $\overline y$) is pure literal. Can this be done in polynomial time? Are there some criteria for understanding this? Can we say if any minimal CNF has $y$ as pure literal, then all of them do?
Simple example:
$... |
$L = \{ w: |w| \bmod 3 \geq |w| \bmod 2 \}$
I know, when the length of strings is not $3, 9, 15, 21,\dots,$ they will be members of the given language but unable to write a grammar for this language.
Please confirm one more thing, that this given language is regular?
|
Big-O describes an upper bound on run time. Is that not the definition of "worst-case"?
For example, how can we say that a hash table insertion require O(1) time on average? Constant time is the best case, n time is the worst case. How can an upper bound describe an average run time? In what sense is that bound "upper"... |
If we do not allow unit clauses, can 2CNF containing 3 occurences per variable be unsatisfiable?
Every time I try to connect opposing variables to a cycle, I need to draw 4 edges for at least one variable (2 per positive and negative occurences).
So, is it even possible?
|
The following algo is a simplified version of a text justification algo taken from dynamic programming lecture notes of MIT OCW.
I am confused why this particular algo has a time complexity of $\mathcal{O}(n^2)$ and not of $\mathcal{O}(n!)$ -:
function foo(int index) {
//some constant time operation like 2+2
fo... |
filter() in functional programming can be thought of as being analogous to an equation that filters the range of the variable.
map() can be through of as a function mapping domain to codomain.
reduce() is the only one I have a problem with. To me it just seems to be a special instance of map / function, where $R^{n} \r... |
In Elements of Programming Interviews, authors talk about a tip for understanding how to use primitive types (int, double, etc).
Be aware that commutativity and associativity can be used to perform operations in parallel and reorder operations.
I'm having trouble even imagining what these means in the context of bits... |
The following problem appeared while trying to distribute a program over a cluster of computers:
Given an undirected graph $G=(V,E)$ and an integer $n$, partition the vertices of $G$ into $n$ partitions $V_i$ of about equal size such that the number of edges crossing partition boundaries is minimised.
You can imagine $... |
Let's say we have a context free language, the CFG that produces it.
And then we have a DFA for a regular language.
If the intersection is empty is decidable, but how and how efficiently?
And if you could be so kind, please explain the best known algorithm as simple as you can?
|
I have some confusion about 3.2-4 in CLRS.
Here is the question :
Is the function $\left\lceil \log { n } \right\rceil !$ polynomially bounded? Is the function $\left\lceil \log { \log { n } } \right\rceil !$ polynomially bounded?
Here is the official answer:
There is a point I can't understand.Why $\left\lceil l... |
We know that if $B$ is in $P$ and if $A \leq_p B$ then $A$ is in $P$ too.
If $B$ is in $SPACE(n^2)$ and $A \leq_p B$ then so $A$ will be in $SPACE(n^2)$?
I think that the answer to this question is true, because if $A\in P$ then $A \in PSPACE$, and then $A$ could be in $SPACE(n^2)$. I doubt my answer because of that $... |
Given that 3-colouring and 4-colouring are NP-complete show that the
aproximation threshold of the minimal colouring problem is greater or
equal than $\frac{4}{3}$.
My current approach is to work by contradiction assuming there was such an algorithm that in polynomial time can produce a $\delta$-aproximation with... |
AFAIU types can be a Set whose elements are programs or a proposition whose elements are Proofs. So based on this understanding:
Inductive prod (X Y: Type) : Set :=
| pair: X -> Y -> prod X Y.
Following code should compile but it does not due to the following error. If I change Set with Type or the other Type with Se... |
I was recently in an interview and was asked what would be the smallest memory foot print and fastest system to check if a given phone number is in your data store given that all phone numbers will only be 7 digits.
I was told the answer is a byte but, I'm still not 100% sure how this would work and have not been able ... |
Strings are known to not satisfy the commutative property.
pq is not equal qp unless p is empty string. Is there a case where pq can be qp where both are non empty strings and p and q are distinct
|
One of the advantage of using a features reduction/sub feature selection is to avoid a high dimentionality.
The most known method is the Forward selection, where it finds the best combinations of features among others, iteratively. Now please have a look at this picture retrieved from a ppt slide on the internet.
The ... |
Recall the notion of NPO problem. An NPO problem is simple if the following is true:
$\forall k \in \mathbb{N}^*. (\forall x. OPT(x) \leq k) \in P$
In words, given any positive integer $k$, the problem of deciding if for instance $x$ its optimal is less or equal than k is in $P$.
I'm asked to show the MAXIMUM CLIQUE ... |
I read the following solution for Showing that $\mathrm{NP}$ is closed under union
and they used the same $c$ for both the verifies $V_1$ and $V_2$. Why is it correct?
Let $L_1$ and $L_2$ be languages in $\mathrm{NP}$. Also, for $i = 1, 2$ let $V_i(x, c)$ be
an algorithm that, for a string $x$ and a possible certifica... |
Apologies if this is a duplicate. I searched for some time and the closest I could find was the Knapsack Problem, which does not fit because I have a fixed team size & a different value function.
I have $N \approx 50$ Pokémon, from which I need to choose a team of six to attack an enemy. Each pokemon can survive for a ... |
I am aware that satisfiability is NP complete and unsatisfiability is co-NP complete. But somehow I feel that labeling satisfiability as NP-complete and unsatisfiability as co-NP complete is papering over the fact that unsatisfiability (or equivalently validity) is inherently a harder problem than satisfiability. Suppo... |
Context
I'm designing a language which implements lambda calculus and (first-order) predicate calculus, where lambdas behave as the abstraction encapsulating logic, compositionally forming a computational model for higher-order logic.
Question
How does one, in general, choose between operational, denotational, and ax... |
The questions is pretty simple: Given a sorted array of N elements, what is the average number of comparisons made in order to add a new element (let's call it x) in its correct position?
I am using linear search for that task.
So far, I've tried to solve it this way:
# of Comparisons Probability of A[i] > x (Not s... |
[Updates: Thanks for @Raphael 's notification, I delete the screenshot of the book and type the $LaTex$ materials]
In Sisper's Intro to the theory of Computation, there is a reduction method via Computation History. He proves theorem 5.10 and 5.13 (3rd edition, page223) by that method. (I append the related part at the... |
This is pretty fundamental but I'm getting confused. Let $U$ be the Universal Turing Machine and $L_{u}$ the language it accepts which is recursively enumerable. Obviously we are not able to construct the machine for its complement i.e. for $\bar{L_{u}}$, otherwise the whole theory crashes but still let's try. Let $V$ ... |
Short-circuit evaluation is a straight forward subject for lazy evaluation on Boolean expressions, I noted that two factors could be useful in ordering Boolean functions to improve run-time. But this is applicable in a very particular hypothesis:
Knowing a percentage of positive (hence negative) result of a function.... |
We have implemented a spectral clustering algorithm according to the article Multiclass Spectral Clustering (Yu and Shi, Proc. IEEE ICCV '03, vol. 2, pp. 313–319, 2003; PDF).
We used the algorithm to test simple cases of clustering and it seems to work, however in some cases the algorithm doesn't use all the available ... |
Can the language $L = \{ vv : v \in \Sigma^* \}$ be expressed as the concatenation of two nontrivial languages? (A language is nontrivial if it differs from $\{\epsilon\}$.)
|
I have the following labyrinth where R is the robot(the parent node), red blocks are the obstacles where the R cannot move and GOAL is the node where we want the robot to go. Every node should be written in this form R(1,2,4), 1 is the row, 2 is the column and 4 is the distance from the current node to the goal node GO... |
The Hitting Set Problem (HS) is defined as follow. Let $(C,k$)
$C = \{ S_1, S_2, ..., S_m \}$ collection of subset of S i.e. $ S_i \subseteq S , \forall i$
$k \in \mathbb{N}$
We want to know if exists ${S}' \subset S$ where $|{S}'| < k$ such that $S_i \cap S' \neq \emptyset $, $i = 1,2,...,m.$
Prove that HS is Np-C... |
It seems intuitive that conditional Kolmogorov complexity is only zero when the bitstrings are the same, and otherwise is greater than 0. I.e. if $b_1 = b_2$, then $K(b_1|b_2) = 0$, otherwise $K(b_1|b_2) > 0$.
However, if that is the case, then we could break a long bitstring into many smaller, different bitstrings, a... |
Most of the learning material my knowledge of computers is based on revolves around early , byte addressable CISC-like machines , such as the SAP described in Paul Malvino's great "Digital computer Electronics" book. The concepts described fairly simple to handle to understand once you get the hang of it : the address ... |
I have been refreshing on greedy algorithms as an algorithm design technique. I have read many sources for an explanation of what a greedy algorithm is, because I would like to put together a general greedy algorithm.
When reading these sources, I have gathered all of the important concepts to try to come up with this ... |
Background: I would like to experiment with evolutionary algorithms to generate the "optimal" poem, according to a fitness function to be determined later. However, I cannot think of a good way of implementing 'crossing over' for the 'surviving' poems in each generation. Therefore, I gained some interest in the Cuckoo ... |
I have the following weighted graph with connected nodes. I've made some connections red just to be easier on the eye.
I am applying DFS on this graph and I am not sure if this is correct because on theory DFS takes the first node and that implementation is easy when the graph isn't weighted so we apply alphabetically... |
When designing an algorithm for a given problem, sometimes I find it hard to foresee or clarify to myself what the boundary/edge/corner cases are. Not being able to come up with a decent number of the possible boundary/edge/corner cases causes one to make implicit assumptions about the problem at hand, which yields ove... |
I don't understand the exact relation between between FPT and FPTAS. Specifically, given an optimization problem P with fptas A does that imply that for any parameter (a computable map from the input to the integers) there is an FPT algorithm? It's standard that given an FPTAS, there is an FPT algorithm parameterized b... |
I read that shortest path using DFS is not possible on a weighted graph. I pretty much understood the reason of why we can't apply on DFS for shortest path using this example:-
Here if we follow greedy approach then DFS can take path A-B-C and we will not get shortest path from A-C with traditional DFS algorithm.
I th... |
Quite possibly this problem is already solved and has it's own name, but I was unable to find any directions.
So, I have a portfolio with some items in it:
| Name | Price | Amount | Share |
|--------|-------|--------|-------|
| Item 1 | 200 | 1 | 25% |
| Item 2 | 100 | 2 | 25% |
| Item 3 | 50 | ... |
I generally use state removal method to convert DFA to regular expressions. But I want to try other methods like using algebraic methods and arden's rule.
How to solve a DFA with multiple final states using algebraic method?
I refered this link
https://cs.stackexchange.com/questions/2016/how-to-convert-finite-automata-... |
The question is from my complexity-theory course.
The question
If $L_1,L_2,L_3 \in \lbrace 0,1 \rbrace^*$, and different from $\lbrace 0,1 \rbrace^*$ and from the empty language, prove that if $L_1 \leq_p L_2 \cap L_3$, where $L_2 \in NP$ and $L_3 \in P$ then $L_1 \in NP$
My answer
Due to the fact that $P \subseteq NP... |
One of the nice things about genetic algorithms is that they can easily be used for a diverse array of problem domains, whereas PSO for example seems best-suited for candidates of real-valued vectors (although I am aware of the use of the latter in combinatorial problems). It has, however, occurred to me that, by using... |
Here is the description of a proof problem:
A complete binary tree of depth N is a binary tree in which every node on levels $0,1,2,...,N-1$ is a parent and has two children, and each node on level N is a leaf.
It's asking for proving binary tree of depth N has $2^{N+1} - 1$ nodes.
I am not really sure how to app... |
The question is from my complexity-theory course.
Explain the concept of polynomial reduction between problems and explain how, and under what circumstances, lower bound and upper bound problems can be determined.
My attempt:
a problem $A$ can be polynomial reduced to $B$ if given an instance $a:A$ an istance $b:B$ ca... |
I'm trying to practice some theory on graphs:
Namely, we have given connected undirected weighted graph with $N$ nodes and $M$ edges, let's say we want to find the shortest paths between node $1$ and node $N$. But, not only that we want to find all the paths with same shortest distance between $1$ and $N$.
Now I was w... |
Just what the title says.
Can we have a strictly monotonically increasing/decreasing sequence generated by a distributed system (without a single point of failure)?
My current thoughts are that this is a consensus problem, and is thus impossible to achieve in an asynchronous messaging system (like the Internet). Anothe... |
There is a certain family of typical branch & bound problems in which we have to put $n$ objects into $m$ indistinguishable bags.
Usually solutions are represented by $n$-size vectors in which $V[i]$ means that the $i$-th element is in the $V[i]$-th bag.
Is there a way to avoid generating equivalent solutions without p... |
Input
We are given a set of basis elements, $\ v_1$,$\ v_2$ ,...,$\ v_n$ of a $\mathbb Z^m$- module and a multiset of integers $\ B :=$ {$\ b_1, ..., b_m$}
Desired Output
Return true if there exists a linear combination $\ a_1v_1 + a_2v_2 + ... + a_nv_n$ such that the resulting vector uses the integers $\ b_1, ... ... |
I am learning DAGs and Equivalence Class of DAGs, I am reading the material by Prof. Campos Ibáñez here: https://www.cs.cmu.edu/afs/cs/project/jair/pub/volume18/acid03a-html/node2.html
However, I don't understand this:
"It should be noted that each structure in the DAG space is not always
different from the others... |
Are the undecidable languages closed under complement?
How can the answer be proved?
|
Sorting algorithms have a huge literature behind them, and the algorithm I'm planning has some similarities to the topic, but I couldn't even find the correct search terms to know whether a field exists which studies such algorithms.
Imagine the following problem: there is a serial communication channel of a very low t... |
I am studying the s-m-n theorem and the concept reminded me of currying.
From wikipedia article about s-m-n theorem:
the theorem says that for a given programming language and positive integers m and n, there exists a particular algorithm that accepts as input the source code of a program with m + n free variables, to... |
I've been reading the following paper to understand how I can develop a non deterministic algorithm for test cases generation https://www.researchgate.net/publication/293043297_A_two-stage_algorithm_for_combinatorial_testing
I understand that he is using a two stage solution, having a greedy algorithm as a solution for... |
The VPRI institut founded by Alan Kay has some papers on constraint-based layouts for GUIs based on constraint solving.
For instance:
Wallingford: Toward a Constraint Reactive Programming Language by Alan Borning (2016)
A Report on KScript and KSWorld by Yoshiki Ohshima, Bert Freudenberg, Aran Lunzer and Ted Kaehler ... |
Why don't imperative languages support parametric polymorphism as powerful as whats in Haskell and OCaml?
More specifically if I call a function foo(x) that internally calls bar(x) which internally calls baz(x), what prevents the type of parameter x from being inferred all the way down?
Is it possible to design an impe... |
If I've RFID Collision Arbitration System that is based on multi-frame dynamic frame ALOHA. How can compute the probability of the average tag resolution $L_n$? ,$P_s$ is probability for packet trasmission that no other packet arrives in the previus slot. $P[N(t+T,t)=0)]=e^G ; S=Ge^G$;S stand for Throughput.
$G=Tx... |
I'm following the tutorial over at https://mattmazur.com/2015/03/17/a-step-by-step-backpropagation-example/ and so far everything makes sense to me. I am now trying to reason about how these formulas extend to any number of hidden layers. Specifically, how to proceed when you have the partial derivative of total error ... |
I was reading an article on an alternative method of modulo reduction and i couldn't understand the following excerpt (Those in bold) :
"A single 32-bit division on a recent x64 processor has a throughput of one instruction every six cycles with a latency of 26 cycles. In contrast, a multiplication has a throughput of ... |
I have a graph related problem.
Let $G$ be an undirected weighted graph of $N$ nodes. I want to find $p$ independent (they have no edge linking them) sub-graphs of $m$ nodes in a way that the total weight is maximized.
For example, let $G$ be a graph of $16$ nodes, I want to find $4$ sub-graphs of $4$ nodes with $w_1, ... |
There is an easy and hard version of the problem I am asking about, so I will start with the easy to make for clearer reading.
Suppose that we are have a set of vertices $V =\{v_1,v_2,...,v_n\}$ and sets $S_1,S_2,...,S_m \subset V \times V$. Let
$s_{ijk} = 1$ if $\ (v_j,v_k) \in S_i $, 0 otherwise.
Given integers $\ k... |
Suppose there are an undirected graph $G = (V, E)$ and a function $f : V \rightarrow \mathbb{R}$, which associates a weight for each vertex in $G$. I was wondering if it is possible to find a tree $T = (V, E_T)$, where $E_T \subseteq E$ and $\sum_{i \in V} f(i) d_{i}^T$ is minimal. The root of all trees must be a prede... |
Given $n$ real numbers (where $n$ is even) find a pairing which minimizes the maximum sum of a pair.
I think the optimal pairing is obtained by sorting the original set, pairing the first element with the last one, and so on. But I get stuck trying to prove it.
I tried use the "difference reduction method", examining... |
First: I have programmed a few programs dealing with computer vision (not with libraries but from scratch):
Simple Character and Figure Recognition
Character and Figure Recognition with Neural networks
Facial recognition
so I am not asking for details on these.
The characteristic of all my programs is that once you... |
In their original paper, Storing a sparse table with O(1) worst case access time (Fredman, Kolmos and Szemeredi, Proc. FOCS '82, IEEE, 1982), the authors show that a perfect hash function must exist, provided that the table is the square of the number of elements in the key space.
The key part of the proof bounds the n... |
3-SAT with at most 3 occurences per variable is $\mathsf{NP}$-hard.
Now I'll try to solve it using these:
Theorem: SAT where all clauses have length 3 and variables occur 3 times, is satisfiable.
Double propagation. If there is a clause $(a\lor b)$ and no clause $(\overline a\lor\overline b)$: change all occurences of... |
I learned the following theorem in class:
"If $T(n)$ is asymptotically non-decreasing and $f(n)$ is smooth, then $T(n) =
O(f(n)|n=b^k, k=integer)$ implies $T(n) = O(f(n))$."
I'm trying to show using a counterexample that this theorem doesn't hold if $f(n)$ is non-decreasing but not smooth. Smoothness means that $f(bn) ... |
I'm reading on small-depth circuits. Since every formula can be turned into a CNF formula, which has depth at most 3, why should we study deeper circuits? Is it because convertion to CNF may result in an explosive blow-up? If so, can you give an example?
|
This person was asked: "Why is a blockchain implementation different than a distributed consensus system like Raft?"
In part of their answer they replied:
For one, Raft is not Byzantine fault tolerant, i.e., not designed to account for arbitrary failures. If a participant fails by telling different peers different thi... |
How to prove that a $k$-universal family of hash functions is $(k-1)$-universal family?
I tried to prove it by definition of k-universal family of hash functions but I didn't know how to use the definition.
If I prove it, Is it necessary that a $1$-universal family of hash function is universal family?
Definitions:
Let... |
There is a very simple randomized algorithm that, given a 3SAT, produces an assignment satisfying at least 7/8 of the clauses (in expectation): choose a random assignment. A random assignment satisfies each clause with probability 7/8, and so linearity of expectation shows that the expected fraction of clauses satisfie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.