Problem Detail: Say I have Simply typed lambda calculus, and add an assignment rule: <identifier> : <type> = <abstraction> Where <identifier> is the name of the function, <type> is the function type and <abstraction> is the abstraction to be assigned to Read More …
Blog
[Solved]: Peer grading design – choosing a graph, to get accurate rankings/ratings
Problem Detail: Background. I am writing some code for semi-automated grading, using peer grading as part of the grading process. Students are given pairs of essays at a time, and the students have a slider to choose which is better and Read More …
[Solved]: Context free language and the complement of it
Problem Detail: Given the language $L_1 = {a^i b^j c^k mid i neq j vee i neq k}$, I need to determine whether it is context-free by using the pumping lemma. I must do the same for the complement of this Read More …
[Solved]: Find subsequence of maximal length simultaneously satisfying two ordering constraints
Problem Detail: We are given a set $F={f_1, f_2, f_3, …, f_N}$ of $N$ Fruits. Each Fruit has price $P_i$ and vitamin content $V_i$; we associated fruit $f_i$ with the ordered pair $(P_i, V_i)$. Now we have to arrange these fruits Read More …
[Solved]: Basic action for every data structure O(1)
Problem Detail: My lecturer for Algorithms said that most of the data structures I will encounter in the algorithms course I am taking have a basic action which is of O(1). Ex: Binary heap. Basic action is: Compare 2 childen. Compare Read More …
[Solved]: Origin of the terms “safety” and “liveness” for concurrent algorithm properties?
Problem Detail: Properties of concurrent algorithms are usually divided into two categories: Safety – something must not happen. Properties in this category are for example partial correctness and sometimes deadlock-freedom (the latter depending on the author). Liveness – something that must Read More …
[Solved]: Kleene plus in Thompson’s construction
Problem Detail: Is there a direct way to represent Kleene plus(+) using Thompson’s construction algorithm? When I studied Thompson’s construction I learned how to transform concatenation, union and kleene star of regular expresions directly into a NFA. In wikipedia(and other websites) Read More …
[Solved]: Nullable nonterminals and recursion
Problem Detail: I have two questions regarding nullable nonterminals in a grammar. Often a simple algorithm is described to find nullable nonterminals: Basis: if $A rightarrow epsilon$ is a production, $A$ is nullable. Induction: if $A rightarrow X_1X_2ldots X_n$ is a Read More …
[Solved]: Find 8 numbers whose sum is closest to a defined value
Problem Detail: I have a file that has a number (a positive integer) on each row. Given a number $q$, I want to find a value that’s a sum of some 8 numbers in the file, and is as close to Read More …
[Solved]: Can all NP-hard problems be reduced to one another?
Problem Detail: I know that all NP-complete problems can be reduced to each other, but how about NP-hard problems? Can all NP-hard problems be reduced to one another? Asked By : user3590783 Answered By : sashas The answer to your question is no. Read More …