Problem Detail: I’m having trouble understanding reduction. Lets say you have a decision problem A that is NP-Complete. Also, another problem B the can be reduced from A. What can you say about B if: 1) The reduction is done in Read More …
Category: Uncategorized
[Solved]: regular expression in license plates
Problem Detail: I’m trying to write a regular expression for some particular license plates. They consist of one up to three capital letters, a hyphen, one up to two capitol letters and one up to four numbers. The license plate should Read More …
[Solved]: Computing the complement of a set
Problem Detail: Suppose I have a set $A$ of elements in ${1, ldots, n}$, given as an unordered list. I would like to compute the complement of $A$, i.e., I would like to produce an unordered list of entries in ${1, Read More …
[Solved]: Can there exist a recurrence relation for “sequential search”?
Problem Detail: I’m just confused, cause from my knowledge recurrence is applied mostly to recursive procedures or divide and conquer techniques etc. Asked By : Sameer Thigale Answered By : David Richerby Sure. The cost of searching a list of length zero is Read More …
[Solved]: RDT2.1 – does the Sender listener to “ack” even though state=ready?
Problem Detail: Computer Networking: A Top Down Approach Featuring the Internet, Jim Kurose, Keith Ross Addison-Wesley 4nd edition , page -223. Also here slide 60 . RDT2.1 (Reliable data transfer) – Sender(s): state=ready; i=0; On rdt_send(d,m): if state=ready then { Read More …
[Solved]: Expressing semantics of an array as a function
Problem Detail: An assignment questions asks the following: Consider an array ‘var a : array[1..10] of real’. Express the semantics of this array as a function, defining the domain and codomain (you might also be able to write the rule). In Read More …
[Solved]: How do you describe a language that is generated by Context Free Grammer
Problem Detail: I am familiar with describing Regular Expressions but when it comes to describing CFG I get confused. Do you describe it in words like you would regular expressions or do you do something like this ? this is the Read More …
[Solved]: Are two elements always in a relation within a partially ordered set?
Problem Detail: In a partially ordered set, am I always able to order two arbitrary elements out of the set? Or is it possible that two elements within the set have no order relation to each other? For example if there Read More …
[Solved]: Are compilers able to detect alternating accesses to arrays and interleave them in memory?
Problem Detail: Is it possible to design a compiler which optimizes a loop in which arrays are accessed in alternate fashion? For example like this: // int[] a,b int sum = 0; for(int i = 0; i < n; i++) { Read More …
[Solved]: Deterministic Turing Machine with infine tape in both directions
Problem Detail: Consider a deterministic Turing Machine $D$ which has an infinite tape in both directions. We don’t have exact information about it; what we know is that its alphabet is ${a, b, c}$ and there are at least three states Read More …