Tuesday, October 6, 2009

Demo Crypto.pro Lab3 part4

?- consult('crypto.pro').
% gv.pro compiled 0.00 sec, 3,112 bytes
% combosets.pro compiled 0.01 sec, 7,496 bytes
% crypto.pro compiled 0.01 sec, 22,344 bytes

Yes
?- demo.
Crypto Problem: numbers = {8, 12, 9, 12, 0} Goal = 8
Possible Solution: ( ( 9 * 0 ) - ( 12 - ( 8 + 12 ) ) )

Yes
?- demo5.
Crypto Problem: numbers = {10, 12, 6, 5, 15} Goal = 12
Possible Solution: ( 6 * ( ( 10 + 12 ) - ( 5 + 15 ) ) )

Crypto Problem: numbers = {1, 12, 12, 3, 9} Goal = 13
Possible Solution: ( ( 9 + ( 1 + 12 ) ) - ( 12 - 3 ) )

Crypto Problem: numbers = {2, 8, 4, 0, 2} Goal = 0
Possible Solution: ( ( 4 * 0 ) * ( 2 + ( 2 + 8 ) ) )

Crypto Problem: numbers = {5, 14, 14, 8, 8} Goal = 0
Possible Solution: ( ( 14 + ( 5 + 14 ) ) * ( 8 - 8 ) )

Crypto Problem: numbers = {6, 9, 3, 3, 15} Goal = 8
Possible Solution: ( ( 3 * 3 ) - ( ( 6 + 9 ) / 15 ) )

Yes
?- demo5.
Crypto Problem: numbers = {12, 2, 5, 7, 7} Goal = 15
Possible Solution: ( 5 * ( ( 7 + ( 12 + 2 ) ) / 7 ) )

Crypto Problem: numbers = {1, 5, 12, 14, 9} Goal = 3
Possible Solution: ( ( ( 1 + 5 ) * ( 14 - 12 ) ) - 9 )

Crypto Problem: numbers = {13, 2, 1, 0, 2} Goal = 12
Possible Solution: ( ( ( 13 + 2 ) - 2 ) - ( 1 + 0 ) )

Crypto Problem: numbers = {5, 2, 9, 3, 8} Goal = 4
Possible Solution: ( ( 9 / 3 ) + ( 8 - ( 5 + 2 ) ) )

Crypto Problem: numbers = {14, 8, 9, 3, 1} Goal = 2
Possible Solution: ( ( 14 + 8 ) / ( ( 9 + 3 ) - 1 ) )

Yes
?- halt.