Problem Detail: I have a homework question which I would appreciate some help with: Let there be a DAG $G=(V,E)$ with positive weights. For every two different vertices $v_1, v_2$ we will define $D(v_1, v_2)$ to be the maximum length between Read More …
Author: ignougroup
[Solved]: Concatenation of languages in NP
Problem Detail: I have a hard time to understand why the concatenation of two languages over an alphabet (concatenation is in NP), doesn’t imply that each of the languages for themselves are in NP. I talked with my Prof about the Read More …
[Solved]: Maximum non-intersecting subset of circles
Problem Detail: We are given a set of circles, stored by their center points in an array $A$. In particular, the center of the $i$th circle is at coordinates $(A[i].x, A[i].y)$. All the circles have radius of $k$. I want to Read More …
[Solved]: How many zeros should be in front of two’s complement model?
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 …
[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 …