instruction stringlengths 35 29.1k |
|---|
I have a 3D scan of an object with multiple faces, for example a standard 6 face die. The scan is a point cloud file of the die.
I am able to convert the point cloud into a mesh and retrieve faces from the mesh.
But what I'm not able to figure out is how to smooth the faces so instead of having thousands of faces I end... |
It is well known that classical regexes recognize exactly regular languages. But in practice, many programming languages have extensions to the regex syntax which potentially broaden the field of recognized languages. (For example, recursive regexes, lookarounds, ...)
Are there any papers or is there literature that ex... |
I want to optimally assign $m$ jobs equally to $n$ workers, where $m>n$. Assume $m = an$ for some integer $a$, so that each worker must get exactly $a$ jobs. (The rectangular linear assignment problem, as defined here). I know this can be done by duplicating the workers to have $a$ copies of each, and then solving usin... |
I am asking this question because for some reason ascii codes from range 128 - 255 have a size of 2 bytes but their composition is 8 bits which makes them a "byte". So I am confused as to why this certain ranges have 2 bytes when all of them only consist of 8 bits for example :
127 → 01111111 (1 byte)
>>> len(chr(127).... |
Just a fun puzzle that occurred to me. Given the function below which converts decimal integers to binary strings, is it possible to predict which decimal numbers will lead to binary strings with no zeros?
I.e. is there a way to ensure this function only returns strings of 1s without building the string and checking?
s... |
A sequence of positive real numbers S1, S2, S3, …, SN is called a superincreasing sequence if every element of the sequence is greater than the sum of all the previous elements in the sequence. E.g: 1, 3, 6, 13, 27, 52.
Given a sorted list A, I want to iterate over all combinations of A, which are superincreasing.
How ... |
I am preparing a list of algorithms for which big theta expression for (worst case) runtime is not known. This is for a class to demonstrate the point that tight analysis of an algorithm may not be easy at times. I am interested practically useful and hopefully simple (not required though) algorithms - importantly the ... |
In my problem of interest I have an arbitrary, finite set $S \subset \mathbb{Z}^3$. And I would like to cover $S$ with a set $C \subset \{T | T \subset \mathbb{Z}^3 \textrm{ is an axis-aligned cube of size } \ell\}$ of minimal cardinality.
I know there exist approximation algorithms with logarithmic-ish approximation f... |
Suppose I have L bits. First, I want to multiply the L bits with L orthogonal codes of length N, and then I want to add all the vectors.
So, first, I have to do a scalar multiplication with a vector and then an addition. Please refer to the figure for more clarity.
What will be the Computational Complexity (in terms o... |
Entries need to be stored in a database. There is Insert(entry) RPC, which adds a new entry in a database, and Delete(entry) RPC, which deletes an existing entry from a database. Neither RPC can be blocking, because that adds undesired latency. Both RPCs are scheduled to run asynchronously when required, from different... |
In almost all websites and papers, the complexity of LP problem is given in the number of iterations (such as https://or.stackexchange.com/a/5924). I was wondering if there are any references where worst-case "time" complexity is discussed. Like, the time to solve LP problem is bounded above by...?
|
While doing the exercise about questions about transforming NPDA to CFG, I encountered the following question:
Find a CFG for the following NPDA $M = (\{q_0, q_1\}, \{a, b\}, \{A, z\}, \delta, q_0, z, \{q_1\})$, with transitions:
$$
\begin{align}
\delta(q_0, a, z) &= \{(q_0, Az)\} \\
\delta(q_0, b, A) &= \{(q_0, AA)\} ... |
One of the most compelling arguments people cite for believing $P \ne NP$ is that there are many problems of both theoretical and practical significance for which an efficient solution has eluded many intelligent people's concerted efforts for a very long period of time.
The strength of this argument seems to depend on... |
Given computable function $f : LispTerm \rightarrow LispTerm$ is it possible to implement it in Lisp?
The $LispTerm$ is any term that is constructed using cons, nil and set-car!, set-cdr! (because it can be cyclic).
Of course Lisp is Turing-Complete, but that does not immediately imply an answer because Lisp would be T... |
For any grammar in Greibach normal form, every sentential form obtained from S by a partial left-most derivation is of the form xy with x terminals and y variables.
I think that this can be proven inductively based on the length of the derivation.
Base case: length 1
S -> a with 'a' being a terminal. This follows from ... |
I am looking at some social network analysis and I need to do link prediction. By link prediction I mean that I only have a subset of the relationships in the network, and I need to make predictions about the unseen relationships.
I am familiar with the more traditional or common methods for link prediction from
simple... |
I am a newbie to the world of algorithms design and currently working on a algorithm which is related to cell-phone user associating with cell-phone tower. Let $\mathcal{K} = \{1,\dots,K\}$ be set of cell-phone users and $\mathcal{J} = \{1,\dots,J\}$ be set of cell-phone towers. Let $k$ and $j$ be index of cell-phone u... |
Preparata & Shamos in "Convex Hulls: Basic Algorithms" (1985), give a linear algorithm for merging two convex hulls in $O(n+m)$ time, where $n$ and $m$ are the numbers of vertices in each input hull. Now, if you had a third convex hull to merge of size $l$, you could do that in $O(x+l)$ time, where $x \le n + m$, which... |
Given a finite set of equations in ANF, for example:
$$
\begin{cases}
(x_1 \land x_2) \oplus (x_1 \land x_3 \land x_4) \oplus 1 = 0 \\
x_3 \oplus (x_2 \land x_3 \land x_4) = 0 \\
(x_1 \land x_4) \oplus (x_1 \land x_2) \oplus (x_3 \land x_4) = 0
\end{cases}
$$
Is this P or NP?
The only assumption is that number of vari... |
I am following a LeetCode tutorial for Disjoint sets I have trouble understanding why the so called "Quick Find" method needs to take O(n) time.
I have implemented an data structure that has an optimised Union operation and it is O(1).
// Base class for all types of disjoint sets.
class DisjointSet {
public:
Disjoint... |
In our class we considered the problem written in the title. The below given time complexities where simply given, but not derived or explained. Therefore I tried myself to derive them, while I using math or simply intuition. I am able to explain, how one of the complexities comes about, but not the other one. I haven... |
The question is LALR(1) parsing of the following:
S->AA
A->aA
A->b
The link to the question is on this page:https://www.javatpoint.com/lalr-1-parsing
My question concerns I3, where despite a being read there is another production A->aA, a/b, where the a is not read.
I wish to know the reasons for this. If anyone can c... |
To represent complexity of an algorithm, Computer Scientist is used to using big-O notation.
How about complexity of boolean algebra?
Boolean algebra is commonly used in digital circuit design with using logic gates, practically useful in FPGA programming. Speaking about logic gates circuit, This topic maybe looks like... |
The birthday paradox is basically that assume there are 365 days in a year(ignore the effect of Febuary 29th), each person's birthday is uniformly random in these 365 days and independent with others. How many people do we need to have a more than 50% chance that two persons(or more) have the same birthday.
my understa... |
Statement : A half space is set of all points on one side of a linear separator, i.e., a set of the form $\{x \mid w^{T}x \ge t\}$. The VC-dimension of half spaces in $d$-dimensions is at least $d+1$.
Proof Idea. There exists a set of size $d+1$ that can be shattered by half-spaces. Select the $d$ unit-coordinate vecto... |
I'm trying to find examples of languages that don't seem regular, but are. A reference to where such examples may be found is also appreciated.
So far I've found two. One is $L_1=\{a^ku\,\,|\,\,u\in \{a,b\}^∗$ and $u$ contains at least $k$ $a$'s, for $k\geq 1\}$, from this post, and the other is $L_2 = \{uww^rv\,\,|\,\... |
I've seen arguments for $P \ne NP$ that rely on certain intuitions about how the real world actually is, generally making the point that it "makes sense" that there exist problems which have an easily verifiable solution that's hard to find.
For example, on his blog, Scott Aaronson has a "Reasons to believe" entry whic... |
I was reading this question over on the quantum computation stackexchange, and the top answer stated that you can't (strongly) simulate even a probabilistic turing machine, on itself. I was just curious if there are any computational models (that are probabilistic) that can be strongly simulated by themselves. If there... |
Let $L_1$ be a context-free language and $L_2$ be a regular language. Then $L_1 \cap L_2$ is context-free.
Part of a proof given in the book "Formal languages and automata":
Let $M_{1}=\left(Q, \Sigma, \Gamma, \delta_{1}, q_{0}, z, F_{1}\right)$ be an npda that accepts $L_1$, $M_{2}=\left(P, \Sigma, \delta_{2}, p_{0}, ... |
I'm preparing for my finals in "Advance Algorithms". I'm trying to solve the following question:
It is given that the current tree is a string of $n$ vertices, and a search operation is repeated twice, with each search looking for the key that resides at that moment in the deepest leaf of the tree. What is the depth o... |
I'm studying lambda calculus with De Bruijn indexes, and have these functions.
$$
zero := (\lambda\lambda.1)\\
succ := (\lambda\lambda\lambda.2 (3 2) 1)
$$
Now I want an algorithm to reduce $succ\ zero$
$$
\beta\ succ\ zero \\
\beta\ (\lambda\lambda\lambda.2 (3 2) 1)\ (\lambda\lambda.1)\\
\beta\ \lambda\lambda.2 ((\lam... |
Let's say I have some splay tree as following:
I want to recrate the exact same Splay tree using insert(key) method. Is there an algorithm that given some Splay tree traversal (or any other representation) will create the same Splay tree?
In other words, assume you are using some online tool to visualize your Splay tr... |
This is an old exam question, but I never found a solution or somebody who could explain it to me. Here is the problem statement:
Let $\Sigma$ be an alphabet with |$\Sigma$| $\geq 2$.
Show that for any Languages $L_1 \subseteq \Sigma^*$ and $L_2 \subseteq \Sigma^*$ there is a Language $L \subseteq \Sigma^*$ and the fol... |
I understood Sipser's proof of CFG to PDA but I am having a hard time understanding his proof of conversion from PDA to CFG while demonstrating the equivalence between the two.
He splits the proof (Lemma 2.27, page 121) in 4 parts:
Modify the PDA so there's 1 start state, 1 final state and every transition increments ... |
Genetic algorithm (GA) is general purpose metaheuristic often used in computational science, e.g. computational physics. However, some authors of computational physics software, e.g. [1], tend to specialize GA to the given problem on the level of variation operators. I do appreciate this approach and their work, but I ... |
I'm studying for my exams and a came through this exercise but I can't prove the result I found.
Given this piece of code:
int k = 0;
while (k < n/2) {
for (int l=k+1; l<=n; l=l*2) {
printf("\n");
}
k = k+2;
}
I am asked to calculate how many times printf() will be called.
I calculated by hand how ... |
I have an optimization problem.
The problem consists initially of the presence of several trucks, each one having different maximum capacities.
There are also multiple customer orders, each with a different weight.
The problem is to fill the trucks with orders, but initially prioritizing trucks with greater capacity, b... |
In standard agnostic learning, we assume that there is a concept class $H\subseteq \{h:\{0,1\}^n\rightarrow \{0,1\}\}$. Given samples from a distribution $D:\{0,1\}^n\times \{0,1\}\rightarrow [0,1]$, the goal is to output the best $h\in H$ for which $err_D(h)\leq C\cdot opt+\varepsilon$, where $opt= \min_{h\in H}err_D(... |
So basically my question is if i have for example 2.2 i need to create a python function to round numers to its higher 0.5 part, i mean
2.2 --> 2.5
2.3 --> 2.5
2.5 --> 2.5
2.6 --> 3
I cant use anything but maths operators
( +, *, **, //, %, - )
|
I believe its possible to achieve this with natural numbers.
The example below is for 2d to 1d conversions both ways, I do believe this generalizes to n-dimensions.
The mapping should work in a way that means that there is a total order of the elements on each side of the mapping, ie. moving through one space in order ... |
Given two DFAs, is it also a correct method to start with the combination of the initial states of both automata, then check where I can go for each symbol from these two states. Then add the combination of those states to the new automata and so on. So that I do not have to first take every possible combination of sta... |
My sister (a high school teacher) came and asked me the following question:
"Hi bro I'm having 28 new students in my class. They need to know each
other. So I want everybody to work together in small groups. I'm
thinking splitting them in groups of 4 and having 9 rounds. Then
everyone meets 3 people in every round and... |
Are both regular expressions correct for the following automaton?
$$(\lambda+ a a^*b(ab)^*)(\lambda + b(a+b)^*)\\
\ \\
(a a^*b)^*(\lambda + b(a+b)^*)$$
The first one is the solution provided by the teacher. The second one is my solution that I found by the algorithm where we use a generalized transition graph and rem... |
I can't seem to get a straight answer as to what a CPU clock is.
I know there are quartz crystal clocks that work by the bending of quartz that happens as an electrical current is passed through it. Do modern CPUs also use a crystal with the same property?
|
Exercise 3.4.9 of The Dragon Book defines Fibonacci strings as follows:
$s_1 = b$.
$s_2 = a$.
$s_k = s_{k-1}s_{k-2}$ for $k>2$.
Part (d) then poses the following question:
Show that the failure function of $s_n$ can be expressed by $f(1) = f(2) = 0$, and for $2 < j \le |s_n|$, $f(j)$ is $j - |s_{k-1}|$ where $k$ i... |
I need to give an example of a language $B$ is $NL-complete$ where $B^* \in L$.
I know $PATH$ is $NL-complete$ (but not limited to using other languages).
I am clueless about that. I know $L$ is not closed under $^*$ so there must a language like that.
Any help would be appreciated.
|
On the website for the book Modern Compiler Design, it is claimed that:
[The book] recognizes lexical analysis, LR parsing and BURS code generation as
instances of bottom-up pattern matching and explains them uniformly
using dotted items, thus unifying three important techniques in
compiler design, [...]
(BURS seems ... |
Below is the language, determine (R), (RE), (coRE). and prove your answer.
$L=\{\langle M_1,M_2\rangle|M_1,M_2$ are Turing-machines and $L(M_1)\cap L(M_2)\neq \emptyset \}$
Attempt: I Think the language $L\in RE$ Because we need to use $U-MT$ such that we check all the $L(M_1)\cap L(M_2)\neq \emptyset$ to see if all l... |
Are there any (deterministic or randomized) algorithms that run in time $\operatorname{poly}(n)\log^p{n}$ for $p < 0$? What are some examples?
|
I am a newbie to algorithm designing. I am working on user association and load balancing algorithm designing in millimeter wave wireless communications.
In this topic I am able to formulate the problem, but my query is how does one decide the algorithm after completing problem formulation.
Any help in this regard woul... |
I am looking for an algorithm for the following problem:
I have a set of users and a set of books.
Every user has their own set of favorite books, which may be empty, and is a subset the set of books.
We can assume that every book is a favorite book of at least one user.
Ideally I want to distribute ONE book to every u... |
I'm not sure if there's a name for this problem, but I'm hoping to validate my proposed solution or hear other ideas for solving it. This stems from a real engineering problem I've encountered at work, so a practical solution is preferred over a perfect one.
The Problem
I have an infinite queue of items $I = I_1, I_2, ... |
Assume we have a balanced binary tree.
On each node, we call:
def node_depths(root, depth):
if not root:
return 0
return depth + node_depths(root.left, depth + 1) + \
node_depths(root.right, depth + 1)
node_depths itself is O(n) time. But calling it on each node produces an O(nlogn) time algorith... |
I need to solve an optimization problem for a given set of polyominoes, for example the five Tetrominoes known from Tetris. The goal is to place each one of the figures on the 2d grid, so the area they enclose is maximal.
Staying with our Tetromino example, the optimal solution would be:
Bruteforcing the problem becom... |
Introduction
Hi everyone,
I am currently pondering how to efficiently design an algorithm for a sorting problem and hope that someone here may help me out a bit.
The problem
I have two lists of integers, let's call them the 'input' list and the 'position' list, and want to sort the 'input' list based on the position of... |
I am using a Genetic Algorithm framework to solve a path-finding problem. Specifically, given the following 32x32 maze:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
X | X
X | X
X | X
X | G X
X | ... |
I want to ask about a turing-machine-like construct with an infinite number of states.
in this post the claim is that every language is accepted:
Can a Turing machine have infinite states?
I understand that we can scan over the input from left to right once, and end up at a unique state for each possible input string.
... |
We say that dfs runs in $O(n+m)$ . For any connected graph $m \geq n-1 $.
Therefore :
$$m \geq n-1 \implies O(n+m) = O(m)$$
Do you agree ? Because, I have seen in many algorithms proofs this bound $O(n+m)$ but most of the times we are dealing with connected graphs .
|
In essence, is kernel basically the code that implements a set of system calls?
|
I'm building an implementation of the dynamo paper, yottastore. Given a key, I need to find which NVMe block stores the data. To do that I hash the key to find the shard where I have an in memory array in which at position [hash] I can find a struct with:
32 bit hash (needed for resizing)
64 bit pointer to NVMe block
... |
So in my attempt to convert the following DFA into a regular expression, I ended up with ((ba)*(ab(ab)*)*(aa(ba)*a)*)*. The exercise I'm following wants me to convert the DFA into a regular expression then describe its language in plain English, however, I can't seem to come up with anything for the converted expressio... |
It is for me unclear how I can derive from a npda whether the lambda-transition means “I don’t care which symbol I read” or “I have read all the symbols”.
For example, see the following automata:
If I am correct, the red ones have the first meaning, and the green one the second.
Maybe I totally misunderstood lambda-tr... |
My problem is to build a machine that decide this language:
{〈A, w〉| A is a DFA and w is the longest word in L(A)}
I know that DFA has finite states and eventually for every word that i simulate on A ,i would get an answer (yes/no) and know if w is in L(A).
In order to know if w is biggest can i build a TM M that Non d... |
As the title says, I've developed my own algorithm that can do so, however mine would take 1-2 seconds searching through an array with 1 million length, however I am very curious if this can be made so much faster like 0.01s or even 0.001 is this mathematically impossible? I've used C++ with vectors and jsons to create... |
Assume that I have a program Login.c that I have compiled with cc and generated the executable a.out. Now, along the questions posed from "Reflections of Trusting Trust", I want to check that a.out is the intended executable and nothing else, e.g. that there is no malfunction injected by the build system. There are tec... |
The following statement seems trivial, but how can it be formally proven/argued?
$$\bigcup_{s \in \delta_{N}^{*}\left(q_{0}, w\right)} \delta_{N}^{*}(s, a) \;\equiv\; \delta_{N}^{*}\left(q_{0}, w a\right)$$
In words: taking the union of the states when reading a symbol ‘a’ from all the possible states in a NFA having r... |
Statement:
Given any dfa $M$, application of the procedure 'reduce' (see below) yields another dfa $\hat{M}$ such that $M$ and $\hat{M}$ are equivalent. Furthermore $\hat{M}$ is minimal in the sense that there is no other dfa with a smaller number of states that also accepts $L(M)$
First some background information:
Th... |
I was wondering if there is an approach to sort the sums of k integers in a set of n integers; which would be a generalization of the x + y sorting problem.
Or even without generating the whole set of k sums, would it be possible to generate de m largest k sums in a set of n non negative integers?
|
All British citizens are provided with a National Health Service (NHS) number either at birth or when they first register with an NHS doctor. According to the NHS Number wikipedia page, the 10 digit number contains a checksum digit, which is calculated using the following algorithm:
The current system uses a ten-digit... |
I am well aware that recursively enumerable sets (which are subsets of $\mathbb N$) are closed under intersection. What is more interesting is whether or not the cardinality of the intersection is computable/decidable?
That is, given two recursively enumerable sets $A$, $B$, is $|A \cap B|$ always decidable/computable ... |
In his Quantum Computing Since Democritus, Scott Aaronson outlined a proof sketch of Blum's Speedup Theorem which roughly looks like the following.
Given an enumeration of Turing Machines $\{M\}_{i \in \mathbb{N}}$. Let $S_i = \{M_1, ..., M_i\}$. We can construct a computable function $f(n)$ such that if $f(n)$ can be ... |
How can I prove this: f(n) = o(g(n)) if and only if f(n) = O(g(n)), but f(n) ≠ Θ(g(n)) ?
|
I have lived my academic career thinking these two terms were interchangeable but something arose in me that said they're distinct. Are there any logical, formal definitions distinguishing between the two?
|
I am going through the book "Network Flows" by Ahuja et al. In chapter 19.2 "MAXIMUM WEIGHT CLOSURE OF A GRAPH", I find this example of turning a vertex-weighted (positive or negative) digraph into a flow network. The min-cut in the flow network is supposed to correspond to a max-weight closure in the original graph.
... |
Given a turing machine with some states, how can I recognize all halting states of that machine?
I think that I should go over each state and check if there is a transition that is not defined for that state with one (or more) of the tape alphabet symbols (also containing the blank symbol).
Would this be a good approac... |
i have seen this question where someone was asking if $\{a,b,c\}^* \setminus \{a^nb^mc^k \mid n \leq m \leq k\}$ is context free.
Then there was an answer that says that it is context free because:
The language, in turn, is context-free. This is because we can write it as a union of context-free languages:
Words not o... |
Prove or disprove: deterministic Turing machine equivalence Nondeterministic Turing machine such that word accepts if and only if there are exactly 2 accepted paths and all the others reject or no stop.
I know that need at least 1 accepted path to accepting a word in a nondeterministic turning machine. At first glance,... |
Neural networks are good at image analysis. They are also being used in video games which could outperform professional human players. I wonder if they can also play a purely object-finding game where a player needs to find objects in a photo as shown in the picture.
|
There are many different general strategies when designing algorithms for a problem like divide and conquer, greedy, dynamic programming, etc. I understand that it is not always obvious which to use for a problem. However, I am at a complete loss as to how to even begin to make educated guesses. I assume intuition play... |
Suppose I have an encrypted string of bytes. "T37mQkZosCsrcbqf/rvSWbd67qH3sXMggKdVd8fzMdg="
Suppose I know that somewhere in the original plain text string I know there is a string of numbers in ascii: "1234567"
Is is realistically possible to figure out the encryption key, or the rest of the string with just this info... |
I do have a seemingly fundamental question that I somehow struggle to intuitively make sense of.
Setting:
Let us consider a randomized algorithm $R$ that has $t$ steps. In each step, it is fed with random input data $(s_1,...s_t)$, where each $s_i$ is drawn from some exponentially large set (uniformly random). Moreover... |
Please help me to find the Time Complexity of the recurrence relation $T(n)=4T(\frac{n}{2})+\frac{n^3}{log_2n}$ using iterative method.
|
I want to support two operations:
Insert a (key, value) pair into the data structure in $O(\log n)$ time. The key can be assumed to be a unique integer.
Given an integer query value $v$, I want to return the (key, value) pair $P$ such that the value of $P$ is as great as possible amongst all (key, value) pairs with ke... |
I'm trying to use a VAE (CNN-VAE to be exact) to reduce the dimension of some images I have in a dataset.
I successfully trained my VAE, but now I'm not sure of the latent variable to return.
Should I use $\mu$, $\sigma^2$, or $z$ (which is sampled from $\mu$ and $\sigma^2$) ?
Thank you in advance for the advice.
Liam... |
Usually LRU cache is implemented with double linked list to fast remove oldest visited, push to front, and move from any place to front; also uses map to fast find element by key.
In 64bit systems pointers are wide, and cache has large overhead, especially if key is long and value short. I have tested in C++ with key a... |
Given a $n \times m$ rectangular grid of cells each with an integral weight: $w_{i,j}$ and two integer parameters $w \ge 2$ and $h \ge 2$ (for group width and height respectively). Select the subset of cells that maximizes the combined weight of the selected cells and is constrained such that each selected cell is a pa... |
The task is to "Show that the transformation f -> ((ln fx)x, (ln fy)y) is invariant under additive and multiplicative illumination changes."
From my lecture notes, for ((ln f)x, (ln f)y), I have:
ln (c*f(x,y)) = ln c + ln f(x,y)x = (ln c)x + (ln f(x, y))x
with the note that the first term is 0 if c is global and theref... |
I'm a SW engineer. I'm just curious why computers become slow over time.
"Slow" here I mean from a usual user PoV:
It takes more time to launch an application.
Application UI takes longer to respond user interactions. Sometimes even freeze and unresponsive.
Playing video files on local HDD becomes noncontinuous.
Somet... |
Suppose given the recurrence $$T(n)=T(\frac{n}{2})+\frac{n}{\log n}.$$
I think the answer is
$$T(n)=O\left(\frac{n}{\log n}\right).$$
because
$$T(n)=T(1)+\sum_{i=0}^{\log n-1} \frac{n}{2^i(\log n-i)}$$
but how we can show that $\sum_{i=0}^{\log n-1} \frac{n}{2^i(\log n-i}=O\left(\frac{n}{\log n}\right)$?
|
Following up on these two posts
Generalised 3SUM (k-SUM) problem?
https://people.csail.mit.edu/virgi/6.s078/lecture9.pdf
The claim is that k-sum in the general case can be solved in $O(n^{k/2}log(n))$
However, I don't follow this claim. The quote reads
For even : Compute a sorted list of all sums of /2 input elements... |
I was going through Distributed Systems by Maarten van Steen & Andrew S. Tanenbaum. While going through size scalability of systems, I came across this in a note.
I want to know the derivation of this formula. Also, for $\left ( 1 -\frac{\lambda }{\mu} \right )$ to be greater than zero, $\lambda$ should be less than... |
Given a list of lists containing tuples in sorted(by day) order find and print the total number of stock units owned for every day that occurs at least once.
#first number in each tuple represents a day, second number represents how many units of that stock is owned.
#if a day is missing, you can assume the stock valu... |
Is $n=\Theta(n^{1+o(1)})$?
To me it appears to be true as $n$ tends to infinity $n^{o(1)} =0$.
|
Suppose I have two LR(1) languages $L_1$, $L_2$. Is
$L_1 L_2$ (their concatenation) guaranteed to also be LR(1)?
References to proofs would be very helpful.
|
I know computability, but not model theory and logic, so this question may be naive or confused in that respect.
A blog post of Scott Aaronson mentions a Turing Machine $M^*$ such that the statement P:
\begin{align} &\text{$M^*$ runs forever on a blank tape} & (P) \end{align}
can be proven in ZFC+large cardinal assumpt... |
Suppose I have two LR(1) languages $L_1$, $L_2$. Is $L_1 \cup L_2$ also LR(1)?
References to proofs would be very helpful.
|
For any directed/undirected labelled graph G := (V,E,L), where L is the finite set of labels, and every edge has a label. For simplicity, let us assume that L = {a,b}. Is there a P-time algorithm to determine whether all possible cycles passing through a vertex "v" has at least one edge (every cycle) with label "a"? We... |
I am wondering if there are known to be any EXPTIME-complete problems (or even just problems in EXPTIME) which are known to also be in IP, so a prover can convince a verifier that an answer to an EXPTIME problem is say "yes" in polynomial time? Although this seems like a natural question that maybe is solved, if the a... |
I know that this kind of question has been asked before, but I still see different kind of answers getting multiple upvotes, but I am not sure if they are all correct. That’s why I wanted to ask it again. I will put some answers that I have read and their difference in this question.
So my question:
For a language $L$ ... |
In the book Formal languages and automata by Peter Linz, 4th edition (Jones & Bartlett Learning), on pages 300-301,
there is a proof for the fact that the halting problem is undecidable.
The proof is as follows:
We show that there is no TM $H$ that solves the halting problem.
Assume there is a TM $H$ that solves the h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.