Problem Detail: I’m looking for a good book that explains these subjects in a readable way. Any suggestions ? I currently pursuing my BSC in computer science, and I just failed to pass the course introduction to thr theory of computation Read More …
Category: Uncategorized
[Solved]: Fixed base exponentiation with precomputations
Problem Detail: I’m trying to compute $g^m$ mod $n$ where $m,n$ are 1024-bit numbers. The method I want to use is fixed base exponentiation with precomputations, also known as fixed-base windowing.The paper I’m following is Brickell et. al. “Fast Exponentiation with Read More …
[Solved]: In the Curry-Howard isomorphism as applied to Hindley-Milner types, what proposition corresponds to a -> [a]?
Problem Detail: (Using Haskell syntax, since the question is inspired by Haskell, but it applies to general Hindley-Milner polymorphic type systems, such as SML or Elm). If I have a type signature f :: a -> [a], what is the logical Read More …
[Solved]: Table-Driven Agent Program
Problem Detail: I have two questions regarding a paragraph about table-driven agent programs from Modern Approach to Artificial Intelligence 3rd Edition. “Let $mathbb{P}$ be the set of possible percepts and let T be the lifetime of the agent (the total number Read More …
[Solved]: Greedy algorithm for Set Cover problem – need help with approximation
Problem Detail: I want to approximate how close is the greedy algorithm to the optimal solution for the Set Cover Problem, which I’m sure most of you are familiar with, but just in case, you can visit the link above. The Read More …
[Solved]: In control flow graphs, what is the difference between a path and a branch?
Problem Detail: I’m studying for an exam on software testing and in my notes I found this: Many more paths than branches. A pragmatic compromise will be needed I cannot understand the difference between paths and branches; each time I work Read More …
[Solved]: Partial order, total order, and version order in transaction histories
Problem Detail: In Section 3.1.2 “Transaction Histories” of the PhD thesis by Atul Adya [1]: A history $H$ over a set of transactions consists of two parts: (1) a partial order of events $E$ that reflects the operations (e.g., read, write, Read More …
[Solved]: Counting solutions to system of linear equations modulo prime
Problem Detail: I have implemented Gaussian elimination for solving system of linear equations in the field of modulo prime remainders. If there is a pivot equal to zero I assume the system has no solution but how to calculate number of Read More …
[Solved]: Use minimum number of swaps so each bin contains balls of the same color
Problem Detail: There are $n$ bins, the $i$th bin contain $a_i$ balls. The balls has $n$ colors, there are $a_i$ balls of color $i$. Let $m=sum_{i=1}^n a_i$. A swap is take a ball from one bin and swap with a ball Read More …
[Solved]: Definition of $Theta$ for negative functions
Problem Detail: I’m working out of the 3rd edition CLRS Algorithms textbook and in Chapter 3 a discussion begins about asymptotic notation which starts with $Theta$ notation. I understood the beginning definition of: $$Theta(g(n)) = { f(n),|, exists, c_1, c_2 > Read More …