instruction stringlengths 35 29.1k |
|---|
Given a set $S$ of $n$ planar points, we know that the $|CH(S)| = 17$. How can I create an algorithm that computes $CH(S)$ in $O(n)$ time? Why is it really $O(n)$?
|
I am given set of points S. I need to find the count of four vertices (A, B, C, D) satsfying the equation AB + CD = BC + AD, morever, the vertices should be pairwise distinct.
Here, A, B, C, D denotes the vertices choosen from set S.
AB, BC, CD, AD denotes the distance between A and B, B and C, C and D, and A and D res... |
If I have a list of lists as below ,
[[1, 2], [3, 4], [1, 5], [2, 6], [4, 8], [5, 6], [6, 7],
[7, 8], [6, 10], [7, 11], [8, 12], [10, 11],
[10, 14], [12, 16], [14, 15], [15, 16]]
and
[[1, 2], [2, 3], [3, 4], [1, 5], [4, 8],
[6, 7], [5, 9], [6, 10], [7, 11], [8, 12],
[9, 13], [10, 11], [12, 16], [13, 14]... |
The following question is taken from Sipser:
Prove that $EQ_{\mathsf{DFA}}$ is decidable by testing the two DFAs on all strings up to a certain size. Calculate a size that works.
Here is the answer:
For any DFAs $A$ and $B$, $L(A) = L(B)$ if and only if $A$ and $B$ accept the same strings up to length $mn$, where $m... |
Given a set of points S and a triangle, what are the various reasons for which constructing and using the convex layers of S is not optimal for counting and listing the points inside the triangle?
|
We have an $x$-monotone path $\mathbb{P}$ in the input. We want to store the path $\mathbb{P}$ in a data structure such that we can answer this type of the query.
Given any circle $\mathbb{C}$ and any two indices $i$ and $j$ with $1 \leq i \leq j \leq n$, report the first point of the subpath $\pi [ p_{i}, p_{j} ]=(p_{... |
I know that the exact cover problem has a pseudopolynomial algorithm when the cover size is a given constant (as here: Is set cover still NP-complete if you have a given k?).
However, I am interested in approaches to solving a variant of Exact cover (or rather, twice-exact cover, that I asked about here: Solving a vari... |
So much software related to computer vision relies on AI and neural networks, I wonder some of the approaches which don't use those methods. How could some of the mainstays of computer vision (eg. recognition and identification) be achieved without "artificial" means?
I'm reading Vision by David Marr and it talks about... |
I saw "Rosser’s Theorem via Turing machines" at:
https://www.scottaaronson.com/blog/?p=710
The modified halting problem (Consistent Guessing Problem) CGP is used in the proof:
CGP(M) - accepts if M accepts on a blank tape
CGP(M) - rejects if M rejects on a blank tape
CGP(M) - either accepting or rejecting if M runs for... |
Is the following scenario theoretically possible, or provably impossible?
Alice generates a 1 GiB file with random bits and sends it to Bob. This file is a shared dictionary they call Q. Now, Alice and Bob starts sending each other new files with arbitrary entropy, each of them < 1 MiB, but they compress them with a cl... |
Where can I find a source for questions/problems with data structures (like questions about avl trees , rank-trees, 2-3 trees, heap) and algorithms?
I will be happy for a references in these topics (I tried to search it in google,but I don't find appropriate something).
|
I'm reading the paper "Dual of substitution is Redecoration".
And I'm struggling with understanding the usage of the word "not-well-founded cotrees".
what is a cotree compared to a tree ? I suspect it is a tree for which all relations are inverted, but it is just my assumption.
what it is to be "well-founded" for a tr... |
Question
Given a 32-bit cmpxchg operation as a primitive:
u32 cmpxchg32(u32* mem, u32 key, u32 old, u32 neo) {
// this function runs atomically
u32 found = mem[key];
if (found == old) {
mem[key] = neo;
}
return found;
}
Is it possible to implement the same function, for 64-bits?
What I've t... |
I have stumbled on this question:
Which of the following languages over the alphabet ${a,b,c,d}$ are context-free and which not ?
a) $L_{1} = \{wa^{3n+1}b^nw^{R} \mid w\in \{c,d\}^*,\ n>0\}$;
b) $L_{2} = \{a^{3n+1}wb^nw^{R} \mid w\in \{c,d\}^*,\ n>0\}$.
For a) I think this grammar solves it :
\begin{align*}
S&\to c... |
I have a path from node 1 to node n, which I can represent as a set:
S = {1, 2, ..., n-1, n}. I want to efficiently generate the set of all subpaths from 1 to n. For instance, for n=5, we have S={1,2,3,4,5}.
So all the subpaths are as follows:
{{1,2},{2,3},{3,4},{4,5},
{1,2},{2,3},{3,4,5},
{1,2},{2,3,4},{4,5},
{1,2... |
A quine is a program that outputs its own source code without taking in any input. An example would be this (taken from here)
public class Quine {
public static void main(String[] args) {
char quote = 34;
String[] code = {
"public class Quine {",
" public static void main(String[] args) {",
" ... |
I need to create an algorithm that is going to create a shakespearean sonnet for a specific theme. This theme should be generated out of twitter tweets that have some hashtag.
My current idea goes like
While training:
break up sonnets and other kinds of poems into words (or charachters, have not decided yet)
extract ... |
I asked a question earlier about Saving to the Database, which was very general and about the requirements for a proof when you go through many layers of non-verified systems such as the network and databases.
In this question I am wondering about a more middle-level proof, this time about transforming an object $f : A... |
I am working with a u-net, a variation of the more commonly known fully convolutional network for semantic segmentation. For training a u-net, I was given the suggestion that I should use a pre-trained network. But, I'm not quite sure how this makes sense.
My understanding is, in pre-training, we freeze the network up... |
This line from Wikipedia made me want to ask this question:
There is, however, no general procedure for determining whether an expression involving looping instructions will halt, even when humans are tasked with the inspection. The theoretical reason for this is the undecidability of the Halting Problem: there cannot... |
I'm very new to this so please bear with me.
I found this document describing the PFX language, a stack-oriented language where the instructions act on a stack and replace the arguments with the result.
The image is supposed to be the rules describing the logic of a PFX program, but being very new to logical symbols, I... |
Also, what's the difference between transforming a problem into another problem and doing a reduction? They sound synonymous to me. Thank you!
|
I'm reading Fischer et al.'s Impossibility of Distributed Consensus with One Faulty Process, and I don't quite follow 2 points:
The first is in the proof of Lemma 3, pg. 378:
Otherwise, $e$ was applied in reaching $E_i$, and so there exists $F_i ∈ \mathscr{D}$ from which $E_i$ is reachable.
Why does there exist $F_i ... |
I was thinking about the max-clique problem and the k-independent set problem. You can show that k-independent set is reducible to max-clique easily and you can show that max-clique is reducible to k-independent set (with a simple for loop). And k-independent set is NPC, so wouldn't that mean max-clique is also NPC, bu... |
is the string epsilon(empty string) accepted by this NFA ?
|
I have stumbled across these 2 problems
$L_1= \{\alpha \mid w \in \{a,b\}^* | \alpha $ has exactly 2 b's$\} $ ,prove that $L =\{ \alpha^n | \alpha ∈ L_1 ,n \ge 0 \}$ is not context free
Given : $P= \{\alpha \mid w \in \{a,b,c\}^* | \alpha $ is palindrom with even length $\} $
and $L_2= \{\beta b^n| b$ ∈ $P^n$ a... |
I have a a data set with 2598960 elements of of unsigned integers of (at most) 52-bit length. The data set has a property that exactly 5 bits set.
This is only 1 data sets – I have similar data sets of integers with exactly 6, 7 and 9 bits set.
Given this peculiar property of the data set, is there a way I can create a... |
I am trying to do a dot product of two vectors of each 128 dimension. I am just looping each member and calculating the sum.
public Double dotProduct(List<Double> v, List<Double> u) {
Double dotProduct = 0;
for (int i = 0; i < 128; i++) {
dotProduct += v.get(i) * u.get(i);
}
return dotProduct;
}... |
Input: An array $a$ of integers $[a_{1}, \cdots, a_{n}]$, and a positive integer $k$.
Output: The the top-k products of pairs in $a$.
Example: $a = [7,6,5,4,3,2,1],k=3$ , output $(42,35,30)$, with corresponding pairs $(7,6),(7,5),(6,5)$.
A naive solution would can be done in $O(k^{2}\log{k} + n\log{n})$, which sort the... |
This is the pseudocode on wikipedia for Hoare's partitioning scheme:
algorithm partition(A, lo, hi) is
pivot := A[lo]
i := lo - 1
j := hi + 1
loop forever
do
i := i + 1
while A[i] < pivot //Question here
do
j := j - 1
while A[j] > pivot
... |
In general, the idea for simulation a turingmachine using a PDA with two stacks, is to use one stack representing the already read input and the second stack representing the unread part of the input.
To do so we need to read the complete input into one of the stacks.
If we use a nondeterministic PDA we are able to re... |
Short story
I am currently trying to implement LPA* in an existing navigation system and find the algorithm seems to loop forever, expanding the same vertices over and over again. I am wondering what is causing this to happen, and what I can do to rectify this.
Long story
The navigation system uses Dijkstra so far. As ... |
I understand the following (correct me if I'm wrong):
Statements
Luma as the weighted sum of RGB gamma corrected components, but luminance is the weighted sum of RGB linear components.
The gamma correction has two forms: gamma compression and expansion. When we want to encode luminance into imaging systems, we turn it... |
Can someone explain how do we find these parity bit errors?
|
Let $M$ be a one-band TM and $w$ a word. We say that M tries to move the head over the left margin of the band if, while the head is in the leftmost position of $w$, the TM $M$ tries to move to the left.
Show that the language
$ LEFT_{TM} = \{<M,w> | $ M is a TM of the type above $\}$
is not decidable.
How can I show t... |
Suppose that we are given a list of non-zero integers $(a_1,...,a_n)$ and we want to decide whether there exist $(x_1,...,x_n)$ such that
$x_1a_1 + x_2a_2 + ... + x_na_n = 0$,
$x_i$ $\in$ $\{-1,0,1\}$, with at least one $x_i \neq$ 0.
Note that this is not the same as PARTITION, where the restriction $x_i \in \{-1,1\}$ ... |
Is there an algorithm that, given an undirected graph, finds an independent set of size n (where n is less than or equal to the total number of vertices)?
|
In multi-armed bandit problem, we have a set of $K$ arms. In each round $t$, a bandit selects an arm $k$ and receives a reward $r_{kt}$. The objective is to maximize the rewards after $T$ rounds.
My question: Does selecting the same arm in two different rounds leads to the same reward? Or the rewards are completely dif... |
I found the toom-cook algorithm here: http://www.cs.cmu.edu/~ab/Desktop/15-211%20Archive/res00037/Multiplication_1_print.pdf
and have been trying to chase down proof of it being correct, but can't find anything. Does anyone know how to go about proving the algorithm? I was thinking induction but I can't even figure out... |
The question and its answer is given below:
Let $S = \{ \langle M \rangle \mid \text{$M$ is a $\textsf{DFA}$ that accepts $w^{\mathcal{R}}$ whenever it accepts $w$}\}$. Show that $S$ is decidable.
Answer:
For any language $A$, let $A^{\mathcal{R}} = \{w^{\mathcal{R}} \mid w \in A\}$. If $\langle M \rangle \in S$, then... |
In knapsack problem, we have some items with some values and weights. We also have a knapsack with a specific capacity, and we intend to fill the knapsack with these items. The main objective of this problem is to maximize the value of items in the knapsack.
Knapsack can contain maximum 11 kg items
item1: value(1) wei... |
I am implementing the multiphase level Chan Vese algorithm. I am using IPOL document as reference (http://www.ipol.im/pub/art/2012/g-cv/article.pdf)
Everything is clear for me, except the stopping criteria: In one level set, the method is terminated by calculating the difference between phi(n+1) and phi(n), and stop if... |
Why are the words in a cache line adjacent to one another?
Does this arrangement improve reading/writing performance or are there other reasons to justify this choice?
|
We can compute Fibonacci numbers by means of dynamic programming approach. If we do not store intermediate solutions, we cannot use them for future necessities. In this case, asymptotic complexity reaches exponential time.
f(5) -> 2^0
/ \
/ \
f(4) f(3) -> 2... |
I am looking for a direct proof (i.e. without going through ABPs) that if $f(\bar{x})$ has an arithmetic formula of size $s$ then it is a projection of an $O(s)\times O(s)$ determinant.
It seems possible using induction on $s$.
The basis, when $s=1,2,3$ is trivial.
Suppose we proved it for size $s$ formulas and let $f$... |
Input: Given a bitset $b$, which is is an array of 0s and 1s, of length $L$, and a positive integer $k$.
Output: the total number of 1s in the first $k$ position of $b$.
Obviously it can be done in $O(k)$, is there any more efficient way in C++ such as $O(\frac{k}{W})$, where $W$ is the word size of the machine? Note t... |
There are many different computational models, e.g. Turing machines, register machines, lambda calculus, etc.
I am wondering if there exists an axiomatization of computation, that abstracts away from the specifically constructed computational model.
I.e. is there a more general theory about computation that deals wit... |
Note: I know the numbers are arbitrary, but this problem about this size has practical implications. It is an applied algorithm problem.
Suppose you have 200 bins. Each bin would be very happy to have the integer sequence: 1, 2, 3, 4, 5, 6, 7, 8, 9. And the algorithm would be very happy if all bins get that.
The algori... |
Suppose that we are given $f_1(x),...,f_n(x) \in \mathbb{Z}[x]$. Decide whether there exist $a_1,...,a_n \in \mathbb{Z}$ such that
$\sum_{i=1}^{n} a_if_i(x) = p(x)^2 $
$p(x) \in \mathbb{Z}[x]$.
In other words, decide whether there are integer coefficients such that a linear combination of the given polynomials is a ... |
Multiple resources, such as Wikipedia, state that if you have an $m$-bit Bloom filter with $n$ elements inserted, then the optimal number $k$ of hash functions to use is
$k = \frac{m}{n} \ln 2$
This is very counterintuitive. If $m$ is the number of bits in the filter, then as you increase $m$, why would the optimal num... |
I am writing a small RPN calculator that works on some stacks concurrently. For example, if I have two functions:
add-int(a: int, b: int): a b +
add-float(a: float, b: float): a b +
and I have two stacks with the following:
Int [1 2 3]
Float [4.0 5.5]
I can just do:
add-int add-float
and the new stacks will be:
Int ... |
The algorithm I'm referring to is one of the most fundamental primality checks: For a number, $n$, check if it is divisible by some odd number, $k$, less than or equal to $\sqrt{n}$. Assume $n$ is a fixed size and that all basic arithmetic operations (add, subtract, multiply, divide, remainder) run in $O(1)$. I don't s... |
I was reading up on the set partition problem on this site of Wikipedia: https://en.m.wikipedia.org/wiki/Partition_problem
Among other things, they present a DP approach to solving the equal subset sum problem for 2 subsets by finding a subset that sums to half the total sum of the set. Below the algorithm they state t... |
As you can see from the title this is the impression that i have on this problem, but probably it isn't impossible.
The required DFA is :
"The set of the strings with equal number of 0 and 1 such that for each prefix the difference between the number of 0's and the number of 1's is minor(<) than 2".
Maybe I've misread ... |
Let's say you have a graph like this:
The largest subset of nodes so that every pair of vertices have an edge between them is $\{3, 5, 7, 12\}$. The second largest subsets are
$\{4, 7, 21\}$,
$\{3, 5, 7\}$,
$\{3, 5, 12\}$,
etc.
Is there an algorithm to find the largest subset efficiently?
Also, keep in mind that I ... |
I've been reading this paper: https://ac.els-cdn.com/S0304397511002623/1-s2.0-S0304397511002623-main.pdf?_tid=bc074517-2b81-4d37-bc92-a5c20dba6b23&acdnat=1527946614_083eb7104693637d83e7d26751a7d23e
where it talks about the interval scheduling problem but with n processors for k jobs.
I was wondering if there's a proof... |
First a simpler question: let $q_{1}(k),\dots,q_{n}(k)$ be $n$ polynomials of degree smaller or equal to $n$.
Let $f(n): \mathbb{N} \rightarrow \mathbb{N}$ defined by $f(n) = \sum_{i=1}^{n}q_{i}(n)$.
Assume also $0\leq f_{i}(n)\leq n$.
What is the time complexity as a function of the input size for calculating $f(n)$ b... |
Suppose we have two processes P0 and P1 using Peterson's Algorithm to access a critical section.
Process P0 starts executing and sets its interested to TRUE and turn is set to 0. A context switch happens right after and process P1 starts executing. P1 sets interested[1]=TRUE and turn=1. But since process P0 is also int... |
The following is a screenshot of a lecture slide from my programming language concepts course:
According to Wikipedia and other sources, a regular grammar is one that is either left linear or right linear, meaning it has at most:
one nonterminal symbol on the left end of its right hand side
e.g., A -> Ba
one nonter... |
I have read many resources, but I cannot understand what the polynomial-time reduction is. In everywhere, this is explained with standard-pattern sentences.
Please can anyone explain it in detailed version ?
|
Given a symmetric real $n \times n$ matrix $A=(a_{ij})$, is there an algorithm which computes the sum $$\sum_{i,j,k}\max(a_{ij},a_{ik},a_{jk})$$ over all $1\leq i<j<k\leq n$ with time-complexity better than $O(n^3)$?
|
How do I write context-free grammars for the following languages?
$B_2 = \{0^n1^n \mid n > 0\} \cup \{0^n1^{2n} \mid n > 0\}$
$B_3 = \{a^nb^mc^k \mid k = n+m\}$
Can someone help me? I'm not sure how to deal with the exponents.
|
Show that the Post Correspondence Problem (PCP) is decidable over the unary alphabet ? = {0}.
|
TL;DR: Is an implementation of the Heap's Algorithm adhering to the principals of functional programming possible, and are any implementations of it known? And by "adhering to the principals of functional programming", I mean mainly not relying on the mutation of an object to carry out the algorithm.
I decided to wri... |
In the code below, three processes are competing for six resources labeled A to F.How can I modify the get request in each procedure in this graph to avoid dead lock You cannot move requests across procedures, only change the order
inside each procedure.
|
$\mathsf{EXP}\not\subseteq \mathsf{DTIME}(2^{n})$ and $\mathrm{CIRCUITSAT}\in \mathsf{DTIME}({2^{n}})$ holds and so why does $\mathsf{NP}\neq \mathsf{EXP}$ not hold while we know $\mathsf{NP}\subseteq \mathsf{DTIME}({2^{n}})\implies \mathsf{NP}\neq \mathsf{EXP}$?
Does $\mathrm{CIRCUITSAT}$ in any of $\mathsf{DTIME}(\fr... |
I have difficulties understanding how a TM could count number of characters. I have this problem where the input is made out of characters $\{a, b\}$ and I need to accept if there are $n$ characters of type a in the string. The formal definition for the input language is:
$$ L=\{ \{w,n\}\in\{a,b\}^*\times \mathbb{N} \... |
The Strassen algorithm is developed for multiplying the matrices faster. It enables us to reduce O(n^3) time complexity to O(n^2.81).
However, this algorithm is applied for the matrices which are square and the dimension of the matrices must be a power of 2.
Assume that the matrices are called A and B.
Problem 1: A = 3... |
I'll describe the problem below, I'm not sure if it's an exist algorithm problem. The problem is from a small game.
Here is a matrix, probably with some cells blocked(couldn't pass through)
There are several pairs of numbered points
connect each pairs of points with right angle lines, the lines shouldn't intersect
lin... |
The question is about an operator that transforms any CTL* formula ${\psi}$ into a (not necessarily equivalent) LTL formula ${A\psi^d}$, where $d$ means syntactically removing all $A,E$ quantifiers from ${\psi}$.
Is it true that this operator preserves logical equality, i.e.
${\psi_1}\equiv_{CTL*}{\psi_2}\implies {A\ps... |
Recently I stumbled across this language $L=\{a^{n}a^{{(n + 1)}^2-n^2} \in \Sigma^* \mid n\geq 0\}$ that I can rewrite as $a^{3n + 1}$.
So I applied the pumping lemma to see if it is non regular, and I get:
given a pumping length p I should have a string $z\in L$ such that $\mid z \mid \ge p$
I choose $z=a^pa^pa^pa$ s... |
If $$ A_n = \{ x | n \in W_x\} \ where \ W_x \ is \ domain \ of \ M_x $$
how can I show that
$$ \forall i,j \ \ \ A_i \le_M A_j $$
|
While going through Church's text on Lambda calculus , I cam across the first set of conversion rules .
Before writing out my query I would like to put the notation that church has used for substitution which is as follow :
$\ S$ $^x_yM $ means the act of substituting $y$ in place of $x$ all through out $M$ .
(I ... |
I'm reading "Decibel: Isolation and Sharing in Disaggregated Rack-Scale Storage" (PDF). On page 6, the author illustrates the concept of "Extended Logical Block"), which is similar to "Data Integrity Field" provided by SCSI devices.
I directly quote the text here:
Several enterprise SCMs support storing per-block met... |
The algorithm for topological sort, in CLRS goes as follows :
call DFS(G) to compute finishing times v.f for each vertex v
as each vertex is finished, insert it onto the front of a linked list
return the linked list of vertices
Let's we have a directed graph, as in the figure here:
If we start DFS from arbitrary ver... |
Nodes in the open list in A* will be sorted by their f-cost, but if the f-cost of two nodes are equal, will their h-costs instead be compared? I'm asking because I've seen implementations where the h-costs are compared and where they aren't, so which version is the right one? What is the benefit of doing either?
g-cost... |
The following problems live in integer domain.
I want to find a subset of $\{x_0, x_1, \ldots, x_{n-1}\}$ such that the subset's elements sum to any number in a prescribed interval $[X,X+k]$, $k\geq 1$.
We call the above problem A.
An obvious approach is to solve $k+1$ standard subset sum problems with targets $X, X+1... |
The definition my professor gave us is: f(n) is O(g(n) for constant c > 0 and n0 ≥ 0 where all n ≥ n0 and f(n) ≤ cg(n). I was wondering what n0 and n are?
Example:
for the function f(n) = an2+ bn + cn = (a+b+c)n2.
Assuming a,b,c were constants we can say: f(n) = O(n2) where f(n) ≤ cn2.
What am I actually looking and ... |
Given undirected, connected graph, find all pairs of nodes (connected by an edge) whose deletion disconnects the graph. There can't be an edge connecting a node to itself.
The problem seems similar to finding articulation points of a connected, undirected graph - yet with a twist, that we have to remove a pair of ver... |
does anybody have a basic reference (if it is possible) that explain how to mathematically model the state of a network. I assume that it goes like modeling a graph that is composed by nodes and edges. I need to handle the process of each node are doing.
What I have already in mind it is:
- each node can execute a set ... |
I often find flights through a search engine like Google Flights. On input some refined subset of the space of all flights (e.g., non-stop only, departing in the morning, from one of two airports, and on a certain date) the search engine returns the cheapest flight in this subset. My goal using the search engine, howev... |
I've just recently found out about KRR (Knowledge representation and Reasoning) and ASP, not hearing a thing about them before (except a bit about prolog). I've read a bit about them and one of their primary usage seems to be AIs.
My question would be how widely used ASP or other declarative languages are, is there som... |
So the expression $\Gamma \ \vdash \ e:\sigma$ states that under assumptions $\Gamma$, the expression $e$ has type $\sigma$. Then we have the following rules:
\begin{array}{cl}\displaystyle {\frac {x:\sigma \in \Gamma }{\Gamma \vdash _{D}x:\sigma }}&[{\mathtt {Var}}]\\\\\displaystyle {\frac {\Gamma \vdash _{D}e_{0}:\ta... |
This answer explains roughly how to convert a nested boolean function into a Binary Decision Diagram (BDD). This question is about how to structure the states for the BDD. Now in this question I am trying to understand how to process the program states using a set of Binary Expressions I have (a specification), in Comp... |
The book says that a total time required for a pipeline with k stages to execute n instructions is as follows.
$T _{k,n} =[pqnk+(1-pq)(k+n-1)] \tau$
p is the probability of encountering a branch instruction.
q is the probability that execution of a branch instruction I causes a jump to a nonconsecutive address.
(Each ... |
Suppose we are given an $n\times m$ matrix $M$ of positive integers. The adjacent cells of a particular cell is the up, down, left and right cells. Like for cell $M[i][j]$ the adjacent cells are $M[i-1][j]$, $M[i+1][j]$, $M[i][j-1]$ and $M[i][j+1]$ respectively.
An area is a set of cells such that for each pair of cel... |
Say I have these defined functions:
function a(x, y, z){
var q = b(y)
q = c(q, z, x)
q = d(q)
return q
}
function b(x) {
var q = e(x)
q = f(q)
return q
}
function c(x, y, z) {
return x + y * z
}
function d(x) {
return x * 10
}
function e(x) {
return x + 5
}
function f(x) {
return x - 3
}
I w... |
In learning about Timed Automata, Coloured Petri Nets, and Process Calculi, I am wondering what the benefit is of having the Petri Net transition be a separate type of node in Petri Nets.
It seems that you can model the same stuff (eventually) using Timed Automata or Process Calculi, which both only have states and tra... |
I have searched a lot for this, but apparently there is no result on calculating any bound on the error $||Q-Q^*||$ when I stop Q-learning after say $N$ iterations ($Q$ is the vector of Q-values at current iteration and $Q^*$ is the optimal Q-value). Let's assume that you have visited each state-action pair at least on... |
I have an exercise in my algorithm's Course for which I have the correction but do not understand it.
1.Exercise .
Let Th be a full binary three of height h(meaning all the levels all completely full).
(1.a) : Let f(h) be the number of leaves of Th(nodes of the last level).
Establish a relation for f(h) and solve it... |
In our programming language concepts course, our instructor claimed that it's okay for a final state to lead to another state in a finite state diagram.
But this seems to be a fundamentally contradictory concept. Because a final state by definition is one that terminates transitions, i.e., that once you reach it, there... |
The Theorem and its proof is given below:
But I am wondering why we write "Ignore the input " when describing an Enumerator? could anyone explain this for me please?
|
I am familiar with the decision tree based argument for the minimal number of comparisons required to sort $n$ distinct elements - Since there are $n!$ permutations on the $n$ elements, the decision tree for any comparison based sorting algorithms must have at least $n!$ leaves, and therefore at least one path of lengt... |
I have $n$ items arranged on a straight line (like a number line, items can only move 2 directions). The each item has a size, some distance around their center position, that can't overlap with other items. They also cannot cross each other.
The problem:
We have a set $S$ of positions (of size $\leq n$). We need to... |
What's the intuition behind a ''Graph fourier transform'' ? I'm not so much interested in mathematical details or technical applications. I'm trying to grasp what a graph fourier transform actually represents,and what aspects of a graph it makes accessible.
To clarify the issue:
Graph-structured data appears in many mo... |
I'm looking for an algorithm, a set of algorithms, or any pointers/remarks how to solve the following problem:
Given a polygon, a central point, and a set of points scaterred around the central point inside the polygon, I want to find the nearest "edges" being created by those points with respect to the central point. ... |
How could I prove that the following language is decidable?
$\{\langle G\rangle \mid G\ \text{is a CFG over}\ \{0,1\}\ \text{and}\ 1^* \subseteq L(G)\}$
P.S.
It's the problem 4.15 of the third edition of the "Introduction to the Theory of Computation" by Michael Sipser.
|
given a Kripke Structure I want to check if a CTL formula is satisfied or not.
the CTL is: $$ AG(c \vee AX\neg E((a\vee b)Uc)) $$
I have read that it is better to write to CTL in terms of $\wedge $ and E so for instance for an inner part $AX \neg E((a\vee b)Uc) $ I have re-written as: $$ \neg EX\neg(\neg E(\neg(\neg ... |
I'm just wondering where the phrase "throwing" an exception came from. I understand "raising" an exception but I'm wondering if "throwing" has a reason or meaning behind it?
|
From reading (1) below, it seems they have implemented an abstraction layer on top of the code that does what the code already does to some degree. They built an Expression class for symbolic integer manipulation, and they replace any native integer calls with these in their symbolic execution.
Wondering what it takes ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.