Problem Detail: For measuring the complexity of an algorithm, is it time complexity, or computational complexity? What is the difference between them? I used to calculate the maximum (worst) count of basic (most costing) operation in the algorithm. Asked By : Median Read More …
Category: Uncategorized
Sabatier conjectures
Problem Detail: While I was doing CLRS (3rd edition), I came across this question on page 629: Professor Sabatier conjectures the following converse of Theorem 23.1: Let $G = (V,E)$ be a connected, undirected graph with a real-valued weight function $w$ Read More …
Quantum Computing and Turing Machines: Are Turing Machines still an Accurate Measure?
Problem Detail: In class last week, my professor commented and said that Turing machines are used as a standard measure/model of what is computable and are a helpful basis of discussion for that subject. She also said that all variants of Read More …
How to find the minimum number of vertices whose removal make the graph disjoint
Problem Detail: Given a graph $G = (V,E)$. Is there any algorithm which finds the minimum number of vertices to be removed from $G$ so that every vertex in the graph becomes disjoint, i.e., every vertex is disconnected from every other Read More …
Average depth of a Binary Search Tree and AVL Tree
Problem Detail: My professor recently mentioned that the average depth of the nodes in a binary search tree will be $O(log(n))$ where $n$ is the amount of nodes in the tree. I ended up drawing out a bunch of binary search Read More …
Difference between end carry and overflow
Problem Detail: I am confused with end carry and overflow. When will an end carry be the overflow? How to identify whether the end carry is overflow or not? Are they both same? Sometimes end carries obtained are simply discarded and Read More …
Connection between KMP prefix function and string matching automaton
Problem Detail: Let $A_P = (Q,Sigma,delta,0,{m})$ the string matching automaton for pattern $P in Sigma^m$, that is $Q = {0,1,dots,m}$ $delta(q,a) = sigma_P(P_{0,q}cdot a)$ for all $qin Q$ and $ain Sigma$ with $sigma_P(w)$ the length of the longest prefix of $P$ Read More …
Construct Turing Machine which accepts the language $ww$
Problem Detail: I try to construct a TM that accepts the language ${ ww mid w in {a,b}^* }$. Between the words $w$ is no delimeter, so I don’t know, how my TM can know where the first $w$ ends and Read More …
Why do we use persistent data structures in functional programming?
Problem Detail: Functional programming employs persistent data structures and immutable objects. My question is why is it crucial to have such data structures here? I want to understand at a low level what would happen if the data structure is not Read More …
Sorting algorithms which accept a random comparator
Problem Detail: Generic sorting algorithms generally take a set of data to sort and a comparator function which can compare two individual elements. If the comparator is an order relation¹, then the output of the algorithm is a sorted list/array. I Read More …