Problem Detail: On wikipedia, there is a proof for the cycle property of the Minimum Spanning Tree as follows: Cycle Property: For any cycle C in the graph, if the weight of an edge e of C is larger than the Read More …
IgnouGroup Social Campus
Problem Detail: On wikipedia, there is a proof for the cycle property of the Minimum Spanning Tree as follows: Cycle Property: For any cycle C in the graph, if the weight of an edge e of C is larger than the Read More …
Problem Detail: How can I sort a list of 5 integers such that in the worst case it takes 7 compares? I don’t care about how many other operations are performed. I don’t know anything particular about the integers. I’ve tried Read More …
Problem Detail: A (now closed) question on SO made me think about the following problem: Given an arbirtary number of points (2D), draw a path that consists of straight lines between points, visits each point exactly once and does not intersect Read More …
Problem Detail: Problem: Give a linear-time algorithm to find an odd-length (directed) cycle in a directed graph. (Exercise 3.21 of Algorithms by S. Dasgupta, C. Papadimitriou, and U. Vazirani.) The related [email protected] asks for the existence of an odd-length directed Read More …
Problem Detail: Consider the problem of taking an input Turing machine and determining if the final cell is a $0$ or $1$ after computation halts. On cases where it writes something else or does not halt, you are allowed to give Read More …
Problem Detail: When testing algorithms, a common approach is random testing: generate a significant number of inputs according to some distribution (usually uniform), run the algorithm on them and verify correctness. Modern testing frameworks can generate inputs automatically given the algorithms Read More …
Problem Detail: Below is the general code for DFS with logic for marking back edges and tree edges. My doubt is that back edges from a vertex go back and point to an ancestor and those which point to the parent Read More …
Problem Detail: I am stuck and having a hard time with this question. I want to construct a CFG for the language $$L = {{a^lb^mc^n | l,min N, n=|l-m|}}$$ I know that the language consists of strings where: 1. number of Read More …
Problem Detail: Over here, Dave Clarke proposed that in order to compare asymptotic growth you should plot the functions at hand. As a theoretically inclined computer scientist, I call(ed) this vodoo as a plot is never proof. On second thought, I Read More …
Problem Detail: Is there already modified version of selection sort that works like this pseudocode: a // the array, index starts at 1 (not zero-based) n = len(a) for x in 1 to n big = x small = x last Read More …