instruction stringlengths 35 29.1k |
|---|
I thought about this problem for a while now and am not able to find a solution for it, be it a direct algorithm or a reduction to a known problem, so I'm asking here:
Suppose you have a matrix $A\in\mathbb{N}^{n\times m}$ with integer entries. I want to partition the columns of $A$ into $k$ groups (or $k$ matrices), s... |
From what I know there is no alternate way that NL is not equal to PSPACE. If possible can you link a paper or some book recommendations to show that this is the case.
Thank You
Akash
|
Ideally I need a to calculate the binomial coefficient ${p \choose n}$. But since the fastest algorithm to do this is an $\mathcal{O}(n)$ algorithm I would look to do something different. I don't really care for the exact number as long as it is reasonably close and is at least equal or larger then the actual number. M... |
Suppose we have two sets of strings XS and YS such that set XS is described by grammar GX and YS is described by grammar GY.
We want an algorithm which accepts GX and Gy as inputs. The algorithm will return true if the intersection of sets XS and YS is non-empty and will return false otherwise. We do not need to know e... |
Consider the succinct versions of the P-complete problems as a Boolean circuit which represents its input in exponential more succinct ways. Could these succinct versions are in P or out of P?
|
Let GRAPHS be the set of all directed graphs.
Is there a set of strings STRYNGS such that there exists a bijection between
GRAPHS and STRYNGS?
The canonical definition of directed graph comes to mind:
An ordered pair of two sets, (V, E) such that V is a set of vertices
and E is a set of ordered pairs of ele... |
I would like an algorithm that can identify repeated parts of big stack traces like this:
java.lang.StackOverflowError
at transform.Erasure$Eraser.typed1(Erasure.scala:789)
at typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
at typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
at typechecker.Typers$Typer.... |
As part of some blockchain-related research I am currently undertaking, the notion of using blockchains for a variety of real-world applications are thrown about loosely.
Therefore, I propose the following questions:
What important/crucial real-world applications use blockchain?
To add on to the first question, more s... |
We have an undirected graph, with a weight function and a minimum cut. If you raise the weights of all the edges by one, the minimum cut remains minimal even with the new weights.
I know this is refutation, but I could not find a good example of refutation.
I would be happy if you would help me.
|
I was given the following grammar
$S \rightarrow S ( S ) S\mid \epsilon$
First I was asked to eliminate left recursion, yielding me the following :
$S \rightarrow S' $
$S' \rightarrow (S)SS' \mid \epsilon$
I was then asked If the grammar is LL(1). So I computed the FIRST and FOLLOW sets shown below:
$\mathrm... |
I know that complement of a language that is recursively enumerable, but not recursive, is definitely not recursively enumerable (or unrecognizable). So my question is what can be said about the complement of an unrecognizable language?
|
Recently in class we learned how to delete a node from a binary search tree. Since in a binary search tree, each node can have at most 2 nodes, there are 3 cases of deletion.
Case 1: The node is a leaf node. In that case you can simply delete the pointer to that node and free up the memory for that.
Case 2: The node h... |
I am trying to understand the runtime complexity of the below code in terms of n.
I know that it is $Θ(n^{4/3})$, but I don't get why.
I thought the outer loop runs $log(n)$ times, the second one runs $n^{1/3}$ times and the innermost runs $O(log(n))$ times as it runs $i$ times and $i$ is at most $log(n)$. This would a... |
A two dimensional array is stored in column major form in memory if the elements are stored in the following sequence $$A[0][0] A[1][0] A[2][0]...A[n_1-1][0] ... A[0][1] A[1][1] ... A[n_1-1][1] .... A[0][n_2-1]...A[n_1-1][n_2-1]$$
The left most index varies most rapidly if we look at the looping changes.
For a particul... |
In which of the following cases a process executing in user model is required to enter into the OS mode?
(a) Decreasing the value of unsigned integer value in a register to less than 0
(b) Accessing general purpose register
(c) Executing printf()
(d) Adding values in two registers using ADD
In my opinion, both (c) and ... |
Given the multiset $S$ where the elements are defined by the binomial coefficient ${n \choose k}$ where $n \in \mathbb{N}$ and $
0\leq k \leq n$ find the partition $P$ of $S$ such that the sum of elements in the subsets is smaller or equal to the largest binomial coefficient and the number of subsets in the partition i... |
I am trying to solve one problem. Please refer complete problem statement before proceeding.
You are given a road network, with N cities and M bi-directional
roads. Each road has some positive amount of tax associated to
it,meaning if there is a road connecting cities A and B with tax C,
you will need to pay C rupees ... |
Assume that a file is written using write(fd, buf, K) system calls, where fd is the file descriptor, and K, the number of files to be written to the current file offset which is a multiple of the disk block size D. The total number of disk block writes required to be executed before the system call returns is:
(a) is e... |
I have an $n \times n$ symmetric matrix, and I would like to compute its square in as small a circuit complexity as possible. It's sparse: there are $\sqrt{n}$ nonzero entries in each row/column, so the input will be sparse by the output will be nearly a density of $1$. A normal sparse multiplication algorithm would ta... |
I assume Dynamic Programming can be used only when the corresponding subproblems form a Directed Acyclic Graph, otherwise you're stuck in a loop.
Is this reasoning correct or is there more to it?
|
I've been studying the closest pair algorithm lately and I found this to be an extremely good and intuitive resource: http://serverbob.3x.ro/IA/DDU0221.html. It is also explained in section 33.4, "Finding the closest pair of points" of introduction to algorithms, third edition by CLRS.
I understand why I'd need 7 comp... |
The paper is available here:
https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf
The 1st paragraph of lemma 3's proof says
In other words,if event e is applicable to config C,and E is any config reachable from C without applying e,then e is applicable to E.
I can follow the whole proof except the above claim. I... |
The beauty of a number is defined as follows :-
public int beauty(long number)
{
int count = 0;
while( number > 0 )
{
count += (number & 1);
number = number / 2;
}
return count;
}
Given X, we need to find the minimum N such that the sum of beauty of all numbers from 1 to N ... |
when constructing the SLR(1) table for some grammar I need to compute the FOLLOW set for all terminals in order to decide where and when to reduce.
Do I compute theme for the augmented grammar or the original one?
Is there even a difference?
|
Rice-Shapiro theorem states that
version A
Let $\Gamma$ be a set of computably enumerable sets, and $I = \{e : W_e \in \Gamma\}$ its index set in some admissible enumeration of c.e sets. If $I$ is c.e, then for all $x$, $x \in I$ if and only if there is $y \in I$ such that $W_y$ is a finite subset of $W_x$.
Or equival... |
The depth-first and breadth-first algorithms for traversing graphs use a flag (or color) to mark nodes when they are visited. For example some forms of the algorithms use white/grey/black as colors. When the traversal is complete all the nodes in the graph are black.
None of the material I have been reading on these a... |
In the book Multiple View Geometry in Computer Vision Hartley and Zisserman write that given a stereo image pair, the viewed scene can only be reconstructed under projective ambiguity, i.e. is a projective transformation away from the true scene, no matter how many corresponding landmark matches are given.
When using B... |
I wonder how does particular process gets CPU time or resources whenever it's
required to execute some instructions? When a process is in the idle state or waiting for input, it's not occupying the CPU but, if it is suddenly found that there is an instruction that requires CPU time, who tells that to the CPU?
|
I want to understand Binary Search for 2 element list made of 1,2. I draw a tree as below. Is it correct?
If I want to search for an element 2, it will make 2 comparisons. If I want to search for an element 22, it will also make 2 comparisons. But according to formula Θ(lg n), with n=2, it should make only one compari... |
I currently have a problem with the following question:
Let $L = \{ \langle M \rangle \mid \exists w: \text{$M$ halts for $w$ in at most $|w|^3$ steps} \}$.
Construct an NTM (non-deterministic Turing machine) that decides $L$.
My idea was to simulate every possible input of length $\le|w|^3$ on a given TM $M$ by using ... |
I was looking for an algorithm that will give the best fit arrangement of package items in a box. For example given a large box and various items with multiple shapes(can be rectangle, square and so on and so forth), how will I arrange the items so that it will fit in the box? DO we have already an algorithm for that? ... |
Consider a network with five nodes, N1 to N5, as shown as below.
The network uses a Distance Vector Routing protocol. Once the routes have been stabilized, the distance vectors at different nodes are as follows.
N1: (0,1,7,8,4)
N2: (1,0,6,7,3)
N3: (7,6,0,2,6)
N4: (8,7,2,0,4)
N5: (4,3,6,4,0)
Each distance vector is the... |
I'm currently reading Types and Programming Languages by Benjamin C. Pierce and just arrived at chapter 21 Metatheory of Recursive Types.
Prior to this chapter I found the book challenging but comprehensible, but I'm lost on this chapter. Almost none of the definition make intuitively sense to me. Are there any more a... |
See example below:
reduce to normal form:
(λ c . (λ a . (λ d . (λ h . (h (d (a (a (λ z y . y))) (d (a (a (λ f x . x))) (a (a (a (λ z x . x)))))) (h (a (a (λ z y . y))) (a (a (a (λ z x . x))))))) (λ n m . n (d m) (λ z y . y))) (λ n m . n a m)) (λ n z . c (n z) z)) (λ z g x . z (g x))
Wikipedia says that to be in normal ... |
I'm studying dimensionality reduction (SVD in particular), and I saw the following question:
Assume we have a vector $x \in \mathbb R^d$, and consider $F(x)=s^t x$ , where
$s$ is a $d$-dimensional random vector with entries drawn uniformly
independently from $[-1,1]$.
What is the value of $\mathbb E[F(x)^2]$?
I'... |
I'm struggling with a divide and conquer algorithm for the Tennis Tournament (or Round Robin tournament).
I can successfully build a timetable if $N$ (number of players) is $2^k=N$, but Brassard-Bratley, Fundamentals of Algorithmics suggests that is possible to build a divide and conquer algorithm for an arbitrary numb... |
In class, I've heard hexadecimal representation for IEEE754 mentioned and described in 32bit length as a format that consists of one bit for sign, normalized 6-digit fraction (with an implied leading zero) and biased (+64) 7bit exponent, leading me to believe it's not just a made up spec.
However, googling the actual ... |
The depth of a circuit is the maximal length of a path from an input gate to the output gate of the circuit [Reference]
Question: What is the relation between the depth of a circuit and hardware implementation of the circuit. In fact, I want to ask this question, why the low depth of a circuit results in the circuit h... |
In "Typing Haskell in Haskell", by Mark P. Jones, is provided a sort of haskell-like specification for typing Haskell. As stated in this paper, binding groups is a area "neglected in most theoretical treatments of type inference". Jones provided inference and checking algorithms for this syntactic construct, but it's t... |
I'm reading this article.
In particular I'm having some trouble trying to replicate the results of the first image in that article.
For x=9, the graph says that the probability is 0.20 aprox. But from my calculations I get something different. After some thought I think I may be misinterpreting the idea of the calculat... |
I'm taking the Algorithms: Design and Analysis II class, one of the questions asks:
Which of the following statements is true?
Consider a TSP instance in which every edge cost is either 1 or 2. Then an optimal tour can be computed in polynomial time.
Consider a TSP instance in which every edge cost is negative. The d... |
I'm taking the Algorithms: Design and Analysis II class, one of the questions asks:
Assume that P ≠ NP. Consider undirected graphs with nonnegative edge
lengths. Which of the following problems can be solved in polynomial
time?
Hint: The Hamiltonian path problem is: given an undirected graph with
n vertices, dec... |
I'm new to studying formal languages, so apologies if I get a lot of basic stuff wrong, but I'm trying to get an intuitive understanding of why the difference between two Recursively Enumerable languages (A and B, say) is not itself RE? I.e. why for A-B = Z, Z is not RE?
The basic set notation and maths I understand, b... |
I'm new to the study of formal languages, and I wondered if languages of a certain type are objectively of that type (RE, REC, regular, etc), or if their type varies on their context? I had this thought:
If I had a language A that is recursive for some Turing Machine, TM(A), would it be possible to design another TM, T... |
I have read that the number of multiplexers required is equal to the number of bits in the TAG field. Is it true? If yes then why?
I know that the size of each multiplexer has to be S to 1, where S is the number of sets in a k-way associative cache (For Direct Mapped, no. of sets = no. of lines). That's because we have... |
I have a problem with this exercise. This is the LALR(1) parsing table for the grammar G. How can i get the productions of G?
Thanks :)
|
I know that this problem is a known NP-Complete problem, but I'm curious as to why a particular algorithm won't work. Given a graph $G = (V,E)$, and edge weights $w(e)$, why can we not create a new graph $G' = (V,E')$, and flip the sign of each edge weight, i.e set the weight of each edge $e' \in E'$ to $w(e') = 0-w(e)... |
PDA's are usually defined using the 7-tuple convention.
$M=(Q, \Sigma, \Gamma, \delta, q_{0}, Z, F)$
F is the set of accepting states.
I want to design a PDA accepting by empty stack, so using this notation makes no sense, as I don't need F and I want to make the acceptance condition clear.
How is this usually done? C... |
I am trying to find a solution to the ex. 4.6-2 of the Introduction to Algorithms by Cormen, Leiserson, Rivest, Stein (the third edition). It requires, for recurrence relations $T(n)=aT(n/b)+f(n)$ where $a\geq 1, b > 1$, $n$ is an exact power of $b$ and $f(n)$ is an asymptotically positive function, to prove that if $... |
I'm trying to understand the question in my title in an intuitive way:
If I have an RE language A, then some TM, say TM(A) accepts on it. If I take a subset of A, say A2, then all elements of A2 will cause TM(A) to halt in the accept state.
However, is it in general possible to then create a TM for A2, say TM(A2), suc... |
I was tutoring a grade 4 student about CPU and I got confused as there are also the other units of a cpu like arithmetic and logic unit and memory unit. So, is the above statement actually true even if ALU is the one which does the arithmetic and logical operations?
|
I think I'm able to prove NTIME($n^\alpha$) $\subset$ EXPTIME for arbitrary $\alpha$.
Is this a new result?
If it was, would there be a way to deduce NP $\subset$ EXPTIME from it?
|
As I am studying the application of Buchi automata in formal software verification, I am interested in the computational complexity (or links to papers) for the algorithms used to solve the problem in practice.
Let me recall the mathematical intuition behind model checking using these techniques.
Buchi automata are the... |
I know that once I have a graph or decision tree representation of a problem, there are many different ways I can get a computer to solve the problem. They're called search algorithms, and go by names such as Depth-First Search, or Breadth-First Search or A* Search, etc.
However, I have the following game that I would ... |
We'll say $P$ is a symmetric property if $\forall x\in \{0,1\}^n:x\in P\iff \forall \pi \in S(n): f_{\pi }(x)\in P$ where $\forall i\in [n]:f_\pi (x)_i=x_{\pi(i)}$.
Given a symmetric property $P$ we want to find an algorithm which tests $P$, meaning given a vector $x\in \{0,1\}^n$ we want to say if $x\in P$ in sublinea... |
Say I have a kiln for making castings. There are 3 shapes. I need to produce the following castings:
102 of A
364 of B
70 of C
I can put 50 molds in the kiln at a time.
I can have 75 molds made in any combination.
First, what is the optimal combination of molds to make.
Second, what is the schedule to make the castings... |
In the 1ML – Core and Modules United (F-ing First-Class Modules) paper, the author gives the following example for why module types do not form a lattice under subtyping:
f1 : {type t a; x : t int} → int
f2 : {type t a; x : int} → int
g = if condition then f1 else f2
There are at least two possible types for g:
g... |
In a multi-armed bandit, the objective is to maximize the expected cumulative reward. This objective is usually (equivalently?) stated in terms of expected cumulative regret.
Question: Why not just deal with the reward? Why formulate the objective in terms of regret?
|
I have seen the parameterization of the very well known problems like vertex cover, hitting set etc which are NP-hard (NP-complete precisely). Many researchers in the past have been studied the parameterization of these problems. My question is why researcher's don't study the parameterizations of the problems unlikel... |
A teacher at a school has to do this on a regular basis. Let's say 12 students should be divided into either 4 groups of 3, or 3 groups og 4.
Each student can pick up to 3 other students that person would most rather be with.
I tried to set this up as an undirected weighted graph, and implement shortest path algorit... |
I'm doing a research on a finite horizon decision problem with $t=1,\dots,40$ periods. In every time step $t$, the (only) agent has to chose an action $a(t) \in A(t)$, while the agent is in state $s(t) \in S(t)$. The chosen action $a(t)$ in state $s(t)$ affects the transition to the following state $s(t+1)$. So there i... |
Like turing machine, but your tape is finite. To make a program valid it should have a limit result when the length of tape tends to infinity.
Whether the tape has two ends or is cyclic doesn't matter, for placing a special dot on cyclic tape is like a two-end tape, and running back at the end on a two-end tape makrs c... |
We know how DSU(Disjoint Set Union) can be used to find the connectivity between two users. However, I was wondering if it can be used with a Segment Tree.
Let me explain my idea further. Suppose we have $N$ people, numbered from $1$ to $N$. I have a list of input specifying if two people are friends or not. Running a ... |
Would not know if this is the best SE website to ask, but I could not find anything better, especially because the answer might involve a fair amount of computer science (although this is an hypothesis).
I hold a MSc. in Statistics, and thus have extensively explored Gaussian Mixture Models. That's why, upon buying my ... |
Is the capability of every programming language the same since it is eventually translated into machine code. Python, Java etc. are all together instructions the CPU is going to process. So, you could (theoretically) do the exact same thing with ever language, don't you?
|
I'm reading the book "Lessons in Scientific Computing" by Schoerghofer and it says:
If x and y are real numbers of the same sign,
their sum x + y has an absolute error that adds the two individual absolute
errors, and the relative error is at most as large as the relative error of x or y. Hence, adding them is ins... |
5 stage pipline
addi $t1,$zero,0x30
lw $t2,0($t1)
sw $t2,0xff18($zero)
addi $t2,$zero,100
Question is to find hazards existing in the code and the answer is:
Hazard 1: Between lines 1 and 2. Register t1. Solved using
forwarding.
Hazard 2: Between lines 2 and 3. Register t2. Solved using
forwarding.
But I found ... |
I am familiar with the basics (and perhaps a substantial amount of basics) of imitation learning and reinforcement learning. In IL (imitation), we take demonstrations from an assumed expert, which we also assume has the most efficient policy.
What does this statement mean: This will train a policy network using the ex... |
I have a collection of subsets $\{S_1,\ldots,S_m\}$ where each $S_i\subset \{1,\ldots,n\}$. I would like to cover the maximum number of elements from $\{1,\ldots,n\}$ by choosing a single element from each $S_i$. What is the optimal way to do this?
For example, say I have $S_1=\{1\}$ and $S_2=\{2,3\}$ and $S_3=\{3\}$ a... |
i am trying to find a cfg for this cfl
L = $\{ w \mid w \text{ has an equal number of 0's and 1's} \}$
is there a way to count the number of 0's or 1's in the string?
|
If the question above makes any sense!
|
According to Wikipedia:
Shannon's entropy measures the information contained in a message as opposed to the portion of the message that is determined (or predictable). Examples of the latter include redundancy in language structure or statistical properties relating to the occurrence frequencies of letter or word pair... |
Problem statement: Solve $T(n)$ for $T(n)=2T(n-1)+n$, $n > 1$, and $T(1)=1$.
My attempt: I tried back substituting but I am unable to find a general pattern:
$$\begin{align*}
T(n) &=2^2 T(n-2)+3n-2 \\
&=2^3 T(n-3)+7n-10 \\
&=2^4 T(n-4)+15n-34 \\
&=\cdots
\end{align*}$$
|
Here is another GeeksforGeeks problem that asks how to find the shortest Uncommon Subsequence of 2 strings?
For example,
Input : S = “babab” T = “babba”
Output : 3The subsequence “aab” of length 3 is
present in S but not in T.
Input : S = “abb” T = “abab”
Output : -1
There is no subsequence that is present
in... |
I hope you can help me -
Given a lot of sets containing integers,
I'd like for any two sets, to quickly (i.e. O(1)) ask whether they intersect.
Note that I don't need the exact intersection, rather just a yes/no answer.
Also, I am fine with some false-positives.
Also, the representation of the sets should be space-... |
Let L be a set of recursive funtions with $L = \{i\in \mathbb{N}|f_i\space is\space surjective\}$ where $i$ is a gödel number of f.Is $L\in RE,\space coRE$?
I can't think of a way to show either of the two.
|
I built my own thermostat that controls the boiler heater for the radiant floor heating in my house and I would like to develop / implement a smarter temperature control algorithm. What I am specifically interested in is the ability to predict when to turn on the heating so that a certain temperature is achieved accord... |
I am trying to solve this recurrence relation with two variables:
$$T(n, k) = T(n - 1, k - 1) + T(n - 1, k)$$
The base cases are:
$T(n, k) = 1$ if $k = 0$
$T(n, k) = 0$ if $k > n$
I was wondering if standard techniques like characteristic polynomial and generating function would work in this situation.
|
From Algorithms 4th:
Quicksort with 3-way partitioning uses ~$(2\ln 2)NH$ compares to sort $N$ items, where $H$ is the Shannon entropy, defined from the frequencies of key values.
$ H = -(p_{1}\log_{2}{p_1} + p_{2}\log_{2}{p_2} + .... + p_{k}\log_{2}{p_k}) $
Given $N$ keys with $k$ distinct key values, for each $i$ ... |
I'm trying to better understand benchmarks that are commonly used for computer hardware. I've been unable to find an answer to this question. Extra credit if you can provide a breakdown in percentage per instruction of a blender benchmark.
|
Graph invariant is a property that holds for two isomorphic graphs.
For example, degree sequence is graph invariant. We can write
$d(G) \ne d(G') \Rightarrow G \ncong G'$, although $d(G) = d(G')$ does not mean that $G \cong G'$.
I search for a name (and maybe some existing examples) for complementary graph invariant. ... |
Mathematical Physics is a well defined scientific fields that deals with the application of mathematics , mathematical tools , and mathematical methods in the theories and the problems of physics.
Is there a well defined scientific field that deals with the application of mathematics , mathematical tools , and mathemat... |
Show that if the transitive closure can be computed in T(|V |) time then
BMM can be solved in O(T(3n)) time.
I didn't understand the proof in the context of building edges. I added the proof
i tried to write an example
Michael P. Kim, Editted by: Bill Kuszmaul people.csail.mit.edu/virgi/6.890/lecture3.pdf
Thanks
|
I have seen some people make an argument that given the fact that Context Free Languages are proper subset of REC which is closed under complementation thus complement of a CFL must be in REC. I cannot wrap my head around this argument.
What I know about a CFL(say L) is that the complement of this CFL(say L') need not ... |
If
Capacity = 24 KiB Associativity = 6 Line Size = 32 B
As far as I know:
$$Capacity = Associtivity * Line Size * Sets$$
so
$24576 = 32 * 6 * Sets$
$Sets = 128 = 2^7$
thus 7 least significant bits are needed to identify set number.
Am I doing it correctly?
|
I'm considering turing machines with tape alphabet equal to $\{0,1\}$ and the blank symbol equal to $0$. Is there a name for this type of Turing machines? Isn't this type the one computers are based on?
|
N-Queens problem - maximum number of function calls.
We say, that a backtracking algorithm (code below) 'checks' a setup of N queens, when the function isFree(n-1, y) is called for $0\leq y < n$ (so we check a possibility of placing n-th queen to already set n-1 queens). Justify that for $n\geq 4$ algorithm checks no ... |
How to efficiently ¹⁾ choose from a set of numbers $S$, a given number $n$ of disjoint subsets, each with a given sum $K$ of chosen elements?
¹⁾ Not as in $P$, I just want something smarter than $O(n^{|S|})$.
Ex. Let’s say we want $n=3$ subsets with the sum of $K=3$ chosen from $S=[1,1,1,2,2,2]$.
The correct solution ... |
In the proof of the correctness of Dijkstra algorithm, there is a lemma stating as follow:
Let u be v's predecessor on a shortest path P:s->...->u->v from s to
v. Then, If d(u) = δ(s,u) and edge (u, v) is relaxed, we have d(v) =
δ(s,v), where the funciton δ(x, y) denotes the minimum path weight
from x to y.
I ... |
I have a few knapsacks of given capacities.
Also, much more items of given weights and values.
As usual, items have to be put into knapsacks to maximize profit.
What is different from a standard MKP, is that there’s a requirement
that each knapsack has to be filled completely. I.e. the sum of
weights of its items has ... |
To experiment, I implemented a discrete HMM; the transition matrix and emission model are randomly, uniformly generated. Then, a sequence of random states and emissions are produced by the HMM. Then I run smoothing (forward-backward algorithm) to identify the most likely states at each time. Finally I run the viterbi a... |
The smallest grammar problem is to find a single-string CFG. So given a finite list of language samples, known to all lie in some CFG, can we, using the smallest grammars (approximated) of each respective sample, compute an approximate smallest CFG for the language?
I want to make a parser generator that automatically... |
I need suggestions for algorithm for Pseudo random number generators that will produce a near gaussian distribution (bell curve) for automatically generating test data. I know that PRNG produce recurring 'patterns, but google has revealed none that expressively produce gaussian distributions. Do you have an recommend... |
Is it possible to find $a$ or $b$ given that $a \oplus b = c$ and $c \oplus b = a$ when I only have the value of $b$?
|
I have seen a few standard hyphenation algorithms for non-monospaced fonts, where you are free to squeeze and separate words and letters, but I haven't seen any related to monospaced fonts specifically. Wondering if there are any good resources on the topic. Such as how to best properties to use when hyphenating a mono... |
I'm curious about the right way to characterize symbol $A$ in a CFG like this one:
$$
\begin{align*}
A &\to A B\\
A &\to x\\
B &\to y\\
B &\to \varepsilon
\end{align*}
$$
$B$ is certainly nullable. However, should $A$ be considered nullable? It feels like the answer is probably "no" (and most first-follow implementatio... |
Descriptive complexity is a useful way to free yourself from computational considerations when studying complexity. One of those considerations is the encoding of the structures you are working on.
However, the way we usually see integers in descriptive complexity is exactly the same way we're used to with Turing machi... |
How to transform a decimal of $\frac{23}{6}$ into binary?
$\frac{23}{6}$ is equal to $3.83333\bar{33}$, where the digit $3$s are repeated forever.
I do know how to translate finite decimal into binary, but
is there any procedure to translate such Infinite decimal like $\frac{23}{6}$ into binary?
Any hint is appreciate... |
Given a set of values like [4, 8, 1, 5, 2, 6, 9, 2, 3, 5, 11, 9], how can I find the largest positive interval between any two of them? For example in the one I just listed, index 0 to index 1 has an interval of 4 because 8 - 4 = 4. But the largest positive interval is between index 2 and index 10, because 11 - 1 = 10.... |
Suppose we have a decidable language B (there exists some TM that decides it). Suppose we have another TM M which only recognizes B but does not decide it - there are words not in B that M doesn't halt on (for words not in B M might either reject or not halt).
Let A = {w | M does not halt on the word w}.
Which of the f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.