Problem Detail: In trying to gain a better understanding of finite state machines, I stumbled across this idea and have been confused as to how to approach this case in terms of a DFA. The set of binary strings of length Read More …
Category: Uncategorized
[Solved]: Sum number of times statement is executed in triple nested loop
Problem Detail: I have this code fragment: for( i=0; i<n; i++ ) for( j=0; j<i; j++ ) for( k=0; k<j; k++ ) S; I need to find the number of times that S is executed in that code block. I plugged Read More …
[Solved]: Converting a 2-SAT formula into an implication graph
Problem Detail: Both wikipedia and my lecturer explained how the 2 satisfiability problem work. However, I am finding it really hard understanding how this formula: xvy≡ ¬x–>y ≡ ¬y –>x Then breaks down the following conjectures : (¬x v y) & Read More …
[Solved]: Show a TM-recognizable language of TMs can be expressed by TM-description language of equivalent TMs
Problem Detail: I am studying “An Introduction to the Theory of Computation” by Sipser — there is a problem *3.17 (p.161) which I can not solve. Any hints (not answers) from which side to attack it? Let $B={M_1, M_2, …}$ be Read More …
[Solved]: Eliminating Null Productions from Context Free Grammar
Problem Detail: Here is a problem I am trying to solve: S -> 0A0 | 1B1 | BB A -> C B -> S | A C -> S | e I know that C is nullable (since it produces an Read More …
[Solved]: Iterative lengthening search: iterative version of Uniform Cost Search or DFS?
Problem Detail: Actually my question has two parts: 1) I wanted to know that whether Iterative Lengthening Search is used in combination with DFS or Uniform Cost Search? Actually, in Russell and Norvig book (on page 90), it is described as Read More …
[Solved]: Can context-free grammar generate $a^{2^n}$?
Problem Detail: Context-free grammar can generate the string a 2 n for n≥0 . The production rule P is S→SS|a . The derivations is, for example: 1) S⇒a (this is when n = 0) 2) S⇒SS⇒aa (this is when n = Read More …
[Solved]: Amortize time for a counter with the operations INCREMENT and DECREMENT
Problem Detail: Let a binary counter with the operations INCREMENT and DECREMENT. I need to show that you can’t implement this kind of counter with constant amortized time per operation. Hence, I need to show that there’s a series of $N$ Read More …
[Solved]: Bankers algorithm – How does it work?
Problem Detail: I’m currently studying deadlocks and I’m trying to learn myself the bankers algorithm. In this example my teacher goes to B first, then C and finally A. He adds (I think) 2 (row b, Has) with 3 (free) and Read More …
[Solved]: How good are current AI researchers at simulating complex, first-person emotional states?
Problem Detail: I just read that IBM’s Watson would have a hard time answering questions like “tell me about your first kiss.” If you asked a modern, state-of-the-art chatbot questions like “tell me about a song that means a lot to Read More …