instruction stringlengths 35 29.1k |
|---|
I have an unusual problem that I am struggling to solve. I have a set of nodes (with positive distances between them) that I want to connect into a single component. In particular, I want to form a minimum-distance spanning subgraph such that all its nodes have an even degree. Note that the subgraph can have multiple e... |
I'm relatively new and am still learning the basics. I've used NVIDIA DIGITS in the past, and am now looking at Tensorflow. While I've been able to fumble my way around creating some models for a few projects I'm working on, I really want to start diving deeper into what I'm doing, how I'm doing it, and ultimately a be... |
Problem
Solving a non-linear system of equations.
The number of variables is the same as the number of equations.
When I fix a set of variables (say $\vec{y}$) and keep another set free (say $\vec{x}$), the system becomes an under-determined, dense, and linear system of the subset of variables
$$A(\vec{y})\vec{x} = \v... |
I am reading through chapter 2 of of the free textbook "Mining of Massive Datasets" (http://www.mmds.org/).
On page 28 the following is stated:
"It is reasonable to create one Map task for every chunk of the input file(s), but we may wish to create fewer Reduce tasks. The reason for limiting the number of Reduce tasks ... |
I know there are problems that are NL-complete, NP-Complete, PSPACE-complete, etc. Are there problems that are DSPACE(O(1))-complete I.e. NSPACE(O(1))-Complete I.e. Reg-Complete?
Thanks!
|
Let $P$ be a monic polynomial polynomial given by its roots:
$$P(X) = (X-x_1)\times...\times(X-x_n)$$
What is the minimum asymptotic complexity to compute its expansion of the form:
$$a_nX^n+...+a_0$$
What I have found so far are Vieta's formulas which give an expression of each $a_k$ as a sum over $1\leq i_1 < ... < ... |
Let be $A, B \subset \mathbb{N}$ are recursively enumerable, $A\cup B$ and $A \cap B$ recursive. I want to show that $A$ and $B$ are recursive.
By negation theorem $X \subset \mathbb{N}$ is recursive iff $X$ and $X^c$ are recursively enumerable.
How do I complete the proof using that?
|
I understand that prefix of a regular language is regular, but I am unable to get my head around this:
Give an example of a non-regular language $A ⊆ \{0, 1\}^*$ for which $\operatorname{Prefix}(A)$ is regular.
|
To determine the experimental time complexity of radix sort, I wrote a program that counted the number of steps the algorithm took to sort N points. I ran that program for multiple N length arrays, and I plotted the steps taken in Excel. Then, using the trend line tool, I calculated the polynomial that best fit the fun... |
A problem I'm working on requires me to find the minimum # of integers from a given list that add up to $N$, or more specifically:
Given a list $L$ of $K$ integers, $[a_1, a_2, ... , a_k$], where each $a_{i+1} > a_i$ and each $a_i > 0$, design an algorithm that finds the minimum number of such $a_i$ that their sum add... |
I have two algorithms $A$ and $B$ to solve a problem $P$ of size $n$. Algorithm $A$ takes $O(\log n)$ time on the PRAM using $O(n \log n)$ operations (done in parallel). Algorithm $B$ reduces the size of $P$ by a constant factor in $O(\log n/ \log \log n)$ time using $O(n)$ operations (also done in parallel). Can I sol... |
I'm making a maze generator that uses Eller's algorithm. There's not much information about this particlar algorithm on the Internet. So I have some things misunderstood about it. I've made a picture to show you the proccess of generating an incorrect maze.
I didn't found any information about this in article1 and art... |
Here's the function I'm currently analyzing. I know it's not the most optimal but I'm not understanding the $\theta()$ of this algorithm. I've been told that it's not actually $\theta(n)$ but instead a logarithmic run-time and it had something to do with the bits of the value passed in. I'm not understanding how the bi... |
There are a couple of definitions of recursively enumerable, for example in Judah: $A \subset \mathbb{N}$ is called r.e. if there exist a $\Sigma^0_1$ formula $\varphi(x)$ such that
$$A:=\{n \in \mathbb{N}: \mathbb{N} \vDash \varphi(n)\}$$
In Shoenfield: A predicate $P$ is r.e. if there is a recursive predicate $Q$ suc... |
I'm trying to come up with a method to match a given mathematical plot against a database of other plots. To make it more specific: plots are generated in R as PNG and might have different dimensions. The latter means that simple pixel-by-pixel matching won't work, even when resized, because text, plotting symbol, marg... |
When in computer networks it happens that the packets are not full? I have heard that sometimes in UDP that happens, if that’s the case, why not all the space is not used?
|
My problem is to display an undirected unweighted graph in a grid format ( $ (n \times 3) $ - matrix for simplicity) without compromising on the connections displayed on the screen (the only connections that would be displayed are between adjacent nodes in the grid).
One way I could think of is to bisect the graph rec... |
Are there some applications of signed permutations to machine learning? I searched on google and only found one paper. Thank you very much.
|
Let $\mathcal A$ be an arbitrary language over $\Sigma^*$
Proof.
To prove, $\mathcal A^{**} = \mathcal A^* $
$\mathcal A^{**} = \left( \mathcal A^0 \cup \mathcal A^1 \cup {...} \cup \mathcal A^n \right)^*$ by definition of Kleene Star
My idea is that Kleene star operation distributes over the union of languages but the... |
I am reading the book Algorithm 4th and see this square root algorithm using Newton's method (java sample code):
public static double sqrt(double c)
{
if (c < 0) return Double.NaN;
double err = 1e-15;
double t = c;
while (Math.abs(t - c/t) > err * t)
t = (c/t + t) / 2.0;
return t;
}
I wanna... |
Theoretically, is there a way to measure how many infinite loops are running at a given point in time? In other words, is there a way to freeze everything and get a number on how many infinite lines of code are running on every machine.
|
Given a set of point $P$. Find the euclidean minimum spanning tree where each points is equally distributed on the plane using randomization.
We can solve this problem with Prim's algorithm in $O(n^2)$ which is too slow. I've found an algorithm called Delanuay Triangulation but is there any other ways to solve this pro... |
I'm having trouble understanding a part of Manber's graph-partitioning algorithm, presented in A Text Compression Scheme that Allows Fast Searching Directly in the Compressed File.
Generally speaking he wants to divide vertices of a weighted, directed graph $G=(V,E)$ into two sets $V_1$ and $V_2$ in such a way, that th... |
I am looking for code that detect an error and it's position (or an aproximation of it), this is more than an error detector code but a little less than a correcting code.
Do you know something like this or some literature that I can check?
|
DEFINITION: A set of vertices $A\subseteq V$ in a graph $G(V,E)$ is called a module if it satisfies the following property:
For every $v\in V\setminus A$, either $A\subseteq N(v)$ or $A\cap N(v)=\emptyset$, where $N(v)$ is the neighborhood of $v$.
GRAPH-MODULE problem:
Input: An undirected graph $G(V,E)$ and a natur... |
I'm looking for an algorithm that can find any matrix $a_{j,i}$ such that
$$
\sum_{i \in I} \left(\sum_{j\in J} a_{j,i}\right)^2
$$
is minimal, while also for each $j\in J$ satisfying the constraint
$$
k_j = \sum_{i \in I} a_{j,i}
$$
where $k_j$ is some non-negative constant. Furthermore every $a_{j,i}$ must be non... |
Suppose we have a graph $G(V,E,W)$, where $V$ and $E$ are the set of vertices and edges and $W$ is non-negative weight on the edges. Let $w(e)$ be the weight of edge $e$ and $N(e)$ be the neighboring edges of $e$. An edge $e$ is locally subdominant if its weight is smaller than all of its neighbors. With this backgroun... |
I read on Wikipedia that modular exponentiation can be done in polynomial time. I've a few questions regarding it (sorry if they seem a bit easy – I'm not a comp sci student).
Is it poly time only for base 2, i.e in binary or will it remain poly time algorithm even if i run it in decimal system i.e base 10?
If I'm cal... |
We know that there are languages in $DTIME(n^t)$ and not in $DTIME(n^s)$ for all $t>s$ due to simple diagonal arguments (i.e., the Time Hierarchy Theorem), but I'm wondering if there is any equivalent results known for time-bounded Kolmogorov complexity. That is, given polynomials $p(n)=n^t$ and $q(n)=n^s$ with $t>s$ i... |
Axioms For *
\begin{align}
1 + aa^* &\leq a^* \\
1 + a^*a &\leq a^* \\
b + ax &\leq x \to a^*b \leq x \\
b + xa &\leq x \to ba^* \leq x \\
\end{align}
Elementary Results
\begin{align}
a \leq b &\to a + c \leq b + c \\
a \leq b &\to ac \leq bc\, \wedge\, ca \leq cb \\
a \leq b &\to a^* \leq b^*
\end{align}
Problem
Prove... |
Given a grammar $G$, is it decidable whether $G$ generates any string in the form $0^*1^*$? Why?
I think it's undecidable but can't find any undecidable problem to reduce it to.
|
Given the following statement:
"A nonempty array A consisting of N integers is given. Any integer K,
such that 0 ≤ K < N-1, splits array A into two non-empty parts"
What does the 0 ≤ K < N-1 expression mean in this context?
|
I am trying to implement this recursive-backtracking function for a constraint satisfaction problem from the given algorithm:
function BACKTRACKING-SEARCH(csp) returns solution/failure
return RECURSIVE-BACKTRACKING({},csp)
function RECURSIVE-BACKTRACKING(assignment,csp) returns soln/failure
if assignment is com... |
The paper "Self-Adjusting Binary Search Trees" defines (Page 658) the potential function for analyzing the amortized cost of a sequence of $m$ splay operations as the sum of the ranks of all nodes in the splay tree, where the rank of a node $x$ is taken as the logarithm of the size ($s(x)$; i.e., number of nodes in) of... |
User-level threads are transparent to the kernel. How is htop able to show user-level threads running on my system? I know that those threads are user-level threads because when I press H (for toggling display of user level threads), those threads disappear from the list.
The image below shows three user-level threads... |
Can anyone help with the following problem ?
Let $B = \{ a^{n}b^{m}c^{m}d^{2n} | n,m ≥ 0 \}$, use the pumping lemma to prove B is not context-free
Thanks in advance.
|
These two images are from Google search.
AUXILIARY CARRY FLAG: This flag is set to a 1 by the instruction just
ending if a carry occurred from bit 3 to bit 4 of the A Register
during the instruction’s execution
Explanation from Quora
It indicates when a carry or borrow has been generated out of the
least signi... |
A backtracking algorithm generates, explicitly or implicitly, a
state-space tree.
Introduction to the design & analysis of algorithms / Anany Levitin
I wonder that whether the saying always holds. If yes, is it always binary tree? For any problem which can be solved by backtracking, skeleton of the solution can be g... |
Given that this wave was sampled at a sampling frequency f:
Why does the wave sampled at a sampling frequency 3f/2 look like this?
What does 3f/2 mean? Does it mean that we sample every 2 waves 3 times?
|
Both the original paper and all implementations I've seen of the Two Way string search algorithm estimate the period of the needle as $\max(|u|,|v|)$+1 (where $u$ and $v$ are the critical factors). However, this seems to be throwing a lot away; the estimated period is the amount you get to skip forward upon a mismatch ... |
I have a really specific problem to solve and i'm looking for an existing algorithm to help me (i hope i'm in the right section of stackExchange).
I would have to make "random" association between items but all association need to have to answer to specific conditions.
Below, an simple exemple in javascript.
INPUT
var... |
I am working on the following problem:
Recall the definition of a complete graph Kn is a graph with n vertices such that every vertex
is connected to every other vertex. Recall also that a clique is a complete subset of some graph.
The graph coloring problem consists of assigning a color to each of the vertices of a gr... |
Show that $L = \{a^nb^l \ | \ n \leq l \}$ is not regular
I'd like to check if my proof for this is correct.
Proof: Choose any positive integer $m$. Pick $w = a^mb^{m+1} \in L$. Note that $|w| = 2m+1 \geq m$ and $1\leq |a^m| \leq m$. Write $w=xyz$ where $x=\varepsilon$, $y=a^m$ and $z=b^{m+1}$. We have
$$xy^3z= \vare... |
So, after a collision, a piece of information gets stored in the next bucket. When retrieving the value later with a key, how do we know it has not been shifted due to a collision and that we are in fact receiving the wrong value?
|
In other words, is artificial human level intelligence not possible yet just because of limitations in processing power and amount of data required to train the models? Or we don't have the knowledge of how to achieve it even in theory?
Suppose that processing power and amount of training data is not a problem, could h... |
Exactly 1 in 3SAT (X3SAT) is known to be NP-Complete. It remains NP-Complete even if we only consider instances that are monotone and linear. Monotone means all of the literals are positive. Linear means no two clauses share more than one variable in common. If $n$ is the number of variables then the maximum number of ... |
I am working on tiny programming language (for our specific tasks). It's a script language.
It looks like a library for C++ that can execute a code of this language. This library parses a source code and create required entities in the memory, i.e. a source code isn't compiled in byte code, it keeps in the memory as C+... |
A clique in an undirected graph $G(V,E)$ is a subset of vertices $\mathcal{C}\subseteq V$ every pair of which is adjacent $u,v\in \mathcal{C}\implies uv\in E(G)$.
Given a clique $\mathcal{C}\subseteq V(G)$ in a graph $G$, an outer-incident edge of $\mathcal{C}$ is an edge $uv\in E$ with $u\in \mathcal{C}$ and $v\not\in... |
I am trying to use Myhill-Nerode theorem to minimize the DFA appearing below.
The algorithm repeatedly runs the following step:
If there is an unmarked pair $(Q_i, Q_j)$, mark it if the pair $\{δ (Q_i, A), δ (Q_j, A)\}$ is marked for some input letter.
Initially only $\{0,3\},\{1,3\},\{2,3\}$ are marked.
However, $\{... |
Consider the following language $$EQ_{DFA} = \{ \langle A, B\rangle: A \ and \ B \ are \ DFAs \ and \ L(A) = L(B)\}$$
Given the fact that $EQ_{DFA}$ is decidable, how can I prove that the language $$SEQ_{DFA} = \{ \langle A, B\rangle: A \ and \ B \ are \ DFAs \ and \ L(A)\subseteq L(B)\}$$ is also decidable?
Thank you... |
Given a context free grammar how am I able to determine if $\varepsilon \in L(G)$ ?
The only way I thought of is to systematically check if I can derive the empty word from the given grammar. (Assuming it's not in CNF)
Is my intuition right though?
|
What are the difference between decision diagram and decision tree? Is BDD a type of DD? what are the other type of DD? what are the algorithms used for it
|
I have a language $L$ = {$vabu$ | $v$,$u\in \{a,b\}^*$, $|vu|_a = 0$ $($mod $2)$$\}$
where $|vu|_a$ is number of $a$ in $vu$.
I came up with these rules:
$\sigma \rightarrow aa\sigma | ab\xi$
$\xi \rightarrow aa\xi | \epsilon$
This generates words in form: $(aa)^iab(aa)^j\epsilon$, but not all words in $L$ look like t... |
Given an integer $k$ and $n$ sets $A_1,\ldots,A_n$, denote $U=A_1\cup A_2\cup\cdots\cup A_n$, $A_i^0=A_i$ and $A_i^1=U\backslash A_i$. The problem asks whether there exists $(b_1,\ldots, b_n)\in\{0,1\}^n$ such that
$$\left|\bigcup_{i=1}^nA_i^{b_i}\right|=k.$$
Is this problem NP-complete?
|
How can I design a Turing machine that takes string $a^n b a^m$ and check if $n>m$ then convert the string to $a^{n-m}$, otherwise reject it?
|
Given the following algorithm :
input : a (integer), b (integer != 0)
result = 0;
while(a >= b)
{
a = a - b;
result = result + 1;
}
return result;
How to find the number of instructions and the time complexity of this kind of algorithm since we don't know neither a nor b nor th... |
My goal is to do some large iteration Monte Carlo simulation of different card games that require on the order of 1 billion random decks to get a reliably accurate answer. The bulk of the computer time is actually shuffling/preparing the decks, not searching for the "hit" criteria I am looking for.
I am using an strin... |
I'm trying to implement this algorithm but I'm having problems reproducing the exemple that it gives a solution to.
The general method that I tried is:
Make a grid $\theta \in [0,2\pi)$, with say N=256 points in it
Create a complex vector $G(\theta) = \frac{1}{F(e^{i\theta})}$, where $F(z) = z\tan(z) - 1$ is the compl... |
Suppose we have the function below:
def func(n):
for i in range(n):
for j in range(n - i):
for k in range(n - j):
if i + j + k == 0:
break
if i + j == 0:
break
if i == 0:
break
return n + 1
We have three ne... |
Assuming that we have a problem $p$ and we showed that the lower bound for solving $p$ is $\mathcal{\Omega}(2^n)$.
can lower bound $\mathcal{\Omega}(2^n)$ implies the problem in $NP$?
|
Hi I am a Computer Science student attempting to solve this problem for extra credit. Problem is I am unsure what this algorithm is asking for as the language is a bit hard for me to follow:
Imagine that you have a robot arm consisting of a sequence of rigid
line segments $L_{1}, L_{2}, \dots , L_{n}$ hinged togethe... |
I was going through these notes and they have the following operator on partial functions:
$$
\mathcal F^{k}(\bot)(\sigma) =
\left\{
\begin{array}{ll}
\alpha( [\![s]\!]\sigma ) & [\![b]\!]\sigma=true \\
\sigma & [\![b]\!]\sigma=false \\
\bot & [\![b]\!]\sigma=\bot
\end{array}
\right.
$$
and supposed... |
The motivation for this question is the fact that partitioning DFA into equivalence classes is the mechanism that is used in model testing to generate test cases. However, obviously, DFA cannot describe arbitrary programs.
Perhaps DFA can be extended (w/o becoming fullblown PDA), while still having the property that i... |
Are data segments,heap,stack etc also present in secondary memory with compiled code then later mapped by OS to RAM when I open it?
|
I have a dictionary that has keys and multiple values per key. Same value can be assigned to multiple keys.
For the sake of simplicity, the keys are ints and the values are strings,
so that it would look like in C#:
Dictionary<int,string[]>
As an example the dictionary is filled as follows:
{ 1, ["A","B"] },
{ 2, ["A"... |
I am working on a project of " Fraud detection using deep learning" . For that I have a dataset containing some numerical attributes . Now the task is to use CNN for the above purpose. Please guide me how can we do that as I have observed that it can be used only for image classification. I would appreciate if I get so... |
I am currently reading the extended Version of the Paper Online Detection of Effectively Callback Free Objects with Applications of Smart Contract.
I am trying to understand the proofs of Chapter 6.
In particular, I cannot understand the premise of proofs 6.2. Indeed, the authors use a variant of SMAC, an Object-orient... |
I'm doing and assignment where the problem is to find the combination with the least number of elements form an array of integers, given an integer sum. I have solved this using a gready algorithm which doesn't find the optimal solution, however I'm having problems finding the optimal solution using dynamic programming... |
An array $A$ of $n$ distinct, ascending integers is rotated to the right by $k$ positions, resulting in the array $A_{k}$.
That is, the element at index $i$ in $A$ is moved to index $(i+k)\mod n$ in $A_k$.
Devise a $\Theta(\lg(n))$ algorithm to recover $k$ from $A_k$ where $\lg(n) = \log_2(n)$.
To clarify, the algorith... |
Given a p-digit number n, where p is atleast 500, if we have an algorithm whose computational complexity is in the worst case,
$O(p\mathrm{log}(p))$,
will it be counted as a poly time algorithm ? Or since $(p\mathrm{log}(p))$ is basically the logarithm of an exponent so it will inefficient. And such an algorithm will ... |
Prove that the array prev[.] computed by Dijkstra’s algorithm, the edges (v, prev[v])
for all v ∈ V , form a tree
In order to prove this I used induction.
Lemma : "A tree with n vertices has n-1 edges"
R contains vertices with shortest distance from s and rest are in R'
Base case : s is added to R. There are 0 edges.
... |
I'm basically looking for an example (in maybe graph theory) of a constraint satisfaction problem which has a 3-element set as a domain and the problem is known to be polynomial-time solvable.
|
I'm learning CSP now for my research. First time doing formal work in CS. I'm having a hard time understanding the difference between choice $\square$ operator and the nondeterminism $\sqcap$ operator. Does the former perform a completely deterministic choice only based on the inputs from the environment, while the lat... |
My algorithm-fu is really weak and I do not know how to express following problem in terms of any other problem known to me:
Given a small rectilinear grid and coordinates of four cells in this grid (let's call these cells A, B, C and D) find a shortest path which connects cells A => B => C => D (in this order, with no... |
Premises or Givens:
$∃x(A(x) → B(x))$
$∀x (B(x) → K(x))$
To Prove:
$∃x(A(x) → K(x))$
My Solution:
$A(z) → B(z)$ From premise and Existential instantiation $x$ for $z$
$B(z) → K(z)$ From premise and Universal instantiation $x$ for $z$
$A(z) → K(z)$ Transitivity of 1,2
$∃x(A(x) → K(x))$ From Existential gen... |
I know that the Context-free languages are not closed under compliment.
Given $L=\{wxw^r| w \in(a+b)^+,x \in (a+b)\}$ and this is a Context free language. I think it's compliment will contain words of the form $ww$ which comes under CSL.So, I think this $\lnot L$ must be not context-free.But I've read here
Why are pal... |
I am trying to figure out a sorting algorithm which can be used in $O(n\frac{\log{n}}{\log{k}})$ sorting time. I am allowed to use $k$ registers that can store key value pairs and these registers can insert a key value pair and return a key value pair in constant time. And when popping from one of these registers, it w... |
If I have the following array: pieces = {35,15,20,25,30,10} and the time slot is 80 minutes.
How do I do the following:
1. Fill the time slot with any pieces for the perfect fit. (In our case: 30,35,15 or 15,25,30,10 etc.)
2. Fill the time slot with the best fit possible with deviation: (Let's say our time slot is 10... |
One definition of the class NP is that there is a certificate whose size is bounded by a polynomial function of the problem instance size which can be used on a deterministic TM, along with the original input, to decide whether the input is a part of the language.
Doesn't this definition allow the trivial loophole wher... |
I am recently thinking about proving the undecidability of some problem. This problem has been formalized in Coq and by staring at it, people including me think "for sure" this is undecidable. "For sure" is a good source for surprises so I think I should try to prove it, probably formally.
But then I recall MLTT is com... |
Time is divided into terms, and each term begins with an election. After a successful election, a single leader manages the cluster until the end of the term. Some elections fail, in which case the term ends without choosing a leader. The transitions between terms may be observed at different times on different serve... |
TL;DR: Can I say, "K-rule in Agda enables people to match $ \forall a.a \equiv a $ with $ \mathit{refl} $"?
In https://agda.readthedocs.io/en/v2.5.4.1/language/without-k.html#without-k, K-rule is introduced as an implicit rule and it's defaultly enabled. If I understand it correctly, it means parameter of type $ \foral... |
I'm a little confused about some LTL syntax.
When the Global and Future operator (GFx) or []<>x is used, what does it mean. In the lecture slides it is given as infinitely often. But I don't understand it.
When used as FGx or <>[]x, I understand it as eventually in the future something will be true forever. E.g. eventu... |
I am new to algorithms so sorry to ask simple question
I am working on a problem which is about array of integers, my solution is right but not good enough, because I have time exceeded exception on codeforces. I think solution where solution's time < O(n^2) would be right.
My solution:
int n;
cin >> n;
int currentSc... |
Problem
Consider the pseudocode for the sort algorithm below, which takes as input an unsorted array $A$ of $n$ integers with no duplicates.
sort(A, i, j)
if i = j
return
m = floor[(i + j)/2]
sort(A, i, m)
sort(A, m + 1, j)
if A[m] > A[j]
swap A[m] and A[j]
sort(A, i, j - 1)
Write a recurrence that... |
The alphabet is {0,1}, express all finite strings containing at least three 1's and at most four 0's.
I've come up with a method that enumerate every possible number of 0's:
$$111^{+}+0111^{+}+1^{+}011^{+}+111^{+}01^{*}+00111^{+}+......$$
But for three 1's and four 0's this is far too complex.
Need some help.
|
I've got problem on integer programming, specifically with the following knapsack problem. I'd be happy to get some suggestions on how to solve the problem in a time efficient way.
There are 120 items $i$, each with weight $w_i$ and the value $v_i$. Each item can be selected only once (or zero times). For each of them ... |
We have two deterministic pushdown automatas A and B, which languages are deterministic context-free. The problem is to decide if there exists a deterministic pushdown automata, which language is an intersection of the languages of A and B. This problem is known to be undecidable. But I can't find a proof for it.
|
I'm currently learning about database systems and they mention a buffer management system which brings in pages from disk to memory. This buffer manager allows higher layers to operate as if the entire database on disk is actually in memory.
The video I am watching talks about LRU and Clock as the page replacement poli... |
So I recently discovered lambda calculus and for the most part I understand it. However, one specific part of it that I cannot understand is this:
Let's say we define a very simple function
$$ I := \lambda a.a$$
This is simple to understand, nothing confusing. However, if you add another input I will scratch my head fu... |
We're given an unweighted directed graph with vertices $V$ and edges $E$. We're trying to find the shortest path from $s$ to $t$ but we're allowed to travel along up to one edge in the wrong direction.
If we insist on using all edges in the correct direction, we can solve this using BFS algorithm with $O(|V| + |E|)$ co... |
How do I prove that entropy is maximal for $P(A_2) = \cdots = P(A_n) = (1-a) /(n-1)$ while $P(A_1) = a$ (a fixed number) and $A_1,…, A_n$ is a partition of the sample space?
|
Is $n^3$ an asymtotically tight bound of $(n^{2.99}).(\log_2n)$? If so then how?
|
I'm having trouble proving the following: If $L_1$ and $L_2$ are languages then: $$(L_1^*L_2^*)^* = (L_1\cup L_2)^*$$
I could be on the wrong track here, but I figured an inductive approach is a good way?
My approach was this: If I use my notation $L^{(n)} = \lambda+L+L^2+...+L^n$ so that I have a kind of 'partial' Kle... |
I saw this relationship in my exercise.
max{n,k}= Ө(n+k)
Could somebody prove it?
|
I have a $\rho$-approximate algorithm for a minimization algorithm, where the objective is to minimize $O$ ($\rho \geq 1$ is some constant), such that the algorithm's solution is always within $\rho$ times the optimal. Is it possible to use this to get an approximate algorithm to maximize $-O$? What is the approximatio... |
In regular expression implemented by language like perl or python, user can write a set of characters like [123abcd] or special notation like \d to represents digit or \w to represents word character.
I wonder how they are converted to DFA, since you cannot really create expand edges in alphabet(Unicode).
Take example ... |
There are two questions that I am trying to draw a comparison between:
Q1: Maximum Absolute Difference
You are given an array of N integers, A1, A2 ,…, AN. Return maximum value of f(i, j) for all 1 ≤ i, j ≤ N.
f(i, j) is defined as |A[i] - A[j]| + |i - j|, where |x| denotes absolute value of x.
Q2: Min Steps in Infini... |
It is commonly stated that hash functions remain secure in a post quantum world, the justification being that a quantum computer only has the advantage of Grover's search to give it a quadratic speedup.
However, there is active research into, for example, commitments such as https://eprint.iacr.org/2015/361.pdf. These ... |
From what I understand, the x86 family of processors understands the same instruction set and x86-32, x86-16 machine code can be executed by an x-86-64 processor because of backwards compatibility.
Now since Machine Code is usually produced from Assembly Language and we use an assembler for that purpose, does that mean... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.