Question: Introduction: Parasitic numbers are nonnegative integer numbers ( possibly very long ) , the sequence of digits of which exhibits the following property - if
Introduction: Parasitic numbers are nonnegative integer numbers possibly very long the
sequence of digits of which exhibits the following property if multiplied by the lowest digit,
called the base digit, the digits in the result form the same sequence except the last one that jumps
to the beginning. For example, in the decimal numeral system the cyclic number ending with is
Indeed, It is obvious that and are parasitic numbers by
themselves.
There is a simple algorithm that computes on digitbydigit basis a parasitic number with
the given base digit:
Initialize the carry with ;
Multiply the last digit by itself and add the carry to the result;
Assign the units of the obtained result to the next digit;
Assign the tens of the obtained result to the carry;
Multiply the next digit by the last digit and add the carry;
Return to step ;
Stop the process when the last two digits are the carry remains
The stepbystep implementation of the outlined algorithm for the shortest parasitic number
ending with in the decimal numeral is shown below:
Task : Construct in the alphabet a DFA
that checks if the input is a parasitic number. It accepts integer numbers in decimal notation written
in the reversed order. In other words, the base digit is written in the first input cell. For example,
the following input words are accepted:
Hint: consider an indexed set of states where each multiplication step in the
algorithm is represented by a state with three indexes and that correspond to the values of
the base digit, the current carry and the next digit respectively.
Task : Construct in the alphabet an NFA
that checks if the input is a parasitic number. It accepts integer numbers in decimal notation written
in the regular order. In other words, the base digit is written in the last input cell. For example, the
following input words are accepted:
Task Write a regular expression that describes all parasitic numbers in base numeral system.
Task : Repeat Task in base numeral system. Construct in the alphabet an
NFA that checks if the input is a parasitic number. It accepts integer numbers
in base notation written in the regular order. Draw the diagram of the NFA
Task : Convert the NFA from Task into DFA Draw its diagram.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
