2For this assignment you need to implement 2 DFA’s using prolog. 1. First DFA needs to take a number and process it digit by digit and accept it if it is divisible by 7. To do this you will need 7 states (0,1,2,3,4,5,6) and your alphabet needs to be the 10 possible digits.
2For this assignment you need to implement 2 DFA’s using prolog.
1. First DFA needs to take a number and process it digit by digit and accept it if it is divisible by 7.
To do this you will need 7 states (0,1,2,3,4,5,6) and your alphabet needs to be the 10 possible
digits.
Prolog Language
It is important in artificial intelligence. Unlike many other programming languages, Prolog is primarily intended as a declarative programming language. In Prolog, logic is expressed in terms of relationships (called facts and rules). The heart of the prologue is the applied logic. A formulation or calculation is performed by querying these relationships.
In the prolog, I will explain some facts. The system's knowledge base is comprised of these information. You will get a positive output if the query is already in the knowledge base or implied by the knowledge base. Otherwise you get a negative output. A knowledge base can therefore be considered similar to a queryable database. Prologue facts are expressed in a particular pattern. Facts contain entities and their relationships. Entities are written within square brackets separated by commas (, ). Their relationship is expressed at the beginning and outside of parentheses.
Step by step
Solved in 2 steps