instruction
stringlengths
35
29.1k
I wanted to give the following as a homework question, but my first few attempts to solve it failed, so now I'm just curios for a solution: For two words $x,y\in \Sigma^*$ and for a letter $\sigma\in \Sigma$ we define the glue-concatenation of $x\sigma$ and $\sigma y$ to be $g(x\sigma,\sigma y)=x\sigma y$, and for word...
In case of binary classification problem, what are the $y_i$ 's in the training data set $\{(x_1, y_1), (x_2, y_2), \dots (x_n, y_n)\}$? I guess they are from $\{1,-1\}$. Now I see a method for finding a scoring function $f(x) = w^Tx + b$ by minimizing the squared error between the $f(x_i)$'s and $y_i$'s over $w$ and $...
Given an undirected graph $G(V,E)$ and two nodes $s$ and $t$, $s,t\in V$, find a path whose length $L$ is bounded by a lower bound $N$ and an upper bound $M$, $N\leq L\leq M$. So, for example, $N=4, M=7$, I want to confirm that there is at least one simple path of 4,5,6 and 7 between two nodes in a graph? Nodes of the ...
I want to know if longest remaining time first (LRTF) CPU scheduling has starvation or not. Also give reason how it starve/does not starve a process. I know longest job first (LJF) may starve a process if all other incoming processes have longer CPU burst.
As a matter of curiosity I've been trying to determine at what point a 64-bit float no longer reflects the addition of 1 as expected; that is, at what point the digits as printed do not correspond to the digits of a 64-bit integer that is incremented in sync. Around 1e15 I can continually add 1 or subtract 1 and the re...
I know that (1 + 0)* is the set of all bit strings; but isn't 1* + 0* the same thing?
I'm having trouble finding the language represented by the following: (AA|BB)* Should the expression be read as... ( A (A|B) B ) * or... ( (AA) | (BB) )* If that isn't clear, should this produce something like... ABABAB or should it produce AABBAABBBBAA My guess is that AABBAA is part of the represented language, while...
Although I have already learned something about the asymptotic runtimes of matrix multiplication algorithms (Strassen's algorithm and similar things), I have never found any explicit and satisfactory reference to a model of computation, which is used to measure this complexity. In fact, I have found three possible answ...
Language: $ L = a^{n+m}b^{n}c^{m} $ As per a recent test I gave, this language is not context free. However, I think it is. Corresponding Grammar: $ X \rightarrow aXY \space |\space \epsilon $ $ Y \rightarrow b \space | \space c $ Pushdown Automata: Keeping pushing all $a$ to the stack, until a $b$ is scanned. Keeping ...
I wonder if high-performance computing and parallel computing always mean the same? If not, what are the differences and relations between them? what are some examples of high-performance computing that are not parallel computing? what are some examples of parallel computing that are not high-performance computing?...
Given that A is a context free language and B is a regular language, B-A can be not context free as it is equal to B ∩ A', and context free languages are not closed under complement. Could you give me a counterexample?
Given a set of line segments, how do we identify a subset of maximal cardinality where all line segments are pairwise non-intersecting? Brute force we would get $2^n$ sets to check where $n$ is the number of line segments, so that isn't viable. Anyone got a bright idea how the do this efficiently? I tried doing it this...
I am a little confused on how to prove/disprove Big O. For the problem, $2^{n+3}= O(2^n)$, I did the following: $$2^{n+3} \leq K \times 2^n$$ Set $K = 1$ $$2^{n+3} \leq 2^n$$ Test for large values of n (so I plugged in n = 100) $2^{103} \leq 2^{100}$ --- which is false therefore Big O is disproven Is this process corr...
How would you prove/disprove that $e^n = O(2n^2)$? It's unclear to me which function grows faster.
We have 2 stations that communicate with each other, but we need to detect (or even correct) when something is wrong. We use 8 binary words: each consisting of 3 bits and to send it we code it as where is the complement of and is the even parity check bit of . We need to find the capabilities of this code (up t...
There is something in the pumping lemma that I do not quite understand, namely if $s$ is at least of length $p$, then we could split it to $xyz$ such that the following conditions are met: For each $i \geq 0$, $x(y^i)z \in A$ $|y| > 0$ $|xy| \leq p$ But if $i = 0$ then $|y|$ cannot be strictly greater than $0$. Isn't...
I have been reading about Dijkstra's algorithm and I think I understand it. I followed the algorithm in pseudo-code from Wikipedia, and now I wonder: If my graph is bi-directional and I add each edge to my graph twice (once "forwards", once "backwards"), will the "standard" Dijkstra's algorithm work? Is it ok that som...
From wikipedia: The PageRank values are the entries of the dominant eigenvector of the modified adjacency matrix. This makes PageRank a particularly elegant metric Can anyone please elaborate on the connection between the eigenvector and the PR vector? Why are they related?
I am having a hard time understanding closure properties of recrusively enumerable languages. I have read the explanation on this site but still unable to fully understand why they are not closed under complementation? Explanation also says, This fails because $M$ only needs to halt if $w \in L(M)$ - doesn't have to s...
I'm not sure how to word this because I'm not familiar with this, but I'm sure a process like this is rather common. Basically, I've got members signing up for our website, and each one is assigned a normal sequential ID (a MySQL auto_increment ID), i.e. 1, 2, 3, .... The client wants these users to have a "member numb...
I want to prove that any polynomial of degree $k$ is in $\Theta(n^k)$. The coefficient of $n^k$, $a_{k}$, is positive. I know I need $0 \leq c_{1}n^k \leq a_{k}n^k + ... + a_{0} \leq c_{2}n^k$ for all $n \geq n_0$. The upper limit is easy to prove by taking $c_{2} = \sum\limits_{i=0}^k |a_i|$ I don't know how to prove ...
My language is the repetition of 0 to a length that's a power of 2: $L = \{ 0^k \ni k=2^n, n \geq 1 \}$ I want to know how to prove that this language is not regular. I have attempted the proof below, but think it may be incorrect due to my potentially wrong assumption that the Myhill-Nerode theorem allows me to break ...
I have been trying to solve this question and am kinda stuck. Wondering on how to proceed and finish this proof. Prove that the language $ L = \{a^{2^n} | n >= 0\} $ is not regular. I have been trying to use the pumping lemma but am stuck at: Suppose L were regular, let p be the pumping length given by the pumping lemm...
CFG can specify structure of sentences but Regular grammar can only specify strings sequentially. Is it because DFA has only one bit memory?
So the dual problem of max-flow is min-cut. What's the dual problem of stable matching?
There are two languages, $\qquad L_1 = \{w\in\{a,b\}^*: N_a\leq N_b\}$ and $\qquad L_2=\{w\in\{a,b\}^*: N_b\leq 2N_a\}$ where $N_a$ means the number of occurrences of $a$ in the string $w$. Same for $N_b$. I've proved that $L_1$ has a DPDA (hope this is right). Now I want to know whether $L=L_1\cap L_2$ has a DPDA or...
I want to analyze the runtime of this algorithm: int fun (int arr[], int n) { int result = 1; int i, j; if (n == 1) return 1; else { result = fun(arr, 2n/3); for (i = 1; i <= sqrt(n); i=i*2); for (j=0; j<sqrt(n)/i; j++) result += arr[...
So, i was trying: $(-10.75)_{10}$ and to convert it into 32 bit binary floating point representation. i did this: According to IEEE standard: $(-1)^{-s} * 1.M * 2^{E-bias} $ sign bit= 1 bit exponent= 8 bits mantissa= 23 bits bias= $2^{n-1}-1 = 127$ - 10 . 75 ⇓ ⇓ ⇓ = 1 1010 . 11 = 1 1.01011 x 2^-3 = 1 1...
Consider following grammar: $$X\to Yc|ZY$$ $$Y\to ab|cX$$ $$Z\to d|\epsilon$$ Can this be converted to LL(1)? Cleary, its not LL(1) because of First/First conflict at first production. Can anyone suggest something to make it LL1?
I noticed that in write-back caches, when the cpu wants to write to a block, it fetches the block from memory and then updates it. If the block is going to be overwritten and changed by processor, why does the cpu need to read that block from memory?
I am preparing for my exams and was solving problems regarding Sliding Window Protocol and I came across these questions.. A 1000km long cable operates a 1MBPS. Propagation delay is 10 microsec/km. If frame size is 1kB, then how many bits are required for sequence number? A) 3 B) 4 C) 5 D) 6 I got the ans as C opti...
Should the size of its cache line, the width of bus between memory and CPU, and the size of its registers be all equal to the CPU bit? Is CPU bit determined by the size of its cache line, the width of bus between memory and CPU, or the size of its registers, something else? Thanks!
What aspects of linguistics are necessary or good to know for natural language processing? What references do you recommend for studying those aspects? Thanks!
I have dug in simple binaries, such as though like x86 bootloaders, sega video game binaries, etc. I know that these files tend to use assembler macros to define data, etc. What I am having trouble figuring out is what assemblers tend to translate macros into exactly (are they instructions, custom formatted data entrie...
Is there a way to state Blum's speedup theorem in terms of Big-O (Landau) notation?
Do any of Blum's theorems prove that there exist decidable languages that are unclassifiable anywhere in the time hierarchy? In other words, asserting they (mentioned in the proofs) are computable within any time $O(f(n))$ for some time-constructable function $f(n)$ leads to a contradiction?
In general, how can we go about proving that union of two languages as non regular. In this case, the individual languages can be proved as non regular using pumping lemma. How can we apply pumping lemma to union of two languages ?
Difference between “average length” and “entropy” gives the percent of optimal. The optimal case is when the average length of a code is equal to the entropy. For example if average length is 1 and entropy is 0.72: (1- 0.72) = 0.28 -> 28% worse than optimal. If both “average length” and “entropy” are 1, the compression...
I have a genetic algorithm for an optimization problem. I plotted the running time of the algorithm on several runs on the same input and the same parameters (population size, generation size, crossover, mutation). The execution time changes between executions. Is this normal? I also noticed that against my expectatio...
everyone! I don't know a whole lot about the fields of encryption or quantum computing, but I've read a lot of articles on the subjects and that is prescisley what caused this question. I've been a little scared about the whole NSA quantum computer that is build for the sole purpose of cracking encryption codes. I am f...
Is this true? If I change all final states of a given Deterministic Finite Automata to non final states and all non final states to final states then does this new automata represent the complement of the language that was accepted by the original automata? What if we talk about a Non deterministic finite automata inst...
OS Book written by Galvin et all states that if page size is 4KB and size of virtual space is 32 bits then 2^(32-12) page entries would be required which is too huge to store in memory!! Therefore it recommends to break it down by paging the inner page table as well. Now my question is how does that reduce memory requ...
I am confused about clustered index is dense or sparse. I searched for that, sources saying it is sparse, but can be dense also. What is it exactly?
I would like an example of a quine in pure lambda calculus. I was quite surprised that I couldn't find one by googling. The quine page lists quines for many "real" languages, but not for lambda calculus. Of course, this means defining what I mean by a quine in the lambda calculus, which I do below. (I'm asking for som...
What is the best way to name documents and folders in windows? Im thinging about maybe there will be some conflict in some programs? Or when searching in terminal This_Is_Best.doc ThisIsBest.doc This Is Best.doc
(This question is related to homework) I am doing a cryptography course via long distance and we have been given an assignment which is based on lattice-based cryptography. I have spent the majority of the past week sifting through papers and videos in an attempt to build my understanding of the subject, but due to the...
I know that a DFA has to have exactly one transition for each symbol in the alphabet, but is it allowed to have two symbols on the same arrow? If, for example, I have a DFA with states $q_0$ and $q_1$, can I have one arrow from $q_0$ to $q_1$ with both $a$ and $b$? This may be a stupid question, but I need to be compl...
In order to plot a curve a set of points is usually calculated based on some formula. The function FPLOT in MATLAB also supports plotting with some error tolerance. Its help says the following about this functionality: The FPLOT function begins with a minimum step of size (XMAX-XMIN)*TOL. The step size is subsequently ...
When we declare a variable there will be a random part of memory will be allocated in RAM. Which component will allocate the memory? Is the processor or any other specific hardware doing the allocation?
What is the most efficient way to find all paths of length M to N in a large sparse graph? Some general information: Graph has 30,000 to 50,000 nodes Average number of edges per node ~ 10 M=4, N=7 Graph has cycles
Let $L_r$ be a regular language with alphabet $\Sigma$ and $L_{\text{csl}}$ be a context sensitive language. Are any of the following questions decidable? $L_r \cap L_\text{csl} \stackrel{?}{=} L_r$ $\Sigma^* \cap L_\text{csl} \stackrel{?}{=} L_r$ $L_r \cap L_\text{csl} \stackrel{?}{=} \Sigma^*$ $\Sigma^* \cap L_\text...
This is a popular question: What is the most efficient (in time complexity) way to sort 1 million 32-bit integers? Most answers seem to agree that one of the best ways would be to use radix sort since the number of bits in those numbers is assumed to be constant. This is also a very common thought exercise when CS ...
As per Tries slides (page 17) from Algorithm 4th edition book by Robert Sedgewick, the asymptotic expected runtime for an unsuccessful search in $R$-way tries miss is $O(\log_R N)$. Can someone please explain how this number can be derived?
Given a context-free grammar, is there an algorithm to determine if the CFG will ever produce an even length string? Or is this undecidable?
Knowing the frequencies of each symbol, is it possible to determine the maximum height of the tree without applying the Huffman algorithm? Is there a formula that gives this tree height?
I've been working and experimenting with an algorithm that may take time $O^*(2^\sqrt{n})$. Here $O^*(f(n))$ simply neglects all polynomial terms. I've seen a comment on Scott Aaronson's blog that mentions graph isomorphism algorithms run in this time, too. Actually, $O(2^\sqrt{n})$. Is there a designation for this...
I have to show a property P is trivial. This problem has to do with Rice's Theorem, which I do not completely understand. Can someone explain the difference between trivial and non-trivial properties?
I am reducing a given Turing Machine to the complement of the known undecidable problem, $$ Complement(A_{TM}) = \{ \langle M,w \rangle \mid M \text{ is TM}, w \not\in L(M) \}$$ To this Turing Machine, known as SPARSE TM: $$ SPARSE_{TM} = \{ \langle M \rangle \mid M \text{ is 1-tape TM}, |L(M)| \leq 1000\} $$ Here i...
I need to link facts to actions through rules. If a person bought soup 10 times and he is coming at midday every day, then the system should link the fact that the person bought soup so many times, using the rule "person, consecutively buying soup 5 or more times within a month is going to buy soup with 90% confidence"...
I have a statement I am trying to prove, and I'm very close, but I think I'm missing a couple of key concepts about regular and context-free languages. Question: Let $ A = \{ ww \ | \ w \ \epsilon \ \Sigma^{*} \} $. Show that any language $L$ is Turing-decidable if and only if $L$ is many-one reducible to $A$. Where I ...
I am learning Probabilistic Graphical Models with the help of the videos on Coursera. I am in week 4 and I see cliques being mentioned often. But the graphs being discussed are cluster graphs. So are the cliques and clusters the same?
I'll preface this by saying that this IS a homework question. However, when asked about how to solve it in class, (I believe) my professor was unable to complete it. The question is: Compute the weakest precondition for each of the following assignment statements and postconditions: $$a = a + 2b - 1\ \{a > 1\}$$...
My knowledge is very vague as all we have are visual diagrams etc, but we have memory address and registers, the ALU being the heart(apparently). Single core CPUs process one instruction at a time AFAIK and multi-core have parallelism to some degree. So where do the millions of transistors come in and how do 32 registe...
My method of conversion is by creating a reachable set tree and each set within the tree would represent the new states. I have never dealt with FSAs that has 2 or more initial states. How do i create my reachable set tree with two or more states?
I have a set of piecewise-linear curves (i.e. "points connected by line segments") as shown in the figure below: additional points are added on the borders (drawn in red) "closing" the open regions of the figure. In fact, the figure can be any plot with some closed piecewise-linear shapes on it (i.e. there are no line...
Given a set of colors $M$ and a graph $G=(V,E)$. Allocate the colors to minimize the number edges with same color on the two vertices of the edge (i.e. minimize pairs of adjoining vertices with same color.). This problem is different from standard coloring problem. Could someone please provide some literature where thi...
The following is Figure 1 in Gene M. Amdahl's "Validity of the single processor approach to achieving large scale computing capabilities" (1967) (PDF): The text describes this as representing the performance (presumably vertical) as a function of the fraction of instructions that can be executed in parallel for three ...
Consider this example: a problem of dimension $n$ and $m$ ($m,n$: any given integers). has a search space of size $O(n^n * m^n)$. It is clear that this problem is exponential in $n$, whatsoever $m$ may be. My question: is this same problem polynomial in $m$? what are the assumptions if we can say that? is this way of...
Consider this nested loop: for (i=0 to n) for(j=0 to n) for (k=0 to n) sum := sum +k end for end for end for Do i,j and k have temporal or spatial locality? I've considered j and k as temporal since they are revisited again in the loop. But I'm confused about i as it does not match the defin...
We have $M$ bits. $M\le10^5$ Also we have N ranges in the form $[L,R]$. $N\le10^5$ We can choose any range from the given ranges and flip all bits in our number from $L$ to $R$, both inclusive. We can apply each operation any number of times and in any order. We have to calculate the number of $M$ bit numbers that can ...
The problem statement is as follows:- In a court case, a judge cited a court of contempt and ordered a fine of $2 for first day. On subsequent days, the fine would be equal to the square of the previous day's fine. e.g. 2, 4, 16, 256 and so on. Find out:- a) What would be the fine on day $n$? b) How many days wo...
Based on the Wikipedia implementation of insertion sort: Given an input array $A$: for i ← 1 to length(A) j ← i while j > 0 and A[j-1] > A[j] swap A[j] and A[j-1] j ← j - 1 is there a way to quantify how many swaps are needed to sort the input list? It's $O(n^2)$, but I want a more precise boun...
I'm working on homework for my formal languages and automata course. The text we are using is the first edition of Hopcroft and Ullman (1979). Specifically, I'm unsure how to justify that my regular expression for exercise 2.10 (c) is correct. The question asks for a regular expression for the set of all strings not c...
A deterministic queue automaton (DQA) is like a PDA except the stack is replaced by a queue. A queue is a tape allowing symbols to be written (push) on the left-end and read (pull) on the right-end. Actually I've proved that a 2-tape Turing Machine can simulate the DQA. Now I'm proving the DQA can simulate Turing Mach...
From the proof of Miller-Rabin, if a number passes the Fermat primality test, it must also pass the Miller-Rabin test with the same base $a$ (a variable in the proof). And the computation complexity is the same. The following is from the Fermat primality test: While Carmichael numbers are substantially rarer than prim...
I am reading Decompositions of Triangle-Dense Graphs by Gupta et al. On page 2, in Definition 1 what is a wedge in a graph? I know what triangle is but I don't know what wedge is and google isn't helping!
It is nice to know that every boolean formula can be expressed by zero-one integer programming by this answered question. But are there any applications? To be more precise: Are there papers which use the existense of zero-one integer programming for boolean operations?
It says to solve the recurrence exactly for n a power of 2. T(n) = {1}, if n = 1 T(n) = {5T(n/2) + (n lg n)^2, otherwise I'm supposed to use Θ notation to express my answer. Normally I would try to look for the characteristic equation but for this one I'm lost. Is this the first step? T(n) - 5T(n/2) = (n lg n )^2 ...
$$t(n)=\begin{cases}n&\text{if }n=0,1,2,\text{ or }3\\t(n-1)+t(n-3)-t(n-4)&\text{otherwise.}\end{cases} $$ Express your answer as simply using the theta notation. I don't know where to go with this. $$t(n) - t(n-1) - t(n-3) + t(n-4) = 0$$ Is the characteristic polynomial $x^3 - x^2 - x +1 = 0$?
I can't understand or imagine some fact about NP-hard problems. If I understand it correctly there is only one polynomial-time algorithm needed – for whichever NP-complete problem – to prove that P = NP. Let's take the subset sum problem, which is NP-complete. It says that given a set such as $\{-7, -3, -2, 5, 8\}$, we...
While reading some papers in AI (for a project I have to do), I see expressions "blocks world domain" and "logistics domain". I know what blocks world domain is, but I don't know the definition of logistics domain. Any help would be appreciated.
Deep Learning, now one of the most popular fields in Artificial Neural Network, has shown great promise in terms of its accuracies on data sets. How does it compare to Spiking Neural Network. Recently Qualcomm unveils its zeroth processor on SNN, so I was thinking if there are any difference if deep learning is used in...
We are given an array and numerous subarrays. What we can do is add or multiply some element to all elements of a subarray. The subarrays are given as start index and the end index. We have to find the largest number of independent subarrays from the subarrays given to us. For example: If we have the array as given bel...
Qualcomm is creating a Neuromorphic Processing Unit or an NPU called zeroth. IBM is also working on a brain inspired chip under Synapse program. Standford's Neurogrid might be a similar example. Neuromorphic systems are inherently based on mixed signal and analog chips. Considering a wide application of neuromorphic co...
We know algorithm to convert each PDA in the underlying grammar that generates the language the PDA recognize. But we have also the algorithm for creating a two state pda from a grammar. This algorithm use the first state for all the computation, with rules based on the stack and the input symbol, and when the stack i...
More specifically, how can project administrators be sure that the answers they receive from nodes are correct and not just simple calculations performed quickly and submitted as complete work units? As various cheating scandals have shown, people are not above stooping to low levels to get to the top of project points...
What is an upper bound on formula size when converting 3-SAT to UNIQUE 3-SAT? We can use the Valiant Vazirani Therom, also found here (in more detail). Essentially, it is a randomized algorithm that converts a SAT formula into another SAT formula that has only 1 satisfying variable assignment (called UNIQUE-SAT) with h...
My language is the repetition of 0 to a length that's a power of 2: $L = \{ 0^k \mid k=2^n, n \geq 1 \}$ I want to know how to use the Myhill-Nerode theorem to show that this language is not regular. This is my first attempt at doing this although I am confident that I am wrong: $j, p = 2^h$ for 2 distinct values of $h...
As an applied person, I'm facing one practical problem deciding whether a set of Wang tile could tile the plane periodically or aperiodically. Although both problems seem undecidable, but I'm on a more practical aspect. Say, if the program accidentally ("or systematically") find some "periodic structure", then it stops...
I have an equation $y=2x^4-20x^2-50x$ within a range of -4 to 6 I already have an algorithim that tell me the y value when I plug in the $x$. It simply uses a loop. What I am trying to do is determine what will be be the y max value and what $x$ corresponds to it. Is there some sort of loop or counter I can use. I am ...
Assume $\{f_i^{(n)}\}_{i=0}^\infty$ is a Gödel enumeration of the $\mu$-recursive functions of $n$ arguments, such that the $S^m_n$ theorem and the universal function theorem hold. Denote the set of (total and partial) functions $\{f:\mathbb N^k\to\mathbb N\ \}$ by $\mathfrak F^k$ Definition: We call an operator $G:\ma...
The problem: Input: An $n \times n$ matrix of 0's and 1's, and a position pos of this matrix (i.e. a pair of integers $i,j$ with $1 \leq i,j \leq n$) Output: YES if there exists a path through adjacent matrix entries $\dagger$, starting at pos, covering each matrix entry with a 1 exactly once, and not covering the mat...
I have a question about predicate logic. Suppose we have the following predicates: $\text{Study}(x,y)$: x studies y $\text{Comp}(x)$: x is a computing student I want to encode the following sentence in predicate logic: "Some, but not all computer students study logic." A potential answer is: $$\exists x(\text{Comp}(x)\...
While going through certain problems. it seems that more than one NFA is possible for the given language. Is it so? For example for drawing: NFA ending with 1 where $\Sigma=\{0,1\}$ is and also we can draw one without 0 from the edge P to P! Which one should be considered "more" correct?
I saw this old post on stack overflow of a PDA that accepts a language where there are exactly twice as many a's as there are b's. The image they used is below and so is the link to the post itself. PDA for language that accepts twice as many a's as b's. It was commented that the PDA was not deterministic. So I'm wond...
I am learning Compiler Design. Can somebody explain what type of Grammar this is? The answer given is $LL(1)$ but there exists a left recursion in the grammar so it cannot be $LL(1)$. I derived the parse table it had conflicts. Am I doing some thing wrong or is the answer given wrong? My texbook defines: For LL(1) Gr...
The shannon entropy of a random variable $Y$ (with possible outcomes $\Sigma=\{\sigma_{1},...,\sigma_{k}\}$) is given by $H(Y)=-\sum\limits_{i=1}^{k}P(Y=\sigma_{i})\;\log(P(Y=\sigma_{i}))$. For a second random variable $X=X_{1}X_{2}...X_{n}$, where all $X_{i}$'s are independent and equally distributed (each $X_{i}$ i...
I am currently learning about the Q-learning algorithm, so I therefore assume that it has some use or purpose. However I currently cannot see how it is in any way useful. In terms of complexity class, it appears to perform equal to or worse than brute force, which as far as I am aware, is the lowest you ever need to go...
Is $$ f(n) \in \Theta(g(n)) \Leftrightarrow f(n) = g(n) \cdot (1+o(1)) $$ true? For clarity, here are the definitions I use: $$ f(n) \in o(g(n)) \Leftrightarrow \forall \epsilon > 0 \exists n_o\forall n> n_0: |f(n)|\leq \epsilon \cdot |g(n)| $$ $$ f(n) \in O(g(n)) \Leftrightarrow \exists c > 0 \exists n_o\forall n> n_...
I have a question regarding regular languages. Given that $L_1$ and $L_2$ are non-regular languages, can a regular language $L$ exist so it is a subset of $L_2$ and $L_1$ subset of $L$? To be more specific: $\qquad L_1 \subset L \subset L_2$ for $L_1, L_2$ non-regular Languages.