Diiference between Mealy and Moore machine
Mealy machine has 6 tuples: (Q, q0, ∑, O, δ, λ’) Moore machine has 6 tuples: (Q, q0, ∑, O, δ, λ’) Mealy machine vs … Read more
Mealy machine has 6 tuples: (Q, q0, ∑, O, δ, λ’) Moore machine has 6 tuples: (Q, q0, ∑, O, δ, λ’) Mealy machine vs … Read more
To convert a Moore machine into an equivalent Mealy machine, we need to modify the transition function so that it takes an input symbol and … Read more
Mealy Machine to Moore Machine Conversion Mealy machine for an input string of length ‘n’, Transition table for Mealy machine. PRESENT STATE NEXT STATE INPUT … Read more
RGPV 2015 PYQQ. State and explain the properties of transition functions ? Ans. A transition function is defined on every state for every input symbol. … Read more
RGPV 2010, 02 Q. Write short note on equivalent of DFA and NDFA ? Solution: Every DFA is an NDFA. If from a regular set … Read more
Consider the following C code. Assume that unsigned long int type length is 64 bits. unsigned long int fun(unsigned long int n){ unsigned long int i, j = 0, sum = 0; for (i = n; i > 1; i = i/2) j++; for ( ; j > 1; j = j/2) sum++; return(sum); } The value returned when … Read more
Consider the following C program: #include<stdio.h> void fun1(char *s1, char *s2){ char *tmp; tmp = s1; s1 = s2; s2 = tmp; } void fun2(char **s1, char **s2){ char *tmp; tmp = *s1; *s1 = *s2; *s2 = tmp; } int main(){ char *str1 = “Hi”, *str2 = “Bye”; fun1(str1, str2); printf(“%s %s “, str1, str2); fun2(&str1, &str2); printf(“%s %s”, str1, str2); return 0; } … Read more
RGPV 2020 CPU Scheduling Algorithm Consider the following set of processes. Process Burst Time Arrival Time P1 3 0 P2 5 1 P3 2 2 … Read more
Consider the following C program. #include <stdio.h> struct Ournode{ char x,y,z; }; int main(){ struct Ournode p = {‘1’, ‘0’, ‘a’+2}; struct Ournode *q = &p; printf (“%c, %c”, *((char*)q+1), *((char*)q+2)); return 0; } The output of this program is?
TCS NQT Q. An automobile company manufactures both a two wheeler (TW) and a four wheeler (FW). A company manager wants to make the production … Read more