instruction stringlengths 35 29.1k |
|---|
I have the following problem. We have a boolean function $f$ that is expensive to compute for a given input. We need to find the smallest positive integer $n$ such that $f(n)$ is true. We don't know anything about $f$, i.e., there could be multiple inputs that produce true. We only know that $n < M$, where $M$ is some ... |
I'm following a university course based on these slides, and I have a question about structural operational semantics.
As you can see at page 7 (4-th slide), a structural rule is interpreted logically as: ∀(antecedent ∧ side-condition ⊃ consequent). Then it says that "The structural rules define inductively a relation,... |
I've proven that $n\log_{2}\log_{2}n = \Omega (n\log_{3}\log_{3}n)$ but is $n\log_{2}\log_{2}n = O(n\log_{3}\log_{3}n)$ also true? Looks like it's not and actually $n\log_{2}\log_{2}n = \omega(n\log_{3}\log_{3}n)$. A problem of CLRS led me ask this.
|
The emptiness problem for Context Free Grammars is decidable. Does the same hold for Parsing Expression Grammars (PEGs)? That is, is it decidable given a PEG $G$ to find whether $L(G) = \emptyset$ or not.
My intuition says no, as PEGs are closed under intersection, allowing one to construct hard instances of intersecti... |
I am a beginner, but I think I understand how to do Montgomery multiplication. Also, there are online calculators (for dummies like me)... But I have a paper in front of me, that is all about how to compute
$28510 · 38762\; \text{mod}\; 36057 = 23831$
Am I taking crazy pills? Isn't it $29684$ that they were supposed to... |
I am writing a small x86-64 OS. I am trying to make sense of how Linux loads modules at runtime by linking them into the kernel.
I understand that Linux builds a symbol lookup table. Basically, a module is compiled with a special utility which keeps all the symbols intact. Then, the Linux kernel will read the symbols a... |
From what I can see, the proof of the undecidability of the Halting Problem relies on a fairly basic self-referential paradox, the simplified version being (from Wikipedia):
def g():
if halts(g):
loop_forever()
Obviously, in this case there can not be any output for halts(g) as the output of g itself depe... |
The data I have is a group of points with their position (x,y) known:
It is known that all these red dots are situated exactly on the lines which form a grid system like following:
My object is to find such a grid system that these dots are sitting on.
A few assumptions that help solve the problem:
These blue lines ... |
I recently got onto the following problem: we consider the following array:
A = [2, 3, 6, 1, 6, 4, 12, 24]
we need to count the number of times these two conditions are satisfied within the array:
A[i] * A[j] * A[k] = A[l] so that 0 <= i < j < k < l < len(A)
for this example the result should be 8. example of satisfi... |
There many many ways to code binary search, but one of the main distinctions I've seen in people's code is one group of people use while(l < r) and another uses while(l <= r). I personally use the latter.
Is there any advantages/disadvantages to using either? I've never used while(l < r), so when I see it, it's not alw... |
I've been looking for an algorithm to tell the number of non-zero rows (or columns) in a row reduces matrix $A\in \mathbb{R}^{m\times n}$. A simple approach would be to check it, row by row, which would take $O(m\cdot n)$ time and I believe would be linear. It seems to be the lower bound, but I am not sure, could there... |
Problem Statement:
You are given a string s and two integers x and y. You can perform two types of operations any number of times.
Remove substring "ab" and gain x points.
For example, when removing "ab" from "cabxbae" it becomes "cxbae".
Remove substring "ba" and gain y points.
For example, when removing "ba" from "ca... |
I'm currently solving some problems over at kattis, in particular the Add 'Em Up task.
A quick summarizing:
You are given an array with $1 \leq n \leq 100000 $ elements and an integer $2 \leq s \leq 200 000000$. You want if there exists two elements $x_i,x_j, i \neq j, $ in the array such that $x_i + x_j = s$. However,... |
30 buses are used to transport 2000 passengers. Each bus has 80 seats and each passenger will occupy exactly one seat.
Consider the following statement: At least X buses will carry at least 67 passengers and at least Y buses will have at least 14 vacant seats.
Assuming that this statement is always true irrespective of... |
I suspect this is a standard problem, but I was unable to find any literature on it -- my question is, what is the canonical formulation (and ideally solution) to the following:
Given a set $S$ of $K$-colored graphs $\{G_i\}$, find the smallest graph $G$ by number of nodes that contains all $G_i \in S$ as subgraphs.
... |
of course there is a theory that how many recursive calling the same system to solve problems, this theory is "recursion theory", If i know correctly.
and recursion theory is computability theory.
but where is the theory that deals with infinitely many calling or endless self-reference, so that one can identify such bl... |
Generally we will say there is A DFA for a language if we give a string to that DFA and after processing it it will reach to DFA and DFA more or less stops at final state,so then we say there is a DFA, and if that string does not reach final state we say there is no DFA
In Contrast
When it is case for Recursively enu... |
If you have a tree, where nodes can be either selected or not selected, and you wanted to describe which nodes were selected or not you could either
List all the selected nodes and infer the others are not selected.
Say a node and all it's children are selected or deselected then apply these rules to build up the tree... |
If all programming languages more or less compile down to the same machine code. Have there been attempts at, or is there a "field" around the concept of even more modular programming languages, where it can be built-up based on exactly what is needed? If arrays aren't handled, the language to simplify writing a progra... |
If I have points on a line at positions (0), (1), (3), and (7) the set of intervals between any two points is the set of integers (1,2,3,4,6,7). In-general, a set of N unique integers can be represented by approximately log(N) points on a line. However, I want to represent a contiguous set of integers (1 to N) this way... |
I have a problem that I have an unsatisfactory answer to and I would be interested in knowing if there is a better solution I am missing.
The problem is as follows:
Compute a series of build and move actions a player can take that will construct a pixel structure. A player can move to blocks to their left or right that... |
I don't know where else to ask this. And I don't know when or if I'll get reply at all if I comment on that answer. I was reading this answer on a text of CLRS and in the last line got confused. I understand with $c \lg n$ we can represent decimal numbers up to $n^c$. Does "index up to $n^c$" mean being able to store o... |
The Bowyer-Watson algorithm for Delaunay triangulation is known to run in $O(n^2)$ according to the authors, where $n$ is the number of data points in $\mathbb R^d$.
In addition, the algorithm (for example, as is written in Bowyer's paper, at stage 5 of the algorithm), runs over all the simplexes, (also runs over simpl... |
Given $N$ vertices and $K$ components what is the maximum number of edges that may exists ? I just got gut instinct that it will be maximum if we take one set with $k-1$ vertices and this will have no edges. And other set with $N-K+1$ vertices which will be a complete graph. And yes it is the right answer $(N-k+1)(N-k)... |
The posting in the website Embedding SATISFIABILITY into 3-DIMENSIONAL MATCHING seeks $3SAT$ as a $3$ dimensional matching instance.
I am looking to solve the converse problem. How to solve three dimensional matching using SAT solvers?
I know 3dm is NP complete and so can be solved by SAT. How do you embed 3DM as a SAT... |
I have seen this statement in my studies and I cannot figure out why it is true.
We know that $P_{HALT} \leq_T \overline{P_{HALT}}$, but $P_{HALT} \leq_m \overline{P_{HALT}}$ does not hold.
I know, that If the many-one-reduction was possible, then both problems were semi-decidable, which makes the Halting problem decid... |
Alphabet = {a,b}
should null string be the part of this language?
L ={^,a,b,aa,bb,abba ......}
I have seen on different sources not including null string.
Is null string a part of this language or not?
|
With regular numbers it is always possible to convert them from one (integer) base to another. But what happens if we consider numbers for which their magnitude is not known in advance, or in other words, what if we are only allowed to work on a stream of digits (bits in case of base 2)? Then, by observaion:
base 16 a... |
Given a 2SAT instance can we convert into bipartite perfect matching in parsimonious reduction?
|
Given 3 decision problems in $NP$: $A,B,C$.
Consider that there are $2$ reduction algorithms, one is $A\le_p B$ (with run-time $n^{10}$) and the other is $B\le_p C$ (with run-time $n^5$).
If $B$ is $NP-complete$, is it valid to say that $A$ and $C$ are also $NP-complete$?
|
Suppose you're given $x,y$ integers s.t. $x \leq y$. I want to find all values $\in [x, y]$ (inclusive) that are a power of $2$.
There's a $O(\log y)$ approach, where you just start at $1$, and keeping multiplying by $2$ until you get to the first value that is $\geq x$. Then you can start storing these values until yo... |
Fair warning: I don't actually know a functional language so I'm doing all the pseudocode in Python
I'm trying to understand why functional languages disallow variable reassignment, e.g. x = x + 1. Referential transparency, pure functions, and the dangers of side effects are all mentioned, but the examples tend to go f... |
I am studying the book "Understanding Machine Learning:
From Theory to Algorithms". I am struggling to understand the solution to exercise 3 (2) on page 41.
Exercise:
An axis aligned rectangle classifier in the plane is a classifier that assigns 1 to a point if and only if it is inside a certain rectangle. Formally, g... |
According to Wikipedia, given a randomized algorithm $\mathcal{A}$, two neighboring datasets $D_1, D_2$, a real number $\epsilon > 0$, $\mathcal{A}$ provides $\epsilon$-differential privacy, if
$$
\frac{\mathbb{P}[\mathcal{A}(D_1) \in S]}{\mathbb{P}[\mathcal{A}(D_2) \in S]} \leq e^\epsilon
$$
for all subsets $S$ of $\m... |
Playing nandgate to learn logical gates. Is the design below the simplest xor gate that can be built using the relays available? Seems like crossover relays allow a much simpler xor gate but don't have those there.
|
If I have as set N of n unique elements, is there a known algorithm that can return every possible way in which they can form groups of size k?
Eg: If N = { A, B, C, D} and k = 2, then the algorithm should return
[[(A, B), (C, D)],
[(A, C), (B, D)],
[(A, D), (B, C)]]
Here it's safe for me to assume that n is always ... |
https://www.nature.com/articles/s41467-020-17419-7
I am a medical school graduate and I really want to learn AI/ML for computer-aided diagnosis.
I was building a symptom checker and I found the material. It clarifies the drawbacks of associative models which are performing differential diagnosis. And it suggests counte... |
Given a directed graph G=(V,E) how can I check to see if it is strongly connected i.e.
every vertex is reachable from every other vertex.
what's a good algorithm to check for this that runs in O(m) time? (the number of edges) where we assume that n < m. (there are always more edges than vertices in the graph)
|
Given n elements (boxes) I have to output the max number of boxes that can fit one into another. Each box has width (x), height (y) and depth (z). One box j can hold another box k if: j.x > k.x and j.y > k.y and j.z > k.z. Rotation is not allowed.
Searching some approaches on the net, I found this can be a way:
organiz... |
Edit: Here's maybe a clearer presentation of my question. In a Boolean formula, all the gates have fan-out 1, and the graph representing the formula is a tree. In a Boolean circuit, the gates can have multiple outputs. What can be said about formula size as compared to circuit size?
I am learning some basics about clas... |
I have a recurring task which finished just now. I schedule it to run every ten minutes; the task will reoccur $10n$ minutes from now for all positive $n$. If instead I choose 50/50 between ten minutes and ten minutes plus one second, eventually all offsets (in seconds) relative to the start of a ten-minute period bec... |
When a value $x$ is a power of $2$, that is, $x = 2^n$ for some nonnegative integer
n, we can readily write $x$ in hexadecimal form by remembering that the binary
representation of $x$ is simply $1$ followed by $n$ zeros. The hexadecimal digit $0$
represents $4$ binary zeros. So, for $n$ written in the form $i + 4j$ , ... |
I'm currently doing a small-time project where I have to deliver a model which can classify specific elements on a web-page using the HTML code.
For this, I have considered using the HTML tags for each specific element (which I can extract using some other code) and then transforming it to a vector to give a neural net... |
Consider an adjacency matrix $A$ with elements $[A]_{ij}=1$ if one can reach state $i$ from state $j$ in one timestep, and $0$ otherwise. The matrix $[A^k]_{ij}$ represents the number of paths that lead from state $j$ to $i$ in $k$ timesteps. Derive an algorithm that will find the minimum number of step to get from sta... |
There are two problems in CLRS about implementing stacks and queues with singly linked lists. I know the solutions, I know how STACK-EMPTY and PUSH and POP and QUEUE-EMPTY and ENQUEUE and DEQUEUE are defined. But can we define STACK-FULL and QUEUE-FULL with worst-case $\Theta(1)$ time? One idea is to set a counter and ... |
I am reading "Bayesian Reasoning and Machine Learning By David Barber". I am not completely sure how to do question 19 on page 23:
Show that for a connected graph that is singly-connected, the number of edges $E$ must be equal to the number of vertices minus $1$, $E=V-1$. Give an example graph with $E=V-1$ that is not ... |
This is a real world algorithms problem I came across while coding an application for excel.
The background:
In excel, we have to write color information to the sheet one cell at a time - there are no array methods. Moreover the act of adding a fill color to a cell is computationally slow. The one exception to this is ... |
The pseudocode for the pivot function for the Median of Medians algorithm is given in https://en.wikipedia.org/wiki/Median_of_medians.
On the last line, there is a mutual recursion call to the select function and you can see that the median of the subarray of medians is passed in as parameter n in the select function. ... |
The 3-SAT problem, i.e. the problem whether a given Boolean formula consisting of clauses of at most 3 literals is known to be NP-complete. Then it’s complement, i.e. whether such a formula is unsatisfiable, is coNP-complete, right?
|
In question (e), I have to prove: A ≡ (KB ⊭ S) and (KB ⊭ ¬S) is satisfiable, where KB and S are propositional variables. I am not able to follow the solution given in the image above as to why it is replacing S with another propositional variable P. Even if we do take P, one of (KB ⊭ P) and (KB ⊭ ¬P) becomes true and ... |
I understand that the title might be confusing so I'll lead with an example.
I have the following set (actually a map):
{
"ab": 2,
"ac": 1,
"ad": 3,
"ae": 4,
"abc": 6,
"b": 2,
"ba": 4,
"bc": 4,
"bd": 3,
"bde": 4,
"c": 2,
"cb": 3,
"cde": 5,
"d": 4,
"e": 4
}
I want to find a subset of entri... |
All sources I have seen list taking two operands from the stack once we encounter an operator.
Why? What if not all of my operators are binary (taking two arguments)? What if I have custom unary and ternary operators?
|
$6983776800$ in binary has 33 bits but has $2034$ positive divisors.
If a list of divisors were to be logarithmic in N, it needs to take less than 33 bits.
I believe there is an infinite amount of numbers with more divisors than the bits used to represent them.
Thus it is not possible for any algorithm to create a list... |
Given a set (i.e., a collection of distinct elements), how would you find a minimal sequence where every subset of that set can be found as the elements in some contiguous subsequences? The order of elements in a contiguous subsequence does not matter when they are considered as a set.
For example, such a minimal seque... |
I was searching whether a bipartite graph can have a vertex with 0 degree. I found this, but the answer there says it is possible. Wouldn't that make a graph tripartite?
Also, if a vertex with zero degree exists that will make König's theorem wrong. For example let bipartite graph edges be $(1,a),(2,b),(3,b)$ and $4$ w... |
I am new to automata theory and have a problem that I want to solve. We have to design an NFA that starts with "ab". I have the solution and it is given by:
However, my problem is:
If the string does not start with $a$ then the machine will die out in such a case and will not read other letters in the given string, is... |
I'm facing a (possibly simple) problem while proving a theorem.
I need to show that under several (true) assumptions, some element is not in a set. Such assumptions are all met and there is are lemmata that can be employed to reach the conclusion. The problem comes from the fact that the lemma for doing so must be appl... |
Covering an orthogonal polygon with rectangles is according to Culberson and Reckhow NP-complete, even for the case without holes. Franzblau shows an 2-approximation algorithm for simple polygons for this NP-complete problem that was later also shown to be an 8/3-approximation algorithm for the general case.
I am curre... |
Is it true, that the number of edges in residual network is always less than twise the number of edges in the original flow network? My thoughts, that it's false, because in residual network quantity of edges is always $2 * E_{G_{f}}$, even some of them are zero edges. Am I right?
|
Let f be a Boolean function on n variables. Let $DC(g)$ and $D(g)$ denote the deterministic communication complexity and the decision tree complexity of $g$. Why is the following inequality true:
$$DC(f(x \land y)) \leq 2 D(f)$$
|
This is my first post on CS Stack Exchange. For some time, I have been studying basic graph algorithms, mainly BFS, DFS, minimum spanning trees and their basic algorithms (Kruskal and Prim). One thing I have noticed, as I have used both Skiena's Algorithm Design Manual and CLRS is that, at least in the pseuducode in CL... |
I want to show that there is no TM $f$ such that whenever $W_x$ is nonempty then $f(x)$ is defined and is the least member of $W_x$, Where $W_x=\{w:w \in \Sigma^{*}\text{ and } M_x \text{ on }w \text{ Halts}\}$
Usually when I want to show that such a problem is not member of RE, I use Rice's theorem, diagonalization, t... |
Can someone explain me how the code is working and what is the time complexity ?
def foo(n):
r = 0
for i in range(1, n):
for j in range(i, n):
for k in range(1, j):
r += 2
print(r)
x = int(input("Enter a number : "))
foo(x)
|
I have solved a problem that required me to find if the given directed graph had a cycle or not. The deal is, I used a recursive approach to solve it in the depth-first-search method. I was just wondering how the code would look in an Iterative approach of the same depth-first-search method. Here is my C++ code...
clas... |
How do you identify the answer sets for II if you know what the answer set program II looks like?
Here is the problem:
The answer is suppose to be 1 and 3.
Here is what I am thinking, starting with looking at number 1: Okay so we got loc(1,ted, house1), loc(1, jane, house2), move(1,ted, house1, house2) all in II, so f... |
Let $G=(V,E)$ be an undirected graph and $A,B,C\subset V$ disjoint subsets of $V$. I want to check whether or not $A$ and $B$ are separated by $C$ (i.e. every path from $A$ to $B$ passes through $C$). There are several ways to check this (via graph connectivity, DFS, brute force search over all paths, etc.).
My questio... |
Here is the problem: Let's say we have a random binary sequence, just an arbitrary sequence of zeroes and ones (of some arbitrary length of digits). Can we find an algorithm that would decode/decompress this sequence into a meaningful statement (say, in some natural human language)? I don't want to condition or bias on... |
Let $\mathbb{H}$ be the set of all Turing machines that halt on all inputs. Consider the following Turing machine $T$. On input $\langle S \rangle$ where $S \in \mathbb{H}$ (note that the angle brackets indicate a string encoding of $S$), $T$ does the following:
Simulate $S$ on $\langle S \rangle$.
If $S$ accepts, rej... |
Suppose I have the following MIPS code on a CPU with forwarding enabled:
L1: LW R2 0(R1)
ADDI R2 R2 2
SW R2 0(R1)
ADDI R1 R1 8
SUB R4 R1 R3
BNEZ R4 L1
The last two lines are of importance for me.
My intuition is that the output to R4 is calculated during the EX stag... |
There are a number of rules (an order of 10K, may be 100K-ish) that looks like a tuple:
(x1,x2,x3,x4), where xn may be a number (32 bit if it's matter) or a wildcard '*' (any).
What approach may be taken for compact representation for this rules and fast lookups in runtime? It's looks like FSM, but are there any effici... |
I was asked to give an example of a graph that has edges with negative weight, but Dijkstra's algorithm will still give us the correct output. It was part of a prove/disprove question. The claim was.. "If a graph has negative edges, Dijkstra's algorithm will return the wrong output".
|
I was reviewing All NP problems reduce to NP-complete problems: so how can NP problems not be NP-complete?
I understand that the general way we show a problem A is in NP is to show there exists a poly-time certifier for A. However, I am confused if say, we know nothing about A, and it reduces to an NP-Complete problem ... |
Let $S$ denote a deterministic process which generates a certain string, described through a Hidden Markov Model. More specifically, for a process with alphabet $\mathcal{A}$ and $n$ hidden states, the description is given through the $n\times n$ transition matrices $T^{(a)}$ with elements $T^{(a)}_{ij}=Pr(s_{t+1}=j,A_... |
Let $G=(V,E)$ be an undirected graph with $|E|=m$ edges.
Given that any clique of size $\ge 2$ can be identified with its corresponding edges, and at most every subset $S\subseteq E$ creates a clique, $G$ can have at most $|P(E)|= 2^m$ cliques of size $\ge 2$.
However, based on the intuition that it's better to arrange... |
What's the space-complexity of Newton-Raphson?
I think it reduces to the space-complexity of storing the inverse hessian matrix.
|
I'm looking to formally define a tree and then extract the leaves from it in a concise way.
Does this look ok?
What is the best way of doing this?
$
Y = \{a,b,c,d,e,f,g\} \\
R = \{a \mapsto b, a \mapsto d, d \mapsto e, d \mapsto f, f \mapsto g\} \ \text{, where R is a relation on Y.} \\
R^+ = \{a \mapsto b, a \mapsto ... |
I'm prototyping a deterministic Risk like game. A player can move units from one node to a connected node if he has more than 1 unit the in origin node (must leave 1 unit behind). The player wins if he conquers the enemy's home node. Battles are settled by multiplying the node's defensive units by the defensive rate an... |
I'm probably missing a lot of terminology here, so I'll try to rather be too clear than too vague.
I have a Context-Free grammar as an input, that might contain direct or indirect left-recursion between some of the rules. Identifying the recursion is not too hard, can be done with a graph traversal algorithm. We simply... |
I don't know much about memory. Here are some lines from CLRS:
The words in a computer memory are typically addressed by integers from 0
to $M - 1$, where $M$ is a suitably large integer. In many programming languages,
an object occupies a contiguous set of locations in the computer memory. A pointer
is simply the addr... |
Given an array $A$ of unsigned integers, a subarray is a contiguous interval $A[\ell],\ldots,A[r]$. The bitwise AND of the subarray is just the bitwise AND of $A[\ell],\ldots,A[r]$ (what is denoted by A[l] & ... & A[r] in C).
I am faced with the following task:
Given an array and an integer $k$, find the maximum lengt... |
Take this example mentioned here: NP-hard problems with very fast exponential-time algorithms
We can create such problem by padding assuming ETH. Take an NP-complete problem $L$ such that $L$ is decidable in time $O(2^n)$, by padding $L$ with some dummy 1's, create $L'=\{1^{n−(\log_21.01)n}x:|x|=(\log_21.01)n∧x∈L\}$.... |
Background information that I know(But not understand with examples, I will be glad if you could explain it to me with examples)
A replicated service is said to be linearizable if for any executin there is some interleaving of operations that
Meets the specifications of a non replicated service
Matches the real time... |
Let's say we have two sets $X = \{x_1, \ldots, x_n\} \subset \mathbb R^d$, $Y =\{y_1,\ldots, y_n\} \subset \mathbb R^d$, how can we find a permutation $\pi$ such that
$$D = \sum_{i=1}^n d(x_i, y_{\pi(i)})$$
is minimal? (Here $d$ is some distance function, for simplicity we can assume it is the Euclidean distance, or ma... |
Will the IBM PC ever move towards 128 bit architecture? Is that even possible or is the 64 bit architecture we have now the ceiling?
|
Is there a specific name when we refer to just the scheme and host of URL, for example http://localhost of the URL http://localhost:8080/help ?
|
I am looking for a discussion state that, why study of mathematics in designing algorithms, and find out efficient solution for algorithmic problems is so important?
|
I am looking to create a neural network architecture that takes two kinds of inputs: image and text, and outputs a predicted continuous variable. More specifically, I will have multiple images of a house as an input alongside numerical/text data like square meters, number of beds, baths, carspaces, latitude, longitude,... |
I am trying to solve below problem
Given a set of integers A, and target integer, find all subsets of size k such that sum of elements of subset equals target.
One approach could be enumerating all subsets of size k and checking whether sum equals to target. However this takes O(n!) time. I am trying to find an algorit... |
Desc'
I was reading CLRS Book's chapter 11 Hash Tables, and encountering some problems.
There is an corollary in CLRS book, in Page 275 (quoted on the bottom of post), which discussed the expected number of probes on a unsuccessful search, given open-address hash table.
I think the proof is strongly convincing, and I h... |
I am trying to have a deeper understanding of the following implementation of the Goemans-Williamson algorithm for solving the maxcut problem.
def goemans_williamson(graph: nx.Graph) -> Tuple[np.ndarray, float, float]:
"""
The Goemans-Williamson algorithm for solving the maxcut problem.
Ref:
Goemans... |
I encountered the following problem:
Given a string which was produced by mixing up a string of digits (0-9), for example:
"otetwonhree" was produced by "onetwothree"~123, find the original digits (without importance of order). in our example we would return "123". Another example: "oneoneeon", we return "111".
My qu... |
Original question:
Given a symmetric matrix with matches count between different transcriptions, the objective is to maximize the batches total matches count while minimize the standard deviation between the batch match counts where each batch allows a fixed number S of unique transcriptions and the number of batches i... |
I tried to find strict definition in Google and books, but didn't succeed. How it connected with max flow and residual network?
|
Suppose $A$ is an array of distinct natural numbers. We call an element $A[i]$ minimal if it's less than both the element before and after it (if any). Present a worst-case $O(\log n)$ algorithm for finding a minimal element.
I wanted to find the minimum (since it's less than all the elements) and then use binary searc... |
My algorithm $n$ times checking that $n$ clauses with $2$ variable, are satisfiable or not? (i.e. $n$ times my algorithm check $2-SAT$ Problem with different variable) that each time $2-SAT$ need's $O(n)$, so the running time will be $O(n^2)$. Are there a hint or idea such that prohibit my algorithm from doing repeat... |
In Haskell, I made a class of admissible (that is, second-countable and $T_0$) spaces:
{-# LANGUAGE TypeFamilies #-}
class Admissible a where
type BasisElem a -- Type of a basis element
semidecide :: a -> BasisElem a -> [Bool] -- Semidecides whether an element is in a basis element
countFirst :: a -> [Basi... |
I'm working on reverse engineering the bit stream format of an FPGA, in particular regarding the address translation of the BRAM (block RAM), but the algorithm could in general be used for any permutation of an address space. The algorithm is as follows:
Assign an index to each bit in the input space. For every bit in ... |
In their book Fundamentals of Parameterized Complexity, Downey and Fellows claim (in chapter 27.1) that $\mathrm{FPT}\subsetneq \mathrm{XP}$, and that this is a "basic result" that follows by "standard diagonalization", without any further reference.
I have neither been able to find a proof of this "basic result" in th... |
I have a graph $G$ (NOT directed). $SP$ is one of the shortest paths between $a$ and $b$ ($a$ and $b$ are nodes of $G$). $e$ is the edge of $SP$ between the nodes $j$ and $k$ ($j$ is before $k$ if we go from $a$ to $b$). If I remove $e$ from $G$, in the new graph there is a path between $a$ and $b$.
Can I say that, in ... |
What do FPT and XP stand for in this question? Proving FPT is strictly contained in XP
I don't have enough reputation to comment on that post and ask and I couldn't find the meanings of these acryonyms through Google
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.