instruction
stringlengths
0
29.8k
⌀
{"Voters":[{"Id":162643,"DisplayName":"AKC"}],"DeleteType":1}
{"Voters":[{"Id":162643,"DisplayName":"AKC"}]}
I have been pointed towards a reference which answers this precisely: https://link.springer.com/chapter/10.1007/978-3-642-01877-0_21. Here, it is claimed that the best I can hope for us constant rate and logarithmic distance - although the paper only proves this for regular graphs.
Does `PriorityQueueSet` sounds good? A sample signature of Java implementation /** * A priority queue that also maintains a set of unique entries. * * @param <K> type of the key to identify the entry * @param <V> type of the entry * keyExtractor is used to extract the key from the entry * valueCompa...
null
null
I have been pointed towards a reference which answers this precisely: https://link.springer.com/chapter/10.1007/978-3-642-01877-0_21. Here, it is claimed that the best I can hope for is constant rate and logarithmic distance - although the paper only proves this for regular graphs.
FPGA code is just another kind of code, and its convertable. I guess if ur making a real machine, it could be written in C, but I'm doing one now and Im just using **sub-procedures in place of the electric modules**, and it seems to be like it could work, and u can even do it on the gpu to get that awesome speed out ...
FPGA code is just another kind of code, and its convertable. I guess if ur making a real machine, it could be written in C, but I'm doing one now and Im just using **sub-procedures in place of the electric modules**, and it seems to be like it could work, and u can even do it on the gpu to get that awesome speed out ...
FPGA code is just another kind of code, and its convertable. I guess if ur making a real machine, it could be written in C, but I'm doing one now and Im just using **sub-procedures in place of the electric modules**, and it seems to be like it could work, and u can even do it on the gpu to get that awesome speed out ...
FPGA code is just another kind of code, and its convertable. I guess if ur making a real machine, it could be written in C, but I'm doing one now and Im just using **sub-procedures in place of the electric modules**, and it seems to be like it could work, and u can even do it on the gpu to get that awesome speed out ...
I think the language is indeed context-sensitive. Here is a non-contracting grammar generating it. > $S \to A' \mid B' \mid aS' \mid \varepsilon$ > > $A' \to aA' \mid a$ (in the case there is no $b$'s, then the word is $a^m$) > > $B' \to bB' \mid b$ (in the case there is no $a$'s, then the word is $b^n$) > > ...
I think the language is indeed context-sensitive. Here is a non-contracting grammar generating it. > $S \to A' \mid B' \mid aS' \mid \varepsilon$ > > $A' \to aA' \mid a$ (in the case there is no $b$'s, then the word is $a^m$) > > $B' \to bB' \mid b$ (in the case there is no $a$'s, then the word is $b^n$) > > ...
null
Intuitively, the idea is to look at things that may even appear to be gigantic but that may end up getting swamped as *n* grows. As an example, consider which of $f(n) = 3^n$ and $g(n) = 1024^{\log_2 n}$ may grow faster. 1024 seems a lot larger than 3, but the 3’s pile up at the rate of an entire tripling with each...
Intuitively, the idea is to look at things that may even appear to be gigantic but that may end up getting swamped as *n* grows. As an example, consider which of $f(n) = 3^n$ and $g(n) = 1024^{\log_2 n}$ may grow faster. 1024 seems a lot larger than 3, but the 3’s pile up at the rate of an entire tripling with each...
null
Intuitively, the idea is to look at things that may even appear to be gigantic but that may end up getting swamped as *n* grows. As an example, consider which of $f(n) = 3^n$ and $g(n) = 1024^{\log_2 n}$ may grow faster. 1024 seems a lot larger than 3, but the 3’s pile up at the rate of an entire tripling with each...
null
I have two JFrame windows equipped with various components including JButtons and I want the actionPerformed methods for the buttons to send data between the two windows so that one can update the other. Thankfully, I've already got all the button code and everything figured out. The problem is when I try to send a sig...
null
Let us look at the following 2 cases: 1. We say a *binary search* implementation in a `sorted array` of size `n` has a time complexity of $O(\log n)$. In detail, $O(\log_{2} n)$ because binary search halves the input space with each iteration. 2. In a recursive code block as below, We say that the time complex...
null
You're given a `m` by `n` matrix filled with positive integers, as well as some integer `k` (0 <= `k` <= `min(m, n)`). After deleting exactly `k` rows and `k` columns (deleting can be thought of as replacing a row/column with all zeros), what's the maximum sum of remaining cells in the matrix you can achieve? I rece...
Maximize sum of matrix after deleting K rows and K columns
|optimization|dynamic-programming|matrices|
|algorithms|optimization|dynamic-programming|matrices|
null
Another attempt at explaining why the first definition doesn't work. Let the only sort be $\mathsf{Exp}$, let $\mathcal{X}_{\mathsf{Exp}} = \{y,z\}$, and let $x$ be a variable (of sort $\mathsf{Exp}$) that is fresh for $\mathcal{X}$. Then $y,z \in \mathcal{B}[\mathcal{X}]_{\mathsf{Exp}}$ and $x \in \mathcal{B}[\math...
We have a graph $G$ with $v$ vertices. In $G$ there is at least a maximum clique with $k$ vertices, with $k\lt v$. Is it true that there is at least a vertex of $G$ such that its degree is less than $k-1$?
Clique and verteces degree
|graphs|
Another attempt at explaining why the first definition doesn't work, so assume that we are using that definition. Let the only sort be $\mathsf{Exp}$, let $\mathcal{X}_{\mathsf{Exp}} = \{y,z\}$, and let $x$ be a variable (of sort $\mathsf{Exp}$) that is fresh for $\mathcal{X}$. Then $y,z \in \mathcal{B}[\mathcal{X}]...
null
null
I need assistance in defining axioms for partial functions in total function theory that is available in [Coq](https://coq.inria.fr/refman/language/core/assumptions.html). Specifically, I'm looking for a constructive definition of a partial function that includes a constructor for obtaining a partial function from a s...
formalization of partial function for counting
|formal-languages|coq|
null
The original division and allocation of IP addresses used a system called classful IP addressing. This is the division to which you are referring, in which a class A network would receive all addresses X.0.0.0-X.255.255.255 and have over 16.5 million host addresses. As designated below, the network bits in classful add...
null
null
|counting|coq|
I have a Python data generator that is able to generate SQL-like relational data (with primary, foreign key relationships and composite keys, including partial keys where some foreign key is a part of the primary key). Right now it is stored in-memory using a plain dictionary (key-value), where I sort headers each time...
Approach for the fake data generator that needs to maintain an order and referential integrity
|algorithms|data-structures|python|
I have a Python data generator capable of generating SQL-like relational data with primary and foreign key relationships, composite keys, and partial keys. Currently, I store this data in-memory using a plain dictionary (key-value) structure, where I sort headers every time I need to retrieve data to maintain alphabeti...
null
I need assistance in defining axioms for partial functions in total function theory that is available in [Coq](https://coq.inria.fr/refman/language/core/assumptions.html). Specifically, I'm looking for a constructive definition of a partial function that includes a constructor for obtaining a partial function from a s...
null
null
I'm working on implementing a solver for [Double-Choco][1] puzzle which published by Nikoli magazine. starting by representing the board cells as matrix containing cells with values 1 or 0, where 1 represents gray cells and 0 represents white cells. For instance: [ [0, 0, 0, 0, 1], [1, 1, 1, 0, 1]...
Solving the Double-Choco Puzzle: Matching Sub-Matrices with Rotation and Mirroring
|algorithms|optimization|linear-programming|
null
Is $L=\{1^n2^n3^m : n\neq m\}$ context free?
null
In my OS course, the instructor mentioned the following: In UNIX if a parent process creates a new child ("fork") then the child is an exact duplicate of the parent. This means its memory space is a copy of the parent's. Now if the child process immediately calls "exec", it replaces its own memory space with that of...
null
{"Voters":[{"Id":755,"DisplayName":"D.W."}],"SiteSpecificCloseReasonIds":[]}
null
null
While The bound given by @SilvioM in comments has polynomial size in A,b,c as requested, one cannot expect a polynomial time approximation for ILPs (see the second paragraph), and hence, probably also not an an upperbound polynomial in OPT. So this is probably as good as it gets. The reason for this is that the well...
In general, the problem of finding a Hamiltonian cycle is NP-complete (Karp 1972; Garey and Johnson 1983, p. 199). Next, as for determining the existence of long cycles, I don't hold much hope for efficient algorithms. However, what about short cycles? For instance, 3-cycles, 4-cycles, and so on. For a $k$-cycle, at...
The complexity of checking for short cycles in a graph
|graphs|time-complexity|
Assume that the language $L = \{a^{(n^2)} | n > 0\}$ is context-free and let N be the pumping length given by the Pumping Lemma. Choose the string $u = a^{(N^2)}$, which is in the language L. According to the Pumping Lemma, u can be decomposed into vwxyz such that |wxy| ≤ N, |wy| > 0, and $vw^mxy^mz$ is in L for eve...
null
If your graph has $n$ vertices and you’re interested in $k$-cycles, then a brute-force inspection will look at each of the $n \choose k$ possible $k$-tuples. Thus that approach is $\Theta(n^k)$.
The problem of finding a simple $k$-cycle is FPT, which means that there exists an algorithm running in time $O(f(k) \cdot n^{O(1)})$. I don't know the best known algorithm for $k$-cycle, but you can certainly do it in time $O(2^{O(k \log k)} n^{O(1)} )$. I think there is a $c^k n^{O(1)}$ algorithm, but cannot reca...
In order to group unstructured or sem-structured texts for a timeline construction approach, I consider several types of correlations among such texts. These different correlations induce a weighted <a href="https://en.wikipedia.org/wiki/Multigraph">multigraph</a>, where the texts act as nodes. All edges have a normali...
Reference and code for community discovery algorithms in multigraphs
|algorithms|reference-request|clustering|
null
Consider a set $S$ of segments in the plane. Split each segment in $S$ into a few pieces, and slightly modify the extremities of each obtained segment (by adding a small random value to their coordinates, e.g.). Then consider the set of all obtained segments and add to this set a number of random segments. This gives a...
Matching the segments of a set to longer segments of another set
|algorithms|graphs|computational-geometry|
Take all "new" segments in turn and compute a distance to the initial segments. Associate a new segment to the closest "old". For the distance you might consider the average distance of every point of a segment to another, or to the line of support of the other.
The question is not clear. Is this the claim you are considering: If the largest clique in a graph $G=\langle V,E\rangle$ is of size $k<|V|$, then there exists a vertex $v\in V$ of degree $d\leq k-1$. If so then the claim is wrong. Let $d\geq 2$ and consider the full Bipartite graph $K_{d,d}=\langle V,E\rangle$,...
One possible approach which will both solve the problem of detecting random segments from $S^{\prime}$ and associate original and modified segments is that of doing a nearest neighbor search of original segments in $S$ inside the new segments in $S^{\prime}$. In this way, you find for each original segment the closest ...
One possible approach which will both solve the problem of detecting random segments from $S^{\prime}$ and associate original and modified segments is that of doing a nearest neighbor search of original segments in $S$ inside the new segments in $S^{\prime}$. In this way, you find for each original segment the closest ...
I am trying to solve this proof. In structural semantics I need to proof that: If <S1;S2,s> =>* <S2,s'>, then it is not necessarily needed that <S1,s> =>* s' I tried many things but I am not able to "break" the No Interference Lemma thay says: <S1;S2,s> =>k s' means that Exists an state ...
Show that if <S2;S2,s> =>* <S2,s'>, it is not necessarily the case that <S1,s> =>* s'
|formal-languages|operational-semantics|
null
null
Can you please help identify if the two following variants of the bounded halting problem are in different deterministic complexity classes? $$ H1 = \{ (\langle M \rangle, w, t) \mid \text{$M$ accepts $w$ in time at most $t$} \} $$ $$ H2 = \{ (\langle M \rangle, t) \mid \forall \text{$w$, $M$ accepts $w$ in time...
Here is a simple approach: 1. Let $E$ denote all the endpoints of $S$. 2. Find all segments in $S'$ that have an endpoint near a point of $E$. 3. For each such segment $s' \in S'$ with an endpoint near $e \in E$, test whether $s'$ is close to a portion of some segment in $S$. If it is, output it, remove $e$ f...
Can you please help identify if the two following variants of the bounded halting problem are in different deterministic complexity classes? $$ H1 = \{ (\langle M \rangle, w, t) \mid \text{$M$ accepts $w$ in time at most $t$} \} $$ $$ H2 = \{ (\langle M \rangle, t) \mid \forall \text{$w$, $M$ accepts $w$ in time...
null
While trying to get an overview of parameters used in the parameterized-complexity theory, it seems that there are no problems parameterized by some basic graph properties like maximum clique, maximum independent set, and maximum degree. Among other resources, I've used this resource https://www.graphclasses.org/classe...
Why are there no problems parameterized by basic graph properties (e.g. maximum clique and maximum degree)?
|complexity-theory|parameterized-complexity|
The problem of finding a simple $k$-cycle is FPT, which means that there exists an algorithm running in time $O(f(k) \cdot n^{O(1)})$. I don't know the best known algorithm for $k$-cycle, but you can certainly do it in time $O(2^{O(k \log k)} n^{O(1)} )$. I think there is a $c^k n^{O(1)}$ algorithm, but cannot reca...
The problem of finding a simple $k$-cycle is FPT, which means that there exists an algorithm running in time $O(f(k) \cdot n^{O(1)})$. I don't know the best known algorithm for $k$-cycle, but you can certainly do it in time $O(2^{O(k \log k)} n^{O(1)} )$. I think there is a $c^k n^{O(1)}$ algorithm, but cannot reca...
The problem of finding a simple $k$-cycle is FPT, which means that there exists an algorithm running in time $O(f(k) \cdot n^{O(1)})$. I don't know the best known algorithm for $k$-cycle, but you can certainly do it in time $O(2^{O(k \log k)} n^{O(1)} )$. I think there is a $c^k n^{O(1)}$ algorithm, but cannot reca...
The problem of finding a simple $k$-cycle is FPT, which means that there exists an algorithm running in time $O(f(k) \cdot n^{O(1)})$. I don't know the best known algorithm for $k$-cycle, but you can certainly do it in time $O(2^{O(k \log k)} n^{O(1)} )$. I think there is a $c^k n^{O(1)}$ algorithm, but cannot reca...
The problem of finding a simple $k$-cycle is FPT, which means that there exists an algorithm running in time $O(f(k) \cdot n^{O(1)})$. [Alon, Yuster, Zwick (Color coding, JACM 1995)](https://dl.acm.org/doi/abs/10.1145/210332.210337) give an algorithm for exact $k$ cycle in expected time $O(k! \log k \cdot n^\omega)$...
The problem of finding a simple $k$-cycle is FPT, which means that there exists an algorithm running in time $O(f(k) \cdot n^{O(1)})$. [Alon, Yuster, Zwick (Color coding, JACM 1995)](https://dl.acm.org/doi/abs/10.1145/210332.210337) give an algorithm for exact $k$-cycle in expected time $O(k! \log k \cdot n^\omega)$...
A problem is in NP if every instance with the answer “yes” can be solved in polynomial time if you get a clever hint. A problem X is NP complete if it is in NP (and not harder), and some NP-complete problem can be solved by solving X. That means if I take an instance Y of this other NP-complete problem then I can c...