Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged ullman
1
1 vote
0
0 answers
1.5k
1.5k views
Ullman (Compiler Design) Edition 2 Exercise 2.3 Question 2 (Page No. 60)
Construct a syntax-directed translation scheme that translates arithmetic expressions from postfix notation into infix notation. Give annotated parse trees for the inputs...
admin
1.5k
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
parsing
+
–
1
1 vote
1
1 answer
4.8k
4.8k views
Ullman (Compiler Design) Edition 2 Exercise 2.3 Question 1 (Page No. 60)
Construct a syntax-directed translation scheme that translates arithmetic expressions from infix notation into prefix notation in which an operator appears before its ope...
admin
4.8k
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
parsing
+
–
1
1 vote
0
0 answers
463
463 views
Ullman (Compiler Design) Edition 2 Exercise 2.2 Question 6 (Page No. 52)
Construct a context-free grammar for roman numerals.
admin
463
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
context-free-grammar
+
–
0
0 votes
0
0 answers
696
696 views
Ullman (Compiler Design) Edition 2 Exercise 2.2 Question 5 (Page No. 52)
Show that all binary strings generated by the following grammar havevalues divisible by $3$. Hint. Use induction on the number of nodes in a parse tree. $$num\rightarrow ...
admin
696
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
grammar
+
–
0
0 votes
0
0 answers
865
865 views
Ullman (Compiler Design) Edition 2 Exercise 2.2 Question 4 (Page No. 51 - 52)
Construct unambiguous context-free grammars for each of the following languages. In each case show that your grammar is correct. Arithmetic expressions in postfix notatio...
admin
865
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
context-free-grammar
+
–
1
1 vote
3
3 answers
1.7k
1.7k views
Ullman (Compiler Design) Edition 2 Exercise 2.2 Question 3 (Page No. 51)
Which of the grammars are ambiguous? $S\rightarrow 0S1 \mid 01$$S\rightarrow +SS \mid -SS \mid a$$S\rightarrow S(S)S \mid \epsilon$$S\rightarrow aSbS \mid bSaS \mid \epsi...
admin
1.7k
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
context-free-grammar
ambiguous
+
–
0
0 votes
0
0 answers
490
490 views
Ullman (Compiler Design) Edition 2 Exercise 2.2 Question 2 (Page No. 51)
What language is generated by the following grammars? In each case justify your answer. $S\rightarrow 0S1 \mid 01$$S\rightarrow +SS \mid -SS \mid a$$S\rightarrow S(S)S \m...
admin
490
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
context-free-grammar
+
–
0
0 votes
0
0 answers
369
369 views
Ullman (Compiler Design) Edition 2 Exercise 2.2 Question 1 (Page No. 51)
Consider the context-free grammar$S\rightarrow SS+\mid SS^{\ast}\mid a$Show how the string $aa+a^{\ast}$ can be generated by this grammar.Construct a parse tree for this ...
admin
369
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
context-free-grammar
+
–
0
0 votes
1
1 answer
452
452 views
Ullman (Compiler Design) Edition 2 Exercise 1.6 Question 4 (Page No. 36)
What is printed by the following C code?#define a (x+1) int x = 2; void b() {x = a; printf("%d\n",x);} void c() {int x = 1; printf("%d\n"),a;} void main() {b(); c();}
admin
452
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
+
–
0
0 votes
0
0 answers
333
333 views
Ullman (Compiler Design) Edition 2 Exercise 1.6 Question 3 (Page No. 35 - 36)
For the block-structured code, assuming the usual static scoping of declarations, give the scope for each of the twelve declarations.{ int w,x,y,z; /* Block B1 */ { int x...
admin
333
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
+
–
0
0 votes
0
0 answers
270
270 views
Ullman (Compiler Design) Edition 2 Exercise 1.6 Question 2 (Page No. 35 - 36)
For the block-structured C code, indicate the values assigned to $w,x,y$ and $z$.int w,x,y,z; int i = 3; int j = 4; { int i = 5; w = i + j; } x = i + j; { int j = 6; i =...
admin
270
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
+
–
0
0 votes
0
0 answers
335
335 views
Ullman (Compiler Design) Edition 2 Exercise 1.6 Question 1 (Page No. 35 - 36)
For the block-structured C code, indicate the values assigned to $w, x, y$, and $z$. int w,x,y,z; int i = 4; int j = 5; { int j = 7; i = 6; w = i + j; } x = i + j; { int ...
admin
335
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
+
–
0
0 votes
0
0 answers
498
498 views
Ullman (Compiler Design) Edition 2 Exercise 1.3 Question 1 (Page No. 14 - 15)
Indicate which of the following terms:imperative declarative von Neumannobject-oriented functional third-generationfourth-generation scriptingapply to which of the follo...
admin
498
views
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
+
–
1
1 vote
0
0 answers
525
525 views
Ullman (TOC) Edition 3 Exercise 9.5 Question 3 (Page No. 418 - 419)
It is undecidable whether the complement of a CFL is also a CFL. Exercise $9.5.2$ can be used to show it is undecidable whether the complement of a CFL is regular, but th...
admin
525
views
asked
Jul 26, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
pcp
descriptive
+
–
0
0 votes
0
0 answers
579
579 views
Ullman (TOC) Edition 3 Exercise 9.5 Question 2 (Page No. 418)
Show that the language $\overline{L_A}\cup \overline{L_B}$ is a regular language if and only if it is the set of all strings over its alphabet;i.e., if and only if the in...
admin
579
views
asked
Jul 26, 2019
Theory of Computation
ullman
theory-of-computation
regular-language
pcp
descriptive
+
–
0
0 votes
0
0 answers
492
492 views
Ullman (TOC) Edition 3 Exercise 9.5 Question 1 (Page No. 418)
Let $L$ be the set of (codes for) context-free grammars $G$ such that $L(G)$ contains at least one palindrome. Show that $L$ is undecidable. Hint: Reduce PCP to $L$ by co...
admin
492
views
asked
Jul 26, 2019
Theory of Computation
ullman
theory-of-computation
context-free-grammar
pcp
descriptive
+
–
0
0 votes
0
0 answers
460
460 views
Ullman (TOC) Edition 3 Exercise 9.4 Question 4 (Page No. 412)
A Post tag system consists of a set of pairs of strings chosen from some finite alphabet $\Sigma$ and a start string. If $(w,x)$ is a pair, and $y$ is any string over $\S...
admin
460
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
turing-machine
undecidable
descriptive
+
–
0
0 votes
0
0 answers
285
285 views
Ullman (TOC) Edition 3 Exercise 9.4 Question 3 (Page No. 412)
Suppose we limited $PCP$ to a one-symbol alphabet, say $\Sigma = \left\{0\right\}$. Would this restricted case of $PCP$ still be undecidable?
admin
285
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
undecidable
post-correspondence-problem
descriptive
+
–
0
0 votes
0
0 answers
337
337 views
Ullman (TOC) Edition 3 Exercise 9.4 Question 2 (Page No. 412)
We showed that $PCP$ was undecidable, but we assumed that the alphabet $\Sigma$ could be arbitrary. Show that $PCP$ is undecidable even if we limit the alphabet to $\Sigm...
admin
337
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
undecidable
post-correspondence-problem
descriptive
+
–
0
0 votes
0
0 answers
302
302 views
Ullman (TOC) Edition 3 Exercise 9.4 Question 1 (Page No. 412)
Tell whether each of the following instances of $PCP$ has a solution. Each is presented as two lists $A$ and $B$, and the $i^{th}$ strings on the two lists correspond for...
admin
302
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
post-correspondence-problem
descriptive
+
–
0
0 votes
0
0 answers
390
390 views
Ullman (TOC) Edition 3 Exercise 9.3 Question 8 (Page No. 401)
Tell whether each of the following are recursive, RE-but-not-recursive, or non-RE.The set of all $TM$ codes for $TM's$ that halt on every input.The set of all $TM$ codes ...
admin
390
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
turing-machine
recursive-and-recursively-enumerable-languages
descriptive
+
–
0
0 votes
0
0 answers
409
409 views
Ullman (TOC) Edition 3 Exercise 9.3 Question 7 (Page No. 400 - 401)
Show that the following problems are not recursively enumerable:The set of pairs $(M,w)$ such that $TM \ M$, started with input $w$, does not halt.The set of pairs $(M_{1...
admin
409
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
turing-machine
recursive-and-recursively-enumerable-languages
descriptive
+
–
0
0 votes
0
0 answers
320
320 views
Ullman (TOC) Edition 3 Exercise 9.3 Question 6 (Page No. 400)
Show that the following questions are decidable:The set of codes for $TM's \ M$ such that when started with blank tape will eventually write some nonblank symbol on its t...
admin
320
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
turing-machine
decidability
descriptive
+
–
0
0 votes
0
0 answers
329
329 views
Ullman (TOC) Edition 3 Exercise 9.3 Question 5 (Page No. 400)
Let $L$ be the language consisting of pairs of $TM$ codes plus an integer, $(M_{1},M_{2},k)$, such that $L(M_{1})\cap L(M_{2})$ contains at least $k$ strings. Show that $...
admin
329
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
turing-machine
recursive-and-recursively-enumerable-languages
descriptive
+
–
0
0 votes
1
1 answer
601
601 views
Ullman (TOC) Edition 3 Exercise 9.3 Question 4 (Page No. 400)
We know by Rice's theorem that none of the following problems are decidable. However are they recursively enumerable,or non-RE?Does $L(M)$ contain at least two strings?Is...
admin
601
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
rice-theorem
descriptive
+
–
0
0 votes
0
0 answers
356
356 views
Ullman (TOC) Edition 3 Exercise 9.3 Question 3 (Page No. 400)
Show that the language of codes for $TM's\ M$ that, when started with blank tape, eventually write a $1$ somewhere on the tape is undecidable.
admin
356
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
turing-machine
undecidable
descriptive
+
–
0
0 votes
0
0 answers
370
370 views
Ullman (TOC) Edition 3 Exercise 9.3 Question 2 (Page No. 400)
The Big Computer Corp. has decided to bolster its sagging market share by manufacturing a high-tech version of the Turing machine called, $BWTM$ that is equipped with bel...
admin
370
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
turing-machine
descriptive
+
–
0
0 votes
0
0 answers
464
464 views
Ullman (TOC) Edition 3 Exercise 9.3 Question 1 (Page No. 400)
Show that the set of Turing-machine codes for TM's that accept all inputs that are palindromes (possibly along with some other inputs) is undecidable.
admin
464
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
turing-machine
undecidable
descriptive
+
–
0
0 votes
0
0 answers
339
339 views
Ullman (TOC) Edition 3 Exercise 9.2 Question 6 (Page No. 392)
We have not discussed closure properties of the recursive languages or the RE languages other than our discussion of complementation in Section $9.2.2.$ Tell whether the ...
admin
339
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
recursive-and-recursively-enumerable-languages
descriptive
+
–
0
0 votes
0
0 answers
267
267 views
Ullman (TOC) Edition 3 Exercise 9.2 Question 5 (Page No. 392)
Let $L$ be recursively enumerable and let $\overline{L}$ be non-RE. Consider the language$L' = \left\{0w\mid w\ \text{is in}\ L \right\}$Can you say for certain whether $...
admin
267
views
asked
Jul 21, 2019
Theory of Computation
ullman
theory-of-computation
recursive-and-recursively-enumerable-languages
descriptive
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
next »