Algorithms = 4 are the sizes of the containers.

Algorithms AssignmentInstitutionNameDate Pouring Water:(a)Let P = (V, E) represent our directed graph. We then have to model the nodes as a triple of numbers (a_0,a_(1,) a_2) where, S_0 =10, S_1 = 7, S_2 = 4 are the sizes of the containers. a_i will correspond with the real contents of the ith  container.It must be also true that 0Using namespace stdConst int Num_heaps = 2;Int main(){Int heapsNum_heaps;Int player=2Int heap 00;Int heap 01;Int selectedWhile(!isEmpty(heaps)){Draw_rows (heaps);If (player===2)Player=1;ElsePlayer=2;Cout<<"player" <>selected;If(heapsselected==0){ cout<<"already empty";Selected=1;}If (selelcted<0||selected>2)Cout<<"invalid entry, Try again"<2)Switch (selected){Case 0 cout<<"enter number of elements to remove"<>heap01;If (heap01<0||heap01>heaps1)Cout<<"Try again invalid entry"<0||heap01

x

Hi!
I'm Neil!

Would you like to get a custom essay? How about receiving a customized one?

Check it out