instruction stringlengths 35 29.1k |
|---|
I think the following question is a mix of the Traveling Salesman Problem and the Subset-sum Problem, which makes it really hard (for me) to solve... .
The problem is stated as follows:
There are a total of $n$ cities.
The salesman must start his journey at a certain city, and return to that specific city at the end o... |
I was reading lecture notes of Universiti Malaysia Perlis when I am came across following question:
A computer consists of a CPU and an I/O device $D$ connected to main
memory $M$ via a shared bus with a data bus width of one word
$(16-bits)$. The CPU can execute a maximum of $10^6$ instructions per
second. An a... |
Look at the below table for example :
Look at the Non-Preemptive SJF table
Suppose if the burst time of process $P_1$ was a very large number compared to $7$, the processes $P_3,P_2$ and $P_4$ have to wait for a large amount of time till $P_1$ frees the CPU. No book or article that I've read mentions of SJF being a su... |
Why is it that the transition function for DPDA's only works for 1 alphabet symbol, and 1 stack symbol? Say f is the transition function, why does having
f(qi, 1, 0) -> (qj, 0)
f(qi, epsilon, 0) -> (qj, 0)
cause nondeterminism?
I would understand that if I had
f(qi, 1, 0) -> (qj, 0)
f(qi, 1, 0) -> (qz, 0)
it wo... |
I've done a bit of googleing and have come up a bit short.
I am wondering what are the main reasons for computing scientists, programmers,
to study term rewriting, and/or term graph rewriting.
As far as I can tell, it just helps for basic reasoning about functional programs and (imperative) program control. Apparently... |
I implemented a simple type system inside Agda and I'm trying to understand, how expressive it is. The system consists from a predicative hierarchy of universes in the style of Russell, natural numbers and bounded and unbounded dependent quantifiers (there were reasons to separate these two instead of just adding an al... |
Calculate the FOLLOW sets for all the non terminals:
$S \rightarrow bEx \mid Db \mid b \mid F$
$D \rightarrow EDc \mid Y$
$E \rightarrow dED \mid dDY$
$Y \rightarrow ab \mid aDx \mid \varepsilon$
So I know that:
FOLLOW($S$) = $\{\$\}$ since it doesn't appear anywhere
FOLLOW($D$) = $\{b, a, x, c\}$, since it is follo... |
Consider addition of two numbers when CPU uses $2's$ complement form:
$$ 1\ 1\ 0\ 0\ 0\ 0\ 1\ 1\\0\ 1\ 0\ 0\ 1\ 1\ 0\ 0\\-------\\0\ 0\ 0\
0\ 1\ 1\ 1\ 1\\------- $$
$$Carry\ = 1,\
Overflow = 0, \ Zero Flag = 0$$
My Reasoning:
Zero Flag isn't set because the result isn't zero
Overflow isn't set because Carry in ... |
Whist reading an article outlining differences in OO and Functional programming I came across function pointers. It has been a while since I completed my Computer Science degree (2003) and so I looked up pointers to refresh my memory.
Pointers are variables that contain a reference to a memory address. They can be con... |
Suppose we have $n$ bits of random-looking data, and we want to encode it in such a way that instead of 1/2 the bits being 1's, we have (say) 3/4 the bits being 1's. The entropy of each bit in the new encoding is $-0.75\log_2(0.75)-0.25\log_2(0.25)\approx 0.81$, so we should be able to do it in about $1.23n$ bits.
(By ... |
I'm trying to answer this question:
Let $S$ be the strings $\langle P \rangle$ accepted by the Turing Machine $P$ with input alphabet $\{a,b\}$, where $P$ accepts an infinite number of strings beginning with $a$ and a finite number of strings beginning with $b$.
Is $P$ RE?
Is $P$ co-RE?
|
I am preparing for a competitive exam (GATE) in which questions are asked in Automata about operations among different types of languages. For example,
If $L_1$ is recursive & $L_2$ is recursively enumerable, then is $L_1\cap L_2$ recursively enumerable?
Similarly,
If $L_1$ is regular, $L_2$ is a deterministic CFL ... |
I'm revising for an Algorithms exam and looking at a sample question it says :
A group of n teenagers $t_1, \dots, t_n$ are to sit in a single row of n chairs watching a particulary boring comedy movie. Some teenagers quarrel with each other all the time. The Problem is to devise a seating arrangement for the group in... |
Why is it the lower the h(n) cost the more nodes need to be expanded in A*?
As found here - http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html
If h(n) is always lower than (or equal to) the cost of moving from n
to the goal, then A* is guaranteed to find a shortest path. The lower
h(n) is, the more ... |
I have a high-level understanding of the $P=NP$ problem and I understand that if it were absolutely "proven" to be true with a provided solution, it would open the door for solving numerous problems within the realm of computer science.
My question is, if someone were to publish a indisputable, constructive proof of $P... |
IA-64 is an architecture that has 128 general purpose registers, are there any disadvantages (beside being more expensive and larger instruction size) to having many registers?
|
In reading some blogs about computational complexity (for example here)I assimilated the notion that deciding if two groups are isomorphic is easier than testing two graphs for isomorphism. For example, on the stated page it says that graph isomorphism is a more general problem than group isomorphism.
Hence I am posing... |
I saw somewhere that if we limit the capacity (weight) of the knapsack to a polynomial function of elements then the class of the problem changes to P, but it didn't say why. I can't figure out why is it true....
I think a found a solution but i'm not sure if it is completely right. The time complexity of the knapsack ... |
Consider a base 16 adder. How can I modify the adder so that it can perform a base 8 addition?
I expect this question will appear in my exam tomorrow; if anyone can give me a hint or a solution, I'd be grateful. I've tried searching the net and my textbook to get some insight, but nothing is clicking.
my textbook digit... |
Is it theoretically feasible to engineer a computer (more specifically its operating system) that is simple and primitive enough to be infected with any type of virus? That is, this would be a computer that can execute any type of computer virus regardless of what platform the computer virus was initially designed to ... |
I'm currently revising for my Concurrent Programming exam and I'm going through the past papers and one question poses the following process:
Process P1
integer x;
1a: x = a + a;
1b: b = x;
end P1;
and asks the following question:
Rewrite processes P1 to take into account execution using a ‘load/store’
architectu... |
In Section 3.1.2 "Transaction Histories" of the PhD thesis by Atul Adya [1]:
A history $H$ over a set of transactions consists of two parts: (1) a partial order of events $E$ that reflects the operations (e.g., read, write, abort, commit) of those transactions, and (2) a version order, $\ll$, that is a total order on ... |
I've found that 0.1 + 0.2 == 0.3 is not true in Java (see this demo).
So, I'm interested in how equality testing can be implemented for floats. Is there a standardized algorithm?
|
The definition of an $s$-$t$ cut is a partition of the set of vertices $V$ into $2$ sets $(A, B)$ with $s$ in $A$ and $t$ in $B$. My understanding of set partitions is that the positioning of elements in the graph does not matter.
However, if this is the correct notion of partitioning, then can construct a pathological... |
My initial guess is that you will have more instruction space for the immediate in your branch instruction when you first use a CMP instruction. However, you have to use 2 instructions each time you want to branch: a CMP and then the branch instruction.
So are there any advantages to using CMP?
|
I amb doubting with the implementation of the Edmonds-Karp implementation of the Ford-Fulkerson algorithm.
This is a problem with flow networks.
As I understand the algorithm, it consists on taking a path from s to t (randomly in Ford-Fulkerson, and a shortest path in Edmonds-Karp) and saturate the bottleneck for that ... |
$G=<V,E>$ is a directed graph. I need to write an efficient algorithm that finds a $v \in V$ such that there exists a path $\forall w \in V$ $v \rightarrow w$ ($v$ has a path to every other vertex), or "false" if there aren't any. If there are more than one, return one of them.
The obvious and inefficient way would be ... |
The NLP progresses seems to me that has split in two big group of thoughts:
Deep learning have a neural network with multiple layers that has been trained and learned to represent knowledge and understand the meaning of sentences. However, such system would be difficult to debug and correct
Logic and inference, label ... |
I'm revising for my finals. I have found a pattern in past papers in terms of a recurring question, reworded coming up every year. But I've no idea what the marker actually wants... I've asked class mates but they all seemed to be confused. One gave me a sample answer of code doing it, whereas another one thought he wa... |
I have to convert "A = B C + D E + ×" from reverse polish notation to infix. I'm a bit confused because of the equals sign. Is that an operator too?
This is my answer: A = (B+C) × (D+E)
Is this correct or would this be written another way?
|
Let $X$ and $Y$ be two sets of points in $\mathbb{R}^3$. Assume that the cardinality of $Y$ is larger (much larger if you want) than $X$. For each $x_i \in X$, I need to find all $y \in Y$ such that the distance between $x_i$ and $y$ is less than a (fixed) radius $R$. That is, for each $x_i$, I want the set $E_i = \{... |
What is the theoretical speedup that could be achieved with the pipeline system over a nonpipelined system?
The equation I use for speedup is
$$ S = \frac{nT}{(k+n-1)t}\,$$
where:
$n$ is the number of tasks
$T$ is the time to process a task
$k$ is the number of stages segments
$t$ is the time per stage segment
I ... |
I have a collection of substrings
"this" "is" "a" "antelope"
I need to look at any given string and answer the question "Are any of the given substrings in this string"
So my input string might be
"issue"
Which would be a match because "is" is a substring of "issue"
My first stab at this, I incorrectly turned my coll... |
Let $f$ be a Boolean function.
Let $p$ be the minimum degree real polynomial that represents $f$ with degree $d_f$.
Let $p_\epsilon$ be the minimum degree real polynomial with degree $d_{f,\epsilon}$ such that $$|p_\epsilon(x)-f(x)|\leq\epsilon.$$
Let $p_{0,\epsilon}$ be the minimum degree real polynomial with degree ... |
Given a problem $X$, to show it is is $\sf NP$-complete, one usually shows a deterministic reduction from an $\sf NP$-complete problem.
If it is hard to show deterministic reduction, then one shows a randomized reduction.
What does a deterministic reduction give about the hardness of the problem that a randomized redu... |
A microprogram control unit is required to generate a total of 35 control signals. Assume that during any microinstruction, at most 2 control signals are active. The minimum number of bits required in the control word to generate the required control signal will be
a.2 b.6 c.7 d.8 ?
Please explain how to calculate this... |
The question is not specific to any processor.
Can I have an assembly instruction, like:
ADD R1 R0 R0
R1 is the destination.
My understanding is that, if the register file in a processor supports 2 simultaneous reads in a clock cycle (i.e. 2 read ports), two different registers can be read. But for 2 same input regis... |
What is the running time of heapsort when the input array is in increasing order? How about decreasing order? (I came across these questions in CLRS.)
Here is what I have done so far ...
For the increasing order (i.e. the order opposite to the output order) I am completely stuck and haven't been able to make any pro... |
It can be proven that class of languages accepted by queue automata is equal to class of languages accepted by Turing machines.
It was mentioned somewhere that the language $$L = \{x\#x^R \mid x\in\{0,1\}^* \} $$ can not be accepted by a queue automaton. But the language is accepted by a TM. Can somebody explain this a... |
Given boruvka's algorithm:
MST T <- empty tree
Begin with each vertex v as a component
While number of components > 1
For each component c
let e = minimum edge out of component c
if e is not in T
add e to T //merging the two components connected by e
In each phase I'd like to reduce the g... |
I have the following problem:
You have n objects that have identical weight except for one that is a
bit heavier than the others. You have a balance scale. You can place
objects on each side of the scale and see which collection is heavier.
Goal is to find the heavier object, with the minimum number of weigh.
I k... |
Is it true that for all $n\geq 5$, there is a knight's tour of an $n\times n$ chessboard beginning at every square?
For example, is it correct, that there is no solution for a $5\times5$ board,
with start position $(5,4)$?
|
A link of capacity 100 Mbps is carrying traffic from a number of sources. Each source generates an on-off traffic stream; when the source is on, the rate of traffic is 10 Mbps, and when the source is off, the rate of traffic is zero. The duty cycle, which is the ratio of on-time to off-time, is 1 : 2. When there is no ... |
Suppose that there are $k$ sets $S_1, S_2, S_3, \dots, S_k$.
The numbers $N = \{1, 2, \dots,n\}$ are distributed into these sets equally.
Say that we partition $N$ into $m$ sets $P_1, P_2, \dots, P_m$.
The problem is to find how accurate is our partitioning.
However, the accuracy is not finding the exact same sets, but... |
Let's say I am to sort a bookcase given a certain sorting condition, for instance alphabetically. I am looking for a way to generate a step-by-step guide on how to do this sorting based on the original order, as well as the final order.
Original order:
B C A D
Final order:
A B C D
Generated step by step instructions... |
I have this problem :
And here's my attempted solution,
could someone inform on whether it's correct
thanks
Haven't got enough reputation to make them into images so far..
|
Is it only because of the fact that it is asynchronous and can be used for long distance message transfer. An example of where other protocols will fail would help.
Thanks.
|
L ={ $a^{m^n}$ | $m$>$n$ }
I am bit confuse whether to consider this language as L = $(a^{m})^{n}$ OR L = $a^{\left(m^n\right)}$.
If it is considered as L = $(a^m)^{n}$ then want to check it is Regular or not by Pumping Lemma.
I tried by following way.
$m$ > $n$ so we can take $m's$ value as $n+1$.
So $L$ ... |
I'm trying to show that a special variant of the common 3-SAT is NP-complete by reducing 3-SAT to this special variant.
This special variant works like the normal 3CNF-SAT, except every other clause is conjunctive instead of disjunctive. For example an instance of this variant could be
$(x \vee y \vee z) \wedge (x\wedg... |
I understand the concept behind Divide and Conquer, making one problem into sub problems and then merging the solutions together. However, from looking at a past paper a question has occured where it asks how 2^11 can be found using Divide and Conquer, I'm just confused how finding a power can be divided into sub probl... |
I missed a lot of lectures for this module due to surgery so I'm trying to teach it to myself now. This is the question I've been working on:
First of all, would I be correct in saying that the LTL formulas are b, c and e? CTL are a, d and f?
For (b) I'm guessing the answer is s1 and s3, since those are the only state... |
Let's say, I have a cache with:
2^32 bytes of memory
2048 blocks (of 16 bytes each)
Now I'm trying to figure out how much bits each field will contain.
Direct mapped:
One block is 16 bytes (16 * 8 = 128 bits). The block also contains 1 dirty bit and 1 valid bit. I know that since there are 2048 (=2^11) blocks, and ... |
I'm wondering if there is some formalization, type theoretical analysis, or similar for data structures that automatically "splice" in an associative way. Barring a perfect citation, I'd be interested to know if there are other keywords I should be looking for in this space.
Examples are particularly common in term-rew... |
We are given a set of circles, stored by their center points in an array $A$. In particular, the center of the $i$th circle is at coordinates $(A[i].x, A[i].y)$. All the circles have radius of $k$.
I want to find a subset of circles such that no circles in this subset intersect with each other, such that this subset ... |
I've read that "Every problem in NP can be reduced to every NP-complete problem".
I want to know why the term "Every" is important.If we have one problem in NP that is reduced to one NP complete problem then what will be the problem.
|
I have asked this question before and the question was closed. Due to it being a duplicate with algorithm analysis. I've looked at this thread that I'm constantly reminded of but I do not understand it in my scenario. I've gotten near the end of a past paper question and I'd just like to know where I can go from here t... |
A computer with a single cache (access time 40ns) and main memory (access time 200ns) also
uses the hard disk (average access time 0.02 ms) for virtual memory pages. If it is found that the cache hit rate is 90% and the page fault rate is 1%
I have to work out the EAT time for this and the speedup due to use of cache.
... |
I'm reading "Computer Science Made Simple" by V. Anton Spraul, and in the chapter about Graphics, he describes GIF files as follows:
A GIF file uses lossless compression to store an image with a maximum of 256 different colors.
The way I read this, it sounds like the book is saying it stores the image, but the stored... |
One definition of arithmetic circuits is as follows:
An arithmetic circuit $\Phi$ over the field $\mathbb F$ and the set of variables $X$ usually, $X = \{x_1, \dots , x_n\}$) is a directed acyclic graph as follows. The vertices of $\Phi$ are called gates. Every gate in $\Phi$ of in-degree $0$ is labeled by either a v... |
I've found that if I don't understand the etymology behind a cs/programming term, it usually means that I've missed or misunderstood some important underlying concept.
I don't understand why the Kleene star is also called the Kleene closure.
Is it related to closures in programming, a function with bound non-local vari... |
I read about Minterms i.e. sums of products, simplification using
Karnaugh Graph. Can this graph be used for Maxterms, i.e. products
of sums, as well? If yes, then how?
If not, then is there some other similar way to use, for simplification of Maxterms? I know, one can always convert Maxterms to Minterms and then use ... |
I have a BNE-instruction (32 bits), which contains 16 bits for the jump field:
Opcode A[31:26]
RS A[25:21]
RT A[20:16]
Immed A[15:0]
Assuming the BNE-instruction will now be written in 64 bits format, what would be the (new) max jump distance this instruction can make?
I really have no clue, what to do, so I hope so... |
I've recently attended a conference, where one of the participants mentioned a recent paper published by a Google employee, which showed that using data mining techniques in application to NLP might sometimes give better results than using the NLP methods themselves.
That was the only description he gave and on top of ... |
Assume $P=PSPACE$. Then would it be possible to design cryptographic protocols based that is easy to compute from $PSPACE$ but hard to invert from something higher up in hierarchy?
A function $f: \{0, 1\}^*→ \{0, 1\}^*$ is one-way if $f$ can be computed by a polynomial time algorithm, but for every randomized algorithm... |
I really cannot understand the key-differences between those fields of study. Can please someone explain it in detail? If one graduates from a Master program of Computer Science, how does he differ from the one graduated from a Software Engineering program, or one from IT?
|
I have the following grammar for a context-free language:
$G = (\{S,A,B\}, \{x,y,z\}, P, S)$ with
$P = \{S \rightarrow A, A \rightarrow xAz, A \rightarrow xBz, B \rightarrow y\}$
My question is: How to construct a pushdown automaton associated with the above grammar?
|
Essentially similar question to here Different boolean degrees polynomially related? (change being error condition $\epsilon\in(0,1)$).
Let $p$ be the minimum degree (of degree $d_f$) real polynomial that represents boolean function $f$ such that $f(x)=p(x)$.
Let $p_{0,\epsilon}$ be the minimum degree (of degree $d_{0... |
where can i find very old books about old operating systems like CP/M and DOS and other OS that worked on the 8086 ??
second question isn't old books 20 year before and older should have an expired patent ??
where in general can i find books of expired patents ...
thanx
|
I have a Turing Machine M with a binary alphabet {1,2} that accepts a language L(M) that has infinitely many strings that start with 1 and finitely many strings that start with 2. I'm trying to determine if L(M) is decidable, semi-decidable (computably enumerable) or undecidable.
Using Rice's Theorem, I believe I can p... |
Is the Subset-Sum Problem (SSP) with a changing target sum (which is dependent on the chosen subset) also NP-complete? If so, how would I reduce SSP to this or prove that it is NP-complete in another way?
This is the last step on a larger problem I'm working on and greatly appreciate the help!
|
I am struggling to think of the context-free grammar that generates the language $L(G) = \{a^ib^jc^{2i}d^m\}$, where $i$, $j$ and $m$ are natural numbers.
Also, in general, are there any good methods or ways of thinking that help one to think of context free grammars that generate a given language. Any tips are much ap... |
I have always wondered why is computer architecture in $2^n$ bits. We have 8 / 16 / 32 / 64-bit microprocessors or for that matter other parts of computer are also in power of 2 bits.
The only logic I could understand from my reasoning is that usually computer design process starts from lower amount of bits. For examp... |
Is there an algorithm to prepare all sums of pairs of a list ($L$, size $n$, max value $m$) in $< O(n^2)$ such that query "does this sum of pairs exist" takes $< O(n)$? In other words, can max value $m$ be used to advantage?
E.g. in $L =\{1, 2, 4, 8\}$ and $m = 8$, all (distinct) sums of pairs are $S = \{2, 3, 4, 5, 6... |
I'm reading about a Turing Machine $M$ and it says the problem of deciding whether M accepts a string is "$\Sigma^0_2$-hard and $\Pi^0_2$-hard".
I haven't seen this kind of notation before and haven't found a good answer from searching. Is this a more specific form of saying NP-hard?
|
Assume you are getting a number $m$ (using $O(\log m)$ bits in binary encoding).
How fast can you find (or determine such does not exist) $$n,k\in \mathbb N, 1<k\leq\frac{n}{2}:{n \choose k}=m$$
?
For example, given the input $m=8436285$, one may output $n=27, k=10$.
A naive algorithm for the problem would go over al... |
Problem:
Suppose there is a graph, a source and a sink. Each edge has a capacity and an extra capacity that it can hold. If sink needs a defined amount of flow F, find a total extra capacity needed E so that maximum flow from source to sink is greater than or equal to F and flow in each edge that has nonzero flow.
I do... |
Problem:
Suppose there is a graph, a source and a sink. Each edge has a capacity and an extra capacity that it can hold. If sink needs a defined amount of flow F, find a total extra capacity needed E so that maximum flow from source to sink is greater than or equal to F and flow in each edge that has nonzero flow.
I do... |
Given an English sentence, I am looking for a programmatic way to tell whether the sentence is written in passive voice.
Currently, I just check if there is a was or were inside the sentence. If yes, then the function will say that the sentence is in passive voice (I do no not know even if this is true). Is there a be... |
Recently it occurred to me that one could potentially design an interactive "compression" scheme which seems to allow for arbitrarily high compression ratios, at the sole expense of time. This already sounds pretty cranky, I realize that, but here is a formal description of the protocol which I hope makes sense:
Defin... |
Given two lists of non directional graph edges e.g.
[(1,3),(3,5),(5,1),(5,7)] [(4,5),(2,3),(3,4),(4,2)]
In order to check if the two graphs are isomorphic is it enough to count the vertices with the same degree between them?
e.g. Vertice 1: 2 1: 0
2: 0 2: 2
3: 2 3: 2
... |
So theoretically, what sort of machine would we need to solve the tiling problem?
(Given a set of tiles, decide if they will tile the plane or not.)
I know we could have a Turing machine plus a "tiling oracle", but do we know what, specifically a Turing machine isn't able to do that keeps us from being able to compute ... |
in 35.5 of CLRS i have read about algorithm to find sum as large as possible, but not larger than $t.$
Essential part of this algorithm is trimming. On every step you delete all numbers which close one to another, but one to represent them all. Good explanation of the algorithm.
At page 7 from provided link or at pag... |
Let $A$ and $B$ be two decision problems in $NP$. Consider three cases:
(1) For any instance of problem $A$, one can produce, in polynomial time, an instance of problem $B$ having exactly the same number of solutions as $A$.
(2) For any instance of problem $A$, one can produce, in polynomial time, an instance of proble... |
I will soon have to be able to draw a suffix tree of a word on an exam. I tried to understand the different algorithms available, but they seem rather complicated to do "by hand".
I do not see a simple way how to draw such a tree. Is there a simple step by step method for people not knowing the algorithms?
|
Suppose we have a tree in which leaves are labeled with a set of numbers $L$, and internal nodes with a set of operations $O$.
In particular $L$ can be $\mathbb{N}, \mathbb{Z}$ or $\mathbb{Q}$, and can optionally contain $\pi$ and/or $e$.
$O$ can be any subset of $\{+,-,\cdot,/,\hat\ \}$.
Is equality with zero decidabl... |
My understanding is that Karp many-one reductions are more general than Levin many-one reductions, and that Levin many-one reductions must allow for the number of certificates for a problem $A$ reduced to $B$ to be recovered from a single oracle call giving the number of certificates for $B$.
So, what exactly is a Karp... |
Given a number N, and some set $A=\{a, 1\le a\le N\}$, and let $B=\{\text{every integer} \in [1,N]\}$, and $C=B\setminus A$ (Set C has all values from B not in A)
What is the best way of finding the smallest number ($S$) that can't be obtained from the sum of any subset of C?
i.e.
if $A=\emptyset$, the smallest number ... |
Consider a machine that has nested interrupts (a higher priority interrupt can interrupt a lower priority one, the current instruction's address is saved and later restored). Why would a programmer want to disable all interrupts using instructions like x86's CLI when you know that even when your code gets interrupted i... |
I have $n$ numbers that come one by one, and when the last element comes, I want to output $k$ largest elements and those that are ties with the minimal element from this top-$k$ element.
For example, I have $[10, 7, 7, 9, 10, 10]$ and $k = 4$, then I want to output $[10, 9, 10, 10]$. However, if $[10, 7, 7, 9, 10]$ a... |
Randomized Quick Sort is an extension of Quick Sort in which the pivot element is chosen randomly. What can be the worst case time complexity of this algorithm. According to me, it should be $O(n^2)$, as the worst case happens when randomly chosen pivot is selected in sorted or reverse sorted order. But in some texts [... |
Given $G = (V,E )$ a directed graph, if $ X \subseteq V $ we write
$$\begin{align*}
\delta ^{+}(X) &= \{ xy\in E \mid x \in X, y\in V - X \} \\
\delta ^{-}(X) &= \delta ^{+}(V - X )\,.
\end{align*}$$
$\delta^{+}(v)$ and $\delta^{-}(v)$ are short notation for $\delta^{+}(\{v\})$ and $\delta^{-}(\{v\... |
Essentially similar question to here Different boolean degrees polynomially related? (change being error condition $\epsilon\in(0,1)$).
Let $p$ be the minimum degree (of degree $d_f$) real polynomial that represents boolean function $f$ such that $f(x)=p(x)$.
Let $p_{0,\epsilon}$ be the minimum degree (of degree $d_{0... |
The $K$th Largest Subset problem is often given as an example of an NP-hard problem. However, the assumption is that $K$ is unconstrained, and can be as large as $2^n$. Clearly, if $K \le 3$ the solution in $O(n)$ time is trivial.
Are there any general results for time complexity of this problem for a given (and potent... |
I want to prototype and try some idea (some algorithm) in the field of text processing and nlp and if the results was good I want to publish some paper or journal article about that.
I am familiar with Weka, RapidMiner, Matlab and Python for text processing and nlp but I don't know what is the most frequently tools for... |
I want to study Artificial Intelligence from Artificial Intelligence: A Modern Approach by Russell and Norvig, in the mid-year vacation. I want to get prepared before diving into the book so I decided to review some relevant subjects like Discrete Mathematics. I know there is a good book for Discrete Mathematics by Ken... |
In my opinion it seems fairly obvious that a $k$ nearest neighbours (KNN) Classifier would be fairly expensive in terms of memory, as the model is the training set itself. However, any notes I've read have only mentioned that the KNN-Classifier is computationally expensive, and have not mentioned any memory requirement... |
I've sketched a very small transition system in paint that I'll use as an example.
I want to see if $A(aUb)$ holds for this transition system. From my understanding, this CTL formula is asking if ALL paths satisfy $aUb$. The only path we can take in this example is S0S1S0S1S0S1S0S1...
This path produces the output (1... |
Has anyone studied the problem of converting a generic flowchart to a semantically equivalent "structured flowchart" (i.e. one that only uses the 'if' and 'while' block structure)?
I can see this may be relevant to code generation and optimization but I've not been able to find anything on the topic.
Intuitively, I wo... |
Based on the notes of my Machine Learning lecturer, I am struggling to understand how the two algorithms differ? Both seem to select the most informative feature A (based on least entropy), then create subsets of the example set for each value of A. Then create a new branch on the tree by recursively calling ID3 on eac... |
I need to prove:
XY + ~XZ + YZ = XY + ~XZ
I cannot think how to do this.
I have tried factorising, but I just don't know of any rule that removes one of the terms like above.
I start with the LHS, naturally:
All I can do is get to:
Y(X+Z) + ~XZ
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.