Implement a rule \"crypto\" that solves the following cryptarithmetic addition p
ID: 3838875 • Letter: I
Question
Implement a rule "crypto" that solves the following cryptarithmetic addition problem in Prolog:
WAIT + ALL = GIFTS
Each of the letters stands for a different digit.
The 3 letters (W, A, G) cannot be 0.
The aim is to find a substitution of digits for the letters such that the above stated product is arithmetically correct. Your program should find all answers.
It should be possible to query your solution in this manner:
?- crypto(W,A,I,T,L,G,F,S)).
Your solution should then produce all of the combinations of the digits that satisfy the addition problem above.
Make sure you never let W=A, or I=T, etc... all of the distinct letters must stand for distinct digits.
Use generate-and-test!
So far I have this:
I'm not sure how much of that is right though.
Explanation / Answer
In statistics, what do each of the letters stand for in PHATC. I'm pretty sure H is "Hypothesis", A is "Assumptions, but I have no clue about the other ones. Please advice.
P-Problem (Identify the population parameter of interest)
H-Hypothesis- State null and alternative hypothesis
A-Assumptions
T- Test statistic (test statistic, critical values)
C-Conclusion.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.