100% found this document useful (2 votes)
2K views5 pages

X + ( (Xy + X) /y) Using Binary Trees.: B) Prefix Notation. C) Postfix Notation. D) Infix Notation

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
2K views5 pages

X + ( (Xy + X) /y) Using Binary Trees.: B) Prefix Notation. C) Postfix Notation. D) Infix Notation

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Represent the expressions (x + xy) + (x/y) and


x + ((xy + x)/y) using binary trees.
Write these expressions in
b) prefix notation.
c) postfix notation.
d) infix notation.

Represent (A ∩ B) − (A ∪ (B − A)) using an ordered


19. a)

rooted tree.
Write this expression in
b) prefix notation.
c) postfix notation.
d) infix notation.
2. (¬(p ∧ q)) ↔ (¬p ∨¬q).

The prefix, postfix, and infix forms of this expression are found by traversing this
rooted tree
in preorder, postorder, and inorder (including parentheses), respectively. These
traversals give
↔¬∧pq ∨¬p¬q, pq ∧¬p¬q¬ ∨↔, and (¬(p ∧ q)) ↔ ((¬p) ∨ (¬
q)), respectively

represent the expression ((x +2) ↑ 3) ∗ (y −(3+x)) − 5 using a binary tree.


((a+b)-c)*(g*(d/e))

a*b-(c+d)*(p/q)
((a+b)-c)*(g*(d/e))

You might also like