instruction stringlengths 35 29.1k |
|---|
I am trying to show whether this language is regular or not:
$$L = \{0^m1^n \mid m \neq n\}$$
Since I cannot create or think of an automaton that recognizes $L$, I am suspecting that $L$ is not regular. From the book I am using, it seems I can use the pumping lemma, I have done this:
Let $p$ be the pumping lemma const... |
I think some of the log properties are flying over my head but I'm trying to understand how the depth of mergesort is...
$1 + \log_2 n$
I understand that to get the depth, you would have to divide $n$ by $2^x$ but I don't how this leads to the above.
It's probably some simple log principal but I'm not sure.
|
Problem statement can be found here or down below.
The solution which I'm trying to understand can be found here or down below.
Problem Statement.
Peter wants to generate some prime numbers for his cryptosystem. Help him! Your task is to generate all prime numbers between two given numbers!
Input
The input begins with ... |
Hi i have derived the following SoP (Sum of Products) expression , by analyzing the truth table of a 3 bit , binary to gray code converter. I ask for verification, because i feel as though this answer may not be correct or complete.
X = a'bc' + a'bc + ab'c' + ab'c
which, using k-maps, was simplified to
X = ab' + a'... |
I am trying to find Regular expression for a FSM with more than one final state(in my case 2).
In this I am getting two different RE for state q4 and q5. So my question is If we get more than one different RE for one FSM with more than one final state, is it correct??
|
This looks like quite the challenge; given a pattern $P$ (of length $n$) and a string $S$ (of length $m$), how would you check whether the string matches the pattern? For instance:
If $P$ = "xyx" and $S$ = "foobarfoo" then $S$ matches $P.$
If $P$ = "acca" and $S$ = "carbuscarbus" then $S$ does not match $P.$
My thou... |
I was doing a type checking example in system f sub on paper to understand how it works.
according to Pierce's book Types and Programming Languages, numbers and their types are following in system f sub. (see chapter 26.3, page 399)
1)top is universal type,
2)capital letters are type variables, small letters are... |
I'm looking for books applying evolutionary theory to the history of programming languages. Researching the topic I have found an interesting paper - Modelling the Evolution of Programming Languages Any hints in this direction appreciated.
|
I'm trying to understand how to use a contradiction proof via the Pumping Lemma to prove a language is not regular. Everybody always uses examples like $\{ 0^n1^n | n>=0\}$, where it can be broken up into two parts $xy$ and $z$ and where these parts are different. How can I apply it to a language consisting of the conc... |
Consider the following grammar:
S->A.
A->A+A|B++.
B->y
Check whether grammar is Ambiguous or not?
Also ,unambiguate the grammar.Now please tell me what will be the grammar after removing the ambiguity.
I have worked over here and i am able to draw two parse trees for the input string w=y+++y+++y++
|
I have this specification in GCL:
$[Ctx C: n\geqslant 0\ \wedge\ b:[0..n-1]\ \text{of int}$
$\{Q:\text{True}\}$
$sum,i:=0,0;$
$\{\text{Invariant}\ P: 0\leqslant i \leqslant n\ \wedge sum=\sum_{j=0}^{i-1} b[j]\}$
$\{T:n-i\}$
$do\ i\neq n \rightarrow\ sum, i:=sum+b[i],i+1;\ od$
$\{R: sum=\sum_{j=0}^{n-1} b[j]\}$
$]$
But ... |
Suppose I have a set of images that I will use for training. Just as an example take that I have pics of the same car in many different camera angles. I am required to identify the important features like the mirrors, the logo, may be some body features like curves, dents etc. These features have to be extracted from... |
Question: You are given access to a multistory building. You have N eggs and are allowed D maximum drops from their window.
Rules: If a egg is dropped from window of floor F and it breaks, it will break for all floors > F.
If an egg is dropped from window of floor F and survives, it will survive for all floors < F.
... |
I need an efficient algorithm with clear steps to compute $a^n \bmod p$ when $n$ is large enough and $p$ also. I'm looking for something equivalent to the built-in PowerMod function in Mathematica.
|
Are there any programming languages where algebraic data types can be expressed not only by using intersection and disjoint union but also a standard set union (intersection + disjoint union)?
Do such types even make sense?
If so, could you provide practical example of use?
|
I have a large array of mostly random numbers, with a few elements equal to each other. I need to change the array so that any elements that are equal are next to each other. Of course, sorting solves this problem but since I do not require the entire array to be in order I am assuming there are faster algorithms for t... |
Consider the following well known flow-shop problem:
We are given a set of jobs $J=\{J_1,\ldots,J_n\}$ and a set of resources $R=\{R_1,\ldots,R_m\}$. Each job $J_i$ consists of a set of operations $O^i=\{O_1^i,\ldots,O_p^i\}$. Each operation $O_k^i$ requires exactly one resource $R_k^i \in R$ for a time fixed time $t... |
I realized that almost no one explained how to selected the type variable T1
Γ ⊢ e1 : T1 -> T , Γ ⊢ e2 : T1
-------------------------------- T-APP
Γ ⊢ e1 e2 : T
when doing type checking (from bottom to top).
So, the question is how T1 is introduced? Is there any condition about T1?
|
Design a minimal DFA for the language which contains numbers in the form of binary strings starting with $101_2$ and is divisible by $100_{10}$?
I think the numbers will be 700,1400,2100 ... in the form of binary strings which are starting with $101_2$ and are even divisible by $100_{10}$.
100 is divisible by 25 and 4.... |
Consider a finite state machine as usual, but every transition, it can also update an integer counter by adding or subtracting a number.
Say, a transition function of the form
$\delta(q,a) = (p,k)$
moves to the new state $p$, and add $k$ to the counter, where $k \in \mathbb{Z}$ (so $k$ can be positive, negative, or zer... |
I just found out by luck that
Abs(sum of differences of elements in a sorted array) = array.Max()-array.Min()
For example,
Consider a sorted array, {1 43 65 97 98 99 101}
Abs(1-43-55-97-98-99-101)= 101-1
Does anyone know why?
Thanks in Advance.
|
Hastad had in 1985 shown that PARITY(n) if it has to be evaluated by a depth$-d$ $AC^0$ circuit needs a size $\Theta(2^{n^{\frac{1}{d-1}}})$. But PARITY is in $NC^1$ and PARITY is also the negation of the MOD2 and hence this shows that the following inclusions are strict, $AC^0 \subset AC^0[2] \subset NC^1$.
If I und... |
From Ullman and Hopcroft's Introduction to automata theory, languages, and computation
Consider the off-line Turing machine M of Fig. 12.1. M has a read-only
input tape with endmarkers and k semi-infinite storage tapes. If for
every input word of length n, M scans at most S(n) cells on any
storage tape, then M i... |
Are there some undecidable problems for which there are efficient heuristic algorithms, that succeed on a sufficiently large subset of inputs to be worth using?
The one application that comes to mind is program static analysis: clearly undecidable (assuming infinite memory – I believe that it is PSPACE-complete if memo... |
Given the formal language
$L_1 = \{wcw | w\in \{a,b\}^+\} $
Does this definition requires $w$ to be exactly the same before and after the terminal character $c$ or can it be different?
Example:
Are $aabca$ or $abca$ accepted words of $L_1$, or only words like $aabcaab$ or $aca$?
|
What is induction-induction?
The resources I found are:
the HoTT book, at the end of chapter 5.7.
nLab's article
a paper called Inductive-inductive definitions
this blog post also mentions inductive-inductive types
The first two references are too brief for me, and the latter two are too technical. Can anyone explain... |
All the proofs I've seen about the Ω(nlgn) lower-bound for comparison sorts use binary decision tress like this (from CLRS textbook)
Now what if each comparison yields strictly 3 outcomes, i.e. <, =, >? (the input array is allowed to contain repeated elements)
The bound is probably still Ω(nlgn), but I'm not sure how ... |
I just want to make sure I understand what this means. I am new to Formal Languages and this is my first week of courses.
Suppose we have two regular languages, $L_1$ and $L_2$, with a common alphabet.
The union of $L_1, L_2$ is $\{x:x∈L_1∨x∈L_2\}$
Does this mean that, for any string $s \in L_1$, we also have $s \in ... |
I have a list of ranges ai , bi. And I have many queries in the form of a range c, d, which asks how many ranges ( ai, bi ) are completely inside c, d.
c <= ai & bi <= d
There are so many of these queries. So I want to know if there is an algorithm that answer each query in a time complexity that is better than O(n).... |
After i read this question here.
All non-trivial examples of lower bounds always mention sorting, but i do not find other non-trivial examples, which do not rely (partly) on the sorting proof.
What are other non-trivial examples?
|
The following is Church-Turing Thesis from two books.
Is it correct that
The first book seems to say that the Turing machines involved in the thesis may or may not halt on a given input,
the second book says that the Turing machines involved in the thesis must halt on all the inputs?
Do the two books contradict each ... |
I have the below homework question as an assignment of my Computer Science Foundation class.
Throwing eggs from a building. Suppose that you have an N story building, and plenty of eggs. Suppose also that an egg is broken if it's thrown off floor F or higher, and intact otherwise. First devise a strategy to determine... |
From Ullman and Hopcroft's Introduction to Automata Theory, Language, and Computation 1ed 1979:
The assumption that the intuitive notion of "computable function"
can be identified with the class of partial recursive functions is
known as Church's hypothesis or the Church-Turing thesis.
A problem whose language ... |
Firstly it is my understanding that the complement of a problem is simply the "reverse" question. So the complement of "Is the sky blue?" would be "Is the sky not blue?". Is my understanding correct?
If so, how can a complement ever be more or less complex than the original problem? Please include the simplest example ... |
I'm interested in knowing things about the computability of concurrent programs. If you had a Turing complete language that also let you branch off new programs but had no means of communication between them there would be programs that you couldn't write. Namely those that required communication between concurrently r... |
From wiki, "a chord graph is one in which all cycles of four or more has a chord." My first question is if a graph is acyclic, i.e., there is no cycle in the graph, can it be called as a chord graph?
Another question is about elimination ordering in chordal bipartite graph. It is well known that in a chordal bipartite ... |
If the TCP segment does not contain the destination IP in its header, how does the(first) network layer decide the first link to traverse, to get closer to the destination IP.
I have learnt that the network layer prepares a header that has the source and destination IP, adds it to the TCP segment to make the IP packet.... |
Given that $L_1$ is decidable language. That means it has a TM ($M_1$) decider.
Now we consider a language, $L_p$;
$$L_p = \left \{ \langle M \rangle \mid L(M) \text{ is reducible to } L(M_1) \right \}$$
$L_p$ consists of all the encodings of the Turing machines whose language is reducible to $L_1$.
What can we say ... |
I'm writting a compiler implementation for a language that you can see defined here. I having problems designing how the do keyword should be handled. You can find the code I'm referring to in here.
Let me delve a little bit into the problem. According to the documentation:
The do keyword is used to call an expressio... |
Most disk-based system's performance heavily depends on its disk access patterns. So maximizing the sequential I/Os while avoiding the random I/Os is a typical goal in performance perspective.
I am working on the same problem.
I have some difficulties in measuring the degree of randomness of Disk I/Os. I can measure t... |
In a recent lecture the professor stated that given two complexity classes A and B, and given the existance of an oracle O such that $$A^o=B^o$$
(As I understand, meaning that a problem in A with can be reduced to a problem in B with the oracle O), It can be shown that classes A and B can not be seperated using a diago... |
Is Quantified Boolean Formula (QBF) the same as First-order logic (FOL)?
|
We are given a system with $n$ nodes which have been arranged into the topology of a hypercube of $m$ dimensions. I would like to derive a tight bound on the maximum number of Byzantine failures that can be tolerated in this system.
One upper-bound that I have derived on the number of failures $f$ is from the fact that... |
I know that if a language has a regular expression it is regular, is the other way also true?
|
Background
I am currently taking an Algorithm and Analysis course and doing some extra studying on my own from the text book. This is not a homework question or exercise even. I am just trying to understand completely how the authors are doing the combining of terms in the time/cost equation for Insertion-Sort.
I under... |
I have been studying search problems in AI, and I am having some troubles understanding some points in these concepts:
State Space: "represents the environment of the problem, the set of all states reachable from the initial state."
Search Graph: "the nodes are states and the arcs between nodes are actions"
Search Tr... |
Given this sample:
$$\begin{array}{|c|c|c|} \hline
X1 & X2 (Kg/m^2) & \text{Class} \\ \hline
8 & 4 & A \\ \hline
4 & 5 & B \\ \hline
4 & 6 & B \\ \hline
7 & 7 & A \\ \hline
5 & 6 & B \\ \hline
6 & 5 & A \\ \hline
\end{array}$$
we then calculate each of Euclidean distance values to the row:
with P = (7, 4)
$$\begin{arra... |
I am trying to solve a pumping Lemma Problem where $L= \{(a^n)^n ; n\ge 0\}$
I am having a lot of trouble with the pumping lemma and understanding using it with different languages. Here is what I have so far and would appreciate any input on it.
Assume for contradiction that $L$ is a regular language. Since $L$ is in... |
Concorde TSP is a solver for TSP. SAT solvers are solvers for boolean satisfiability. TSP and SAT are NP-complete.
Hence, why spent the time to develop Concorde TSP when there is an abundance of SAT solvers in the market back then?
|
Given a truth table for a truth function that takes n inputs and produces a single output (true or false), what is the fastest way to find the simplest combination of logic gates that will output the given truth table?
A few rules for specificity:
Any binary truth function may be used as a logic gate. In other words,... |
I am working on a generalized problem where I am given only schema definition of multiple tables that i have.
Now i have to retrieve certain columns by joining multiple tables such that number of joins are minimized.(i will consider where condition in sql clause later)
Example: Suppose i have 3 tables and here is the l... |
So I have a trie in python but its not leading to the runtime complexity I want from my algorithm to find compound words. I was originally trying to use this algorithm but had no luck https://stackoverflow.com/questions/1291734/finding-dictionary-words
So the words are
['bye','byeen','s','byeens']
# My Trie (*) denotes... |
I am working on modeling a certain system's cache layer and comparing two algorithms.
One outperforms the other one; it shows the higher cache hit rate (%).
But what is important is the impact of such an improvement at cache layer on the entire system performance and on the user experience.
The system performs message ... |
There are other models of computation equivalent to Turing machines in terms of computability.
Turing machines also recognize recursively enumerable languages.
My questions are
Do other models of computation equivalent to Turing machines also recognize the same languages?
Are computability and language recognization ... |
I have an infinite sequence of numbers, starting from 1 and need to find position of begin of some given substring of numbers.
Example:
1234567891011121314151617181920 ...
S = 141
Result: 18
All i think about is convert sequence to string and find substring using Rabin-Karp or KMP. But i feel that i can use it as numb... |
The definition of the variable
< number>::=< digit > | < digit >< number >
where < digit > is defined as
< digit > ::= 1|2|3|4|5
Apparently reflects the following syntax diagram
Please explain why this is the case. I am particularly confused with the clause after the vertical OR line (i.e. < digit >< number >) and ... |
From Ullman and Hopcroft's Introduction to automata theory, languages, and computation 1ed 1979
Consider the off-line Turing machine M of Fig. 12.1. M has a read-only
input tape with endmarkers and k semi-infinite storage tapes. If for
every input word of length n, M scans at most S(n) cells on any
storage tape... |
L = { < M > | M is a turing machine and }
Obviously, the language which L(M) is polynomially reducible to, is context free and hence recursive, so it is a decidable language .
Now, L(M) is reducible to decidable language.
I think this language is not decidable, as this language is non-trivial in the sense of rice the... |
I would like to find the convex polytope with the smallest volume that envelops (contains) all the points of a given 3D point cloud and that can be constructed from only $k$ planes. This is similar to the convex hull problem, except that the convex hull can have an arbitrary large number of faces (limited only by $n$, ... |
Suppose I have a regular language $B$ and a regular language $C$ such that $C \subseteq B$.
How do I find a regular language $A$ such that $A \cap B = C$, where $A$ is represented by a DFA with as few states as possible?
I don't really know where to start looking for research on this, so even pointers to some work in t... |
Recently, I am reading the book [1]. I am trying to solve the following problem:
1.2 Pigeons and holes. Properly speaking, we should call our representation of Königsberg a multigraph, since some pairs of vertices are connected to each other by more than one edge. A simple graph is one in which there are no multiple e... |
I recently begun working on a genetic algorithm to solve for patterns in data. More specifically, it solves for functions given a sample of ins and outs. So a possible solution would be X+2 = Y. The problem is scoring.
I began by trying to use the distance between the result and the expected result as a way of measurin... |
I've been fumbling around with this problem for the last hour, and I'm incredibly stumped.
Let $A = \{\; 0^ku0^k \mid k ≥ 1 \text{ and }u ∈ Σ^*\;\}$. Show that $A$ is regular.
The language obviously satisfies the Pumping Lemma, but that is not conclusive for regularity. How on earth do I prove that this language is re... |
A programming language can be studied from different aspects: syntax,
semantics, and pragmatics.
Does the expressive power of a programming language belong to the
semantics of a programming language?
What does the expressive power of a programming language include? For example, is its expressive power all about Turing... |
I was wondering, If there is a book about whole operation of a Computer. I mean since the operation of software, programming languages (high and low level) and drivers until the deep physics explanation of the operation of hardware like microprocessors, transistors and the other devices.
Something like since the Bigge... |
Are there typing rules for specific coinductive types such as conat or stream, or even in general the M-types?
|
Consider an equation of the form:
$Ax^2+Bxy+Cy^2+Dx+Ey+F=0$
where A-F are integer coefficients (binary quadratic Diophantine equation). I consider here the most general form, so assume all coefficients are non-zero.
Is there an efficient algorithm which can compute integer solutions for this type of equation?
|
The book "Types and Programming Languages" said System F sub type checking introduce exposure typing rules alongside algorithmic typing and sub-typing rules.
exposure algorithm
X<:T ∈ Γ Γ |- T ⇑ T'
--------------------------- (XA-PROMOTE)
Γ |- X ⇑ T'
T is not a type... |
I've been studying from this book the topic of "Synthesis and optimization of digital circuit". In chapter 3 some theory about programming languages is exposed. I was wondering what's the meaning of this paragraph about the meaning of "imperative semantic"
Languages with an imperative semantics are those where there i... |
I have been asked a very interesting question in preparation for my exam coming up. The question is as follows:
Is $L=\{a^n b^n : n \geq 0\} \cap \{a^*b^*\}$ regular or not?
Assume $L$ is regular. Then, $L^c$ should be regular as well. Thus, $L^c = \{a^n b^n : n \lt 0\} = \{\}$, so if I compliment the compliment, I sho... |
I was going through TM here and encountered a term "Dovetailing".
What is exactly the dovetailing in Turing Machines?
Can anyone mind to provide a good explaination with some examples?
|
I have to come up with the recurrence for the quaternary search algorithm.
My initial thought is $T(n)=4T(\frac{n}{4})+c$ because the algorithm examines all four subproblems, and each is one quarter the size of the entire array. But this can't be right because that yields a complexity of $O(n)$. I looked on Google and... |
I understand theoretically how Shor's algorithm works, but I don't know what specific gates are used (or would be used) to implement it. What would the quantum circuit look like?
|
Say we have an algorithm that takes time $T$ to process a problem of size $n$.
Is $\langle T(n)\rangle $ = $T(\langle n\rangle)$?
|
I'm a non-CS grad student working on an algorithm which would be an alternative to conventional GPS position estimation algorithms. My advisor insists that I must compare the run-time of these algorithms. I understand that simply timing the two algorithms is not a good measure for comparison for several reasons but I'm... |
In the original art gallery problem, there is a non-convex area provided and one has to divide it into regions based on infinite visibility of guards. We assume an unlimited number of guards. However, suppose we only have n number of guards with limited visibility. Then how to divide the area in a balanced way meaning ... |
I am reading Bob Carpenter's note at http://lingpipe.files.wordpress.com/2008/04/lazysgdregression.pdf and William Cohen's note at http://www.cs.cmu.edu/~wcohen/10-605/notes/sgd-notes.pdf.
They described the same technique to lazily decay the regularization component of the weight vector (algorithm 2 in Carpenter's). H... |
Aside from problems such as the halting problem, which aren't computable, are there any useful problems in computer science that can only be solved in time $O(2^{2^n})$, or in time $O((n!)!)$? I've heard of many difficult problems which require O(2^n) algorithms, but none that have required running times worse than tha... |
Why would total comparison of procedures solve the Halting problem?
I've read that if all procedures could be represented syntactical e.g. in Scheme, then they could be compared structurally using the predicate =, and this would in turn solve the Halting problem.
Having read the ordinary proof why the Halting problem... |
I have 3 processes P1,P2,P3 having gantt chart as follows =>
Now, CPU remains idle in 0 - 2 sec and 44 - 47 seconds as I/O is taking place.
Does, this affect throughput as 3 processes can be completed in total 47 sec .
Hence, throughput = 3 / 47 .
Is this correct or am i missing something ?
|
Let $A$ be a sorted array. Suppose that this array is huge and can only be stored in a disk. In the I/O model and algorithms built in this model, every time we access the disk we spend an I/O and we get $B$ elements to the RAM. Since accessing the disk is much more expensive than accessing the main memory, we assume th... |
Using pseudocode, I need to design a parallel algorithm that, when given k keys, a[0], a[1], a[2],... a[k-1] stored in an unsorted array a, would find the second largest key in it.
I'm new to parallel computing, so I know that in terms of sequential programming, we can use bubble sort with two passes. First pass gets ... |
I have a problem that I'm trying to solve as part of a larger algorithm I'm implementing, and I don't know if there's a standard, well-known technique for this or not. Without going into too many details of the larger algorithm, I've managed to boil my problem down to the following mathematical summary:
I have a list o... |
According to Wikipedia, PP is the class of decision problems solvable by a probabilistic Turing machine in polynomial time, with an error probability of less than 1/2 for all instances. If the answer is YES, the algorithm will answer YES with probability more than 1/2. If the answer is NO, the algorithm will answer YES... |
I am learning about preceptrons and my professor noted that z-scores are a commmon pre-processing step to normalizing input variables. Following this, I am having trouble understanding why z-scores are useful when training a preceptron?
My current understanding is that z-scores allows us to calculate the probability o... |
Could any existing ML technique be used, for example, to solve the problem of building a lazy Sieve of Eratosthenes in Haskell? By that, I mean a program that, given a specification (a dependent type inhabited by infinite, ordered lists of prime numbers), builds a program of that type, with the same complexity of the k... |
I am working with a professor to implement an optimization algorithm for determining the maximum and minimum of large (100+ variable) multi-variable expressions (not restricted to polynomials). Part of this process involves picking random values for all variables and then evaluating the expression for near "neighbors" ... |
In the following rule,
$$\dfrac{ \Gamma \vdash t_1 : \forall X.T_{12} }
{ \Gamma \vdash t_1 \ [T_2] : [X \mapsto T_2]T_{12} }
\textsf{ (T-TApp)}$$
whend doing type checking, how do know what is $X$?
Also, type checking will not give you a term which has a form $[X \mapsto T_2]T_{12}$, so how to deal ... |
The fact that PPAD is a subclass of TFNP seems to be taken as evidence that PPAD cannot be shown complete (or hard) for classes of independent interest like NP ∩ coNP. Slightly confusing, it even seems to excuse that it has not yet been shown complete for PPA, in which it is contained and which has complete problems.
A... |
I am studying automata and I was wandering if there is a definition of ε-DFA automaton. Is it feasible to define it?
|
Is integer factorization confirmed to be an NP-complete problem? If not, then if one could transform IF into an equivalent problem which is already proved to be NP-complete, would it mean that IF is itself NP-complete as well? Would such a thing have any practical meaning?
|
I have $N$ songs, $M$ instruments.
Each song requires one or more of the $M$ instruments in order to be played.
My $K-1$ friends and I want to learn to play $K$ different instruments, and we want to pick them such that we maximize the amount of songs we will can play.
How would I efficiently solve this? I'm sure this p... |
Say I have a polynomial in $n$ variables of maximum degree $m$. I define its symmetry group to be the subgroup of the permutation group which fixes the polynomial when it acts on the variables. Example: $x^2+y^2+z$ has the subgroup $\langle(x,y)\rangle$. Given such a polynomial, what is the best way to find such a poly... |
I have two poly-lines. I would like to find segments of these lines where the minimum distance between them is higher (or lower) than some threshold.
I.e. I want to find the parts of the lines highlighted in squiggly pink here:
My best attempt is to split each line into some equally sized segments, and then use dyna... |
I'm trying to understand the algorithm described in "Degree constrained minimum spanning tree problem: a learning automata approach" (Javad Akbari Torkestani, The Journal of Supercomputing; April 2013, Volume 64, Issue 1, pp 226–249).
Given a undirected graph $G = (V, E)$, a weight function $w: E \rightarrow R$ and a v... |
Is there a difference between a loop and a natural loop? Natural loops are defined as having a back edge to a head block that dominates it. If you have a natural loop nested inside of another natural loop, does this mean the actual loop is the merging of these two natural loops?
I'm curious to know if there's an agre... |
I read that Babbage analytic engine is Turing complete. I wonder, how could I sort array of numbers on it? Imagine that I have numbers in storage and I want to sort them. How can I do that? The biggest problem is, in my opinion, the fact that analytic engine does not have a card which fetches a number into ingress colu... |
I am confused on several areas of this. First, this is so obvious I am finding it hard to prove. Second, what are some definitions, axioms, or lemmas of an ll(k) grammar that I can use to build up a contropositive argument that for any ambiguous grammar it cannot be an LL(k) for any k? I've found this to be my best app... |
When we perform average case analysis of algorithms, we assume that the inputs to the algorithm are sampled uniformly from some underlying space. For example, the average case analysis of quicksort assumes that the unsorted array is uniformly sampled from the $n!$ permutations of $\{1,\ldots,n\}$.
Suppose instead th... |
$$S\rightarrow aAB$$
$$A\rightarrow bBb$$
$$B\rightarrow A|\epsilon$$
I'm choosing the string abbbb.
First left most derivation is the following:
$$S\Rightarrow aAB\Rightarrow abBbB\Rightarrow abebB\Rightarrow abebA\Rightarrow abebbBb\Rightarrow abebbeb = abbbb$$
Second left most derivation is the following:
$$S\Righta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.