instruction stringlengths 35 29.1k |
|---|
I am attempting to parse a large amount of text that cannot be readily used by other software due to the human readable design. However, each "section" of the text has the same format. By "section", I mean lines 1-10 (section 1) will have the same format as lines 11-20 (section 2). My plan is to loop through this text ... |
Starting with an image, I have taken its fourier transform and then modified it, and finally taken the inverse fourier transform of the modified fourier transform to get my resulting image. In my result, I get a lot of very small imaginary components in each pixel. My question is what causes these, and is there some ... |
Turing machines take inputs that are strings of symbols from some alphabet, and they give outputs that are strings of symbols from the same alphabet. To show that a function is computable, we have to exhibit a Turing machine that computes it. In the case where the function is not from strings to strings, something abou... |
Is it possible to solve every problem (solvable with turing machine) with only recursion ?
If yes, which principles or theories assure this ?
Thanks
|
I'm trying to prove $\mathsf{FIN} \leq_T \mathsf{REGU}$, where
$$\mathsf{FIN} = \{ \langle M \rangle \mid M\text{ is a Turing machine}, L(M) \text{ is a finite language}\},$$
$$\mathsf{REGU} = \{\langle M \rangle \mid M\text{ is a Turing machine}, L(M) \text{ is a regular language}\},$$
$\langle M\rangle$ is the encod... |
I am implementing a SAT solver based on DPLL algorithm, and it works fine on small formulas and larger satisfiable problems. My case split is based on a tree like structure, where every branch is tried one by one until solution for the problem is found or until every branch is tried.
So my problem now is that the abov... |
a question about machine learning, specifically recurrent models:
For machine translation recurrent neural networks show great promise, common here is an encoder-decoder architecture which takes a source sentence, reads it, and then based on a compressed representation outputs a target sentence.
In opposition to that, ... |
I have a model that considers real values and that uses a binary variable $x$. In this model, the following conditions should apply:
\begin{equation}
x=
\begin{cases}
0, & \text{if}\ y > s \\
1, & \text{otherwise}~(y \le s)
\end{cases}
\end{equation}
with $y \ge 0$ and $s \ge 0$.
First I tried... |
I am currently studying the paper Primes is in P and have a question regarding 5 section of this paper. Line 1 of the algorithm (on page 3) requires the following operation to be performed
if (n = a^b for some natural numbers a and b), output 'composite'
I have attempted to deduce the complexity of this line and have ... |
I'd like to solve the questions below with repeated or conditional evaluation but I don't know how.
Suppose we are comparing implementations of insertion sort and merge sort on the same machine. For inputs of size n, insertion sort runs in $8n^2$ steps, while merge sort runs in $64n*log(2,n)$ steps. For which values ... |
I'm preparing for the next hashcode by solving the following prev. problem:
Given a pizza of size R x C with cells containing either mushrooms or tomatoes as shown bellow:
We are given 2 parameters: L and H. The goal is to split the pizza into rectangular slices such that each rectangle contains at least L cells of mu... |
Consider a large graph, minimum 1 000 vertices but it can easily go up to 50 000 vertices depending the case. The graph is the result of social relationships (followers, following, friendship) so it can be oriented but for the ease of the solution let's say it's not, so the matrix is symmetric. Moreover the matrix of a... |
You are given a string with wildcards, e.g. X***Y*Z. Your goal is to print an input string filling all the wildcards in the given string.
You are allowed to write data to the string in blocks of fixed size: character-by-character, you can write contiguous blocks of identical characters of length 2, 3 ... N: X, XX, XXX,... |
In $\lambda$-calculus, we can encode arithmetic, numbers, booleans, and even compute factorials of numbers, as shown here.
Is there encoding of "for" or "while"?
|
I'm a student of Formal Methods in Software Engineering, I'm trying to study this question for two days but still haven't figured it out, I couldn't even find a similar solution or explanation, so please if anyone can explain in detail the question and it's solution I've provided in the image, it'll be a real help. One... |
I'm having trouble solving this exercise about graphs, I hope you can help me:
Given a graph $G = (V,E)$, two sets of vertices $A \subseteq V$ and $B \subseteq V$ (represented as arrays), and an integer $k$, verify in $O(|V|+|E|)$ if each path that starts from a vertex $v \in A$ and connect a vertex $u \in B$ have a le... |
I work in Search and have seen following problem appear in different forms. There are many users in an enterprise; they have ability to create records. Each user has variable level of access to some or all of the records of the enterprise; and the record creator can manage access to the record.
How do we design a sear... |
I have a question about the Hadamard Gate on entangled qubits. I’m very newb to quantum computing and does not have any professional knowledge in physics nor mathematics. However I’ve tried some different algorithms in IBM’s quantum experience and think I got the idea about how the qubits works in the block sphere. Bec... |
I'm approaching the following problem: Given some input array $A$ of length $n$, and integer tuple $(j,k)$, I want to determine if there exists a contiguous subarray of length $j$ with all elements greater than $k$. The $O(n)$ algorithm is straightforward, but becomes inefficient when confronting a modified version of ... |
I need to choose a language, design a finite automaton M such that L = L(M). Construct a minimum-state DFA M′ equivalent to M in such a way that the ratio of the number of states in M to the number of states in M′ is less than 0.5.
I have zero idea as to how I should approach this. I've tried considering a few DFA's, a... |
I am referring to the Marking algorithm defined in this article: https://arxiv.org/pdf/1602.00621.pdf
The Marking method is defined at the bottom of page 4 and has a pseudo code at the beginning of page 5.
In page 7 they claim "The runtime of the marking stage is O(B)". B being an upper bound for the number of marks of... |
How can I prove distribution of division over union in relational algebra, i.e. the following:
$$(R \cup S) / X \overset{?}{=} (R / X) \cup (S / X)$$
|
I'm attempting to convert a CFG into an LL(1) grammar for predictive parsing in a compiler. I've been able to left factor and eliminate left recursion and ambiguity for every case in the grammar, with the follow exception. I've provided the simplest case to illustrate the problem below.
S -> a b S | T
T -> a c T | d T... |
Let $\mathcal{F} = \{ f_{s} \}_{s \in \{\, 0,1 \,\}^{*}}$ be a family of computable functions, where $f_{s} \colon \{\, 0,1 \,\}^{|s|} \rightarrow \{\, 0,1 \,\}^{|s|}$.
We define a family of functions $\mathcal{H} = \{ h_{s} \}_{s \in \{\, 0,1 \,\}^{*}}$, where $h_{s} \colon \{\, 0,1 \,\}^{|s|} \rightarrow \{\, 0,1 \,\... |
PDA = Pushdown Automata
Let's assume I have this language:
$L = \{a^nb^ma^n | m,n \ge 1\}$
Would the first approach with one node be enough - in that case it guess twice the $\lambda$. In the second approach it's deterministic, which is fine.
|
I'm working through Deep Learning by Goodfellow et al. The textbook introduces backpropagation for MLPs in page 203 (http://www.deeplearningbook.org/contents/mlp.html). However, it does not expand further and illustrate the (full or stochastic) gradient descent update.
I'd like to confirm the full gradient descent upd... |
Question: Check if number of $a$ are prime with just two tapes in Tuning machine.
I'm not quite sure how to check it but what I've got so far is:
First tape will be the input. For example $aaaaa$
Second tape will be checking the numbers $2$ till $n-1$, meaning $4$ for this example.
We start checking them both from the ... |
I am implementing a topic suggestion system to a website. The aim is to add links to the left panel of each topic. For example, I opened the topic named "topic1", left of the page should show 5 additional topic links, say "topic48", "topic1453", "topic1905", "topic35", "topic63". Objectives are as follows:
1) Distribut... |
I'm curious if anything like this has been proved, or is even possible to prove a statement like:
"Out of all sorting algorithms, this one has the lowest time complexity for the worst-case."
Or stated more specifically, the statement could look like:
"Quicksort has the lowest time complexity for worst case of all sorti... |
Theorem: (Stockmeyer, 1974) Any circuit that takes as input a formula
(in the language of WS1S) with up to 616 symbols and produces as
output a correct answer saying whether the formula is valid or not,
requires at least $10^{123}$ gates.
Suppose we have generalized theorem: Any circuit that takes as input a f... |
I am aware of a O(n) algorithm for constructing a new heap of n items, this is better than repeatedly inserting into an empty heap which takes O(nlogn). I would like to know if there is something similar for inserting a group of n items into an existing heap. Rather than using repeated insertion, is there something mor... |
A regular expression $r$ is said to be in disjunctive normal form if it can be written in the form $r = r_1 +r_2 +\dots+r_n$ for some $n ≥ 1$, where none of the regular expressions $r_1, r_2, \dots, r_n$ contains the symbol $+$ (union).
For example, the regular expression $a^*b^* + (ab)^* + (c(acb)^*)^*$ is in disjunc... |
So I am working on implementing YOLOv2 using my own dataset, for face detection. This requires me to prepare a training set of images annotated with the bounding box extents of faces within each image.
My question is: is there any convention for what we define as the face in face detection? For example, do we include t... |
I have a problem.
Below I present a function in Python.
def exist2(Sunion, Sunion_vsum, S, vsum):
for xunion_id in range(len(Sunion)):
if(vsum < Sunion_vsum[xunion_id]):
plist = list(set(S) - set(Sunion[xunion_id]))
diff = 0
for i in plist:
diff = diff +... |
I have a question in my homework that deals with the concept of a definite language. The question defines a definite language as follows -
"A language L is definite if there is some k(> 0) such that for any string w, whether w ∈ L depends on the last k symbols of w." I'm supposed to do the following -
a) Rewrite this... |
I was asked to sort several functions by their asymptotic growth. I was docked a couple points for incorrect ordering and the correct solution was never provided. For what it's worth, this assignment has already been graded, I'm just wondering where I went wrong.
(None $\sim$ indicates functions have similar asymptotic... |
I want to write a JavaScript cross referencer (in Python) that will build a cross-reference of JavaScript functions for a given input file. I am trying to think of what Abstract Data Type would work well for this to represent the call tree.
I am thinking of using a General Tree (a tree that has a root node with many br... |
I am trying to find the path for the most negative cycle in a graph G which starts and ends at a specified source node S.
I have studied an application/ extension of the Bellman-Ford algorithm (henceforth referred to as the "Huang algorithm") found here which describes how to find a negative cycle reachable from a spec... |
Definition: In geometry, a polyhedron (plural polyhedra or polyhedrons) is solid in three dimensions with flat polygonal faces, straight edges, and sharp corners or vertices.
We have a closed domain with a certain number of faces (a cube, pyramids). For example: Imagine we distribute n finite plane (for simplicity fla... |
How to find the minimum and maximum of subroutine median3(x,y,z) from a totally ordered set?
|
I am looking for a reference explaining how to solve Navier-Stokes numerically using Machine learning algorithms .
Thank you in advance for your help .
|
In some programming languages type of variable goes before it's name.
In another - name goes first and then type.
Which version loads brain less and allow easier think about problem ?
|
So I am learning to do SDP relaxation on graph problems, and for this max cut problem I am given a 500*500 graph, and I am using the straightforward
relaxation. $W$ is the weight matrix, $X = u u^T$ where $u$ is the original variables.
$$ \max < (I-W),X> $$
$$ s.t. X_{ii} = 1, \forall i$$
$$ X \succeq 0$$
Problem is:
... |
Lets assume there is no upper limit on number of machines.
Here are the goals of partition:
Each node in the graph has a weight. There is an upper limit on total weight stored on a machine. All the nodes are not fitting on one machine, hence we are starting with partition.
When we store an edge on a machine, then th... |
When trying to prove that a recurrence $g(n)$ satisfies $g(n) = O(f(n))$, we sometimes are not able to find a valid $C$ to show the upper bound, so we try to prove it is $O(f(n-d))$ for some constant $d$ instead.
If we are able to prove that $g(n) = O(f(n-d)$, does this mean that it is also $O(f(n))$?
If so, does thi... |
I am searching for the most efficent implementation of a specific algorithm:
Assume you have a set of positive integers, for example:
X = [1,1,2,3,3,6,8]
The aim is to find exactly two sets (containing together all elements of X), so that the sum of all elements of the one is equal to the sum of the other.
So for examp... |
Is there a known example of two complexity classes, $A$ and $B$, such that:
$A \neq B$;
there is an oracle $O$ for which $A^O = B^O$?
I strongly believe that there are such examples, as otherwise $P = PSPACE$ (note that $P^{PSPACE} = PSPACE^{PSPACE}$), but I was looking for an example of this.
|
I'm taking a course about Information Retrieval and we had a quiz involving the evaluation of search engines.
We had a problematic question regarding "Query Logs" (basically recording the queries that users searched in the past and their response for the queries e.g links clicked), and I hope you can help me figure out... |
While working on my research for my master thesis I have stumbled upon the following problem:
Given $N$ groups of different sizes, create all the possible combinations $p$ such that:
$p = \{e_{0,j_0},e_{1,j_1},...,e_{N,j_k}\}$ for all $e_{i,j}$.
where $i$ stands for the index of the group and $j$ stands for the index ... |
What I have come across as a definition is - a language $L ⊆ Σ^*$ is said to be definite if and only if $L = E ∪ Σ^*Η$, for some finite languages $E,H ⊆ Σ^*$
Using these questions - Show that every definite language is accepted by a finite automaton
and What are definite languages? How do you formally define them?,
I u... |
I am reading this paper named "Matching triangles and basing hardness on an extremely popular conjecture" in the second page of this paper there is this paragraph:
Observe that the ∆-Matching-Triangles problem with ∆ = 1 simply asks if there is a triangle in the graph and can, therefore, be solved in O(n^ω) time, where... |
The problem I have is as follows:
I have a complete bipartite graph $G=(V \cup C,E)$ as input, where $|V|=1, |C|=n, |E|=n$
The interpretation is that the node of $V$ is a vehicle, the $n$ nodes of C are incidents and the $n$ edges from $V$ to $C$ are the travel times from the vehicle to the incidents.
Now the inciden... |
I was given the following problem as homework:
Let $x$, $y$ be words over an alphabet $Σ$. Prove that $xy = yx$ iff there exists a word
$z$ such that $x^2y^2 = z^2$.
I was hinted that I am supposed to approach this problem using structural induction. Considering the case where $|x| = |y|$, you obviously get $x=y=z... |
For any given set of real numbers, find the minimum set of intervals with length 1 that include all elements. For example, for the set: $${\{1.5,2.3,2.4,2.5,2.8,3.3,3.6,3.8}\}$$
the answer is $${\{[1.5,2.5],[2.8,3.8]\}}$$
On the example above $[1.5,2.5]$ is an interval with length $1$ ($2.5-1.5=1$). And there are 2 set... |
I've been thinking for some time but can't figure a way out.
I have big bitarray i.e. 1000+ items of 10_000 bits strings, I'm searching them now linearly. (currently it is stored in one chunk of memory).
I'm looking for some better algorithm for searching/matching !
Do you have any idea ?
bitarray looks like this :
0)... |
How can I write an O(n)-time algorithm to find the minimum and maximum, given a list of n elements drawn from a totally ordered set using the subroutine median3(x,y,z) which returns the index of three elements x,y,z? You are not allowed to read or compare the elements directly; the only operation that is allowed is i... |
I'm trying to get at least a laymans understanding of how the Longest Common Sequence (LCS henceforth) can be shown to be NP-Hard and I'm trying to do that by reducing it to an NP-Complete problem like Vertex Cover. I read through this downvoted question on another stack exchange.
I am trying to understand the demostr... |
In a partially ordered set L, an antichain is a subset A of L such that no two elements of A are comparable.
Antichains are commonly used to represent upward-closed subsets of L, that is, sets S such that if x is in S, any y ≥ x is also in S: if L is finite (the situation is more complicated in the infinite case), then... |
Im studying the semidecidability of First Order logic.
According to wiki
A logical system is semidecidable if there is an effective method for
generating theorems (and only theorems) such that every theorem will
eventually be generated. This is different from decidability because
in a semidecidable system there... |
This is another homework problem I'm stuck with. For the given finite automata, I am asked to find out the equivalent regular expression.
On inspecting the given automata, I started deducing the expressions that it accepts and tried to find a pattern, and this is what I was able to figure out -
The automata makes the... |
If i have a propositional logic formula, every time i add a variable the number of interpretation grow up by 2.
So if i have a propositional formula with 3 variables i have 8 interpretations.
So, is the time complexity of the SAT problem of propositional logic a $O(2^{x})$ ?
|
Suppose I have a 2D array M[n][n] of integers (in fact, binary is fine, but I doubt it matters). I am interested in repeated queries of the form: given a coordinate pair $k,l$, what is
$$
\sum_{i = 0}^{k-1} \sum_{j = 0}^{l-1} M[i][j]?
$$
Of course, all these values can be computed in $\mathcal O(n^2)$ time total, and a... |
I have the following algorithm:
func()
{
for(i=1; i<n; i=i*2)
print("aa");
}
How can I find Big-Oh using summation?
|
Suppose that $T$ is a tree of diameter four and $G$ is a graph. Deciding, whether $T$ can be injectively mapped to $G$ is NP-hard (there is a simple reduction from the problem of finding an independent set). I want to use this result as a side remark in my Bachelor's thesis. I believe that this should be a well-known p... |
As we know, $\epsilon$ is the empty string, with length 0. It is not part of any any alphabet by default, unless specifically defined so. However, it is a string over any alphabet.
For example, Given that I need to design a Deterministic or Nondeterministic finite state automaton (without $\epsilon$ transitions) that a... |
How could one reasonably define and construct the complement of a deterministic Mealy machine?
My intuition is that the complement should give exactly the opposite of output strings after a specific input string. I think this means the complement is non-deterministic. So let's define a (non-deterministic) Mealy machine... |
After deleting an element from a B-tree,I could rearrange the tree in several ways,that would still complies to the rules of B-trees.But,we are supposed to follow a certain set of rules for rearranging the tree after deleting an element.
Why is that ?
|
We use the following notation to describe a minimum convex optimization problem:
minimize f0(x)
subject to fi(x) ≤ 0, i = 1, . . . ,m
hi(x) = 0, i = 1, . . . , p
to describe the problem of finding an x that minimizes f0(x) among all x
that sa... |
Show that $L = L_\phi \cup L_{\{\sum^*\}} \notin RE$ with Rice theorem.
Well I did show that with reduction, by using $HP'$.
Simply by creating a function from $f(\langle M \rangle, x) = (M')$
Thus, if $M$ stops on $x$ then $M'$ simulates the machine that stops on the empty word and accepts/rejects like it.
$(\langle ... |
Let $S[1..n] \in \Sigma^*$ be a string of $n$ symbols over the alphabet $\Sigma$ where $|\Sigma| \in \mathcal{O}(1)$. Determine a shortest string which cannot be obtained from $S$ by deleting some (possibly no) symbols.
For instance, we are given $\Sigma = \{ A, C, G, T \}$ and $S = ACGTACGT$. In this case, one valid a... |
Although I have found a very similar question to what I want to ask here (https://codereview.stackexchange.com/questions/96064/dijkstras-algorithm-without-relaxation), yet I didn't find a satisfactory answer there, hence comes this question.
So I have done competitive programming for fun for a while, whenever I need to... |
I'm working through a proof that is a simplified version of David Maeirs LCS reduction from the VERTEX-COVER problem and I had a question about a specific set of instructions and how to execute them by hand.
Background Information
This works out to look like the below as a graph (please excuse the grid lines)
The part... |
This qns is from my school's exam paper.
Context: In a game of Hangman, player tries to uncover a hidden word by guessing the letters in the word. Assume all words and letters are lowercase.
The function remove takes as inputs 2 strings, a letter and a word, and outputs the word with all occurrences of letter removed.... |
I have a variation the shortest path problem, formulated as an ILP.
The system model is as follows:
There is a connected digraph consisting of 20 nodes, with each link having an associated weight delay which is a float. The graph is modeled as a python networkx object as follows:
g = nx.DiGraph(nx.barabasi_albert_gra... |
Given two NP-Complete languages A and B, show that the language:
$L = A\bigoplus B =\{a\bigoplus b \mid a \in A, b \in B, |a|=|b|\}$
is not necessarily NP-Complete.
Remember $a\bigoplus b$ when $|a|=|b|$ gives 0 when they have the same digit and 1 otherwise.
Example: 0110$\bigoplus$ 0101 = 0011
I have tried to solve ... |
I studied that Integer problems are properly NP-HARD problems. I know that NP-HARD include problems that arent solvable, like the halting problem.
This mean that there are instances of Integer problems that arent solvable ?
|
Why is integer programming (IP) more difficult than (real) linear programming (LP)?
I searched a lot on the web, but I didn't find an answer.
|
Scenario
Consider one or more curved shapes in 2D space, clipped to a rectangular viewport. For example:
Unfortunately, data that would describe these shapes precisely, is not available.
Input data
All that is available are the intersections of the shapes with a few horizonal and vertical lines, sampled at coarse inte... |
For a while now, I have been struggling to find a source explaining the complexity of the following 2 elementary operations
Calculating the $n^\text{th}$ root of an integer $x$,
$$
\sqrt[\leftroot{-3}\uproot{3}n]{x}
$$
Checking whether
$$
a \equiv b \mod r
$$
for $a,b,r \in \mathbb{N}$
I now think I may have come clo... |
I organize amateur tournaments every week with random players.
Every week, players sign up, and I get a list with:
Name
Rank (1, 2 or 3)
Role (s) (DPS, TANK and HEALER)
I need to get balanced teams of 6.
Ideally, there are 2 DPS, 2 TANKS and 2 HEALERS but in practice there are not enough healers and I have to make 3 ... |
$T(n)=\sqrt{2T(n-1)}$
what will be the time complexity if $T(n)$ is given as this?
I tried substitution but no result was reached.
|
I have made an algorithm by which I recently finished counting solutions to 28 queens problem and I have the number. How do I verify that it is correct?
I have heard that it can be done in quadratic time. That is, given a solution to an nqueen problem it can be verified in polynomial time. I would like to know the algo... |
Can I get help to give an analysis of the running time Big-O? I'm not sure if all my answers are correct.
I got for a) $ O(n)$, b) $O(n^3)$, c) $O(n^{1/2})$ and d) $O(log(n))$
(a)
sum=0;
for ( i =0; i<n ; i +=10)
sum++;
(b)
sum=0;
for ( i =0; i<n*n;++ i )
... |
A $64$-bit computer has a virtual mem space of $2^{64}$ bytes and the computer also uses memory paging with size of $2^7$ $(128)$ bytes.
Work out the bits of the memory address which are used for the page number?
No. of bits of the memory address which are used for the offset?
Can someone explain how I would go about ... |
I am trying to make a programming language for the first time and wonder how it handles whitespace. I can see CFG by default seem to just ignore whitespaces, but what if I want it to use it sometimes? Like when you declare an int people usually write "int b", and the whitespace separate these two items, but if I write ... |
I have a very complex search problem which I can't wrap my head around:
While reading please remember I'm not asking for a specific solution! Only a general approach how such a problem can be solved and what kinds of algorithms to use (more below)
I have a sphere with around 120 000 weighted and named points mapped ... |
I am going through beta reduction in lambda calculus . And beta reduction to my understanding is an act of substitution like in the following :
$ (\lambda x.P) M $ is said to be beta reduced to : $ [M/x]P $
So then my course was led to encoding the Booleans in lambda calculus . And the following two expressions were... |
I am trying to research a new topic using machine learning. The problem is, I have a very small dataset, consisting of 5 months of data. I have been told that my dataset is too small. I want to know if there is any way of making my dataset larger, using an automated tool/algorithm I can implement fast, and more than th... |
Suppose I have a directed graph $G = (V,E)$. Suppose that $v_1$ and $v_2$ are two nodes in the graph. Am I correct the number of simple paths (that is, it has no cycles) from $v_1$ to $v_2$ is $O(E)$? Is it true for the special case of directed acyclic graphs?
Bob
|
so i know that the set of all strings over any finite alphabet is countable, but this question is different
so if our language is set of all regular languages(or set of all regular expressions) on a specific and finite alphabet, then is this set regular? if not then what is it? CFL?
i really can't come up with any FA t... |
I have a lot of numerical vectors, each of dimension 1000. I would like to compare them according to their Pearson distance. This works fine but comparing all vectors to each other is quadratic time and too slow. Ideally I would like to be able to perform efficient approximate nearest neighbour searches instead.
If I... |
Given directed graph G, vertex s, and all v∈V(G) are 1 edge distant from vertex s.
Is it possible to find a specific edges order (from E(G)) such that a single iteration of Bellman Ford pass over these edges in this order finds all the shortest paths (in weight) from vertex s to all vertices?
I couldn't find a countere... |
I've just hashed up the following hair-brained idea of how to sort n-tuples of integers, as demonstrated below with a set of 3-tuples:
[ 4 , 1 , 3 ]
[ 1 , 2 , 1 ]
[ 2 , 2 , 1 ]
[ 2 , 1 , 1 ]
[ 1 , 1 , 1 ]
[ 2 , 1 , 2 ]
[ 3 , 1 , 3 ]
[ 1 , 2 , 2 ]
[ 1 , 1 , 3 ]
[ 1 , 1 , 2 ]
[ 3 , 1 , 1 ]
[ 3 , 1 , 4 ]
First "partition... |
I am going through the following lecture notes on lambda calculus by Barendregt and Barendsen :
http://www.cse.chalmers.se/research/group/logic/TypesSS05/Extra/geuvers.pdf
Here at page 12 , after introducing fixed point theorem a small exercise which is an attempt to prove the following has been posted :
$ \exists G \... |
Let $G$ be a undirected edge-weighted tree, where all edge weights are positive. A move of an edge $\{u,v\} \in E(G)$ is the operation of deletion of $\{u,v\}$ and the addition of a new edge $\{x,y\}$, where $x,y \in V(G)$. Intuitively, we can think of the move meaning the deletion of an edge, and the re-insertion of i... |
I'm stuck with another homework question - "Design an NFA with $n$ states such that the corresponding equivalent DFA constructed using the subset-construction method has less than $n$ states."
What I have learnt is that using subset (or powerset) construction, you can convert a given NFA with $n$ states to it's equival... |
We have to prove that the language represented having equal number of $0$'s and $1$'s and starting with a $0$ is not regular.
Attempt: We assume that the language is regular. Thus it would satisfy the pumping lemma. Assume the pumping length to be $p$. Let us take the string would be length $p+1$ as $0 0^p 1^{p+1}$. N... |
Trying to figure out how to make a deterministic single-tape Turing machine for the language of words comprising as many $a$'s as $b$'s.
I am very confused, because I can't figure out how I would keep track of how many $a$'s and $b$'s there would be. The method for finding $a^nb^n$ goes right and back left to do this b... |
I want to prove in which relation the two functions stand to each other with the help of a proof. But how?
|
I have been strugling with this LL(1) transformation for far longer than expected and am getting quite desperate. We are given a grammar $ G = \left\{V_N, V_T, S, \Phi \right\}$, with the non-terminal set $V_N = \left\{S\right\}$, terminal set $V_T = \left\{\underline{o}, \underline{l}, \underline{r}, \underline{i}\rig... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.