Translate each infix expression into its equivalent prefix and postfix expression.
i) (A+B) / (D-C) ;
ii) (A+BꜛD)/(E-F)+G ;
iii) A *(B+D)/E(G+H/k)
Consider the following infix expression
Q: ((A+C)*D)ꜛ(B+F/E)+G use POLISH Algorithm to translate Q into its equivalent postfix expression P.
Let A, B, C, D, E, F, G, H be eight data items with the following assigned weights:
Data item: A B C D E F G H
Weight: 20 7 11 17 5 10 24 6
Construct Binary tree using Huffman Algorithm also find the path length of the tree.
Draw a flowchart that will input values for A and B. Compare two values inputted and print which of the values is higher including the remark “Higher”.
Question 3
a) Using C or C++ or a program of your choice, write a program that list the storage size of a float, list the minimum and maximum float values, and the precision of the float.
[10 marks]
b) Describe the steps of how you will compile the program written in Question a) above in a typical compiler such as gcc or a compiler of your choice. [10 marks]
c) Show the output (screenshot) of how you have compiled the program written in Question a) above and attach all files (screenshot) generated where applicable. [5 marks]
b) The IBX company has recently acquired a state-of-the-art
language processing system; and its components work
seamlessly to compile source programs into object codes
for the computer to execute. As a compiler designer and
constructor, you are required to show and educate new users
on its use.
(i). Describe, in your own words, the parts/components of
the language processing system that your company has acquired to users to understand, and explain the role(s)
that each component plays in the compilation process. [7 marks]
(ii). Explain how each component accomplishes its role(s)
in the compilation process and the output that it produces
[4 mar
c) Classify each of the following grammar rules according to Noam Chomsky’s classification of grammars (in each case give the largest – i.e. most restricted - classification type that applies):
1. aSb → aAcBb
2. B → aA
3. S → aBc
4. S → aBc
5. Ab → b
6. AB → BA
Question 1
A language processing system aims at compiling source programs into codes
for the computer to execute. A language can thus be defined as a set of strings. There are several known ways of specifying a language.
a) Describe what a grammer is
b) Given a language L and grammer denoted as G1 show that aabb is in L(G1) where the the grammer G1 is defined as
1. S —›ASB
2. S —›Ɛ
3. A —›a
4. B —›b
where a,b are terminal symbols and Ɛ represents the null string.
Q1. Explain strategies and options for distributed database design.
Q2. Explain advantages and risks of distributed databases.
Q3. Discuss relative advantages of synchronous and asynchronous data replication and partitioning.
Q4. Describe salient characteristics of distributed database environments.
Question 1:
Distinguish between analogue and parametric estimation in cost management
Question 2:
Examine the importance of quality auditing in project management.