Problem Detail: The Problem Convert 256 to its 2’s complement representation. My Work I know that 256’s representation in unsigned binary is 100000000. What I know from working with two’s complement model is that the most significant digit represents the Read More …
Category: Uncategorized
[Solved]: How to find all shortest paths between two nodes in a weighted undirected graph?
Problem Detail: How to find all shortest paths between node 1 and N in a weighted undirected graph? There can be multiple edges between two nodes. I want to find all nodes that can be on a shortest path. For example: Read More …
[Solved]: Designing a DFA for binary strings having 1 as the fourth character from the end
Problem Detail: I came across someone else’s old post here Designing a DFA that accepts strings such that nth character from last satisfies condition And decided to try it. Apparently it was a homework problem but it was from 2013 so Read More …
[Solved]: Using FFT to solve pattern matching problem with don’t cares
Problem Detail: I’ve studied about $FFT$ and it’s use in string matching, but there are several issues that bother me. First I’ll describe the problem and the solution I’ve seen in class: Suppose we have alphabet $Sigma = (a, b, phi)$ Read More …
[Solved]: What are logical addresses and where do they actually reside?
Problem Detail: While studying about memory management, paging and segmentation there is a lot of usage of phrases like CPU generates logical addresses and logical addresses are converted to physical addresses etc. I know that the term physical address refers to Read More …
[Solved]: Hash-Table in Practice
Problem Detail: I have a set of $n$ values,$v_i$ and want to insert them into a hash-table, $HT$, in a way that each bucket (or hash-table cell) has at most $d$ values. I set $k=frac{n }{d}$, where $k$ is the number Read More …
[Solved]: Data structure to store sphere points (latitude,longitude) and retrieve all points within a distance
Problem Detail: I have a set of thousands~millions of points on a sphere’s surface, each with latitude, longitude. I want to quickly get all points within a distance d of a particular sphere point latC, lonC. The points are mostly concentrated Read More …
[Solved]: Why can’t hash tables provide O(n) sorting?
Problem Detail: Since a sufficiently large hash table takes constant time to both insert and retrieve data, should it not be possible to sort an array by simply inserting each element into the hash table, and then retrieving them in order? Read More …
[Solved]: Give an example of a non-regular language $L$ such that $L^*$ is regular
Problem Detail: I can’t think of an example of a non-regular language $L$ such that $L^*$ is regular. . Any help ? Asked By : Altaïr Answered By : R B Define $L={a^nb^n|nin mathbb N}cup {a,b}$ It’s not hard to see that while Read More …
[Solved]: Where can I find rules for source to source transformation optimization rules?
Problem Detail: Upon reading Do source code optimizers exist? I knew that such programs existed but the ones I have worked with use a set of rules to drive a transformation algorithm. Ira Baxter provided a link to the tools running Read More …