Problem Detail: Suppose we are given $n$ distinct integers $a_1, a_2, dots, a_n$, such that $0 le a_i le kn$ for some constant $k gt 0$, and for all $i$. We are interested in finding the counts of all the possible Read More …
Blog
[Solved]: When is the minimum spanning tree for a graph not unique
Problem Detail: Given a weighted, undirected graph G: Which conditions must hold true so that there are multiple minimum spanning trees for G? I know that the MST is unique when all of the weights are distinct, but you can’t reverse Read More …
[Solved]: Given two heuristic values how do I tell which one is admissible?
Problem Detail: I am given 2 list of admissible values for a graph, and the graph with the real cost to each of the nodes. Am I correct in thinking the way to see which one is admissible is add up Read More …
[Solved]: Minimum distance between start and end by going through must visit points in a maze
Problem Detail: So, suppose i have a maze, which has a start point and an end point, marked with Orange and red respectively and my goal is to find the minimum distance between them. The blocked path is represented by black Read More …
[Solved]: Shortest sub-sequence of one string, that’s not a sub-sequence of another string
Problem Detail: Given two strings $x$ and $y$ over the alphabet ${A,C,G,T}$, I’m trying to determine a shortest string $z$ such that $z$ is a subsequence of $x$ and not a subsequence of $y$. Example: a shortest string that is a Read More …
[Solved]: Analyzing a modified version of the card-game “War”
Problem Detail: A simple game usually played by children, the game of War is played by two people using a standard deck of 52 playing cards. Initially, the deck is shuffled and all cards are dealt two the two players, so Read More …
[Solved]: Decidable restrictions of the Post Correspondence Problem
Problem Detail: The Post Correspondence Problem (PCP) is undecidable. The bounded version of the PCP is $mathrm{NP}$-complete and the marked version of the PCP (the words of one of the two lists are required to differ in the first letter) is Read More …
[Solved]: Are “Flow Free” puzzles NP-hard?
Problem Detail: A “Flow Free” puzzle consists of a positive integer $n$ and a set of (unordered) pairs of distinct vertices in the $n times n$ grid graph such that each vertex is in at most one pair. A solution to Read More …
[Solved]: Draw a DFA that accepts ((aa*)*b)*
Problem Detail: A homework question asks me to a draw a DFA for the regular expression $((aa^*)^*b)^*$ I’m having trouble with this because I’m not sure how to express the idea of $a$ followed by $0$ or many $a$’s many times, Read More …
[Solved]: Why are computable functions also called recursive functions?
Problem Detail: In computability theory, computable functions are also called recursive functions. At least at first sight, they do not have anything in common with what you call “recursive” in day-to-day programming (i.e., functions that call themselfes). What is the actual Read More …