Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please provide a working code in python. Project 1 Introduction In this project, we will be using the toy water pitcher problem to expand on

image text in transcribed

please provide a working code in python.

Project 1 Introduction In this project, we will be using the toy water pitcher problem to expand on our understanding of the "search" problem. The learning objectives are: (i) Search problem (ii) Dynamically creating a graph, when there are no nodes or edges in sight. (iii) A* algorithm, heuristic, and lower bound Input and Output You are given a text file with 2 lines. First line has a variable number of integers, comma separated. Second line has an integer. There are no comments etc. in the file. (Don't bother trying to handle negative numbers, fractional numbers, alphanumeric test cases etc. I trust you know how to do that, and this class is not focused on that.) Input File Structure input.txt 1,4,10,15,22// Represents the capacities of the different water pitchers // You also have access to a virtual "infinite" capacity pitcher 181 // Represents the Target quantity Sample Files > cat input1.txt 2,5,6,72 143 >> cat input2.txt 3,6 2 > cat input3.txt 2 143 >> cat input4.txt 2,3,5,19,121,852 11443

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

3. Go over a sample question first.

Answered: 1 week ago