Problem Detail: While creating an algorithm, the following question came up: In uniform cost, what is the time cost of a process that creates a thread? Is there a difference between creating a thread in a thread pool vs creating a Read More …
Category: Uncategorized
[Solved]: Why does $A(L)= { w_1w_2: |w_1|=|w_2|$ and $w_1, w_2^R in L }$ generate a context free language for regular $L$?
Problem Detail: How can I prove that the language that the operator $A$ defines for regular language $L$ is a context free language. $A(L)= { w_1w_2: |w_1|=|w_2|$ and $w_1, w_2^R in L }$, where $x^R$ is the reversed form of $x$. Read More …
[Solved]: Expected number of updates of minimum
Problem Detail: I came across the following problem in a exam. We choose a permutation of n elements $[1,n]$ uniformly at random. Now a variable MIN holds the minimum value seen so far at it is defined to $infty$ initially. Now Read More …
[Solved]: Please explain “decidability” and “verifiability”
Problem Detail: I am trying to (intuitively) understand the two terms “decidability” and “verifiability”. I have done a reasonable amount of searching and going through the various texts I can put my hands on. However, their intuitive understanding seems to escape Read More …
[Solved]: Is this variant of ATM decidable?
Problem Detail: Ok so I understand how $mathrm{ATM} = {langle M,w rangle mid text{$M$ is a TM and $M$ accepts $w$}}$ is undecidable. Is this because $w$ is a variable? What if the parameter is fixed? Consider $mathrm{BTM} = {langle M,w Read More …
[Solved]: Calculating cache memory based on LRU algorithm
Problem Detail: Assuming i have 4 blocks of cache memory, Using the LRU (Least Recently Used) replacement algorithm on this following sequence of access to memory blocks: 1 2 3 4 5 2 5 4 1 5 2 3 : 1 Read More …
[Solved]: Are regular languages closed under sort (Parikh image)?
Problem Detail: Assume $L$ is a regular language over an ordered alphabet. Is the language built by taking every word in $L$ and sorting it always a regular language? Asked By : Andrew MacFie Answered By : Niel de Beaudrap No. Counterexample: assuming Read More …
[Solved]: Direct Cache Mapping – Determine Tag Size
Problem Detail: In the following direct cache map, there is a list of 32-bit memory address references, given as word addresses. I gathered that the index size is 3 bit and there is no offset. However, I used 4 bits to Read More …
[Solved]: Algorithm for type conversion / signature matching
Problem Detail: I’m working on an expression typing system and looking for insights on what algorithms may be available which solve my problem — or a proof that its complexity is too high to be reasonable to implement. The problem is Read More …
[Solved]: Prove that regular expression is unambiguous
Problem Detail: I’ve got following definition: Function $f$ is a valid mapping of word $w$ to regular expression $R$, if any of following conditions is true: $R = w$ and $f$ is the identity or $R = epsilon$ and $w = Read More …