instruction
stringlengths
35
29.1k
Assumptions Let's say we have any recurrence relation (however this is perhaps more applicable to "unpredictable" recurrence relations): $$T(n) = \;?$$ For example: $$T(n) = aT\left(\frac{n}{b}\right) + h(n)$$ We could have this recurrence where the input is an array of length $n$ and $a$ and $b$ are determined by part...
When you learn programming they tell you choose data types that suffice for the concepts you're expressing, i.e. not too small because then your data won't fit and not too big because you don't want nonsensical values stored. Table of unsigned integers 8-bit: 0 to 255 16-bit: 0 to 65,535 32-bit: 0 to 4,294,967,295 64-...
A common issue in app development is avoiding over-fetching of data, such as in this naive (pseudocode) example: get_user(id) { return sql_query("SELECT * FROM users WHERE id=$1", id); } render_some_webpage() { // ... print get_user(session.user_id).username; // ... } While this would work, it requires the da...
Are you just accessing the data and things on the PC you are connecting to or, if it had a better processor/ram/etc, are you able to take advantage of that?
Which of the following sounds better (or more rigorously): x grows with $N^2$ or x grows with $O(N^2)$ or x grows quadratically with $N$.
What's the difference between $O(1)$ and $o(1)$ ?
I tuned some hyperparameters and got 2 best models. These two models are almost the same "test(not train)" and "validation" errors. But model A has lower "train" error than model B. In this case, the model with lower "train" error (model A), would show good performance on new data? (good generalization) Or model A is m...
In the book Operating System Concepts, it is said that: A claim edge $P_i \rightarrow R_j$ indicates that process $P_i$ may request resource $R_j$ at some time in the future. [emphasis added] Here one can assume two different things from this line: $P_i$ may request for $R_j$ in the future, but we don't know abo...
Forgive if this seems like a repeated question. However, I couldn't find a specific algorithm to my needs. I have nodes that have weights with each other. I want to find all unique groups of nodes, with the constraint that every node in the group has a weight with every other node a value that is less than a certain pr...
If Alice and Bob each have a bit string of length $n$, what is the randomized communication complexity (either one or two-way) of computing the Hamming distance mod $4$? It seems this is hard to search for online but I am sure it must be well known. The one-way deterministic communication complexity is clearly linear...
Let's say there is a set of $N$ real numbers, $x_i, i\in\{1,2,...,N\}$, and we would like to choose $n$ points out of them to get the sum of the chosen points as close as possible to a certain number, $y$, i.e. minimising $$ f(J) = \left[y - \sum_{j\in J}x_j \right]^2 s.t. ~J \subset \{1,2,...,N\} ~\mathrm{and}~ |J| = ...
This is my take : Epsilon ---> 1 0 --> 2 01 ---> 3 10 ---> 4 11 ---> 5 001 ---> 6 010 ---> 7 . . . So therefore we can count them. But based on this video : https://www.youtube.com/watch?v=oe-ZAJQz9Cc&index=5&list=PLsFENPUZBqiqbnD-WatYxUhRWLMNDoMun They should not be countable, but i did not understand that video, th...
So given two DFAs, is the problem of finding if they generate the same language a Decidable problem? I already know that Equality of two CFL is not Decidable but what about Equality of two DFAs? considering most of the problems with DFAs are decidable, is this decidable as well ?
Perhaps this isn't exactly a computer science question, but I thought this wouldn't strictly fit in Electrical Engineering either. Let me know if I should move this somewhere else Suppose I have a process that is single-threaded and rather poorly optimised. It doesn't max out my processor, and instead stays stuck at ar...
So considering that set of all turing machines is countably infinite, can we also say that set of all FA machines(DFA/NFA) or set of all PDA machines(DPDA/NPDA) are countably infinite, Considering that we can build all of them with Turing machine?
In the original Practical Byzantine Fault Tolerance (PBFT) paper they mention they implemented a fault tolerant NFS service. To do that they made a library for PBFT. Does that exist anywhere? As that paper is quite old now and was well received, I thought it should not be hard to find implementations. However so far I ...
Let's say we have given 2-dimensional maze in form of matrix, conisting only of the letters x and .. For example the following maze: xxxxx 11111 ..... x...x 1...1 .xxx. x.x.x 1.2.1 .x.x. x...x 1...1 .x.x. xxxxx 11111 ..... Let's group those elements, we will group x's only, such that two elements will ...
Suppose that a stream of data is arriving like $(4,5) (5,6), \cdots ,(7,8)$, where for each particular tuple $(a,b)$, we have $a \in [n]$ and $b \in [k]$. I want to store this stream. In my setting $k = O(n^2)$, and there are no duplicates, so the stream has at most $nk$ pairs. I want a data structure that supports thr...
I'm trying to figure out how an SMT solver works as simple as possible. Let's assume we have a simple input program with symbolic values x and y. E.g. if (x+y < 20) { if (x > 10) { if (y > 10) { assume(false); } } } Here we have different paths, depending on the conditions. To reach assume(fa...
The only thing I found online about this is the following blog: http://blog.computationalcomplexity.org/2005/03/tape-reduction.html where they write: Roughly the simulation guesses every step of the transition function on one tape and uses the other tape to verify the transition function on each tape of the origi...
I'm interested in the dynamic connectivity problem for forests. In this problem a forest is subject to updates (edge insertion that do not create cycles and edge deletion) and queries if two nodes are connected. Link cut trees and Euler tour trees supports these three operations in $O(\log n)$ (Erik Demaine's notes). ...
Here is an excerpt from the book Algorithms, 4th edition by R. Sedgewick and K. Wayne: Proposition E. In the resizing array implementation of Stack (Algorithm 1.1), the average number of array accesses for any sequence of operations starting from an empty data structure is constant in the worst case. Proof sketc...
I'm trying to figure out how to create a CFG for univocalic words... Univocalic words are words that have only one the same vowel letter throughout the word Example: September, Anna Would appreciate any of your help..
In their paper "Alternation" Chandra et al. show how an Alternating Turing Machine can simulate a Deterministic Turing Machine with time-complexity $t(n)$ using only $\log(t(n))$ space what implies $P \subseteq AL$. I wonder why one cannot use the same (or at least a quite similar) construction in order to simulate a ...
I have a set of rectangles that needed to be grouped based on their locations. (All the rectangles follow the same orientation.) Two rectangles would be in the same group if the distance between them is less than a certain (constant) threshold. The obvious algorithm will find all groups in ${O(n^2)}$ time. What I am...
I am trying to implement bilinear interpolation as described in the paper Spatial Tranformer Networks by Jaderberg et. al (see link to paper). They describe bilinear interpolation in Equation 5 as: $$ V_i^c = \sum_{n}^{H}\sum_{m}^{W} U_{nm}^c \max(0,1-|x_i^s - m|)\cdot\max(0,1-|y_i^s - n|), $$ where: $V_i^c$ is the re...
I have a totally random source of signal data that looks like a typical normal distribution. I've included an image as I like pictures:- The source has a mean of 0, and a standard deviation of 1. It's analogue and therefore of infinite resolution. Very typical. I then sample the signal with a Tricorder and record th...
I'm running A* search with a theoretically consistent heuristic. I'm doing a lot of float multiplications, and I'm not sure how best to ensure that my heuristic remains consistent down to the last decimal point. Is this something that is safe to ignore? If it matters, my search objectives typically are around 5000,...
I guess that this is a chaos, randomness and modelling question. Can it be conceived that a sufficiently powerful (perhaps quantum) computer might be able to accurately predict the scores on a physical die tossed from a cup? I understand that dice land the way they do because of highly complex and chaotic interactions...
Consider the following problem. Given a set of $n$ items having weight $w_i$ and value $v_i$ and a maximum capacity $W$, maximize $\sum\limits_{i=1}^n a _i v_i$ under $\sum\limits_{i=1}^n a_i w_i \leq W$ where $a_i \in \{0,1\}$. That is, choose a subset of items giving the maximum total value while still fitting into t...
$$T(n) = 2 T(n/2) + \sum_{k=0}^n (k+2)^2$$ I want to use the substitution method. How can I generate my guess and how can I determine the growth of summation in the recurrence?
The Cuckoo filters paper (https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf) claims a 95% load factor, however it seems to make an implicit assumption that the table size is a power of 2, and their implementation also enforces that (https://github.com/efficient/cuckoofilter/blob/master/src/cuckoofilter.h#L90). T...
How can I describe a Turing Machine recognizing the language $P=\{a^{2^n} | n \geq 0 \}$? This Turing Machine is deterministic and uses two tapes, both bidirectional and R / W (read & write) The computation should be done in linear time. I've read Counters in Turing machines but it doesn't address my question. It can ...
I encountered a question from a test that I cant understand the answer given a range of numbers $[0...(logn)^{logn}-1]$ we need to find the quickest sort available and give his running time now it seems like something to do with radix sort but if I try to switch bases to $logn$ I get $n$ numbers that each contain $...
In order to generate scale-free networks, we can use this algorithm, derived from Barabási–Albert model: 1) we assign every node a "weight" $\theta_i$ (or two in the direct case). 2) we place $m$ edges between nodes by choosing the ends of the edges with probabilities proportional to the weights. With the right choice ...
I recently got into a discussion about Priority Queues when the requirements allow for "best effort" removal (i.e. the removed key may not always be THE very highest priority, but it is relatively close). After thinking about it a bit I stated "I could probably make it $O(1)$ by using buckets" and approximating the mi...
I am new to programming and want to learn how to compare algorithms having the same complexity and pick the best one. Certain problems can be sloved using several algorithms which have the same complexity. How do i compare such algorithms
How should I create the truth table to solve each of these questions? Maybe can give me an example? $Smoke \implies Smoke$ $Smoke \implies Fire$ $(Smoke \implies Fire) \implies (\neg Smoke \implies \neg Fire)$ $Smoke \lor Fire \lor \neg Fire$ $((Smoke \land Heat) \implies ((Smoke \implies Fire) \lor (Heat \implies Fir...
How do I access the bit at a particular index in a number using shift operator. Say the number is $n$. Let the index be $i (i: 0 \le i < n).$ Rightmost bit is $0$. The only thing I can think of is: $def \, bitAt(n, i)$ $\,\,\,\,\,\,\,\,m = n >> i+1$ $\,\,\,\,\,\,\,\,v = n >> i$ $\,\,\,\,\,\,\,\,m = m << 1$ $\,...
$u^*v(w \cup xu^*w)^*$ and $u^*v(w \cup x(u)^*w)^*$ Is that extra set of parentheses around the second $u$ needed?
I'm using Haskell notation for illustration, hopefully it is known widely enough for this to make sense. In the following fold function the second argument is what I'm calling the identity: foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b It is trivial to fold/reduce over a list of values with certain operations ...
Regarding the problem: What is the largest bet that cannot be made with chips worth $\$7.00 $ and $\$9.00$? Verify that your answer is correct with both forms of induction. I need to find an algorithmic approach, but till now my approach is to try all possible combinations with 0,1,2,3,4,5,6,7,8 (9) as the column head...
In the regular version of the game Nim, you have $n$ piles of stones, and you may remove one or more stones from a single pile in your turn. A modification I thought of involves the concept of piles that may contain not just stones, but also other piles. Let's call these "super-piles". Similarly, we may have "super-sup...
I am attempting to output the largest stack of boxes given an input of a set of boxes. Currently I have an array called maxWeight that has the values of the boxes sorted from largest to smallest, this is the array being operated and changed, I then have another array that also has the values of the boxes going from lar...
How can I describe a Push Down Automaton that recognize the language $P=\{a^{2^n} | n \geq 0 \}$? My approach I know that the language can be described by a Turing Machine, but how i can the stack recognize that language?
I am going through the book , introduction to compiler design , by Torben Ægidius Mogensen. It provides the following definition of an epsilon closure : Given a set M of NFA states, we define $\ \epsilon $-closure($\ M $) to be the least (in terms of the subset relation) solution to the set equation $\ \epsilon $-closu...
I have an undirected Graph $G$, which is stored in the form of an adjacency list in external memory. I'm looking for an I/O efficient algorithm which computes a valid coloring for $G$ with at most $k+1$ colors where I provide the $k$. I tried searching for I/O efficient graph coloring algorithms but couldn't find any...
The problem states the following: Draw a deterministic finite automaton (DFA) accepting strings containing at least three occurrences of three consecutive 1's on alphabet $\Sigma=\{0,1\}$ with overlapping permitted. I was able to come up "without overlapping" version as follows: Regex of this DFA is (1+0)*111(1+0)*1...
Good Afternoon, I am comparing A* search to Simulated Annealing for an assignment, mainly the algorithms, memory complexity, choice of next actions, and optimality. Now, I am not 100% sure about my answer, and was wondering if someone could give me some input. A*: Optimal, finds path of shortest distance to goal state ...
I have been reading this book for my class, Randomized Algorithms. In this particular book, there is a whole section dedicated to finding the median of an array using random selection, that leads to a more efficient algorithm. Now, I wanted to know if there are any practical applications of this algorithm, in the domai...
I've just started learning about the concept of undecidability and turing machines, and while I am finally beginning to grasp it, I'm still curious about one thing. Is it possible for a problem to exist for which it is impossible to prove whether it is undecidable or not? In other words, can the problem of "is it decid...
I'm currently taking a class on algorithms, and we are studying algorithmic efficiency. I understand classifying algorithms based on their time complexity, but I am confused about the following category of questions: Suppose algorithm A has time complexity C (C being along the lines of n^2, n + 1, 3 * 2^n, etc.), and i...
I've got two questions about bitonic sorting: Does a bitonic sorter compare a pair of elements more than once? How many comparisons does a bitonic sorter perform in the case where the size of the array not a power of two.
Given string w such that every odd position in w is a 1 My solution is The book's solution is from my understanding $\epsilon$ should not be an accepted state, however in the book's solution it is. How is it handling this case?
I encountered a question to give an example of a set $A$ that is not decidable as $A$, but which becomes decidable if it is concatenated with itself, i.e. $AA$. In case a set $A$ is decidable, then it is easy to see that $AA$ is also decidable, since a $TM$ that decides $A$ can be modified to also recognize $AA$... But...
I have a typical subset sum problem and I'm looking to choose the proper algorithm to solve it, the set contains (around) 1000 elements, and elements are constrained to max 22 bits for now. I have been looking around and looks like the well known O(2^(n/2)) is not an option, and looking into the Dynamic Programming ver...
Backgroud. I'm reading papers about cutting stock problem (CSP). Said Ben Messaoud, Chengbin Chu, Marie-Laure Espinouse (2008) Characterization and modelling of guillotine constraints. European Journal of Operational Research 191 (2008) 112–126. D.A. Wuttke, H.S. Heese (2017) Two-dimensional cutting stock problem ...
I read in Sipser's book that a machine can make copies of itself using a special function $q(w)$ which takes a string $w$ as input and prints out the string $w$. A $TM$ $SELF$ can print out its own description $AB$ using two parts. For the first part $A$ prints out $<B>$ since it has the description for $B$ inside its ...
Here are the details: (1) We are given a number $f$ of units of flow that we wish to transmit from the source node to the sink node. For example, $f=5$ units of flow (data or goods) should be transmitted from the source node to the sink node. (2) We are not given any plan or policy to transmit the flow. However, we kn...
As I am going through learning about compilation , what I see is the approach to the subject through machines , known as automata , which change from one state to another depending on the input provided to them . And there is an accepting state in the automata , which when reached indicates a valid language input . I w...
My understanding is that in Hoare Type Theory every imperative statement has a type of the form {Pre}res:T{Post} where T is the type of the result of the computation and Pre and Post are propositions representing respectively the pre and postconditions of the statement and res is the result of type T which can appear i...
Since the same contradiction from the Turing machine is still there, we allow the oracle not always return an exact value, and say it solves the halting problem if the probability of returning "HALT" equals to the one that the program halt. If not possible, can it solve a weaker halting problem?
Let $W$ be a subset of $\mathbb{N} \times \mathbb{N}$. Suppose $W$ is the Godel universal enumerable set (for the class of all enumerable subsets of $\mathbb{N}$, i.e. for any enumerable set $V$ subset of $\mathbb{N} \times \mathbb{N}$ there exists a total computable function $s:\mathbb{N} \rightarrow \mathbb{N}$ s.t. ...
I am having trouble understanding the affine gap penalty in the following example - Waterman-Smith-Beyer Algorithm: \begin{align*} D_{0,0} &= 0\\ D_{0,j} &= g(j)\\ D_{i,0} &= g(i)\\ \forall i,j > 0,~ S_{i,j} &= \min \begin{Bmatrix} \min_{1 \leq k \leq j}{(D_{i,j-k} + g(k))}\\ D_{i-1,j-1} + w(a_i,b_j)\\ \min_{1 \leq k \...
I've written a subset-sum solver. It outputs all subsets that sum to a given value, iteratively. I'm measuring its performance by the average amount of time taken per subset found. However, I suspect it may be faster than existing solvers in "near-worst" cases, but I don't know how to check this. What are some concrete...
I have a number of players, ranging from [0..N]. Each round every player is assigned a specific role, either 1, 2 or 3. floor(N / 8) role 3's are assigned, floor(N / 4) role 2's are assigned and the rest are assigned role 1's. At the moment, I pick people completely at random for roles 3 and 2, however, this has the ...
This question is closely related to Does an abstract syntax tree have to be a tree? and is partially answered there, but I would like to be more precise and to have more concise answers. What is the origin of the term? Are there any formal definitions of AST? If I understand correctly the spirit of the use of "AST" te...
Definition: $\text{P}$ is the set of languages that can be decided by a deterministic Turing Machine in polynomial time. I wonder if $\text{P}$ equals to the set of languages that can be decided by a non-deterministic Turing Machine in polynomial time? I think this has to be true because a non-deterministic Turing Mach...
We have a set of elements, say a vector of $n$ elements (actually, the data structure really doesn't matter in this case). It is NOT sorted. We want to check whether at least $n/2 + 1$ elements are equal. I have been thinking about an efficient algorithm to do so but I don't know, the fact that it is not sorted makes ...
I need to test whether an integer $b$ divides another integer $a$. Both integers are “bignums”, in the cryptography range ($10^2$ to $10^4$ bits). The integers are represented in binary. Assume that the integers are positive. Obviously, the faster the better. I'm primarily interested in fast performance when $a$ turns ...
Let $\Sigma = \{ (, ), ? \}$ be an alphabet. For a given string $s \in \Sigma^*$, we denote by $f(s)$ the number of ways to replace each symbol $?$ either with $($ or with $)$ such that $s$ is correctly parenthesized. For example, for $s = ((????)))?$ the strings $((()(())))$ and $(()((())))$ are possible, so $f(s) \ge...
Given $K$...# key values, $n$...# pointers in a node. I read somewhere, that the maximum depth is defined as $\lceil\log_{\lceil\frac{n}{2}\rceil}(K)\rceil$. However, it is not correct, as I can come up with a counterexample. When the tree is minimum filled, it won't work. E.g.: This is a valid $B^+$-tree, the root h...
Given a sorted list of booleans with consecutive 0s followed by consecutive 1s such as [0,0,0,0,1,1,1], binary search is able to find the first 1 after all the 0s in log(n) time. Is this technique generalizable to find the index to the maximum of a unimodal boolean list with a single 1 sandwiched between 0s such as [0,...
I am looking for a good heuristic function for solving a 2D $n\times n$ Rubik's cube using A* search. There is a game already in the play store. The rules of the game: Swiping LEFT means the leftmost cube of that row will come to the rightmost position in that row. All other cubes will be moved one position to the le...
I've calculated the running time of an algorithm I'm interested in to be $$O(0.24\cdot K\cdot 2^{w})\,,$$ where $K$ and $w$ are both variables. ($K$ is the number of elements in some set, and $w$ is the log of the largest element, so both are variables.) What kind of growth does this function have? I'll say it is expo...
I have a numpy array of shape N_Samples x 360, as an example, consider the following: [ 89 94 56 - - - 55] <-360 length vector [ 56 98 55 - - - 98] | | | | [ 67 55 99 - - - 77] Total N such vectors There is one label 0 or 1 corresponding to each of the 360- length vector I am ask...
I am looking for error detection codes, which support addition in the encoded domain and are separate (a tuple of ($N$, $R(N)$), where $N$ denotes the functional value and $R(N)$ its redundancy). So far I know residue codes where $R(N)$ equals $N \text{ mod } p$ and $p$ is a chosen constant. This scheme is closed unde...
I found a pseudo algorithm which describes bit blasting: click (page 156,157). I am trying to implement it in C, but I don't understand it yet completely. Let's make an example: Assume our bit-vectors have only a length of 2 bits (for simplicity) and they are unsigned and out bit-vector formula looks as follows: $\phi ...
The usual regular expressions I have seen are those with non-null inputs (e.g. $a$, $b$). A few days ago, I saw, for the first time, a regular expression that has a null ($∅$) in it. $$ r_{1}= (cε + d∅)^{*}, Σ = \{c,d\} $$ This confused me since I do not know how a language would be created from $r_{1}$. What would a l...
Is there a general name for a tree in which the leaves have some arbitrary values and the value of every other node is some "aggregate" function of its children? An example where the aggregate function is the sum: 14 / \ 4 10 / | \ 7 1 2 The function could also be the min, max, or any other function of th...
I am reading a paper called Back to Thin-Core Massively Parallel Processors by Ami Marowka (Computer, 44(12):49–54, 2011; IEEE Xplore). However I have a question about the title of the article: what does "thin core" (and for that matter, "fat core") mean? Thank you!
The Haskell List: Type -> Type constructor implements the Functor typeclass with function fmap f = map f. This functor that applies the morphism f to each element of a list works, but there are other equally valid functors, for example fmap f = map f . rev which first reverses the list before mapping over it. Is there ...
I've being trying to understand this statement for quite a long time especially the "number of positions" part, but i can't seem to interpret it correctly.What i understand is that the statement means that there should be two 0's seperated by a number of symbols that are multiples of 4 i-e (0 , 4 , 8 , 16...), accordin...
For instance, Subset Sum is classified : W[1]-hard, in W[P] (parameter:k, subset cardinality) by the Compendium of Parameterized Problems, how the parameter could impact the membership of the problem on a specific class? Looks like Parametrized Complexity is trying to provide a better problem classification for NP...
show that $(\sqrt n)^\sqrt n=o(2^{n^{0.6}})$ i just know that small o-complexity of $\sqrt n=o(n)$ but how to prove this
I recently had to do the assignment to determine the space complexity of methods similar to the following. I need to state the recurrence equation (line by line), derive the closed form and use that to determine the Big Oh of the space complexity. I have already handed it in, but I still have trouble understanding how ...
I have a set of strings, lets call them RULES. I have a function F which given 2 strings deterministically returns boolean value. Given one string, lets call it QUERY, what is the fastest way to find longest prefix (lets call it P) of QUERY which is a member of RULES for which F(P,QUERY) returns true? That was very gen...
I'm trying to solve the following problem in the most efficient way I can find. I want to trade my items for someone elses items, every item have a price and a value. I want to maximize the value of the items I trade, so for example: My items: Banana, P: 10, V: 5 Pen, P: 3, V: 1 Paper, P: 1, V: 1 Their Items: ...
I am trying to solve the shortest path problem between n cities. Any single pair shortest path algorithm such as Dijkstra's and Bellman-Ford would work here, but if we add a simple additional constraint "the total time should not exceed T time units", then the problem becomes much harder. More formally: The input consi...
Given a finite alphabet $\Sigma$. We define the set of all words of finite length to be $\Sigma^{*}$. A partial function can become a total function with trivial modifications, thus we just consider about the total function. Is the following definition correct? We say a function $f \colon \Sigma^{*} \rightarrow \Sigma...
My question is pretty basic, I'm looking for a named method if you know one, but also proper terminology, further reading, and anything this reminds you of if you don't. (I'm new to this, don't have the right terminology and just need a starting point so I can help myself.) I'm trying to interpret the vector inputs to ...
I am trying to understand how to write the language given the predicates of the context free grammar. As an example, I have the following grammar: $S \to 0B \mid 1A$ $A \to 0 \mid 0S \mid 1AA$ $B \to 1 \mid 1S \mid 0BB$ What this says to me is that the first symbol can be either a 0 or 1, and the next could be 0 or 1 ...
I'm reading the appendix A of Williamson's "the design of approximation algorithms" about linear programming. In the definition of a linear programming it restricted the coefficients of cost function and conditions to be rational numbers. I guess that this restriction is because of time analysis consideration in terms ...
This is a problem I encountered in a recent interview test. I achieved a slow-ish solution to it, and I'm keen to figure out the most efficient. Problem Given a starting string $x$, a target string $y$, and a set of valid strings $V$, find the minimum edit distance between $x$ and $z$ where edits can only be character...
Question Is $L=\left \{ wxw \,\,|\,\,w,x \,\in \left ( a+b \right )^{+}\right \}$ regular? My Understanding/Doubt We can say that Language $L_{2}=\left \{ wxw \,\,|\,\,w,x \,\in \left ( a+b \right )^{*}\right \}$ is regular By making $x=(a+b)^{*}$ and $w=\epsilon$ Based on above Understanding , i can say that $L$...
How does a assembler (at very basic level) work in translation of Assembly language to machine code ? Just want to know that what is happening in RAM ? [What my understanding is that when when I type MOV A, B : in RAM :'M' >> some bytes (ASCII CODE) in memory (RAM)in form of 0v and 5v (voltage may be different but y...
I have to draw a DFA or NFA for a language that has two symbols lets say {0,1}. The condition is "such that exactly one of the two symbols 0 or 1 appears at least three times." I understood this as if 0 appears three times or more than 1 can be there for 0,1 or 2 times and if 1 appears for 3 times or more DFA fails and...
For many planar graphs of bounded degree (binary tree, lattice, cycle) the (1/4)-mixing time and the cover time are equal, up to log-factors. Is this always the case?
How might indexes be represented in the context of relational algebra? How would an optimizer transform a query to use indexes?
I tried some examples and found that LL(1) grammar always exist. I tried searching for formal proof but didn't find any. Can someone give a formal proof for the above statement?