can the one account stop spamming the same answers on my question please I seriously need help on these topics. i will b
Posted: Thu Jun 02, 2022 7:42 am
can the one account stop spamming the same answers on my question please I seriously need help on these topics. i will be reporting youu!!!!
this questions requires a
knowledge of the hack assembly language, binary
sequence, and gates (and, not etc).
if can be possible can I please get an explanation
on how the question was answered.
4. The notation for grammars in this question uses the following conventions, similar to those used in the course: B ::- in a rule means that the symbol to its left-hand-side is defined by the symbols to the right-hand side. A semicolon marks the end of each 'rule'. . • Parentheses group multiple symbols as a single item. • A ? means the preceding symbol or group is optional. . A means the preceding symbol or group occurs zero or more times. • A separates alternative symbols or groups. . Items enclosed in single quotes represent literal text (e.g.,+ represents a single-character plus symbol). ● Items in upper-case (e.g., IDENTIFIER) represent symbols identified by a tokenizer (lexical analyser). Consider the following grammar ('the sentence grammar') that will be used in the first three parts of this question. Note that the terminal symbols are the digits 0 to 9 inclusive and no non-terminals are named i or o to avoid confusion with the digits. sentence :: zzzzzz; z :: alb|cldlelflglhljik; a ::= '1' m; b:: ¹2¹ n; c :: '3' p; 4' q e ::= '5' x ; f ::- '6' s; g ::- '7' t; h :: 18 m ::'9' v; k ::= '0' wi m ::m 13'; n ::= '4'; P ::= '5'; q: '6'; I 1:- *7'; S 1:¹8; t ::= '9'; u ::= '0'; v ::= '1'; W ::= '2';
- 10- The sentence grammar can be used either to generate sequences of 12-digits or to check whether a 12-digit sequence is a valid 'sentence'. (a) Which, if any, of the following sequences of digits are valid sentences according to the sentence grammar? 573531466891 132457799102 (b) Use your six-digit exam number as follows to generate a sequence of 12 digits that would be valid according to the sentence grammar. Start by using each digit of your exam number, in order, to select the non-terminals a to k whose terminal symbol on their right-hand sides match your exam number's digits, in place of the six z non-terminals in the sentence rule. For instance, if your exam number were 123456 then the z symbols in the sentence rule would be replaced by abcdef because the a rule has '1' on its right-hand side, the b rule has '2', etc. If your exam number were 567890 then the sentence rule would generate efghjk because the e rule has 5 on its right-hand-side, etc.. Now follow the rules in the sentence grammar to continue the generation process from that six-letter sequence until you have generated a valid sequence of only terminal symbols, which will consist of exactly 12 digits. (c) Draw the parse tree for the sequence you generated in your answer to part (b). If you hand draw the tree on paper, please take a clear photo of the image and insert the image into your answer book. Include the step that involved replacing the 2 non-terminals with the six a to k non-terminals.
this questions requires a
knowledge of the hack assembly language, binary
sequence, and gates (and, not etc).
if can be possible can I please get an explanation
on how the question was answered.
4. The notation for grammars in this question uses the following conventions, similar to those used in the course: B ::- in a rule means that the symbol to its left-hand-side is defined by the symbols to the right-hand side. A semicolon marks the end of each 'rule'. . • Parentheses group multiple symbols as a single item. • A ? means the preceding symbol or group is optional. . A means the preceding symbol or group occurs zero or more times. • A separates alternative symbols or groups. . Items enclosed in single quotes represent literal text (e.g.,+ represents a single-character plus symbol). ● Items in upper-case (e.g., IDENTIFIER) represent symbols identified by a tokenizer (lexical analyser). Consider the following grammar ('the sentence grammar') that will be used in the first three parts of this question. Note that the terminal symbols are the digits 0 to 9 inclusive and no non-terminals are named i or o to avoid confusion with the digits. sentence :: zzzzzz; z :: alb|cldlelflglhljik; a ::= '1' m; b:: ¹2¹ n; c :: '3' p; 4' q e ::= '5' x ; f ::- '6' s; g ::- '7' t; h :: 18 m ::'9' v; k ::= '0' wi m ::m 13'; n ::= '4'; P ::= '5'; q: '6'; I 1:- *7'; S 1:¹8; t ::= '9'; u ::= '0'; v ::= '1'; W ::= '2';
- 10- The sentence grammar can be used either to generate sequences of 12-digits or to check whether a 12-digit sequence is a valid 'sentence'. (a) Which, if any, of the following sequences of digits are valid sentences according to the sentence grammar? 573531466891 132457799102 (b) Use your six-digit exam number as follows to generate a sequence of 12 digits that would be valid according to the sentence grammar. Start by using each digit of your exam number, in order, to select the non-terminals a to k whose terminal symbol on their right-hand sides match your exam number's digits, in place of the six z non-terminals in the sentence rule. For instance, if your exam number were 123456 then the z symbols in the sentence rule would be replaced by abcdef because the a rule has '1' on its right-hand side, the b rule has '2', etc. If your exam number were 567890 then the sentence rule would generate efghjk because the e rule has 5 on its right-hand-side, etc.. Now follow the rules in the sentence grammar to continue the generation process from that six-letter sequence until you have generated a valid sequence of only terminal symbols, which will consist of exactly 12 digits. (c) Draw the parse tree for the sequence you generated in your answer to part (b). If you hand draw the tree on paper, please take a clear photo of the image and insert the image into your answer book. Include the step that involved replacing the 2 non-terminals with the six a to k non-terminals.