Problem Detail: Let $L = {a^n mid n ge 0}$, where $a^0 = epsilon$ and $a^n = a^{n-1}a$ for all $n ge 1$. Thus $L$ consists of sequences of $a$ of all lengths, including a sequence of length $0$. Let $L_2$ Read More …
Blog
[Solved]: Regular language with pumping lemma
Problem Detail: I have that language $S={a^n b^m c^mmid n,m geq 0}$. How can I prove with the pumping lemma that it isn’t regular? Can I use the concatenation closure and say that it’s the language $L_1 = {a^nmid ngeq0}$ and Read More …
[Solved]: How is $a^nb^nc^{2n}$ not a context free language, where as $a^nb^mc^{n+m}$ is?
Problem Detail: $L_1 = {a^mb^nc^{m+n}: n,m>1}$ I know $L_1$ is CFL and works with a pushdown automata. $L_2 = {a^nb^nc^{2n}: n>1}$ The language $L_2$ should also be a CFL because it looks similar, but in my book $L_2$ is not a Read More …
[Solved]: Why does a color video compress better than a black and white video?
Problem Detail: It was asked in an exam why a color video compress better than a black and white (grayscale) video using MPEG but can’t find anything explaining it. In other words, we would apparently get a better compression ratio when Read More …
[Solved]: Does there exist any work on creating a Real Number/Probability Theory Framework in COQ?
Problem Detail: COQ is an interactive theorem prover that uses the calculus of inductive constructions, i.e. it relies heavily on inductive types. Using those, discrete structures like natural numbers, rational numbers, graphs, grammars, semantics etc. are very concisely represented. However, since Read More …
[Solved]: Simple graph canonization algorithm
Problem Detail: I’m looking for an algorithm that provides a canonical string for a given colored graph. Ie. an algorithm that returns a string for a graph, such that two graphs get the same string if and only if they are Read More …
[Solved]: Hiring one person out of n — rank and probablity
Problem Detail: I am studying algorithms from CLRS book. I try to understand the difference between probability of hiring the $i$th person out of $n$ and probability of hiring the $i$th person out of $n$ persons based on ranks. Using the Read More …
[Solved]: first intersection of two arrays of integers – double binary search feasible?
Problem Detail: I’m interested to find the fastest possible way to find the first element of an intersection of two integers arrays (first match) Looking for the ‘fastest’ algorithm I have seen different methods with different time complexities (to calculate the Read More …
[Solved]: Why is the initial state of Zobrist hashing random?
Problem Detail: When generating a board for Zobrist hashing, why are the initial elements random? How can you detect changes to elements later if the initial values are random? Asked By : ross.squires Answered By : Yuval Filmus The initial elements are chosen Read More …
[Solved]: Bloom filter and perfect hashing
Problem Detail: A Bloom filter uses a hash function to test membership in a given set $S$, by checking if an item is present of not at the specified position. To mitigate the effect of hash collision, multiple functions are used, Read More …