Problem Detail: So I’m kind of wondering if I’m correct on something relating to an algorithms class. Let’s say I want to, for whatever reason, find the maximum spanning tree of a graph such that the edge weight is at maximum Read More …
Author: ignougroup
[Solved]: Graph Theory Handshaking problem
Problem Detail: Mr. and Mrs. Smith, a married couple, invited 9 other married couples to a party. (So the party consisted of 10 couples.) There was a round of handshaking, but no one shook hand with his or her spouse. Afterwards, Read More …
[Solved]: What linked list data structure adjustments would give me fast random lookup?
Problem Detail: I am presently using an doubly linked list (C++ std::list) to hold a bunch of records that each have a unique integer identifier. The linked list is created in sorted order such that in the list, the next item Read More …
[Solved]: Analysis of very simple algorithm
Problem Detail: I need to find the time complexity of the following simple algorithm. Calculate the time complexity of the following algorithm: void f(int n) { int i, x; for (i = 1; i <= n; i++) if (i % 2 Read More …
[Solved]: Why is NP in EXPTIME?
Problem Detail: Is there an easy way to see why NP is in EXPTIME? It seems to me a priori conceivable that there could be a problem which requires super-exponential time to solve, but whose solution could be verified in polynomial Read More …
[Solved]: Greedy proof: Correctness versus optimality
Problem Detail: I am really confused after surveying a bunch of material online about correctness versus optimality proof for greedy algorithms. Some website even uses both correctness and optimal in the same sentence! From my best unconfirmed understanding, the optimal proof Read More …
[Solved]: Subset sum algorithms, their time complexity
Problem Detail: The algorithm is in Python. Seems correct to me, ideas how to prove it? And what would be its time complexity? from bisect import bisect # Implements the decision version of subset sum. # The subset sum problem: given Read More …
[Solved]: Understanding the definition of SPMD
Problem Detail: From Wikipedia SPMD (single program, multiple data) is a technique employed to achieve parallelism; it is a subcategory of MIMD. Tasks are split up and run simultaneously on multiple processors with different input in order to obtain results faster. Read More …
[Solved]: Showing that deciding whether a given TM accepts a word of length 5 is undecidable
Problem Detail: I’m having trouble grasping this the concept of reductions. I found the solution and it looks like this: Assume that $M_5$ is a Turing Machine that can decide if a given Turing Machine $M$ accepts any string of length Read More …
[Solved]: DFA drawing for binary string with substrings of minimum length 3 with at least two zeroes in each substring
Problem Detail: In trying to gain a better understanding of finite state machines, I stumbled across this idea and have been confused as to how to approach this case in terms of a DFA. The set of binary strings of length Read More …