instruction
stringlengths
35
29.1k
This is the question 1.12 from Introduction to the Theory of Computation 3rd Edition by Michael Sipser. The questions says, Let $D=\{w\mid w$ contains an even number of $\texttt{a}$'s and an odd number of $\texttt{b}$'s and does not contain the substring $\texttt{ab}$}. Give a DFA with five states that recognizes ...
I am wondering if it is possible to simplify $O(A \times B \times C + A^B)$ into $O(A^B)$, i.e. omit the left part. $A$, $B$, and $C$ are all independent from each other. Personally, I think that the simplification is possible. $O(A \times B \times C)$ is a polynomial growth, and (I think) it can be rewritten as $O(A^3...
In fuzzy logic, when we associate an element with a set, we usually do it in terms of membership grade which suggests the "belonging" of this element to the set. Membership grade value 0 means that the element is certainly not the set member while grade value = 1 means that the element is definitely a part of the set. ...
For(int i=1;i<=n;i*=2) Statement I'm making notes for competitive exam and made this problem. But I'm not getting solution. Is it O( log n)? If so why?
Are there papers in the literature that address the following object detection task ? The task can be described as follows: Given a set of images, the labels are just coordinates (x,y) that represent the object locations that we wish to detect. A coordinate is not necessarily at the centre of the object and the object...
The Maximum Diversity Problem calls for choosing $m$ items from a list of $n$ items, such that the diversity defined as some metric distance between items is maximized. I have a simpler problem, which I was hoping I could solve in a simpler manner. In my case I have a list of $n$ items each with a certain non-unique ke...
I'm quite new to understanding persistent data structures, so bear with me. Consider some database with data of the form $(\text{id}, d_1, d_2)$. The last two could e.g. mean production data and sales date, respectively. The database is constant, i.e. we will not be adding or removing data points. Let $n$ be the numbe...
Modern computers don't have circuits dedicated for subtraction. They do it by using the method of complements. All is well when the 2 operands are signed 2's complement numbers. The result of addition will be another 2's complement which, when interpreted as a 2's complement number, will give the correct result provide...
A book by Korth et al. defines BCNF as follows: A relation schema $R$ is in BCNF with respect to a set F of functional dependencies if, for all functional dependencies in $F^+$ of the form $α→β$, where $α⊆R$ and $β⊆R$, at least one of the following holds: $α→β$ is a trivial functional dependency (that is, $β⊆α$). $α...
I don't know the correct terminology for asking this question, so I'll describe it with lots of words instead, bear with me. Background, just so we're on the same page: Programs often contain caches - a time/memory tradeoff. A common programmer's mistake is to forget to update a cached value after changing one of its u...
Im searching about conditional random fields for a long time and cant understand the concepts of this algorithm. I understood markov chains, and understood that conditional random field is a more complex modification of markov chain, Im right? So, what is the best didactic explanation of conditional random fields?
After a year hiatus from Computer Science courses in college, im back to hitting them hard for the next two years straight. In the next few weeks before classes start again I have been trying to refresh my memory on key concepts by writing and trying to explain them to people that have never gotten deeper into a comput...
Take a multiset $S=\{s_1,\ldots,s_n\} \subset \mathbb{N}$ and some $k \in \mathbb{N}$. Take $T$ to be the set of all sequences of the form $s_{\pi(1)},\ldots,s_{\pi(i)}$, such that $\sum_{j=1}^{i-1} s_{\pi(j)} < k \leq \sum_{j=1}^{i} s_{\pi(j)}$ where $\pi$ is a permutation of the indices of $S$ and $i\leq n$ . Is the...
I am trying to solve an optimisation problem and come up with two Integer Linear Programming models. For each model, I am able to find a function that calculate the number of possibilities based on different variables, e.g. problem sizes. I cannot directly conclude that one model has a smaller search space than the oth...
This all seems fairly related to the knapsack problem, bin packing and the subset sum problem, but I can't find the appropriate problem name. I have a multiset $S$ of $n$ (not necessarily unique) integers in the range $\{1,2,\dots,k-1\}$. The problem is to partition this multiset in submultisets such that each submulti...
The book Cycle Representations of Markov Processes solves the problem of Mapping Stochastic Matrices induced from a Markov Chain into Partitions using a $\lambda$-preserving ($\lambda$ is a Lebesgue Measure) transformation of the interval $f_{t} = (x+t) \bmod t$ ( $t$ is the rotational length to be considered is $\fra...
We know that we cannot find an algorithm that would prove that a computable function "f" is total if it IS total. How come? When a function is total, it must have a proof (derived from soundness and correctness of logic). And proof is a finite sequence of symbols, so why does simple enumeration through all the sequence...
I am struggling right now, and I need help.
I am studying propositional logic and I am trying to solve some exercise related to the following definition: Given two logical propositions $\alpha$ and $\beta$, we say that $\alpha$ is stronger than $\beta$ if and only if $(\alpha \implies \beta)$ is a tautology. Determine which of the two propositions is stronger in...
I was working on some questions in the book "Elements Of The Theory Of Computation", by Lewis and Papadimitriou, and I need help with one question - question 4.1.8 (chapter 4): Give the full details of the turing machines illustrated: >LL. I managed to solve everything but this, and that is because I don't know what...
I just started reading communication networks. Now, routers contain the network layer, data link control layer and physical layer. That being true I am confused as to why the network layer is required or to be more specific what is its function. In "Computer Networks A top-down approach", it is written that the networ...
We know that any "effectively computable" process is computable by a Turing machine (Turing-Church thesis). Although it seems that "effectively computable" is still open to discussion, the intuitive interpretation is that any process that is "mechanical enough" can be computed by a Turing machine. Turing's initial obje...
Say I have following text: "abbcccddddeeeee". As you can see, each letter has a different frequency of occurence. When making a Huffman-Trie to encode this String, will this trie be unique? I thought a bit on the problem and I can't come to a definite conclusion, but I think the trie will NOT be unique. Say the begin-s...
I understand that registers are temporary storage compartments which (usually) hold 8 bits, or 1 byte, of information at a time. This information is sent from a register into the Central Processing Unit (CPU) where, with the help of a control unit and an ALU, the byte is decoded and sent back to occupy the space of ano...
The function: double sum1(std::vector& v) { if (v.empty()) { return 0.0; } for(size_t i = 0; i < v.size() - 1; ++i) { std::sort(v.begin()+i, v.end()); v[i+1] += v[i]; } return v.back(); } There are n-1 sorts each one shorter by 1, so time taken by the function for n elem...
In the programming pearls book by Jon Bentley, there is a section about the problem of finding a random set of m integers from range 0 to n-1 integers. To do so they use Knuth's algorithm given by the following code (see also here). How can I proof that this code indeed chooses every set of m integers from the range 0 ...
I'm having some difficulty understanding the rules for valid red-black tree. If my understanding is correct there are 4 rules that a tree has to follow to be a red-black tree. Every node has a color either red or black. Root of tree is always black. There are no two adjacent red nodes (A red node cannot have a red pa...
I have the following problem: Given positive integers $a, b, c, d, n$, compute the maximum possible value (which is garuanteed to be less than $10^9$) of the function $$f(x,y) = cx + dy$$ where the only pairs $(x, y)$ that are considered for which $x$ and $y$ are positive integers and $ax + by \leq n$. I'll be very ...
Object detection can be divided into Feature-based methods and Appearance-based methods. I want to find out what the most common Appearance-based methods are for object detection. There is not much information about which are the most common approaches, therefore it would be useful to hear from someone who have experie...
Recently in an interview I was asked to implement k-means clustering using the Map Reduce architecture. I know how to implement a simple k-means clustering algorithm but couldn't wrap my head around to do it using Map Reduce(I know what Map Reduce is). Can someone provide me an explanation/algorithm of how to do that? ...
I'd like to measure how much information a document $D$ contains. Clearly, the New York Times published yesterday contains more information than my diary wrote on the same day. But, I do not know how to quantify those differences. I think there are at least two alternatives. Those are the information entropy, and tf-i...
I found this proof in Wikipedia, but one of the most important steps in it doesn't make any sense to me. I'll explain: By the definition of PP there is a polynomial-time probabilistic algorithm A with the property that ${x\in L\Rightarrow \mathrm {Pr} [A(x) = 1]>\frac{1}{2}} $ and ${x\not \in L\Rightarrow \mathrm...
Before I ask my doubt I would like to state that problem which led me to my doubt. It can also serve as a good example scenario. A $20\ Kbps$ satellite link has a propagation delay of $400\ ms$. The transmitter employs the "Sliding Window protocol" scheme with Window Size set to $10$. Assuming that each frame is $100$...
I have an assignment in my university where I have to implement Uniform Cost Search and A* Search. We have an input which includes a map and queries. The map is weighted, directed graph, represented by an adjacency matrix. The queries include Uniform Cost Search and A* Search queries (Ex: Uniform(or A*) + initial locat...
One is required to find power (positive integer) of matrix of real numbers. There are lots of efficient matrix multiplication algorithms (e.g. some parallel algorithms are Cannon's, DNS) but are there algorithms that are intended exactly for finding power of matrix and that are more efficient than sequential execution ...
I came across following definition of 2NF normal form: A relation schema is in second normal form (2NF) if every nonprime attribute is not partially dependent on any key of R. Then the book reworded the definition as follows: A relation schema R is in 2NF if every nonprime attribute A in R is fully functionally depe...
I am trying to find a way to efficiently solve a puzzle that I play a lot by turning it into a graph partitioning problem (which is basically is in its actual form). I know that generally, graph partitioning problems are considered NP-hard or even NP-complete, but considering the unique constraints of the input graph, ...
this is my first time posting on stack exchange, so excuse my naivety. I'll be straight to the point. I did my Bsc in studying Games Technology. The degree wasn't so much computer science focused and I think I've missed on some core subjects that i really need to get done with. As far as I have identified I lack some k...
I have been playing around with analysis of circuits and am trying to generate test vectors. In order to exercise the circuit in the manner I require, I need a vector that includes every change in the circuit's inputs where only 1 input toggles, but in order to be efficient, it must include each change only once and mu...
Turing's objective while building his concept was to formalise how humans do abstract reasoning. Now correct me if I am wrong but that reasoning seems just an exercise where you manipulate a set of formal statements i.e. strings with no semantics attached to it. So if Turing machines is the same as reasoning, is there ...
My search space is discrete and in the order of $10^{1360}$, with a probably very complex fitness surface. Is it hopeless to attempt to use GA for such a problem? One fitness evaluation could take 1-3 minutes per candidate solution.
Where is the formal spec located? Like this? Are tests made from formal or informal spec? I saw a project where they where generated from a the formal spec and that never made sense to me. Is the verification step manual or can it be automated? If it is manual, we now have 3 things to maintain and keep in sync. The p...
It was already asked here whether NP=coNP implies P=NP. I'd like to approach that question from the perspective of the Polynomial-Time Hierarchy. Here is a theorem from Oded Goldreich's "Computational Complexity" (Proposition 3.10): For every $k \ge 1$, if $\Sigma_k = \Pi_k$ then $\Sigma_k = \Sigma_{k+1}$, which in t...
In the paper "A Conflict-Free Replicated JSON Datatype", I encountered this notation for formally defining "rules": What is this notation called? How do I read it? For example: the DOC rule doesn't have anything in its "numerator" — why not? the EXEC and GET rules appear to have two separate terms above the line, wha...
My goal is to algorithmically take a list of relations between nodes (in other words, a list of undirected edges between nodes of a graph) and label each group of nodes such that all nodes that have a path between them have the same label (I believe the term for this is a "connected component") and nodes that do not ha...
I tried to implement the lambda calculus successor function on my own, but it's different from the Wikipedia entry on Church encoding. The entry wraps the 'b' around the rest of the expression after injecting the 'c', whereas I tried injecting 'b's application on 'c'. Is there a fundamental difference between these t...
I have real data I am using for a simulated card game. I am only interested in the ranks of the cards, not the suits. However it is a standard $52$ card deck so there are only $4$ of each rank possible in the deck. The deck is shuffled well for each hand, and then I output the entire deck to a file. So there are on...
I don't mean a TI-84 type calculator, and I also do not mean a simple calculator app on your phone. Does a basic scientific calculator require an operating system?
Is there a name for the problem of turning a bipartite graph into two graphs in the following way? We form one graph from the vertices on the left, such that two vertices are made adjacent if they share a common neighbour on the right; we form the other graph similarly from the vertices on the right. This pops up, for ...
For all NFA $A = (Q, \Sigma, Q_0, \Delta, F)$ such that: $\Sigma = \{0,1\}$ $|Q| = 4$ There exists a complete DFA $A' = (Q', \Sigma, q_0, \delta, F')$ such that: $L(A) = L(A')$ $|Q'| \leq 15$ How does one go about the proof of such a thing? I think it should be true that if $|Q| = 3$, then $|Q'| \leq 7$, however I ...
Question Does there exist a DSL for describing data structures and their manipulation? I realize that a "normal" programming language describes data structures, but they also do a lot more (e.g. IO). I'm curious what the smallest language is required to describe classic data structures like List, Tree, Set, Stack, Que...
There's a number of questions on the internet (this site and others; e.g. Why hasn't there been an encryption algorithm that is based on the known NP-Hard problems? ) discussing NP hardness of different asymmetric cryptosystems. How well established are NP hard key-sharing systems? That is, systems for establishing a s...
let me tell you first what is written in the book I am following. If the array is full,create a new array of twice the size, and copy items. At n=1,we do 1 copy operation,at n=2,we do 2 copy operation and at n=4 we do 4 copy operation and so on. By the time we reach n=32,the total number of copy operation is $1+2+4+8+1...
I just finished watching these 3 Coursera videos on back propagation in neural networks. I get the idea of what we're trying to do, but I don't get how we achieve that by calculating error in each step as weight * cascaded error (eg. the formula at the top right of screen at 12:07 in the linked video). Let's say we sta...
Kleene's recursion theorem guarantees that any Turing complete language must have quines. However, consider the following quine (in C, taken from the Quine page): char*f="char*f=%c%s%c;main() {printf(f,34,f,34,10);}%c"; main(){printf(f,34,f,34,10);} It makes no use of while or recursive functions, or any other of t...
I'm looking at a textbook exercise that asks to prove or give a counterexample that $\forall A : A \leq_m A \cup \{0\}$. $A \leq_m B$ is defined as: $\exists f$ total, computable s.t. $\forall x \in A : x \in A \Leftrightarrow f(x) \in B$, It then says in the answer sheet something to the effect of: The only counterex...
How to understand at least a small introduction to the complexity time for algorithm , how i can know that algorithm need O(log^2 N ) and so on is there any basic reference for this topic , needed in my project
I have the following task: Main memory capacity = 64MB (B = byte) Cache capacity = 64KB Block size = 16B Processor addressed information with address A = 0052A622h Calculate address tag of associated tag and minimum/maximum address inside of that block. This is the solution: Address - 0000 0000 0101 0010 10...
I am getting properly stuck into reinforcement learning and I am currently reading the review paper by Kober et al. (2013). And there is one constant feature that I cannot get my head around, but which is mentioned a lot, not just in this paper, but others too; namely the existence of gradients. In section 2.2.2. they...
The standard binary search algorithm gives log N time, where N is the total number of elements in the array. When the array has duplicates, I don't see how you could detect those duplicates ahead of time. (Iterating through the array takes N time, which is too much.) Consequently how do you improve the performance from...
I did not find any book discussing this but I came across the problem. The given set of FD was: $F=\{B\rightarrow A,D\rightarrow AC,B\rightarrow C,AB\rightarrow D,BC\rightarrow D\}$ Surprisingly the answer given was $F_{min}=\{B\rightarrow D,D\rightarrow A,D\rightarrow C\}$ $B\rightarrow D$ wasnt present directly in t...
Apart from the fact that there isn't really a language as SQL and they are less standardized , i was wondering (in terms of their applications) where graph databases are (or can be) more efficient than Relational Databases. More precisely, if there are some specific kinds of Data sets where the graph organization perf...
For me, the most difficulty when it comes to learning about reinforcement learning is that there is not much to learn in the sense that without running some algorithm, it is very difficult to get a sense of how abstract RL framework is done in practice. This is in contrast to a lot of the stuff you learn in related co...
What is the space complexity of function $f(x) = \sum_{i=1}^x g(i)$ where g(n) is O(n)? Is it O(n) because the maximum stack size is n, or is it O($n^2$) because there are $n(n+1)/2$ memory references?
I am trying to find a lead on how to solve or find a heuristic the following kind of problem: Given an array/matrix with entries of only 1s and 0s, using a set of looping functions/patterns of a given form, generate indices for the 1 entries in the array/matrix. The looping function/pattern is as followings: index = (z...
Informally, it is often said that some quines "cheat", such as those that read their own source code from memory, or the case where a program consisting of the empty string happens to output the empty string. Quines that are considerd to be "non-cheating" always seem to have the same structure. There is some data struc...
In Tarjan's algorithm for finding SCC/AP/Bridges, we update the value of the low[u] to be the min ( low[u], desc[v] ) given that v is a neighbor and has been discovered before, why it's not like this instead low[u] = min(low[u], low[v])?
Is it possible for MSO graph/tree transducers to reflect themselves, namely to create an interpreter of tree/graph transducers using tree/graph transducers? If yes, I'll be happy for some design guidelines.
In the book "The New Turing Omnibus", an excercise reads as the follows: "Show that no finite automaton can accept the language consisting of all words of the form $a^n b^n, n=1,2,3,...$ The formula represents $n$ a's followed by $n$ b's." I have no idea why a finite automaton shouldn't accept such words. Couldn...
I try to estimate error detection capabilities of arbitrary CRC polynomials. One important criteria is if a given polynomial is primitive. So I need an algorithm to check that. My goal is to write a C or C++ routine. Unfortunately I only found analytical solutions for the problem on the web. Is there some numerical al...
Let $I$ be a finite set of items and $\mathcal{M} = \{M | M \subseteq I\}$ be a set of subsets of $I$. The task is to find the biggest subset $\tilde{\mathcal{M}} \subseteq \mathcal{M}$ so that all elements of $\tilde{\mathcal{M}}$ are pairwise disjoint: $$\text{arg } \max_{\tilde{\mathcal{M}} \subseteq \mathcal{M}} |\...
Suppose I have some locations where goods are to be delivered in multiple time slots(like 7-10 am , 10 am-1 pm, time slots are continuous). All the locations are connected with each other(completely connected graph). 1.) Firstly orders of first slot are to be delivered and then only orders of other slots can be deliver...
I do sure that "grammar" and "syntax" is two different thing in CS, e.g Syntax of Java language is defined by a context-free grammar. My question are What is different in definitions of "grammar" and "syntax" in CS? What is relation between them, can we describe it by using set theory?
Let be given a 4-step pipeline with the steps "Get command, get operands, Execute command, Write back result" and an Assembler Code: 1 movl $1 , %eax 2 movl $2 , %ecx 3 movl $3 , %edx 4 addl %edx , %ecx 5 addl %ecx , %eax The line 4 addl command is forced to wait until command 3 completely walked through the pipeline....
I have an $n$-dimensional ellipsoid $E$ and a hyperplane $H$. This hyperplane cuts $E$ into two parts: $E_1$ and $E_2$ (whose disjoint union is $E$). I want to find another ellipsoid $E'$ that has minimal hyper-volume and contains $E_1$. Is there an efficient algorithm to do this? My first thought was to formulate it ...
I've been tasked to create the systems architecture for a distributed system. One approach to designing this system is to pick systems architecture patterns, and then evaluate different technologies that implement those architectural patterns. For example, a particular architecture might call for a message bus, and giv...
Let's consider a rooted tree $T$ of $n$ nodes. For any node $u$ of the tree, define $L(u,d)$ to be the list of descendants of $u$ that are distance $d$ away from $u$. Let $|L(u,d)|$ denote the number of nodes that are present in the list $L(u,d)$. Prove that the sum of $|L(u,d)|$ over all distinct lists $L(u,d)$ is bou...
I'd like to design a language that is able to reason over itseslf, means, able to get as input a code in that language (that might have went through some external redundant preprocessing, or "reflection" if to use another term) and reason over it. MLTT is of course a natural choice. But I'm seeking for a logically comp...
Say I have two arrays, { energy and score }, and they could have elements like this: E: 1 3 4 7 S: 16 10 5 1 What I want is the best score with the best energy. What data structure can support inserting items in a way that I don't have have an item with less energy and less score than another item i.e. for any i,j w...
Toda's theorem says that $PH \subset P^{PP}$. Does this imply any relationship between $PH$ and $PP$ that does not involve oracles? Does it imply either that $PH \subset PP$ or that $PP \subset PH$? Is it known or conjectured whether either of those hold?
How do I present the complement using set notation? I guess it has to be shows with universal set - {aa,bb} but I do not know how to represent the universal set in terms of set notation. Since, the strings of the universal set can be anything over alphabets {a,b}. So, how to represent it? I guess something like this mi...
Let us consider the set of all NPComplete problems. Since every problem in the set is Reducible to/from at least one known NPComplete problem, lets create a directed Graph with the following conventions: If a problem B is Reducible from Problem A, create an edge from A to B. We assume an oracle who knows all possible ...
I am working on a transformation from k Vertex Cover to SAT and I have some issues regarding the last clause in the boolean formula. Here is my approach: $$\forall \text{ nodes } n_i \in V, \text{ invent variables } v_i$$ $$\forall \text{ edges } (n_i, n_j) \in E, \text{ invent the terms } (v_i \lor v_j) \Right...
In Booth's bit-pair recording technique how to multiply a multiplicand with -2 or 2? For example while multiplying 01101(+13, multiplicand) and 11010(-6, multiplier), we get 01101 x 0-1-2. How to multiply the multiplicand using -2?
I want to compute the sum $$\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\binom{n}{6}+\dots+\binom{n}{k} \bmod 10^9+7$$ where $n$ and $k$ can be up to $10^{14}$ and $k\le n$. I found several links on stack overflow to calculate sum of binomial coefficients but none of them works on large constraints like $10^{14}$. I tried ...
Vectors clocks seem to be a common way to synchronize the partial ordering of events in a distributed, peer-to-peer, system across all clients. Is there any benefit to using them in a centralized system, where one node in the system has the power to order all events anyway, to order events? If one computer can decide t...
I am looking for an algorithm that I can use to compare nested and potentially recursive data structures, for example to implement the Scheme equal? function. equal? recursively compares two objects for equality and properly handles cycles. Specifically, the algorithm needs to return true iff the (possibly infinite) ...
While reading some of proofs in Computability Theory, I came up with following conclusion: We can design a Turing Machine which exclusively accepts finite strings (obvious). Now while trying the same for infinite string, I came up with the following conclusion : There exist no Turing Machine which exclusively accepts i...
Input: Directed, weighted, cyclic graph G. Two distinct vertices in that graph, A and B, where there exists a path from A to B. A distance d. Output: A path between A and B with distance closest to d. The path need not be a simple path - it can contain repeated edges and vertices. Which algorithms exist to solve this p...
Is there some optimal solution in an auction where each bidder bids on a bundle of items?
I'd like to check if a certain order of events happens if another property holds true using UPPAAL and TCTL. If A==true then eventually (B==true and eventually (C==true and eventually (D==true))) But since "In contrast to TCTL, Uppaal does not allow nesting of path formulae." I'm not sure how to do this. What I'v got s...
I followed an explanation of Kosaraju's and Tarjan's strongly-connected components algorithms, and they say that both have O(|V|+|E|) time complexity. That didn't make sense to me since Kosaraju uses two DFS passes and computes the transposed graph, but Tarjan's use only one DFS.
If there exists a Cook reduction of a decision problem $\mathcal{P}_1$ into another decision problem $\mathcal{P}_2$ and also a Cook reduction of $\mathcal{P}_2$ into $\mathcal{P}_1$, then is there also a Karp reduction (a polynomial transformation) between $\mathcal{P}_1$ and $\mathcal{P}_2$ (in both directions)? Thes...
How do you know that a decision problem $X$ is NP-complete?, if all other NP-problems polynomially transform to $X$ or if all other NP-problems polynomially reduces (there exist a polynomial time oracle for any problem in NP using an oracle for $X$). Definitions seem to differ all over the web. Thanks!
Are finite and recursive instances of $L$ possible with the following constraints? $\text{L $\subseteq$ {0,1}*}$ and $L \leq HALT \leq \overline L$ where $\overline L = \{\text{ x $\in$ {0,1}* : x $\notin$ L }\}$. NOTE: Raphael and Yuval kindly pointed out that I was overlooking $\overline L$ is undecidable. Aside fr...
While playing around with optimization sets in LLVM, it occurs to me that the order in which optimizations are run matters greatly since, in general, A(B(src)) is not equal to B(A(src)) where A and B are some optimization of type source -> source and src is of type source. Are there optimizations for which that propert...
Given languages $L_1$ and $L_2$, how do we prove that $$(L_1L_2)^{\mathrm{rev}} = (L_2^{\mathrm{rev}})(L_1^{\mathrm{rev}})\,,$$ where ${}^{\mathrm{rev}}$ denotes reversal? I think using mathematical induction, it can be shown true for two languages $L_1$ and $L_2$ of length $1$ each and then do induction using one of t...
just confuse with this problem. What is n × n grid graph and how many edges it has?
Consider $N$ sets $S_1,S_2,....,S_{N}$ of binary strings with don't-cares ($X$) with $|S_i| = n$ and the length of all strings is $m$. In my application, $N=1000$, $n=100$ and $m=500$. I have to find atleast one binary string with all set bits (either $1$ or $0$) that is compatible with at least one string of each set....
Thanks in advance for the help. I have the following problem which, for lack of a better description, I'm referring to as the problem I've listed in the title. Specifically I have a knapsack problem where I must exactly fill the knapsack. Additionally, the order in which I place the elements into the knapsack affects ...