Problem Detail: A set of numbers is stored in a max-heap. We want to find an algorithm with $O(k)$ time complexity to check if $k^{th}$ smallest element is greater than an arbitrary given number. Asked By : Pooria Kaviani Answered By : Merbs Read More …
Author: ignougroup
[Solved]: Encrypting a 180-bit plaintext into a 180 bit ciphertext with a 128-bit block cipher
Problem Detail: I have a field in my data store which must take exactly 180 bits of information. Some users will choose to make this data encrypted, some won’t, so some of those 180 bit fields will be ciphertext some will Read More …
[Solved]: Questions about amortised analysis
Problem Detail: As a preperation of an exam about algorithms and complexity, I am currently solving old exercises. One concept I have already been struggling with when I encountered it for the first time is the concept of amortised analysis. What Read More …
[Solved]: Smallest DFA that accepts given strings and rejects other given strings
Problem Detail: Given two sets $A,B$ of strings over alphabet $Sigma$, can we compute the smallest deterministic finite-state automaton (DFA) $M$ such that $A subseteq L(M)$ and $L(M) subseteq Sigma^*setminus B$? In other words, $A$ represents a set of positive examples. Read More …
[Solved]: Non intersecting paths in a graph
Problem Detail: I’m trying to come up with a good algorithm for the following decision problem: Let $G=(V,A)$ be a directed graph and let $s,t in V$. Are there at-least 2 non-intersecting paths from $s$ to $t$? By non-intersecting I mean Read More …
[Solved]: Turing Machine Decidable: What right does the definition have to say what’s not in language L?
Problem Detail: I’m having trouble understanding the definition of Turing Decidable. The definition goes something like this: TM M decides language L iff the strings in L put M into the Accept state and the strings NOT IN L put M Read More …
[Solved]: Converting Regular expression to DFA by building syntax tree
Problem Detail: There is a way to convert regular expression to DFA (deterministic finite automata) which is to build a syntax tree and then compute first pos, last pos, follow pos, and then use a Transition technique to build DFA for Read More …
[Solved]: Weighted subset sum problem
Problem Detail: Given an integer sequence ${ a_1, a_2, ldots, a_N }$ that has length $N$ and a fixed integer $Mleq N$, the problem is to find a subset $A ={i_1, dots, i_M} subseteq [N]$ with $1 leq i_1 lt i_1 Read More …
[Solved]: Indirection in IAS computer
Problem Detail: From Computer Organisation and Architecture: The IAS operates by repetitively performing an instruction cycle. Each instruction cycle consists of two sub cycles. During a fetch cycle, the opcode of the next instruction is loaded into the IR and the Read More …
[Solved]: Should two DFAs be complete before making an intersection of them?
Problem Detail: In the slides given by my teacher, the third automaton is the product of the first two: I tried to do the product myself by doing the transition table of both automata at the same time. I got stuck Read More …