Problem Detail: This came up while I was trying to answer this question on Wiring Length Minimization. I was going to call this the “polygamous marriage” problem, but the internet, so kittens. Yay! Suppose we have $M$ kittens that need to Read More …
Category: Uncategorized
[Solved]: NP Problem definition – verifiable on DFA vs. solvable on NFA
Problem Detail: So in complexity theory, I’ve run across different definitions for NP problems — Decision problems where a solution can be verified by a DFA in polynomial time Decision problems where a solution can be found by an NFA in Read More …
[Solved]: Faster growing busy beaver function
Problem Detail: Standard busy beaver function draws attention to final count of nonzero symbols on tape. We could instead look at largest amount of nonzero symbols appearing on tape at any point of computation. This function’s lower bound would be $Sigma(n)$ Read More …
[Solved]: Determining the particular number in $O(n)$ time and space (worst case)
Problem Detail: $newcommandldotd{mathinner{..}}$Given that $A[1ldotd n]$ are integers such that $0le A[k]le m$ for all $1le kle n$, and the occurrence of each number except a particular number in $A[1ldotd n]$ is an odd number. Try to find the number whose Read More …
[Solved]: Sublinear query time for the $i$th element of an array after some additions?
Problem Detail: We are given an array $A[1..n]$ of integers, and an array of 3-tuples known as queries. The query tuples $(i,j,v)$ denote additions of an integer $v$ to the subarray of $A[i..j]$. I’m interested in the query time of $A[k]$ Read More …
[Solved]: Algorithm for length of longest common subsequence
Problem Detail: The case of multiple strings. A slight modification of the dynamic programming algorithm for two strings is used as a subroutine. Here is the pseudo code: # The modified dynamic programming algorithm for longest common subsequence. # Inputs: x, Read More …
[Solved]: Finding Minimum Weight Subgraph Spanning Tree
Problem Detail: Suppose we have a graph $G = (V, E, w:ein E to x in {0,1})$. That is, a set of vertices, a set of edges and a weight function that assigns edges weights of 0 or 1. Suppose we Read More …
[Solved]: If $L_1L_2$ is regular language then $L_2L_1$ is regular to?
Problem Detail: We have two languages: $L_1,L_2$. We know that $L_1L_2$ is regular language, so my question is if $L_2L_1$ is regular to? I try to find a way to prove it… I can’t assume of course that $L_1,L_2$ are regular… Read More …
[Solved]: How to do last step of Krom’s algorithm for solving 2SAT problems
Problem Detail: I was making a program for solving 2 SAT problems, using Krom’s algorithm. I did not found a lot of information searching in Google, so I used Wikipedia’s description of Krom’s algorithm to implement it but I’m stuck in Read More …
[Solved]: Dijkstra’s algorithm runtime for dense graphs
Problem Detail: The runtime for Dijkstra’s algorithm implemented with a priority queue on a sparse graph is $O((E+V)log V)$. For a dense graph such as a complete graph, there can be $V(V-1)/2$ edges. Since $E sim V^2$, is the runtime $O((V+V^2)log Read More …