instruction stringlengths 35 29.1k |
|---|
I just starting taking a course on Data Structures and Algorithms and my teaching assistant gave us the following pseudo-code for sorting an array of integers:
void F3() {
for (int i = 1; i < n; i++) {
if (A[i-1] > A[i]) {
swap(i-1, i)
i = 0
}
}
}
It may not be clear, bu... |
Community,
I'm working on a project lifting assembler code to a AbstractSyntaxTree-like structures like these:
In order to be able to evaluate the final value of a tree given only leafes with constant values, I implemented an recursive approach: Each node class has its own value function. For all nodes except constant... |
I have an undirected weighted graph with $V$ vertices and $E$ edges. Weight of a path is a xor of weights of the edges on this path. Paths can pass through the same vertices and edges many times. Given two vertices $a$, $b$ and some number $x$ I want to tell if there exists a path of weight $x$. What is the fastest alg... |
In Michael Sipser's book language is defined to be in NP iff it is decided by nondeterministic polynomial time Turnig machine. Why can't we use same machine to decide if language $L^c$ is in coNP? Just run every string x on same NDTM and if it accepts x then x is not in $L^c$ and if it rejects x then it is. What am I m... |
I'm a little unfamiliar with graph theory, and I found an interesting problem in my work that I do not know if its already well-known or can be easily mapped to another one. If I were to express the problem more formally:
Given a directed unweighted graph $\langle V,E \rangle$, find a total order between vertices $v_1 ... |
I'm having trouble reasoning about the time complexity of these mutually recursive functions. This was asked on SO here but the answer there didn't help me. I tried substituting one of the recurrences in the other but because they are mutually recursive I got stuck. I tried writing out the function calls for x=10 but I... |
Algorithms are generally studied in terms of average case complexity and worst case complexity? Is there also a kind of analysis called "average worst case" complexity?
|
Functions are relations but all relations may not be functions.Can there be an algorithm for a relation which is not a function?What has theory of computation got to say about relations in general.
|
Is there any systematic (algorithmic) method to convert an $\omega$-regular expression like
$
(a^∗)(b)(b^∗)(a^∗)(c^\omega)
$
to an LTL property?
|
So I have a few questions about determining which formula it is:
So if a binary predicate symbol $X$ denotes an edge between two variables, say $x$ and $y$, for the following formulas
Why is $\forall x \exists y\,(X[xy]\lor X[yx])$ universal and $\exists x \forall y\,(X[xy]\lor X[yx])$ existential? I mean for the seco... |
I had this question on my final exam so sadly I don't have the question but as far as I remember, the question was saying:
How many minimum spanning trees does a graph with 20 edges have.
I know that we can find minimum spanning trees with algorithms like Prim's algorithm etc. But how can we know the total number of ... |
Assume that we wish to solve some problem that has a information theoretic memory lower bound of $\mathcal B$ bits.
In computer science, there are a few classes for data structures which are close to the memory lower bound of the problem that they solve:
Compact data structure is one that uses $O(\mathcal B)$ bits (i.... |
I'm having some trouble doing SICP exercise 2.15. Please note that this question is not closed related to Lisp. Instead, it's closely related to numerical analysis.
Exercise 2.15. Eva Lu Ator, another user, has also noticed the
different intervals computed by different but algebraically equivalent
expressions. Sh... |
I have proven the foldr Fusion Law as follows:
Given f is strict, f a = b and f (g x y) = h x (f y) for all x and y, than
f.foldr g a = foldr h b
Case []:
(f . foldr g a) [] = foldr h b [] -- Remove . notation
f (foldr g a []) = foldr h b [] -- definition foldr
f (foldr g a []) = b -- definition foldr
... |
Here is the thing, I am solving an problem, and I think, say, I am pretty sure that I have the correct algorithm but I haven't been able to prove it because of my lack of practice prooving greedy algorithms.
The problem says: I need to sort an array of $n$ numbers, but the only operation I am able to do is to move an ... |
With the use of Merkle Trees, you can prove the presence of an element of a very big list, with an amount of information close to just logarithm of the size of the whole tree. Merkle proofs, thus, probabilistically confirm the result of this specific fold:
isMember :: ∀ t . List t -> Bool
isMember e = foldr (\ h t -> h... |
I'm currently learning things like algorithms, data structures, machine learning and some programming languages. Should i distribute my work or should i focalized for a certain period on one thing, and then switch to another?
|
I am trying to reduce a Knapsack problem to a problem I need to solve, and I am suspicious of its NP-Completness.
The problem recieve an array of elements $v_1,v_2,...,v_n$ sorted in some order from left to right and not necessarily following the value $v_i$ (meaning the sort order is implicit),(assume those values ar... |
Wiki says
a numeric algorithm runs in pseudo-polynomial time if its running time is polynomial in the numeric value of the input, but is exponential in the length of the input – the number of bits required to represent it.
This answer very well explains why primality test algorithm of running time $O(n)$ is actually ps... |
So I'm trying to practice (and learn, clearly) use of the Pumping Lemma, and this is my current equation. It's clearly regular- it can be simplified:
$a^{2+n}a^{n} = a^{2+2n}$ and from there it's fairly easy to derive the regular language $aa(aa)*$
However, I'm trying to explicitly solve this through the Pumping Lemma-... |
Given a cryptographic fingerprint of a collection, K == hash(X), an arbitrary function F, and a value Y, is it possible to build a short proof that F(X) == Y that doesn't require having X? I.e., a proof that Y is the result of applying F to some X such that hash(X) == K?
|
Suppose that you have a huge (terabytes worth) collection of numbers, and you know that you will, in a future, need to run some statistics of it. In order to cut future work, you notice that, by pre-computing some key statistics, you can make other statistics be computable in sub-linear time. For example, if you store... |
I would like to know how to modify DFS/BFS in order to return the number of the trees present in a graph. I know that a tree is an acyclic connected graph, and I think that I have to initialize a counter somewhere, but I don't know where. I made the procedure "is-tree(G)" where G is the graph. It returns true if the su... |
An admissible heuristic for an n-puzzle is the Manhattan distance. Now if the cost of a transition is equal to the number of the piece that is moved, is it true that the Manhattan distance is still an admissible heuristic?
In my opinion yes, because during the search, for any node, we won't have any overestimation as a... |
If I have an NP-complete graph problem $P1$ whose instance, say, a graph $G$ and a positive integer $k$ and I have another graph problem $P2$ whose instance is a graph $G'$ and a positive integer $k'$. I would like to prove that $P2$ is NP-complete. The reduction is as follows:
set $G'= G$ and
set $k'= f(k)$.
$P1$ is ... |
In a BST, Let x be a leaf node, which is a left child of node y. Prove that if x has a predecessor, this predecessor has a right child.
How can I tackle this question? I'm not even sure from where to start.
|
The problem
Suppose we have a simple graph $G = (V,E)$, edge weights $c: E \to \mathbb{R}_+$ and node rewards $w: V \to \mathbb{R}$.
Given an integer $K$, positive scalar $B$ and a scalar $\gamma$, I would like to find a set of up to $K$ paths (either simple or not, whichever is easier to compute) such that the cost is... |
I just recently learned a little about the lambda calculus, from the brief intro in the text Programming Language Pragmatics and this outstanding 4-video sequence from Adam Doupé. Basically I learned the gist of lambda calculus, $\alpha$-conversion and $\beta$-reduction, a bit of Church numerals, addition/subtraction, ... |
Assume I have a DFA with 20 states, is it possible to know the maximum number of states of the NFA which it was converted from?
I know that the minimal number of states would be 5 (because you cannot have created a DFA with 20 states from an NFA with 4 states).
But I don't really understand how can I know if there's a ... |
The following algorithm generates the next permutation lexicographically after a given permutation. It changes the given permutation in-place.
Find the largest index k such that a[k] < a[k + 1]. If no such index exists, the permutation is the last permutation.
Find the largest index l greater than k such that a[k] < a... |
What happens if we increment binary semaphore $x$ when it is equal to $1$.
E.g A process executes $V(x)$ when $x==1$;
What are the possible cases then-
Process would be blocked till $x$ becomes $0$. The moment $x$ becomes $0$,it is incremented.
Process would be blocked and no present or future changes will be there ... |
$M$ is also a variable.
\begin{equation}
T(n)=
\begin{cases}
16T(n/2)+\theta(1), & \text{if}\ n^2> M \\
M, & \text{if}\ n^2\le M \\
\end{cases}
\end{equation}
|
Is mappings optimization problems onto neural networks still a thing? I only found papers are written prior to 1999. These old papers mostly deal with Hopfield network, which i read is obsolete and only for theoretical properties. So is there any progress with neural networks (maybe different ones to Hopfield) and solv... |
Prove that the language
$$ L=\{\langle M \rangle \mid \exists M_1, M_2 : L(M_1)=L(M_2)=L(M) \text{ and } |\langle M_1 \rangle| < |\langle M \rangle| < |\langle M_2\rangle| \}$$
is not recursive.
|
The task
Find a pushdown automaton $M$, so that $L(M)=\{w \in \{a,b\}^*\ |\ |w|_a=|w|_b\}$, where $|w|_a$ denotes the number of $a$s in a word $w$.
My solution
I'm using the Wikipedia notation.
$$M = (Q, \Sigma, \Gamma, \delta, q_0, Z_0, \{q_0\})$$
$$Q=\{q_0\}, \Sigma = \{a,b\}, \Gamma = \{Z_0, A,B\}$$
$$\delta\text{... |
I have couple of questions about Turing machines:
What is the definition of the "reject" state in TM?
If the input was very small and, after one step, the machine gets to the end of the input, but it stands on regular state, it counts as "reject"? Or there is a special "reject" state, and if it won't get to this/those... |
Setup: Suppose you have a dog running around in a fenced yard (2D). Every x seconds, you mark down the coordinates of the dog. This dog is a puppy - easily distracted, full of energy, and very speedy :) Expect quick, jagged motions, running in circles, and periods where he needs to catch his breath :)
Problem: At any p... |
I am reading the transcription of a lecture from a professor Scott Aaronson, specifically the section titled Turing Machines. In this section he describes Turing's proof of the Halting Problem.
But can we prove there's no program to solve the halting problem? This
is what Turing does. His key idea is not even to try... |
I have a set of images. The length is variable. It could be anything up to about 30 images. Each image can have up to 10 tags. Images may share some, all or none of their tags. I need to select a random 5 from this set of images. This selection should follow the following rules in order of high priority to low:
Two im... |
A leftist tree is a variant of a binary heap, where the height of the left side of the tree is usually greater than the right side. Can a leftist tree's height ever increase after extracting the root? I am pretty sure it is impossible. How can a tree's height increase after taking away a node?
|
Lets say I have the below language:
S = {a, b}
So if we apply Kleene plus to that language, it is something like:
S+ = {a, b, aa, bb, ... ..}
If we apply Kleene plus to above language again, It is something like:
(S+)+ = {a, b, aa, bb, aaa, bbb ... ..}
What are the best words/way to describe that (S+)+ = S+?
Obv... |
Given a $n*m$ grid, some $1*1$ squares are blocked(can't be entered) and some are unblocked(can be entered).
What is the algorithm which prints the shortest path, such that the path covers all unblocked $1*1$ squares in a $n*m $ grid ?
The starting point is given to be :$(startx,starty)$.
A $1*1$ square can be visited ... |
The multiplexer is a device that selects one of several analog or digital input signals and forwards the selected input into a single line.
Please consider a, for example, four data input multiplexer.
If I am not wrong, the last OR gate can produce as output only 1 and 0. How are these outputs interpreted as result of ... |
I have a question:
Does for every NFA $N$ exist NFA $M$ that has maximum 3 final states and $L(N) = L(M)$.
I can answer no for DFA for below language and its minimal DFA that has 4 final states .
$L_1 = \{ax_1,bx_2,cx_3,dx_4 | x_1 \in \Sigma^* ,x_2 \in (a+b)^*,x_3 \in (b+c)^* ,x_4 \in (a+b+c)^*\}$ , $\Sigma = \{a,b,c,d... |
With regard to this explanation in finding Round Trip Time I tried attempting the following question
Question
Frames of $1000$ bits are sent over a $10^6$bps duplex link between two hosts. The propagation time is $25$ ms. Frames are to be transmitted into this link to maximally pack them in transit (within the link).
L... |
A definition of data type I've seen is along the lines of "a set of values and a set of operations".
What exactly does an operation in this set comprise?
For instance, might an operation be considered as:
an identifier (e.g. integers have an operation, +)
an identifier with signature (e.g. + operates on two integers a... |
I asked a pretty vague question. I wasn't able to make it precise, but I can now. It seems to be out of the scope of the previous question, so I open another one.
In dependently-typed languages such as Agda or Idris, it's possible to define a universe inductive-recursively. However, W-types are known to have bad comput... |
Are there countable infinte decision problems or uncountable infinite?
Thank you
|
I have a problem that I need to prove its np-completness: My original question
I need to reduce it from some problem, i´m trying to do it from some other than knapsack, that´s why I ask again. I need two sets $A$ and $B$ of equal cardinality $|A|=|B|$ and $\sum{A}\leq V$ and $\sum{B}\leq V$.
It is like Partition, but ... |
I am trying to solve this recurrence relation for a while but not getting anywhere. Actually, the sequence is given as,
F(n) = F(n-1) + F(n-2) + F(n-1)*F(n-2)
where, F(0) and F(1) will be given. I added 1 on both sides to factorize it. I tried to solve it by taking log on both sides but unable to come to a conclusion... |
What does it mean when one complexity class has another complexity class superscript?
For example, sometimes in papers I see $P^P$ or $P^{NP}$.
|
Given the outputs of the pseudorandom numbers generator how can one determine the type (e.g. Linear Feedback Shift Register), Multiply-With-Carry, Linear Congruential Generator etc.) and recover the function and the seed?
The given array of numbers is for sure generated by PRNG (not Cryptographically Secure) - this is ... |
I recently found this music video. While the music is mislabeled, the video part caught my eye. It seems to be transitioning between two images based on shape? I think its a fade-in/fade-out with the images being streched and transformed, but it seems to be specific on the shape in the image. This may be manual, but an... |
I'm wondering if this visualization makes sense with the definition of the empty string ε. I suppose it does because it doesn't seem to contradict its definition (ε is a string with no characters).
If that's the case, in finite state machines with empty transitions, is it always possible to assume ε is "before" the cha... |
A string s of length n is periodic if there is a string $u$ of length <= n/2 such that $s = u^ku'$, where $k$ is an integer >=2, $u^k$ is the concatenation of k copies of $u$ , and $u'$ is a
prefix of u.
The smallest period of $s$ is the shortest $u$ (largest $k$) for which this holds.
For example, if... |
I've read in Introduction to algorithms(CLRS) that Dijkstra's algorithm uses ideas similar to those of BFS? I think it really makes sense with respect to Dijkstra's algorithm with relationship to BFS when there are multiple short paths.
Consider the following problem for conclusion if you can see.
|
I am trying to design an algorithm that computes the largest (by sum) contiguous subarray of an array of size n that uses a divide and conquer approach, but runs in linear time. The standard divide and conquer approach runs in O(nlogn) (can be found in chapter 4 of CLR) which is not what I am looking for. The following... |
I'm having some difficulty trying to follow what the authors of some of the more highly recommended books on algorithms. I ran into the same problem when trying out some online courses. My goal is to prepare myself to start learning fundamental algorithms for use in low-level languages by means of understanding them ma... |
i'm studying Parallel Processing ,
and i'm confused how can i calculate the max number of concurrency in a given dependency graph ?
i know that the maximum number of concurrency is the largest number of
concurrent tasks at any point of the execution , but i can't calculate it from the graph
can someone explain how ca... |
For example, lets consider the simplest model of cipher: the Caesar cipher. According to the theory I read the Caesar cipher consist in substitute a letter by another in considering a shift in an alphabet given by a certain number.
I know that a Turing machine consist of: a tape, a header that writes or reads informati... |
Routers make use of the IP address, etc to shape the traffic. So obviously they must reside in at least the Network layer.
However we can also shape the traffic using tcp/udp. Routers usually have the port forwarding feature which allows them to shape the tcp/udp traffic.
The IP header has a field for protocol. However... |
How can we prove that radix sort correctly sorts an array of 2 elements with 2 digits each ?
|
$A$ and $B$ are two arrays with $n$ elements each in the range $1$ to $n^2$.
1.How to check if the elements of $A$ are distinct in $O(n)$ time and $O(n)$ space
2.How to check if $A$ and $B$ have a common element in $O(n)$ time and $O(n)$ space.
Both the algorithms shouldn't use Hash sets or any other advanced data stru... |
In an abstract register machine, is it possible to add two registers together without losing one of the summands, but without using a third register?
That is to have a register machine that maps $(m,n)\mapsto (m,m+n)$ that only uses two registers to store $m$ and $n$.
Disclaimer I am a mathematician and don't know much... |
I have a problem that can be reduced to the following:
There are three types of objects, A, B, and C. For each type of object, there are a number of "pickup points" and a number of "delivery points" (eg. there are five places where you can pick up object A, and five places where you must deliver it). What is the optim... |
I have some questions about DFA.
Can the alphabet of a DFA have one element?
Can a DFA have zero states?
Does a DFA require final state(s)?
Thanks
|
On Wikipedia, I tried a number of times to find the item I needed, starting from a random page and clicking on various (non-random) hyperlinks. Every time I succeeded in finding my desired item. Is this always possible?
|
Consider the variable sized bin packing
$$
\begin{align*}\tag{P1a}\label{P1a}
& {\underset{\mathbf{ x }, \mathbf{ y }}{\text{minimize}}}
& & \sum_{j=1}^nf_jy_j\\[3pt]
& \text{subject to}
& & \sum_{i=1}^{m} w_{i}x_{ij} \leqslant C_{j}y_j,\forall\,j\in\{1,\dots,n\}\tag{P1b}\label{P1b}\\[3pt]
... |
So I have an array sized N. It is sure that array has all distinct elements.
I need to find sum of all possible triplets in that array and for that i need to find all possible triplets.
What i did: looping through array with three nested $for$ loops but that gives O(n^3).
I want to optimise the algorithm as n is very l... |
I've managed to get a VM code of a function that performs integer division. After some work, I translated it into high-level language. I know the translation I made is correct, since I was able to compile it and get the exact VM code I started with.
I'm providing here the high-level pseudo-code.
function int divide(... |
I was reading about CRC coding from two books:
Data Communication and Networking by Forouzan Page 294
Computer Network by Tanenbaum Page 188
They use following notations:
$d(x)$: dataword to be sent (as a polynomial)
$c(x)$: codeword sent (as a polynomial)
$e(x)$: error (as a polynomial)
$c(x)+e(x)$: codeword sent w... |
If we have a static implementation of branch prediction and we always fetch the next sequential instruction isn't inefficient to do that if we, at a future point verify if the prediction was correctly done? We just evaluate the branch in future... Why don't we just simply verify this thing every time we encounter a bra... |
Given a weighted, directed graph (V, E) may contains some negative cycles and a source node s, I would like to know for all node u, if there is a path from s to u but there is no shortest path from s to u (the distance from s to u is minus infinite). To do this I implemented a version of the Bellman-Ford algorithm:
Do ... |
If you have a Kleene star applying to a set of characters not in any closure, does it apply to that whole string, or just the one character it belongs to? Any examples I search don't specify.
For example:
(A)BB*
Does this mean 1: one A followed by zero to an infinite number of BB's, or does it mean 2: one A followed by... |
Maybe there is a trivial answer to my question or maybe there is not any. But I ask it here and appreciate if anyone can give me a clear answer.
We know that a set of problems like minimum clique cover problem, coloring problem, vertex cover, ... are NP-hard for general graphs, but maybe polynomial-time solvable for sp... |
This is a challenging question I've been trying (unsuccessfully) to solve via programming, math or both.
Suppose you're given a 2D grid, whose width and height, $w$ and $h$, can each range from $1$ thru $12$ inclusive. Each cell in this grid can be in any of $k$ states (where $k$ ranges from $2$ thru $20$).
The proble... |
Modern papers on search indices often contain a statement that inverted indexes (posting lists) are categorically superior to signature files (bloom filters). Here are some examples from papers published in 2016:
While this [signature file] technique provides a relatively low computation overhead, studies by Zobel et ... |
I'm studying for my exam from Logic and Computability and we have to face following kind of examples:
$$f(x) = \begin{cases}
\ 1 &\text{if }\Phi_x(x+1)\!\downarrow\text{ and }x\leq50\\
\ 0 &\text{otherwise.}
\end{cases}$$
Unfortunatelly I'm not really clear on how to tackle those. $\Phi_x$ is the $x$-... |
The fact that square root of 2, pi etc are computable numbers only means they can be approximated to arbitrary nth decimal, so these TM that approximate them do not count since they halt after printing out the nth digits. I would appreciate a definitive answer and reasoning.
If the answer is NO, which I suspect, is the... |
Is there a single-word term for "the number of edges in a graph"? Something along the lines of "arity" for function parameters.
|
For example:
S -> Sa
Let's say the alphabet is {a} and that is the ONLY production rule of the grammar. Is that grammar valid regular grammar ? Or valid grammar at all? Can it be a context free grammar, but not a regular one ?
As far as I can think... a grammar tree built on it will never end, it will never have only l... |
The Art of Computer Programming by Donald Knuth is kind of styled like a collegiate text with exercises at the end of each chapter. However, the material is not in any recognizable form for a standard curriculum, so it is hard to imagine the text actually being used for a particular course. Also, the problems are quite... |
If not can we draw any conclusion about the newly fromed language, the language that represents the union between a regular language and a non regular language (not context free but a truly random language ).
|
How do time and space complexity compare for unidirectional bfs and bi-directional bfs in worst and practical case such as a social network?
|
I have two rigid 3D objects, where one of the object, say A, slide/glide on the other object, say B. Now what I want to do is to find all possible valid configuration/pose of A on B. How can I say this using math formula? After that, how can I write that in algorithmic way?
Thanks in advance.
|
I'm trying to find an efficient algorithm that will find me the minimum spanning tree of an undirected, weighted graph of this particular form:
My idea was a recursive solution:
Suppose the algorithm recieve the graph with n as a parameter,
if n==2 then:
take the lower cost path between vo-->v1-->v2 and v0-->v2
if... |
In a random key genetic algorithm1, the chromosomes consist in a sequence of real numbers (initially randomly generated) in the interval $[0,1]$.
I've been told by my teacher that in these kinds of genetic algorithms, one cannot encode the solution directly into the chromosomes, as that would generate "infinitely larg... |
I understand the relation between max flow and min cut, however I made this (simplified) graph, and I cant figure out why max flow seems to be different from my min cut. Im probably overlooking something simple, but I've been staring at this for 10 minutes now...
Can anyone explain what Im missing?
|
Let's say we have a pipeline with 20 stages. If the testing for the jump condition is done at stage 14 and we have a wrong prediction, then the instructions processed in those 14 stages, that shouldn't have been processed due to the wrong prediction made the processor lose 14 cycles. We know that the jump instruction e... |
Im studying operating systems and i found an exercise that i cant solve. It asks to compute the memory space needed for a two level page table.
The logical addresses are 32 bit,
Page size is 4KB
and the page entry size is 4 bytes.
from the page size i found out that the offset is 12bits from the 32 of the memory add... |
Having the function:
$$f(y) = \begin{cases}
\ 1 &\text{if }\forall n \Phi_y(n)=n\lor \Phi_y(n) \!\uparrow\\
\ 0 &\text{otherwise.}
\end{cases}$$
By the rule of thumb it should not be computable. How to prove it formally?
If it's computable, I assumed a function like this exists:
$$g(y) = \begin{cases}... |
The problem statement:
Append the length of the string to the string while the length is less than or equal to 10
Input: "a" -> Output: "a12345678910"
Input: "abcde" -> Output: "abcde5678910"
The solution of the problem would require lesser time for a larger input. What should be the time complexity of this?
|
Is it possible to use the theorem of Rice to prove that the emptiness problem is undecidable?
With the emptiness problem I mean the question if a certain machine doens't accept any input ?
If you can prove it using the theorem of Rice, can you also prove the acceptance problem (if a certain machine will accept a certai... |
I am a bit lost calculating how much segments will the system handle in a memory segmented system (without virtual memory). The problem says that the system has a word length of 32 bits and the address are 6 hexadecimal numbers, 3 of them are the segment identifier. We have a segment size of 4KiB
I tought this:
If the ... |
Suppose I am given the following problem (the source is here):
Disconnect two nodes in a graph by removing minimum number of edges.
I would apply Karger's min-cut algorithm. But how can I guarantee that I'll finally find the min-cut? Karger's algorithm is a randomized algorithm. If the probability of success is 1/p, ... |
Given Fibonacci's Nonlinear Feedback Shift Register output, how can I recover the description (nonlinear feedback function and current seed)?
The clean output of consecutive and unmodified is large and the generator is available to ask for next values. The source code of PRNG is not available, the seed is unknown.
For ... |
Let's say a program reads the addresses 0x00 cd 10 54and0x00 cd 10 50. The tag size and and index size added are just 4 bits, the cache has 8 blocks to 8 Bytes and thus 4 together make a set. The CPU is 32 bit.
Then above addresses would point to:
0x00 cd 10 50: ca 01 6b 7f ff 00 10 ee ff 41 45 e8 00 a7 56 00
and wo... |
Suppose I'm given an undirected graph and two nodes: v and u.
If I understand Karger's algorithm correctly, it's used to find a minimum cut of a graph, not the ("the" because there is only one for any given graph) minimum cut such that v is in one part of graph and u is in the other part.
Why don't we simply find the ... |
We know that a set of problems like minimum clique cover problem, coloring problem, vertex cover, ... are NP-hard for general graphs, but may be polynomial-time solvable for some classes of specific graphs, such as perfect graphs.
In my case, I have a specific class of graphs defined as follows. Define $f : \mathbb{N}... |
I just want to know that whether there is an algorithm better than the Greedy Algorithm for Dominating set. I know that Greedy gives $O(\log(\Delta))-approx$ and we can not do something better than $log \Delta$ for dominating set unless P=NP. But I came across this paper for $k-$ set cover which gives some improvement ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.