Computer Science, asked by mjkin7073, 10 months ago

How to solve water jug problem in AI?

Answers

Answered by Anonymous
9

Water jug problem in Artificial Intelligence

(x,y) If x<4. (4,y) Fill the 4 gallon jug completely.

(x,y) if y<3. (x,3) Fill the 3 gallon jug completely.

(x,y) If x>0. (x-d,y) Pour some part from the 4 gallon jug.

(x,y) If y>0. (x,y-d) Pour some part from the 3 gallon jug.

(x,y) If x>0. (0,y) ...

(x,y) If y>0. (x,0) ...

(x,y) If (x+y)<7. (4, y-[4-x]) ...

(x,y) If (x+y)<7. (x-[3-y],y)

Answered by vivekyadav131982
0
int main() {
int side, area;
printf("\nEnter the Length of Side : ");
scanf("%d", &side);
area = side * side;
printf("\nArea of Square : %d", area);
return (0);
Similar questions