instruction stringlengths 35 29.1k |
|---|
Consider the following model of computation (from here).
Although Fractran is Turing-complete, it assumes that the "user" is able to perform the steps of encoding the input ($2^{n + 1}$) and decoding the output ($\log_3(x) - 1$). That is, as mentioned by the second bullet, there are computable functions that cannot be... |
I have found two interesting questions regarding the quotient of languages, described as:
$A/B=\{w \mid \exists z\in B\land wz\in A\}$
The first one is:
Let $A$ and $B$ be regular languages, prove that $A/B$ is decidable
By using the proof from this other question, it can be proved that $A/B$ is regular if $A$ is regul... |
All O(N^2) solutions that I have seen for the longest increasing subsequence problem, as their first step, state something like this "Let L[i] be the length of the LIS ending at index i...":
GeeksForGeeks
HiredInTech
AfterAcademy
And, while this is a working assumption (the one that helps us solve the problem), I'm m... |
I want to find an arrangement to evenly place 12 items ($a_1, a_2, ..., a_{12}$) into 4 boxes ($b_1, b_2, b_3, b_4$) such that the cost is minimal.
Let $b(x)$ be the index of the box that contains item $x$. The cost of an arrangement is
$$\sum_{i=1}^{12} \sum_{j=1}^{12} |b(a_i) - b(a_j)| M_{i,j}$$
where $M$ is a $12\ti... |
I'd like to know if ${\Sigma_2^\textsf{P}}^\textsf{coNP}\subseteq\textsf{PH}$ or not.
I know ${\Sigma_2^\textsf{P}}^\textsf{NP}=\Sigma_3^\textsf{P}\subseteq\textsf{PH}$, and I wish to know if this holds for ${\Sigma_2^\textsf{P}}^\textsf{coNP}={\textsf{NP}^\textsf{NP}}^\textsf{coNP}$.
In other words, can we switch $\te... |
I'm currently preparing for an exam and I'm having trouble to solve the following Questions.
Let $w \in \{0,1\}^*$ and let $L$ be a language defined as follows
$$L = \{w \mid \mathsf{time}_{M_w}(x) \leq |x| +1 \text{ for all words } x\}$$
Is $L$ co-semi-decidable?
Is $L$ semi-decidable?
For the first question, I th... |
In Sipser's Theory of Comp in 2.2 the following PDA is provided for ${\{0^n1^n|n\ge0}\}$.
I follow how to process "", "01", "0011". I want to reject "0101", however it seems one of the nondeterministic paths makes it to accept. I'm probably misunderstanding a detail of PDA -- my logic is as follows:
Start in q1
Take ... |
Inside the interval $[0,1]$, there are $n^2$ intervals of $n$ different colors: $n$ intervals of each color. The intervals of each color are pairwise-disjoint. A rainbow independent set is a set of $n$ pairwise-disjoint intervals, one of each color.
A rainbow independent set always exists and can be found easily: take ... |
For example, if we have a true algorithm that could generate any NFA of at most 42 states from any binary string of 2^32 length. So, this algorithm can not just recognize the string but just recreate it from a NFA of 42 states.
The DFA taken from the NFA could be at most 42^2=1764 states.
So, even the DFA could generat... |
When a user writes a SQL query it needs to be scanned, parsed and validated. The question is in which order these three operations occurs in the process?
Scanning, Parsing, Validation or any other order to execute the query
Scanning refers to identifying the keywords, token, attribute names and relation names
Parsing r... |
Grady Booch in Object-Oriented Analysis and Design with Applications says:
The state of an object encompasses all of the (usually static) properties of the object plus the current (usually dynamic) values of each of these properties ...
Then:
Another property of a vending machine is that it can accept money. This is... |
Currently I want to come up with a program able to solve a specific type of board game, where we have a car moving across a randomly generated board, can't move backwards, a gas gauge and a food gauge. The goal of this game is being able to survive a certain number of turns (25) without running out of gas or food (star... |
Given a graph G and an important (X,Y)-separator S, why is it true that for every edge e in S the set of S\e is an important (X,Y)-separator in G\e
Important (X,Y) cut is defined as follows:
S is an important (X,Y)-cut if it is inclusion-wise minimal and there is no (X,Y)-cut S' with $|S'|<=|S|$ such that R' dominates ... |
When studying Chomsky's hierarchy of languages (starting from type 3), I find enlightening to encounter some language that can't belong to the current type but which very obviously belong to the next level (because some very easy grammar can be described).
For instance, after having studying for a while type-3 (regular... |
Every formal language is a subset of E*.
Let's say this formal language is python. If a program is syntactically correct, then the Python Automata accepts the "word", which is the program. If that is true, what are the atomic elements like "print" called?
Is this correct? Please correct my thought on this.
|
I am reading Distributed Algorithms by Nancy Lynch. I have come across lemmas, assertions and invariants, but I do not understand the difference between them. I think lemma means an intermediate result. Can someone please dexplain the definitions for each?
|
the size of one char in C is 4 bytes, however to define an 'A' character we use the sum of two values like this expression here:
or in other way i want to say that the char is 4 bytes size, but in the example it shows that the size is 8 bytes.
how it happens, what is wrong here ?
|
I am currently brand new to the correctness proof method, and have stumbled upon this algorithm which I find very tricky.
Prove that the following algorithm for division and remainders of natural numbers is correct.
function divide(y,z)
comment Return $q,r \in \mathbb{N}$ such that $y=qz+r$ and $r<z$, where $y,z \i... |
Is there is a faster way to calculate the number of passes (not the number of swaps) needed to complete the bubble sort than actually doing the sort (as demonstrated in the code)?
E.g.
1, 2, 3 -> 1 pass
1, 3, 2 -> 2 passes
3, 2, 1 -> 2 passes
3, 1, 2, 4 -> 2 passes
0, 4, 2, 6, 1, 5, 3, 7 -> 4 passes
Code in Python:
def... |
When I open up a file two different editors, vscode and sublime, changes saved in vscode are visible directly in sublime text. Same doesn't work with nano text editor. Any help?
|
I haven't been able to find a good explanation of how these are different and relate to each other. I know that $\to$ is part of HOL and $\Rightarrow$ and $\Longrightarrow$ part of Isabelle, but it seems that they are basically doing the same thing and we could just have one object $\to$? (Taking into account the CH c... |
Given a directed graph which may contain cycles, how can I find the maximum number of distinct nodes that can be visited on a single walk?
I have done some research and the most similar-sounding problem I have found is the longest path problem, which is in fact rather different as far as I understand it: it is not conc... |
Is there one (or a few) canonical/ specific use cases for "functions returning functions" (beyond "decorators")?
What can you do with "functions returning functions" that you cannot (easily or elegantly or expressively) do with functions as variables ("functions taking functions as their arguments") and/or composing ... |
I found this symbol in a book I'm reading. Does anyone know what this symbol means? Does it mean for all js?
|
What is actually meant when we say 'size/length of an input'? As far as I have interpreted it in different books,it means the values of the parameters to be inputted in an algorithm. But I am actually confused of what it really is. And further they state that time complexity of algorithms is usually a function of the s... |
Consider this Problem $P$ as follows: $~$ Given a set $S$ and a constant $K$.. $~$Is there a subset $M$ of $S$, such that $|M| \ge K$?
Of course, $P$ can be easily solved in time polynomial in $|S|$.. $~$We can design a Turing machine $T$ which decides YES or NO in polynomial time... Of course, $M$ is not given -- it i... |
Suppose you have a DAG and the edges are positively weighted, and you want to find the maximum cost path from any node with no in degree to any node with no out degree.
Is it possible to negate all the weights and then apply Dijkstra's algorithm on the negative weights? All the paths here will have a negative weight, b... |
I'm trying to understand the Halting Problem. All the explanations I've seen state that the problem arises when passing a program to a halting check function along with itself as input. For example if halts(program, program) in the code below (please let me know if my code does not accurately represent the halting prob... |
Is there somewhere a website/application/software/something where you can submit a list of string/image/audio/content/whatever and the appliance make a tournament sort by asking you question like "Do you prefer [Element K] or [Element J] or you don't know?". And depending on the replies he ask smartly for the other ele... |
I was wondering what the complexity of factorization (on quantum computers or classical computers) is if we know that there must be exactly two prime numbers and we know the two prime numbers.
For instance, if we know that our two prime numbers are $2$ and $3$ we want to know what $a$ and $b$ are because our number $N=... |
Polynomial for producing hash values:
$p(z)=a_0+a_1z+\cdots, a_{n-1}z^{n-1}$
Honor's method for that polynomial:
$$
p_0(z)=a_{n-1} \\
p_i(z)=a_{n-i-1}+zp_{i-1}(z), (i=1, \cdots, n-1)\\
$$
Problem: For 50,000 English words and for $z=33$, we would get at most 6 collisions. So, how we can prove that please? Also, to calc... |
When no path to the goalnode exists, does the A*-Algorithm a) visit and b) expand every node in an undirected graph?
I have a monotone heuristic.
Thanks
|
Let us consider a system having cache and main memory. Now suppose we are asked to find the average memory access time. Let $h$ be the hit ratio for the cache, $t_c$ be the cache access time, $t_m$ be the time to access a word of data from the main memory and cache block size be $b$ words.
The picture below is from Wil... |
What is the simplest way to transfrom $a\newcommand*\xor{\oplus}b=c$ to a CNF SAT expression with minimum number of clauses. The default transformation requires upto 9 clauses. I think we can do much better.
|
I am refering to MIPS (32 bits).
Is there any particular reason that when loading or storing a word, we address memory in bytes, but when we jump or branch using beq we address memory in words?
Thanks!
|
[CLOSED] Thanks!
I am studying Linear Programming in college but I am facing some difficulties to assimilate some concepts.
So do you have any recommendations of materials to learn or practice Linear Programming?
Thanks
|
if there was an algorithm that runs in polynomial time, but its size requires $O(2^n)$ bits, would that still prove $P=NP$?
|
I am doing a prediction assignment as part of a machine learning course using loans data. I have just done some exploratory data analysis on my dataset of just over 9000 rows. There are 11 variables which I need to use to predict the output.
Whilst exploring my correlation matrix, I have discovered that 5 pairs are st... |
The problem:
Suppose there are $n$ points in plane, and we want to partition points into two clusters such that sum of diameter of clusters is minimized. The diameter of cluster is maximum distance between each pair of points.
My question is, how we can formulate above problem in LP manner?
My attempt:
I think so much ... |
If $P=NP$ was proven with an algorithm, would that have to mean that there is one algorithm that has to work for all inputs of length $n$?
More specifically, what if there were infinitely many polynomial time algorithms for $n=1,2,3,...$, but no algorithm would work for more than one value $k=n$. I don't mean that $n$ ... |
S → aSa | aa
generates all even-length strings of a’s
We can devise a recursive descent parser with [backtrack] for this grammar.
If we choose to expand by production S → aa first,
then we shall only recognize the string aa.
Thus, try S → aSa first.
a) Show that this recursive descent parser recognizes
inputs aa, aa... |
The decision version of the Independent Set and Vertex Cover problems are phrased as:
Given a graph G and a number k, does G contain an independent set of size at least k?
Given a graph G and a number k, does G contain a vertex cover of size at most k?
My question is, what is the reasoning behind using "at least" f... |
I am having trouble understanding how to conclude if the statements are true or false, I would really appreciate your help.
We know about three languages, A, B and C.
There exists a mapping reduction from A ≤m B, and A ≤m C.
What can be concluded about: A ≤m B union C ?
What can be concluded about: A ≤m B intersection ... |
The task was to give a type 1 grammar(can't be of type 2) which accepts the following words:
baaaab, abb, abba(ab)^i for all i ∈ ℕ
and doesn't accept these words: aabb, bba, bbabb(baaa)^i for all i ∈ ℕ
My solution:
S -> V | W
V -> a B B
W -> W W | A B | B A
A B -> A A B
B A -> B A A
A -> a
B -> b
Example for baaaab:
S ... |
According to this post
Given $n$ points $P=\{p_1,p_2,\dots,p_n\}$ in 2D space, and a matrix $D^{n\times n}$ with the distances between each pair of points, we want to partition the points into two clusters so as to minimize the clusters' diameters.
This can be formulated as an integer programming problem as follows:
... |
Suppose I have two tables of 2d intervals (axis-aligned rectangles) with values attributed to each interval.
[d1_start, d1_end), [d2_start, d2_end), value
1, 3, 2, 5, 0.4
3, 9, 2, 5, 0.3
....
It is guaranteed that within a table no two rectangles (2d intervals) intersect.
Is there any efficient way to merge t... |
I cant proof that if f is the heaviest edge in weight from all the other edges in the circle which it is a part of, then f will not participate in any Minimum Spanning Tree. please help.
|
I never recall any problem making FOR loops in BASIC to 10000 on old IBM PC computers, but how does it work at the machine level when the number in the data register is (presumably) limited to a number from 0-255?
[Edit: I can speculate that the processors had special instructions to use more than one word, but I neve... |
It is well known that DFS can be implemented either with recursion or a stack, and that both approaches are equivalent, but how far can we take that statement? Consider the following LeetCode problem:
Given a directed acyclic graph (DAG) of n nodes labeled from 0 to n - 1, find all possible paths from node 0 to node n... |
Reading wikipedia I found that they give this example
Consider the problem of testing whether a number n is prime, by naively checking whether no number in $\{2,3,\dotsc ,\sqrt {n}\}$ divides $n$ evenly. This approach can take up to $\sqrt {n}-1$ divisions, which is sub-linear in the value of $n$ but exponential in t... |
I'm reading Hopcroft and Ullman's '79 edition of "Introduction to Automata theory, Languages, and Computation". In chapter 3, the authors say "The lemma[sic] does not state that every sufficiently long string in a regular set is of the form $uv^iw$ for some large $i$". I can't see how this is true.
If I'm not wrong, th... |
Question:Given the following double hash function:
$$h(k,i) = (h_1(k) + i\times h_2(k)) \bmod{N}$$, where $h_1(k): key \to \mathbb{Z}$. $h(k,i)$ can generate $N^2$ probe sequences at most and $h_2(k)$ can determine the increment for the probe sequence. Also, $N$ is the number of slots.
Problem:Each sequence generated f... |
It is a popular open question if there is a problem unsolvable in $2^{o(n)}$ on inputs with $n$ bits, assuming ETH. I recommend reading that question first. That question states that, assuming the ETH (Exponential Time Hypothesis), we know problems that cannot be solved in time something like $2^{o(n/\log n)}$ (namely,... |
Given the following language:
$$L=\left \{ <M> | \exists L \in R \quad s.t \quad L(M)\subseteq L \right \}$$
I need to determine it's compuation class(R or RE).
I used Rice Theorem as follows to say it's not in R:
The prperty is non trivial:
$L(M_{1}) \subseteq L \subseteq L(M_{2})$
from this property I can infer that ... |
Let $C_n$ denote the cycle graph over $n$ vertices. Let $C_n^k$ denote the $k$-th power of the cycle graph, or namely that for two vertices $i,j$, $(i,j)\in Edges(C_n^k) \iff |i-j|\leq k$ for a constant $k$.
Now given a subgraph $G$ of $C_n^k$, how can we find a hamiltonian cycle (if it exists) in $G$ in polynomial tim... |
I hope someone can take some time to consider the following problem and welcome to discuss together.
Number partition problem is one of well-known NP-hard problems.
Now I am considering the hardness of constrained partition problem. In particular, the cardinality of multiset $S$ is n, denoted by $|S|=n$. Now is it NP-c... |
How does $Θ(\log(n!))=Θ(\log(n^n)$?
I understand why $Θ(\log(n!))=Θ(n\log(n))$ and $Θ(\log(n^n))=Θ(n\log(n))$, therefore $Θ(\log(n!))=Θ(\log(n^n)$. But I am having trouble reconciling this with the following:
$$\lim_{x\to \infty}\left(\frac{\log_2(x^x)}{\log_2(x!)}\right)=\infty. $$
So how could there be constants such... |
I'm working on an optimization problem using genetic algorithm. To increase diversity of potential solutions I'm using multi-population approach: Instead of evolving one population I run 10 populations in parallel for some number of steps (let's say 10000). Then I mix elements (solutions) between populations and repeat... |
The input to our problem is a pair of strings, say $x$ and $y$. We treat our alphabet size as a constant, i.e., our input is effectively a pair of arrays with the values therein bounded by a constant.
The problem is to compute the number of adjacent swaps (done to either of the strings), to make the strings equal. It i... |
We know that merge sort takes O(n log n) and insertion sort takes (n^2) for worst case.
The combination of these two algorithm is to speed up and reduce key comparisons, as for a subarray with small enough size of K, switching to insertion sort would be faster.
I have tested this with Python, and each time within incre... |
From Wikipedia Multiple subset sum: The multiple subset sum problem (MSSP) is a generalization of the subset sum problem (SSP): given a multiset $S$ of $n$ integers, and an integer $m$, the goal is to construct $m$ subsets such that each subset sums to a capacity $c$.
There are several variants for the optimization of ... |
For the following question from Introduction to Algorithms book, "We wish to implement a dictionary by using direct addressing on a huge array. At the start, the array entries may contain garbage, and initializing the entire array is impractical because of its size. Describe a scheme for implementing a direct address d... |
Question: Prove that successful search of hash function with chaining (list at each slot) takes $\Theta(1+\alpha)$.
Given a dictionary or hash table that has a chain at each slot in case we have a collision. So, given that the load factor of table $\alpha = \frac{n}{m}$, where $n$ is the number of elements in the hash ... |
Let I (M x N) be an image made only of 3 pixels, how many unique Huffman code can you make (example: Image I has size 256x256, and has pixels of values 50,100 and 200).
If someone can help me how to solve this problem or give me a hint.
I get it there are 6 unique Huffman codes : 0,10,11 or 1,00,01, is the solution cor... |
I know that time-constructible functions are necessary to prove the Time Hierarchy Theorem and being computable functions they are computed by Turing Machines. I'm just confused in that since the Time Hierarchy Theorem relativizes I think this implies that TM's computing time-constructible functions exist in relativize... |
I'm wondering what's the time complexity of finding all size-$k$ combinations from a set of size $n$(note that $k$ is a known and fixed constant, say $k=3$)? How does it differ from the time complexity of finding all combinations of all sizes (involving ${n\choose 1}+{n\choose 2}+...{n\choose n} $ operations)? I need t... |
is it true that if $f(n)\in O(g(n))$ then $f(h(n)) \in O(g(h(n)))$?
I can't figure out how to prove or disprove this. if it is true, is it true only when the function $h$ is invertible?
|
In this article Semaphores in Operating System and other articles on the internet, they have mentioned one of the disadvantages of semaphores is that it leads to loss of modularity. They further said that this loss is because of wait, signal operation preventing the creation of a structured layout of the system. I didn... |
Agda does not allow datatypes in one universe to be indexed by, or non-trivially parametrized by a type in a larger universe (strangely, Coq does not appear to require this for propositional inductives, but perhaps this is related to prop erasure).
What then, can we say about the definable functions from Set₁ to Set? I... |
I want to test whether $L= \{w\in\{a,b,c\}^* \mid |w|_a<|w|_b \text{ or } |w|_a<|w|_c,\text{ but not at the same time} \}$ is CFL or not (I assume not), but I am struggling to do so.
The closest I have been to prove that it isn't a CFL is by seeing that the languages $L_1=\{a^nb^{n+1}c^n\mid n\ge0 \}$ and $L_2=\{a^nb^n... |
On wikipedia, page about EXPSPACE it says
An example of an EXPSPACE-complete problem is the problem of recognizing whether two regular expressions represent different languages, where the expressions are limited to four operators: union, concatenation, the Kleene star (zero or more copies of an expression), and squari... |
I know that hash collision is possible with large number of files. But i want to know if 2 files can share "many , different" types of hash. I have 2 hashes SHA256 and BLAKE256 (Both will result in different hashes)
For example:
File A have SHA256 hash : jhsj8sd87a89sihd8d78a7... etc.
And BLAKE256 : js8us8d8saa621g... |
Theorem: Suppose that a hash function $h$ is chosen from a universal collection of hash functions and is used to hash n keys into a table $ T$ of size $m$, using chaining to resolve collisions. If key $k$ is not in the table, then the expected length $E [n_{h(k)}]$ of the list that key $k$ hashes to is at most $\alpha$... |
I have a number n of size s. What is the computational complexity in big O notation of an algorithm computing n^n? Let's assume I'm using exponentiation by squaring. The result size doubles when we increase n by one bit, so the algorithm computing n^n has exponential computational complexity?
Second question, what is t... |
Can I multiply Big-O time complexities?
For example: $O(n) \cdot O(n) = O(n^2)$?
UPDATE:
The question came from my observation that different sources analyze their algorithms in different ways. For example, some use the following $O(n \cdot n + n \cdot log (n) )$ notation and some more like $O(n) \cdot O(n) + O(n) \cd... |
I hope this is the appropriate Stack Exchange site for questions like this.
Recently, a college student and I are looking for a robust software for simulating job scheduling in multi-processor environments, capable of generating statistics and supporting both traditional (FCFS, RR, SJF etc.) and user-created strategies... |
I want to verify the correctness of this algorithm.
Problem: given a list of intervals, where the first index is greater than the second, determine if every interval overlaps with every other interval.
Examples
----
----
True
--------
--
-
True
----
---
False
-----
---
-
False, 3rd line does not overla... |
Suppose you have a stream of incoming numbers that you're storing and at any given instant in time, you want to query the sum of values between a given lo and hi in the stream you've read thus far.
It it possible to solve this problem with segment trees?
The only solution I could come up with is either O(n) insertion a... |
I would like to run the following string $w=011101$ on the following NTM and figure out the respective computation branches and whether it accepts or rejects that string.
$\text{Start: }(q_0) 011101 $
$0(q_3)11101$
$(q_1)011101$
$a) 0(q_{rej}) 11101 \:\:\: b) 0(q_{acc}) 11101$
My questions are:
Does the T.M continues... |
I'm currently studying the book Engineering a Compiler by Keith Cooper, and in chapter 3, there is the following definition:
A grammar G is ambiguous if some sentence in L(G) has more than one rightmost (or leftmost) derivation.
One of the exercises asks the following:
When asked about the definition of an unambiguo... |
Let me preface this by saying, I do NOT want an example of a proof, I would merely like pointers as to how I could approach this problem.
For example, I have a language:
$$L = \{w \mid w \in \{0, 1\}^*,\ \#_0\ge\#_1\}$$
As you can see, 0's and 1's can occur in any order,
I have found it easy to prove this is not regula... |
The Cones and rods are not evenly or precisely sensitized on the retina by incoming light. Because of this, the image is formed with distortions. But the brain corrects these deformations through a calculation that tries to form a uniform image, which is the end product we see. I would like to know if there is any algo... |
The classic definition of normal “Geography Game” is the following:
Each player on her turn choose a word such that starts with the last letter of the previously choosen word by another player. (Called “Generalized Geography” in Sipser Chapter 8 and called “The Game of Geography” in papadimitiou Chapter 19. This versio... |
I want to know if one can brute-force a large list of entries (>10,00,000) in linear time to form a whole file.
For example:
I have an ebook and i extract all the words and symbols from that ebook.
Then I count the frequency of all words and symbols.
Then I get the binary representation of file and I hash it with SH... |
Given an algorithm M that computes the median of an array A in O(n) time, describe an O(n) algorithm to repeatedly call M in order to find the element of rank n/3 in A.
This is a problem I am tasked with, and I have thought of a simple soln but I am not sure how to make it terminate:
To simply recursively call the M al... |
Few years ago I downloaded an XML dump of one of Wikipedia's fandom sites.
It was the XML datadump of Marvel Fandom.
The XML was zipped , size was 900 MB (approx).
But when I unzipped it , it was somewhere 10 - 11 GB big.
And according to Wiki Taxi (A software I used to convert those XML dump into readable format f... |
I need a checksum algorithm that produces the correct 16-bit checksum value for a given input. It's a packet recording from serial communication that I would like to reverse engineer.
I have two data files, one dataset1.txt, that checksum is the last 2 bytes in the hex, for example, first entry:
4573500506000004047a6e1... |
A function takes some set of inputs and creates a set of outputs; however there will be some set of invalid inputs. For example say we have F(a,b) => a / b and we constrain 'a' & 'b' to be numbers, and 'b' must never be zero.
The process of defining those constraints; what CS concept/terminology am I looking for?*
I'd ... |
Above's the DFA in question (Sipser, Page 36). I have obtained the language of this DFA to be 0*1(1+00+01)*. But Sipser's textbook goes on to explain that the language of this DFA is (0+1)*1(00)*. But I just cannot derive Sipser's language from what I have obtained. Any help at all would be appreciated.
|
Here is the exact same question but on deterministic finite automaton. The case for deterministic finite automaton is simple. For each state only one transition is possible for each input symbol and quite intuitively one can verify that a DFA shall halt when the input string is exhausted.
Lately I came across a questio... |
Assume an array $X=[x_1,...,x_n]$ is given, where each $x\in X$ is an integer. Array $X$ is sorted if $x_1 \le ... \le x_n$. Typical sorting algorithms have a worst-case performance of $\mathcal{O}(n\log n)$, while in some models of computation, e.g., random-access machines, this can be reduced to $\mathcal{O}(n)$ unde... |
Consider the term linear temporal logic (in the meaning of linear-time temporal logic). In linear temporal logic, what does linear refer to:
to temporal or
to logic?
If I interpret http://en.wikipedia.org/wiki/Linear_logic and http://en.wikipedia.org/wiki/Linear_temporal_logic correctly, the linear temporal logic ... |
Lately I need to find the decidability of the following decision problem:
If $L$ is a context-free language, is $\overline{L}$ also context-free?
I know that context-free language is not closed under complementation. Had it been otherwise, this decision problem would have been trivially decidable, since a Turing mach... |
Theorem: Given an open-address hash table with load factor $α = n/m < 1$, the expected number of probes in an unsuccessful search is at most $1/(1−α)$, assuming uniform
hashing.
Let us define the random variable $X$ to be the number of probes made in an unsuccessful search, and let us also define the event $A_i$ , for ... |
Is there an algorithm with runtime $\mathcal{O}(n^2)$ that for given weighted graph $G$, partition it into 2 cluster $C_1,C_2$ such that sum of diameters of two clusters minimized?
I find a paper with title
"C. Monma and S. Suri, Partitioning points and graphs to minimize the maximum or the sum of
diameters"
in some re... |
Define the subset sum with interval target problem (SSITP) as follows:
SSITP Input:
A multiset $S = \{a_1, …, a_p\}$ of positive integers $a_i$ such that $\sum_{a_i \in S} a_i = T$.
SSITP Output:
True, if there is a subset $S’ \subseteq S$ such that $\sum_{x \in S'} x \in \lceil \frac{1}{2}T \rceil .. \lfloor \frac{3}... |
I am studying about RARP.
What is the IP address of a given hardware address? Used by diskless systems to find their own IP address.
https://www.cse.wustl.edu/~jain/bnr/ftp/f15_arp.pdf
So, why do diskless system doesn't have IP address? What does it even mean to be a diskless system?(Is it hard disk less system). If ... |
I want to show, without taking a limit, that $2^\sqrt{2 \log n} \in Ω(\log^2n)$ and $2^\sqrt{2 \log n} \in O(\sqrt{2}^{\log n})$.
I will omit what I have tried as it has not been useful.
|
I am trying to understand this figure, what it is trying to say?
What I already know?
Routing table is updated dynamically. However, for efficiency, hosts do not take part in the routing update process because there are terrible number of hosts. (Can you explain this with figure? What does it mean by host don't take p... |
In dynamic programming:
1. what is the definition of the space of subproblems? does it have a mathematical definition?
2. why is it necessary to have an arbitrary index for the subproblem to vary?
To elaborate on question 2, I've taken the following paragraph from chapter 15.3 in CLRS:
Conversely, suppose that we had ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.