instruction stringlengths 35 29.1k |
|---|
Suppose we have a composition of functions $F(x)=f_n \circ f_{n-1} \circ \ldots \circ f_1 \circ x$, where $f_i: \mathbb{R}^{d_{i-1}}\to \mathbb{R}^{d_i}$
The Jacobian of $F$, has shape $d_n \times d_0$ and can be written as a product of Jacobians of $f_i$'s. We can assume these Jacobians are provided, then the minimum ... |
I do not know how to solve the following problem:
Given a directed graph $G$ with a two nodes $s,t \in V(G)$ find a cut $(S,T)$ with $s \in S$ and $t \in T$ such that $(S,T)$ has the minimum number of edges with the "reverse edges", i.e. the edges in $(T,S)$, also counted.
I realise that, when the reverse edges are not... |
My professor discussed the following Turing machine M' on input (,x):
Generate number n
Run M on X, for n steps
If M stops, accept
I don't understand No.3
If we are running M on input X for final number of steps then there is no way for M not to stop... so why he wrote if M stops?
|
I am wondering if the following are decidable or undecidable and why. L is a CFL and R is a regular language. How does the complement of the context-free language change the decidability of the intersection?
∩=∅ and $\bar{}$∩=∅
This is what I think but I am not sure so any help is appreciated.
For , I think this is dec... |
Cormen's Algorithms 3rd edition Exercise 26.2-13 Page 731:
Suppose that you wish to find, among all minimum cuts in a flow
network G with integral capacities, one that contains the smallest
number of edges. Show how to modify the capacities of G to create a
new flow network $G_0$ in which any minimum cut in $G_0$ is a... |
I understand that one can use dovetailing to recursively enumerate the domain of a UTM.
However, I am trying to recursively enumerate the domain of all possible UTM.
My starting point was to use a similar algorithm to dovetailing, but then I realize that I do not know the set of all universal Turing machines.
Proving t... |
I am currently new and learning about loop invariants. I have come across this pseudocode where the goal is to shift the elements inside an array with N size in a clockwise direction by K steps.
Pseudocode:
Is at every iteration, new_index is in [0,N) a good loop invariant? I am really confused about how to pick a g... |
In Chapter 8 Question 5 of Kleinberg and Tardos, the problem is as follows:
Consider a set $A = \{a_1, \ldots , a_n\}$ and a collection $B_1, B_2, \ldots , B_m$ of subsets of $A$ (i.e., $B_i \subseteq A$ for each $i$).
We say that a set $H \subseteq A$ is a hitting set for the collection $B_1, B_2, \ldots , B_m$ if $H... |
I would like to define a Turing machine as follows.
Let Z be an alphabet, and let L be the set of all sentences of this alphabet. For instance, Z={0,1}, then L is the set of all binary sentences.
A Turing machine is a function which takes a (binary) input and produces a (binary) output:
$$
TM: L \to L
$$
However, it is... |
I'm working on a project over Bin packing being NP complete, I understand the full reasoning behind it (algorithmically), but I need to know what's a proper explanation for the Bin packing being NP complete (the computational way "theory of computation") not algortihmically.
|
In answering this question, I was looking for references (textbooks, papers, or implementations) which represent a graph using a set (e.g. hashtable) for the adjacent vertices, rather than a list. That is, the graph is a map from vertex labels to sets of adjacent vertices:
graph: Map<V, Set<V>>
In fact, I thought that... |
Can you share examples of comparison-based algorithms used in practice that are not a sort or a search over lists? Heapify is an example of a comparison-based algorithm that is neither a sort nor a search. Heapify is of course part of Heapsort and still operates over lists. Are there other examples of comparison-based ... |
I am looking for combinatorial optimization problems which have very deep local minima.
So I am searching for the global optimum (which is not unique).
Are there some games or problems you know which have this behavior? A problem without a reward function for each step.
|
I'm trying to convert 3.2 into IEEE 754 format. We find that $(3)_2=11$ and we also find that
$0.2*2=0.4 -0$
$0.4*2=0.8 -0$
$0.8*2=1.6 -1$
$0.6*2=1.2 -1$
and this cycle repeats so $.2=00110011...$
finally we find $11.00110011...$
we normalize $1.1001001...*2^{1}$
and calculate the exponent $127+1=128=10000000$
we find ... |
As I know any local DHT keeps only some of nodes - if the network is small/very small then all nodes, otherwise only some of them (nearest?).
So, when I checked different Golang implementations of DHT (Bittorrent, Node Discovery Protocol and similar) - some of them have functions listing nodes, but as I understand, jus... |
Problem:
Let $U = \{0,1,2,3,4,5\}$ be a universe of keys and $T = \{0,1,2\}$ we observe follwing 5 hash functions which map from $U$ to $T$ :
$$h_1(x) = (x+1) \mod{3} \hspace{5mm} h_2(x) = (x+2) \mod{3} \hspace{5mm} h_3(x) = x \mod{2} \\ h_4(0) = h_4(5) = 2 \hspace{5mm} h_4(1) = h_4(2) = 1 \hspace{5mm} h_4(3) = h_4(4) ... |
The Wikipedia article on Equitable coloring states that
A polynomial time algorithm is known for equitable coloring of split
graphs.
The referred paper also seems to achive the proposed polynomial time, as far as my understanding goes.
One the other hand some other published paper states the following:
EQUITABLE COL... |
Even if the hamiltonian path problem is NP-hard there exist heuristics which return a correct path for many instances in linear time. In particular one of the main rules is always choosing the adjacent vertex with the least degree; there are also strategies to manage tiebreaks but I think they are even more difficult t... |
I'm trying to solve this exercise that asks to determine whether a language is regular or not.
Following the flow of the course I figured that the exercise is a test for Pumping Lemma application. But for this particular language I'm having a problem understanding where I'm at fault.
The language given is $L_3 = \{1^{2... |
Both the Topological Sorting algorithm and the algorithm to find Strongly Connected Components build a stack whose top is the last visited vertex.
I find difficult to find an explaination because Topological Sorting algorithm is applied on DAGs, whereas the other one can be applied on any type of graph, especially cycl... |
A few months ago I learned about the magic that allows radix sort to run in O(n) time and space. Most tutorials on radix sort say it is useful for very large collections where the key values fall inside a defined range. They then go on to say that it's really only reasonable when sorting unsigned integers. The reasons ... |
How can I define a valid $\hat{C}$ for a job assignment problem where I have $n$ jobs and always $3$ employees, where the cost of an employee doing a job is defined as $C_{ij}$ and no employee can do more than $\lceil \frac{n}{3} \rceil$.
I know that if I had $n$ employees and $n$ jobs then I can do something like:
$\h... |
Is it possible to use pattern matching algorithms such as FP-Trees and others on data that resides in multiple machines?
Basically when doing pattern matching do you have to have all your data on the same disk?
|
I'm working on a project where I need to optimize both the locations and orientations of a collection of irregular 3D objects in a given simulation box.
To optimize the locations and orientations means the irregular 3D objects in the simulation box must not overlap, and the resulting packing configuration of the object... |
I was learning LALR parsers from the dragon book (Compilers: Principles, Techniques, and Tools by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman) and I came across the example on page 267. I'll try my best to describe my question without needing the actual book for reference.
The book states that:
I4 ... |
Let
$$L_{\text{PSPACE}}=\{\langle M\rangle : M \text{ is a TM using a polyspace amount of memory}\}$$
Is $L_{\text{PSPACE}}$ decidable?
I don't think we can use Rice's Theorem because this doesn't seem to be a semantic property of TMs. I also don't see any reduction from the HALT problem, or other known undecidable l... |
Assuming we have two dense matrices $A \in \mathbb{R}^{m\times m}, B \in \mathbb{R}^{m\times n}$, is there a smart way to compute all entries of the series $A^1 B, A^2 B, A^3 B, \dots, A^k B$ up to some k? In general the matrices are arbitrary, but I'd be willing to accept some not-super-restrictive structure if that w... |
Given an array of $N$ elements, $A$, and a number $K$. ($1 \leq K \leq N$) .
Partition the given array into $K$ subsets (they must cover all the elements but can be noncontiguous too). The maximum subset sum achievable out of $K$ partitions formed, must be the minimum possible.
Find that possible subset sum.
For exampl... |
In my theoretical computer science class we learned about FSMs/lexical analysis/parsing. However, my teacher focused solely on the table-driven approach to the process for simplicity (I think, anyway), where the table is a 2D array with the row being a character and each column being a DFA state transition. The table t... |
Assume to have query access to the values $p(x)$, and $q(x)$ of two probability distributions over n elements $x \in X$, $|X|=n$.
That is, for a given $x\in X$ we pay constant time $O(1)$ to perform a query to $p$ or $q$.
What is the fastest randomized algorithm for estimating the trace distance between $p$ and $q$? Fo... |
I have $n$ sets, each of which overlaps heavily with the other sets, and I want the union of all of them. The obvious solution is to take the union of each set, one by one, which results in $O(n^2)$ running time, but is there a better solution?
Clarification from the comments: Assuming all sets have $n$ elements, so $n... |
In a textbook on systems and networks, it states "Stated broadly, a program tends to access a relatively small region of memory irrespective of its actual memory footprint in any given interval of time"
Was there some kind of meta-analysis done on multiple programs to come to this conclusion?
|
Let's say we have a function shift(array[], int s) which swaps the position of array[s] to array[0] and shifts all other elements to the right. For example:
array = {1,2,3,4,5,6} --> shift(array, 3) --> array = {4,1,2,3,5,6}
If you were to sort an array consisting of numbers 1..n using only the function shift, what wou... |
I have an excercise where I have to translate verbally formulated statements into CTL formulas. I have particularly trouble with this one:
On every path q is true at least once and p was true sometime before, after
no longer.
My attempt is the following: $AF q \land (EF p) AU q$
This is obvously wrong. The first part... |
I still am confused whether I am asking the right question but here goes
Consider a X bit processor. It can address theoretically a main memory of 2^x bytes(assuming byte addressable). Now consider an operating system which supports virtual memory. This allows it to execute programs much larger than the actual main mem... |
Consider the case where you have 3-dimensional space. You want to know whether at a given point (x,y,z) in space, does anything exist(just like checking if in a 3D array at (x,y,z) is there a 1 or 0). What would be the most efficient way to perform this kind of operation keeping hardware limits in consideration(like if... |
What would be a good choice for a key to sort a complex number $(a+ib)$ or any $n$-dimensional data for that matter. Is using the magnitude of that vector a good choice rather than using any one of the dimensions, or is there any other metric which would suit this?
This was asked to me in an interview (it went like "h... |
In my Lecture we came across something of importance for the Church-Turing-Thesis and i noticed one particular function, which confused me.
Function:
Let $bin(x)$ be the injective binary extension without leading zeros. It is not surjective because of the extension without leading zeros.
$$cod := \{0,1\}^* \to \mathbb... |
I wanted to parse strings to AST data structures instead of CSTs - which introduce a lot of intermediate nodes like terminal that might not be needed. I am not sure if one first creates a CST and then trims the CST somehow to generate an AST. This seems that should be a well solved problem so I didn't want to be adhoc ... |
I'm writing a closestSubset(s,A) function that takes an integer s and an array of positive integers A and returns an array consisting of elements of A which add up to s. If there is no subset that adds up to s, I want the function to instead return the subset which adds up to the value closest to s.
For example:
if A ... |
Apparently, each stage of the MIPS processor pipeline takes one CPU cycle. According to this, a memory write can take more than one cycle:
1 cycle to read a register 4 cycles to reach to L1 cache 10 cycles to
reach L2 cache 75 cycles to reach L3 cache and hundreds of cycles to
reach main memory.
How then can the MEM... |
I know that the fastest known algorithm for multiplying two $m \times m$ matrices runs in time $m^{\omega}$, where currently we have $\omega = 2.3728596$ due to Virginia Williams's latest result
(see here and here). But I'm not sure how this translates to matrices with other dimensions.
In terms of $\omega$, $l$, $m$, ... |
I’m a CS senior with and Individual Study period this coming semester, and I’ve decided I’d like to learn more about Programming Language Concepts. More specifically, different programming paradigms, like Functional and Logic programming.
Not sure how most universities handle ISs but I’m to essentially write a syllabus... |
(Source: https://leetcode.com/problems/jump-game-ii/)
Consider the following problem: Given an array of non-negative integers nums, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Your goal is to reach the last index in the mi... |
For this question suppose Alphabet for input is {0,1}.
Given:
L={<M> | M stops on every input after maximum 1000 steps}
My professor claimed that there is a finite different Turing machines (M) in L, But why is that?
One of the students mentioned something about finite number of snapshots (1001) But I don't agree or u... |
I know that an inverted index is a mapping from words -> documents. In the database I'm using, I'm able to do a search for apple*, and it will return apple banana, banana apple banana, and applepie. The one that confuses me is applepie. I assumed the inverted index would only have the word applepie in the mapping from ... |
The halting problem is NP hard, to my knowledge any NP problem can be reduced to a NP hard problem. Let us define a new computational complexity class called HP(Hypercomputational polynomal-time), The class of all problems solvable in polynomial time on this particular hyper computer. This would include the halting pro... |
I found an AVL tree implementation on the internet and experimented:
For a tree with node count of 2^20, the minimal and maximal tree heights are 16 and 24.
While these heights are lg(n)-ish, I am concerned about their difference.
Doesn't AVL guarantee maximal-minimal height difference to be 1?
The repository from whic... |
In lectures my professor proved that there is no Turing machine that for every x it calculates k(x).
On the other hand, I saw a claim online that for finite language L there is a Turing machine that calculate k(x) for every x in the finite language L.
But how does it work, why is this possible.
|
Is even distinguishing between NP complete and incomplete problems an NP-hard problem?
|
Background: I'm trying to program a generic method to add a node to a Directed Acyclic Graph. This method should allow the caller to specify the possible effects on the graph, specifically the edges.
So far, I have identified the following possible changes, but I'm not sure if this set is complete.
Add a new edge from... |
Currently, I am working on a research project where I will utilise reinforcement learning for the diversified top-$k$ clique search problem. To train the reinforcement learning algorithm, I need to generate graphs that have similar properties, such as average degree and overlapping cliques, to the ones used in the pape... |
Consider two decision problems A and B.
We know that A reduces to B in polynomial time --- if we could solve B, we have a procedure to solve A.
Now, let's say it is known that the worst case instances of A reduce to the average case instances of A.
Does it imply the same worst-to-average-case reduction for B?
If not, w... |
Use Nerode's theorem to prove that the following language $L$ is not regular:
$$ L=\{a^{k!} \mid 1\leq k\} $$
Here is my attempt:
Let $A$ be an infinte set of words s.t- $$ A=\{a^n \mid n\in \mathbb{N}\}$$
Then we shall consider 2 words from the set $a^{i!}$ and $a^j$ s.t-
$$ i!\leq n, i!\ne j$$
$$a^{i+1} \longright... |
Why is a Language L(M) {has at least 10 strings} recognizable and L(N) {has at most 10 strings} is not?
{⟨⟩:() has at least 10 strings}
{⟨N⟩:(N) has at most 10 strings}
My proof (I dont know if I'm wrong)
L(N) => I could think of a turing machine that takes as an input 10 strings of the language and accept them, if ... |
In these lecture notes (on page 5 under "Some Remarks") it is claimed that the Set Lower Bound Protocol (given there on page 4) can be modified to have perfect completeness. However, while I understand why the original protocol works I do not see how such a modification is possible. Could you please give me a hint?
|
I am looking for some algorithms(examples) whose time complexity is given by $O(n^k)$. It could be any problems that you have come across. Please reply. Thanks!
|
A solution to an instance of the Maximum Coverage problem with a budget of k subsets can be approximated with a greedy algorithm that, at each iteration, picks one of the subsets that adds the most additional coverage. This has been shown to lead to a worst case performance of $(1 - 1/e) \cdot \mathsf{OPT}$, where $\ma... |
I am currently studying lambda calculus, and would like to represent an array that accepts multiple dimensions. I still haven't figured out how to implement uni-dimensional arrays though.
I have found an interesting article on how to represent lists in lambda-calculus, but nothing for arrays. I have been unsuccessfully... |
High school teachers use this Website called Kahoot to post quizzes that are answered live by the students. Students sign in to the quiz and are invited to input a name for themselves, and as you might imagine, some students have used some rather unsavory names like Phil McCraken.
As a programmer, I thought I'd researc... |
This is a question from an exam I got wrong. Given an undirected graph $G$. Consider the decision problem of finding if there exists a vertex cover of size at most 30. Can we find a polynomial time algorithm for this problem? I answered that it is not possible because vertex cover is NP hard, but it turns out that ther... |
I know that Turing-completeness is the ability to simulate a Turing machine, and from what I've read, the reason why we should care about Turing-completeness is that it demonstrates that a machine can "run any program" or "compute the result of any algorithm." While I understand these descriptions, I'm wondering if th... |
I have this function which traverses each node of a left child-right sibling binary tree once and I want to solve the recurrence relation of the function.
First of all I think the relation looks like this:
T(n) = 1+m[4+T(n-m)] = 1+4m+mT(n-m)
Where m is the number of nodes on a level and n the total amount of nodes in t... |
If I want to show that H is RE-Complete is it enough to show it's undecidable? or should I prove something else alongeside?
$H$ is the halting problem: $H = \{<p,x>|p \textit{ halts on } x\}$\
|
Matrix Chain Problem can be viewed as the problem of finding the optimal summation order in a path-structured tensor network. How hard is the problem if we extend it to trees?
For instance, take the following sum, written in Einstein summation notation
$$A_i B^i_j C^j_k D^k$$
This corresponds to the tensor network belo... |
Why cant we approximate the number of satisfying assignments of a CNF formula $g$ by first counting the solutions to $\neg g$ (which is in DNF) using the FPRAS for $\#DNF$ and then estimating the $\#g$ to be $2^{n}-\#(\neg g)$?
PS: I say why we cant, because I don't see this approach tried anywhere and seems too trivia... |
Probably this is a basic question but I'm not sure how to finish this proof. I have a problem $X$ and I want to prove that it is possible to reduce $X$ to another problem $Y$. I know that $Y$ is NP-complete and that $Y$ can be reduced to $X$. Can I just conclude that $X$ is also NP-complete and thus $X$ can be reduced ... |
There are $M$ interconnected nodes in a peer-to-peer network. Initially,
each node numbers itself with any integer from $1$ to $N$, $N \leq M$.
Each node counts the most occurrences of neighboring nodes, including
itself, and modifies its number to that value. If all the numbers occur
equally, a non-self number is ran... |
I have to design a Turing machine which takes a input string $a^{*}$.
$a^{*} = \left \{0,1 \right \}^{+}$
Following this pattern where S is the input string:
$$
S_{n} = \left \{0, n=0 \right \} \\ \\ S_{n} = \left \{S_{n-1} \overline{S_{n-1}}, n>0 \right \} \\
$$
The overline meaning that part will be inverted
Exam... |
Following this question on MATLAB's Discord channel, I did a bit of search and found this interesting answer using circshift() function to detect zero-crossings. I used the answer to provide this answer:
x = linspace(-10, 10, 200);
f=@(x) exp(x) - x.^4 .* sin(x) - 100
zx = f(x) .* circshift(f(x), [-1]) <= 0; % Estima... |
The penultimate step of the Christofides algorithm in solving the TSP asks us to find an Eulerian tour of the subgraph formed by uniting the MST of the original graph and MPM of a subgraph. I understand the starting point for the Eulerian tour will make a difference to the Hamiltonian circuit found after deleting the d... |
It is well known that at height $i$ the number of nodes is bounded by $ \frac{n}{2^{i+1}} $, for example there are at most $n/2$ leafs.
Now, it makes sense only if we're taking $ \left\lceil \frac{n}{2}\right\rceil $, because for example, a binary tree with $7$ nodes has $4$ leafs at most.
My question is: why do we ta... |
A certain hash table uses external chaining, and is resized each time its load factor
exceeds 3. Also, if an addition does not cause the load factor to exceed 3, but does
cause some bucket to exceed 6 elements, the table is given a new hashing function
and the elements of the table are redistributed in accordance with ... |
The question is about approximation algorithms to NP-hard optimization problems.
For concreteness, let $M$ be a minimization problem with $n$ inputs, where all inputs and outputs are integers in the range $1,\ldots,V$, and $\log V$ is polynomial in $n$, so that the problem size is polynomial in $n$.
A FPTAS (Fully Poly... |
I've learnt theoretically Computer Architecture at uni.However I can't wrap my head around it in practice. I am using Simple Scalar tool to simulate a benchmark program with configurable computer design option parameters such as number of floating units ,pipeline width , integer ALU , memory ports. Having tried differ... |
Where bin(n) is the shortest binary representation of n.
First, we can see that we can rewrite it as $bin(n)bin(2(n+1)+1)^R$ which implies that the second word will always start from 1.
We can also see that the words in that language will be of form:
$w011w^R$ if the word ends with 0, because we need to just get to bi... |
In most articles that compare word embeddings they use cosine distance to determine if words are similar. Why?
I guess that euclidean distance should work too. So, my question is: it doesn't?
And why cosine distance doesn't fail?
|
Suppose I have a table with millions strings in it as keys.
What data structure can I use in order to efficiently support only queries like that?
select *
from table
where key contains (('cat' and 'dog') or 'apple')
example of strings that should be selected:
cat loves dog
cat and dog
apple trees
The collection is st... |
I was writing a program to count lines from an input text stream.
This is the program. It compiles perfectly but when I execute ./a.out to get the output my program doesn't seem to run.
I enter the text and then enter the command ^z (control z) and it shows the error mentioned. (zsh: suspended ./a.out)
I just want the... |
Suppose we have a grammar having a one step derivation like
S -> a
where 'S' is a variable and 'a' is a terminal.
Since this grammar does not pump terminals, can we say that the language generated is context free by using pumping lemma?
|
Are there any polynomial functions that are $O(e^x)$? Is this possible?
|
In the subset sum problem, the input is a list of positive integers $x_1,\ldots,x_n$ and an integer $T$, and the goal is to decide whether there is a subset of sum exactly $T$.
The problem can be solved by dynamic programming in time $O(n T)$: for every $i\in\{1,\ldots,n\}$ and $j\in\{1,\ldots,T\}$, we compute whether ... |
Section 6.2.1 of the book "Compilers: Principles, Techniques, and Tools" describes three-address code. Specifically,
Procedure calls and returns are implemented using the following instructions: $\text{param } x$ for parameters; call $p, n$ and $y = \text{call } p, n$ for procedure and function calls, respectively; and... |
Let's assume I have the following 3 clauses:
$\neg T$,$\neg Q$, ($\neg P \lor Q \lor S \lor T)$,$(\neg U, T, \neg S)$,$(\neg U, T, P)$
and I want to see if our KB entails $\neg U$ so I tried to apply the resolution algorithm like below:
$$
(\neg P \lor Q \lor S \lor T) \land \neg T \land \neg Q \land (\neg U \lor T \lo... |
Suppose we have a graph such that we want to apply a maximum flow algorithm(for example Edmonds Karp) on it.
And suppose we only know that graph's diameter is 70 so we want to calculate that's time comlexity .
As you know , Edmonds Karp time complexity is O(V.E^2).
We can conclude that we must know V and E of the graph... |
Consider the context-free language of balanced parentheses of three kinds:
$$L = \{w \in \{ (, ), [,], \{, \} \}^∗ \mid \text{all parentheses in }w \text{ are properly balanced}\} $$
What will be the complement of L? Will it be semi-decidable, Decidable, Context-free, or REG?
I am not sure how to approach this.
|
I am not sure whether this statement is true or not. Could there be an example of CFG generating a regular language and is ambiguous?
|
I may be misunderstanding this. But the halting problem ∈ RE-complete. P ⊂ RE EXP ⊂ RE. therefore EXP^RE = P^RE = RE(my logic might be(is probably)) wrong here, please edit it if it is to be right) Hopefully you get the idea.. Isn't the time hierarchy theorem supposed to hold relative to every oracle, but here it seems... |
I'm stuck on a homework assignment. There are $n$ axis aligned rectangles and we need to find a data structure of size $O(n \log^2 n)$ and query time $O(\log^3 n + k)$ that can give all rectangles completely contained in an axis-aligned query rectangle (where $k$ is the number of contained rectangles).
The course cover... |
Also are there any R complete problems? These would be the hardest decidable problems to my knowledge. Sorry if this isn't specific enough.
|
For a graph theory problem I need to solve hundreds of millions of CNF problems that typically have around 200 variables and 15,000 clauses no larger than 10.
By default I use glucose, which usually takes a fraction of one second. However, in about one case out of a million, glucose doesn't want to finish and I don't s... |
This imprecise question is about a simple example for the following problem.
I would like a Turing machine with few states that accepts only inputs which look complicated to the naked eye.
Of course the Kolmogorov complexity of the lexicographically smallest such input would be at most a constant more than the size o... |
The screenshot is from Georgia Tech's CS-6400. The instructor was talking about inheritance of Sub-Types and Super-Types.
My question is, why are Male and Female created as separate entities from the User entity here? Is it just for illustration purposes? Can we simply add a gender property to User, which values can b... |
Let SMTM be Turing Machine, but the commands recorded in which can change to others in some random way (for example, choose with a 50/50 probability the command to move to the right or move to the left), and SM-NTM be non-deterministic Turing Machine with same property (note that NTM non-deterministic in sense of choos... |
According to Wikipedia: An augmented tree can be built from a simple ordered tree, for example a binary search tree or self-balancing binary search tree, ordered by the 'low' values of the intervals. An extra annotation is then added to every node, recording the maximum upper value among all the intervals from this nod... |
I have the following problem:
Let $H=(W, F)$ a graph and $k \in \mathbb{N^*}$ be an instance for problem $\textbf{CMP}$ (i.e. the clique problem). Let $W'$ a set of new vertices, $|W'|=|H|=n$. We define the following graph, $G=(V, E)$: $V=W \cup W'$, $E=\{xy | x, y \in V, xy \not\in F$ and $|W' \cap \{x, y\}| \leq 1\}$... |
how you doing?
Im here to ask for you help. Im writing my bachelor paper as an implementation/review of the TPP algorithms out there. Almost every paper that I read references the Ramesh algorithm, that returns an exact solution for TPP problems, but I just can't find the algorithm, not even a high level description th... |
I have an algorithm that for $n$ iterations performs some insertions into a set and priority queue. I know that in the last iteration (the case where time complexity is always worst), the time complexity is $O(n \log n)$. I also have more in-depth time complexity analysis if needed but the thing is: The time complexity... |
Let's have a standard topological ordering algorithm (from CLRS):
Topological_ordering(G)
foreach vertex v in V do
v.color = white
for each vertex v in V do
if v.color = white then
Stack = DFS(G, v, Stack)
return Stack
// DFS
DFS (G, v, Stack)
v.color = gray
for ea... |
I'm reading CSAPP and couldn't wrap my head around this part:
Summary of what the section says:
Intel Core i7 support a 48-bit virtual address space and 52-bit physical address space.
Core i7 uses a four-level page table hierarchy.
Then the book shows a picture of the breakdown of a PTE:
Please note the 40-bit PPN.
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.