instruction stringlengths 35 29.1k |
|---|
I found this problem on codeforces in an ACM archive.
Given a number $n$, find the number possible of ways of expressing that number as a sum of consecutive primes. Example :
Given $n = 41$:
$41 = 41 = 2 +5+3 +7 + 11 + 13 = 11 + 13 + 17$
As we can see, there are three ways of writing $41$ as a sum of consecutive prim... |
I am working on the graph coloring problem. I came up with the following.
Let $S^L$ be the set of all colorings with $N$ colors for a graph with $L$ nodes. This is shorthand notation for $\{1, 2, 3, ..., N\}^L$ - a string of $L$ characters each belonging to a set $S = \{1, 2, ..., N\}$.
I noticed that we can prune the ... |
I have been trying to prove the following algorithm, without success.
Here is the C-Style pseudocode:
//j,k >= 0
int get_lcm(int j, int k){
int c = j;
int d = k;
while(c != d){
if(c < d){
c += j;
} else {
d += k;
}
}
return c;
}
I tried to find the l... |
In the below link , it is mentioned that in case of Harvard Architecture it is impossible for the program memory to modify its contents so how can it happen since instructions are fetched from the Program Memory only , and there will be instructions to modify contents pertaining to that data only so how can it happen... |
Consider an $m$ output, $n$ state Mealy machine. How many states does the equivalent Moore machine contain?
The answer is $mn$ but my argument is that the total number of output produced while reading a string of length $n$ ($n$ states) Mealy will produce $m$ outputs ($m$ transitions) but a Moore machine produces a out... |
I was looking for a service (with API) where I can ask it a general question (aka, when was Einstein born?) and retrieve an answer from the Web.
Is there any available service to do that? Have tried Watson services but didn't work as expected.
Thanks,
|
In the context of a MILP, I have variables $x_{t} \in \mathbb{R}$ which have a lower bound $x^{min}$ and an upper bound $x^{max}$.
Let $I_{1} = [x^{min},a_{1}], I_{2} = ]a_{1}, a_{2}], ..., I_{n} = ]a_{n-1}, x^{max}]$ form a partition of $[x^{min}, x^{max}]$.
The behaviour of the system I want to model depends on which... |
I need to find intersection of N line segments (given by coordinates of start and end points) which are either vertical or horizontal.So I read that Sweep Line Algorithm is a good way to solve this.
But I can't seem to find it's implementation in C++ anywhere on Internet. Can someone provide me it's code in C++ ?
|
During my work I've encountered this problem:
$G = \{(x_i,y_i,z_i)\}_{i=1}^{n}$ is a group of points in space ($\forall i \;\; x_i,y_i,z_i \in \Bbb R$) and $ d \in \Bbb R^+$ is a constant.
Divide $G$ to $m$ groups (as few as possible) that follow this rule: for each pair of points in the same group, the distance betwe... |
Model driven software development is driven by UML models and OCL expressions, ontology driven software development is driven by ontologies but is it possible (are there research trends) to introduce knowledge based software development? E.g. there are quite expressive and extensive logic based knowledge representation... |
This is the original grammar:
S -> ABe
A -> ab | a | ϵ
B -> b
I did try left factoring and this is what I got:
S -> ABe
A -> aX | ϵ
X -> b | ϵ
B -> b
But it still is not LL(1).
|
In the grammar for S production two bodies have same starting symbol
$ S \to Aa \mid b A c \mid Bc \mid bBa $
So i removed the left factoring from those two productions
$ S \to bC$
$ C \to Ac Bc$
Then I calculated first and follow for all of them. Then i constructed parse table, but for the entry on state S when in... |
I'm studying advanced database and I can not understand some concepts related to the join.
I hope I'm in the right place to post my doubts, otherwise I'm sorry.
I realized that to make the equijoin there are several families.
In particular, the family that is based on the Cartesian product includes three main methods:... |
All papers with the subject of total functional programming make use of some kind of static type checking to ensure totality. This make sense considering hoy easily is to make a language Turing-complete. The question is: Is there any untyped/dynamically-typed formalism that ensures total functions?
Edit
In other words,... |
If CFL are not closed under complementation, it means that if a language '$L$' is CFL then its compliment $L^C$ is not CFL. Then how can we discuss about $L^C$ being recursive?
My doubt arose because I think if a language cannot be decided CFL or not then how can it be declared Recursive ?
|
Can the idea of concatenative programming languages be extended to call-by-need evaluation strategy?
I see some problems that I will explain with few examples. I will use a prefix instead of a postfix notation, so evaluation takes place from left to right.
Duplicate an argument seems trivial:
drop A B -> B
However, ... |
I'm trying to figure out how to create grammars which are LL(k) and not SLL(i).
Is this grammar LL(2) and not SLL(2)?
$S \to aaab \mid aab$
Where S is a starting symbol. I think it is not SLL:
FIRST$_2$(aaab) is FIRST(aab)
And I think that it's LL(2) and LL(1) too because there are no non-terminal symbols which could ... |
This is a continuation of the problem described in this topic: Optimized algorithm to match entities together based on heuristics. I've come a little closer as to what might be the best solution.
I've got a general graph of nodes that contains edges which relate nodes to each other. These edges have a cost, which is ca... |
I am investigating heuristics for optimising the packing a fixed number of knapsacks with a set of items of defined weights, however the knapsacks do not have a defined capacity limit. The objective of the optimisation is instead to find a configuration which minimises the difference in weights between the loaded knaps... |
I'm a rank amateur in the area of pseudo-random number generation. I've recently found out that certain generators are better than others (e.g. mt19337 vs rand in C++) and learned what modulo bias is.
My Request
I'm looking for an introductory book on pseudo-random number generation. Does one exist?
My Requirements
Th... |
I'm working on a program which must use inference in first-order logic, and everything is working great except for 1 thing which I don't understand.
The book I'm using, "Artificial Intelligence A Modern Approach" by Russell and Norvig, shows a proof on page 349 which has me confused.
They combine the two following sent... |
Definitions
An image filter is a matrix $m \in \mathbb{R}^{k_1 \times k_2 \times k_3}$ which gets applied to an image $I \in \mathbb{R}^{l_1 \times l_2 \times l_3}$ as a discrete convolution
$$I'(n_1, n_2, n_3) = \sum_{i=0}^{k_1} \sum_{j=0}^{k_2} \sum_{k=0}^{k_3} I[n_1-i - \lfloor \frac{k_1}{2} \rfloor, n_2 - j - \lfl... |
The increasing order of following functions in terms of asymptotic complexity is:
(A) f1(n) < f4(n) < f2(n) < f3(n)
(B) f1(n) < f2(n) < f3(n) < f4(n)
(C) f2(n) < f1(n) < f4(n) < f3(n)
(D) f1(n) < f2(n) < f4(n) < f3(n)
I saw this question on GeeksQuiz but I am unable to understand its answer. The correct answer is D.
I... |
I understand the concept of induced subgraph, but could not understan what induced matching is. As appears in this paper, it is defined as
A matching in a graph is an induced matching if it occurs as an
induced subgraph of the graph.
However, in this paper, there is a slightly different definition:
A matching in a... |
In unification, there is a "occur-check". Such as $X = a \, X$ fails to find a substitution for $X$ since it appears on right hand side too.
The first-order unification, higher-order unification all have occur-check.
the paper nominal unification described a kind of unification based on nominal concepts. But I did not... |
I am a self taught programmer, with no formal degree in CS. I have read couple of papers which were recommended on some or other blog and found them interesting. Where can I read papers on computer science ? Are these papers available for free?
If not papers are there any essays on any popular blog posts?
|
I want to find the shortest path (least number of edges) between two nodes in an unweighted graph.
How do I implement this by using a BFSiterator(v) which returns vertices in BFS order, starting from node v? The graph interface only allows the function neighbours(v) (to get the neighbour vertices of v) to be used. Thi... |
Say that there are two sorted lists: A and B.
The number of entries in A and B can vary. (They can be very small/huge. They can be similar to each other/significantly different).
What is the known to be the fastest algorithm for this functionality?
Can any one give me an idea or reference?
|
I am trying to learn to program and I don't just want to learn syntax, but rather learn and practice breaking up and solving problems. Now, I want to know where can I go to get hold of material that ranges in programming problems from beginner to intermediate and hopefully even further so that I can train my problem-so... |
Let S be the set of all possible shortest paths in a directed graph. A path s in S is said to be maximal if it is not a subpath of another path in S i.e. it cannot be extended to another shortest path.
Let M be the set of all maximal paths in S.
Does anyone know how to efficiently sample paths from M. Ideally, I wou... |
A well known algorithm in computational geometry is the sweep plane algorithm. I've been trying to find if there's a general version of the sweep plane algorithm in $\mathbb{R}^n$, I don't need to implement it but I need to study how the general version would work.
If there's nothing you known in literature, how diffi... |
I describe an approach to graph isomorphism which probably has false positives, and I am curious whether there is literature indicating that it does not work.
Given two adjacency matrices $G, H$, an admittedly naive method of checking for isomorphism is to check whether for each row $u$ of $G$, there is a row $v$ of $G... |
Suppose that there are $n$ nodes, and that edge $e$ of weight $w_e$ cuts the tree into parts of size $k_e,n-k_e$. Then the average distance is
$$
\sum_e w_e k_e (n-k_e).
$$
For example :
n=6,k=6 list=[1,2,3,4,5,6]
Node--------> 1
\(1)<-----------Weight
... |
If we wanted to see if any disjointed subset of a set $X = [w_1, ..., w_n]$ exists such as the sum of its elements equal exactly a given value $M$ (0-1 Knapsack problem) we could employ a DP solution or a simple greedy algorithm.
A simple implementation of which could be the following. Sort the set $X$ in non-decreasin... |
Assuming someone tries to approximate a function which decides if a turing machine halts or not. It uses only a finite amount of time. The function returns $0$ (=the turing machine halts), $1$ (=the turing machine never halts) or $2$ (=the algorithm could not decide if the turing machine ever halts). If it returns $0$ ... |
I'm writing a paper for a programming languages workshop in which I have to describe the semantics of a new optimization for Java using Operational Semantics, small step style.
I have never used Operational Semantics before so I'm doubtful as whether to include in the paper some rules I'm using that are rather... let's... |
In their answer, Janoma proves that $\{a^ib^jc^k:i\neq j,j\neq k,i\neq k\}$ is not context-free using Ogden's lemma, but I haven't learned about Ogden's lemma yet. I wanted to know whether Ogden's lemma can be dispensed with.
This could be interpretted as $\{a^ib^jc^k: i,j,k\text{ are not all equal}\}$ correct?
Can som... |
I have problems in writing algorithms before writing code for a particular program.
An algorithm is just like a recipe.
But when it comes to programming complex structures (like nested conditional statements and loops) in my code, I am not able to write one, and often get confused easily. How can I get over this thing?... |
Consider a 512-KByte cache with 64-word cachelines (a cacheline is also known as a cache block, each word is 4-Bytes). This cache uses write-back scheme, and the address is 32 bits wide.
Answer the next questions for Direct Mapped cache, Fully Associative and Way Set Associative
What is the size in bits of the cachelin... |
I know how a Turing machine works, how it accepts a language but in some.
In some scenarios we would like to use counters.
For example, I want to develop a machine that accepts $\{0^{2n} : n \geq 0\}$. How can I count the number of zeroes?
If some one of you could solve the following problem for me it would help my und... |
I am considering a network with the max flow problem in a particular situation. I have a set of flows which should pass a certain node A and and another set of flows which should avoid A and pass through another node B. The flows can cross each other at any other arbitrary node.
Under what category of network flow pro... |
One of my CS course assignment problems was finding whether $L = \{a^n b^{2n} \mid n \ge 0 \}$ was regular or not. Now, I'm struggling quite a bit getting my head around this as it just seems like an overly complicated pigeonhole problem.
Regardless, I have written my solution and would like to know if it makes sense o... |
Suppose that we have an undirected graph, and that for any two nodes there is a path from one to another. In such a graph, there might be some nodes that, if removed from the graph individually, leave behind the starting graph as two or more subgraphs - that is, removing one of the said nodes no longer makes possible t... |
The below problem is from my Formal Languages class. The professor suggested drawing derivation trees for the language until we reach epsilon in all the leaves, and that it should begin to look like a geometric series. But I'm still having trouble getting started.
The way it was explained: if a context free grammar G c... |
I'm trying to understand the bandwidth problem on graphs. Consider the following tree given as an adjacency list:
1 => 4
2 => 6
3 => 5, 6
4 => 7
5 => 3
6 => 2, 3, 7
7 => 4, 6
It is claimed an optimal ordering of the vertices is 1 4 5 7 3 6 2, but I don't see how.
When I draw the graph, 5 is 4 edges away from 4, and 3 ... |
I was just wondering, if an algorithm $A$ has a time complexity O$(2^n)$, since $2^n$ can be represented using a Taylor series, which is a polynomial, does this mean that $A$ has polynomial time complexity? Generalising even further, does this mean that any algorithm which has a time complexity O($f(n)$) where $f(n)$ h... |
I have attached the problem below
Consider a 512-KByte cache with 64-word cachelines (a cacheline is also known as a cache block, each word is 4-Bytes). This cache uses write-back scheme, and the address is 32 bits
wide.
Let's try to start doing the first row. To find the Cachline index, I would have to know the numbe... |
Everybody knows the Chomsky-hierarchy for describing formal languages and big-O notation for describing time and space complexity of a function.
We know, that each class in the Chomsky-hierarchy corresponds to an atomata, that can recognize any language in the corresponding class.
The question is: What is the worst-cas... |
I'm given an instance of a planar graph and should construct a FPT algorithm for dominating set. The task looks like this:
Dominating Set on Planar Graphs
Instance: A planar graph G and an
integer k.
Parameter: k.
Question: Does there exist a dominating set
of size at most k in G?
Fact: Every planar graph has avera... |
How to show that the shortest simple path problem between two vertices $s$ and $t$ (finding a minimum weight path between $s$ and $t$) in a graph is NP-complete? I saw the following proof in a combinatorial optimization lecture, which I didn't understood (I stressed the moment that I didn't understand).
Let $P_1$ be th... |
We are teaching an artificial intelligence class and we need a different case study other than geographical maps (the popular example is the map of Romania) to explain the difference between Breadth-first search and Depth-first search solutions. We plan on giving it to the students to use as a semester project.
|
Computers and programming languages tend to be deterministic and predictable. Yet progress bars seem the opposite, especially if the operation is complex. Even for world class professional products, some progress bars do little to reflect the real progress of an operation. I've seen them go from 10% to 90% in one le... |
I have a program that calculates the first year some two events happen on the same day. I have not calculated any upper limit for the year. The time complexity of the program would be equivalent to O(Years), where Years is the result of the algorithm.
Is such a notation possible?
If yes, can I call the algorithm "line... |
Does transforming a CFG to Chomsky normal form make it unambiguous?
And if not, is there a technique to convert a CFG G to an equivalent CFG G', so that G' is both unambiguous and LL(1)?
|
If $f(n) = O(g(n))$ and $g(n) \neq O(f(n))$ than can we say that $f(n)$ and $g(n)$ will never intersect?
|
Currently, I'm reading Data Structures and Algorithms in Java, 6 edition by Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser link, particularly a chapter about recursions.
There is an example of algorithm which uses a recursion to calculate sum of all elements of the array:
public static int binarySum(int[ ... |
I've applied a Heuristic to a puzzle where I need to move all off the B's the the right of the W's. my Heuristic is the total distance of the B's from the right most W's. my initial state is (B,B,B,*,W,W,W), where * represents a blank space. A piece can move into a blank space and can jump over one or two other pieces ... |
Given that, there are 10 children standing in a circle, 8 of them stand next to a boy, and 4 of them stand next to a girl.
If 7 boys and 3 girls stand in the following order: GBGBGBBBBB, then 8 children stand next to a boy:
(G -> B G -> B G -> B -> B -> B -> B -><- B)
and 3 children stand next to a girl:
(-> G B -> G ... |
Given two Turing Machines M1 and M2, we build a new machine M that does the following on input x:
Run M1 on x. If M1 accepts x, then go to an accept state.
Run M2 on x. If m2 accepts x, then go to an accept state.
What would be the language of such a Turing Machine? My first intuition was that $L(M)=L(M1) \cup L(M2)$... |
I came across following excerpts while reading about regular expressions identities:
The regex associative laws are:
$$(L+M)+N=L+(M+N)$$
$$(LM)N=L(MN)$$
Some important implications out of associative laws are:
$$r(sr)^*=(rs)^*r$$
$$(rs+r)^*r=r(sr+r)^*$$
$$s(rs+s)^*r=(sr+s)^*sr$$
$$(LM)^*N*\neq L*(MN)*$$
... |
So, I have a graph G with a property called influence. The property sounds like : ∀v ∈ V (G), if v is influenced then he changes his opinion ov which he has on ¬ov, and any neighbor w of v in G (w∈NG(v)) changes his opinion too(from ow to ¬ow).
Also, if all nodes of graph have the same opinion o, then there exists a ... |
I am developing a computer program that solves the Rubik's cube. It is not anything advanced nor fast. It solves the cube by the Friedrich method, using algorithms that I use in real life to solve the cube. Because of that, the output solving algorithm is quite a long one and I was wondering is there is a way to transf... |
In genetic algorithms, we have a function called "mutation". Before we call this function, we choose parents.
In my version of the algorithm, when i mutate the child, i don't change the bits which are the same as the given input.
By that, I mean :
Imagine we want to reach the string "ABCDE".
The algorithm first genera... |
A 2-clause is a clause with at most two propositions (clauses?) : $(p \wedge q,\neg p \wedge q, \neg p,...)$. I have to show that the folllowing problem is $\in$ P:
2-SAT:
Input : A conjunction $\Phi$ of 2-clauses.
Question : Is it satisfisable?
For each set of 2-clause $C$ we associate $G_C$ defined as
$V_{G_C}$ con... |
Is there anything interesting to say about an "almost BST" with directed edges?
Is there a domain where this structure naturally arises? I'm imagining a tree like the one below, but it would of course be more interesting if the tree were deeper with just a few of these strange edges.
I found this article on circuit ra... |
I am currently writing a State of Art about technologies used for distributed communication (like CORBA for example). I want to structure the document in way that I don't leave any subset of this technologies out of the research. My proposed solution is to structure the document by Communication Paradigms:
Interproces... |
In my super non-rigorous class on optimization, the prof defined NP as the class of decision problems that cannot be solved in polynomial time. By definition, P is the class of decision problems that can be solved in polynomial time.
Then what is so called co-NP? Does co-NP = P in the sense of 'complement' of a set as ... |
Suppose we define a CFG such that it is possible to produce strings of the form $a^nb^n$ (in this case, I would think, we would need epsilon-productions).
Then one such $L(CFG)$ is $a^nb^n$.
However, let's say it is also possible to produce strings not of the form $a^nb^n$ from this grammar.
Can we still call $a^nb^n... |
I'm describing the semantics of a new optimization for Java using Operational Semantics but I'm not sure how to define the transition system.
I found this link :http://www.irisa.fr/celtique/teaching/PAS/opsem-2016.pdf where in slide 20 the transition system is defined but I don't get it.
|
In Kruskal algorithm, I decided to use it to construct a minimum spanning tree for a set of N = 100,000 points. Since my hardware does not allow me to keep all the distances between pairs of points, I decided to define the potential edges of the graph in batches of k * N edges (starting of course with the K * N shortes... |
Is
$$L = \{ \langle M \rangle \mid M = (\{Q_1, Q_2, . . . , Q_{100}\}, \{0, 1\}, \{0, 1, \_\}, δ, Q_1, Q_2, Q_3) \text{ is a decider}\}$$
decidable?
I know
$$HALT_{TM}= \{ \langle M \rangle \mid M \text{ is a decider}\}$$
is not decidable, but in the case we are given a specific Turing Machine that has 100 states, ... |
I'm working through CLRS, Chapter 17 on Amortized Analysis. One of the problems I attempted to solve is 17.2-2 (described below), but my answer differs from the one in the instructor's manual, so I thought I'd solicit your feedback. I appreciate any help with this.
Problem. We have a data structure supporting some numb... |
We are given an undirected graph $G=(V,E)$, $|V| \leq 50$. We are also given a starting vertex $s$. Each vertex $v$ of the graph is associated with a natural number $N_v$. Initially our profit is $R=N_s$.
Now we have to traverse the graph beginning from $s$ in an order. We can visit each vertex or edge any number of t... |
Recently I've run across the "Two eggs, 100 floors" problem:
You are given two eggs, and access to a 100-story building. Both eggs are identical. The aim is to find out the highest floor from which an egg will not break when dropped out of a window from that floor. If an egg is dropped and does not break, it is undamag... |
Let $A$ be a polynomial time algorithm which receives a graph $G$ and returns a stable set $SA(G)$ of $G$ with the property: $\alpha(G) - |SA(G)| \leq k$, for some constant $k$.
Prove that $A$ could be used to determine, in polynomial time, a stable set of maximum cardinality in a certain given graph.
I have tried by... |
This might be very basic but I am interested in evaluating the algorithmic complexity of an estimator of the form:
$$\hat{\theta} = \text{argmin}_{\theta} \;\; Q_n (\theta)$$
where $Q_n(\theta)$ denotes some objective function of interest (e.g. - log likelihood) computed on a sample of length $n$. $\hat{\theta}$ is ass... |
Coming from a C++ background I don't understand why one needs types / type expressions as first class citizen?
The only language I know that supports this feature is Aldor.
Does anybody have some literature about types as first class citizen or know some reasons why it's useful?
|
Let us say there is a Turing Machine $M$ and a string $x$. So now I want to know if $M$ accepts or rejects the string or loops on it. So, I feed the string to $M$. So, if $M$ is accept or reject the string it would halt after a finite time and I would get my answer. But how do I know if the machine loops on the strin... |
A library uses a relational database to store data about library books, their members and lending (books, which are currently borrowed). The database relations of this system are given below. Lengths of attributes are given within brackets.
Book(bookno(13), title(20), author(30), edition(7))
Member(memno(4), name(26)... |
I am trying to do thesis work in Computer science and the data mining in time series is the relevant theme, however the analysis of time series is not (it is mathematics subject). What is the fine line? Analysis is about discovery and parameter estimation of the (stochastic) model of time series, but it seems to me tha... |
We have a graph $G$ with binary values on it's vertices. If we flip
the value of an vertex $v$ $ \forall v \in V(G)$ (that is, from $o_v$
in $\neg o_v$, where $o$ is the value of the vertex $v$). And the
values of it's neighbors will flip as well, so the value of $w$,
$\forall w \in N_G(v)$ will flip from $o_... |
In this paper [1], "treaps" and "randomized search trees" are introduced. The idea is to guarantee logarithmic update and query operations by assigning uniform random priorities to the keys being inserted into the tree.
The authors assume that randomness is "hidden" from the user:
All expectations are with respect to ... |
I need to write a blog post on a problem that can be solved algorithmically. I need to do two things:
1) I need to decide what the naive brute force method would be and touch on it's time and Space complexities.
2) I need to come up with a more elegant/ideal method to solve the problem, then discuss tradeoffs with the ... |
I want to find the total external and internal fragmentation. What I understand is that external fragmentation occurs when processes are loaded and removed from memory, causing memory to be broken into little pieces, and that internal fragmentation is the unused memory internal to a partition.
As an example, say I had... |
I want to build an expert system that runs on android. I am using Android Studio as my development tools and I already started to build the knowledge base using SWI-Prolog. I want to take the result from the prolog and show it in the android program. Do I need API or there is a direct way that I can communicate between... |
Consider the following problem, called BoxDepth:
Given a set of $n$ axis-aligned rectangles in the plane, how big is the largest subset of these rectangles that contain a common point?
Say we proved these two statements:
There is a a polynomial-time reduction from BoxDepth to MaxClique.
There is a polynomial-time a... |
For my science fair project, I implemented an optimization to Python's sort routine. The idea is to move the safety checks that have to be carried out during each comparison, e.g. type checks and character-width checks, outside of the sort loop and just get them all done in one pass. An optimized comparison function is... |
I'm only just starting to learn about the PCP, and I'm especially interested in the Bounded version. From Wikipedia:
One of the most important variants of PCP is the bounded Post
correspondence problem, which asks if we can find a match using no
more than k tiles, including repeated tiles.
I am not sure I underst... |
I'm familiar with applying the sutherland hodgeman algorithm for convex polygons(and even concave polygons with a slight modification) against convex clipping windows.
However, if I am to modify the sutherland hodgeman algorithm in such a way that I can clip a concave polygon against a concave window, is that possible?... |
would be really thankful if someone could clear this up.
In reinforcement learning, When we use basis like the fourier or say polynomial basis, and say we have 4 actions, theta will then be a N x4 dimensional vector, where we dedicated each column to each action right..so q(s,a) would be theta[:,a]*feature(s)
how would... |
I have been assigned the question:
Let $G$ be a flow network and $f^*$ be the maximum flow computed by the Ford-Fulkerson algorithm. Consider a new flow network $G'$ constructed by increasing the capacity of exactly one of $G$'s edges by one.
Using the maximum-flow and minimum-cut theorem, argue that if we run the For... |
I'm wondering if it already exist LSH or an alternative to apply a fast segmentation of binary/categorical data and how to implement it.
|
I'm planning to develop an application in C# programming language for user authentication.
Target platform = Newer Windows versions such as Windows 8/10.
Your kind answers will be much appreciated. Cheers!
|
It has been shown that the decision problem
$\{(G, s, t)~\mid~ G\text{ is an undirected forest and there is a path from }s \text{ to } t \}$ is complete for logspace (and therefore in $L$).
But the proof involves a series of reductions which didn't seem very intuitive to me.
Is there any natural algorithm that directly... |
In the data link layer, the Sliding Window is used for flow control.
There are two link utilization formula that can be use. They are :
U = 1, for N > 2a + 1
OR
U = N/(1+2a), for N < 2a + 1
In both formula, N denotes the window size and a = Propagation time / transmission time
I am not really understanding which formul... |
I want to know which problems are harder than Job Shop Scheduling so I can reduce JSP to them.
Sorry I am new to these problems and looking for a source to know what are problems, what are their hardness variations and more ...
|
When looking through a few questions at StackOverflow¹ that all ask for algorithms to select k distinct random numbers out of N, I've become confused about how to compare the answers in terms of time and space complexity.
each algorithm has two parameters, N and k
and returns k elements
In terms of Big O notation, al... |
I have an algorithmic problem.
Given an array (or a set) $T$ of $n$ nonnegative integers. Find the maximal set $S$ of $T$ such that for all $a\in S$, $a\geqslant |S|$.
For example:
If $T$=[1, 3, 4, 1, 3, 6], then $S$ can be [3, 3, 6] or [3, 4, 6] or [4, 3, 6].
In $T$=[7, 5, 1, 1, 7, 4], then $S$ is [7, 5, 7, 4].
I ha... |
Given a family of sets $F=\{S_1,...,S_m\}$, where $S_i{\subseteq}\{1..n\}$, with the assumption that the maximum size of any set $S_i$ is at most $k$ ($|S_i|{\leq}k\ {\forall}i\in\{i..n\}$).
I'm tasked with finding a hitting set $H$, a set that contains at least one member from each set $S_i$ ($H{\cap}S_i\ne\emptyset\ ... |
Almost realtime pushdown relation pop a symbol for each empty step.
Realtime pushdown relation does not perform any empty step.
What do they mean by empty step?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.