instruction stringlengths 35 29.1k |
|---|
Suppose we are given a set of agents (say $P_1 , \dotsc, P_M$), an undirected graph G(V,A) and a set of initial vertices on $G$ where each agent is located. Initially only the edges connected to these initial set of vertices are globally known to all agents. At each step, the agents can traverse an edge connected to t... |
I could of course construct a truth table for the function
$$f(x) = \left(\sum_i x_i\right) \leq k$$
Where $x$ is an assignment and I'm slightly abusing notation to count Booleans. And then I could make a formula from that.
But if there are $n$ variables then this truth table will have $2^n$ rows, rather unwieldy. Even... |
Theorem 11.4 For any constant $\delta > 0$, every problem in NP has probabilistically checkable proofs of length poly($n$), where the verifier flips $O(\log n)$ coins and looks at three bits of the proof, with completeness $1-\delta$ and soundness $1/2+\delta$.
Moreover, the conditions under which Arthur accepts are... |
I have heard whisperings that if we have a turing machine that is allowed to compute infinitely many steps in finite time, then we can solve the halting problem.
This made me wonder, if we have such a TM, do Godel's incompleteness theorems then not hold anymore?
My intuition is: If the TM can make an infinite amount of... |
Consider the code $C=\{c=(c_1...c_n): c \in \Bbb F_q^n, c_1=c_n\} \subset \Bbb F_q^n$.
I was able to prove that the code is a linear code because it is closed under addition and scalar multiplication.
Also, it is clear that the length is n.
However I am having a hard time with minimum distance, dimension, and size.
F... |
We solve Matrix chain multiplication problem considering the optimal solution to subproblems but what I cant get through my mind is how this problem has an optimal substructure?
For eg. consider if these are optimal solutions for matrices A1.A2.A3.A4.A5.An:
(((((A1.A2)A3)A4)A5)A6)An) (((((A1.A2)A3)A4)A5)(A6.An))
If ... |
I have to write an algorithm for a following problem. I have a function that has 2 parameters: an array of 32 bit unsigned whole numbers - bit vectors [ARR] and distance[dist]. We need to find how many 32 bit numbers x there are such that they are differing from each of the bit vector for the most dist bits.
Example: W... |
I am working on a small project. The goal is to implement a compiler from a quite simple, custom syntax of logical formulae (including variables over finite domains) to conjunctive normal form (CNF). The compiler should for every formula $\varphi$ from the custom language produce a standard propositional formula in con... |
Gödel's first incompleteness theorem states roughly that "for any axiomatization of arithmetic, there are statements that can neither be proven to be false nor true."
Does this still hold when it comes to quantifier-free statements?
I.e. if we have the structure of arithmetic: $(\mathbb N, +,\cdot, 0,1)$, and we restri... |
Suppose I have two union-find trees with roots $x$ and $y$ respectively. I want to join them in constant time (this is normally possible since I already "hold" the roots) but I need $x$ to be the root of the merged tree. I don't know what rank $x$ or $y$ have (or more precisely formulated I need this to work always - f... |
I need to write a function that gets an array of bytes at the input and 2 integers (minDist and maxDist). The calculation algorithm understands this field as a bit sequence starting from the LSB (least significant bit) of the first byte and ending with the MSB (the most significant bit) of the last byte. Therefore, for... |
Given a list of $n$ non repeating integer numbers $L:=(x_1,\dots,x_n)$ develop an algorithm that decides if there are $x_{i_1},x_{i_2},x_{i_3}\in L$ such that $i_1<i_2<i_3$ and $x_{i_1}<x_{i_3}<x_{i_2}$. Only a yes-no answer is required.
The statement also suggest to use the "divide & conquer" strategy.
My try was th... |
Is there a cryptographic (or even not entirely cryptographic) way of exchanging objects between Alice and Bob that would not require a third party, and Alice and Bob would not need to trust each other? For example, Alice and Bob have Y and X objects (some information) and want to exchange them (in other words both Alic... |
I have a field $X$ of given length $n$ which is filled with zeroes in the beginning.
I only need these 3 simple operations:
GET_VALUE$(i)$: returns the value of $i$-th cell ($X[i]$)
SET_TO_1$(i)$:basically $X[i] \leftarrow 1$ for $i < n - 1$, otherwise nothing (the last cell of $X$ is always zero ($X[n-1] = 0$))
FIND$... |
I'm going over the different types of attributes in data-mining (nominal, ordinal, discrete, etc) and there is one example in the book that states that the density of a substance in grams per cubic centimeter is a discrete attribute. Why is this? I confuses me that this is the case but it also says that the distance fr... |
I am making a webapp that alerts when product prices fall or rise above a number. Let's say a product costs 100 and the user wants to be alerted when it reaches 80, the prices change every hour or so and I need to trigger all the alerts. What is the best way for this to make this work.
What I have tried so far?
Approac... |
what is the Big O for Returning List? aka return list (e.g. list=[1,2,...])
is it o(1) or o(n) and is there a good website for average big o for different operations including sorting for simple types like list or arrays, etc.
|
Let B={M1,M2,...} be a Turing-recognizable language consisting of TM descriptions. Show that there is a decidable language C consisting of TM descriptions s.t. every machine in B has an equivalent machine in C and vice versa.
I saw a hint on solving this question which is given in the following picture:
But I have a d... |
I have an essay question and I just want to make sure I have things right.
2 trains need to be able to communicate with eachother at any time.
Based on research i've settles on a wired network running along the tracks, with wireless access points. These converge on a central location which houses the switches/router t... |
Is it possible for a $DFA$ which has $n$ states that, there exists two distinguishable states $p, q$ such that there exists a distinquishing string between $p$ and $q$ whose length is greater than $n$?
|
I'm currently studying the Bakery Algorithm. I understand it for what it is but now I want to switch it up a bit.
If we changed the < in the 2nd while() loop to ≤ what exactly would happen?
My take: I don't think it'll cause starvation but I think I'm wrong.
Thanks for taking the time to read.
do {
choo... |
The language $\{w \mid w \in \{0,1\}^{*}\text{ and }M_w\text{ accepts infinitely many inputs}\}$ is undecidable, where $M_w$ is the Turing machine represented by $w$.
I am confused because I do not know how to reduce this problem. Maybe it works with the complement of the Halting problem?
|
How to prove for all $i\in\mathbb{N}$, there exists a language $A\in\mathrm{EXP}$ such that no family of boolean circuits of size $n^i$ decides $A$?
I have a reminder that says
$$ \mathrm{EXP} =\bigcup_{c\in\mathbb{N}} \mathrm{DTIME}\left(2^{n^c}\right). $$
Thought of building a TM that on input $x$ of size $n$, finds ... |
Based on this video, the tutor explains the knapsack problem with dynamic programming approach. One thing is not cleared in this video, which is my main question.
All the values on the first row (except 0) are set to 1 because value and weight (on that row) are 1 hence, we cannot exceed that number
Below is the compl... |
Apologies for the newbie question, but I am a bit confused about what exactly counts as a "simple operation" when working out the time complexity of an algorithm. In particular, why do we consider all operations to be equal?
Surely, dividing two very large numbers is more time-consuming than adding one to a number (as... |
It's often regarded that the most intuitive answer to the question of $P$ vs $NP$ is that $P ≠ NP$. This is often illustrated with some consequences that would follow if $P = NP$ were true. Things like being able to find a proof for the Goldbach conjecture in polynomial time (if one exists), and so on.
However, are the... |
Show that the single-tape TMs that can not write on the portion the portion of the tape containing the input string recognize only regular languages.
The first part of the answer in a book said that:
We give a DFA $A$ that is equivalent to TM $M$. Design $A$ in two stages.
We arrange the states and transitions of $A$... |
As said in the title, I have to generate an AST from a grammar and logic (or a"syntax" if you prefer). This grammar and syntax are both indefinite in the program, meaning that it is the user (a developer in this case, because it would not be useful to a"normal" user) must write what it takes in a file for the program t... |
I am going through the text
from "R.Brachmann and H.Levesque: Knowledge representation and reasoning".
Here it has been described(in page 15) that there are two types of symbols : the logical symbols and the non logical symbols.
Logical symbols are the ones that have a fixed meaning and the non logical ones are the on... |
Having a graph and all of it's strongly connected components, I was wondering what the most efficient way to find arcs that connect two SCC. All the solutions I found involve running through all the nodes, and I was wondering if there was a way to do it without having done that, in particular, during the Tarjan algorit... |
I've seen competing requirements in the definitions for one-way functions. Namely
$$
\underset{x,r}{\mathbb{P}}\big(f(B(f(x),r)) = f(x)\big) = o(n^{-c})
$$
and
$$
\underset{x}{\mathbb{E}}\left[\underset{r}{\mathbb{P}}\big(f(B(f(x),r)) = f(x)\big)\right] = o(n^{-c})
$$
where $x\in\{0,1\}^n$ and $r = \text{poly}(n)$. $B$... |
I would like to implement Conway's game of life on a grid that is infinite in all directions. It should be initialized with an initial pattern and then run, e.g, like this:
set(-500,200)
set(-501,201)
set(-502,202)
start()
What data structure should I use?
Matrices usually start with (0,0). One solution is to keep tra... |
We all know the algorithm that solves the Generalized Geography problem using polynomial space (it's described on wiki). My question is: what is the time complexity of this algorithm? I'd like a more precise answer than just 'polynomial'. As far as I understand, we're making $|V|$ calls at most? We won't call the funct... |
Suppose that I have a restricted Turing Machine - it has finite tape and takes bounded input. Consider a program that halts on every input (which is at most $k$ bits). The set of inputs is finite, therefore the function describing running time is bounded and hence is $\mathcal O (1)$.
Therefore, when analyzing any alg... |
I've started learning cryptography in class and we've come across One-Time-Pads, in which the key (uniformally agreed upon) is as long as the message itself. Then you turn the message into bits, do $XOR$ and get the cipher text. This encrypts the message and to decrypt the message you'd do $XOR$ with the cipher and ke... |
So I was reading Micheal Sipser's Introduction to TOC and when I stumbled upon this aforementioned question , he'd the following dfa :
Now, I came up with a much better DFA with only 4 states :
I read in another thread that the minimum number of states for a DFA for this language is 8. But , I came up with 4.
Where ... |
I'm taking an artificial intelligence class and in one of the recent lectures the topic was local search algorithms, more specifically Hill Climbing. At one point the professor showed the classic 8-queens puzzle to illustrate the algorithm working, he stated that in it a queen can only move one row up or down, so for e... |
I have been reading about compilers and it is said that doing the data flow analysis in the basic blocks is more optimal.
Sadly, quoting the exact source, would be slightly hard as it is not in English, but a quote from wikipedia can also be used:
Data-flow analysis is the process of collecting information about the wa... |
I'm trying to count the number of subsequences of a long string.
e.g. BANANA -> B, A, N, BA, BN, AA, NN, NA, BAN, BAA, BNA, BNN, ANA, AAA, NAN, NNA, etc
There's the horribly inefficient way, which is to iterate all of the substrings and keep hash of some sort to keep track of the ones already seen. The size of the hash... |
I understand that every regular language can be generated using either a right-linear or left-linear grammar, however, does that go the other direction? In other words, do there exist any context-free grammars that are not regular that are either right or left-linear?
|
Prove that the language $L_1 = \{a^ib^{2i}c^j \;|\; i,j ≥ 0\}$ is context-free.
I have a grammar like this but there are some strings that are not be able to be generated
$$\begin{align}
S &\to aSbb \;|\; C \\
C &\to cC \;|\; \epsilon
\end{align}$$
One example is the string $abbc$ cannot be generated.
|
Let $G=(U \cup V, E)$ denotes a bipartite graph. A biclique $C = (U, V)$ is a subgraph of $G$ induced by a pair of two disjoint subsets $U' \subseteq U$, $V' \subseteq V$, such that $\forall u \in U', v \in V': (u, v) \in E$.
I'd like to identify the minimum number of bicliques such that the nodes on one side of the b... |
I don't know how to find a loop invariant. I'm not sure where to start. Can anyone find the loop invariant of the given program and explain your method please.
{n ≥ 0 ∧ i = 0}
while i < n − 1 loop
b[i] := a[i + 1];
i:=i + 1
end loop
{∀j.(0 ≤ j < n − 1 → b[j] = a[j + 1])}
|
I've seen competing claims about hard-core predicates. On the one hand, there's the basic definition
Let $f : \{0,1\}^n \rightarrow \{0,1\}^k$ and $b : \{0,1\}^n \rightarrow \{0,1\}$ be computable in polynomial time. We say that $f$ is a one-way function with hard-core bit $b$ if, for all randomized algorithms $B$ and... |
Subset sum can be solved with dynamic programming in pseudopolynomial time O(mn) which is subexponential. And, of course, subset sum problem is NP-complete. Why doesn't that contradict the Exponential time hypothesis?
|
I am learning multi paxos from the slides of this made by John Ousterhout and Diego Ongaro.
In this section talking about Full Disclosure, it says the acceptor mark entry 6 as chosen, since the proposer tells it, with the same proposal 3.4 and firstUnchosenIndex 7.
My Question is: As you can see, proposal 3.4 is for e... |
Let $M_1$ and $M_2$ be two deterministic finite automata with $M_1$ having $n$ states, and $M_2$ having $m$ states, over the same alphabet $\Sigma$. Show that if $M_1$ and $M_2$ are not equivalent, then there is some string $\omega \in \Sigma^*$ of length at most $n \times m$ that is in exclusively $M_1$ or $M_2$.
It i... |
I want to generate a dataset of binarized masks of scene-text images to use them to train a model. I have no previous experience in dataset synthesization especially related to font-rendering.
Can anyone provide me some links to articles/blogs/related-github-projects?
|
So i know that it cannot be used if the directed graph has negative cycle, but what about the undirected graphs with negative edges?
is it going to always work, or sometimes or never?
|
Is the following problem computable in polynomial time?
Input: $<M_1>$, encoding of a determinstic TM that runs in polynomial time ($L(M_1)\in P$)
Output: $<M_2>$, encoding of a determinstic TM that runs in polynomial time ($L(M_2)\in P$), and satisfies:
$L(M_1)=L(M_2)$ (they decide the same language)
$\forall n\exist... |
I have 2 images of a scene taken at one moment by two identical cameras (similar cameras intrinsic parameters) by to arbitrary locations and at two arbitrary orientations (different cameras poses).
On the images n points correspondence p_i1={x_i1, y_i1, z_i1}↔p_i2={x_i2, y_i2, z_i2}, i=1,2,...,n are given. Let for simp... |
Given $n$ inputs and $k$ outputs and $j$ identical binary function calls to $g$, how many possible distinct single-assignment forms are there?
The only assumption made about $g$ is that if $a = c \wedge b = d$ then $g(a, b) = g(c,d)$.
Each SSA form consists of two parts. The first is a temporary assignment part:
t1 ... |
A few years ago I made a pseudo-random number generator to use in a monte carlo simulation for a lecture in my University.
My instructor ask me why I did that generator instead of using C equivalent rand.
The algorithm is $x_{n+1} = e^{x_n + k} \mod 1$ using float point values with $K$ big enough to contain a complete ... |
I read the book "Introduction to the Theory of. Computation, Third Edition by Michael Sipser".
It says:
If a language is context free, then some pushdown automaton recognizes it.
Let A be a CFL. From the definition we know that A has a CFG,
G, generating it. We show how to convert G into an equivalent PDA, which we
ca... |
If we consider this tree with T1 and T2 as subtrees, and we want to rotate on x (rotating the edge between T1 and x), what is the result? how does it work then? Does the x stay in its place and T1 switch with T2? I saw multiple examples online but they had too many nodes and i couldn't really understand the concept o... |
How would I reduce $A_{TM}$ to $CF_{TM}$ when:
$A_{TM}=\{<M,w>|M$ is a Turing Machine description and $w\in L(M)\} $
$CF_{TM} =\{<M> | M$ is a Turing Machine description $L(M)$ is a context-free language.$\}$
My problem is this: $A_{TM}$ deals with all $TM$s how would knowing if some $TM$'s language is $CF$ help us kn... |
Mr. Katsaros owns a rectangular olive grove divided into 5 rows and 4 columns. He notes down the amount of olives (pounds) possibly obtainable from each of 20 square sections. The picking starts from the furthest north-west section and ends in the furthest south-east section. What is the maximal amount of olives that c... |
I'm looking for interesting applications of computing science for finding the probability of otherwise difficult problems. This is for an undergraduate level presentation in a probability course of around 30 minutes, from a comp sci major who has beginner to intermediate skills in both probability/statistics and comp s... |
What's the best/optimal known method/algorithm known that can be used
to calculate the number of binary $M_{m,n}$ matrices for given $n,m$, whose $1$'s are all connected?
Or equivalently, to calculate the number of connected induced subgraphs of a grid graph.
I'm aware of the computed values so far listed on $(n,m... |
Let $$PATH = \{(G, s, t) | \exists \text{ a directed path from $s$ to $t$ in $G$}\},$$
$$EQ_{DFA} = \{(M_1, M_2) | \text{DFA $M_1$ and $M_2$ over the same alphabet are equivalent}\}.$$
Is there a log space reduction from $PATH$ to $EQ_{DFA}$?
My attempt was to first show that there exists a DFA that accepts a string ... |
I currently hold a bachelors in Computer science and a masters in Art History. I really want to combine the two and I know of Digital Humanities but I'm not completely aware of where Digital Humanists could work besides Museums, libraries, etc. and even at museums and the such, I imagine that the demand for Digital hum... |
I'm working with this definition for one-way functions:
We call $f$ a (strong) one-way function if
it is computable in polynomial time
for any polynomial time randomized algorithm $B$ and any constant $c$
$$
\mathbb{P}\big(f(B(f(x))) = f(x)\big) = o(n^{-c})
$$
where $x\in\{0,1\}^n.$
And this defintion for h... |
Suppose I have a random number generator G that takes in a seed s from the set of integers. Suppose we have a sequence of numbers Q where |Q| = k. Does there exist a seed s such that G(s) produces the sequence Q, for any Q with any length? This is an existence question; does it exist or not, the process of finding a ra... |
If we have some collection of decision trees with single-variable splits and a constant value at each leaf node, the average over all trees gives some function from $\mathbb{R}^n \to \mathbb{R}$. Is it possible to efficiently find the subspace on which this function achieves its maximum? Enumerating all intersections c... |
In the real world, how is a node mapped to the position on the ring,
Each nodes's IP address is hashed using SHA-1 hashing algorithm which will produce this hash - 73.128.154.69 hashed into 60CBFB98C9052A425D684A2C3D8D8D38424129A3.
This should have been in the range of 0 to (2^m) - 1 where m is the number of bits. I ... |
I was browsing Agda's stdlib source code, since I was trying to get into it seriously and therefore wanted to know more. I was amazed at that Agda is way more developed than I thought and it's significantly much closer to Haskell than Coq.
However, I was quite a bit panicked when I see some code like following:
toList∘... |
I have a question about big O notation. Let's say I have 3 algorithms which, for an input of size $n$, have time complexity $O(n)$, $O(n^2)$ and $O(n \log n)$, respectively. Assume that all 3 algorithms take $a$, $b$ and $c$ seconds for the worst, average and best cases given an input of size $n$. What could be the act... |
I have an assignment to create a pushdown automata for $L=\{a^{3n} c^m b^{2n} \mid n,m\geq 0, m\!\mod\! 2=0\}$ and I am confused how to handle $2n$ and $3n$.
|
We were introduced to the standard C rand() function, and how to use it.
At some point during the class we were asked how to roll a die. The simple answer was to create a random number, take its modulo 6, and add 1.
rand()%6 + 1
However, the right answer was building a function that returns a value in the range [0,1) ... |
Is there a regex that checks for divisibility by 123 in binary strings?
This question can be found in the Algorithms’ textbook by Sedgewick and Wayne official website (question 7b in the Creative Exercises section).
Creating a regex to check if a binary string is divisible by 3 is simple: (0|1(01*0)*1) *
A regex to che... |
I'm trying to better understand the concepts of static and dynamic linking, in terms of the ways JavaScript libraries are used in modular systems.
Does it ever make sense to describe a JavaScript library run in a browser as "linked" in a technical sense, the way you would a C++ library?
For instance, in these examples:... |
Two-part question:
Is there any more specific name than "unbalanced binary tree" to describe the tree below? The distinguishing characteristics are:
i. The root node and left children must have either 0 or 2 children.
ii. Right children must have 0 children.
iii. All nodes must be positive non-zero integers.
iv. Any n... |
I would like to prove that $(A \cup B)^* = A^*(BA^*)^*$, where * means the Kleene star.
I would like to use induction to prove this equality but I do not how to proceed and how is the best way to set the induction hypothesis.
Could someone please help? Thanks !
|
Show that the Pumping Lemma for CFLs is not powerful enough to prove that the language $L = \{a^ib^jc^k \mid i ≠j ≠ k ≠ i \}$ is not context free.
From my understanding, we want to prove that all 3 conditions of the pumping lemma hold. This will not guarantee that the language is context-free. However, I have found a c... |
I'm working on this RSA encryption problem and the catch is that it must be done by hand and mathematically.
Let's say $p=11$, $q=13$
$$N=p \cdot q=11 \cdot 13=143$$
I chose $e$ to be relatively prime to $(p-1)(q-1)$, $e=23$
So the public key is $(23,143)$
Now I want to find out $d$ and for that I've come across $2$ ... |
I'm having trouble wrapping my head around random number generation so I figure it would be better to ask now, rather than screw up later.
Let's say I want to write a function that generates a random lucky number from 0-9 when the user clicks on a button.
I'm thinking of using the last digit of the multiple of the x an... |
Given a set of non-negative integers $A = \{a_1,a_2,\dots,a_N \}$, the $k$-partitioning problem is to partition the numbers into $k$ sets $\{A_1,A_2,\dots, A_k\} $ such that the deviation:
$$ \underset{j,k}{\text{max }} \left|\sum_{a_i \in A_j} a_i - \sum_{a_i \in A_k} a_i \right|$$
is minimized. Is there any non-trivi... |
Given $(G,D,d)$, a graph, the graph diameter and the maximum outdegree of the graph.
Verify that $G$ is strongly connected in $O(D\log d + \log n)$ space complexity.
I thought about using the $STCON$ problem for the whole nodes in the graph, but that will yield a space complexity of $O(n^2 \log^2n)$ (according to Savi... |
I wish I knew the correct terminology for the question that I would like to ask, but I don't, so please forgive me if I am not calling the right things by the right names. The practical problem that I am trying to solve (and whose specific nature is to do with data compression) can be phrased as follows:
We have a dire... |
I am trying to implement samplesort in MPI. The first step of samplesort is to partition the array with $n - 1$ splitters $s_1, s_2, \cdots, s_{n-1}$ into $n$ subsequences, where subsequence $i$ all have values in the range of $[s_i, s_{i + 1})$ (let $s_0 = -\inf, s_n = \inf$).
My question is: how to implement this eff... |
While trying to understand the concept of polynomial hierarchy, I noticed that there are several ways to define it. And the most confusing thing about the situation is to see the equivalence between those definitions intuitively. What I want to know for now is the relation between oracle machines and existential/univer... |
NOTES:
there are a myriad of graph data structures, I use a spin-off of a directed adjacency hash.
the code provide in this post is python3 on the premise that it lends itself to readability.
this post was not posted to SE code review as:
a. there are not sufficient tags for graphs (just graphs and graphics)
b. the ... |
I have been reading about set-associative caches. As far as I have read, in case of n-way set-associative cache each way stores, a block (let's say 16 bytes) and therefore each set will be of size 16n bytes. But what if I have to load a whole page into the cache. Since the size of a page is much larger than a block, ho... |
I want to develop an algorithm which finds the optimal sequence of multiplications to multiply n matrices. For example, if we have:
M1 x M2 x M3 x M4 x M5 x Mn
The algorithm should place the optimal parenthesis to reduce overall number of scalar multiplications. For example, a possible output may be:
(M1 x M2) x (M3 x ... |
+---------------+---------------+---------------+---------------+---------------+
| id: 20 | id: 19 | id: 18 | id: 17 | id: 16 |
| pos: (-2, -2) | pos: (-1, -2) | pos: (0, -2) | pos: (1, -2) | pos: (2, -2) |
+---------------+---------------+---------------+---------------+---------... |
I'm working with a control-flow graph, which is simply a directed (usually cyclic) graph with an entry (initial) node, and I have calculated all the dominators on the graph. It's noteworth that every node has either 1 or 2 transitions.
I need now to change the entry node of the graph to a node to which the entry node h... |
I have been through multiple definitions of DAG and all of them say that it is a directed graph without cycles. Also, it is said that it has topological ordering.
Now the following figure is directed graph and does not have cycles.
But looking at the ordering of edges (look at edge (2,1)), it is not topologically orde... |
I have some sort of a misunderstanding regarding the Suzuki-Kasami distributed mutex algorithm. I am writing my question here because I failed on gaining access to the original paper.
I will call processes sites for convenience.
My question
Why the token holder $j$ releases its token only when $RN_j[i]==LN[i]+1$ and no... |
Given a directed acyclic (and unweighted) graph and two distinct vertices S and T, is there an algorithm that will tell me if there is any path (not necessarily the shortest one) between the two? If it helps, I don't need the list of vertices on this path, just the fact that path exists.
I sure know of all the graph sh... |
I am interested in the details of the implementation of the "sweep-line status" data structure, which is used to implement the Bentley-Ottmann algorithm to find all intersections (and the corresponding involved segments) of a set of segments (or line-segments). The algorithm and the sweep-line status data structure is ... |
I'm trying to solve the following algorithm question:
A maze is given by a graph (with let's say $v$ vertices and $e$
edges), where $k$ vertices are different keys and, $k$ vertices are
the corresponding doors (there is always one key for a single door)
and one vertex is the end of the maze. Find the shortest pa... |
L = {$xy ∈ \{a, b\}^∗ : |x| = |y|$ and x contains the substring aa}
I am trying to prove that this language is not regular using MyHill-Nerode theorem but I am unable to find equivelance classes of this language.
Thanks.
|
I would like to use Multiscale Combinatorial Grouping for my PhD research. However, I am restricted to use open-source implementations and this one runs on Matlab.
Does anyone know of an equivalent contour detection method that works on large images that is implemented open-source, preferably in Python?
Here some more... |
I am self-studying formal languages and want to solve an example problem. Given formal languages $A,B\subset\Sigma^*$ over an alphabet $\Sigma=\{a,b,c\}$ with
$$A=\{\omega\in\Sigma^*\vert\left|\omega_a\right|=\left|\omega_b\right|=\left|\omega_c\right|\}$$
and
$$B=\{a^ib^jc^k\vert i,j,k\in\mathbb{N}\}$$
where $\left|\o... |
An integer $q$ is called a quadratic residue modulo $N$ if it is congruent to a perfect square modulo $N$; i.e., if there exists an integer $x$ such that:
$x^2≡q\ (mod\ n)$.
Otherwise, $q$ is called a quadratic non-residue modulo $N$.
Given that $N$ is a composite number (whose prime factorization is known beforehand) ... |
Let's represent Subset Sum problem with binary arrays instead of numbers.
Example: given two-dimensional array
[1, 0, 0] (4)
[1, 0, 1] (5)
[0, 0, 1] (1)
is there set of one-dimensional arrays, sum of which is equal to
[1, 0, 0, 1] (9)
In this problem sum of bits in each position can have carry-over. If carry-overs ar... |
We know that typical operating systems and high level languages (especially those with garbage collection) cannot be used for real time operating systems. Java & jet engines don't mix, and consequently a lot of study has gone into researching and developing real time operating systems.
Is there any research as to exac... |
I'm a web developer and I struggle to visualize abstract concepts in my head.
By abstract concept, it can be:
- the backend model of a webapp (with several objects inter-connected to each other)
- repeated actions on a data structure (a sort on a array for example)
For example, I wanted to implement a bubble sort last... |
In dependently-typed programming, there are two main ways of decomposing data and performing recursion:
Dependent pattern matching: function definitions are given as multiple clauses. Unification ensures that all omitted cases are impossible, and an external solver ensures that recursion is well-founded.
Eliminators: ... |
It is known that the existential theory of the reals is decidable in PSPACE (via John Canny), but as far as I can tell no one has demonstrated that it is in NP. This confuses me because it seems like a short certificate for a given formula would be an example of values for the variables included in the formula that dem... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.