instruction
stringlengths
35
29.1k
What is a regular expression for $L_1=\{a^{2n} b^{3m+1} \mid n \geq 1, m \geq 0\}$?
Imagine a uniprocessor system with a simple operating system with non-threaded processes and basic virtual memory (paging, no segmentation, no replacement to disk, etc). Now assume a simple preemptive scheduler, round-robin, for example. Because it is a uniprocessor, the scheduler must hand over control of the processo...
To initialize an array of length $n$ has complexity $O(n)$, as far as I understand. If I set every element to zero (with one code line), does that have time complexity $O(n)$ also? And in that case, setting an $n$-array to zero inside a loop with $n$ iterations should be $O(n^2)$, right? I am asking because I have wri...
I've spent the last hours trying to come up with an algorithm that shuffles an ordered set of numbers (i.e a simple range of numbers) in a way that I can retrieve from a shuffled value the original value that was on that position without the need to store all relationships between shuffled values and their counterparts...
If the processor is trying to write a word to a certain memory location, and the system uses a write-back style architecture, what happens in case of a miss? I'm assuming that the system would first load the cache line, update the specific word, and keep the cache line in the cache until it has to be replaced. Then it ...
How can I represent an array when I am writing to show an algorithm in writing paper. Like Pi is represented by Greek letter. We use that Greek symbol to denote the value of Pi, Kind of like a pointer. So, is there any general symbol for representing array?
If I have $EQ_{REX} = \{\langle R,S \rangle|\text{ $R$ and $S$ are equivalent regular expressions}\}$, how do I show that $EQ_{REX}\in PSPACE$ ? What I know so far is that there are decidable algorithms for transforming a regular expression into a NFA and then into a DFA, but these algorithms can take a long time and p...
Assume that we have these bigram and unigram data:( Note: not a real data) bigram: #a(start with a) =21 bc= 42 cf= 32 de= 64 e#= 23 unigram: # 43 a= 84 b=123 c=142 f=161 d=150 e=170 what is the probability of generating a word like "abcfde"? I think for having a word starts with a the probability is 21/43. How abo...
How are asymptotical time complexities calculated for recursive algorithms? Recursive algorithms call themselves and therefore take up more space compared to non-recursive algorithms. But are they better taking time complexity into account? If they are better than non-recursive algorithms, then how are they better and...
Consider a grid with $x=5$ columns, $y=5$ rows, and $T$ timesteps. There are $N=2$ agents in this grid, which can move vertically or horizontally. The positions of each agent $x$ at timestep $t$ is denoted as $A_{xt}$. For this example, consider $A_{00}=1$ and $A_{10}=23$. The goal is to carry a ball from node $1$ to...
I have been searching through internet how could simulated annealing to solve the vehicle routing problem, but didn't find anything that made it clear to me. Most of what I found are research papers intended to solve some specific variation of the routing problem. So I would appreciate if someone can make some kind of ...
I have a particular research problem that I'm formulating as a linear program. It's more or less an instance of the transportation problem, except there is one additional constraint that is proving difficult to translate into the canonical form required by LP solvers. The constraint is $$ \sum\limits_{i'=i+1}^k \sum\li...
What was the reason to come up with Chu–Liu/Edmonds' algorithm when the input graph is directed instead of using the Prim's or Krushkal's method for finding Minimum spanning tree ? What cases are not covered in using Prim's algo for finding MST for directed input?
I've been stuck on this problem for a while now. Here it is: The Network Reliability Problem (NRP) is defined as follows: Given an undirected graph with $n$ vertices $v_{1}, \dots, v_{n}$, a positive integer weight on each edge, and a $n \times n$ symmetric matrix $R_{ij}$. The objective is to find a subset $S$ of t...
This question occurred to me about the halting problem and I couldn't find a good answer online, wondering if someone can help. Is it possible that the halting problem is decidable for any TM on any input so long as the input is not the TM itself? Basically: Halts(TM, I) IF TM == I: Undecidable, return a ra...
I'm working on a paper about record linkage and duplicate detection and want to visualize my definitions of "hard" and "semantic" duplicates. Hard ones are a 100% match; where's only true or false- Semantic ones have different variations but still are representing the same thing. Now I'd like to write it as a set but a...
I was reading CLRS' book on how to use the substitution method to solve recurrences, where they have the following example: $T(n) = 2T(\lfloor{\frac{n}{2}}\rfloor) + n$ where $T(1) = 1$ They assume that $T(n) = O(n \log n)$ and go on to prove it by using induction. I understand the inductive step, but I do not unders...
Does there exist a non-recursive language, L, such that the cardinality of L is uncountable? I would really like an explanation as to why this question is true or false because at the moment, I have no idea. My understanding is that all recursive languages have to be countable since the set of all finite strings is co...
I have seen two definitions of universal hash functions in the literature. For any $i \geqslant 2$ let $[i]=\{1,\ldots,i\}$. Definition 1: A family $\mathcal H$ of hash functions from $[n]$ to $[m]$ is a $k$-universal family of hash functions if for any distinct $x_1,\ldots,x_k\in[n]$ and any possibly identical ...
I have found worked examples for special cases of binary channel such as the binary symmetric channel and the Z-channel. However, I am interested in a more general type of binary channel $X \to Y$ in which I only know that $P(Y=1|X=0)=a$ and $P(Y=1|X=1)=c$, hence one hopes that $0<a<c<1$. The mutual information is defi...
Assume two lists of comparable items: u and s. Let INV(u) be the number of inversions in u. I am looking for an efficient algorithm to insert the items of s into u with a minimal increase of INV(u). Basically I would like to insert objects into a list while keeping it "as sorted as possible" while keeping the order of ...
I am a beginner to complexity theory and I came up with the following proof of decidability of $A_{Cfg}$ = {$<G,w>|G$ is a context free grammar that generates string $w$} The Turing machine which decides $A_{Cfg}$ first converts the given grammar into a non-deterministic push down automata NPDA. And then we do an epsi...
I need to sort a lot of rows (from 1GB to 3GB) by EpochTime (a single value of every row). What is the fastest in-place sorting algorithm for this task? Radix Sort? I would like the fastest sorting algorithm but I think that I could fail on limit of memory so I would prefer an in-place algorithm. EpochTime should be u...
I am wanting to show that it is decidable that a Turing machine M, on input w, ever attempts to move its head past the right end of the input string w. I'm assuming I construct a TM which shifts the input on the tape on cell to the left, write the cell at the right-hand end with a new symbol (like "!") that's not in th...
NPDA's and general NFA's may not halt for finite inputs like DFA's do because of their $\epsilon$ transitions. However, NFA's with $\epsilon$ transitions could be converted to those without any $\epsilon$ transitions and hence they can be made to halt. I was wondering if this is possible even for the case of NPDA's. I...
One can look at these two papers http://arxiv.org/abs/1502.06590 and http://arxiv.org/abs/1507.05136 and see their main theorems. If I understand right then both these papers are talking of the planted-Max-Clique problem and the second one is improving the detection threshold from $n^{1/3}$ in the first paper to $n^{1/...
I'm having trouble showing that this algorithm is 2-approx. We are given a set P of n points on the plane, and a positive integer k. We want to partition these points into k sets such that the largest distance between any two points which belong to the same part is minimized. Show that the following is a 2-factor ...
I stumbled upon the following problem during my research. I have a bipartite graph, and I want to determine the minimum number of edges to to remove so that the maximum path length in the resulting graph is 2. Is this problem NP-hard? I was trying to come up with a polynomial time algorithm (and failed) and also tried...
Short version The question & answers relate to the following topics: File as a collection of records vs. file as a stream of bytes Sequential File Distinction between file data and metadata Transfer of metadata along with the file File size measurement Original question According to William Stallings' Operating Syste...
Reconstructing a screen of permuted pixels Summary Given a video with the pixel locations randomly permuted (once, for the entire video), can we (efficiently) reconstruct the original picture? Let: $n=w\times h$ pixels. $m=\text{number of frames}$ Details You are given an LCD screen with $n = w \times h$ pixels, tha...
Given $T(1) = 1$ and $T(n) = 4T(n/2) +n^2$ for $n\geq 2$, can I solve the recurrence for $T$ by applying the master theorem with $a = 4$, $b = d = 2$? This would give $T(n) = \Theta(n^2\log n)$.
At each $k$ th iteration of BF, we can are guaranteed to have computed the shortest paths that are at most $k$ long. That makes perfect sense me. If we relax a set of edges $k$ times, then we for sure have computed shortest paths with $k$ length. However, the part that I don't quite understand is why not only relaxing ...
In automata theory we study formal languages like Regular, CF, CS and etc. and each of them have their own closure properties under union, intersection, star and etc. . I like to know, why it is important to study such properties?
We know that for problems in NP if the problem is an yes version then there is a short certificate and for coNP if the problem is a no version then there is a short certificate. Is there a short certficate analogy for higher levels in Polynomial Hierarchy?
I am new to this forum and this is my first post. I am interested in solving a problem, but cannot find the way to think about it. If anyone can guide me through it, I would be obliged: Let F be some system of axioms. You can assume F is sound (that is, it only proves true statements), and also that F is strong enough ...
NOTE: This is for a project I'm working on for fun, NOT production code. So I'm working on a pet project that involves reading data in from a sensor and summing it up. The values are mostly floating point number mostly in the range (+/-)1 - (+/-)10 and the program is expected to run for at least 2-3 hours, and it ...
I've been reading about Lambda calculus recently but strangely I can't find an explanation for why it is called "Lambda" or where the expression comes from. Can anyone explain the origins of the term?
This is a HW question that I'm stuck on and was hoping for some help. we're supposed to prove that: PSPACE not equals DTIME($2^{cn}$) for every $c>0$ (or actually for the union of all $c>0$)
I created this simulation of the dining philosophers problem, but did not manage to initialize it with four philosophers without running into a deadlock: *Philosophers are represented by black beads. They think when running in small circles and eat when running in bigger circles. Forks are represented by yellow bead...
Lehmer codes can be used to encode each possible permutation of a sequence of n numbers. Often the main goal is just to map a range of numbers from 1 to x to the possible permutations of a sequence of numbers from 1 to n. An example to visualize this goal would be: n := 3, x := 6 [1, 2, 3] = 1 [1, 3, 2] = 2 [2, 1, 3] =...
I had a homework assignment where I had to build a PDA over the alphabet $\{a,b\}^*$, accepting $L = \{x \mid x \text{ is even but not a palindrome}\}$. I already turned it in, but I know I had it wrong and it's driving me insane that I can't figure out this construction. I tried a Cartesian product construction of th...
Consider the alphabet $\Sigma = \{a,b\}$. For which languages does the Myhill–Nerode equivalence relation have exactly one class? From what I understand about equivalence classes, each state is considered a class. So would $\{ a^n : n>0\}$ be the one class?
Provided is a tree with three types of node. The structure of the tree cannot be modified and traversal of the tree is limited to querying a node for its children or its parent. The objective of the algorithm is to traverse the tree from the root node and collect all of the valid combinations of the data in the tree. ...
I'm reading on caches and I'm feeling a bit lost with spatial locality. From my understanding, increasing the cache line with a program that has high spatial locality reduces the miss rate. But for a program that has low spatial locality, does an increase in cache line have any effect on the miss rate?
Suppose if class $\mathcal C$ is in $PP$ or $BPP$ does it mean complement also belongs to $PP$ or $BPP$ respectively? Does it immediately follow from $PP=coPP$?
Based on following table, I have to show if there is any potential pipeline hazard in the following code segments: X = R2 + Y R4 = R2 + X R1 = R2 + X X = R3 + Y Z = R1 + X I've been a bit stuck in the problem involving instruction pipelining. Any strategy about where to start according to the table?
So I am trying to find a language with which i can write code to build/search through deductive reasoning 'nets', as well as self-modify it's search algorithms based on information learned from these nets. I also want a language that i can use to write scripts for a 2d game engine, as i would like to build visual model...
Assume that we have a data structure which uses $O(\log n)$ space to store an integer $n$ and has a function $f$ which replaces the integer $n$ stored by $2^n$, i.e. $n=2^n$. The time complexity of $f$ is $O(n_{_{old}})$ = $O(\log\ n_{_{new}})$, is it admited to say that $f$ is a $O(\log n)$ function ?
In a tree, I want to refer to a particular child of a node, the child of this child, the child of this child of this child, and then the child of this child of this child of this child. For instance, in a binary tree, I would like to refer to the right sibling of the node, the right child of this one, etc.. Can I call ...
I try to understand something: At Turing machine we have two stats: $q_{accept}$ and $q_{reject}$. Now, if machine $M$ runs on word $w$ (I hope I write it right...) and the final configuration is: $C(w,q_t,\varepsilon )$, and $q_t =Q-\{q_{accept},q_{reject}\}$. Of course $M$ don't accept $w$ and don't reject $w$, bu...
How do I use the Jaro-Winkler similarity measure to test whether two strings should be considered to match each other? I tried comparing the Jaro-Winkler score to a fixed threshold: e.g., if the similarity measure is greater than 0.9, consider the two strings to match. However, this approach does not always work, as s...
Given a DAG N, if an edge $(U \rightarrow V)$ is added between any existing nodes U and V. Then, by performing DFS from the node $U$ and checking whether there is a cycle or a not, should be sufficient to conclude that this addition of edge didn't violate the acyclic property of the given DAG. Is it correct? Or there i...
I look for a good text to learn basics of computational complexity. I've read some parts of the first two chapters of "Computational Complexity: A Modern Approach" by Boaz Barak and Sanjeev Arora, it's readable and gives the big picture but I find it not to be rigorious enough for me. I'm a mathematics student so I w...
I am currently trying to solve the following problem but I am unsure how to go about it. The problem states: Suppose that someone gives you a polynomial-time algorithm to decide 3-SAT. Describe how to use this algorithm to find a satisfying assignment in polynomial time. To my understanding the 3-SAT is simply a conjun...
What does $\leq_{\mathrm{P}}$ mean? Is it supposed to mean less than or equal polynomial time?
If we have a set $A$ that is m-complete for $\Sigma_n$, then is it's complement $\overline{A}$ m-complete for $\Pi_n$? I know that $\overline{A} \in \Pi_n$, but does it inherit the completeness? I think this makes sense but I can't seem to think of any formal reasons why.
Turing machines were very successful in computability theory where Turing used them to resolve the Halting problem. His breakthrough led to proving that many other problems are algorithmicly undecidable. Key attribute of Turing machines is their infinite memory. However, natural complexity problems are combinatorial in...
I was reading up on something called the PRAM model without bit operations. What exactly does it mean that this PRAM model cannot do bit operations? I can't find a straightforward definition anywhere. Surely the different processors will still be able to do all sorts of stuff with bits. The reason why I am asking is t...
Suppose we have a set of binary trees with their inorder and preorder traversals given, and where no tree is a subtree of another tree in the given set. Now another binary tree $Q$ is given. Find whether it can be formed by joining the binary trees from the given set. (While joining, each tree in the set should be cons...
I have some digital logic circuits in Algebraic Normal Form, and am limited to using XOR and AND logic gates. For instance: $B_{out} = B_1 B_2 \oplus B_1 B_3$ I was wondering, are there any algorithms to simplify ANF to use a smaller number of gates? I'm looking to minimize ANDs specifically. The above equation would ...
The question is motivated from a physics problem: Let's first discuss the 1D infinitely long discrete system on a lattice, a system can look like: system 1: ...(ABAC)(ABAC)(ABAC)... this leads to its characteristic (or correlation) vector <A>=0.5 this is the appearing frequency of character A <B>=0.25 <C>=0.25 <AB>=0....
I have come up with two simple methods for finding all the factors of a number $n$. The first is trial division: For every integer up to $\sqrt{n}$, try to divide by $d$, and if the remainder is $0$ then add $d$ and $n/d$ to the factor list. Assuming division and appending to a list are $O(1)$ operations for a CPU, th...
I'm trying to estimate the complexity of an algorithm I've written for the Reko decompiler, where I'm trying to "undo" the tranformation done by a compiler to an integer division by a constant $x / n$. The compiler has converted the division into an integer multiplication and a shift: $(x * \lfloor 2^\beta / n \rfloor)...
I just found out that you can have $2^{2^n-1}$ different subsets, made from $n$ sets, using operations $\cup , \cap , \setminus$. That is because when $n=2$, for example, you have 3 disjoint subsets: $A\setminus B, B\setminus A,A\cap B$ and then you can union those things together in $2^3-1$ different ways (plus the em...
I'm using the A* algorithm with a consistent heuristic on a graph to determine the shortest path. If the algorithm is exploring a node $p_1$ for which there is a existing knowledge about the optimal $k$ ($p_q,p_r,p_t,p_5$) successive nodes, then can we store $p_5$ directly into the open list? Or do we have to store th...
In Figure 1, (a) is the input mesh, we want to find several rectangles to cover the red cells in (a), at the same time, the sum area of these rectangles should be as small as possible. Figure 1(b) and Figure 1(c) are two ways. Obviously, (c) is a better way due to the smaller sum of area the green rectangles . Besides...
In push relabel algorithm, at the end excess at any nodes is pushed back to source by raising height of those nodes above the height of source. Why is this done? In CLRS it's mentioned: To make the preflow a “legal” flow, the algorithm then sends the excess collected in the reservoirs of overflowing vertices back ...
I've made the following diagram to accept a, ad, abc, abd but I don't it to accept e, abcd, how can I limit that? Updated I modified the diagram in another attempt:
I've been looking at various calculus with explicit substitutions for efficient implementation of normalisation of terms in the lambda calculus. AFAICT there are basically two approaches: the λσ calculus of explicit substitutions, and the suspension calculus. All others I found suffer from the fact that they cannot co...
Given an positive integer array with distinct elements, find all possible subset pairs having equal average. How to do this ? Example: arr={5,10,6,7} Ans: {7},{5,6,10} Exp: average of first subset=7 average of second subset=(5+6+7)/3=21/3=7 (two subsets for the array which when combined must have all the elements non r...
I have a DFA A, I minimize A and the minimized DFA obtained is M. My question is if in general A and M are isomorphic?
Given the following NP-complete problem: PARTITION Input: A list of positive integers $a_1, a_2, \dots, a_n$. Question: Can the list be partitioned into $2$ parts, $A_1$ and $A_2$, such that the sum of each part is the same? Now I want to reduce PARTITION to the following problem: TRIPLE-SUM Input: A list of positiv...
I'm sorry if the title is unclear, I didn't know how to name this question. I have a problem where I have an array of numbers with positive integer values. For a pair of these integers to be considered valid, they should follow the format a^2 + b^2 = x^2, where a and b are the integers, and x is any whole number. What...
I want to write an algorithm to find the closest pair of points among n points in an XY-plane. I have the following approach in my mind: Find the minimum x co-ordinate(minX) and minimum y(minY) co-ordinate. Name the point origin= (minX,minY) Find the distance of all points from this origin and store it in a vector dis...
The following I believe is a direct proof of this fact. If a learner is tasked to be $\epsilon$-competitive with a hypothesis $h \in \mathcal H_n$, where $\mathcal H_n$ is agnostic PAC learnable, it should be sufficient to just agnostic PAC learn on $\mathcal H$. Suppose $\mathcal H = \bigcup_n \mathcal H_n$ where each...
I want to build an application that relies on a distributed queue with participants in a decentralized (peer-to-peer) network. The participants cannot be relied on to correctly follow a protocol. I found the distributed queue dual-bus algorithm, but I think it only works with reliable participants. Is there an algorith...
Occam's razor states that shorter explanations (formally speaking, hypotheses) are more likely to be correct. Indeed this can be formalized: for a hypothesis class $\mathcal H$ one may ascribe representations to each hypothesis and take their literal length as strings. The shorter ones are more correct. But the problem...
There is a lengthy discussion going on at the English Language & Usage StackExchange site suggesting various synonyms for dead code, and it got me wondering about an angle that wasn't covered -- inaccessible states in a Turing machine. These are simply defined (look at page 43 here if you need a source) as states tha...
Most of time while writing loops I usually write wrong boundary conditions(eg: wrong outcome) or my assumptions about loop terminations are wrong(eg: infinitely running loop). Here is an small example where I got stuck several times, the example is a sub problem that I skinned out for solving insertion sort algorithm. ...
Suppose that I have $n$ straight rectangles on a plane $r_i = (x_i,y_i,w_i,h_i)$. Each rectangle has a cost function, its area $A(r_i) = w_i \cdot h_i $. I can also "merge" 2 or more rectangles into their bounding box. In this case the cost function will be the area of the bounding box, instead of the sum of their ar...
Given $x$ and $y$, I want to find keys $k$ such that $x<k<y$, in a binary search tree. Can this be done in time $O(n + h)$, where $n$ is the number of keys between $x$ and $y$, and $h$ is the height of the tree?
I'm quoting a question from my homework which I don't understand its wording. Also, I'm not looking for an answer for my problem, I just want to be pointed at some articles/tutorials/reading/tips to solve them. Gp ⇒ (p U q) U p (p U q) ∧ (q U p) ⇔ p ∧ q Fp ⇔ F(Xp) X(Fp) ⇔ F(Xp) (p U (q ⇒ ¬Xq)) ∧ (FGq) ⇔ p U (Gq) They...
For my classes in theoretical computer science the following proof must be shown to be wrong. However, this is the first time I am attempting myself at this topic, so I would be thankful for some help: Lemma: If $L \in NP $, then $ \bar{L} \in NP $ Proof: Let N be a non-deterministic Turing machine, which accepts L i...
This is a HW question, so Im not expecting full solutions or anything, but would love some direction. Also English is not my first language, so I apologize in advance. We define a new class of languages - VNL: all languages L s.t there exists M - a DTM with: an input-read-only tape. a "witness" tape which is a "one-t...
I have been reading Benjamin Pierce's Types and Programming Languages, plus a couple of course notes on type systems and typed $\lambda$-calculus, and there is one thing I don't get: it seems that everybody defines sum types in the same way, and they way the language is extended to accommodate this new type includes th...
What language generated by the following context-free grammar 1) S------> SaS | b i already know the answer to question one but to prove it would is be something like this: S -----> SaaS -----> baab which can also be express as the language b(ab)* or (ba)*b Another question is what does | b mean does it mean subst...
I am trying to find all the cycles in an undirected graph given the adjacency list of the vertices, with the an output of all the cycles in form of the vertices they are made up of. For example -https://i.stack.imgur.com/Ku4fd.jpg The example depicts the graph drawn by the adjacency list with desired cycles result 1 23...
I recently found out about the Rose tree data structure, but just going off of a Haskell data definition and the tiny Wikipedia description of it, I've got some trouble understanding what applications a Rose tree might have. For reference, the Haskell data definition: data RoseTree a = RoseTree a [RoseTree a] For thos...
What is the difference between a single processing unit of CPU and single processing unit of GPU?  Most places I've come along on the internet cover the high level differences between the two. I want to know what instructions can each perform and how fast are they and how are these processing units integrated in the co...
this dfa should accept only consecutive odd number of both 0's and 1's. example: 10001,1110001,10,01,011101. How can I draw its diagram?
I want to find the optimal locations for vertices of a polygon (with area A) such that it is as close as possible to the desired area A'. Please note that the vertices need not be fixed at their initial locations. I'm looking for an optimization algorithm that looks at the change in the area of the sub-triangle associa...
Here is a divide and conquer approach for finding minimum and maximum elements in an array. MaxMin(i, j, max, min) { //max and min are the references so that we can retain their value when //we return from the function. i and j are the indices of start and //end respectively. if (i=j) then max := min :...
To avoid the noise as much as possible, I'm planning to take multiple scenes from RGB-D then try to merge them .... so is there any research papers , thoughts , ideas , algorithms or anything to help
With the hill-climbing search algorithm, I do not quite understand how the algorithm can get stuck at "plateaus/ridges." Moving one step back, what exactly denotes a "maximum" or "minimum" in a problem? For instance, in the 8-queens problem, it is said that it hits a local minima 86% of the time. Can someone please ela...
The problem A loan graph is a directed weighted graph $\mathcal{G} = (V, A),$ where $A \subseteq V \times V.$ If we have a directed arc $(u, v)$, we interpret it as the node $u$ gave a loan of $w(u, v)$ money units to the node $v$. Now, suppose all debtors want to pay all their debts at the same instant. Even if we dis...
For personal enlightenment, I'm trying to write a recursive descent parser for lambda calculus without abstraction, i.e., just identifiers and function application. The BNF grammar that describes the language could be this, where <var> is a terminal standing for identifiers: <exp> ::= <exp> <var> | <var> But t...
I have read that the membership problem for CSL is PSPACE-complete but I couldn't find the proof anywhere. So I tried it myself. Let's mark the membership problem for CSL as MEM. First I have to proof that $ MEM \in PSPACE $. This should be easy, just take Turing Machine that generate words from L in lexicographic orde...
as the title suggests, I was struggling to define the differences between finite and Büchi automata and how they are represented. From an assignment I'm working on, this automaton can be depicted as both infinite automaton and Büchi automaton. Can you give me an example for each of those automatons to understand the ...
I want to split my data into $n$ approximately equal parts. Which simple hash functions will ensure that the number of $x$ with $h(x)\equiv i\pmod{n}$ is approximately equal for each $i$?
I am interested in the subject of thread-local contexts, which is a feature that I use quite often in solutions, but seems to lack first-class support in any languages I have used. Quite often in programming - especially if you are implementing a solution that repeatedly processes similar inputs - it is useful to have ...